@zippendo/sdk 1.2.4 → 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 (122) 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/ListOrderChannels200Response.d.ts +57 -0
  28. package/dist/esm/models/ListOrderChannels200Response.js +60 -0
  29. package/dist/esm/models/ListOrderChannels200ResponseDataInner.d.ts +121 -0
  30. package/dist/esm/models/ListOrderChannels200ResponseDataInner.js +97 -0
  31. package/dist/esm/models/ListOrderChannels200ResponseDataInnerSettings.d.ts +129 -0
  32. package/dist/esm/models/ListOrderChannels200ResponseDataInnerSettings.js +86 -0
  33. package/dist/esm/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.d.ts +52 -0
  34. package/dist/esm/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.js +56 -0
  35. package/dist/esm/models/ListOrders200ResponseDataInnerOrderChannel.d.ts +1 -0
  36. package/dist/esm/models/ListOrders200ResponseDataInnerOrderChannel.js +2 -1
  37. package/dist/esm/models/RevokeOrderChannelWebhookSecret200Response.d.ts +32 -0
  38. package/dist/esm/models/RevokeOrderChannelWebhookSecret200Response.js +43 -0
  39. package/dist/esm/models/SendShipment422Response.d.ts +1 -0
  40. package/dist/esm/models/SendShipment422Response.js +1 -0
  41. package/dist/esm/models/UpdateOrderChannelRequest.d.ts +65 -0
  42. package/dist/esm/models/UpdateOrderChannelRequest.js +52 -0
  43. package/dist/esm/models/UpdateOrderChannelRequestSettings.d.ts +105 -0
  44. package/dist/esm/models/UpdateOrderChannelRequestSettings.js +66 -0
  45. package/dist/esm/models/index.d.ts +13 -0
  46. package/dist/esm/models/index.js +13 -0
  47. package/dist/models/BatchSendShipments200ResponseResultsInner.d.ts +1 -0
  48. package/dist/models/BatchSendShipments200ResponseResultsInner.js +1 -0
  49. package/dist/models/CreateOrderChannelRequest.d.ts +65 -0
  50. package/dist/models/CreateOrderChannelRequest.js +69 -0
  51. package/dist/models/CreateOrderChannelRequestSettings.d.ts +105 -0
  52. package/dist/models/CreateOrderChannelRequestSettings.js +73 -0
  53. package/dist/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.d.ts +52 -0
  54. package/dist/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.js +64 -0
  55. package/dist/models/CreateOrderChannelWebhookSecret201Response.d.ts +44 -0
  56. package/dist/models/CreateOrderChannelWebhookSecret201Response.js +58 -0
  57. package/dist/models/CreateOrderRequest.d.ts +12 -0
  58. package/dist/models/CreateOrderRequest.js +4 -0
  59. package/dist/models/GetOrderChannelWebhookStatus200Response.d.ts +45 -0
  60. package/dist/models/GetOrderChannelWebhookStatus200Response.js +59 -0
  61. package/dist/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.d.ts +62 -0
  62. package/dist/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.js +66 -0
  63. package/dist/models/ListApiTokens401Response.d.ts +1 -0
  64. package/dist/models/ListApiTokens401Response.js +1 -0
  65. package/dist/models/ListOrderChannels200Response.d.ts +57 -0
  66. package/dist/models/ListOrderChannels200Response.js +67 -0
  67. package/dist/models/ListOrderChannels200ResponseDataInner.d.ts +121 -0
  68. package/dist/models/ListOrderChannels200ResponseDataInner.js +105 -0
  69. package/dist/models/ListOrderChannels200ResponseDataInnerSettings.d.ts +129 -0
  70. package/dist/models/ListOrderChannels200ResponseDataInnerSettings.js +93 -0
  71. package/dist/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.d.ts +52 -0
  72. package/dist/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.js +64 -0
  73. package/dist/models/ListOrders200ResponseDataInnerOrderChannel.d.ts +1 -0
  74. package/dist/models/ListOrders200ResponseDataInnerOrderChannel.js +2 -1
  75. package/dist/models/RevokeOrderChannelWebhookSecret200Response.d.ts +32 -0
  76. package/dist/models/RevokeOrderChannelWebhookSecret200Response.js +50 -0
  77. package/dist/models/SendShipment422Response.d.ts +1 -0
  78. package/dist/models/SendShipment422Response.js +1 -0
  79. package/dist/models/UpdateOrderChannelRequest.d.ts +65 -0
  80. package/dist/models/UpdateOrderChannelRequest.js +59 -0
  81. package/dist/models/UpdateOrderChannelRequestSettings.d.ts +105 -0
  82. package/dist/models/UpdateOrderChannelRequestSettings.js +73 -0
  83. package/dist/models/index.d.ts +13 -0
  84. package/dist/models/index.js +13 -0
  85. package/docs/CreateOrderChannelRequest.md +42 -0
  86. package/docs/CreateOrderChannelRequestSettings.md +58 -0
  87. package/docs/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.md +38 -0
  88. package/docs/CreateOrderChannelWebhookSecret201Response.md +38 -0
  89. package/docs/CreateOrderRequest.md +4 -0
  90. package/docs/GetOrderChannelWebhookStatus200Response.md +38 -0
  91. package/docs/GetOrderChannelWebhookStatus200ResponseWebhooksInner.md +44 -0
  92. package/docs/ListOrderChannels200Response.md +42 -0
  93. package/docs/ListOrderChannels200ResponseDataInner.md +60 -0
  94. package/docs/ListOrderChannels200ResponseDataInnerSettings.md +67 -0
  95. package/docs/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.md +38 -0
  96. package/docs/OrderChannelsApi.md +650 -0
  97. package/docs/OrdersApi.md +1 -0
  98. package/docs/RevokeOrderChannelWebhookSecret200Response.md +34 -0
  99. package/docs/UpdateOrderChannelRequest.md +44 -0
  100. package/docs/UpdateOrderChannelRequestSettings.md +59 -0
  101. package/package.json +1 -1
  102. package/src/apis/OrderChannelsApi.ts +670 -0
  103. package/src/apis/index.ts +1 -0
  104. package/src/models/BatchSendShipments200ResponseResultsInner.ts +1 -0
  105. package/src/models/CreateOrderChannelRequest.ts +118 -0
  106. package/src/models/CreateOrderChannelRequestSettings.ts +169 -0
  107. package/src/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.ts +94 -0
  108. package/src/models/CreateOrderChannelWebhookSecret201Response.ts +84 -0
  109. package/src/models/CreateOrderRequest.ts +16 -0
  110. package/src/models/GetOrderChannelWebhookStatus200Response.ts +92 -0
  111. package/src/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.ts +109 -0
  112. package/src/models/ListApiTokens401Response.ts +1 -0
  113. package/src/models/ListOrderChannels200Response.ts +110 -0
  114. package/src/models/ListOrderChannels200ResponseDataInner.ts +200 -0
  115. package/src/models/ListOrderChannels200ResponseDataInnerSettings.ts +207 -0
  116. package/src/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.ts +94 -0
  117. package/src/models/ListOrders200ResponseDataInnerOrderChannel.ts +2 -1
  118. package/src/models/RevokeOrderChannelWebhookSecret200Response.ts +66 -0
  119. package/src/models/SendShipment422Response.ts +1 -0
  120. package/src/models/UpdateOrderChannelRequest.ts +113 -0
  121. package/src/models/UpdateOrderChannelRequestSettings.ts +169 -0
  122. package/src/models/index.ts +13 -0
