@merchi/sdk 1.42.15 → 1.42.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/dist/constants/auto_assign_production_on_actions.d.ts +6 -0
  2. package/dist/constants/call_to_actions.d.ts +14 -0
  3. package/dist/constants/call_to_actions.test.d.ts +1 -0
  4. package/dist/constants/discount_types.d.ts +5 -0
  5. package/dist/constants/discount_types.test.d.ts +1 -0
  6. package/dist/constants/domain_types.d.ts +12 -0
  7. package/dist/constants/domain_types.test.d.ts +1 -0
  8. package/dist/constants/errors.d.ts +26 -0
  9. package/dist/constants/event_types.d.ts +5 -0
  10. package/dist/constants/event_types.test.d.ts +1 -0
  11. package/dist/constants/field_types.d.ts +18 -0
  12. package/dist/constants/field_types.js +1 -0
  13. package/dist/constants/field_types.test.d.ts +1 -0
  14. package/dist/constants/index.d.ts +25 -0
  15. package/dist/constants/input_types.d.ts +13 -0
  16. package/dist/constants/input_types.test.d.ts +1 -0
  17. package/dist/constants/inventory_status.test.d.ts +1 -0
  18. package/dist/constants/inventory_statuses.d.ts +6 -0
  19. package/dist/constants/invoice_types.d.ts +5 -0
  20. package/dist/constants/invoice_types.test.d.ts +1 -0
  21. package/dist/constants/item_types.d.ts +5 -0
  22. package/dist/constants/item_types.test.d.ts +1 -0
  23. package/dist/constants/job/drafting_status.d.ts +7 -0
  24. package/dist/constants/job/drafting_status.test.d.ts +1 -0
  25. package/dist/constants/job/payment_status.d.ts +7 -0
  26. package/dist/constants/job/payment_status.test.d.ts +1 -0
  27. package/dist/constants/job/production_status.d.ts +12 -0
  28. package/dist/constants/job/production_status.test.d.ts +1 -0
  29. package/dist/constants/job/shipment_status.d.ts +11 -0
  30. package/dist/constants/job/shipment_status.test.d.ts +1 -0
  31. package/dist/constants/job/supply_chain_request_status.d.ts +6 -0
  32. package/dist/constants/job/supply_chain_request_status.test.d.ts +1 -0
  33. package/dist/constants/job_priorities.d.ts +6 -0
  34. package/dist/constants/job_priorities.test.d.ts +1 -0
  35. package/dist/constants/job_status.d.ts +45 -0
  36. package/dist/constants/job_status.test.d.ts +1 -0
  37. package/dist/constants/job_types.d.ts +16 -0
  38. package/dist/constants/job_types.test.d.ts +1 -0
  39. package/dist/constants/notification_sections.d.ts +13 -0
  40. package/dist/constants/notification_sections.test.d.ts +1 -0
  41. package/dist/constants/notification_types.d.ts +101 -0
  42. package/dist/constants/notification_types.test.d.ts +1 -0
  43. package/dist/constants/notification_urgencies.d.ts +6 -0
  44. package/dist/constants/notification_urgencies.test.d.ts +1 -0
  45. package/dist/constants/payment_types.d.ts +10 -0
  46. package/dist/constants/payment_types.test.d.ts +1 -0
  47. package/dist/constants/platform.d.ts +5 -0
  48. package/dist/constants/platform.test.d.ts +1 -0
  49. package/dist/constants/product_types.d.ts +26 -0
  50. package/dist/constants/product_types.test.d.ts +1 -0
  51. package/dist/constants/rights.d.ts +5 -0
  52. package/dist/constants/rights.test.d.ts +1 -0
  53. package/dist/constants/robots_meta_directives.d.ts +1 -0
  54. package/dist/constants/robots_meta_directives.test.d.ts +1 -0
  55. package/dist/constants/roles.d.ts +20 -0
  56. package/dist/constants/roles.test.d.ts +1 -0
  57. package/dist/constants/shipment_companies.d.ts +19 -0
  58. package/dist/constants/shipment_companies.test.d.ts +1 -0
  59. package/dist/constants/shipment_services.d.ts +3 -0
  60. package/dist/constants/shipment_services.test.d.ts +1 -0
  61. package/dist/constants/system_roles.d.ts +3 -0
  62. package/dist/constants/system_roles.test.d.ts +1 -0
  63. package/dist/constants/theme_status.d.ts +5 -0
  64. package/dist/constants/theme_status.test.d.ts +1 -0
  65. package/dist/constants/user_types.d.ts +17 -0
  66. package/dist/constants/user_types.test.d.ts +1 -0
  67. package/dist/constants/white_label_accessibilities.d.ts +5 -0
  68. package/dist/constants/white_label_accessibilities.test.d.ts +1 -0
  69. package/dist/cookie.d.ts +1 -0
  70. package/dist/cookie.test.d.ts +1 -0
  71. package/dist/entities/address.d.ts +30 -0
  72. package/dist/entities/address.test.d.ts +1 -0
  73. package/dist/entities/agent_conversation.d.ts +18 -0
  74. package/dist/entities/agent_conversation.test.d.ts +1 -0
  75. package/dist/entities/agent_skill.d.ts +33 -0
  76. package/dist/entities/agent_skill.test.d.ts +1 -0
  77. package/dist/entities/agent_skill_approval.d.ts +13 -0
  78. package/dist/entities/agent_skill_version.d.ts +18 -0
  79. package/dist/entities/agent_token_analytics.d.ts +50 -0
  80. package/dist/entities/agent_token_usage.d.ts +31 -0
  81. package/dist/entities/agent_token_usage.test.d.ts +1 -0
  82. package/dist/entities/assignment.d.ts +40 -0
  83. package/dist/entities/assignment.test.d.ts +1 -0
  84. package/dist/entities/automatic_payment_relationship.d.ts +14 -0
  85. package/dist/entities/automatic_payment_relationship.test.d.ts +1 -0
  86. package/dist/entities/bank.d.ts +20 -0
  87. package/dist/entities/bank.test.d.ts +1 -0
  88. package/dist/entities/cart.d.ts +50 -0
  89. package/dist/entities/cart.test.d.ts +1 -0
  90. package/dist/entities/cart_item.d.ts +33 -0
  91. package/dist/entities/cart_item.test.d.ts +1 -0
  92. package/dist/entities/cart_shipment_group.d.ts +12 -0
  93. package/dist/entities/cart_shipment_quote.d.ts +16 -0
  94. package/dist/entities/category.d.ts +26 -0
  95. package/dist/entities/category.test.d.ts +1 -0
  96. package/dist/entities/company.d.ts +137 -0
  97. package/dist/entities/company.test.d.ts +1 -0
  98. package/dist/entities/company_invitation.d.ts +16 -0
  99. package/dist/entities/company_invitation.test.d.ts +1 -0
  100. package/dist/entities/country_tax.d.ts +20 -0
  101. package/dist/entities/country_tax.test.d.ts +1 -0
  102. package/dist/entities/discount.d.ts +19 -0
  103. package/dist/entities/discount.test.d.ts +1 -0
  104. package/dist/entities/discount_group.d.ts +20 -0
  105. package/dist/entities/discount_group.test.d.ts +1 -0
  106. package/dist/entities/domain.d.ts +629 -0
  107. package/dist/entities/domain.test.d.ts +1 -0
  108. package/dist/entities/domain_chat_settings.d.ts +33 -0
  109. package/dist/entities/domain_chat_settings.test.d.ts +1 -0
  110. package/dist/entities/domain_invitation.d.ts +17 -0
  111. package/dist/entities/domain_invitation.test.d.ts +1 -0
  112. package/dist/entities/domain_tag.d.ts +21 -0
  113. package/dist/entities/domain_tag.test.d.ts +1 -0
  114. package/dist/entities/draft.d.ts +31 -0
  115. package/dist/entities/draft.test.d.ts +1 -0
  116. package/dist/entities/draft_comment.d.ts +28 -0
  117. package/dist/entities/draft_comment.test.d.ts +1 -0
  118. package/dist/entities/draft_preview.d.ts +18 -0
  119. package/dist/entities/draft_preview.test.d.ts +1 -0
  120. package/dist/entities/draft_preview_layer.d.ts +12 -0
  121. package/dist/entities/draft_preview_layer.test.d.ts +1 -0
  122. package/dist/entities/draft_template.d.ts +31 -0
  123. package/dist/entities/draft_template.js +8 -0
  124. package/dist/entities/draft_template.test.d.ts +1 -0
  125. package/dist/entities/email_address.d.ts +13 -0
  126. package/dist/entities/email_address.test.d.ts +1 -0
  127. package/dist/entities/email_counter.d.ts +11 -0
  128. package/dist/entities/email_counter.test.d.ts +1 -0
  129. package/dist/entities/enrolled_domain.d.ts +16 -0
  130. package/dist/entities/enrolled_domain.test.d.ts +1 -0
  131. package/dist/entities/exchange_rate.d.ts +11 -0
  132. package/dist/entities/exchange_rate.test.d.ts +1 -0
  133. package/dist/entities/file.d.ts +65 -0
  134. package/dist/entities/file.test.d.ts +1 -0
  135. package/dist/entities/internal_tag.d.ts +26 -0
  136. package/dist/entities/internal_tag.test.d.ts +1 -0
  137. package/dist/entities/inventory.d.ts +27 -0
  138. package/dist/entities/inventory.test.d.ts +1 -0
  139. package/dist/entities/inventory_group.d.ts +19 -0
  140. package/dist/entities/inventory_group.test.d.ts +1 -0
  141. package/dist/entities/inventory_unit_variation.d.ts +13 -0
  142. package/dist/entities/inventory_unit_variation.test.d.ts +1 -0
  143. package/dist/entities/invoice.d.ts +80 -0
  144. package/dist/entities/invoice.test.d.ts +1 -0
  145. package/dist/entities/item.d.ts +24 -0
  146. package/dist/entities/item.test.d.ts +1 -0
  147. package/dist/entities/job.d.ts +156 -0
  148. package/dist/entities/job.test.d.ts +1 -0
  149. package/dist/entities/job_comment.d.ts +24 -0
  150. package/dist/entities/job_comment.test.d.ts +1 -0
  151. package/dist/entities/job_note.d.ts +19 -0
  152. package/dist/entities/job_operation_log.d.ts +18 -0
  153. package/dist/entities/job_operation_log.test.d.ts +1 -0
  154. package/dist/entities/matching_inventory.d.ts +16 -0
  155. package/dist/entities/notification.d.ts +47 -0
  156. package/dist/entities/notification.test.d.ts +1 -0
  157. package/dist/entities/payment.d.ts +28 -0
  158. package/dist/entities/payment.test.d.ts +1 -0
  159. package/dist/entities/payment_device.d.ts +14 -0
  160. package/dist/entities/payment_device.test.d.ts +1 -0
  161. package/dist/entities/phone_number.d.ts +17 -0
  162. package/dist/entities/phone_number.test.d.ts +1 -0
  163. package/dist/entities/product.d.ts +148 -0
  164. package/dist/entities/product.test.d.ts +1 -0
  165. package/dist/entities/product_form.d.ts +22 -0
  166. package/dist/entities/product_form_version.d.ts +20 -0
  167. package/dist/entities/product_review.d.ts +74 -0
  168. package/dist/entities/production_comment.d.ts +24 -0
  169. package/dist/entities/production_comment.test.d.ts +1 -0
  170. package/dist/entities/quote.d.ts +29 -0
  171. package/dist/entities/quote.test.d.ts +1 -0
  172. package/dist/entities/quote_item.d.ts +24 -0
  173. package/dist/entities/quote_item.test.d.ts +1 -0
  174. package/dist/entities/reminder.d.ts +35 -0
  175. package/dist/entities/reminder.test.d.ts +1 -0
  176. package/dist/entities/session.d.ts +15 -0
  177. package/dist/entities/session.test.d.ts +1 -0
  178. package/dist/entities/shipment.d.ts +76 -0
  179. package/dist/entities/shipment.test.d.ts +1 -0
  180. package/dist/entities/shipment_item.d.ts +10 -0
  181. package/dist/entities/shipment_item.test.d.ts +1 -0
  182. package/dist/entities/shipment_item_fulfillment.d.ts +10 -0
  183. package/dist/entities/shipment_item_fulfillment.test.d.ts +1 -0
  184. package/dist/entities/shipment_log.d.ts +15 -0
  185. package/dist/entities/shipment_method.d.ts +28 -0
  186. package/dist/entities/shipment_method.test.d.ts +1 -0
  187. package/dist/entities/shipment_method_variation.d.ts +18 -0
  188. package/dist/entities/shipment_method_variation.test.d.ts +1 -0
  189. package/dist/entities/short_url.d.ts +17 -0
  190. package/dist/entities/short_url.test.d.ts +1 -0
  191. package/dist/entities/subscription_plan.d.ts +30 -0
  192. package/dist/entities/subscription_plan.test.d.ts +1 -0
  193. package/dist/entities/supply_domain.d.ts +14 -0
  194. package/dist/entities/supply_domain.test.d.ts +1 -0
  195. package/dist/entities/support_conversation.d.ts +30 -0
  196. package/dist/entities/support_conversation.test.d.ts +1 -0
  197. package/dist/entities/support_message.d.ts +15 -0
  198. package/dist/entities/support_message.test.d.ts +1 -0
  199. package/dist/entities/system_role.d.ts +10 -0
  200. package/dist/entities/system_role.test.d.ts +1 -0
  201. package/dist/entities/theme.d.ts +26 -0
  202. package/dist/entities/theme.test.d.ts +1 -0
  203. package/dist/entities/theme_css_setting.d.ts +12 -0
  204. package/dist/entities/theme_css_setting.test.d.ts +1 -0
  205. package/dist/entities/user.d.ts +142 -0
  206. package/dist/entities/user.test.d.ts +1 -0
  207. package/dist/entities/user_company.d.ts +14 -0
  208. package/dist/entities/user_company.test.d.ts +1 -0
  209. package/dist/entities/variation.d.ts +29 -0
  210. package/dist/entities/variation.test.d.ts +1 -0
  211. package/dist/entities/variation_field.d.ts +87 -0
  212. package/dist/entities/variation_field.js +33 -0
  213. package/dist/entities/variation_field.test.d.ts +1 -0
  214. package/dist/entities/variation_fields_option.d.ts +36 -0
  215. package/dist/entities/variation_fields_option.test.d.ts +1 -0
  216. package/dist/entities/variation_option.d.ts +23 -0
  217. package/dist/entities/variation_option.test.d.ts +1 -0
  218. package/dist/entities/variations_group.d.ts +20 -0
  219. package/dist/entities/variations_group.test.d.ts +1 -0
  220. package/dist/entity.d.ts +208 -0
  221. package/dist/index.d.ts +88 -0
  222. package/dist/merchi.d.ts +179 -0
  223. package/dist/merchi.test.d.ts +1 -0
  224. package/dist/pricing/discount.d.ts +2 -0
  225. package/dist/pricing/discount.test.d.ts +1 -0
  226. package/dist/pricing/estimate.d.ts +2 -0
  227. package/dist/pricing/estimate.js +56 -0
  228. package/dist/pricing/estimate.test.d.ts +1 -0
  229. package/dist/pricing/estimate.test.js +81 -0
  230. package/dist/pricing/golden.test.d.ts +1 -0
  231. package/dist/pricing/index.d.ts +7 -0
  232. package/dist/pricing/index.test.d.ts +1 -0
  233. package/dist/pricing/inventory.d.ts +2 -0
  234. package/dist/pricing/inventory.test.d.ts +1 -0
  235. package/dist/pricing/matrix.d.ts +10 -0
  236. package/dist/pricing/matrix.test.d.ts +1 -0
  237. package/dist/pricing/round.d.ts +13 -0
  238. package/dist/pricing/round.test.d.ts +1 -0
  239. package/dist/pricing/types.d.ts +137 -0
  240. package/dist/pricing/visibility.d.ts +3 -0
  241. package/dist/pricing/visibility.test.d.ts +1 -0
  242. package/dist/request.d.ts +56 -0
  243. package/dist/request.test.d.ts +1 -0
  244. package/dist/test_util.d.ts +3 -0
  245. package/dist/toasts.d.ts +14 -0
  246. package/dist/toasts.test.d.ts +1 -0
  247. package/dist/util/float.d.ts +1 -0
  248. package/dist/util/index.d.ts +3 -0
  249. package/dist/util/query_string.d.ts +1 -0
  250. package/dist/util/query_string.test.d.ts +1 -0
  251. package/dist/util/validation.d.ts +1 -0
  252. package/dist/util/validation.test.d.ts +1 -0
  253. package/dist/uuid.d.ts +1 -0
  254. package/dist/uuid.test.d.ts +1 -0
  255. package/package.json +2 -1
  256. package/src/constants/field_types.ts +1 -0
  257. package/src/entities/draft_template.ts +6 -0
  258. package/src/entities/variation_field.ts +25 -0
  259. package/src/entity.ts +1 -1
  260. package/src/pricing/estimate.test.ts +95 -0
  261. package/src/pricing/estimate.ts +73 -0
  262. package/src/pricing/types.ts +10 -0
  263. package/tsconfig.json +1 -0
