@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,118 @@
|
|
|
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 { CreateOrderChannelRequestSettings } from './CreateOrderChannelRequestSettings';
|
|
17
|
+
import {
|
|
18
|
+
CreateOrderChannelRequestSettingsFromJSON,
|
|
19
|
+
CreateOrderChannelRequestSettingsFromJSONTyped,
|
|
20
|
+
CreateOrderChannelRequestSettingsToJSON,
|
|
21
|
+
CreateOrderChannelRequestSettingsToJSONTyped,
|
|
22
|
+
} from './CreateOrderChannelRequestSettings';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CreateOrderChannelRequest
|
|
28
|
+
*/
|
|
29
|
+
export interface CreateOrderChannelRequest {
|
|
30
|
+
/**
|
|
31
|
+
* Display name for the channel.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CreateOrderChannelRequest
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
* Type of the order channel. Platform channels (Shopify, WooCommerce) are created via their connect flows.
|
|
38
|
+
* @type {CreateOrderChannelRequestTypeEnum}
|
|
39
|
+
* @memberof CreateOrderChannelRequest
|
|
40
|
+
*/
|
|
41
|
+
type: CreateOrderChannelRequestTypeEnum;
|
|
42
|
+
/**
|
|
43
|
+
* Brand this channel belongs to; null for organization-wide
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof CreateOrderChannelRequest
|
|
46
|
+
*/
|
|
47
|
+
brandId?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Whether the channel is active.
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof CreateOrderChannelRequest
|
|
52
|
+
*/
|
|
53
|
+
enabled?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {CreateOrderChannelRequestSettings}
|
|
57
|
+
* @memberof CreateOrderChannelRequest
|
|
58
|
+
*/
|
|
59
|
+
settings?: CreateOrderChannelRequestSettings;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @export
|
|
65
|
+
*/
|
|
66
|
+
export const CreateOrderChannelRequestTypeEnum = {
|
|
67
|
+
Manual: 'manual',
|
|
68
|
+
Custom: 'custom'
|
|
69
|
+
} as const;
|
|
70
|
+
export type CreateOrderChannelRequestTypeEnum = typeof CreateOrderChannelRequestTypeEnum[keyof typeof CreateOrderChannelRequestTypeEnum];
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Check if a given object implements the CreateOrderChannelRequest interface.
|
|
75
|
+
*/
|
|
76
|
+
export function instanceOfCreateOrderChannelRequest(value: object): value is CreateOrderChannelRequest {
|
|
77
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
78
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function CreateOrderChannelRequestFromJSON(json: any): CreateOrderChannelRequest {
|
|
83
|
+
return CreateOrderChannelRequestFromJSONTyped(json, false);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function CreateOrderChannelRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateOrderChannelRequest {
|
|
87
|
+
if (json == null) {
|
|
88
|
+
return json;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
|
|
92
|
+
'name': json['name'],
|
|
93
|
+
'type': json['type'],
|
|
94
|
+
'brandId': json['brandId'] === undefined ? undefined : json['brandId'] === null ? null : json['brandId'],
|
|
95
|
+
'enabled': json['enabled'] == null ? undefined : json['enabled'],
|
|
96
|
+
'settings': json['settings'] == null ? undefined : CreateOrderChannelRequestSettingsFromJSON(json['settings']),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function CreateOrderChannelRequestToJSON(json: any): CreateOrderChannelRequest {
|
|
101
|
+
return CreateOrderChannelRequestToJSONTyped(json, false);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function CreateOrderChannelRequestToJSONTyped(value?: CreateOrderChannelRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
105
|
+
if (value == null) {
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
|
|
111
|
+
'name': value['name'],
|
|
112
|
+
'type': value['type'],
|
|
113
|
+
'brandId': value['brandId'],
|
|
114
|
+
'enabled': value['enabled'],
|
|
115
|
+
'settings': CreateOrderChannelRequestSettingsToJSON(value['settings']),
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
@@ -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
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface CreateOrderChannelRequestSettings
|
|
28
|
+
*/
|
|
29
|
+
export interface CreateOrderChannelRequestSettings {
|
|
30
|
+
/**
|
|
31
|
+
* Use webhooks for real-time order sync.
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof CreateOrderChannelRequestSettings
|
|
34
|
+
*/
|
|
35
|
+
useWebhooks?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* WooCommerce store URL.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof CreateOrderChannelRequestSettings
|
|
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 CreateOrderChannelRequestSettings
|
|
46
|
+
*/
|
|
47
|
+
autoFulfill?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Periodically poll the channel for new orders.
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof CreateOrderChannelRequestSettings
|
|
52
|
+
*/
|
|
53
|
+
autoSync?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Polling interval in minutes (5-1440).
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof CreateOrderChannelRequestSettings
|
|
58
|
+
*/
|
|
59
|
+
syncIntervalMinutes?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Create a shipment automatically when an order arrives.
|
|
62
|
+
* @type {boolean}
|
|
63
|
+
* @memberof CreateOrderChannelRequestSettings
|
|
64
|
+
*/
|
|
65
|
+
autoShipOnCreate?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Default carrier ID for auto-shipping.
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof CreateOrderChannelRequestSettings
|
|
70
|
+
*/
|
|
71
|
+
defaultCarrierId?: string | null;
|
|
72
|
+
/**
|
|
73
|
+
* Default carrier product ID for auto-shipping.
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof CreateOrderChannelRequestSettings
|
|
76
|
+
*/
|
|
77
|
+
defaultProductId?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Default sender address ID for auto-shipping.
|
|
80
|
+
* @type {string}
|
|
81
|
+
* @memberof CreateOrderChannelRequestSettings
|
|
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 CreateOrderChannelRequestSettings
|
|
88
|
+
*/
|
|
89
|
+
shippingMethodMappings?: Array<CreateOrderChannelRequestSettingsShippingMethodMappingsInner>;
|
|
90
|
+
/**
|
|
91
|
+
* Only import orders that are not yet fulfilled.
|
|
92
|
+
* @type {boolean}
|
|
93
|
+
* @memberof CreateOrderChannelRequestSettings
|
|
94
|
+
*/
|
|
95
|
+
syncOnlyUnfulfilled?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Only sync orders placed at or after this timestamp.
|
|
98
|
+
* @type {Date}
|
|
99
|
+
* @memberof CreateOrderChannelRequestSettings
|
|
100
|
+
*/
|
|
101
|
+
syncOrdersSince?: Date | null;
|
|
102
|
+
/**
|
|
103
|
+
* Number of service points to show at checkout (1-20).
|
|
104
|
+
* @type {number}
|
|
105
|
+
* @memberof CreateOrderChannelRequestSettings
|
|
106
|
+
*/
|
|
107
|
+
servicePointCount?: number;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Check if a given object implements the CreateOrderChannelRequestSettings interface.
|
|
112
|
+
*/
|
|
113
|
+
export function instanceOfCreateOrderChannelRequestSettings(value: object): value is CreateOrderChannelRequestSettings {
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function CreateOrderChannelRequestSettingsFromJSON(json: any): CreateOrderChannelRequestSettings {
|
|
118
|
+
return CreateOrderChannelRequestSettingsFromJSONTyped(json, false);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function CreateOrderChannelRequestSettingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateOrderChannelRequestSettings {
|
|
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 CreateOrderChannelRequestSettingsToJSON(json: any): CreateOrderChannelRequestSettings {
|
|
144
|
+
return CreateOrderChannelRequestSettingsToJSONTyped(json, false);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export function CreateOrderChannelRequestSettingsToJSONTyped(value?: CreateOrderChannelRequestSettings | 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
|
+
|
|
@@ -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 CreateOrderChannelRequestSettingsShippingMethodMappingsInner
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateOrderChannelRequestSettingsShippingMethodMappingsInner {
|
|
22
|
+
/**
|
|
23
|
+
* Shipping-method title to match against imported orders (trimmed, case-insensitive, exact).
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CreateOrderChannelRequestSettingsShippingMethodMappingsInner
|
|
26
|
+
*/
|
|
27
|
+
match: string;
|
|
28
|
+
/**
|
|
29
|
+
* Shipping rule applied to orders whose shipping-method title matches.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CreateOrderChannelRequestSettingsShippingMethodMappingsInner
|
|
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 {CreateOrderChannelRequestSettingsShippingMethodMappingsInnerServicePointSelectionEnum}
|
|
37
|
+
* @memberof CreateOrderChannelRequestSettingsShippingMethodMappingsInner
|
|
38
|
+
*/
|
|
39
|
+
servicePointSelection?: CreateOrderChannelRequestSettingsShippingMethodMappingsInnerServicePointSelectionEnum;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export const CreateOrderChannelRequestSettingsShippingMethodMappingsInnerServicePointSelectionEnum = {
|
|
47
|
+
Nearest: 'nearest',
|
|
48
|
+
Manual: 'manual'
|
|
49
|
+
} as const;
|
|
50
|
+
export type CreateOrderChannelRequestSettingsShippingMethodMappingsInnerServicePointSelectionEnum = typeof CreateOrderChannelRequestSettingsShippingMethodMappingsInnerServicePointSelectionEnum[keyof typeof CreateOrderChannelRequestSettingsShippingMethodMappingsInnerServicePointSelectionEnum];
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Check if a given object implements the CreateOrderChannelRequestSettingsShippingMethodMappingsInner interface.
|
|
55
|
+
*/
|
|
56
|
+
export function instanceOfCreateOrderChannelRequestSettingsShippingMethodMappingsInner(value: object): value is CreateOrderChannelRequestSettingsShippingMethodMappingsInner {
|
|
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 CreateOrderChannelRequestSettingsShippingMethodMappingsInnerFromJSON(json: any): CreateOrderChannelRequestSettingsShippingMethodMappingsInner {
|
|
63
|
+
return CreateOrderChannelRequestSettingsShippingMethodMappingsInnerFromJSONTyped(json, false);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function CreateOrderChannelRequestSettingsShippingMethodMappingsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateOrderChannelRequestSettingsShippingMethodMappingsInner {
|
|
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 CreateOrderChannelRequestSettingsShippingMethodMappingsInnerToJSON(json: any): CreateOrderChannelRequestSettingsShippingMethodMappingsInner {
|
|
79
|
+
return CreateOrderChannelRequestSettingsShippingMethodMappingsInnerToJSONTyped(json, false);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function CreateOrderChannelRequestSettingsShippingMethodMappingsInnerToJSONTyped(value?: CreateOrderChannelRequestSettingsShippingMethodMappingsInner | 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
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
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 CreateOrderChannelWebhookSecret201Response
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateOrderChannelWebhookSecret201Response {
|
|
22
|
+
/**
|
|
23
|
+
* The webhook signing secret. Returned only once — store it in your system; every push to the ingest URL must carry an HMAC-SHA256 hex signature of the raw body computed with it.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof CreateOrderChannelWebhookSecret201Response
|
|
26
|
+
*/
|
|
27
|
+
secret: string;
|
|
28
|
+
/**
|
|
29
|
+
* The ingest URL your system pushes signed order events to.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof CreateOrderChannelWebhookSecret201Response
|
|
32
|
+
*/
|
|
33
|
+
webhookUrl: string;
|
|
34
|
+
/**
|
|
35
|
+
* When this secret was issued (ISO 8601).
|
|
36
|
+
* @type {Date}
|
|
37
|
+
* @memberof CreateOrderChannelWebhookSecret201Response
|
|
38
|
+
*/
|
|
39
|
+
createdAt: Date;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the CreateOrderChannelWebhookSecret201Response interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfCreateOrderChannelWebhookSecret201Response(value: object): value is CreateOrderChannelWebhookSecret201Response {
|
|
46
|
+
if (!('secret' in value) || value['secret'] === undefined) return false;
|
|
47
|
+
if (!('webhookUrl' in value) || value['webhookUrl'] === undefined) return false;
|
|
48
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function CreateOrderChannelWebhookSecret201ResponseFromJSON(json: any): CreateOrderChannelWebhookSecret201Response {
|
|
53
|
+
return CreateOrderChannelWebhookSecret201ResponseFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function CreateOrderChannelWebhookSecret201ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateOrderChannelWebhookSecret201Response {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'secret': json['secret'],
|
|
63
|
+
'webhookUrl': json['webhookUrl'],
|
|
64
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function CreateOrderChannelWebhookSecret201ResponseToJSON(json: any): CreateOrderChannelWebhookSecret201Response {
|
|
69
|
+
return CreateOrderChannelWebhookSecret201ResponseToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function CreateOrderChannelWebhookSecret201ResponseToJSONTyped(value?: CreateOrderChannelWebhookSecret201Response | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'secret': value['secret'],
|
|
80
|
+
'webhookUrl': value['webhookUrl'],
|
|
81
|
+
'createdAt': value['createdAt'].toISOString(),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -100,6 +100,18 @@ export interface CreateOrderRequest {
|
|
|
100
100
|
* @memberof CreateOrderRequest
|
|
101
101
|
*/
|
|
102
102
|
notes?: string | null;
|
|
103
|
+
/**
|
|
104
|
+
* Shipping rule to ship this order with. When set, a shipment is created immediately (and dispatched if the channel has autoShipOnCreate enabled).
|
|
105
|
+
* @type {string}
|
|
106
|
+
* @memberof CreateOrderRequest
|
|
107
|
+
*/
|
|
108
|
+
shippingRuleId?: string | null;
|
|
109
|
+
/**
|
|
110
|
+
* Shipping-method title from the source checkout; matched against the order channel's shipping-method mappings to pick a shipping rule.
|
|
111
|
+
* @type {string}
|
|
112
|
+
* @memberof CreateOrderRequest
|
|
113
|
+
*/
|
|
114
|
+
shippingMethodTitle?: string | null;
|
|
103
115
|
/**
|
|
104
116
|
* Raw platform-specific payload for reference.
|
|
105
117
|
* @type {{ [key: string]: any; }}
|
|
@@ -139,6 +151,8 @@ export function CreateOrderRequestFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
139
151
|
'totalAmount': json['totalAmount'] === undefined ? undefined : json['totalAmount'] === null ? null : json['totalAmount'],
|
|
140
152
|
'currency': json['currency'] === undefined ? undefined : json['currency'] === null ? null : json['currency'],
|
|
141
153
|
'notes': json['notes'] === undefined ? undefined : json['notes'] === null ? null : json['notes'],
|
|
154
|
+
'shippingRuleId': json['shippingRuleId'] === undefined ? undefined : json['shippingRuleId'] === null ? null : json['shippingRuleId'],
|
|
155
|
+
'shippingMethodTitle': json['shippingMethodTitle'] === undefined ? undefined : json['shippingMethodTitle'] === null ? null : json['shippingMethodTitle'],
|
|
142
156
|
'externalData': json['externalData'] === undefined ? undefined : json['externalData'] === null ? null : json['externalData'],
|
|
143
157
|
};
|
|
144
158
|
}
|
|
@@ -165,6 +179,8 @@ export function CreateOrderRequestToJSONTyped(value?: CreateOrderRequest | null,
|
|
|
165
179
|
'totalAmount': value['totalAmount'],
|
|
166
180
|
'currency': value['currency'],
|
|
167
181
|
'notes': value['notes'],
|
|
182
|
+
'shippingRuleId': value['shippingRuleId'],
|
|
183
|
+
'shippingMethodTitle': value['shippingMethodTitle'],
|
|
168
184
|
'externalData': value['externalData'],
|
|
169
185
|
};
|
|
170
186
|
}
|
|
@@ -0,0 +1,92 @@
|
|
|
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 { GetOrderChannelWebhookStatus200ResponseWebhooksInner } from './GetOrderChannelWebhookStatus200ResponseWebhooksInner';
|
|
17
|
+
import {
|
|
18
|
+
GetOrderChannelWebhookStatus200ResponseWebhooksInnerFromJSON,
|
|
19
|
+
GetOrderChannelWebhookStatus200ResponseWebhooksInnerFromJSONTyped,
|
|
20
|
+
GetOrderChannelWebhookStatus200ResponseWebhooksInnerToJSON,
|
|
21
|
+
GetOrderChannelWebhookStatus200ResponseWebhooksInnerToJSONTyped,
|
|
22
|
+
} from './GetOrderChannelWebhookStatus200ResponseWebhooksInner';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface GetOrderChannelWebhookStatus200Response
|
|
28
|
+
*/
|
|
29
|
+
export interface GetOrderChannelWebhookStatus200Response {
|
|
30
|
+
/**
|
|
31
|
+
* Whether webhooks are enabled for the channel.
|
|
32
|
+
* @type {boolean}
|
|
33
|
+
* @memberof GetOrderChannelWebhookStatus200Response
|
|
34
|
+
*/
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Expected callback URL for this channel.
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof GetOrderChannelWebhookStatus200Response
|
|
40
|
+
*/
|
|
41
|
+
webhookUrl: string;
|
|
42
|
+
/**
|
|
43
|
+
* Webhooks registered for this channel's callback URL.
|
|
44
|
+
* @type {Array<GetOrderChannelWebhookStatus200ResponseWebhooksInner>}
|
|
45
|
+
* @memberof GetOrderChannelWebhookStatus200Response
|
|
46
|
+
*/
|
|
47
|
+
webhooks: Array<GetOrderChannelWebhookStatus200ResponseWebhooksInner>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the GetOrderChannelWebhookStatus200Response interface.
|
|
52
|
+
*/
|
|
53
|
+
export function instanceOfGetOrderChannelWebhookStatus200Response(value: object): value is GetOrderChannelWebhookStatus200Response {
|
|
54
|
+
if (!('enabled' in value) || value['enabled'] === undefined) return false;
|
|
55
|
+
if (!('webhookUrl' in value) || value['webhookUrl'] === undefined) return false;
|
|
56
|
+
if (!('webhooks' in value) || value['webhooks'] === undefined) return false;
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function GetOrderChannelWebhookStatus200ResponseFromJSON(json: any): GetOrderChannelWebhookStatus200Response {
|
|
61
|
+
return GetOrderChannelWebhookStatus200ResponseFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function GetOrderChannelWebhookStatus200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetOrderChannelWebhookStatus200Response {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'enabled': json['enabled'],
|
|
71
|
+
'webhookUrl': json['webhookUrl'],
|
|
72
|
+
'webhooks': ((json['webhooks'] as Array<any>).map(GetOrderChannelWebhookStatus200ResponseWebhooksInnerFromJSON)),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function GetOrderChannelWebhookStatus200ResponseToJSON(json: any): GetOrderChannelWebhookStatus200Response {
|
|
77
|
+
return GetOrderChannelWebhookStatus200ResponseToJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function GetOrderChannelWebhookStatus200ResponseToJSONTyped(value?: GetOrderChannelWebhookStatus200Response | null, ignoreDiscriminator: boolean = false): any {
|
|
81
|
+
if (value == null) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'enabled': value['enabled'],
|
|
88
|
+
'webhookUrl': value['webhookUrl'],
|
|
89
|
+
'webhooks': ((value['webhooks'] as Array<any>).map(GetOrderChannelWebhookStatus200ResponseWebhooksInnerToJSON)),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|