@@ -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
+
@@ -0,0 +1,169 @@
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 { CreateOrderChannelRequestSettingsShippingMethodMappingsInner } from './CreateOrderChannelRequestSettingsShippingMethodMappingsInner';
17
+ import {
18
+ CreateOrderChannelRequestSettingsShippingMethodMappingsInnerFromJSON,
19
+ CreateOrderChannelRequestSettingsShippingMethodMappingsInnerFromJSONTyped,
20
+ CreateOrderChannelRequestSettingsShippingMethodMappingsInnerToJSON,
21
+ CreateOrderChannelRequestSettingsShippingMethodMappingsInnerToJSONTyped,
22
+ } from './CreateOrderChannelRequestSettingsShippingMethodMappingsInner';
23
+
24
+ /**
25
+ * Partial channel settings to merge into existing settings. Server-managed fields (webhook secret/ids, checkout token) cannot be set here.
26
+ * @export
27
+ * @interface UpdateOrderChannelRequestSettings
28
+ */
29
+ export interface UpdateOrderChannelRequestSettings {
30
+ /**
31
+ * Use webhooks for real-time order sync.
32
+ * @type {boolean}
33
+ * @memberof UpdateOrderChannelRequestSettings
34
+ */
35
+ useWebhooks?: boolean;
36
+ /**
37
+ * WooCommerce store URL.
38
+ * @type {string}
39
+ * @memberof UpdateOrderChannelRequestSettings
40
+ */
41
+ siteUrl?: string;
42
+ /**
43
+ * 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.
44
+ * @type {boolean}
45
+ * @memberof UpdateOrderChannelRequestSettings
46
+ */
47
+ autoFulfill?: boolean;
48
+ /**
49
+ * Periodically poll the channel for new orders.
50
+ * @type {boolean}
51
+ * @memberof UpdateOrderChannelRequestSettings
52
+ */
53
+ autoSync?: boolean;
54
+ /**
55
+ * Polling interval in minutes (5-1440).
56
+ * @type {number}
57
+ * @memberof UpdateOrderChannelRequestSettings
58
+ */
59
+ syncIntervalMinutes?: number;
60
+ /**
61
+ * Create a shipment automatically when an order arrives.
62
+ * @type {boolean}
63
+ * @memberof UpdateOrderChannelRequestSettings
64
+ */
65
+ autoShipOnCreate?: boolean;
66
+ /**
67
+ * Default carrier ID for auto-shipping.
68
+ * @type {string}
69
+ * @memberof UpdateOrderChannelRequestSettings
70
+ */
71
+ defaultCarrierId?: string | null;
72
+ /**
73
+ * Default carrier product ID for auto-shipping.
74
+ * @type {string}
75
+ * @memberof UpdateOrderChannelRequestSettings
76
+ */
77
+ defaultProductId?: string | null;
78
+ /**
79
+ * Default sender address ID for auto-shipping.
80
+ * @type {string}
81
+ * @memberof UpdateOrderChannelRequestSettings
82
+ */
83
+ defaultAddressId?: string | null;
84
+ /**
85
+ * Map imported shipping-method titles to shipping rules, for channels without checkout rate integration.
86
+ * @type {Array<CreateOrderChannelRequestSettingsShippingMethodMappingsInner>}
87
+ * @memberof UpdateOrderChannelRequestSettings
88
+ */
89
+ shippingMethodMappings?: Array<CreateOrderChannelRequestSettingsShippingMethodMappingsInner>;
90
+ /**
91
+ * Only import orders that are not yet fulfilled.
92
+ * @type {boolean}
93
+ * @memberof UpdateOrderChannelRequestSettings
94
+ */
95
+ syncOnlyUnfulfilled?: boolean;
96
+ /**
97
+ * Only sync orders placed at or after this timestamp.
98
+ * @type {Date}
99
+ * @memberof UpdateOrderChannelRequestSettings
100
+ */
101
+ syncOrdersSince?: Date | null;
102
+ /**
103
+ * Number of service points to show at checkout (1-20).
104
+ * @type {number}
105
+ * @memberof UpdateOrderChannelRequestSettings
106
+ */
107
+ servicePointCount?: number;
108
+ }
109
+
110
+ /**
111
+ * Check if a given object implements the UpdateOrderChannelRequestSettings interface.
112
+ */
113
+ export function instanceOfUpdateOrderChannelRequestSettings(value: object): value is UpdateOrderChannelRequestSettings {
114
+ return true;
115
+ }
116
+
117
+ export function UpdateOrderChannelRequestSettingsFromJSON(json: any): UpdateOrderChannelRequestSettings {
118
+ return UpdateOrderChannelRequestSettingsFromJSONTyped(json, false);
119
+ }
120
+
121
+ export function UpdateOrderChannelRequestSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateOrderChannelRequestSettings {
122
+ if (json == null) {
123
+ return json;
124
+ }
125
+ return {
126
+
127
+ 'useWebhooks': json['useWebhooks'] == null ? undefined : json['useWebhooks'],
128
+ 'siteUrl': json['siteUrl'] == null ? undefined : json['siteUrl'],
129
+ 'autoFulfill': json['autoFulfill'] == null ? undefined : json['autoFulfill'],
130
+ 'autoSync': json['autoSync'] == null ? undefined : json['autoSync'],
131
+ 'syncIntervalMinutes': json['syncIntervalMinutes'] == null ? undefined : json['syncIntervalMinutes'],
132
+ 'autoShipOnCreate': json['autoShipOnCreate'] == null ? undefined : json['autoShipOnCreate'],
133
+ 'defaultCarrierId': json['defaultCarrierId'] === undefined ? undefined : json['defaultCarrierId'] === null ? null : json['defaultCarrierId'],
134
+ 'defaultProductId': json['defaultProductId'] === undefined ? undefined : json['defaultProductId'] === null ? null : json['defaultProductId'],
135
+ 'defaultAddressId': json['defaultAddressId'] === undefined ? undefined : json['defaultAddressId'] === null ? null : json['defaultAddressId'],
136
+ 'shippingMethodMappings': json['shippingMethodMappings'] == null ? undefined : ((json['shippingMethodMappings'] as Array<any>).map(CreateOrderChannelRequestSettingsShippingMethodMappingsInnerFromJSON)),
137
+ 'syncOnlyUnfulfilled': json['syncOnlyUnfulfilled'] == null ? undefined : json['syncOnlyUnfulfilled'],
138
+ 'syncOrdersSince': json['syncOrdersSince'] === undefined ? undefined : json['syncOrdersSince'] === null ? null : (new Date(json['syncOrdersSince'])),
139
+ 'servicePointCount': json['servicePointCount'] == null ? undefined : json['servicePointCount'],
140
+ };
141
+ }
142
+
143
+ export function UpdateOrderChannelRequestSettingsToJSON(json: any): UpdateOrderChannelRequestSettings {
144
+ return UpdateOrderChannelRequestSettingsToJSONTyped(json, false);
145
+ }
146
+
147
+ export function UpdateOrderChannelRequestSettingsToJSONTyped(value?: UpdateOrderChannelRequestSettings | null, ignoreDiscriminator: boolean = false): any {
148
+ if (value == null) {
149
+ return value;
150
+ }
151
+
152
+ return {
153
+
154
+ 'useWebhooks': value['useWebhooks'],
155
+ 'siteUrl': value['siteUrl'],
156
+ 'autoFulfill': value['autoFulfill'],
157
+ 'autoSync': value['autoSync'],
158
+ 'syncIntervalMinutes': value['syncIntervalMinutes'],
159
+ 'autoShipOnCreate': value['autoShipOnCreate'],
160
+ 'defaultCarrierId': value['defaultCarrierId'],
161
+ 'defaultProductId': value['defaultProductId'],
162
+ 'defaultAddressId': value['defaultAddressId'],
163
+ 'shippingMethodMappings': value['shippingMethodMappings'] == null ? undefined : ((value['shippingMethodMappings'] as Array<any>).map(CreateOrderChannelRequestSettingsShippingMethodMappingsInnerToJSON)),
164
+ 'syncOnlyUnfulfilled': value['syncOnlyUnfulfilled'],
165
+ 'syncOrdersSince': value['syncOrdersSince'] == null ? value['syncOrdersSince'] : value['syncOrdersSince'].toISOString(),
166
+ 'servicePointCount': value['servicePointCount'],
167
+ };
168
+ }
169
+
@@ -16,6 +16,10 @@ export * from './CreateApiTokenRequest';
16
16
  export * from './CreateOrder201Response';