@@ -0,0 +1,5 @@
1
+ export declare enum WhiteLabelAccessibility {
2
+ UNREACHABLE = 0,
3
+ NO_CERTIFICATE = 1,
4
+ REACHABLE = 2
5
+ }
@@ -0,0 +1 @@
1
+ export declare function getCookie(name: string): string | undefined;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,30 @@
1
+ import { Bank } from './bank.js';
2
+ import { Company } from './company.js';
3
+ import { Entity } from '../entity.js';
4
+ import { Inventory } from './inventory.js';
5
+ import { Invoice } from './invoice.js';
6
+ import { Job } from './job.js';
7
+ import { Shipment } from './shipment.js';
8
+ import { User } from './user.js';
9
+ export declare class Address extends Entity {
10
+ protected static resourceName: string;
11
+ protected static singularName: string;
12
+ protected static pluralName: string;
13
+ archived?: Date | null;
14
+ id?: number;
15
+ lineOne?: string | null;
16
+ lineTwo?: string | null;
17
+ city?: string | null;
18
+ state?: string | null;
19
+ country?: string | null;
20
+ postcode?: string | null;
21
+ shipmentAsSenderAddress?: Shipment[];
22
+ shipmentsAsReceiverAddress?: Shipment[];
23
+ banks?: Bank[];
24
+ users?: User[];
25
+ inventories?: Inventory[];
26
+ jobs?: Job[];
27
+ productedJobs?: Job[];
28
+ shippingTo?: Invoice[];
29
+ companies?: Company[];
30
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ import { Domain } from './domain.js';
2
+ import { Entity } from '../entity.js';
3
+ import { User } from './user.js';
4
+ export declare class AgentConversation extends Entity {
5
+ protected static resourceName: string;
6
+ protected static singularName: string;
7
+ protected static pluralName: string;
8
+ archived?: Date | null;
9
+ id?: number;
10
+ conversationId?: string;
11
+ initialPrompt?: string;
12
+ creationDate?: Date | null;
13
+ entityType?: string | null;
14
+ entityId?: number | null;
15
+ serviceProvider?: number;
16
+ user?: User;
17
+ domain?: Domain;
18
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,33 @@
1
+ import { Entity } from '../entity.js';
2
+ import { AgentSkillVersion } from './agent_skill_version.js';
3
+ import { Category } from './category.js';
4
+ import { Domain } from './domain.js';
5
+ import { Product } from './product.js';
6
+ interface CreateDraftOptions {
7
+ contentMd?: string;
8
+ }
9
+ export declare class AgentSkill extends Entity {
10
+ protected static resourceName: string;
11
+ protected static singularName: string;
12
+ protected static pluralName: string;
13
+ protected static primaryKey: string;
14
+ id?: string;
15
+ slug?: string;
16
+ title?: string;
17
+ scope?: 'global' | 'domain' | 'domain_category' | 'domain_product';
18
+ domain?: Domain | null;
19
+ category?: Category | null;
20
+ product?: Product | null;
21
+ description?: string | null;
22
+ priority?: number;
23
+ createdAt?: Date | null;
24
+ disabledAt?: Date | null;
25
+ currentDraftVersionId?: string | null;
26
+ currentPublishedVersionId?: string | null;
27
+ versions?: AgentSkillVersion[];
28
+ createDraftVersion: (options?: CreateDraftOptions) => Promise<AgentSkillVersion>;
29
+ disable: () => Promise<this>;
30
+ enable: () => Promise<this>;
31
+ getVersionDiff: (versionId: string) => Promise<any>;
32
+ }
33
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,13 @@
1
+ import { Entity } from '../entity.js';
2
+ import { User } from './user.js';
3
+ export declare class AgentSkillApproval extends Entity {
4
+ protected static resourceName: string;
5
+ protected static singularName: string;
6
+ protected static pluralName: string;
7
+ id?: string;
8
+ skillVersionId?: string;
9
+ superUser?: User | null;
10
+ decision?: 'approved' | 'rejected';
11
+ comment?: string | null;
12
+ createdAt?: Date | null;
13
+ }
@@ -0,0 +1,18 @@
1
+ import { Entity } from '../entity.js';
2
+ export declare class AgentSkillVersion extends Entity {
3
+ protected static resourceName: string;
4
+ protected static singularName: string;
5
+ protected static pluralName: string;
6
+ id?: string;
7
+ skillId?: string;
8
+ versionNumber?: number;
9
+ contentMd?: string;
10
+ contentHash?: string;
11
+ status?: string;
12
+ requestedAt?: Date | null;
13
+ publishedAt?: Date | null;
14
+ disabledAt?: Date | null;
15
+ submit: (skillId: string) => Promise<this>;
16
+ approve: (skillId: string, comment: string) => Promise<this>;
17
+ reject: (skillId: string, comment: string) => Promise<this>;
18
+ }
@@ -0,0 +1,50 @@
1
+ export interface AgentTokenAnalyticsSummary {
2
+ percentageDifference?: number | null;
3
+ totals?: number;
4
+ previousTotals?: number;
5
+ }
6
+ export interface AgentTokenAnalyticsTimeseries {
7
+ dates?: string[];
8
+ totalTokens?: number[];
9
+ promptTokens?: number[];
10
+ completionTokens?: number[];
11
+ }
12
+ export interface ProfileAnalyticsSummaryMetric {
13
+ percentageDifference?: number | null;
14
+ totals?: number | {
15
+ total?: number;
16
+ currency?: string;
17
+ };
18
+ previousTotals?: number | {
19
+ total?: number;
20
+ currency?: string;
21
+ };
22
+ }
23
+ export interface CompanyAnalyticsResponse {
24
+ totalJobs?: ProfileAnalyticsSummaryMetric;
25
+ completedJobs?: ProfileAnalyticsSummaryMetric;
26
+ totalInvoices?: ProfileAnalyticsSummaryMetric;
27
+ paymentsReceived?: ProfileAnalyticsSummaryMetric;
28
+ agentTokenUsage?: AgentTokenAnalyticsSummary;
29
+ }
30
+ export interface DomainAnalyticsResponse extends CompanyAnalyticsResponse {
31
+ }
32
+ export interface AgentTokenUsageRecordPayload {
33
+ companyId?: number;
34
+ domainId?: number;
35
+ promptTokens?: number;
36
+ completionTokens?: number;
37
+ totalTokens?: number;
38
+ sourceType?: string;
39
+ modelName?: string;
40
+ agentConversationId?: number;
41
+ supportConversationId?: number;
42
+ }
43
+ export interface AgentTokenUsageRecordResponse {
44
+ agentTokenUsage?: {
45
+ id?: number;
46
+ companyId?: number;
47
+ domainId?: number;
48
+ totalTokens?: number;
49
+ };
50
+ }
@@ -0,0 +1,31 @@
1
+ import { Entity } from '../entity.js';
2
+ import { Company } from './company.js';
3
+ import { Domain } from './domain.js';
4
+ import { User } from './user.js';
5
+ import { AgentConversation } from './agent_conversation.js';
6
+ import { SupportConversation } from './support_conversation.js';
7
+ import type { AgentTokenUsageRecordPayload, AgentTokenUsageRecordResponse } from './agent_token_analytics.js';
8
+ import type { RequestOptions } from '../request.js';
9
+ export declare class AgentTokenUsage extends Entity {
10
+ protected static resourceName: string;
11
+ protected static singularName: string;
12
+ protected static pluralName: string;
13
+ id?: number;
14
+ createdAt?: Date | null;
15
+ companyId?: number;
16
+ domainId?: number;
17
+ userId?: number;
18
+ company?: Company | null;
19
+ domain?: Domain | null;
20
+ user?: User | null;
21
+ agentConversation?: AgentConversation | null;
22
+ supportConversation?: SupportConversation | null;
23
+ agentConversationId?: number;
24
+ supportConversationId?: number;
25
+ sourceType?: string;
26
+ modelName?: string;
27
+ promptTokens?: number;
28
+ completionTokens?: number;
29
+ totalTokens?: number;
30
+ static record: (payload: AgentTokenUsageRecordPayload, fetchOptions?: RequestOptions) => Promise<AgentTokenUsageRecordResponse>;
31
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,40 @@
1
+ import { Entity } from '../entity.js';
2
+ import { Quote } from './quote.js';
3
+ import { MerchiFile } from './file.js';
4
+ import { Job } from './job.js';
5
+ import { Notification } from './notification.js';
6
+ import { ProductionComment } from './production_comment.js';
7
+ import { Reminder } from './reminder.js';
8
+ import { Shipment } from './shipment.js';
9
+ import { SupplyDomain } from './supply_domain.js';
10
+ import { User } from './user.js';
11
+ interface GenerateInvoiceProps {
12
+ addToInvoice?: number;
13
+ }
14
+ export declare class Assignment extends Entity {
15
+ protected static resourceName: string;
16
+ protected static singularName: string;
17
+ protected static pluralName: string;
18
+ archived?: Date | null;
19
+ id?: number;
20
+ managerAccepts?: Date | null;
21
+ supplierRefused?: Date | null;
22
+ needsDrafting?: boolean;
23
+ needsShipping?: boolean;
24
+ productionDeadline?: Date;
25
+ assignmentDeadline?: Date;
26
+ notes?: string | null;
27
+ job?: Job | null;
28
+ supplyJob?: Job | null;
29
+ supplier?: User | null;
30
+ quote?: Quote | null;
31
+ quoteTotalCost?: number;
32
+ comments?: ProductionComment[];
33
+ shipment?: Shipment | null;
34
+ supplyDomain?: SupplyDomain | null;
35
+ notifications?: Notification[];
36
+ reminders?: Reminder[];
37
+ productionFiles?: MerchiFile[];
38
+ generateInvoice: (props?: GenerateInvoiceProps) => Promise<import("./invoice.js").Invoice>;
39
+ }
40
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ import { Company } from './company.js';
2
+ import { Entity } from '../entity.js';
3
+ export declare class AutomaticPaymentRelationship extends Entity {
4
+ protected static resourceName: string;
5
+ protected static singularName: string;
6
+ protected static pluralName: string;
7
+ archived?: Date | null;
8
+ id?: number;
9
+ creationDate?: Date;
10
+ allowPostPayment?: boolean;
11
+ companyCustomer?: Company;
12
+ companySupplier?: Company;
13
+ stripeCustomerId?: string;
14
+ }
@@ -0,0 +1,20 @@
1
+ import { Address } from './address.js';
2
+ import { Company } from './company.js';
3
+ import { Entity } from '../entity.js';
4
+ export declare class Bank extends Entity {
5
+ protected static resourceName: string;
6
+ protected static singularName: string;
7
+ protected static pluralName: string;
8
+ archived?: Date | null;
9
+ id?: number;
10
+ default?: boolean;
11
+ bankName?: string;
12
+ accountNumber?: string;
13
+ accountName?: string;
14
+ bsb?: string | null;
15
+ swiftCode?: string | null;
16
+ iban?: string | null;
17
+ bankCode?: string | null;
18
+ bankAddress?: Address | null;
19
+ company?: Company;
20
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,50 @@
1
+ import { Address } from './address.js';
2
+ import { CartItem } from './cart_item.js';
3
+ import { CartShipmentGroup } from './cart_shipment_group.js';
4
+ import { Company } from './company.js';
5
+ import { Domain } from './domain.js';
6
+ import { Entity } from '../entity.js';
7
+ import { Invoice } from './invoice.js';
8
+ import { User } from './user.js';
9
+ import { Item } from './item.js';
10
+ export declare class Cart extends Entity {
11
+ protected static resourceName: string;
12
+ protected static singularName: string;
13
+ protected static pluralName: string;
14
+ archived?: Date | null;
15
+ id?: number;
16
+ stripePaymentEngine?: string;
17
+ creationDate?: Date;
18
+ updated?: Date;
19
+ ip?: string | null;
20
+ token?: string | null;
21
+ receiverNotes?: string | null;
22
+ currency?: string;
23
+ cartItemsSubtotalCost?: number;
24
+ cartItemsTaxAmount?: number;
25
+ cartItemsTotalCost?: number;
26
+ shipmentTotalCost?: number;
27
+ subtotalCost?: number;
28
+ taxAmount?: number;
29
+ totalCost?: number;
30
+ sendWhatsapp?: boolean;
31
+ isTest?: boolean;
32
+ sourceChannel?: string | null;
33
+ utmSource?: string | null;
34
+ utmMedium?: string | null;
35
+ utmCampaign?: string | null;
36
+ utmContent?: string | null;
37
+ utmTerm?: string | null;
38
+ sourceClickId?: string | null;
39
+ sourceLanding?: string | null;
40
+ sourceReferrer?: string | null;
41
+ client?: User | null;
42
+ clientCompany?: Company | null;
43
+ domain?: Domain;
44
+ invoice?: Invoice | null;
45
+ receiverAddress?: Address | null;
46
+ discountItems?: Item[];
47
+ cartItems?: CartItem[];
48
+ shipmentGroups?: CartShipmentGroup[];
49
+ requiresShipment: () => boolean;
50
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,33 @@
1
+ import { Cart } from './cart.js';
2
+ import { CountryTax } from './country_tax.js';
3
+ import { Entity } from '../entity.js';
4
+ import { Product } from './product.js';
5
+ import { Variation } from './variation.js';
6
+ import { VariationsGroup } from './variations_group.js';
7
+ import { DomainTag } from './domain_tag.js';
8
+ import { Draft } from './draft.js';
9
+ import { MerchiFile } from './file.js';
10
+ export declare class CartItem extends Entity {
11
+ protected static resourceName: string;
12
+ protected static singularName: string;
13
+ protected static pluralName: string;
14
+ archived?: Date | null;
15
+ id?: number;
16
+ quantity?: number;
17
+ notes?: string | null;
18
+ creationDate?: Date;
19
+ currency?: string;
20
+ subtotalCost?: number;
21
+ taxAmount?: number;
22
+ totalCost?: number;
23
+ product?: Product;
24
+ cart?: Cart;
25
+ taxType?: CountryTax;
26
+ variationsGroups?: VariationsGroup[];
27
+ variations?: Variation[];
28
+ tags?: DomainTag[];
29
+ ownDrafts?: Draft[];
30
+ clientFiles?: MerchiFile[];
31
+ requiresShipment: () => boolean;
32
+ calculate: () => Promise<this>;
33
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import { CartItem } from './cart_item.js';
2
+ import { CartShipmentQuote } from './cart_shipment_quote.js';
3
+ import { Entity } from '../entity.js';
4
+ export declare class CartShipmentGroup extends Entity {
5
+ protected static resourceName: string;
6
+ protected static singularName: string;
7
+ protected static pluralName: string;
8
+ id?: number;
9
+ cartItems?: CartItem[];
10
+ quotes?: CartShipmentQuote[];
11
+ selectedQuote?: CartShipmentQuote;
12
+ }
@@ -0,0 +1,16 @@
1
+ import { ShipmentMethod } from './shipment_method.js';
2
+ import { Entity } from '../entity.js';
3
+ import { ShipmentService } from '../constants/shipment_services.js';
4
+ export declare class CartShipmentQuote extends Entity {
5
+ protected static resourceName: string;
6
+ protected static singularName: string;
7
+ protected static pluralName: string;
8
+ id?: number;
9
+ name?: string;
10
+ subtotalCost?: number;
11
+ taxAmount?: number;
12
+ totalCost?: number;
13
+ shipmentService?: ShipmentService | null;
14
+ shipmentServiceQuote?: string;
15
+ shipmentMethod?: ShipmentMethod;
16
+ }
@@ -0,0 +1,26 @@
1
+ import { Domain } from './domain.js';
2
+ import { Entity } from '../entity.js';
3
+ import { MerchiFile } from './file.js';
4
+ import { Product } from './product.js';
5
+ import { User } from './user.js';
6
+ export declare class Category extends Entity {
7
+ protected static resourceName: string;
8
+ protected static singularName: string;
9
+ protected static pluralName: string;
10
+ archived?: Date | null;
11
+ id?: number;
12
+ name?: string;
13
+ position?: number;
14
+ description?: string | null;
15
+ descriptionShort?: string | null;
16
+ showDashboard?: boolean;
17
+ showPublic?: boolean;
18
+ showPublicSupplierResell?: boolean;
19
+ descendant?: number;
20
+ domain?: Domain;
21
+ products?: Product[];
22
+ users?: User[];
23
+ subcategories?: Category[];
24
+ parent?: Category;
25
+ image?: MerchiFile | null;
26
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,137 @@
1
+ import { Address } from './address.js';
2
+ import { AutomaticPaymentRelationship } from './automatic_payment_relationship.js';
3
+ import { Bank } from './bank.js';
4
+ import { Cart } from './cart.js';
5
+ import { CompanyInvitation } from './company_invitation.js';
6
+ import { CountryTax } from './country_tax.js';
7
+ import { Domain } from './domain.js';
8
+ import { EmailAddress } from './email_address.js';
9
+ import { Entity } from '../entity.js';
10
+ import { MerchiFile } from './file.js';
11
+ import { InternalTag } from './internal_tag.js';
12
+ import { Invoice } from './invoice.js';
13
+ import { Job } from './job.js';
14
+ import { PhoneNumber } from './phone_number.js';
15
+ import { Product } from './product.js';
16
+ import { Reminder } from './reminder.js';
17
+ import { Shipment } from './shipment.js';
18
+ import { User } from './user.js';
19
+ import { UserCompany } from './user_company.js';
20
+ import { SubscriptionPlan } from './subscription_plan.js';
21
+ import { PaymentDevice } from './payment_device.js';
22
+ import type { AgentTokenAnalyticsTimeseries, CompanyAnalyticsResponse } from './agent_token_analytics.js';
23
+ export declare class Company extends Entity {
24
+ protected static resourceName: string;
25
+ protected static singularName: string;
26
+ protected static pluralName: string;
27
+ archived?: Date | null;
28
+ created?: Date | null;
29
+ id?: number;
30
+ name?: string;
31
+ callToActions?: string;
32
+ callToActionDetails?: any[];
33
+ website?: string | null;
34
+ ownershipUnconfirmed?: boolean;
35
+ taxNumber?: string | null;
36
+ taxNumberType?: string | null;
37
+ paypalAccount?: string | null;
38
+ paypalPassword?: string | null;
39
+ paypalSignature?: string | null;
40
+ isPaypalValid?: boolean;
41
+ isStripeAccountEnabled?: boolean;
42
+ stripeAccountId?: string;
43
+ stripeCustomerId?: string;
44
+ sendleActive?: boolean;
45
+ sendleApiKey?: string;
46
+ sendleId?: string;
47
+ unltdAiApiOrganizationId?: string;
48
+ unltdAiApiSecretKey?: string;
49
+ australiaPostApiKey?: string;
50
+ australiaPostPassword?: string;
51
+ startrackApiKey?: string;
52
+ startrackPassword?: string;
53
+ dhlApiKey?: string;
54
+ dhlApiSecret?: string;
55
+ dhlTrackingSandbox?: boolean;
56
+ dhlTrackingExpress?: boolean;
57
+ fedexApiKey?: string;
58
+ fedexApiSecret?: string;
59
+ upsClientId?: string;
60
+ upsClientSecret?: string;
61
+ uspsApiKey?: string;
62
+ tntApiKey?: string;
63
+ tntApiSecret?: string;
64
+ aramexAccountNumber?: string;
65
+ aramexApiKey?: string;
66
+ aramexApiSecret?: string;
67
+ nzPostApiKey?: string;
68
+ internalUseNotes?: string;
69
+ internalUseAiContext?: string;
70
+ aiContext?: string;
71
+ isNew?: boolean;
72
+ subscriptionOutstanding?: boolean;
73
+ trialEndDate?: Date | null;
74
+ trialEndDateUpdated?: Date | null;
75
+ trialEndDateSetBy?: User;
76
+ isBlocked?: boolean;
77
+ isTesting?: boolean;
78
+ squareAccessToken?: string | null;
79
+ squareRefreshToken?: string | null;
80
+ squareExpiresAt?: Date | null;
81
+ squareIsValid?: boolean;
82
+ squareMerchantId?: string | null;
83
+ squareWebLocationId?: string | null;
84
+ stripePublishableTestKey?: string | null;
85
+ stripeApiTestKey?: string | null;
86
+ stripePublishableKey?: string | null;
87
+ stripeApiKey?: string | null;
88
+ stripeConnectDisabled?: boolean;
89
+ isPayingCompany?: boolean;
90
+ isStripeValid?: boolean;
91
+ acceptSquare?: boolean;
92
+ acceptStripe?: boolean;
93
+ acceptPaypal?: boolean;
94
+ acceptUtrust?: boolean;
95
+ utrustApiKey?: string | null;
96
+ utrustWebhookKey?: string | null;
97
+ isUtrustValid?: boolean;
98
+ acceptBankTransfer?: boolean;
99
+ acceptPhonePayment?: boolean;
100
+ defaultCurrency?: string;
101
+ country?: string;
102
+ internalTags?: InternalTag[];
103
+ logo?: MerchiFile | null;
104
+ defaultTaxType?: CountryTax | null;
105
+ automaticPaymentRelationships?: AutomaticPaymentRelationship[];
106
+ taxTypes?: CountryTax[];
107
+ paymentDevices?: PaymentDevice[];
108
+ subscriptionPlan?: SubscriptionPlan | null;
109
+ _emailAddresses?: EmailAddress[];
110
+ _paymentPhoneNumbers?: PhoneNumber[];
111
+ _phoneNumbers?: PhoneNumber[];
112
+ _addresses?: Address[];
113
+ _users?: UserCompany[];
114
+ shipmentsAsSender?: Shipment[];
115
+ shipmentsAsReceiver?: Shipment[];
116
+ savedProducts?: Product[];
117
+ reminders?: Reminder[];
118
+ banks?: Bank[];
119
+ userCompanies?: UserCompany[];
120
+ companyInvitations?: CompanyInvitation[];
121
+ appliedJobs?: Job[];
122
+ carts?: Cart[];
123
+ domains?: Domain[];
124
+ accessibleDomainsAsClientCompany?: Domain[];
125
+ emailAddresses?: EmailAddress[];
126
+ phoneNumbers?: PhoneNumber[];
127
+ paymentPhoneNumbers?: PhoneNumber[];
128
+ invoicesHas?: Invoice[];
129
+ subscriptionInvoices?: Invoice[];
130
+ addresses?: Address[];
131
+ parentCompany?: Company | null;
132
+ childCompanies?: Company[];
133
+ private getCompanyId;
134
+ private analyticsRequest;
135
+ getAnalytics: () => Promise<CompanyAnalyticsResponse>;
136
+ getAgentTokenAnalytics: (queryParams?: Record<string, string | undefined>) => Promise<AgentTokenAnalyticsTimeseries>;
137
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,16 @@
1
+ import { Company } from './company.js';
2
+ import { Entity } from '../entity.js';
3
+ import { User } from './user.js';
4
+ export declare class CompanyInvitation extends Entity {
5
+ protected static resourceName: string;
6
+ protected static singularName: string;
7
+ protected static pluralName: string;
8
+ archived?: Date | null;
9
+ id?: number;
10
+ userName?: string;
11
+ userEmail?: string;
12
+ inviteAsAdmin?: boolean;
13
+ token?: string;
14
+ company?: Company;
15
+ sender?: User;
16
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ import { Company } from './company.js';
2
+ import { Entity } from '../entity.js';
3
+ import { Item } from './item.js';
4
+ import { Job } from './job.js';
5
+ import { Shipment } from './shipment.js';
6
+ export declare class CountryTax extends Entity {
7
+ protected static resourceName: string;
8
+ protected static singularName: string;
9
+ protected static pluralName: string;
10
+ archived?: Date | null;
11
+ id?: number;
12
+ country?: string | null;
13
+ taxName?: string;
14
+ taxPercent?: number | null;
15
+ shipments?: Shipment[];
16
+ company?: Company;
17
+ jobs?: Job[];
18
+ items?: Item[];
19
+ static getNoTax(): CountryTax;
20
+ }
@@ -0,0 +1 @@
1
+ export {};