@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.
- package/dist/apis/OrderChannelsApi.d.ts +195 -0
- package/dist/apis/OrderChannelsApi.js +496 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/OrderChannelsApi.d.ts +195 -0
- package/dist/esm/apis/OrderChannelsApi.js +492 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/BatchSendShipments200ResponseResultsInner.d.ts +1 -0
- package/dist/esm/models/BatchSendShipments200ResponseResultsInner.js +1 -0
- package/dist/esm/models/CreateOrderChannelRequest.d.ts +65 -0
- package/dist/esm/models/CreateOrderChannelRequest.js +61 -0
- package/dist/esm/models/CreateOrderChannelRequestSettings.d.ts +105 -0
- package/dist/esm/models/CreateOrderChannelRequestSettings.js +66 -0
- package/dist/esm/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.d.ts +52 -0
- package/dist/esm/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.js +56 -0
- package/dist/esm/models/CreateOrderChannelWebhookSecret201Response.d.ts +44 -0
- package/dist/esm/models/CreateOrderChannelWebhookSecret201Response.js +51 -0
- package/dist/esm/models/CreateOrderRequest.d.ts +12 -0
- package/dist/esm/models/CreateOrderRequest.js +4 -0
- package/dist/esm/models/GetOrderChannelWebhookStatus200Response.d.ts +45 -0
- package/dist/esm/models/GetOrderChannelWebhookStatus200Response.js +52 -0
- package/dist/esm/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.d.ts +62 -0
- package/dist/esm/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.js +59 -0
- package/dist/esm/models/ListApiTokens401Response.d.ts +1 -0
- package/dist/esm/models/ListApiTokens401Response.js +1 -0
- package/dist/esm/models/ListAvailableCarriers200ResponseInner.d.ts +12 -0
- package/dist/esm/models/ListAvailableCarriers200ResponseInner.js +4 -0
- package/dist/esm/models/ListCarriers200ResponseDataInner.d.ts +12 -0
- package/dist/esm/models/ListCarriers200ResponseDataInner.js +4 -0
- package/dist/esm/models/ListOrderChannels200Response.d.ts +57 -0
- package/dist/esm/models/ListOrderChannels200Response.js +60 -0
- package/dist/esm/models/ListOrderChannels200ResponseDataInner.d.ts +121 -0
- package/dist/esm/models/ListOrderChannels200ResponseDataInner.js +97 -0
- package/dist/esm/models/ListOrderChannels200ResponseDataInnerSettings.d.ts +129 -0
- package/dist/esm/models/ListOrderChannels200ResponseDataInnerSettings.js +86 -0
- package/dist/esm/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.d.ts +52 -0
- package/dist/esm/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.js +56 -0
- package/dist/esm/models/ListOrders200ResponseDataInnerOrderChannel.d.ts +1 -0
- package/dist/esm/models/ListOrders200ResponseDataInnerOrderChannel.js +2 -1
- package/dist/esm/models/RevokeOrderChannelWebhookSecret200Response.d.ts +32 -0
- package/dist/esm/models/RevokeOrderChannelWebhookSecret200Response.js +43 -0
- package/dist/esm/models/SendShipment422Response.d.ts +1 -0
- package/dist/esm/models/SendShipment422Response.js +1 -0
- package/dist/esm/models/UpdateOrderChannelRequest.d.ts +65 -0
- package/dist/esm/models/UpdateOrderChannelRequest.js +52 -0
- package/dist/esm/models/UpdateOrderChannelRequestSettings.d.ts +105 -0
- package/dist/esm/models/UpdateOrderChannelRequestSettings.js +66 -0
- package/dist/esm/models/index.d.ts +13 -0
- package/dist/esm/models/index.js +13 -0
- package/dist/models/BatchSendShipments200ResponseResultsInner.d.ts +1 -0
- package/dist/models/BatchSendShipments200ResponseResultsInner.js +1 -0
- package/dist/models/CreateOrderChannelRequest.d.ts +65 -0
- package/dist/models/CreateOrderChannelRequest.js +69 -0
- package/dist/models/CreateOrderChannelRequestSettings.d.ts +105 -0
- package/dist/models/CreateOrderChannelRequestSettings.js +73 -0
- package/dist/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.d.ts +52 -0
- package/dist/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.js +64 -0
- package/dist/models/CreateOrderChannelWebhookSecret201Response.d.ts +44 -0
- package/dist/models/CreateOrderChannelWebhookSecret201Response.js +58 -0
- package/dist/models/CreateOrderRequest.d.ts +12 -0
- package/dist/models/CreateOrderRequest.js +4 -0
- package/dist/models/GetOrderChannelWebhookStatus200Response.d.ts +45 -0
- package/dist/models/GetOrderChannelWebhookStatus200Response.js +59 -0
- package/dist/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.d.ts +62 -0
- package/dist/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.js +66 -0
- package/dist/models/ListApiTokens401Response.d.ts +1 -0
- package/dist/models/ListApiTokens401Response.js +1 -0
- package/dist/models/ListAvailableCarriers200ResponseInner.d.ts +12 -0
- package/dist/models/ListAvailableCarriers200ResponseInner.js +4 -0
- package/dist/models/ListCarriers200ResponseDataInner.d.ts +12 -0
- package/dist/models/ListCarriers200ResponseDataInner.js +4 -0
- package/dist/models/ListOrderChannels200Response.d.ts +57 -0
- package/dist/models/ListOrderChannels200Response.js +67 -0
- package/dist/models/ListOrderChannels200ResponseDataInner.d.ts +121 -0
- package/dist/models/ListOrderChannels200ResponseDataInner.js +105 -0
- package/dist/models/ListOrderChannels200ResponseDataInnerSettings.d.ts +129 -0
- package/dist/models/ListOrderChannels200ResponseDataInnerSettings.js +93 -0
- package/dist/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.d.ts +52 -0
- package/dist/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.js +64 -0
- package/dist/models/ListOrders200ResponseDataInnerOrderChannel.d.ts +1 -0
- package/dist/models/ListOrders200ResponseDataInnerOrderChannel.js +2 -1
- package/dist/models/RevokeOrderChannelWebhookSecret200Response.d.ts +32 -0
- package/dist/models/RevokeOrderChannelWebhookSecret200Response.js +50 -0
- package/dist/models/SendShipment422Response.d.ts +1 -0
- package/dist/models/SendShipment422Response.js +1 -0
- package/dist/models/UpdateOrderChannelRequest.d.ts +65 -0
- package/dist/models/UpdateOrderChannelRequest.js +59 -0
- package/dist/models/UpdateOrderChannelRequestSettings.d.ts +105 -0
- package/dist/models/UpdateOrderChannelRequestSettings.js +73 -0
- package/dist/models/index.d.ts +13 -0
- package/dist/models/index.js +13 -0
- package/docs/CreateOrderChannelRequest.md +42 -0
- package/docs/CreateOrderChannelRequestSettings.md +58 -0
- package/docs/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.md +38 -0
- package/docs/CreateOrderChannelWebhookSecret201Response.md +38 -0
- package/docs/CreateOrderRequest.md +4 -0
- package/docs/GetOrderChannelWebhookStatus200Response.md +38 -0
- package/docs/GetOrderChannelWebhookStatus200ResponseWebhooksInner.md +44 -0
- package/docs/ListAvailableCarriers200ResponseInner.md +4 -0
- package/docs/ListCarriers200ResponseDataInner.md +4 -0
- package/docs/ListOrderChannels200Response.md +42 -0
- package/docs/ListOrderChannels200ResponseDataInner.md +60 -0
- package/docs/ListOrderChannels200ResponseDataInnerSettings.md +67 -0
- package/docs/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.md +38 -0
- package/docs/OrderChannelsApi.md +650 -0
- package/docs/OrdersApi.md +1 -0
- package/docs/RevokeOrderChannelWebhookSecret200Response.md +34 -0
- package/docs/UpdateOrderChannelRequest.md +44 -0
- package/docs/UpdateOrderChannelRequestSettings.md +59 -0
- package/package.json +1 -1
- package/src/apis/OrderChannelsApi.ts +670 -0
- package/src/apis/index.ts +1 -0
- package/src/models/BatchSendShipments200ResponseResultsInner.ts +1 -0
- package/src/models/CreateOrderChannelRequest.ts +118 -0
- package/src/models/CreateOrderChannelRequestSettings.ts +169 -0
- package/src/models/CreateOrderChannelRequestSettingsShippingMethodMappingsInner.ts +94 -0
- package/src/models/CreateOrderChannelWebhookSecret201Response.ts +84 -0
- package/src/models/CreateOrderRequest.ts +16 -0
- package/src/models/GetOrderChannelWebhookStatus200Response.ts +92 -0
- package/src/models/GetOrderChannelWebhookStatus200ResponseWebhooksInner.ts +109 -0
- package/src/models/ListApiTokens401Response.ts +1 -0
- package/src/models/ListAvailableCarriers200ResponseInner.ts +16 -0
- package/src/models/ListCarriers200ResponseDataInner.ts +16 -0
- package/src/models/ListOrderChannels200Response.ts +110 -0
- package/src/models/ListOrderChannels200ResponseDataInner.ts +200 -0
- package/src/models/ListOrderChannels200ResponseDataInnerSettings.ts +207 -0
- package/src/models/ListOrderChannels200ResponseDataInnerSettingsShippingMethodMappingsInner.ts +94 -0
- package/src/models/ListOrders200ResponseDataInnerOrderChannel.ts +2 -1
- package/src/models/RevokeOrderChannelWebhookSecret200Response.ts +66 -0
- package/src/models/SendShipment422Response.ts +1 -0
- package/src/models/UpdateOrderChannelRequest.ts +113 -0
- package/src/models/UpdateOrderChannelRequestSettings.ts +169 -0
- package/src/models/index.ts +13 -0
|
@@ -0,0 +1,109 @@
|
|
|
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 GetOrderChannelWebhookStatus200ResponseWebhooksInner
|
|
20
|
+
*/
|
|
21
|
+
export interface GetOrderChannelWebhookStatus200ResponseWebhooksInner {
|
|
22
|
+
/**
|
|
23
|
+
* Platform webhook ID.
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof GetOrderChannelWebhookStatus200ResponseWebhooksInner
|
|
26
|
+
*/
|
|
27
|
+
id: number;
|
|
28
|
+
/**
|
|
29
|
+
* Webhook event topic.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof GetOrderChannelWebhookStatus200ResponseWebhooksInner
|
|
32
|
+
*/
|
|
33
|
+
topic: string;
|
|
34
|
+
/**
|
|
35
|
+
* Registered callback address.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof GetOrderChannelWebhookStatus200ResponseWebhooksInner
|
|
38
|
+
*/
|
|
39
|
+
address: string;
|
|
40
|
+
/**
|
|
41
|
+
* Webhook creation timestamp.
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof GetOrderChannelWebhookStatus200ResponseWebhooksInner
|
|
44
|
+
*/
|
|
45
|
+
createdAt: string;
|
|
46
|
+
/**
|
|
47
|
+
* WooCommerce delivery URL (same as `address`; present for WooCommerce channels).
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof GetOrderChannelWebhookStatus200ResponseWebhooksInner
|
|
50
|
+
*/
|
|
51
|
+
deliveryUrl?: string;
|
|
52
|
+
/**
|
|
53
|
+
* WooCommerce webhook status. A value other than `active` means WooCommerce disabled the webhook (e.g. after repeated delivery failures).
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof GetOrderChannelWebhookStatus200ResponseWebhooksInner
|
|
56
|
+
*/
|
|
57
|
+
status?: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the GetOrderChannelWebhookStatus200ResponseWebhooksInner interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfGetOrderChannelWebhookStatus200ResponseWebhooksInner(value: object): value is GetOrderChannelWebhookStatus200ResponseWebhooksInner {
|
|
64
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
65
|
+
if (!('topic' in value) || value['topic'] === undefined) return false;
|
|
66
|
+
if (!('address' in value) || value['address'] === undefined) return false;
|
|
67
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function GetOrderChannelWebhookStatus200ResponseWebhooksInnerFromJSON(json: any): GetOrderChannelWebhookStatus200ResponseWebhooksInner {
|
|
72
|
+
return GetOrderChannelWebhookStatus200ResponseWebhooksInnerFromJSONTyped(json, false);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function GetOrderChannelWebhookStatus200ResponseWebhooksInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetOrderChannelWebhookStatus200ResponseWebhooksInner {
|
|
76
|
+
if (json == null) {
|
|
77
|
+
return json;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
|
|
81
|
+
'id': json['id'],
|
|
82
|
+
'topic': json['topic'],
|
|
83
|
+
'address': json['address'],
|
|
84
|
+
'createdAt': json['createdAt'],
|
|
85
|
+
'deliveryUrl': json['deliveryUrl'] == null ? undefined : json['deliveryUrl'],
|
|
86
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function GetOrderChannelWebhookStatus200ResponseWebhooksInnerToJSON(json: any): GetOrderChannelWebhookStatus200ResponseWebhooksInner {
|
|
91
|
+
return GetOrderChannelWebhookStatus200ResponseWebhooksInnerToJSONTyped(json, false);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function GetOrderChannelWebhookStatus200ResponseWebhooksInnerToJSONTyped(value?: GetOrderChannelWebhookStatus200ResponseWebhooksInner | null, ignoreDiscriminator: boolean = false): any {
|
|
95
|
+
if (value == null) {
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
|
|
101
|
+
'id': value['id'],
|
|
102
|
+
'topic': value['topic'],
|
|
103
|
+
'address': value['address'],
|
|
104
|
+
'createdAt': value['createdAt'],
|
|
105
|
+
'deliveryUrl': value['deliveryUrl'],
|
|
106
|
+
'status': value['status'],
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
@@ -139,6 +139,7 @@ export const ListApiTokens401ResponseCodeEnum = {
|
|
|
139
139
|
ShippingRuleInvalid: 'SHIPPING_RULE_INVALID',
|
|
140
140
|
AddressNotFound: 'ADDRESS_NOT_FOUND',
|
|
141
141
|
OrderNotFound: 'ORDER_NOT_FOUND',
|
|
142
|
+
OrderExists: 'ORDER_EXISTS',
|
|
142
143
|
OrderChannelNotFound: 'ORDER_CHANNEL_NOT_FOUND',
|
|
143
144
|
OrderChannelConfigInvalid: 'ORDER_CHANNEL_CONFIG_INVALID',
|
|
144
145
|
IntegrationNotConfigured: 'INTEGRATION_NOT_CONFIGURED',
|
|
@@ -93,6 +93,18 @@ export interface ListAvailableCarriers200ResponseInner {
|
|
|
93
93
|
* @memberof ListAvailableCarriers200ResponseInner
|
|
94
94
|
*/
|
|
95
95
|
deprecationMessage?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the carrier produces the customs declaration (CN22/CN23) itself and returns it with the label.
|
|
98
|
+
* @type {boolean}
|
|
99
|
+
* @memberof ListAvailableCarriers200ResponseInner
|
|
100
|
+
*/
|
|
101
|
+
generatesCustomsDocuments?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Whether the carrier produces the commercial invoice itself and returns it with the label, e.g. via electronic trade documents.
|
|
104
|
+
* @type {boolean}
|
|
105
|
+
* @memberof ListAvailableCarriers200ResponseInner
|
|
106
|
+
*/
|
|
107
|
+
generatesCommercialInvoice?: boolean;
|
|
96
108
|
}
|
|
97
109
|
|
|
98
110
|
/**
|
|
@@ -125,6 +137,8 @@ export function ListAvailableCarriers200ResponseInnerFromJSONTyped(json: any, ig
|
|
|
125
137
|
'optionalFields': json['optionalFields'] == null ? undefined : ((json['optionalFields'] as Array<any>).map(ListAvailableCarriers200ResponseInnerRequiredFieldsInnerFromJSON)),
|
|
126
138
|
'deprecated': json['deprecated'] == null ? undefined : json['deprecated'],
|
|
127
139
|
'deprecationMessage': json['deprecationMessage'] == null ? undefined : json['deprecationMessage'],
|
|
140
|
+
'generatesCustomsDocuments': json['generatesCustomsDocuments'] == null ? undefined : json['generatesCustomsDocuments'],
|
|
141
|
+
'generatesCommercialInvoice': json['generatesCommercialInvoice'] == null ? undefined : json['generatesCommercialInvoice'],
|
|
128
142
|
};
|
|
129
143
|
}
|
|
130
144
|
|
|
@@ -150,6 +164,8 @@ export function ListAvailableCarriers200ResponseInnerToJSONTyped(value?: ListAva
|
|
|
150
164
|
'optionalFields': value['optionalFields'] == null ? undefined : ((value['optionalFields'] as Array<any>).map(ListAvailableCarriers200ResponseInnerRequiredFieldsInnerToJSON)),
|
|
151
165
|
'deprecated': value['deprecated'],
|
|
152
166
|
'deprecationMessage': value['deprecationMessage'],
|
|
167
|
+
'generatesCustomsDocuments': value['generatesCustomsDocuments'],
|
|
168
|
+
'generatesCommercialInvoice': value['generatesCommercialInvoice'],
|
|
153
169
|
};
|
|
154
170
|
}
|
|
155
171
|
|
|
@@ -99,6 +99,18 @@ export interface ListCarriers200ResponseDataInner {
|
|
|
99
99
|
* @memberof ListCarriers200ResponseDataInner
|
|
100
100
|
*/
|
|
101
101
|
deprecationMessage?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Whether the carrier produces the customs declaration (CN22/CN23) itself and returns it with the label.
|
|
104
|
+
* @type {boolean}
|
|
105
|
+
* @memberof ListCarriers200ResponseDataInner
|
|
106
|
+
*/
|
|
107
|
+
generatesCustomsDocuments?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Whether the carrier produces the commercial invoice itself and returns it with the label, e.g. via electronic trade documents.
|
|
110
|
+
* @type {boolean}
|
|
111
|
+
* @memberof ListCarriers200ResponseDataInner
|
|
112
|
+
*/
|
|
113
|
+
generatesCommercialInvoice?: boolean;
|
|
102
114
|
}
|
|
103
115
|
|
|
104
116
|
/**
|
|
@@ -138,6 +150,8 @@ export function ListCarriers200ResponseDataInnerFromJSONTyped(json: any, ignoreD
|
|
|
138
150
|
'brandColor': json['brandColor'] == null ? undefined : json['brandColor'],
|
|
139
151
|
'deprecated': json['deprecated'] == null ? undefined : json['deprecated'],
|
|
140
152
|
'deprecationMessage': json['deprecationMessage'] == null ? undefined : json['deprecationMessage'],
|
|
153
|
+
'generatesCustomsDocuments': json['generatesCustomsDocuments'] == null ? undefined : json['generatesCustomsDocuments'],
|
|
154
|
+
'generatesCommercialInvoice': json['generatesCommercialInvoice'] == null ? undefined : json['generatesCommercialInvoice'],
|
|
141
155
|
};
|
|
142
156
|
}
|
|
143
157
|
|
|
@@ -164,6 +178,8 @@ export function ListCarriers200ResponseDataInnerToJSONTyped(value?: ListCarriers
|
|
|
164
178
|
'brandColor': value['brandColor'],
|
|
165
179
|
'deprecated': value['deprecated'],
|
|
166
180
|
'deprecationMessage': value['deprecationMessage'],
|
|
181
|
+
'generatesCustomsDocuments': value['generatesCustomsDocuments'],
|
|
182
|
+
'generatesCommercialInvoice': value['generatesCommercialInvoice'],
|
|
167
183
|
};
|
|
168
184
|
}
|
|
169
185
|
|
|
@@ -0,0 +1,110 @@
|
|
|
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 { ListOrderChannels200ResponseDataInner } from './ListOrderChannels200ResponseDataInner';
|
|
17
|
+
import {
|
|
18
|
+
ListOrderChannels200ResponseDataInnerFromJSON,
|
|
19
|
+
ListOrderChannels200ResponseDataInnerFromJSONTyped,
|
|
20
|
+
ListOrderChannels200ResponseDataInnerToJSON,
|
|
21
|
+
ListOrderChannels200ResponseDataInnerToJSONTyped,
|
|
22
|
+
} from './ListOrderChannels200ResponseDataInner';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ListOrderChannels200Response
|
|
28
|
+
*/
|
|
29
|
+
export interface ListOrderChannels200Response {
|
|
30
|
+
/**
|
|
31
|
+
* Page of results
|
|
32
|
+
* @type {Array<ListOrderChannels200ResponseDataInner>}
|
|
33
|
+
* @memberof ListOrderChannels200Response
|
|
34
|
+
*/
|
|
35
|
+
data: Array<ListOrderChannels200ResponseDataInner>;
|
|
36
|
+
/**
|
|
37
|
+
* Total matching items across all pages
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof ListOrderChannels200Response
|
|
40
|
+
*/
|
|
41
|
+
total: number;
|
|
42
|
+
/**
|
|
43
|
+
* Current page number (1-based)
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof ListOrderChannels200Response
|
|
46
|
+
*/
|
|
47
|
+
page: number;
|
|
48
|
+
/**
|
|
49
|
+
* Items per page
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof ListOrderChannels200Response
|
|
52
|
+
*/
|
|
53
|
+
limit: number;
|
|
54
|
+
/**
|
|
55
|
+
* Total number of pages
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof ListOrderChannels200Response
|
|
58
|
+
*/
|
|
59
|
+
totalPages: number;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the ListOrderChannels200Response interface.
|
|
64
|
+
*/
|
|
65
|
+
export function instanceOfListOrderChannels200Response(value: object): value is ListOrderChannels200Response {
|
|
66
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
67
|
+
if (!('total' in value) || value['total'] === undefined) return false;
|
|
68
|
+
if (!('page' in value) || value['page'] === undefined) return false;
|
|
69
|
+
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
70
|
+
if (!('totalPages' in value) || value['totalPages'] === undefined) return false;
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function ListOrderChannels200ResponseFromJSON(json: any): ListOrderChannels200Response {
|
|
75
|
+
return ListOrderChannels200ResponseFromJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function ListOrderChannels200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListOrderChannels200Response {
|
|
79
|
+
if (json == null) {
|
|
80
|
+
return json;
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'data': ((json['data'] as Array<any>).map(ListOrderChannels200ResponseDataInnerFromJSON)),
|
|
85
|
+
'total': json['total'],
|
|
86
|
+
'page': json['page'],
|
|
87
|
+
'limit': json['limit'],
|
|
88
|
+
'totalPages': json['totalPages'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function ListOrderChannels200ResponseToJSON(json: any): ListOrderChannels200Response {
|
|
93
|
+
return ListOrderChannels200ResponseToJSONTyped(json, false);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function ListOrderChannels200ResponseToJSONTyped(value?: ListOrderChannels200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
97
|
+
if (value == null) {
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return {
|
|
102
|
+
|
|
103
|
+
'data': ((value['data'] as Array<any>).map(ListOrderChannels200ResponseDataInnerToJSON)),
|
|
104
|
+
'total': value['total'],
|
|
105
|
+
'page': value['page'],
|
|
106
|
+
'limit': value['limit'],
|
|
107
|
+
'totalPages': value['totalPages'],
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
@@ -0,0 +1,200 @@
|
|
|
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 { ListOrderChannels200ResponseDataInnerSettings } from './ListOrderChannels200ResponseDataInnerSettings';
|
|
17
|
+
import {
|
|
18
|
+
ListOrderChannels200ResponseDataInnerSettingsFromJSON,
|
|
19
|
+
ListOrderChannels200ResponseDataInnerSettingsFromJSONTyped,
|
|
20
|
+
ListOrderChannels200ResponseDataInnerSettingsToJSON,
|
|
21
|
+
ListOrderChannels200ResponseDataInnerSettingsToJSONTyped,
|
|
22
|
+
} from './ListOrderChannels200ResponseDataInnerSettings';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ListOrderChannels200ResponseDataInner
|
|
28
|
+
*/
|
|
29
|
+
export interface ListOrderChannels200ResponseDataInner {
|
|
30
|
+
/**
|
|
31
|
+
* Unique order channel ID.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
* Display name of the channel.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
42
|
+
/**
|
|
43
|
+
* Type of the order channel (sales platform).
|
|
44
|
+
* @type {ListOrderChannels200ResponseDataInnerTypeEnum}
|
|
45
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
46
|
+
*/
|
|
47
|
+
type: ListOrderChannels200ResponseDataInnerTypeEnum;
|
|
48
|
+
/**
|
|
49
|
+
* Whether the channel is active.
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
52
|
+
*/
|
|
53
|
+
enabled: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Brand this channel belongs to, or null for organization-wide. Orders synced from this channel inherit it, and so do the shipments and documents made from them.
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
58
|
+
*/
|
|
59
|
+
brandId: string | null;
|
|
60
|
+
/**
|
|
61
|
+
* Whether credentials are configured (values are never exposed).
|
|
62
|
+
* @type {boolean}
|
|
63
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
64
|
+
*/
|
|
65
|
+
hasCredentials: boolean;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {ListOrderChannels200ResponseDataInnerSettings}
|
|
69
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
70
|
+
*/
|
|
71
|
+
settings: ListOrderChannels200ResponseDataInnerSettings;
|
|
72
|
+
/**
|
|
73
|
+
* Whether real-time webhooks are enabled.
|
|
74
|
+
* @type {boolean}
|
|
75
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
76
|
+
*/
|
|
77
|
+
webhooksEnabled?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Timestamp of the last successful sync.
|
|
80
|
+
* @type {Date}
|
|
81
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
82
|
+
*/
|
|
83
|
+
lastSyncAt?: Date | null;
|
|
84
|
+
/**
|
|
85
|
+
* Error message from the last failed sync.
|
|
86
|
+
* @type {string}
|
|
87
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
88
|
+
*/
|
|
89
|
+
lastSyncError?: string | null;
|
|
90
|
+
/**
|
|
91
|
+
* IDs of shipping rules linked to this channel.
|
|
92
|
+
* @type {Array<string>}
|
|
93
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
94
|
+
*/
|
|
95
|
+
shippingRuleIds?: Array<string>;
|
|
96
|
+
/**
|
|
97
|
+
* Owning organization ID.
|
|
98
|
+
* @type {string}
|
|
99
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
100
|
+
*/
|
|
101
|
+
orgId: string;
|
|
102
|
+
/**
|
|
103
|
+
* Creation timestamp (ISO 8601).
|
|
104
|
+
* @type {string}
|
|
105
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
106
|
+
*/
|
|
107
|
+
createdAt: string;
|
|
108
|
+
/**
|
|
109
|
+
* Last update timestamp (ISO 8601).
|
|
110
|
+
* @type {string}
|
|
111
|
+
* @memberof ListOrderChannels200ResponseDataInner
|
|
112
|
+
*/
|
|
113
|
+
updatedAt: string;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @export
|
|
119
|
+
*/
|
|
120
|
+
export const ListOrderChannels200ResponseDataInnerTypeEnum = {
|
|
121
|
+
Shopify: 'shopify',
|
|
122
|
+
Woocommerce: 'woocommerce',
|
|
123
|
+
Manual: 'manual',
|
|
124
|
+
Custom: 'custom'
|
|
125
|
+
} as const;
|
|
126
|
+
export type ListOrderChannels200ResponseDataInnerTypeEnum = typeof ListOrderChannels200ResponseDataInnerTypeEnum[keyof typeof ListOrderChannels200ResponseDataInnerTypeEnum];
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Check if a given object implements the ListOrderChannels200ResponseDataInner interface.
|
|
131
|
+
*/
|
|
132
|
+
export function instanceOfListOrderChannels200ResponseDataInner(value: object): value is ListOrderChannels200ResponseDataInner {
|
|
133
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
134
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
135
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
136
|
+
if (!('enabled' in value) || value['enabled'] === undefined) return false;
|
|
137
|
+
if (!('brandId' in value) || value['brandId'] === undefined) return false;
|
|
138
|
+
if (!('hasCredentials' in value) || value['hasCredentials'] === undefined) return false;
|
|
139
|
+
if (!('settings' in value) || value['settings'] === undefined) return false;
|
|
140
|
+
if (!('orgId' in value) || value['orgId'] === undefined) return false;
|
|
141
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
142
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function ListOrderChannels200ResponseDataInnerFromJSON(json: any): ListOrderChannels200ResponseDataInner {
|
|
147
|
+
return ListOrderChannels200ResponseDataInnerFromJSONTyped(json, false);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function ListOrderChannels200ResponseDataInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListOrderChannels200ResponseDataInner {
|
|
151
|
+
if (json == null) {
|
|
152
|
+
return json;
|
|
153
|
+
}
|
|
154
|
+
return {
|
|
155
|
+
|
|
156
|
+
'id': json['id'],
|
|
157
|
+
'name': json['name'],
|
|
158
|
+
'type': json['type'],
|
|
159
|
+
'enabled': json['enabled'],
|
|
160
|
+
'brandId': json['brandId'],
|
|
161
|
+
'hasCredentials': json['hasCredentials'],
|
|
162
|
+
'settings': ListOrderChannels200ResponseDataInnerSettingsFromJSON(json['settings']),
|
|
163
|
+
'webhooksEnabled': json['webhooksEnabled'] == null ? undefined : json['webhooksEnabled'],
|
|
164
|
+
'lastSyncAt': json['lastSyncAt'] === undefined ? undefined : json['lastSyncAt'] === null ? null : (new Date(json['lastSyncAt'])),
|
|
165
|
+
'lastSyncError': json['lastSyncError'] === undefined ? undefined : json['lastSyncError'] === null ? null : json['lastSyncError'],
|
|
166
|
+
'shippingRuleIds': json['shippingRuleIds'] == null ? undefined : json['shippingRuleIds'],
|
|
167
|
+
'orgId': json['orgId'],
|
|
168
|
+
'createdAt': json['createdAt'],
|
|
169
|
+
'updatedAt': json['updatedAt'],
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export function ListOrderChannels200ResponseDataInnerToJSON(json: any): ListOrderChannels200ResponseDataInner {
|
|
174
|
+
return ListOrderChannels200ResponseDataInnerToJSONTyped(json, false);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export function ListOrderChannels200ResponseDataInnerToJSONTyped(value?: ListOrderChannels200ResponseDataInner | null, ignoreDiscriminator: boolean = false): any {
|
|
178
|
+
if (value == null) {
|
|
179
|
+
return value;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return {
|
|
183
|
+
|
|
184
|
+
'id': value['id'],
|
|
185
|
+
'name': value['name'],
|
|
186
|
+
'type': value['type'],
|
|
187
|
+
'enabled': value['enabled'],
|
|
188
|
+
'brandId': value['brandId'],
|
|
189
|
+
'hasCredentials': value['hasCredentials'],
|
|
190
|
+
'settings': ListOrderChannels200ResponseDataInnerSettingsToJSON(value['settings']),
|
|
191
|
+
'webhooksEnabled': value['webhooksEnabled'],
|
|
192
|
+
'lastSyncAt': value['lastSyncAt'] == null ? value['lastSyncAt'] : value['lastSyncAt'].toISOString(),
|
|
193
|
+
'lastSyncError': value['lastSyncError'],
|
|
194
|
+
'shippingRuleIds': value['shippingRuleIds'],
|
|
195
|
+
'orgId': value['orgId'],
|
|
196
|
+
'createdAt': value['createdAt'],
|
|
197
|
+
'updatedAt': value['updatedAt'],
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
|