17
17
  export * from './CreateOrder201ResponseOrderLinesInner';
18
18
  export * from './CreateOrder201ResponseShippingAddress';
19
+ export * from './CreateOrderChannelRequest';
20
+ export * from './CreateOrderChannelRequestSettings';
21
+ export * from './CreateOrderChannelRequestSettingsShippingMethodMappingsInner';
22
+ export * from './CreateOrderChannelWebhookSecret201Response';
19
23
  export * from './CreateOrderRequest';
20
24
  export * from './CreateOrderRequestOrderLinesInner';
21
25
  export * from './CreateOrderRequestShippingAddress';
@@ -73,6 +77,8 @@ export * from './GetBillingUsage200ResponseZippyMessages';
73
77
  export * from './GetOrder200Response';
74
78
  export * from './GetOrder200ResponseShipmentsInner';
75
79
  export * from './GetOrder200ResponseShippingRule';
80
+ export * from './GetOrderChannelWebhookStatus200Response';
81
+ export * from './GetOrderChannelWebhookStatus200ResponseWebhooksInner';
76
82
  export * from './GetOrg200Response';
77
83
  export * from './GetOrg200ResponseCount';
78
84
  export * from './GetOrgBranding200Response';
@@ -96,6 +102,10 @@ export * from './ListCarrierProducts200ResponseInnerWeightLimits';
96
102
  export * from './ListCarriers200Response';
