@zippendo/sdk 1.2.3 → 1.2.5

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 (134) hide show
  1. package/dist/apis/OrderChannelsApi.d.ts +195 -0
  2. package/dist/apis/OrderChannelsApi.js +496 -0
  3. package/dist/apis/index.d.ts +1 -0
  4. package/dist/apis/index.js +1 -0
  5. package/dist/esm/apis/OrderChannelsApi.d.ts +195 -0
  6. package/dist/esm/apis/OrderChannelsApi.js +492 -0
  7. package/dist/esm/apis/index.d.ts +1 -0
  8. package/dist/esm/apis/index.js +1 -0
  9. package/dist/esm/models/BatchSendShipments200ResponseResultsInner.d.ts +1 -0
  10. package/dist/esm/models/BatchSendShipments200ResponseResultsInner.js +1 -0
  11. package/dist/esm/models/CreateOrderChannelRequest.d.ts +65 -0
  12. package/dist/esm/models/CreateOrderChannelRequest.js +61 -0
  13. package/dist/esm/models/CreateOrderChannelRequestSettings.d.ts +105 -0
  14. package/dist/esm/models/CreateOrderChannelRequestSettings.js +66 -0
  15. package/dist/esm/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.d.ts +52 -0
  16. package/dist/esm/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.js +56 -0
  17. package/dist/esm/models/CreateOrderChannelWebhookSecret201Response.d.ts +44 -0
  18. package/dist/esm/models/CreateOrderChannelWebhookSecret201Response.js +51 -0
  19. package/dist/esm/models/CreateOrderRequest.d.ts +12 -0
  20. package/dist/esm/models/CreateOrderRequest.js +4 -0
  21. package/dist/esm/models/GetOrderChannelWebhookStatus200Response.d.ts +45 -0
  22. package/dist/esm/models/GetOrderChannelWebhookStatus200Response.js +52 -0
  23. package/dist/esm/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.d.ts +62 -0
  24. package/dist/esm/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.js +59 -0
  25. package/dist/esm/models/ListApiTokens401Response.d.ts +1 -0
  26. package/dist/esm/models/ListApiTokens401Response.js +1 -0
  27. package/dist/esm/models/ListAvailableCarriers200ResponseInner.d.ts +12 -0
  28. package/dist/esm/models/ListAvailableCarriers200ResponseInner.js +4 -0
  29. package/dist/esm/models/ListCarriers200ResponseDataInner.d.ts +12 -0
  30. package/dist/esm/models/ListCarriers200ResponseDataInner.js +4 -0
  31. package/dist/esm/models/ListOrderChannels200Response.d.ts +57 -0
  32. package/dist/esm/models/ListOrderChannels200Response.js +60 -0
  33. package/dist/esm/models/ListOrderChannels200ResponseDataInner.d.ts +121 -0
  34. package/dist/esm/models/ListOrderChannels200ResponseDataInner.js +97 -0
  35. package/dist/esm/models/ListOrderChannels200ResponseDataInnerSettings.d.ts +129 -0
  36. package/dist/esm/models/ListOrderChannels200ResponseDataInnerSettings.js +86 -0
  37. package/dist/esm/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.d.ts +52 -0
  38. package/dist/esm/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.js +56 -0
  39. package/dist/esm/models/ListOrders200ResponseDataInnerOrderChannel.d.ts +1 -0
  40. package/dist/esm/models/ListOrders200ResponseDataInnerOrderChannel.js +2 -1
  41. package/dist/esm/models/RevokeOrderChannelWebhookSecret200Response.d.ts +32 -0
  42. package/dist/esm/models/RevokeOrderChannelWebhookSecret200Response.js +43 -0
  43. package/dist/esm/models/SendShipment422Response.d.ts +1 -0
  44. package/dist/esm/models/SendShipment422Response.js +1 -0
  45. package/dist/esm/models/UpdateOrderChannelRequest.d.ts +65 -0
  46. package/dist/esm/models/UpdateOrderChannelRequest.js +52 -0
  47. package/dist/esm/models/UpdateOrderChannelRequestSettings.d.ts +105 -0
  48. package/dist/esm/models/UpdateOrderChannelRequestSettings.js +66 -0
  49. package/dist/esm/models/index.d.ts +13 -0
  50. package/dist/esm/models/index.js +13 -0
  51. package/dist/models/BatchSendShipments200ResponseResultsInner.d.ts +1 -0
  52. package/dist/models/BatchSendShipments200ResponseResultsInner.js +1 -0
  53. package/dist/models/CreateOrderChannelRequest.d.ts +65 -0
  54. package/dist/models/CreateOrderChannelRequest.js +69 -0
  55. package/dist/models/CreateOrderChannelRequestSettings.d.ts +105 -0
  56. package/dist/models/CreateOrderChannelRequestSettings.js +73 -0
  57. package/dist/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.d.ts +52 -0
  58. package/dist/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.js +64 -0
  59. package/dist/models/CreateOrderChannelWebhookSecret201Response.d.ts +44 -0
  60. package/dist/models/CreateOrderChannelWebhookSecret201Response.js +58 -0
  61. package/dist/models/CreateOrderRequest.d.ts +12 -0
  62. package/dist/models/CreateOrderRequest.js +4 -0
  63. package/dist/models/GetOrderChannelWebhookStatus200Response.d.ts +45 -0
  64. package/dist/models/GetOrderChannelWebhookStatus200Response.js +59 -0
  65. package/dist/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.d.ts +62 -0
  66. package/dist/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.js +66 -0
  67. package/dist/models/ListApiTokens401Response.d.ts +1 -0
  68. package/dist/models/ListApiTokens401Response.js +1 -0
  69. package/dist/models/ListAvailableCarriers200ResponseInner.d.ts +12 -0
  70. package/dist/models/ListAvailableCarriers200ResponseInner.js +4 -0
  71. package/dist/models/ListCarriers200ResponseDataInner.d.ts +12 -0
  72. package/dist/models/ListCarriers200ResponseDataInner.js +4 -0
  73. package/dist/models/ListOrderChannels200Response.d.ts +57 -0
  74. package/dist/models/ListOrderChannels200Response.js +67 -0
  75. package/dist/models/ListOrderChannels200ResponseDataInner.d.ts +121 -0
  76. package/dist/models/ListOrderChannels200ResponseDataInner.js +105 -0
  77. package/dist/models/ListOrderChannels200ResponseDataInnerSettings.d.ts +129 -0
  78. package/dist/models/ListOrderChannels200ResponseDataInnerSettings.js +93 -0
  79. package/dist/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.d.ts +52 -0
  80. package/dist/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.js +64 -0
  81. package/dist/models/ListOrders200ResponseDataInnerOrderChannel.d.ts +1 -0
  82. package/dist/models/ListOrders200ResponseDataInnerOrderChannel.js +2 -1
  83. package/dist/models/RevokeOrderChannelWebhookSecret200Response.d.ts +32 -0
  84. package/dist/models/RevokeOrderChannelWebhookSecret200Response.js +50 -0
  85. package/dist/models/SendShipment422Response.d.ts +1 -0
  86. package/dist/models/SendShipment422Response.js +1 -0
  87. package/dist/models/UpdateOrderChannelRequest.d.ts +65 -0
  88. package/dist/models/UpdateOrderChannelRequest.js +59 -0
  89. package/dist/models/UpdateOrderChannelRequestSettings.d.ts +105 -0
  90. package/dist/models/UpdateOrderChannelRequestSettings.js +73 -0
  91. package/dist/models/index.d.ts +13 -0
  92. package/dist/models/index.js +13 -0
  93. package/docs/CreateOrderChannelRequest.md +42 -0
  94. package/docs/CreateOrderChannelRequestSettings.md +58 -0
  95. package/docs/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.md +38 -0
  96. package/docs/CreateOrderChannelWebhookSecret201Response.md +38 -0
  97. package/docs/CreateOrderRequest.md +4 -0
  98. package/docs/GetOrderChannelWebhookStatus200Response.md +38 -0
  99. package/docs/GetOrderChannelWebhookStatus200ResponseWebhooksInner.md +44 -0
  100. package/docs/ListAvailableCarriers200ResponseInner.md +4 -0
  101. package/docs/ListCarriers200ResponseDataInner.md +4 -0
  102. package/docs/ListOrderChannels200Response.md +42 -0
  103. package/docs/ListOrderChannels200ResponseDataInner.md +60 -0
  104. package/docs/ListOrderChannels200ResponseDataInnerSettings.md +67 -0
  105. package/docs/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.md +38 -0
  106. package/docs/OrderChannelsApi.md +650 -0
  107. package/docs/OrdersApi.md +1 -0
  108. package/docs/RevokeOrderChannelWebhookSecret200Response.md +34 -0
  109. package/docs/UpdateOrderChannelRequest.md +44 -0
  110. package/docs/UpdateOrderChannelRequestSettings.md +59 -0
  111. package/package.json +1 -1
  112. package/src/apis/OrderChannelsApi.ts +670 -0
  113. package/src/apis/index.ts +1 -0
  114. package/src/models/BatchSendShipments200ResponseResultsInner.ts +1 -0
  115. package/src/models/CreateOrderChannelRequest.ts +118 -0
  116. package/src/models/CreateOrderChannelRequestSettings.ts +169 -0
  117. package/src/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.ts +94 -0
  118. package/src/models/CreateOrderChannelWebhookSecret201Response.ts +84 -0
  119. package/src/models/CreateOrderRequest.ts +16 -0
  120. package/src/models/GetOrderChannelWebhookStatus200Response.ts +92 -0
  121. package/src/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.ts +109 -0
  122. package/src/models/ListApiTokens401Response.ts +1 -0
  123. package/src/models/ListAvailableCarriers200ResponseInner.ts +16 -0
  124. package/src/models/ListCarriers200ResponseDataInner.ts +16 -0
  125. package/src/models/ListOrderChannels200Response.ts +110 -0
  126. package/src/models/ListOrderChannels200ResponseDataInner.ts +200 -0
  127. package/src/models/ListOrderChannels200ResponseDataInnerSettings.ts +207 -0
  128. package/src/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.ts +94 -0
  129. package/src/models/ListOrders200ResponseDataInnerOrderChannel.ts +2 -1
  130. package/src/models/RevokeOrderChannelWebhookSecret200Response.ts +66 -0
  131. package/src/models/SendShipment422Response.ts +1 -0
  132. package/src/models/UpdateOrderChannelRequest.ts +113 -0
  133. package/src/models/UpdateOrderChannelRequestSettings.ts +169 -0
  134. package/src/models/index.ts +13 -0
