diff --git a/deno.jsonc b/deno.jsonc index df69c53d0..00cc060e0 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -24,4 +24,4 @@ "netzo/": "https://deno.land/x/netzo@v0.2.21/", "@/": "./" } -} \ No newline at end of file +} diff --git a/lib/apis/_create-api/auth/mod.ts b/lib/apis/_create-api/auth/mod.ts index 6c756a372..030a6b531 100644 --- a/lib/apis/_create-api/auth/mod.ts +++ b/lib/apis/_create-api/auth/mod.ts @@ -44,7 +44,7 @@ export const auth = async ( ); headers.Authorization = token_type ? `${token_type} ${access_token}` - : access_token;; + : access_token; } options.query = { ...options.query, ...query }; diff --git a/lib/apis/airtable/mod.ts b/lib/apis/airtable/mod.ts index 6f977f04b..989d6b9f6 100644 --- a/lib/apis/airtable/mod.ts +++ b/lib/apis/airtable/mod.ts @@ -37,5 +37,5 @@ export const airtable = ({ }, }); - return { api }; + return { api }; }; diff --git a/lib/apis/airtable/types.ts b/lib/apis/airtable/types.ts index f83dd327d..a07d13ebc 100644 --- a/lib/apis/airtable/types.ts +++ b/lib/apis/airtable/types.ts @@ -6,10 +6,11 @@ interface RecordObject { } export interface Records { - records: Array + records: Array< + RecordObject & { + createdTime: string; + } + >; } export interface QueryRecords { @@ -49,7 +50,7 @@ export interface QueryDeleteRecords { export interface RecordsDeleted { records: Array<{ - deleted: boolean + deleted: boolean; id: string; - }> + }>; } diff --git a/lib/apis/hubspot/types.ts b/lib/apis/hubspot/types.ts index fdf0978e4..2894e02c5 100644 --- a/lib/apis/hubspot/types.ts +++ b/lib/apis/hubspot/types.ts @@ -1,24 +1,24 @@ interface ContactBase { properties: { - company: string - createdate: string - email: string - firstname: string - lastmodifieddate: string - lastname: string - phone: string - website: string - } + company: string; + createdate: string; + email: string; + firstname: string; + lastmodifieddate: string; + lastname: string; + phone: string; + website: string; + }; } export interface Contacts { - results: ContactBase[] + results: ContactBase[]; paging: { next: { - after: string - link: string - } - } + after: string; + link: string; + }; + }; } export interface QueryContacts { @@ -41,65 +41,65 @@ export interface AddContactResponse extends ContactBase { } export interface Form { - portalId: number - guid: string - name: string - action: string - method: string - cssClass: string - redirect: string - submitText: string - followUpId: string - notifyRecipients: string - leadNurturingCampaignId: string - formFieldGroups: Array<{ - fields: Array<{ - name: string - label: string - type: string - fieldType: string - description: string - groupName: string - displayOrder: number - required: boolean - selectedOptions: Array - options: Array - validation: { - name: string - message: string - data: string - useDefaultBlockList: boolean - blockedEmailAddresses: Array - } - enabled: boolean - hidden: boolean - defaultValue: string - isSmartField: boolean - unselectedLabel: string - placeholder: string - dependentFieldFilters: Array - labelHidden: boolean - }> - default: boolean - isSmartGroup: boolean - richText: { - content: string - } - }> - createdAt: number - updatedAt: number - performableHtml: string - migratedFrom: string - ignoreCurrentValues: boolean - metaData: Array - deletable: boolean - inlineMessage: string - tmsId: string - captchaEnabled: boolean - campaignGuid: string - cloneable: boolean - editable: boolean - formType: string + portalId: number; + guid: string; + name: string; + action: string; + method: string; + cssClass: string; + redirect: string; + submitText: string; + followUpId: string; + notifyRecipients: string; + leadNurturingCampaignId: string; + formFieldGroups: Array<{ + fields: Array<{ + name: string; + label: string; + type: string; + fieldType: string; + description: string; + groupName: string; + displayOrder: number; + required: boolean; + selectedOptions: Array; + options: Array; + validation: { + name: string; + message: string; + data: string; + useDefaultBlockList: boolean; + blockedEmailAddresses: Array; + }; + enabled: boolean; + hidden: boolean; + defaultValue: string; + isSmartField: boolean; + unselectedLabel: string; + placeholder: string; + dependentFieldFilters: Array; + labelHidden: boolean; + }>; + default: boolean; + isSmartGroup: boolean; + richText: { + content: string; + }; + }>; + createdAt: number; + updatedAt: number; + performableHtml: string; + migratedFrom: string; + ignoreCurrentValues: boolean; + metaData: Array; + deletable: boolean; + inlineMessage: string; + tmsId: string; + captchaEnabled: boolean; + campaignGuid: string; + cloneable: boolean; + editable: boolean; + formType: string; } export interface QueryForms { @@ -110,19 +110,19 @@ export interface QueryForms { export interface FormSubmissions { results: Array<{ - submittedAt: number + submittedAt: number; values: Array<{ - name: string - value: string - }> - pageUrl?: string - }> + name: string; + value: string; + }>; + pageUrl?: string; + }>; paging: { next: { - after: string - link: string - } - } + after: string; + link: string; + }; + }; } export interface QuerySubmissions { @@ -150,13 +150,13 @@ interface DealBase { } export interface Deals { - results: DealBase[] - paging: { - next: { - after: string - link: string - } - } + results: DealBase[]; + paging: { + next: { + after: string; + link: string; + }; + }; } export interface QueryAddDeal { diff --git a/lib/apis/notion/mod.ts b/lib/apis/notion/mod.ts index af6028af3..7263bfd9e 100644 --- a/lib/apis/notion/mod.ts +++ b/lib/apis/notion/mod.ts @@ -5,8 +5,8 @@ export type { NotionPagination, Page, Pages, - QueryProperties, QueryDatabase, + QueryProperties, Users, } from "./types.ts"; diff --git a/lib/apis/notion/types.ts b/lib/apis/notion/types.ts index f1fbfec7c..6d3fc8f2a 100644 --- a/lib/apis/notion/types.ts +++ b/lib/apis/notion/types.ts @@ -44,16 +44,16 @@ export interface QueryProperties { export interface Pages { object: string; - results: Page[], - next_cursor: any, - has_more: false, - type: string, - [key: string]: {} //type value becomes the key name + results: Page[]; + next_cursor: any; + has_more: false; + type: string; + [key: string]: {}; //type value becomes the key name } export interface Block { - object: string, - results:Array<{ + object: string; + results: Array<{ object: string; id: string; parent: { @@ -73,12 +73,12 @@ export interface Block { }; has_children: boolean; archived: boolean; - [key: string]: {}; - }>, - next_cursor: any, - has_more: false, - type: string, - [key: string]: {} //type value becomes the key name + [key: string]: {}; + }>; + next_cursor: any; + has_more: false; + type: string; + [key: string]: {}; //type value becomes the key name } interface UserBase { @@ -106,9 +106,9 @@ interface BotUser extends UserBase { } export interface Users { - results: Array - next_cursor: string, - has_more: boolean + results: Array; + next_cursor: string; + has_more: boolean; } export interface QueryDatabase extends NotionPagination { diff --git a/lib/apis/pipedrive/mod.ts b/lib/apis/pipedrive/mod.ts index 764d48628..167c97af9 100644 --- a/lib/apis/pipedrive/mod.ts +++ b/lib/apis/pipedrive/mod.ts @@ -1,7 +1,10 @@ import { createApi } from "../_create-api/mod.ts"; import { auth } from "../_create-api/auth/mod.ts"; export type { + AddOrUpdateDealResponse, + AddOrUpdatePersonResponse, Deals, + DeleteResponse, Persons, QueryAddDeal, QueryAddPerson, @@ -13,9 +16,6 @@ export type { QueryUpdatePerson, SearchDealsResponse, SearchPersonsResponse, - AddOrUpdatePersonResponse, - AddOrUpdateDealResponse, - DeleteResponse } from "./types.ts"; export interface PipeDriveOptions { diff --git a/lib/apis/pipedrive/types.ts b/lib/apis/pipedrive/types.ts index 0f59bd135..869299814 100644 --- a/lib/apis/pipedrive/types.ts +++ b/lib/apis/pipedrive/types.ts @@ -1,184 +1,184 @@ interface DealDetails { - id: number - creator_user_id: { - id: number - name: string - email: string - has_pic: boolean - pic_hash: any - active_flag: boolean - value: number - } - user_id: { - id: number - name: string - email: string - has_pic: boolean - pic_hash: any - active_flag: boolean - value: number - } - person_id: { - active_flag: boolean - name: string - email: Array<{ - label: string - value: string - primary: boolean - }> - phone: Array<{ - label: string - value: string - primary: boolean - }> - value: number - } - org_id: { - name: string - people_count: number - owner_id: number - address: string - active_flag: boolean - cc_email: string - value: number - } - stage_id: number - title: string - value: number - currency: string - add_time: string - update_time: string - stage_change_time: string - active: boolean - deleted: boolean - status: string - probability: any - next_activity_date: string - next_activity_time: string - next_activity_id: number - last_activity_id: any - last_activity_date: any - lost_reason: any - visible_to: string - close_time: any - pipeline_id: number - won_time: string - first_won_time: string - lost_time: string - products_count: number - files_count: number - notes_count: number - followers_count: number - email_messages_count: number - activities_count: number - done_activities_count: number - undone_activities_count: number - participants_count: number - expected_close_date: string - last_incoming_mail_time: string - last_outgoing_mail_time: string - label: string - stage_order_nr: number - person_name: string - org_name: string - next_activity_subject: string - next_activity_type: string - next_activity_duration: string - next_activity_note: string - formatted_value: string - weighted_value: number - formatted_weighted_value: string - weighted_value_currency: string - rotten_time: any - owner_name: string - cc_email: string - org_hidden: boolean - person_hidden: boolean + id: number; + creator_user_id: { + id: number; + name: string; + email: string; + has_pic: boolean; + pic_hash: any; + active_flag: boolean; + value: number; + }; + user_id: { + id: number; + name: string; + email: string; + has_pic: boolean; + pic_hash: any; + active_flag: boolean; + value: number; + }; + person_id: { + active_flag: boolean; + name: string; + email: Array<{ + label: string; + value: string; + primary: boolean; + }>; + phone: Array<{ + label: string; + value: string; + primary: boolean; + }>; + value: number; + }; + org_id: { + name: string; + people_count: number; + owner_id: number; + address: string; + active_flag: boolean; + cc_email: string; + value: number; + }; + stage_id: number; + title: string; + value: number; + currency: string; + add_time: string; + update_time: string; + stage_change_time: string; + active: boolean; + deleted: boolean; + status: string; + probability: any; + next_activity_date: string; + next_activity_time: string; + next_activity_id: number; + last_activity_id: any; + last_activity_date: any; + lost_reason: any; + visible_to: string; + close_time: any; + pipeline_id: number; + won_time: string; + first_won_time: string; + lost_time: string; + products_count: number; + files_count: number; + notes_count: number; + followers_count: number; + email_messages_count: number; + activities_count: number; + done_activities_count: number; + undone_activities_count: number; + participants_count: number; + expected_close_date: string; + last_incoming_mail_time: string; + last_outgoing_mail_time: string; + label: string; + stage_order_nr: number; + person_name: string; + org_name: string; + next_activity_subject: string; + next_activity_type: string; + next_activity_duration: string; + next_activity_note: string; + formatted_value: string; + weighted_value: number; + formatted_weighted_value: string; + weighted_value_currency: string; + rotten_time: any; + owner_name: string; + cc_email: string; + org_hidden: boolean; + person_hidden: boolean; } interface RelatedObjectsDeal { user: { - [key:string]: { - id: number - name: string - email: string - has_pic: boolean - pic_hash: any - active_flag: boolean - } - } + [key: string]: { + id: number; + name: string; + email: string; + has_pic: boolean; + pic_hash: any; + active_flag: boolean; + }; + }; organization: { - [key:string]: { - id: number - name: string - people_count: number - owner_id: number - address: string - active_flag: boolean - cc_email: string - } - } + [key: string]: { + id: number; + name: string; + people_count: number; + owner_id: number; + address: string; + active_flag: boolean; + cc_email: string; + }; + }; person: { - [key:string]: { - active_flag: boolean - id: number - name: string + [key: string]: { + active_flag: boolean; + id: number; + name: string; email: Array<{ - label: string - value: string - primary: boolean - }> + label: string; + value: string; + primary: boolean; + }>; phone: Array<{ - label: string - value: string - primary: boolean - }> - owner_id: number - } - } + label: string; + value: string; + primary: boolean; + }>; + owner_id: number; + }; + }; stage: { - [key:string]: { - id: number - company_id: number - order_nr: number - name: string - active_flag: boolean - deal_probability: number - pipeline_id: number - rotten_flag: boolean - rotten_days: any - add_time: string - update_time: string - pipeline_name: string - pipeline_deal_probability: boolean - } - } + [key: string]: { + id: number; + company_id: number; + order_nr: number; + name: string; + active_flag: boolean; + deal_probability: number; + pipeline_id: number; + rotten_flag: boolean; + rotten_days: any; + add_time: string; + update_time: string; + pipeline_name: string; + pipeline_deal_probability: boolean; + }; + }; pipeline: { - [key:string]: { - id: number - name: string - url_title: string - order_nr: number - active: boolean - deal_probability: boolean - add_time: string - update_time: string - } - } + [key: string]: { + id: number; + name: string; + url_title: string; + order_nr: number; + active: boolean; + deal_probability: boolean; + add_time: string; + update_time: string; + }; + }; } export interface Deals { - success: boolean - data: DealDetails[] - related_objects: RelatedObjectsDeal + success: boolean; + data: DealDetails[]; + related_objects: RelatedObjectsDeal; additional_data: { pagination: { - start: number - limit: number - more_items_in_collection: boolean - next_start: number - } - } + start: number; + limit: number; + more_items_in_collection: boolean; + next_start: number; + }; + }; } export interface QueryGetDeals { @@ -193,53 +193,53 @@ export interface QueryGetDeals { } export interface SearchDealsResponse { - success: boolean + success: boolean; data: { items: Array<{ - result_score: number + result_score: number; item: { - id: number - type: string - title: string - value: number - currency: string - status: string - visible_to: number + id: number; + type: string; + title: string; + value: number; + currency: string; + status: string; + visible_to: number; owner: { - id: number - } + id: number; + }; stage: { - id: number - name: string - } + id: number; + name: string; + }; person: { - id: number - name: string - } - organization: any - custom_fields: Array - notes: Array - } - }> - } + id: number; + name: string; + }; + organization: any; + custom_fields: Array; + notes: Array; + }; + }>; + }; additional_data: { - description: string - type: string + description: string; + type: string; properties: { start: { - type: string - description: string - } + type: string; + description: string; + }; limit: { - type: string - description: string - } + type: string; + description: string; + }; more_items_in_collection: { - type: string - description: string - } - } - } + type: string; + description: string; + }; + }; + }; } export interface QuerySearchDeals { @@ -277,140 +277,140 @@ export interface QueryUpdateDeal } export interface AddOrUpdateDealResponse { - success: boolean - data: DealDetails - related_objects: RelatedObjectsDeal - } + success: boolean; + data: DealDetails; + related_objects: RelatedObjectsDeal; +} export interface Persons { - success: boolean + success: boolean; data: Array<{ - id: number - company_id: number + id: number; + company_id: number; owner_id: { - id: number - name: string - email: string - has_pic: number - pic_hash: string - active_flag: boolean - value: number - } + id: number; + name: string; + email: string; + has_pic: number; + pic_hash: string; + active_flag: boolean; + value: number; + }; org_id: { - name: string - people_count: number - owner_id: number - address: string - active_flag: boolean - cc_email: string - value: number - } - name: string - first_name: string - last_name: string - open_deals_count: number - related_open_deals_count: number - closed_deals_count: number - related_closed_deals_count: number - participant_open_deals_count: number - participant_closed_deals_count: number - email_messages_count: number - activities_count: number - done_activities_count: number - undone_activities_count: number - files_count: number - notes_count: number - followers_count: number - won_deals_count: number - related_won_deals_count: number - lost_deals_count: number - related_lost_deals_count: number - active_flag: boolean + name: string; + people_count: number; + owner_id: number; + address: string; + active_flag: boolean; + cc_email: string; + value: number; + }; + name: string; + first_name: string; + last_name: string; + open_deals_count: number; + related_open_deals_count: number; + closed_deals_count: number; + related_closed_deals_count: number; + participant_open_deals_count: number; + participant_closed_deals_count: number; + email_messages_count: number; + activities_count: number; + done_activities_count: number; + undone_activities_count: number; + files_count: number; + notes_count: number; + followers_count: number; + won_deals_count: number; + related_won_deals_count: number; + lost_deals_count: number; + related_lost_deals_count: number; + active_flag: boolean; phone: Array<{ - value: string - primary: boolean - label: string - }> + value: string; + primary: boolean; + label: string; + }>; email: Array<{ - value: string - primary: boolean - label: string - }> - primary_email: string - first_char: string - update_time: string - add_time: string - visible_to: string - marketing_status: string + value: string; + primary: boolean; + label: string; + }>; + primary_email: string; + first_char: string; + update_time: string; + add_time: string; + visible_to: string; + marketing_status: string; picture_id: { - item_type: string - item_id: number - active_flag: boolean - add_time: string - update_time: string - added_by_user_id: number + item_type: string; + item_id: number; + active_flag: boolean; + add_time: string; + update_time: string; + added_by_user_id: number; pictures: { - [key:string]: string - } - value: number - } - next_activity_date: string - next_activity_time: string - next_activity_id: number - last_activity_id: number - last_activity_date: string - last_incoming_mail_time: string - last_outgoing_mail_time: string - label: number - org_name: string - owner_name: string - cc_email: string - }> + [key: string]: string; + }; + value: number; + }; + next_activity_date: string; + next_activity_time: string; + next_activity_id: number; + last_activity_id: number; + last_activity_date: string; + last_incoming_mail_time: string; + last_outgoing_mail_time: string; + label: number; + org_name: string; + owner_name: string; + cc_email: string; + }>; additional_data: { pagination: { - start: number - limit: number - more_items_in_collection: boolean - next_start: number - } - } + start: number; + limit: number; + more_items_in_collection: boolean; + next_start: number; + }; + }; related_objects: { organization: { - [key:string]: { - id: number - name: string - people_count: number - owner_id: number - address: string - active_flag: boolean - cc_email: string - } - } + [key: string]: { + id: number; + name: string; + people_count: number; + owner_id: number; + address: string; + active_flag: boolean; + cc_email: string; + }; + }; user: { - [key:string]: { - id: number - name: string - email: string - has_pic: number - pic_hash: string - active_flag: boolean - } - } + [key: string]: { + id: number; + name: string; + email: string; + has_pic: number; + pic_hash: string; + active_flag: boolean; + }; + }; picture: { - [key:string]: { - id: number - item_type: string - item_id: number - active_flag: boolean - add_time: string - update_time: string - added_by_user_id: number + [key: string]: { + id: number; + item_type: string; + item_id: number; + active_flag: boolean; + add_time: string; + update_time: string; + added_by_user_id: number; pictures: { - [key:string]: string - } - } - } - } + [key: string]: string; + }; + }; + }; + }; } export interface QueryGetPersons { @@ -425,37 +425,37 @@ export interface QueryGetPersons { export type QuerySearchPersons = Omit; export interface SearchPersonsResponse { - success: boolean + success: boolean; data: { items: Array<{ - result_score: number + result_score: number; item: { - id: number - type: string - name: string - phones: Array - emails: Array - visible_to: number + id: number; + type: string; + name: string; + phones: Array; + emails: Array; + visible_to: number; owner: { - id: number - } + id: number; + }; organization: { - id: number - name: string - address: any - } - custom_fields: Array - notes: Array - } - }> - } + id: number; + name: string; + address: any; + }; + custom_fields: Array; + notes: Array; + }; + }>; + }; additional_data: { pagination: { - start: number - limit: number - more_items_in_collection: boolean - } - } + start: number; + limit: number; + more_items_in_collection: boolean; + }; + }; } export interface QueryAddPerson { @@ -474,114 +474,106 @@ export interface QueryUpdatePerson extends Omit { } export interface AddOrUpdatePersonResponse { - success: boolean + success: boolean; data: { - id: number - company_id: number + id: number; + company_id: number; owner_id: { - id: number - name: string - email: string - has_pic: number - pic_hash: string - active_flag: boolean - value: number - } + id: number; + name: string; + email: string; + has_pic: number; + pic_hash: string; + active_flag: boolean; + value: number; + }; org_id: { - name: string - people_count: number - owner_id: number - address: string - active_flag: boolean - cc_email: string - value: number - } - name: string - first_name: string - last_name: string - open_deals_count: number - related_open_deals_count: number - closed_deals_count: number - related_closed_deals_count: number - participant_open_deals_count: number - participant_closed_deals_count: number - email_messages_count: number - activities_count: number - done_activities_count: number - undone_activities_count: number - files_count: number - notes_count: number - followers_count: number - won_deals_count: number - related_won_deals_count: number - lost_deals_count: number - related_lost_deals_count: number - active_flag: boolean + name: string; + people_count: number; + owner_id: number; + address: string; + active_flag: boolean; + cc_email: string; + value: number; + }; + name: string; + first_name: string; + last_name: string; + open_deals_count: number; + related_open_deals_count: number; + closed_deals_count: number; + related_closed_deals_count: number; + participant_open_deals_count: number; + participant_closed_deals_count: number; + email_messages_count: number; + activities_count: number; + done_activities_count: number; + undone_activities_count: number; + files_count: number; + notes_count: number; + followers_count: number; + won_deals_count: number; + related_won_deals_count: number; + lost_deals_count: number; + related_lost_deals_count: number; + active_flag: boolean; phone: Array<{ - value: string - primary: boolean - label: string - }> + value: string; + primary: boolean; + label: string; + }>; email: Array<{ - value: string - primary: boolean - label: string - }> - primary_email: string - first_char: string - update_time: string - add_time: string - visible_to: string - marketing_status: string + value: string; + primary: boolean; + label: string; + }>; + primary_email: string; + first_char: string; + update_time: string; + add_time: string; + visible_to: string; + marketing_status: string; picture_id: { - item_type: string - item_id: number - active_flag: boolean - add_time: string - update_time: string - added_by_user_id: number + item_type: string; + item_id: number; + active_flag: boolean; + add_time: string; + update_time: string; + added_by_user_id: number; pictures: { - [key:string]: string - } - value: number - } - next_activity_date: string - next_activity_time: string - next_activity_id: number - last_activity_id: number - last_activity_date: string - last_incoming_mail_time: string - last_outgoing_mail_time: string - label: number - org_name: string - owner_name: string - cc_email: string - } + [key: string]: string; + }; + value: number; + }; + next_activity_date: string; + next_activity_time: string; + next_activity_id: number; + last_activity_id: number; + last_activity_date: string; + last_incoming_mail_time: string; + last_outgoing_mail_time: string; + label: number; + org_name: string; + owner_name: string; + cc_email: string; + }; related_objects: { user: { [key: string]: { - id: number - name: string - email: string - has_pic: number - pic_hash: string - active_flag: boolean - } - } - } + id: number; + name: string; + email: string; + has_pic: number; + pic_hash: string; + active_flag: boolean; + }; + }; + }; } export interface DeleteResponse { - success: boolean + success: boolean; data: { - id: number - } + id: number; + }; } - - - - - - - - diff --git a/lib/apis/shopify/mod.ts b/lib/apis/shopify/mod.ts index cda2b905e..c8770faeb 100644 --- a/lib/apis/shopify/mod.ts +++ b/lib/apis/shopify/mod.ts @@ -3,22 +3,21 @@ import { auth } from "../_create-api/auth/mod.ts"; export type { AddOrUpdateCustomer, AddOrUpdateCustomerResponse, - Customers, Customer, + Customers, + Order, + Orders, + OrdersByCustomer, + OrderStatus, + Payouts, + Product, + Products, QueryCustomers, QueryOrders, QueryPayouts, QueryProducts, - OrderStatus, - OrdersByCustomer, - Orders, - Order, - Products, - Product, - Payouts, } from "./types.ts"; - export interface ShopifyOptions { storeName: string; apiVersion: string; diff --git a/lib/apis/shopify/types.ts b/lib/apis/shopify/types.ts index 5f034549d..432c6d3e3 100644 --- a/lib/apis/shopify/types.ts +++ b/lib/apis/shopify/types.ts @@ -47,11 +47,11 @@ interface CustomerDetails { } export interface Customers { - customers: CustomerDetails[] + customers: CustomerDetails[]; } export interface Customer { - customer: CustomerDetails + customer: CustomerDetails; } export interface QueryCustomers { @@ -88,7 +88,7 @@ export interface AddOrUpdateCustomer { }; } -export interface AddOrUpdateCustomerResponse { //OLD CUSTOMERSPECIFIC +export interface AddOrUpdateCustomerResponse { //OLD CUSTOMERSPECIFIC customer: CustomerDetails & { email_marketing_consent: { state: string; @@ -101,1418 +101,1418 @@ export interface AddOrUpdateCustomerResponse { //OLD CUSTOMERSPECIFIC consent_updated_at: any; consent_collected_from: string; }; - } + }; } export interface Orders { orders: Array<{ - id: number - admin_graphql_api_id: string - app_id: any - browser_ip: string - buyer_accepts_marketing: boolean - cancel_reason: any - cancelled_at: any - cart_token: string - checkout_id: number - checkout_token: string + id: number; + admin_graphql_api_id: string; + app_id: any; + browser_ip: string; + buyer_accepts_marketing: boolean; + cancel_reason: any; + cancelled_at: any; + cart_token: string; + checkout_id: number; + checkout_token: string; client_details: { - accept_language: any - browser_height: any - browser_ip: string - browser_width: any - session_hash: any - user_agent: any - } - closed_at: any - confirmed: boolean - contact_email: string - created_at: string - currency: string - current_subtotal_price: string + accept_language: any; + browser_height: any; + browser_ip: string; + browser_width: any; + session_hash: any; + user_agent: any; + }; + closed_at: any; + confirmed: boolean; + contact_email: string; + created_at: string; + currency: string; + current_subtotal_price: string; current_subtotal_price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - current_total_discounts: string + amount: string; + currency_code: string; + }; + }; + current_total_discounts: string; current_total_discounts_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - current_total_duties_set: any - current_total_price: string + amount: string; + currency_code: string; + }; + }; + current_total_duties_set: any; + current_total_price: string; current_total_price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - current_total_tax: string + amount: string; + currency_code: string; + }; + }; + current_total_tax: string; current_total_tax_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - customer_locale: any - device_id: any + amount: string; + currency_code: string; + }; + }; + customer_locale: any; + device_id: any; discount_codes: Array<{ - code: string - amount: string - type: string - }> - email: string - estimated_taxes: boolean - financial_status: string - fulfillment_status: any - gateway: string - landing_site: string - landing_site_ref: string - location_id: any - name: string - note: any + code: string; + amount: string; + type: string; + }>; + email: string; + estimated_taxes: boolean; + financial_status: string; + fulfillment_status: any; + gateway: string; + landing_site: string; + landing_site_ref: string; + location_id: any; + name: string; + note: any; note_attributes: Array<{ - name: string - value: string - }> - number: number - order_number: number - order_status_url: string - original_total_duties_set: any - payment_gateway_names: Array - phone: string - presentment_currency: string - processed_at: string - processing_method: string - reference: string - referring_site: string - source_identifier: string - source_name: string - source_url: any - subtotal_price: string + name: string; + value: string; + }>; + number: number; + order_number: number; + order_status_url: string; + original_total_duties_set: any; + payment_gateway_names: Array; + phone: string; + presentment_currency: string; + processed_at: string; + processing_method: string; + reference: string; + referring_site: string; + source_identifier: string; + source_name: string; + source_url: any; + subtotal_price: string; subtotal_price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - tags: string + amount: string; + currency_code: string; + }; + }; + tags: string; tax_lines: Array<{ - price: string - rate: number - title: string + price: string; + rate: number; + title: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - }> - taxes_included: boolean - test: boolean - token: string - total_discounts: string + amount: string; + currency_code: string; + }; + }; + }>; + taxes_included: boolean; + test: boolean; + token: string; + total_discounts: string; total_discounts_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - total_line_items_price: string + amount: string; + currency_code: string; + }; + }; + total_line_items_price: string; total_line_items_price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - total_outstanding: string - total_price: string + amount: string; + currency_code: string; + }; + }; + total_outstanding: string; + total_price: string; total_price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - total_price_usd: string + amount: string; + currency_code: string; + }; + }; + total_price_usd: string; total_shipping_price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - total_tax: string + amount: string; + currency_code: string; + }; + }; + total_tax: string; total_tax_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - total_tip_received: string - total_weight: number - updated_at: string - user_id: any + amount: string; + currency_code: string; + }; + }; + total_tip_received: string; + total_weight: number; + updated_at: string; + user_id: any; billing_address: { - first_name: string - address1: string - phone: string - city: string - zip: string - province: string - country: string - last_name: string - address2: string - company: any - latitude: number - longitude: number - name: string - country_code: string - province_code: string - } + first_name: string; + address1: string; + phone: string; + city: string; + zip: string; + province: string; + country: string; + last_name: string; + address2: string; + company: any; + latitude: number; + longitude: number; + name: string; + country_code: string; + province_code: string; + }; customer: { - id: number - email: string - accepts_marketing: boolean - created_at: string - updated_at: string - first_name: string - last_name: string - orders_count: number - state: string - total_spent: string - last_order_id: number - note: any - verified_email: boolean - multipass_identifier: any - tax_exempt: boolean - phone: string - tags: string - currency: string - last_order_name: string - accepts_marketing_updated_at: string - marketing_opt_in_level: any - tax_exemptions: Array - admin_graphql_api_id: string + id: number; + email: string; + accepts_marketing: boolean; + created_at: string; + updated_at: string; + first_name: string; + last_name: string; + orders_count: number; + state: string; + total_spent: string; + last_order_id: number; + note: any; + verified_email: boolean; + multipass_identifier: any; + tax_exempt: boolean; + phone: string; + tags: string; + currency: string; + last_order_name: string; + accepts_marketing_updated_at: string; + marketing_opt_in_level: any; + tax_exemptions: Array; + admin_graphql_api_id: string; default_address: { - id: number - customer_id: number - first_name: any - last_name: any - company: any - address1: string - address2: string - city: string - province: string - country: string - zip: string - phone: string - name: string - province_code: string - country_code: string - country_name: string - default: boolean - } - } + id: number; + customer_id: number; + first_name: any; + last_name: any; + company: any; + address1: string; + address2: string; + city: string; + province: string; + country: string; + zip: string; + phone: string; + name: string; + province_code: string; + country_code: string; + country_name: string; + default: boolean; + }; + }; discount_applications: Array<{ - target_type: string - type: string - value: string - value_type: string - allocation_method: string - target_selection: string - code: string - }> + target_type: string; + type: string; + value: string; + value_type: string; + allocation_method: string; + target_selection: string; + code: string; + }>; fulfillments: Array<{ - id: number - admin_graphql_api_id: string - created_at: string - location_id: number - name: string - order_id: number - origin_address: {} + id: number; + admin_graphql_api_id: string; + created_at: string; + location_id: number; + name: string; + order_id: number; + origin_address: {}; receipt: { - testcase: boolean - authorization: string - } - service: string - shipment_status: any - status: string - tracking_company: string - tracking_number: string - tracking_numbers: Array - tracking_url: string - tracking_urls: Array - updated_at: string + testcase: boolean; + authorization: string; + }; + service: string; + shipment_status: any; + status: string; + tracking_company: string; + tracking_number: string; + tracking_numbers: Array; + tracking_url: string; + tracking_urls: Array; + updated_at: string; line_items: Array<{ - id: number - admin_graphql_api_id: string - fulfillable_quantity: number - fulfillment_service: string - fulfillment_status: any - gift_card: boolean - grams: number - name: string - price: string + id: number; + admin_graphql_api_id: string; + fulfillable_quantity: number; + fulfillment_service: string; + fulfillment_status: any; + gift_card: boolean; + grams: number; + name: string; + price: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - product_exists: boolean - product_id: number + amount: string; + currency_code: string; + }; + }; + product_exists: boolean; + product_id: number; properties: Array<{ - name: string - value: string - }> - quantity: number - requires_shipping: boolean - sku: string - taxable: boolean - title: string - total_discount: string + name: string; + value: string; + }>; + quantity: number; + requires_shipping: boolean; + sku: string; + taxable: boolean; + title: string; + total_discount: string; total_discount_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - variant_id: number - variant_inventory_management: string - variant_title: string - vendor: any + amount: string; + currency_code: string; + }; + }; + variant_id: number; + variant_inventory_management: string; + variant_title: string; + vendor: any; tax_lines: Array<{ - price: string + price: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - rate: number - title: string - }> - duties: Array + amount: string; + currency_code: string; + }; + }; + rate: number; + title: string; + }>; + duties: Array; discount_allocations: Array<{ - amount: string + amount: string; amount_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - discount_application_index: number - }> - }> - }> + amount: string; + currency_code: string; + }; + }; + discount_application_index: number; + }>; + }>; + }>; line_items: Array<{ - id: number - admin_graphql_api_id: string - fulfillable_quantity: number - fulfillment_service: string - fulfillment_status: any - gift_card: boolean - grams: number - name: string - price: string + id: number; + admin_graphql_api_id: string; + fulfillable_quantity: number; + fulfillment_service: string; + fulfillment_status: any; + gift_card: boolean; + grams: number; + name: string; + price: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - product_exists: boolean - product_id: number + amount: string; + currency_code: string; + }; + }; + product_exists: boolean; + product_id: number; properties: Array<{ - name: string - value: string - }> - quantity: number - requires_shipping: boolean - sku: string - taxable: boolean - title: string - total_discount: string + name: string; + value: string; + }>; + quantity: number; + requires_shipping: boolean; + sku: string; + taxable: boolean; + title: string; + total_discount: string; total_discount_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - variant_id: number - variant_inventory_management: string - variant_title: string - vendor: any + amount: string; + currency_code: string; + }; + }; + variant_id: number; + variant_inventory_management: string; + variant_title: string; + vendor: any; tax_lines: Array<{ - price: string + price: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - rate: number - title: string - }> - duties: Array + amount: string; + currency_code: string; + }; + }; + rate: number; + title: string; + }>; + duties: Array; discount_allocations: Array<{ - amount: string + amount: string; amount_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - discount_application_index: number - }> - }> + amount: string; + currency_code: string; + }; + }; + discount_application_index: number; + }>; + }>; payment_details: { - credit_card_bin: any - avs_result_code: any - cvv_result_code: any - credit_card_number: string - credit_card_company: string - buyer_action_info: any - } - payment_terms: any + credit_card_bin: any; + avs_result_code: any; + cvv_result_code: any; + credit_card_number: string; + credit_card_company: string; + buyer_action_info: any; + }; + payment_terms: any; refunds: Array<{ - id: number - admin_graphql_api_id: string - created_at: string - note: string - order_id: number - processed_at: string - restock: boolean + id: number; + admin_graphql_api_id: string; + created_at: string; + note: string; + order_id: number; + processed_at: string; + restock: boolean; total_duties_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - user_id: number - order_adjustments: Array + amount: string; + currency_code: string; + }; + }; + user_id: number; + order_adjustments: Array; transactions: Array<{ - id: number - admin_graphql_api_id: string - amount: string - authorization: string - created_at: string - currency: string - device_id: any - error_code: any - gateway: string - kind: string - location_id: any - message: any - order_id: number - parent_id: number - processed_at: string - receipt: {} - source_name: string - status: string - test: boolean - user_id: any - }> + id: number; + admin_graphql_api_id: string; + amount: string; + authorization: string; + created_at: string; + currency: string; + device_id: any; + error_code: any; + gateway: string; + kind: string; + location_id: any; + message: any; + order_id: number; + parent_id: number; + processed_at: string; + receipt: {}; + source_name: string; + status: string; + test: boolean; + user_id: any; + }>; refund_line_items: Array<{ - id: number - line_item_id: number - location_id: number - quantity: number - restock_type: string - subtotal: number + id: number; + line_item_id: number; + location_id: number; + quantity: number; + restock_type: string; + subtotal: number; subtotal_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - total_tax: number + amount: string; + currency_code: string; + }; + }; + total_tax: number; total_tax_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } + amount: string; + currency_code: string; + }; + }; line_item: { - id: number - admin_graphql_api_id: string - fulfillable_quantity: number - fulfillment_service: string - fulfillment_status: any - gift_card: boolean - grams: number - name: string - price: string + id: number; + admin_graphql_api_id: string; + fulfillable_quantity: number; + fulfillment_service: string; + fulfillment_status: any; + gift_card: boolean; + grams: number; + name: string; + price: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - product_exists: boolean - product_id: number + amount: string; + currency_code: string; + }; + }; + product_exists: boolean; + product_id: number; properties: Array<{ - name: string - value: string - }> - quantity: number - requires_shipping: boolean - sku: string - taxable: boolean - title: string - total_discount: string + name: string; + value: string; + }>; + quantity: number; + requires_shipping: boolean; + sku: string; + taxable: boolean; + title: string; + total_discount: string; total_discount_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - variant_id: number - variant_inventory_management: string - variant_title: string - vendor: any + amount: string; + currency_code: string; + }; + }; + variant_id: number; + variant_inventory_management: string; + variant_title: string; + vendor: any; tax_lines: Array<{ - price: string + price: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - rate: number - title: string - }> - duties: Array + amount: string; + currency_code: string; + }; + }; + rate: number; + title: string; + }>; + duties: Array; discount_allocations: Array<{ - amount: string + amount: string; amount_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - discount_application_index: number - }> - } - }> - duties: Array - }> + amount: string; + currency_code: string; + }; + }; + discount_application_index: number; + }>; + }; + }>; + duties: Array; + }>; shipping_address: { - first_name: string - address1: string - phone: string - city: string - zip: string - province: string - country: string - last_name: string - address2: string - company: any - latitude: number - longitude: number - name: string - country_code: string - province_code: string - } + first_name: string; + address1: string; + phone: string; + city: string; + zip: string; + province: string; + country: string; + last_name: string; + address2: string; + company: any; + latitude: number; + longitude: number; + name: string; + country_code: string; + province_code: string; + }; shipping_lines: Array<{ - id: number - carrier_identifier: any - code: string - delivery_category: any - discounted_price: string + id: number; + carrier_identifier: any; + code: string; + delivery_category: any; + discounted_price: string; discounted_price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - phone: any - price: string + amount: string; + currency_code: string; + }; + }; + phone: any; + price: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - requested_fulfillment_service_id: any - source: string - title: string - tax_lines: Array - discount_allocations: Array - }> - }> + amount: string; + currency_code: string; + }; + }; + requested_fulfillment_service_id: any; + source: string; + title: string; + tax_lines: Array; + discount_allocations: Array; + }>; + }>; } export interface Order { order: { - id: number - name: string - total_price: string + id: number; + name: string; + total_price: string; line_items: Array<{ - id: number - admin_graphql_api_id: string - fulfillable_quantity: number - fulfillment_service: string - fulfillment_status: any - gift_card: boolean - grams: number - name: string - price: string + id: number; + admin_graphql_api_id: string; + fulfillable_quantity: number; + fulfillment_service: string; + fulfillment_status: any; + gift_card: boolean; + grams: number; + name: string; + price: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - product_exists: boolean - product_id: number + amount: string; + currency_code: string; + }; + }; + product_exists: boolean; + product_id: number; properties: Array<{ - name: string - value: string - }> - quantity: number - requires_shipping: boolean - sku: string - taxable: boolean - title: string - total_discount: string + name: string; + value: string; + }>; + quantity: number; + requires_shipping: boolean; + sku: string; + taxable: boolean; + title: string; + total_discount: string; total_discount_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - variant_id: number - variant_inventory_management: string - variant_title: string - vendor: any + amount: string; + currency_code: string; + }; + }; + variant_id: number; + variant_inventory_management: string; + variant_title: string; + vendor: any; tax_lines: Array<{ - channel_liable: any - price: string + channel_liable: any; + price: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - rate: number - title: string - }> - duties: Array + amount: string; + currency_code: string; + }; + }; + rate: number; + title: string; + }>; + duties: Array; discount_allocations: Array<{ - amount: string + amount: string; amount_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - discount_application_index: number - }> - }> - } + amount: string; + currency_code: string; + }; + }; + discount_application_index: number; + }>; + }>; + }; } export interface OrdersByCustomer { orders: Array<{ - id: number - admin_graphql_api_id: string - app_id: any - browser_ip: string - buyer_accepts_marketing: boolean - cancel_reason: any - cancelled_at: any - cart_token: string - checkout_id: number - checkout_token: string + id: number; + admin_graphql_api_id: string; + app_id: any; + browser_ip: string; + buyer_accepts_marketing: boolean; + cancel_reason: any; + cancelled_at: any; + cart_token: string; + checkout_id: number; + checkout_token: string; client_details: { - accept_language: any - browser_height: any - browser_ip: string - browser_width: any - session_hash: any - user_agent: any - } - closed_at: any - confirmation_number: any - confirmed: boolean - contact_email: string - created_at: string - currency: string - current_subtotal_price: string + accept_language: any; + browser_height: any; + browser_ip: string; + browser_width: any; + session_hash: any; + user_agent: any; + }; + closed_at: any; + confirmation_number: any; + confirmed: boolean; + contact_email: string; + created_at: string; + currency: string; + current_subtotal_price: string; current_subtotal_price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - current_total_additional_fees_set: any - current_total_discounts: string + amount: string; + currency_code: string; + }; + }; + current_total_additional_fees_set: any; + current_total_discounts: string; current_total_discounts_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - current_total_duties_set: any - current_total_price: string + amount: string; + currency_code: string; + }; + }; + current_total_duties_set: any; + current_total_price: string; current_total_price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - current_total_tax: string + amount: string; + currency_code: string; + }; + }; + current_total_tax: string; current_total_tax_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - customer_locale: any - device_id: any + amount: string; + currency_code: string; + }; + }; + customer_locale: any; + device_id: any; discount_codes: Array<{ - code: string - amount: string - type: string - }> - email: string - estimated_taxes: boolean - financial_status: string - fulfillment_status: any - landing_site: string - landing_site_ref: string - location_id: any - merchant_of_record_app_id: any - name: string - note: any + code: string; + amount: string; + type: string; + }>; + email: string; + estimated_taxes: boolean; + financial_status: string; + fulfillment_status: any; + landing_site: string; + landing_site_ref: string; + location_id: any; + merchant_of_record_app_id: any; + name: string; + note: any; note_attributes: Array<{ - name: string - value: string - }> - number: number - order_number: number - order_status_url: string - original_total_additional_fees_set: any - original_total_duties_set: any - payment_gateway_names: Array - phone: string - po_number: string - presentment_currency: string - processed_at: string - reference: string - referring_site: string - source_identifier: string - source_name: string - source_url: any - subtotal_price: string + name: string; + value: string; + }>; + number: number; + order_number: number; + order_status_url: string; + original_total_additional_fees_set: any; + original_total_duties_set: any; + payment_gateway_names: Array; + phone: string; + po_number: string; + presentment_currency: string; + processed_at: string; + reference: string; + referring_site: string; + source_identifier: string; + source_name: string; + source_url: any; + subtotal_price: string; subtotal_price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - tags: string - tax_exempt: boolean + amount: string; + currency_code: string; + }; + }; + tags: string; + tax_exempt: boolean; tax_lines: Array<{ - price: string - rate: number - title: string + price: string; + rate: number; + title: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - channel_liable: any - }> - taxes_included: boolean - test: boolean - token: string - total_discounts: string + amount: string; + currency_code: string; + }; + }; + channel_liable: any; + }>; + taxes_included: boolean; + test: boolean; + token: string; + total_discounts: string; total_discounts_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - total_line_items_price: string + amount: string; + currency_code: string; + }; + }; + total_line_items_price: string; total_line_items_price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - total_outstanding: string - total_price: string + amount: string; + currency_code: string; + }; + }; + total_outstanding: string; + total_price: string; total_price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } + amount: string; + currency_code: string; + }; + }; total_shipping_price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - total_tax: string + amount: string; + currency_code: string; + }; + }; + total_tax: string; total_tax_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - total_tip_received: string - total_weight: number - updated_at: string - user_id: any + amount: string; + currency_code: string; + }; + }; + total_tip_received: string; + total_weight: number; + updated_at: string; + user_id: any; billing_address: { - first_name: string - address1: string - phone: string - city: string - zip: string - province: string - country: string - last_name: string - address2: string - company: any - latitude: number - longitude: number - name: string - country_code: string - province_code: string - } + first_name: string; + address1: string; + phone: string; + city: string; + zip: string; + province: string; + country: string; + last_name: string; + address2: string; + company: any; + latitude: number; + longitude: number; + name: string; + country_code: string; + province_code: string; + }; customer: { - id: number - email: string - accepts_marketing: boolean - created_at: string - updated_at: string - first_name: string - last_name: string - state: string - note: any - verified_email: boolean - multipass_identifier: any - tax_exempt: boolean - phone: string + id: number; + email: string; + accepts_marketing: boolean; + created_at: string; + updated_at: string; + first_name: string; + last_name: string; + state: string; + note: any; + verified_email: boolean; + multipass_identifier: any; + tax_exempt: boolean; + phone: string; email_marketing_consent: { - state: string - opt_in_level: any - consent_updated_at: string - } + state: string; + opt_in_level: any; + consent_updated_at: string; + }; sms_marketing_consent: { - state: string - opt_in_level: string - consent_updated_at: string - consent_collected_from: string - } - tags: string - currency: string - accepts_marketing_updated_at: string - marketing_opt_in_level: any - tax_exemptions: Array - admin_graphql_api_id: string + state: string; + opt_in_level: string; + consent_updated_at: string; + consent_collected_from: string; + }; + tags: string; + currency: string; + accepts_marketing_updated_at: string; + marketing_opt_in_level: any; + tax_exemptions: Array; + admin_graphql_api_id: string; default_address: { - id: number - customer_id: number - first_name: any - last_name: any - company: any - address1: string - address2: string - city: string - province: string - country: string - zip: string - phone: string - name: string - province_code: string - country_code: string - country_name: string - default: boolean - } - } + id: number; + customer_id: number; + first_name: any; + last_name: any; + company: any; + address1: string; + address2: string; + city: string; + province: string; + country: string; + zip: string; + phone: string; + name: string; + province_code: string; + country_code: string; + country_name: string; + default: boolean; + }; + }; discount_applications: Array<{ - target_type: string - type: string - value: string - value_type: string - allocation_method: string - target_selection: string - code: string - }> + target_type: string; + type: string; + value: string; + value_type: string; + allocation_method: string; + target_selection: string; + code: string; + }>; fulfillments: Array<{ - id: number - admin_graphql_api_id: string - created_at: string - location_id: number - name: string - order_id: number - origin_address: {} + id: number; + admin_graphql_api_id: string; + created_at: string; + location_id: number; + name: string; + order_id: number; + origin_address: {}; receipt: { - testcase: boolean - authorization: string - } - service: string - shipment_status: any - status: string - tracking_company: string - tracking_number: string - tracking_numbers: Array - tracking_url: string - tracking_urls: Array - updated_at: string + testcase: boolean; + authorization: string; + }; + service: string; + shipment_status: any; + status: string; + tracking_company: string; + tracking_number: string; + tracking_numbers: Array; + tracking_url: string; + tracking_urls: Array; + updated_at: string; line_items: Array<{ - id: number - admin_graphql_api_id: string - fulfillable_quantity: number - fulfillment_service: string - fulfillment_status: any - gift_card: boolean - grams: number - name: string - price: string + id: number; + admin_graphql_api_id: string; + fulfillable_quantity: number; + fulfillment_service: string; + fulfillment_status: any; + gift_card: boolean; + grams: number; + name: string; + price: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - product_exists: boolean - product_id: number + amount: string; + currency_code: string; + }; + }; + product_exists: boolean; + product_id: number; properties: Array<{ - name: string - value: string - }> - quantity: number - requires_shipping: boolean - sku: string - taxable: boolean - title: string - total_discount: string + name: string; + value: string; + }>; + quantity: number; + requires_shipping: boolean; + sku: string; + taxable: boolean; + title: string; + total_discount: string; total_discount_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - variant_id: number - variant_inventory_management: string - variant_title: string - vendor: any + amount: string; + currency_code: string; + }; + }; + variant_id: number; + variant_inventory_management: string; + variant_title: string; + vendor: any; tax_lines: Array<{ - channel_liable: any - price: string + channel_liable: any; + price: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - rate: number - title: string - }> - duties: Array + amount: string; + currency_code: string; + }; + }; + rate: number; + title: string; + }>; + duties: Array; discount_allocations: Array<{ - amount: string + amount: string; amount_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - discount_application_index: number - }> - }> - }> + amount: string; + currency_code: string; + }; + }; + discount_application_index: number; + }>; + }>; + }>; line_items: Array<{ - id: number - admin_graphql_api_id: string - fulfillable_quantity: number - fulfillment_service: string - fulfillment_status: any - gift_card: boolean - grams: number - name: string - price: string + id: number; + admin_graphql_api_id: string; + fulfillable_quantity: number; + fulfillment_service: string; + fulfillment_status: any; + gift_card: boolean; + grams: number; + name: string; + price: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - product_exists: boolean - product_id: number + amount: string; + currency_code: string; + }; + }; + product_exists: boolean; + product_id: number; properties: Array<{ - name: string - value: string - }> - quantity: number - requires_shipping: boolean - sku: string - taxable: boolean - title: string - total_discount: string + name: string; + value: string; + }>; + quantity: number; + requires_shipping: boolean; + sku: string; + taxable: boolean; + title: string; + total_discount: string; total_discount_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - variant_id: number - variant_inventory_management: string - variant_title: string - vendor: any + amount: string; + currency_code: string; + }; + }; + variant_id: number; + variant_inventory_management: string; + variant_title: string; + vendor: any; tax_lines: Array<{ - channel_liable: any - price: string + channel_liable: any; + price: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - rate: number - title: string - }> - duties: Array + amount: string; + currency_code: string; + }; + }; + rate: number; + title: string; + }>; + duties: Array; discount_allocations: Array<{ - amount: string + amount: string; amount_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - discount_application_index: number - }> - }> - payment_terms: any + amount: string; + currency_code: string; + }; + }; + discount_application_index: number; + }>; + }>; + payment_terms: any; refunds: Array<{ - id: number - admin_graphql_api_id: string - created_at: string - note: string - order_id: number - processed_at: string - restock: boolean + id: number; + admin_graphql_api_id: string; + created_at: string; + note: string; + order_id: number; + processed_at: string; + restock: boolean; total_additional_fees_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } + amount: string; + currency_code: string; + }; + }; total_duties_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - user_id: number - order_adjustments: Array + amount: string; + currency_code: string; + }; + }; + user_id: number; + order_adjustments: Array; transactions: Array<{ - id: number - admin_graphql_api_id: string - amount: string - authorization: string - created_at: string - currency: string - device_id: any - error_code: any - gateway: string - kind: string - location_id: any - message: any - order_id: number - parent_id: number - payment_id: string - processed_at: string - receipt: {} - source_name: string - status: string - test: boolean - user_id: any - }> + id: number; + admin_graphql_api_id: string; + amount: string; + authorization: string; + created_at: string; + currency: string; + device_id: any; + error_code: any; + gateway: string; + kind: string; + location_id: any; + message: any; + order_id: number; + parent_id: number; + payment_id: string; + processed_at: string; + receipt: {}; + source_name: string; + status: string; + test: boolean; + user_id: any; + }>; refund_line_items: Array<{ - id: number - line_item_id: number - location_id: number - quantity: number - restock_type: string - subtotal: number + id: number; + line_item_id: number; + location_id: number; + quantity: number; + restock_type: string; + subtotal: number; subtotal_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - total_tax: number + amount: string; + currency_code: string; + }; + }; + total_tax: number; total_tax_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } + amount: string; + currency_code: string; + }; + }; line_item: { - id: number - admin_graphql_api_id: string - fulfillable_quantity: number - fulfillment_service: string - fulfillment_status: any - gift_card: boolean - grams: number - name: string - price: string + id: number; + admin_graphql_api_id: string; + fulfillable_quantity: number; + fulfillment_service: string; + fulfillment_status: any; + gift_card: boolean; + grams: number; + name: string; + price: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - product_exists: boolean - product_id: number + amount: string; + currency_code: string; + }; + }; + product_exists: boolean; + product_id: number; properties: Array<{ - name: string - value: string - }> - quantity: number - requires_shipping: boolean - sku: string - taxable: boolean - title: string - total_discount: string + name: string; + value: string; + }>; + quantity: number; + requires_shipping: boolean; + sku: string; + taxable: boolean; + title: string; + total_discount: string; total_discount_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - variant_id: number - variant_inventory_management: string - variant_title: string - vendor: any + amount: string; + currency_code: string; + }; + }; + variant_id: number; + variant_inventory_management: string; + variant_title: string; + vendor: any; tax_lines: Array<{ - channel_liable: any - price: string + channel_liable: any; + price: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - rate: number - title: string - }> - duties: Array + amount: string; + currency_code: string; + }; + }; + rate: number; + title: string; + }>; + duties: Array; discount_allocations: Array<{ - amount: string + amount: string; amount_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - discount_application_index: number - }> - } - }> - duties: Array - additional_fees: Array - }> + amount: string; + currency_code: string; + }; + }; + discount_application_index: number; + }>; + }; + }>; + duties: Array; + additional_fees: Array; + }>; shipping_address: { - first_name: string - address1: string - phone: string - city: string - zip: string - province: string - country: string - last_name: string - address2: string - company: any - latitude: number - longitude: number - name: string - country_code: string - province_code: string - } + first_name: string; + address1: string; + phone: string; + city: string; + zip: string; + province: string; + country: string; + last_name: string; + address2: string; + company: any; + latitude: number; + longitude: number; + name: string; + country_code: string; + province_code: string; + }; shipping_lines: Array<{ - id: number - carrier_identifier: any - code: string - discounted_price: string + id: number; + carrier_identifier: any; + code: string; + discounted_price: string; discounted_price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - phone: any - price: string + amount: string; + currency_code: string; + }; + }; + phone: any; + price: string; price_set: { shop_money: { - amount: string - currency_code: string - } + amount: string; + currency_code: string; + }; presentment_money: { - amount: string - currency_code: string - } - } - requested_fulfillment_service_id: any - source: string - title: string - tax_lines: Array - discount_allocations: Array - }> - }> + amount: string; + currency_code: string; + }; + }; + requested_fulfillment_service_id: any; + source: string; + title: string; + tax_lines: Array; + discount_allocations: Array; + }>; + }>; } export type OrderStatus = "open" | "close" | "cancelled" | "any"; @@ -1520,21 +1520,21 @@ export type OrderStatus = "open" | "close" | "cancelled" | "any"; export interface QueryOrders extends QueryCustomers { attribution_app_id?: string; financial_status?: - | "authorized" - | "pending" - | "paid" - | "partially_paid" - | "refunded" - | "voided" - | "partially_refunded" - | "any" - | "unpaid"; + | "authorized" + | "pending" + | "paid" + | "partially_paid" + | "refunded" + | "voided" + | "partially_refunded" + | "any" + | "unpaid"; fulfillment_status?: - | "shipped" - | "partial" - | "unshipped" - | "any" - | "unfulfilled"; + | "shipped" + | "partial" + | "unshipped" + | "any" + | "unfulfilled"; status?: OrderStatus; processed_at_max?: string; processed_at_min?: string; @@ -1625,11 +1625,11 @@ interface ProductDetail { } export interface Products { - products: ProductDetail[] + products: ProductDetail[]; } export interface Product { - product: ProductDetail + product: ProductDetail; } export interface QueryProducts extends QueryCustomers { @@ -1647,24 +1647,24 @@ export interface QueryProducts extends QueryCustomers { export interface Payouts { payouts: Array<{ - id: number - status: string - date: string - currency: string - amount: string + id: number; + status: string; + date: string; + currency: string; + amount: string; summary: { - adjustments_fee_amount: string - adjustments_gross_amount: string - charges_fee_amount: string - charges_gross_amount: string - refunds_fee_amount: string - refunds_gross_amount: string - reserved_funds_fee_amount: string - reserved_funds_gross_amount: string - retried_payouts_fee_amount: string - retried_payouts_gross_amount: string - } - }> + adjustments_fee_amount: string; + adjustments_gross_amount: string; + charges_fee_amount: string; + charges_gross_amount: string; + refunds_fee_amount: string; + refunds_gross_amount: string; + reserved_funds_fee_amount: string; + reserved_funds_gross_amount: string; + retried_payouts_fee_amount: string; + retried_payouts_gross_amount: string; + }; + }>; } export interface QueryPayouts { @@ -1675,5 +1675,3 @@ export interface QueryPayouts { since_id?: string; status?: "scheduled" | "in_transit" | "paid" | "failed" | "canceled"; } - - diff --git a/lib/apis/stripe/mod.ts b/lib/apis/stripe/mod.ts index 62d2d89b5..6367aa67e 100644 --- a/lib/apis/stripe/mod.ts +++ b/lib/apis/stripe/mod.ts @@ -12,8 +12,8 @@ export type { QuerySubscriptionItems, QuerySubscriptions, QueryTransactions, - Subscriptions, SubscriptionItems, + Subscriptions, Transactions, } from "./types.ts"; diff --git a/lib/apis/stripe/types.ts b/lib/apis/stripe/types.ts index 029283a7b..0aa1d8427 100644 --- a/lib/apis/stripe/types.ts +++ b/lib/apis/stripe/types.ts @@ -5,154 +5,152 @@ interface StripePagination { } export interface SubscriptionItems { - object: string - url: string - has_more: boolean + object: string; + url: string; + has_more: boolean; data: Array<{ - id: string - object: string - billing_thresholds: any - created: number - metadata: {} + id: string; + object: string; + billing_thresholds: any; + created: number; + metadata: {}; price: { - id: string - object: string - active: boolean - billing_scheme: string - created: number - currency: string - custom_unit_amount: any - livemode: boolean - lookup_key: any - metadata: {} - nickname: any - product: string + id: string; + object: string; + active: boolean; + billing_scheme: string; + created: number; + currency: string; + custom_unit_amount: any; + livemode: boolean; + lookup_key: any; + metadata: {}; + nickname: any; + product: string; recurring: { - aggregate_usage: any - interval: string - interval_count: number - usage_type: string - } - tax_behavior: string - tiers_mode: any - transform_quantity: any - type: string - unit_amount: number - unit_amount_decimal: string - } - quantity: number - subscription: string - tax_rates: Array - }> + aggregate_usage: any; + interval: string; + interval_count: number; + usage_type: string; + }; + tax_behavior: string; + tiers_mode: any; + transform_quantity: any; + type: string; + unit_amount: number; + unit_amount_decimal: string; + }; + quantity: number; + subscription: string; + tax_rates: Array; + }>; } - -export interface Subscriptions { - object: string - url: string - has_more: boolean +export interface Subscriptions { + object: string; + url: string; + has_more: boolean; data: Array<{ - id: string - object: string - application: any - application_fee_percent: any + id: string; + object: string; + application: any; + application_fee_percent: any; automatic_tax: { - enabled: boolean - } - billing_cycle_anchor: number - billing_thresholds: any - cancel_at: any - cancel_at_period_end: boolean - canceled_at: any + enabled: boolean; + }; + billing_cycle_anchor: number; + billing_thresholds: any; + cancel_at: any; + cancel_at_period_end: boolean; + canceled_at: any; cancellation_details: { - comment: any - feedback: any - reason: any - } - collection_method: string - created: number - currency: string - current_period_end: number - current_period_start: number - customer: string - days_until_due: any - default_payment_method: string - default_source: any - default_tax_rates: Array - description: any - discount: any - ended_at: any + comment: any; + feedback: any; + reason: any; + }; + collection_method: string; + created: number; + currency: string; + current_period_end: number; + current_period_start: number; + customer: string; + days_until_due: any; + default_payment_method: string; + default_source: any; + default_tax_rates: Array; + description: any; + discount: any; + ended_at: any; items: { - object: string + object: string; data: Array<{ - id: string - object: string - billing_thresholds: any - created: number - metadata: {} + id: string; + object: string; + billing_thresholds: any; + created: number; + metadata: {}; price: { - id: string - object: string - active: boolean - billing_scheme: string - created: number - currency: string - custom_unit_amount: any - livemode: boolean - lookup_key: any - metadata: {} - nickname: any - product: string + id: string; + object: string; + active: boolean; + billing_scheme: string; + created: number; + currency: string; + custom_unit_amount: any; + livemode: boolean; + lookup_key: any; + metadata: {}; + nickname: any; + product: string; recurring: { - aggregate_usage: any - interval: string - interval_count: number - usage_type: string - } - tax_behavior: string - tiers_mode: any - transform_quantity: any - type: string - unit_amount: number - unit_amount_decimal: string - } - quantity: number - subscription: string - tax_rates: Array - }> - has_more: boolean - url: string - } - latest_invoice: string - livemode: boolean - metadata: {} - next_pending_invoice_item_invoice: any - on_behalf_of: any - pause_collection: any + aggregate_usage: any; + interval: string; + interval_count: number; + usage_type: string; + }; + tax_behavior: string; + tiers_mode: any; + transform_quantity: any; + type: string; + unit_amount: number; + unit_amount_decimal: string; + }; + quantity: number; + subscription: string; + tax_rates: Array; + }>; + has_more: boolean; + url: string; + }; + latest_invoice: string; + livemode: boolean; + metadata: {}; + next_pending_invoice_item_invoice: any; + on_behalf_of: any; + pause_collection: any; payment_settings: { - payment_method_options: any - payment_method_types: any - save_default_payment_method: string - } - pending_invoice_item_interval: any - pending_setup_intent: any - pending_update: any - schedule: any - start_date: number - status: string - test_clock: any - transfer_data: any - trial_end: any + payment_method_options: any; + payment_method_types: any; + save_default_payment_method: string; + }; + pending_invoice_item_interval: any; + pending_setup_intent: any; + pending_update: any; + schedule: any; + start_date: number; + status: string; + test_clock: any; + transfer_data: any; + trial_end: any; trial_settings: { end_behavior: { - missing_payment_method: string - } - } - trial_start: any - }> + missing_payment_method: string; + }; + }; + trial_start: any; + }>; } - export interface QuerySubscriptions extends StripePagination { customer?: string; price?: string; @@ -182,42 +180,41 @@ export interface QuerySubscriptionItems extends StripePagination { } export interface Customers { - url: string - has_more: boolean + url: string; + has_more: boolean; data: Array<{ - id: string - object: string - address: any - balance: number - created: number - currency: string - default_source: string - delinquent: boolean - description: string - discount: any - email: any - invoice_prefix: string - invoice_settings: { - custom_fields: any - default_payment_method: any - footer: any - rendering_options: any - } - livemode: boolean - metadata: { - order_id: string - } - name: any - next_invoice_sequence: number - phone: any - preferred_locales: Array - shipping: any - tax_exempt: string - test_clock: any -}> + id: string; + object: string; + address: any; + balance: number; + created: number; + currency: string; + default_source: string; + delinquent: boolean; + description: string; + discount: any; + email: any; + invoice_prefix: string; + invoice_settings: { + custom_fields: any; + default_payment_method: any; + footer: any; + rendering_options: any; + }; + livemode: boolean; + metadata: { + order_id: string; + }; + name: any; + next_invoice_sequence: number; + phone: any; + preferred_locales: Array; + shipping: any; + tax_exempt: string; + test_clock: any; + }>; } - export interface QueryCustomers extends StripePagination { email?: string; created?: string; @@ -225,158 +222,157 @@ export interface QueryCustomers extends StripePagination { } export interface Invoices { - object: string - url: string - has_more: boolean + object: string; + url: string; + has_more: boolean; data: Array<{ - id: string - object: string - account_country: string - account_name: string - account_tax_ids: any - amount_due: number - amount_paid: number - amount_remaining: number - amount_shipping: number - application: any - application_fee_amount: any - attempt_count: number - attempted: boolean - auto_advance: boolean + id: string; + object: string; + account_country: string; + account_name: string; + account_tax_ids: any; + amount_due: number; + amount_paid: number; + amount_remaining: number; + amount_shipping: number; + application: any; + application_fee_amount: any; + attempt_count: number; + attempted: boolean; + auto_advance: boolean; automatic_tax: { - enabled: boolean - status: any - } - billing_reason: string - charge: any - collection_method: string - created: number - currency: string - custom_fields: any - customer: string - customer_address: any - customer_email: any - customer_name: any - customer_phone: any - customer_shipping: any - customer_tax_exempt: string - customer_tax_ids: Array - default_payment_method: any - default_source: any - default_tax_rates: Array - description: any - discount: any - discounts: Array - due_date: any - effective_at: any - ending_balance: any - footer: any - from_invoice: any - hosted_invoice_url: any - invoice_pdf: any - last_finalization_error: any - latest_revision: any + enabled: boolean; + status: any; + }; + billing_reason: string; + charge: any; + collection_method: string; + created: number; + currency: string; + custom_fields: any; + customer: string; + customer_address: any; + customer_email: any; + customer_name: any; + customer_phone: any; + customer_shipping: any; + customer_tax_exempt: string; + customer_tax_ids: Array; + default_payment_method: any; + default_source: any; + default_tax_rates: Array; + description: any; + discount: any; + discounts: Array; + due_date: any; + effective_at: any; + ending_balance: any; + footer: any; + from_invoice: any; + hosted_invoice_url: any; + invoice_pdf: any; + last_finalization_error: any; + latest_revision: any; lines: { - object: string + object: string; data: Array<{ - id: string - object: string - amount: number - amount_excluding_tax: number - currency: string - description: string - discount_amounts: Array - discountable: boolean - discounts: Array - invoice_item: string - livemode: boolean - metadata: {} + id: string; + object: string; + amount: number; + amount_excluding_tax: number; + currency: string; + description: string; + discount_amounts: Array; + discountable: boolean; + discounts: Array; + invoice_item: string; + livemode: boolean; + metadata: {}; period: { - end: number - start: number - } + end: number; + start: number; + }; price: { - id: string - object: string - active: boolean - billing_scheme: string - created: number - currency: string - custom_unit_amount: any - livemode: boolean - lookup_key: any - metadata: {} - nickname: any - product: string - recurring: any - tax_behavior: string - tiers_mode: any - transform_quantity: any - type: string - unit_amount: number - unit_amount_decimal: string - } - proration: boolean + id: string; + object: string; + active: boolean; + billing_scheme: string; + created: number; + currency: string; + custom_unit_amount: any; + livemode: boolean; + lookup_key: any; + metadata: {}; + nickname: any; + product: string; + recurring: any; + tax_behavior: string; + tiers_mode: any; + transform_quantity: any; + type: string; + unit_amount: number; + unit_amount_decimal: string; + }; + proration: boolean; proration_details: { - credited_items: any - } - quantity: number - subscription: any - tax_amounts: Array - tax_rates: Array - type: string - unit_amount_excluding_tax: string - }> - has_more: boolean - url: string - } - livemode: boolean - metadata: {} - next_payment_attempt: any - number: any - on_behalf_of: any - paid: boolean - paid_out_of_band: boolean - payment_intent: any + credited_items: any; + }; + quantity: number; + subscription: any; + tax_amounts: Array; + tax_rates: Array; + type: string; + unit_amount_excluding_tax: string; + }>; + has_more: boolean; + url: string; + }; + livemode: boolean; + metadata: {}; + next_payment_attempt: any; + number: any; + on_behalf_of: any; + paid: boolean; + paid_out_of_band: boolean; + payment_intent: any; payment_settings: { - default_mandate: any - payment_method_options: any - payment_method_types: any - } - period_end: number - period_start: number - post_payment_credit_notes_amount: number - pre_payment_credit_notes_amount: number - quote: any - receipt_number: any - redaction: any - rendering_options: any - shipping_cost: any - shipping_details: any - starting_balance: number - statement_descriptor: any - status: string + default_mandate: any; + payment_method_options: any; + payment_method_types: any; + }; + period_end: number; + period_start: number; + post_payment_credit_notes_amount: number; + pre_payment_credit_notes_amount: number; + quote: any; + receipt_number: any; + redaction: any; + rendering_options: any; + shipping_cost: any; + shipping_details: any; + starting_balance: number; + statement_descriptor: any; + status: string; status_transitions: { - finalized_at: any - marked_uncollectible_at: any - paid_at: any - voided_at: any - } - subscription: any - subtotal: number - subtotal_excluding_tax: number - tax: any - test_clock: any - total: number - total_discount_amounts: Array - total_excluding_tax: number - total_tax_amounts: Array - transfer_data: any - webhooks_delivered_at: any - }> + finalized_at: any; + marked_uncollectible_at: any; + paid_at: any; + voided_at: any; + }; + subscription: any; + subtotal: number; + subtotal_excluding_tax: number; + tax: any; + test_clock: any; + total: number; + total_discount_amounts: Array; + total_excluding_tax: number; + total_tax_amounts: Array; + transfer_data: any; + webhooks_delivered_at: any; + }>; } - export interface QueryInvoices extends StripePagination { customer?: string; status?: "draft" | "open" | "void" | "paid" | "uncollectible"; @@ -387,105 +383,105 @@ export interface QueryInvoices extends StripePagination { } export interface Charges { - object: string - url: string - has_more: boolean + object: string; + url: string; + has_more: boolean; data: Array<{ - id: string - object: string - amount: number - amount_captured: number - amount_refunded: number - application: any - application_fee: any - application_fee_amount: any - balance_transaction: string + id: string; + object: string; + amount: number; + amount_captured: number; + amount_refunded: number; + application: any; + application_fee: any; + application_fee_amount: any; + balance_transaction: string; billing_details: { address: { - city: any - country: any - line1: any - line2: any - postal_code: any - state: any - } - email: any - name: any - phone: any - } - calculated_statement_descriptor: any - captured: boolean - created: number - currency: string - customer: any - description: any - disputed: boolean - failure_balance_transaction: any - failure_code: string - failure_message: string - fraud_details: {} - invoice: any - livemode: boolean + city: any; + country: any; + line1: any; + line2: any; + postal_code: any; + state: any; + }; + email: any; + name: any; + phone: any; + }; + calculated_statement_descriptor: any; + captured: boolean; + created: number; + currency: string; + customer: any; + description: any; + disputed: boolean; + failure_balance_transaction: any; + failure_code: string; + failure_message: string; + fraud_details: {}; + invoice: any; + livemode: boolean; metadata: { - order_id: string - } - on_behalf_of: any + order_id: string; + }; + on_behalf_of: any; outcome: { - network_status: any - reason: string - risk_level: string - seller_message: string - type: string - } - paid: boolean - payment_intent: any - payment_method: string + network_status: any; + reason: string; + risk_level: string; + seller_message: string; + type: string; + }; + paid: boolean; + payment_intent: any; + payment_method: string; payment_method_details: { card: { - brand: string + brand: string; checks: { - address_line1_check: any - address_postal_code_check: any - cvc_check: string - } - country: string - exp_month: number - exp_year: number - fingerprint: string - funding: string - installments: any - last4: string - mandate: any - moto: any - network: string + address_line1_check: any; + address_postal_code_check: any; + cvc_check: string; + }; + country: string; + exp_month: number; + exp_year: number; + fingerprint: string; + funding: string; + installments: any; + last4: string; + mandate: any; + moto: any; + network: string; network_token: { - used: boolean - } - three_d_secure: any - wallet: any - } - type: string - } - receipt_email: string - receipt_number: any - receipt_url: any - redaction: any - refunded: boolean + used: boolean; + }; + three_d_secure: any; + wallet: any; + }; + type: string; + }; + receipt_email: string; + receipt_number: any; + receipt_url: any; + redaction: any; + refunded: boolean; refunds: { - object: string - data: Array - has_more: boolean - url: string - } - review: any - shipping: any - source_transfer: any - statement_descriptor: any - statement_descriptor_suffix: any - status: string - transfer_data: any - transfer_group: any - }> + object: string; + data: Array; + has_more: boolean; + url: string; + }; + review: any; + shipping: any; + source_transfer: any; + statement_descriptor: any; + statement_descriptor_suffix: any; + status: string; + transfer_data: any; + transfer_group: any; + }>; } export interface QueryCharges extends StripePagination { @@ -496,30 +492,30 @@ export interface QueryCharges extends StripePagination { } export interface Plans { - object: string - url: string - has_more: boolean + object: string; + url: string; + has_more: boolean; data: Array<{ - id: string - object: string - active: boolean - aggregate_usage: any - amount: number - amount_decimal: string - billing_scheme: string - created: number - currency: string - interval: string - interval_count: number - livemode: boolean - metadata: {} - nickname: any - product: string - tiers_mode: any - transform_usage: any - trial_period_days: any - usage_type: string - }> + id: string; + object: string; + active: boolean; + aggregate_usage: any; + amount: number; + amount_decimal: string; + billing_scheme: string; + created: number; + currency: string; + interval: string; + interval_count: number; + livemode: boolean; + metadata: {}; + nickname: any; + product: string; + tiers_mode: any; + transform_usage: any; + trial_period_days: any; + usage_type: string; + }>; } export interface QueryPlans extends StripePagination { @@ -563,32 +559,32 @@ type TransactionType = | "transfer_refund"; export interface Transactions { - object: string - url: string - has_more: boolean + object: string; + url: string; + has_more: boolean; data: Array<{ - id: string - object: string - amount: number - available_on: number - created: number - currency: string - description: string - exchange_rate: any - fee: number + id: string; + object: string; + amount: number; + available_on: number; + created: number; + currency: string; + description: string; + exchange_rate: any; + fee: number; fee_details: Array<{ - amount: number - application: any - currency: string - description: string - type: TransactionType - }> - net: number - reporting_category: string - source: string - status: string - type: TransactionType - }> + amount: number; + application: any; + currency: string; + description: string; + type: TransactionType; + }>; + net: number; + reporting_category: string; + source: string; + status: string; + type: TransactionType; + }>; } export interface QueryTransactions extends StripePagination { diff --git a/lib/ui/example/deno.json b/lib/ui/example/deno.json index e8a3ce566..915c3c432 100644 --- a/lib/ui/example/deno.json +++ b/lib/ui/example/deno.json @@ -63,4 +63,4 @@ "react-datepicker": "https://esm.sh/react-datepicker@4.16.0?external=react,react-dom&target=es2022", "lucide-react": "https://esm.sh/lucide-react@0.263.1?external=react,react-dom&target=es2022" } -} \ No newline at end of file +} diff --git a/lib/ui/example2/deno.json b/lib/ui/example2/deno.json index b1921ca5a..e00ea1770 100644 --- a/lib/ui/example2/deno.json +++ b/lib/ui/example2/deno.json @@ -73,4 +73,4 @@ "react-datepicker": "https://esm.sh/react-datepicker@4.16.0?external=react,react-dom&target=es2022", "zod": "https://esm.sh/zod@3.21.4" } -} \ No newline at end of file +} diff --git a/lib/ui/unocss.ts b/lib/ui/unocss.ts index 5d829fde1..8d7add243 100644 --- a/lib/ui/unocss.ts +++ b/lib/ui/unocss.ts @@ -14,7 +14,7 @@ import { presetTypography, presetUno, } from "https://esm.sh/unocss@0.53.4?bundle"; -import { presetShadcn } from "./unocss.shadcn.ts"; +// import { presetShadcn } from "./unocss.shadcn.ts"; // @unocss-include @@ -42,7 +42,7 @@ export function presetNetzo(user: UserConfig = {}): Preset { "vertical-align": "middle", }, }), - presetShadcn(), + // presetShadcn(), ...(user.presets ?? []), ] as UserConfig["presets"], @@ -62,6 +62,54 @@ export function presetNetzo(user: UserConfig = {}): Preset { return fetch(url.href).then((res) => res.text()); }, }, + { + // generated at https://ui.shadcn.com/themes + getCSS: () => ` + :root { + --background: 0 0% 100%; + --foreground: 240 10% 3.9%; + --card: 0 0% 100%; + --card-foreground: 240 10% 3.9%; + --popover: 0 0% 100%;; + --popover-foreground: 240 10% 3.9%; + --primary: 240 5.9% 10%; + --primary-foreground: 0 0% 98%; + --secondary: 240 4.8% 95.9%; + --secondary-foreground: 240 5.9% 10%; + --muted: 240 4.8% 95.9%; + --muted-foreground: 240 3.8% 46.1%; + --accent: 240 4.8% 95.9%; + --accent-foreground: 240 5.9% 10%; + --destructive: 0 84.2% 60.2%; + --destructive-foreground: 0 0% 98%; + --border: 240 5.9% 90%; + --input: 240 5.9% 90%; + --ring: 240 5.9% 10%; + --radius: 0.3rem; + } + + .dark { + --background: 240 10% 3.9%; + --foreground: 0 0% 98%; + --card: 240 10% 3.9%; + --card-foreground: 0 0% 98%; + --popover: 240 10% 3.9%; + --popover-foreground: 0 0% 98%; + --primary: 0 0% 98%; + --primary-foreground: 240 5.9% 10%; + --secondary: 240 3.7% 15.9%; + --secondary-foreground: 0 0% 98%; + --muted: 240 3.7% 15.9%; + --muted-foreground: 240 5% 64.9%; + --accent: 240 3.7% 15.9%; + --accent-foreground: 0 0% 98%; + --destructive: 0 62.8% 30.6%; + --destructive-foreground: 0 0% 98%; + --border: 240 3.7% 15.9%; + --input: 240 3.7% 15.9%; + --ring: 240 4.9% 83.9%; + }`, + }, ], // NOTE: build step required for transformers (see @unocss/unocss#1673) diff --git a/templates/_requested/workflow-capture-webhook-data-to-hubspot-resource/src/deno.json b/templates/_requested/workflow-capture-webhook-data-to-hubspot-resource/src/deno.json index fb5290d7d..fd900fd14 100644 --- a/templates/_requested/workflow-capture-webhook-data-to-hubspot-resource/src/deno.json +++ b/templates/_requested/workflow-capture-webhook-data-to-hubspot-resource/src/deno.json @@ -13,4 +13,4 @@ "@/": "./", "netzo/": "https://deno.land/x/netzo@v0.2.21/" } -} \ No newline at end of file +} diff --git a/templates/_requested/workflow-send-apollo-leads-to-brevo-contacts-and-companies/src/deno.json b/templates/_requested/workflow-send-apollo-leads-to-brevo-contacts-and-companies/src/deno.json index fb5290d7d..fd900fd14 100644 --- a/templates/_requested/workflow-send-apollo-leads-to-brevo-contacts-and-companies/src/deno.json +++ b/templates/_requested/workflow-send-apollo-leads-to-brevo-contacts-and-companies/src/deno.json @@ -13,4 +13,4 @@ "@/": "./", "netzo/": "https://deno.land/x/netzo@v0.2.21/" } -} \ No newline at end of file +} diff --git a/templates/_requested/workflow-send-waalaxy-leads-to-hubspot-contacts-and-companies/src/deno.json b/templates/_requested/workflow-send-waalaxy-leads-to-hubspot-contacts-and-companies/src/deno.json index fb5290d7d..fd900fd14 100644 --- a/templates/_requested/workflow-send-waalaxy-leads-to-hubspot-contacts-and-companies/src/deno.json +++ b/templates/_requested/workflow-send-waalaxy-leads-to-hubspot-contacts-and-companies/src/deno.json @@ -13,4 +13,4 @@ "@/": "./", "netzo/": "https://deno.land/x/netzo@v0.2.21/" } -} \ No newline at end of file +} diff --git a/templates/api-transactional-email-generator/src/deno.json b/templates/api-transactional-email-generator/src/deno.json index b953ea76b..7a34bbc61 100644 --- a/templates/api-transactional-email-generator/src/deno.json +++ b/templates/api-transactional-email-generator/src/deno.json @@ -29,4 +29,4 @@ "mustache": "https://esm.sh/mustache@4.2.0", "netzo/": "https://deno.land/x/netzo@v0.2.21/" } -} \ No newline at end of file +} diff --git a/templates/app-app-launcher/src/deno.json b/templates/app-app-launcher/src/deno.json index dd2ee04f6..417e83a44 100644 --- a/templates/app-app-launcher/src/deno.json +++ b/templates/app-app-launcher/src/deno.json @@ -28,4 +28,4 @@ "std/": "https://deno.land/std@0.187.0/", "netzo/": "https://deno.land/x/netzo@v0.2.21/" } -} \ No newline at end of file +} diff --git a/templates/app-file-upload-portal/src/deno.json b/templates/app-file-upload-portal/src/deno.json index 2696513ae..ba58d4963 100644 --- a/templates/app-file-upload-portal/src/deno.json +++ b/templates/app-file-upload-portal/src/deno.json @@ -28,4 +28,4 @@ "std/": "https://deno.land/std@0.190.0/", "netzo/": "https://deno.land/x/netzo@v0.2.21/" } -} \ No newline at end of file +} diff --git a/templates/app-sales-dashboard/src/deno.json b/templates/app-sales-dashboard/src/deno.json index 7d0bfd8c5..9dd2dc026 100644 --- a/templates/app-sales-dashboard/src/deno.json +++ b/templates/app-sales-dashboard/src/deno.json @@ -29,4 +29,4 @@ "@tremor/react": "https://esm.sh/@tremor/react@2.9.1?alias=react:preact/compat,react-dom:preact/compat&deps=preact@10.16.0", "netzo/": "https://deno.land/x/netzo@v0.2.21/" } -} \ No newline at end of file +} diff --git a/templates/app-statuspage/src/deno.json b/templates/app-statuspage/src/deno.json index 25bf887b0..d7c89d44e 100644 --- a/templates/app-statuspage/src/deno.json +++ b/templates/app-statuspage/src/deno.json @@ -29,4 +29,4 @@ "netzo/": "https://deno.land/x/netzo@v0.2.21/", "@tremor/react": "https://esm.sh/@tremor/react@3.2.1?alias=react:preact/compat,react-dom:preact/compat&deps=preact@10.16.0" } -} \ No newline at end of file +} diff --git a/templates/workflow-capture-webhook-data-to-activecampaign-resource/src/deno.json b/templates/workflow-capture-webhook-data-to-activecampaign-resource/src/deno.json index fb5290d7d..fd900fd14 100644 --- a/templates/workflow-capture-webhook-data-to-activecampaign-resource/src/deno.json +++ b/templates/workflow-capture-webhook-data-to-activecampaign-resource/src/deno.json @@ -13,4 +13,4 @@ "@/": "./", "netzo/": "https://deno.land/x/netzo@v0.2.21/" } -} \ No newline at end of file +} diff --git a/templates/workflow-capture-webhook-data-to-brevo-resource/src/deno.json b/templates/workflow-capture-webhook-data-to-brevo-resource/src/deno.json index fb5290d7d..fd900fd14 100644 --- a/templates/workflow-capture-webhook-data-to-brevo-resource/src/deno.json +++ b/templates/workflow-capture-webhook-data-to-brevo-resource/src/deno.json @@ -13,4 +13,4 @@ "@/": "./", "netzo/": "https://deno.land/x/netzo@v0.2.21/" } -} \ No newline at end of file +} diff --git a/templates/workflow-capture-webhook-data-to-holded-resource/src/deno.json b/templates/workflow-capture-webhook-data-to-holded-resource/src/deno.json index fb5290d7d..fd900fd14 100644 --- a/templates/workflow-capture-webhook-data-to-holded-resource/src/deno.json +++ b/templates/workflow-capture-webhook-data-to-holded-resource/src/deno.json @@ -13,4 +13,4 @@ "@/": "./", "netzo/": "https://deno.land/x/netzo@v0.2.21/" } -} \ No newline at end of file +} diff --git a/templates/workflow-capture-webhook-data-to-pipedrive-resource/src/deno.json b/templates/workflow-capture-webhook-data-to-pipedrive-resource/src/deno.json index fb5290d7d..fd900fd14 100644 --- a/templates/workflow-capture-webhook-data-to-pipedrive-resource/src/deno.json +++ b/templates/workflow-capture-webhook-data-to-pipedrive-resource/src/deno.json @@ -13,4 +13,4 @@ "@/": "./", "netzo/": "https://deno.land/x/netzo@v0.2.21/" } -} \ No newline at end of file +} diff --git a/templates/workflow-send-waalaxy-leads-to-activecampaign-contacts-and-companies/src/deno.json b/templates/workflow-send-waalaxy-leads-to-activecampaign-contacts-and-companies/src/deno.json index fb5290d7d..fd900fd14 100644 --- a/templates/workflow-send-waalaxy-leads-to-activecampaign-contacts-and-companies/src/deno.json +++ b/templates/workflow-send-waalaxy-leads-to-activecampaign-contacts-and-companies/src/deno.json @@ -13,4 +13,4 @@ "@/": "./", "netzo/": "https://deno.land/x/netzo@v0.2.21/" } -} \ No newline at end of file +} diff --git a/templates/workflow-send-waalaxy-leads-to-brevo-contacts-and-companies/src/deno.json b/templates/workflow-send-waalaxy-leads-to-brevo-contacts-and-companies/src/deno.json index fb5290d7d..fd900fd14 100644 --- a/templates/workflow-send-waalaxy-leads-to-brevo-contacts-and-companies/src/deno.json +++ b/templates/workflow-send-waalaxy-leads-to-brevo-contacts-and-companies/src/deno.json @@ -13,4 +13,4 @@ "@/": "./", "netzo/": "https://deno.land/x/netzo@v0.2.21/" } -} \ No newline at end of file +} diff --git a/templates/workflow-send-waalaxy-leads-to-holded-contacts/src/deno.json b/templates/workflow-send-waalaxy-leads-to-holded-contacts/src/deno.json index fb5290d7d..fd900fd14 100644 --- a/templates/workflow-send-waalaxy-leads-to-holded-contacts/src/deno.json +++ b/templates/workflow-send-waalaxy-leads-to-holded-contacts/src/deno.json @@ -13,4 +13,4 @@ "@/": "./", "netzo/": "https://deno.land/x/netzo@v0.2.21/" } -} \ No newline at end of file +} diff --git a/templates/workflow-send-waalaxy-leads-to-pipedrive-persons/src/deno.json b/templates/workflow-send-waalaxy-leads-to-pipedrive-persons/src/deno.json index fb5290d7d..fd900fd14 100644 --- a/templates/workflow-send-waalaxy-leads-to-pipedrive-persons/src/deno.json +++ b/templates/workflow-send-waalaxy-leads-to-pipedrive-persons/src/deno.json @@ -13,4 +13,4 @@ "@/": "./", "netzo/": "https://deno.land/x/netzo@v0.2.21/" } -} \ No newline at end of file +}