97
103
  export * from './ListCarriers200ResponseDataInner';
98
104
  export * from './ListCarriers200ResponseDataInnerConfigValue';
105
+ export * from './ListOrderChannels200Response';
106
+ export * from './ListOrderChannels200ResponseDataInner';
107
+ export * from './ListOrderChannels200ResponseDataInnerSettings';
108
+ export * from './ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner';
99
109
  export * from './ListOrders200Response';
100
110
  export * from './ListOrders200ResponseDataInner';
101
111
  export * from './ListOrders200ResponseDataInnerOrderChannel';
@@ -124,6 +134,7 @@ export * from './ListShippingRules200ResponseDataInnerConditionsInnerOneOf4';
124
134
  export * from './ListShippingRules200ResponseDataInnerLabelPrinter';
125
135
  export * from './ListShippingRules200ResponseDataInnerReturnShippingRule';
126
136
  export * from './RevokeApiToken200Response';
137
+ export * from './RevokeOrderChannelWebhookSecret200Response';
127
138
  export * from './SendShipment422Response';
128
139
  export * from './SendShipment422ResponseErrorsInner';
129
140
  export * from './SplitShipment201Response';
@@ -137,6 +148,8 @@ export * from './TrackShipment200ResponseEventsInner';
137
148
  export * from './UpdateAddressRequest';
138
149
  export * from './UpdateApiTokenRequest';
139
150
  export * from './UpdateCarrierRequest';
151
+ export * from './UpdateOrderChannelRequest';
152
+ export * from './UpdateOrderChannelRequestSettings';
140
153
  export * from './UpdateOrderRequest';
141
154
  export * from './UpdateOrg200Response';
142
155
  export * from './UpdateOrgBrandRequest';