@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.
- 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/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/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/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/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',
|
|
@@ -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
|
+
|
|
@@ -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
|
+
|