@@ -0,0 +1,207 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Zippendo Public API
5
+ * Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@zippendo.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner } from './ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner';
17
+ import {
18
+ ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerFromJSON,
19
+ ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerFromJSONTyped,
20
+ ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerToJSON,
21
+ ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerToJSONTyped,
22
+ } from './ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner';
23
+
24
+ /**
25
+ * Channel settings (webhook secret and checkout token hash omitted).
26
+ * @export
27
+ * @interface ListOrderChannels200ResponseDataInnerSettings
28
+ */
29
+ export interface ListOrderChannels200ResponseDataInnerSettings {
30
+ /**
31
+ * Use webhooks for real-time order sync.
32
+ * @type {boolean}
33
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
34
+ */
35
+ useWebhooks: boolean;
36
+ /**
37
+ * External webhook identifier for management.
38
+ * @type {string}
39
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
40
+ */
41
+ webhookId?: string | null;
42
+ /**
43
+ * Registered WooCommerce webhook ids.
44
+ * @type {Array<number>}
45
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
46
+ */
47
+ webhookIds?: Array<number>;
48
+ /**
49
+ * When the custom channel's webhook signing secret was issued. A non-secret signal so clients can show that a secret exists; the secret itself is never returned after creation.
50
+ * @type {Date}
51
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
52
+ */
53
+ webhookSecretCreatedAt?: Date | null;
54
+ /**
55
+ * WooCommerce store URL.
56
+ * @type {string}
57
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
58
+ */
59
+ siteUrl?: string;
60
+ /**
61
+ * Push tracking back to the platform when a shipment is dispatched. Enabled by default (opt-out) — set to false to disable write-back; an unset value still syncs.
62
+ * @type {boolean}
63
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
64
+ */
65
+ autoFulfill?: boolean;
66
+ /**
67
+ * When the checkout token was issued (internal; never exposed in API responses).
68
+ * @type {Date}
69
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
70
+ */
71
+ checkoutTokenCreatedAt?: Date | null;
72
+ /**
73
+ * Periodically poll the channel for new orders.
74
+ * @type {boolean}
75
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
76
+ */
77
+ autoSync: boolean;
78
+ /**
79
+ * Polling interval in minutes (5-1440).
80
+ * @type {number}
81
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
82
+ */
83
+ syncIntervalMinutes: number;
84
+ /**
85
+ * Create a shipment automatically when an order arrives.
86
+ * @type {boolean}
87
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
88
+ */
89
+ autoShipOnCreate: boolean;
90
+ /**
91
+ * Default carrier ID for auto-shipping.
92
+ * @type {string}
93
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
94
+ */
95
+ defaultCarrierId?: string | null;
96
+ /**
97
+ * Default carrier product ID for auto-shipping.
98
+ * @type {string}
99
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
100
+ */
101
+ defaultProductId?: string | null;
102
+ /**
103
+ * Default sender address ID for auto-shipping.
104
+ * @type {string}
105
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
106
+ */
107
+ defaultAddressId?: string | null;
108
+ /**
109
+ * Map imported shipping-method titles to shipping rules, for channels without checkout rate integration.
110
+ * @type {Array<ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner>}
111
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
112
+ */
113
+ shippingMethodMappings?: Array<ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner>;
114
+ /**
115
+ * Only import orders that are not yet fulfilled.
116
+ * @type {boolean}
117
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
118
+ */
119
+ syncOnlyUnfulfilled: boolean;
120
+ /**
121
+ * Only sync orders placed at or after this timestamp.
122
+ * @type {Date}
123
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
124
+ */
125
+ syncOrdersSince?: Date | null;
126
+ /**
127
+ * Number of service points to show at checkout (1-20).
128
+ * @type {number}
129
+ * @memberof ListOrderChannels200ResponseDataInnerSettings
130
+ */
131
+ servicePointCount: number;
132
+ }
133
+
134
+ /**
135
+ * Check if a given object implements the ListOrderChannels200ResponseDataInnerSettings interface.
136
+ */
137
+ export function instanceOfListOrderChannels200ResponseDataInnerSettings(value: object): value is ListOrderChannels200ResponseDataInnerSettings {
138
+ if (!('useWebhooks' in value) || value['useWebhooks'] === undefined) return false;
139
+ if (!('autoSync' in value) || value['autoSync'] === undefined) return false;
140
+ if (!('syncIntervalMinutes' in value) || value['syncIntervalMinutes'] === undefined) return false;
141
+ if (!('autoShipOnCreate' in value) || value['autoShipOnCreate'] === undefined) return false;
142
+ if (!('syncOnlyUnfulfilled' in value) || value['syncOnlyUnfulfilled'] === undefined) return false;
143
+ if (!('servicePointCount' in value) || value['servicePointCount'] === undefined) return false;
144
+ return true;
145
+ }
146
+
147
+ export function ListOrderChannels200ResponseDataInnerSettingsFromJSON(json: any): ListOrderChannels200ResponseDataInnerSettings {
148
+ return ListOrderChannels200ResponseDataInnerSettingsFromJSONTyped(json, false);
149
+ }
150
+
151
+ export function ListOrderChannels200ResponseDataInnerSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListOrderChannels200ResponseDataInnerSettings {
152
+ if (json == null) {
153
+ return json;
154
+ }
155
+ return {
156
+
157
+ 'useWebhooks': json['useWebhooks'],
158
+ 'webhookId': json['webhookId'] === undefined ? undefined : json['webhookId'] === null ? null : json['webhookId'],
159
+ 'webhookIds': json['webhookIds'] == null ? undefined : json['webhookIds'],
160
+ 'webhookSecretCreatedAt': json['webhookSecretCreatedAt'] === undefined ? undefined : json['webhookSecretCreatedAt'] === null ? null : (new Date(json['webhookSecretCreatedAt'])),
161
+ 'siteUrl': json['siteUrl'] == null ? undefined : json['siteUrl'],
162
+ 'autoFulfill': json['autoFulfill'] == null ? undefined : json['autoFulfill'],
163
+ 'checkoutTokenCreatedAt': json['checkoutTokenCreatedAt'] === undefined ? undefined : json['checkoutTokenCreatedAt'] === null ? null : (new Date(json['checkoutTokenCreatedAt'])),
164
+ 'autoSync': json['autoSync'],
165
+ 'syncIntervalMinutes': json['syncIntervalMinutes'],
166
+ 'autoShipOnCreate': json['autoShipOnCreate'],
167
+ 'defaultCarrierId': json['defaultCarrierId'] === undefined ? undefined : json['defaultCarrierId'] === null ? null : json['defaultCarrierId'],
168
+ 'defaultProductId': json['defaultProductId'] === undefined ? undefined : json['defaultProductId'] === null ? null : json['defaultProductId'],
169
+ 'defaultAddressId': json['defaultAddressId'] === undefined ? undefined : json['defaultAddressId'] === null ? null : json['defaultAddressId'],
170
+ 'shippingMethodMappings': json['shippingMethodMappings'] == null ? undefined : ((json['shippingMethodMappings'] as Array<any>).map(ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerFromJSON)),
171
+ 'syncOnlyUnfulfilled': json['syncOnlyUnfulfilled'],
172
+ 'syncOrdersSince': json['syncOrdersSince'] === undefined ? undefined : json['syncOrdersSince'] === null ? null : (new Date(json['syncOrdersSince'])),
173
+ 'servicePointCount': json['servicePointCount'],
174
+ };
175
+ }
176
+
177
+ export function ListOrderChannels200ResponseDataInnerSettingsToJSON(json: any): ListOrderChannels200ResponseDataInnerSettings {
178
+ return ListOrderChannels200ResponseDataInnerSettingsToJSONTyped(json, false);
179
+ }
180
+
181
+ export function ListOrderChannels200ResponseDataInnerSettingsToJSONTyped(value?: ListOrderChannels200ResponseDataInnerSettings | null, ignoreDiscriminator: boolean = false): any {
182
+ if (value == null) {
183
+ return value;
184
+ }
185
+
186
+ return {
187
+
188
+ 'useWebhooks': value['useWebhooks'],
189
+ 'webhookId': value['webhookId'],
190
+ 'webhookIds': value['webhookIds'],
191
+ 'webhookSecretCreatedAt': value['webhookSecretCreatedAt'] == null ? value['webhookSecretCreatedAt'] : value['webhookSecretCreatedAt'].toISOString(),
192
+ 'siteUrl': value['siteUrl'],
193
+ 'autoFulfill': value['autoFulfill'],
194
+ 'checkoutTokenCreatedAt': value['checkoutTokenCreatedAt'] == null ? value['checkoutTokenCreatedAt'] : value['checkoutTokenCreatedAt'].toISOString(),
195
+ 'autoSync': value['autoSync'],
196
+ 'syncIntervalMinutes': value['syncIntervalMinutes'],
197
+ 'autoShipOnCreate': value['autoShipOnCreate'],
198
+ 'defaultCarrierId': value['defaultCarrierId'],
199
+ 'defaultProductId': value['defaultProductId'],
200
+ 'defaultAddressId': value['defaultAddressId'],
201
+ 'shippingMethodMappings': value['shippingMethodMappings'] == null ? undefined : ((value['shippingMethodMappings'] as Array<any>).map(ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerToJSON)),
202
+ 'syncOnlyUnfulfilled': value['syncOnlyUnfulfilled'],
203
+ 'syncOrdersSince': value['syncOrdersSince'] == null ? value['syncOrdersSince'] : value['syncOrdersSince'].toISOString(),
204
+ 'servicePointCount': value['servicePointCount'],
205
+ };
206
+ }
207
+
@@ -0,0 +1,94 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Zippendo Public API
5
+ * Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@zippendo.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner
20
+ */
21
+ export interface ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner {
22
+ /**
23
+ * Shipping-method title to match against imported orders (trimmed, case-insensitive, exact).
24
+ * @type {string}
25
+ * @memberof ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner
26
+ */
27
+ match: string;
28
+ /**
29
+ * Shipping rule applied to orders whose shipping-method title matches.
30
+ * @type {string}
31
+ * @memberof ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner
32
+ */
33
+ shippingRuleId: string;
34
+ /**
35
+ * For rules whose product delivers to a service point: 'nearest' auto-selects the closest point to the recipient address; 'manual' keeps the shipment in draft for manual selection.
36
+ * @type {ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerServicePointSelectionEnum}
37
+ * @memberof ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner
38
+ */
39
+ servicePointSelection?: ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerServicePointSelectionEnum;
40
+ }
41
+
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerServicePointSelectionEnum = {
47
+ Nearest: 'nearest',
48
+ Manual: 'manual'
49
+ } as const;
50
+ export type ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerServicePointSelectionEnum = typeof ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerServicePointSelectionEnum[keyof typeof ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerServicePointSelectionEnum];
51
+
52
+
53
+ /**
54
+ * Check if a given object implements the ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner interface.
55
+ */
56
+ export function instanceOfListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner(value: object): value is ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner {
57
+ if (!('match' in value) || value['match'] === undefined) return false;
58
+ if (!('shippingRuleId' in value) || value['shippingRuleId'] === undefined) return false;
59
+ return true;
60
+ }
61
+
62
+ export function ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerFromJSON(json: any): ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner {
63
+ return ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerFromJSONTyped(json, false);
64
+ }
65
+
66
+ export function ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner {
67
+ if (json == null) {
68
+ return json;
69
+ }
70
+ return {
71
+
72
+ 'match': json['match'],
73
+ 'shippingRuleId': json['shippingRuleId'],
74
+ 'servicePointSelection': json['servicePointSelection'] == null ? undefined : json['servicePointSelection'],
75
+ };
76
+ }
77
+
78
+ export function ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerToJSON(json: any): ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner {
79
+ return ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerToJSONTyped(json, false);
80
+ }
81
+
82
+ export function ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInnerToJSONTyped(value?: ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner | null, ignoreDiscriminator: boolean = false): any {
83
+ if (value == null) {
84
+ return value;
85
+ }
86
+
87
+ return {
88
+
89
+ 'match': value['match'],
90
+ 'shippingRuleId': value['shippingRuleId'],
91
+ 'servicePointSelection': value['servicePointSelection'],
92
+ };
93
+ }
94
+
@@ -46,7 +46,8 @@ export interface ListOrders200ResponseDataInnerOrderChannel {
46
46
  export const ListOrders200ResponseDataInnerOrderChannelTypeEnum = {
47
47
  Shopify: 'shopify',
48
48
  Woocommerce: 'woocommerce',
49
- Manual: 'manual'
49
+ Manual: 'manual',
50
+ Custom: 'custom'
50
51
  } as const;
51
52
  export type ListOrders200ResponseDataInnerOrderChannelTypeEnum = typeof ListOrders200ResponseDataInnerOrderChannelTypeEnum[keyof typeof ListOrders200ResponseDataInnerOrderChannelTypeEnum];
52
53
 
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Zippendo Public API
5
+ * Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@zippendo.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface RevokeOrderChannelWebhookSecret200Response
20
+ */
21
+ export interface RevokeOrderChannelWebhookSecret200Response {
22
+ /**
23
+ * Whether the signing secret was revoked.
24
+ * @type {boolean}
25
+ * @memberof RevokeOrderChannelWebhookSecret200Response
26
+ */
27
+ revoked: boolean;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the RevokeOrderChannelWebhookSecret200Response interface.
32
+ */
33
+ export function instanceOfRevokeOrderChannelWebhookSecret200Response(value: object): value is RevokeOrderChannelWebhookSecret200Response {
34
+ if (!('revoked' in value) || value['revoked'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function RevokeOrderChannelWebhookSecret200ResponseFromJSON(json: any): RevokeOrderChannelWebhookSecret200Response {
39
+ return RevokeOrderChannelWebhookSecret200ResponseFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function RevokeOrderChannelWebhookSecret200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RevokeOrderChannelWebhookSecret200Response {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'revoked': json['revoked'],
49
+ };
50
+ }
51
+
52
+ export function RevokeOrderChannelWebhookSecret200ResponseToJSON(json: any): RevokeOrderChannelWebhookSecret200Response {
53
+ return RevokeOrderChannelWebhookSecret200ResponseToJSONTyped(json, false);
54
+ }
55
+
56
+ export function RevokeOrderChannelWebhookSecret200ResponseToJSONTyped(value?: RevokeOrderChannelWebhookSecret200Response | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'revoked': value['revoked'],
64
+ };
65
+ }
66
+
@@ -153,6 +153,7 @@ export const SendShipment422ResponseCodeEnum = {
153
153
  ShippingRuleInvalid: 'SHIPPING_RULE_INVALID',
154
154
  AddressNotFound: 'ADDRESS_NOT_FOUND',
155
155
  OrderNotFound: 'ORDER_NOT_FOUND',
156
+ OrderExists: 'ORDER_EXISTS',
156
157
  OrderChannelNotFound: 'ORDER_CHANNEL_NOT_FOUND',
157
158
  OrderChannelConfigInvalid: 'ORDER_CHANNEL_CONFIG_INVALID',
158
159
  IntegrationNotConfigured: 'INTEGRATION_NOT_CONFIGURED',
@@ -0,0 +1,113 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Zippendo Public API
5
+ * Public API documentation for Zippendo. Authenticate using your API token (Bearer token prefixed with zipp_). **Brands (sub-accounts).** An organization can be split into brands, each keeping its own orders, shipments and configuration separate. There are two ways to scope requests to one brand, and NEITHER changes any request body: 1. **Bind the token.** Create an API token with a `brandId` and every request it makes is confined to that brand — reads filtered, writes stamped. This is the recommended way to give a single brand\'s team its own credential. 2. **Send the `X-Zippendo-Brand` header.** An organization-wide token can scope an individual request by sending the brand\'s id or slug in this header. Most SDKs let you set it once on the client so every call inherits it. A brand-bound token that receives an `X-Zippendo-Brand` header naming a different brand is rejected with `403 BRAND_ACCESS_DENIED` — the binding is never widened. Omit both and requests cover the whole organization, which is the behaviour of every existing token. Records that belong to no brand carry `brandId: null`. Configuration (carriers, shipping rules, addresses) with a null brand is organization-wide and remains visible inside every brand; orders and shipments with a null brand are only visible organization-wide. List endpoints additionally take a `?brandScope=own|shared|both` parameter to narrow further within whichever brand context already applies. `own` returns only rows assigned to that brand, and requires a brand context — a brand-bound token, a resolved brand session, or the `X-Zippendo-Brand` header above — otherwise `400`. `shared` returns only the organization-wide rows (equivalent to filtering `brandId=none`). The default, `both`, keeps the existing behaviour: a brand context sees its own rows plus the organization-wide ones. Set `X-Zippendo-Brand-Scope` as a client default to apply the same choice to every request instead of repeating the query parameter on each call — an explicit `brandScope` query parameter always wins over the header, and a blank header value is ignored. Brands themselves are managed under the **Brands** tag. Retiring a brand is done with `POST /orgs/{orgId}/brands/{brandId}/archive` — permanent deletion is a dashboard-only action, since it is refused while any order, shipment, member or token still references the brand. Brands require a plan that includes them; creating one beyond your plan\'s limit returns `403`.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ * Contact: support@zippendo.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { UpdateOrderChannelRequestSettings } from './UpdateOrderChannelRequestSettings';
17
+ import {
18
+ UpdateOrderChannelRequestSettingsFromJSON,
19
+ UpdateOrderChannelRequestSettingsFromJSONTyped,
20
+ UpdateOrderChannelRequestSettingsToJSON,
21
+ UpdateOrderChannelRequestSettingsToJSONTyped,
22
+ } from './UpdateOrderChannelRequestSettings';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface UpdateOrderChannelRequest
28
+ */
29
+ export interface UpdateOrderChannelRequest {
30
+ /**
31
+ * Brand this channel belongs to; null for organization-wide
32
+ * @type {string}
33
+ * @memberof UpdateOrderChannelRequest
34
+ */
35
+ brandId?: string | null;
36
+ /**
37
+ * Display name for the channel.
38
+ * @type {string}
39
+ * @memberof UpdateOrderChannelRequest
40
+ */
41
+ name?: string;
42
+ /**
43
+ * Whether the channel is active.
44
+ * @type {boolean}
45
+ * @memberof UpdateOrderChannelRequest
46
+ */
47
+ enabled?: boolean;
48
+ /**
49
+ * Type-specific platform credentials.
50
+ * @type {{ [key: string]: any; }}
51
+ * @memberof UpdateOrderChannelRequest
52
+ */
53
+ credentials?: { [key: string]: any; } | null;
54
+ /**
55
+ *
56
+ * @type {UpdateOrderChannelRequestSettings}
57
+ * @memberof UpdateOrderChannelRequest
58
+ */
59
+ settings?: UpdateOrderChannelRequestSettings;
60
+ /**
61
+ * IDs of shipping rules linked to this channel.
62
+ * @type {Array<string>}
63
+ * @memberof UpdateOrderChannelRequest
64
+ */
65
+ shippingRuleIds?: Array<string>;
66
+ }
67
+
68
+ /**
69
+ * Check if a given object implements the UpdateOrderChannelRequest interface.
70
+ */
71
+ export function instanceOfUpdateOrderChannelRequest(value: object): value is UpdateOrderChannelRequest {
72
+ return true;
73
+ }
74
+
75
+ export function UpdateOrderChannelRequestFromJSON(json: any): UpdateOrderChannelRequest {
76
+ return UpdateOrderChannelRequestFromJSONTyped(json, false);
77
+ }
78
+
79
+ export function UpdateOrderChannelRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateOrderChannelRequest {
80
+ if (json == null) {
81
+ return json;
82
+ }
83
+ return {
84
+
85
+ 'brandId': json['brandId'] === undefined ? undefined : json['brandId'] === null ? null : json['brandId'],
86
+ 'name': json['name'] == null ? undefined : json['name'],
87
+ 'enabled': json['enabled'] == null ? undefined : json['enabled'],
88
+ 'credentials': json['credentials'] === undefined ? undefined : json['credentials'] === null ? null : json['credentials'],
89
+ 'settings': json['settings'] == null ? undefined : UpdateOrderChannelRequestSettingsFromJSON(json['settings']),
90
+ 'shippingRuleIds': json['shippingRuleIds'] == null ? undefined : json['shippingRuleIds'],
91
+ };
92
+ }
93
+
94
+ export function UpdateOrderChannelRequestToJSON(json: any): UpdateOrderChannelRequest {
95
+ return UpdateOrderChannelRequestToJSONTyped(json, false);
96
+ }
97
+
98
+ export function UpdateOrderChannelRequestToJSONTyped(value?: UpdateOrderChannelRequest | null, ignoreDiscriminator: boolean = false): any {
99
+ if (value == null) {
100
+ return value;
101
+ }
102
+
103
+ return {
104
+
105
+ 'brandId': value['brandId'],
106
+ 'name': value['name'],
107
+ 'enabled': value['enabled'],
108
+ 'credentials': value['credentials'],
109
+ 'settings': UpdateOrderChannelRequestSettingsToJSON(value['settings']),
110
+ 'shippingRuleIds': value['shippingRuleIds'],
111
+ };
112
+ }
113
+