@zippendo/sdk 1.3.1 → 1.3.3

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.
@@ -37,6 +37,7 @@ export interface ListOrdersRequest {
37
37
  status?: ListOrdersStatusEnum;
38
38
  orderChannelId?: string;
39
39
  search?: string;
40
+ filter?: string;
40
41
  }
41
42
  export interface UpdateOrderOperationRequest {
42
43
  orgId: string;
@@ -94,12 +95,12 @@ export declare class OrdersApi extends runtime.BaseAPI {
94
95
  */
95
96
  listOrdersRequestOpts(requestParameters: ListOrdersRequest): Promise<runtime.RequestOpts>;
96
97
  /**
97
- * Returns a paginated list of orders for an organization, filterable by status, channel, and search term.
98
+ * Returns a paginated list of orders for an organization, filterable by status, channel, search term and an advanced filter definition.
98
99
  * List orders
99
100
  */
100
101
  listOrdersRaw(requestParameters: ListOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListOrders200Response>>;
101
102
  /**
102
- * Returns a paginated list of orders for an organization, filterable by status, channel, and search term.
103
+ * Returns a paginated list of orders for an organization, filterable by status, channel, search term and an advanced filter definition.
103
104
  * List orders
104
105
  */
105
106
  listOrders(requestParameters: ListOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListOrders200Response>;
@@ -221,6 +221,9 @@ class OrdersApi extends runtime.BaseAPI {
221
221
  if (requestParameters['search'] != null) {
222
222
  queryParameters['search'] = requestParameters['search'];
223
223
  }
224
+ if (requestParameters['filter'] != null) {
225
+ queryParameters['filter'] = requestParameters['filter'];
226
+ }
224
227
  const headerParameters = {};
225
228
  if (this.configuration && this.configuration.accessToken) {
226
229
  const token = this.configuration.accessToken;
@@ -240,7 +243,7 @@ class OrdersApi extends runtime.BaseAPI {
240
243
  });
241
244
  }
242
245
  /**
243
- * Returns a paginated list of orders for an organization, filterable by status, channel, and search term.
246
+ * Returns a paginated list of orders for an organization, filterable by status, channel, search term and an advanced filter definition.
244
247
  * List orders
245
248
  */
246
249
  listOrdersRaw(requestParameters, initOverrides) {
@@ -251,7 +254,7 @@ class OrdersApi extends runtime.BaseAPI {
251
254
  });
252
255
  }
253
256
  /**
254
- * Returns a paginated list of orders for an organization, filterable by status, channel, and search term.
257
+ * Returns a paginated list of orders for an organization, filterable by status, channel, search term and an advanced filter definition.
255
258
  * List orders
256
259
  */
257
260
  listOrders(requestParameters, initOverrides) {
@@ -45,6 +45,10 @@ export interface DeleteShipmentRequest {
45
45
  orgId: string;
46
46
  shipmentId: string;
47
47
  }
48
+ export interface FetchShipmentLabelRequest {
49
+ orgId: string;
50
+ shipmentId: string;
51
+ }
48
52
  export interface GetShipmentRequest {
49
53
  orgId: string;
50
54
  shipmentId: string;
@@ -65,6 +69,7 @@ export interface ListShipmentsRequest {
65
69
  status?: ListShipmentsStatusEnum;
66
70
  type?: ListShipmentsTypeEnum;
67
71
  search?: string;
72
+ filter?: string;
68
73
  }
69
74
  export interface SendShipmentRequest {
70
75
  orgId: string;
@@ -126,12 +131,12 @@ export declare class ShipmentsApi extends runtime.BaseAPI {
126
131
  */
127
132
  createReturnShipmentRequestOpts(requestParameters: CreateReturnShipmentRequest): Promise<runtime.RequestOpts>;
128
133
  /**
129
- * Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule.
134
+ * Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule. The return is returned with its booking outcome: `dispatched`, or `error` with the carrier\'s reasons in `errors`.
130
135
  * Create return shipment
131
136
  */
132
137
  createReturnShipmentRaw(requestParameters: CreateReturnShipmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateShipment201Response>>;
133
138
  /**
134
- * Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule.
139
+ * Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule. The return is returned with its booking outcome: `dispatched`, or `error` with the carrier\'s reasons in `errors`.
135
140
  * Create return shipment
136
141
  */
137
142
  createReturnShipment(requestParameters: CreateReturnShipmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateShipment201Response>;
@@ -163,6 +168,20 @@ export declare class ShipmentsApi extends runtime.BaseAPI {
163
168
  * Delete shipment
164
169
  */
165
170
  deleteShipment(requestParameters: DeleteShipmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RevokeApiToken200Response>;
171
+ /**
172
+ * Creates request options for fetchShipmentLabel without sending the request
173
+ */
174
+ fetchShipmentLabelRequestOpts(requestParameters: FetchShipmentLabelRequest): Promise<runtime.RequestOpts>;
175
+ /**
176
+ * Ask the carrier again for the label of a dispatched shipment whose label could not be downloaded when it was sent (it carries a LABEL_DOWNLOAD_FAILED error). Stores the label, clears the error and returns the shipment.
177
+ * Fetch missing label
178
+ */
179
+ fetchShipmentLabelRaw(requestParameters: FetchShipmentLabelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateShipment201Response>>;
180
+ /**
181
+ * Ask the carrier again for the label of a dispatched shipment whose label could not be downloaded when it was sent (it carries a LABEL_DOWNLOAD_FAILED error). Stores the label, clears the error and returns the shipment.
182
+ * Fetch missing label
183
+ */
184
+ fetchShipmentLabel(requestParameters: FetchShipmentLabelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateShipment201Response>;
166
185
  /**
167
186
  * Creates request options for getShipment without sending the request
168
187
  */
@@ -196,12 +215,12 @@ export declare class ShipmentsApi extends runtime.BaseAPI {
196
215
  */
197
216
  listShipmentsRequestOpts(requestParameters: ListShipmentsRequest): Promise<runtime.RequestOpts>;
198
217
  /**
199
- * List all shipments for an organization, paginated and ordered by newest first.
218
+ * List all shipments for an organization, paginated and ordered by newest first. Accepts an advanced filter definition.
200
219
  * List shipments
201
220
  */
202
221
  listShipmentsRaw(requestParameters: ListShipmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListShipments200Response>>;
203
222
  /**
204
- * List all shipments for an organization, paginated and ordered by newest first.
223
+ * List all shipments for an organization, paginated and ordered by newest first. Accepts an advanced filter definition.
205
224
  * List shipments
206
225
  */
207
226
  listShipments(requestParameters: ListShipmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListShipments200Response>;
@@ -184,7 +184,7 @@ class ShipmentsApi extends runtime.BaseAPI {
184
184
  });
185
185
  }
186
186
  /**
187
- * Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule.
187
+ * Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule. The return is returned with its booking outcome: `dispatched`, or `error` with the carrier\'s reasons in `errors`.
188
188
  * Create return shipment
189
189
  */
190
190
  createReturnShipmentRaw(requestParameters, initOverrides) {
@@ -195,7 +195,7 @@ class ShipmentsApi extends runtime.BaseAPI {
195
195
  });
196
196
  }
197
197
  /**
198
- * Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule.
198
+ * Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule. The return is returned with its booking outcome: `dispatched`, or `error` with the carrier\'s reasons in `errors`.
199
199
  * Create return shipment
200
200
  */
201
201
  createReturnShipment(requestParameters, initOverrides) {
@@ -309,6 +309,58 @@ class ShipmentsApi extends runtime.BaseAPI {
309
309
  return yield response.value();
310
310
  });
311
311
  }
312
+ /**
313
+ * Creates request options for fetchShipmentLabel without sending the request
314
+ */
315
+ fetchShipmentLabelRequestOpts(requestParameters) {
316
+ return __awaiter(this, void 0, void 0, function* () {
317
+ if (requestParameters['orgId'] == null) {
318
+ throw new runtime.RequiredError('orgId', 'Required parameter "orgId" was null or undefined when calling fetchShipmentLabel().');
319
+ }
320
+ if (requestParameters['shipmentId'] == null) {
321
+ throw new runtime.RequiredError('shipmentId', 'Required parameter "shipmentId" was null or undefined when calling fetchShipmentLabel().');
322
+ }
323
+ const queryParameters = {};
324
+ const headerParameters = {};
325
+ if (this.configuration && this.configuration.accessToken) {
326
+ const token = this.configuration.accessToken;
327
+ const tokenString = yield token("bearerAuth", []);
328
+ if (tokenString) {
329
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
330
+ }
331
+ }
332
+ let urlPath = `/orgs/{orgId}/shipments/{shipmentId}/fetch-label`;
333
+ urlPath = urlPath.replace('{orgId}', encodeURIComponent(String(requestParameters['orgId'])));
334
+ urlPath = urlPath.replace('{shipmentId}', encodeURIComponent(String(requestParameters['shipmentId'])));
335
+ return {
336
+ path: urlPath,
337
+ method: 'POST',
338
+ headers: headerParameters,
339
+ query: queryParameters,
340
+ };
341
+ });
342
+ }
343
+ /**
344
+ * Ask the carrier again for the label of a dispatched shipment whose label could not be downloaded when it was sent (it carries a LABEL_DOWNLOAD_FAILED error). Stores the label, clears the error and returns the shipment.
345
+ * Fetch missing label
346
+ */
347
+ fetchShipmentLabelRaw(requestParameters, initOverrides) {
348
+ return __awaiter(this, void 0, void 0, function* () {
349
+ const requestOptions = yield this.fetchShipmentLabelRequestOpts(requestParameters);
350
+ const response = yield this.request(requestOptions, initOverrides);
351
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, CreateShipment201Response_1.CreateShipment201ResponseFromJSON)(jsonValue));
352
+ });
353
+ }
354
+ /**
355
+ * Ask the carrier again for the label of a dispatched shipment whose label could not be downloaded when it was sent (it carries a LABEL_DOWNLOAD_FAILED error). Stores the label, clears the error and returns the shipment.
356
+ * Fetch missing label
357
+ */
358
+ fetchShipmentLabel(requestParameters, initOverrides) {
359
+ return __awaiter(this, void 0, void 0, function* () {
360
+ const response = yield this.fetchShipmentLabelRaw(requestParameters, initOverrides);
361
+ return yield response.value();
362
+ });
363
+ }
312
364
  /**
313
365
  * Creates request options for getShipment without sending the request
314
366
  */
@@ -452,6 +504,9 @@ class ShipmentsApi extends runtime.BaseAPI {
452
504
  if (requestParameters['search'] != null) {
453
505
  queryParameters['search'] = requestParameters['search'];
454
506
  }
507
+ if (requestParameters['filter'] != null) {
508
+ queryParameters['filter'] = requestParameters['filter'];
509
+ }
455
510
  const headerParameters = {};
456
511
  if (this.configuration && this.configuration.accessToken) {
457
512
  const token = this.configuration.accessToken;
@@ -471,7 +526,7 @@ class ShipmentsApi extends runtime.BaseAPI {
471
526
  });
472
527
  }
473
528
  /**
474
- * List all shipments for an organization, paginated and ordered by newest first.
529
+ * List all shipments for an organization, paginated and ordered by newest first. Accepts an advanced filter definition.
475
530
  * List shipments
476
531
  */
477
532
  listShipmentsRaw(requestParameters, initOverrides) {
@@ -482,7 +537,7 @@ class ShipmentsApi extends runtime.BaseAPI {
482
537
  });
483
538
  }
484
539
  /**
485
- * List all shipments for an organization, paginated and ordered by newest first.
540
+ * List all shipments for an organization, paginated and ordered by newest first. Accepts an advanced filter definition.
486
541
  * List shipments
487
542
  */
488
543
  listShipments(requestParameters, initOverrides) {
@@ -37,6 +37,7 @@ export interface ListOrdersRequest {
37
37
  status?: ListOrdersStatusEnum;
38
38
  orderChannelId?: string;
39
39
  search?: string;
40
+ filter?: string;
40
41
  }
41
42
  export interface UpdateOrderOperationRequest {
42
43
  orgId: string;
@@ -94,12 +95,12 @@ export declare class OrdersApi extends runtime.BaseAPI {
94
95
  */
95
96
  listOrdersRequestOpts(requestParameters: ListOrdersRequest): Promise<runtime.RequestOpts>;
96
97
  /**
97
- * Returns a paginated list of orders for an organization, filterable by status, channel, and search term.
98
+ * Returns a paginated list of orders for an organization, filterable by status, channel, search term and an advanced filter definition.
98
99
  * List orders
99
100
  */
100
101
  listOrdersRaw(requestParameters: ListOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListOrders200Response>>;
101
102
  /**
102
- * Returns a paginated list of orders for an organization, filterable by status, channel, and search term.
103
+ * Returns a paginated list of orders for an organization, filterable by status, channel, search term and an advanced filter definition.
103
104
  * List orders
104
105
  */
105
106
  listOrders(requestParameters: ListOrdersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListOrders200Response>;
@@ -218,6 +218,9 @@ export class OrdersApi extends runtime.BaseAPI {
218
218
  if (requestParameters['search'] != null) {
219
219
  queryParameters['search'] = requestParameters['search'];
220
220
  }
221
+ if (requestParameters['filter'] != null) {
222
+ queryParameters['filter'] = requestParameters['filter'];
223
+ }
221
224
  const headerParameters = {};
222
225
  if (this.configuration && this.configuration.accessToken) {
223
226
  const token = this.configuration.accessToken;
@@ -237,7 +240,7 @@ export class OrdersApi extends runtime.BaseAPI {
237
240
  });
238
241
  }
239
242
  /**
240
- * Returns a paginated list of orders for an organization, filterable by status, channel, and search term.
243
+ * Returns a paginated list of orders for an organization, filterable by status, channel, search term and an advanced filter definition.
241
244
  * List orders
242
245
  */
243
246
  listOrdersRaw(requestParameters, initOverrides) {
@@ -248,7 +251,7 @@ export class OrdersApi extends runtime.BaseAPI {
248
251
  });
249
252
  }
250
253
  /**
251
- * Returns a paginated list of orders for an organization, filterable by status, channel, and search term.
254
+ * Returns a paginated list of orders for an organization, filterable by status, channel, search term and an advanced filter definition.
252
255
  * List orders
253
256
  */
254
257
  listOrders(requestParameters, initOverrides) {
@@ -45,6 +45,10 @@ export interface DeleteShipmentRequest {
45
45
  orgId: string;
46
46
  shipmentId: string;
47
47
  }
48
+ export interface FetchShipmentLabelRequest {
49
+ orgId: string;
50
+ shipmentId: string;
51
+ }
48
52
  export interface GetShipmentRequest {
49
53
  orgId: string;
50
54
  shipmentId: string;
@@ -65,6 +69,7 @@ export interface ListShipmentsRequest {
65
69
  status?: ListShipmentsStatusEnum;
66
70
  type?: ListShipmentsTypeEnum;
67
71
  search?: string;
72
+ filter?: string;
68
73
  }
69
74
  export interface SendShipmentRequest {
70
75
  orgId: string;
@@ -126,12 +131,12 @@ export declare class ShipmentsApi extends runtime.BaseAPI {
126
131
  */
127
132
  createReturnShipmentRequestOpts(requestParameters: CreateReturnShipmentRequest): Promise<runtime.RequestOpts>;
128
133
  /**
129
- * Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule.
134
+ * Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule. The return is returned with its booking outcome: `dispatched`, or `error` with the carrier\'s reasons in `errors`.
130
135
  * Create return shipment
131
136
  */
132
137
  createReturnShipmentRaw(requestParameters: CreateReturnShipmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateShipment201Response>>;
133
138
  /**
134
- * Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule.
139
+ * Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule. The return is returned with its booking outcome: `dispatched`, or `error` with the carrier\'s reasons in `errors`.
135
140
  * Create return shipment
136
141
  */
137
142
  createReturnShipment(requestParameters: CreateReturnShipmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateShipment201Response>;
@@ -163,6 +168,20 @@ export declare class ShipmentsApi extends runtime.BaseAPI {
163
168
  * Delete shipment
164
169
  */
165
170
  deleteShipment(requestParameters: DeleteShipmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RevokeApiToken200Response>;
171
+ /**
172
+ * Creates request options for fetchShipmentLabel without sending the request
173
+ */
174
+ fetchShipmentLabelRequestOpts(requestParameters: FetchShipmentLabelRequest): Promise<runtime.RequestOpts>;
175
+ /**
176
+ * Ask the carrier again for the label of a dispatched shipment whose label could not be downloaded when it was sent (it carries a LABEL_DOWNLOAD_FAILED error). Stores the label, clears the error and returns the shipment.
177
+ * Fetch missing label
178
+ */
179
+ fetchShipmentLabelRaw(requestParameters: FetchShipmentLabelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateShipment201Response>>;
180
+ /**
181
+ * Ask the carrier again for the label of a dispatched shipment whose label could not be downloaded when it was sent (it carries a LABEL_DOWNLOAD_FAILED error). Stores the label, clears the error and returns the shipment.
182
+ * Fetch missing label
183
+ */
184
+ fetchShipmentLabel(requestParameters: FetchShipmentLabelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateShipment201Response>;
166
185
  /**
167
186
  * Creates request options for getShipment without sending the request
168
187
  */
@@ -196,12 +215,12 @@ export declare class ShipmentsApi extends runtime.BaseAPI {
196
215
  */
197
216
  listShipmentsRequestOpts(requestParameters: ListShipmentsRequest): Promise<runtime.RequestOpts>;
198
217
  /**
199
- * List all shipments for an organization, paginated and ordered by newest first.
218
+ * List all shipments for an organization, paginated and ordered by newest first. Accepts an advanced filter definition.
200
219
  * List shipments
201
220
  */
202
221
  listShipmentsRaw(requestParameters: ListShipmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListShipments200Response>>;
203
222
  /**
204
- * List all shipments for an organization, paginated and ordered by newest first.
223
+ * List all shipments for an organization, paginated and ordered by newest first. Accepts an advanced filter definition.
205
224
  * List shipments
206
225
  */
207
226
  listShipments(requestParameters: ListShipmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListShipments200Response>;
@@ -181,7 +181,7 @@ export class ShipmentsApi extends runtime.BaseAPI {
181
181
  });
182
182
  }
183
183
  /**
184
- * Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule.
184
+ * Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule. The return is returned with its booking outcome: `dispatched`, or `error` with the carrier\'s reasons in `errors`.
185
185
  * Create return shipment
186
186
  */
187
187
  createReturnShipmentRaw(requestParameters, initOverrides) {
@@ -192,7 +192,7 @@ export class ShipmentsApi extends runtime.BaseAPI {
192
192
  });
193
193
  }
194
194
  /**
195
- * Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule.
195
+ * Create and auto-send a return shipment from a dispatched outbound shipment with swapped sender/receiver. Requires a configured return shipping rule. The return is returned with its booking outcome: `dispatched`, or `error` with the carrier\'s reasons in `errors`.
196
196
  * Create return shipment
197
197
  */
198
198
  createReturnShipment(requestParameters, initOverrides) {
@@ -306,6 +306,58 @@ export class ShipmentsApi extends runtime.BaseAPI {
306
306
  return yield response.value();
307
307
  });
308
308
  }
309
+ /**
310
+ * Creates request options for fetchShipmentLabel without sending the request
311
+ */
312
+ fetchShipmentLabelRequestOpts(requestParameters) {
313
+ return __awaiter(this, void 0, void 0, function* () {
314
+ if (requestParameters['orgId'] == null) {
315
+ throw new runtime.RequiredError('orgId', 'Required parameter "orgId" was null or undefined when calling fetchShipmentLabel().');
316
+ }
317
+ if (requestParameters['shipmentId'] == null) {
318
+ throw new runtime.RequiredError('shipmentId', 'Required parameter "shipmentId" was null or undefined when calling fetchShipmentLabel().');
319
+ }
320
+ const queryParameters = {};
321
+ const headerParameters = {};
322
+ if (this.configuration && this.configuration.accessToken) {
323
+ const token = this.configuration.accessToken;
324
+ const tokenString = yield token("bearerAuth", []);
325
+ if (tokenString) {
326
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
327
+ }
328
+ }
329
+ let urlPath = `/orgs/{orgId}/shipments/{shipmentId}/fetch-label`;
330
+ urlPath = urlPath.replace('{orgId}', encodeURIComponent(String(requestParameters['orgId'])));
331
+ urlPath = urlPath.replace('{shipmentId}', encodeURIComponent(String(requestParameters['shipmentId'])));
332
+ return {
333
+ path: urlPath,
334
+ method: 'POST',
335
+ headers: headerParameters,
336
+ query: queryParameters,
337
+ };
338
+ });
339
+ }
340
+ /**
341
+ * Ask the carrier again for the label of a dispatched shipment whose label could not be downloaded when it was sent (it carries a LABEL_DOWNLOAD_FAILED error). Stores the label, clears the error and returns the shipment.
342
+ * Fetch missing label
343
+ */
344
+ fetchShipmentLabelRaw(requestParameters, initOverrides) {
345
+ return __awaiter(this, void 0, void 0, function* () {
346
+ const requestOptions = yield this.fetchShipmentLabelRequestOpts(requestParameters);
347
+ const response = yield this.request(requestOptions, initOverrides);
348
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateShipment201ResponseFromJSON(jsonValue));
349
+ });
350
+ }
351
+ /**
352
+ * Ask the carrier again for the label of a dispatched shipment whose label could not be downloaded when it was sent (it carries a LABEL_DOWNLOAD_FAILED error). Stores the label, clears the error and returns the shipment.
353
+ * Fetch missing label
354
+ */
355
+ fetchShipmentLabel(requestParameters, initOverrides) {
356
+ return __awaiter(this, void 0, void 0, function* () {
357
+ const response = yield this.fetchShipmentLabelRaw(requestParameters, initOverrides);
358
+ return yield response.value();
359
+ });
360
+ }
309
361
  /**
310
362
  * Creates request options for getShipment without sending the request
311
363
  */
@@ -449,6 +501,9 @@ export class ShipmentsApi extends runtime.BaseAPI {
449
501
  if (requestParameters['search'] != null) {
450
502
  queryParameters['search'] = requestParameters['search'];
451
503
  }
504
+ if (requestParameters['filter'] != null) {
505
+ queryParameters['filter'] = requestParameters['filter'];
506
+ }
452
507
  const headerParameters = {};
453
508
  if (this.configuration && this.configuration.accessToken) {
454
509
  const token = this.configuration.accessToken;
@@ -468,7 +523,7 @@ export class ShipmentsApi extends runtime.BaseAPI {
468
523
  });
469
524
  }
470
525
  /**
471
- * List all shipments for an organization, paginated and ordered by newest first.
526
+ * List all shipments for an organization, paginated and ordered by newest first. Accepts an advanced filter definition.
472
527
  * List shipments
473
528
  */
474
529
  listShipmentsRaw(requestParameters, initOverrides) {
@@ -479,7 +534,7 @@ export class ShipmentsApi extends runtime.BaseAPI {
479
534
  });
480
535
  }
481
536
  /**
482
- * List all shipments for an organization, paginated and ordered by newest first.
537
+ * List all shipments for an organization, paginated and ordered by newest first. Accepts an advanced filter definition.
483
538
  * List shipments
484
539
  */
485
540
  listShipments(requestParameters, initOverrides) {
@@ -142,6 +142,10 @@ export declare const BatchSendShipments200ResponseResultsInnerCodeEnum: {
142
142
  readonly CarrierConfigInvalid: "CARRIER_CONFIG_INVALID";
143
143
  readonly CarrierParameterInvalid: "CARRIER_PARAMETER_INVALID";
144
144
  readonly CarrierServerUnavailable: "CARRIER_SERVER_UNAVAILABLE";
145
+ readonly CarrierUnreachable: "CARRIER_UNREACHABLE";
146
+ readonly CarrierNotResponding: "CARRIER_NOT_RESPONDING";
147
+ readonly LabelDownloadFailed: "LABEL_DOWNLOAD_FAILED";
148
+ readonly CarrierDocumentIncomplete: "CARRIER_DOCUMENT_INCOMPLETE";
145
149
  readonly CarrierGlsWrongAddress: "CARRIER_GLS_WRONG_ADDRESS";
146
150
  readonly CarrierDaoInvalidPostalCode: "CARRIER_DAO_INVALID_POSTAL_CODE";
147
151
  readonly CarrierPostnordBookingFailed: "CARRIER_POSTNORD_BOOKING_FAILED";
@@ -149,6 +153,9 @@ export declare const BatchSendShipments200ResponseResultsInnerCodeEnum: {
149
153
  readonly CarrierDhlExpressBookingFailed: "CARRIER_DHL_EXPRESS_BOOKING_FAILED";
150
154
  readonly CarrierUpsBookingFailed: "CARRIER_UPS_BOOKING_FAILED";
151
155
  readonly CarrierMatkahuoltoBookingFailed: "CARRIER_MATKAHUOLTO_BOOKING_FAILED";
156
+ readonly CarrierDpdPlBookingFailed: "CARRIER_DPD_PL_BOOKING_FAILED";
157
+ readonly CarrierPostnlBookingFailed: "CARRIER_POSTNL_BOOKING_FAILED";
158
+ readonly CarrierRoyalMailBookingFailed: "CARRIER_ROYAL_MAIL_BOOKING_FAILED";
152
159
  readonly CarrierTrackingWebhookRegistrationFailed: "CARRIER_TRACKING_WEBHOOK_REGISTRATION_FAILED";
153
160
  readonly CarrierCustomsUnsupportedProduct: "CARRIER_CUSTOMS_UNSUPPORTED_PRODUCT";
154
161
  readonly CarrierCustomsIncomplete: "CARRIER_CUSTOMS_INCOMPLETE";
@@ -185,6 +192,9 @@ export declare const BatchSendShipments200ResponseResultsInnerCodeEnum: {
185
192
  readonly AutomationInvalid: "AUTOMATION_INVALID";
186
193
  readonly ZippyDisabled: "ZIPPY_DISABLED";
187
194
  readonly ConversationNotFound: "CONVERSATION_NOT_FOUND";
195
+ readonly FilterInvalid: "FILTER_INVALID";
196
+ readonly SavedViewNotFound: "SAVED_VIEW_NOT_FOUND";
197
+ readonly SavedViewLimitReached: "SAVED_VIEW_LIMIT_REACHED";
188
198
  readonly AdminForbidden: "ADMIN_FORBIDDEN";
189
199
  readonly JobHandlerNotRegistered: "JOB_HANDLER_NOT_REGISTERED";
190
200
  readonly JobQueueNotConfigured: "JOB_QUEUE_NOT_CONFIGURED";
@@ -106,6 +106,10 @@ export const BatchSendShipments200ResponseResultsInnerCodeEnum = {
106
106
  CarrierConfigInvalid: 'CARRIER_CONFIG_INVALID',
107
107
  CarrierParameterInvalid: 'CARRIER_PARAMETER_INVALID',
108
108
  CarrierServerUnavailable: 'CARRIER_SERVER_UNAVAILABLE',
109
+ CarrierUnreachable: 'CARRIER_UNREACHABLE',
110
+ CarrierNotResponding: 'CARRIER_NOT_RESPONDING',
111
+ LabelDownloadFailed: 'LABEL_DOWNLOAD_FAILED',
112
+ CarrierDocumentIncomplete: 'CARRIER_DOCUMENT_INCOMPLETE',
109
113
  CarrierGlsWrongAddress: 'CARRIER_GLS_WRONG_ADDRESS',
110
114
  CarrierDaoInvalidPostalCode: 'CARRIER_DAO_INVALID_POSTAL_CODE',
111
115
  CarrierPostnordBookingFailed: 'CARRIER_POSTNORD_BOOKING_FAILED',
@@ -113,6 +117,9 @@ export const BatchSendShipments200ResponseResultsInnerCodeEnum = {
113
117
  CarrierDhlExpressBookingFailed: 'CARRIER_DHL_EXPRESS_BOOKING_FAILED',
114
118
  CarrierUpsBookingFailed: 'CARRIER_UPS_BOOKING_FAILED',
115
119
  CarrierMatkahuoltoBookingFailed: 'CARRIER_MATKAHUOLTO_BOOKING_FAILED',
120
+ CarrierDpdPlBookingFailed: 'CARRIER_DPD_PL_BOOKING_FAILED',
121
+ CarrierPostnlBookingFailed: 'CARRIER_POSTNL_BOOKING_FAILED',
122
+ CarrierRoyalMailBookingFailed: 'CARRIER_ROYAL_MAIL_BOOKING_FAILED',
116
123
  CarrierTrackingWebhookRegistrationFailed: 'CARRIER_TRACKING_WEBHOOK_REGISTRATION_FAILED',
117
124
  CarrierCustomsUnsupportedProduct: 'CARRIER_CUSTOMS_UNSUPPORTED_PRODUCT',
118
125
  CarrierCustomsIncomplete: 'CARRIER_CUSTOMS_INCOMPLETE',
@@ -149,6 +156,9 @@ export const BatchSendShipments200ResponseResultsInnerCodeEnum = {
149
156
  AutomationInvalid: 'AUTOMATION_INVALID',
150
157
  ZippyDisabled: 'ZIPPY_DISABLED',
151
158
  ConversationNotFound: 'CONVERSATION_NOT_FOUND',
159
+ FilterInvalid: 'FILTER_INVALID',
160
+ SavedViewNotFound: 'SAVED_VIEW_NOT_FOUND',
161
+ SavedViewLimitReached: 'SAVED_VIEW_LIMIT_REACHED',
152
162
  AdminForbidden: 'ADMIN_FORBIDDEN',
153
163
  JobHandlerNotRegistered: 'JOB_HANDLER_NOT_REGISTERED',
154
164
  JobQueueNotConfigured: 'JOB_QUEUE_NOT_CONFIGURED',
@@ -120,6 +120,10 @@ export declare const ListApiTokens401ResponseCodeEnum: {
120
120
  readonly CarrierConfigInvalid: "CARRIER_CONFIG_INVALID";
121
121
  readonly CarrierParameterInvalid: "CARRIER_PARAMETER_INVALID";
122
122
  readonly CarrierServerUnavailable: "CARRIER_SERVER_UNAVAILABLE";
123
+ readonly CarrierUnreachable: "CARRIER_UNREACHABLE";
124
+ readonly CarrierNotResponding: "CARRIER_NOT_RESPONDING";
125
+ readonly LabelDownloadFailed: "LABEL_DOWNLOAD_FAILED";
126
+ readonly CarrierDocumentIncomplete: "CARRIER_DOCUMENT_INCOMPLETE";
123
127
  readonly CarrierGlsWrongAddress: "CARRIER_GLS_WRONG_ADDRESS";
124
128
  readonly CarrierDaoInvalidPostalCode: "CARRIER_DAO_INVALID_POSTAL_CODE";
125
129
  readonly CarrierPostnordBookingFailed: "CARRIER_POSTNORD_BOOKING_FAILED";
@@ -127,6 +131,9 @@ export declare const ListApiTokens401ResponseCodeEnum: {
127
131
  readonly CarrierDhlExpressBookingFailed: "CARRIER_DHL_EXPRESS_BOOKING_FAILED";
128
132
  readonly CarrierUpsBookingFailed: "CARRIER_UPS_BOOKING_FAILED";
129
133
  readonly CarrierMatkahuoltoBookingFailed: "CARRIER_MATKAHUOLTO_BOOKING_FAILED";
134
+ readonly CarrierDpdPlBookingFailed: "CARRIER_DPD_PL_BOOKING_FAILED";
135
+ readonly CarrierPostnlBookingFailed: "CARRIER_POSTNL_BOOKING_FAILED";
136
+ readonly CarrierRoyalMailBookingFailed: "CARRIER_ROYAL_MAIL_BOOKING_FAILED";
130
137
  readonly CarrierTrackingWebhookRegistrationFailed: "CARRIER_TRACKING_WEBHOOK_REGISTRATION_FAILED";
131
138
  readonly CarrierCustomsUnsupportedProduct: "CARRIER_CUSTOMS_UNSUPPORTED_PRODUCT";
132
139
  readonly CarrierCustomsIncomplete: "CARRIER_CUSTOMS_INCOMPLETE";
@@ -163,6 +170,9 @@ export declare const ListApiTokens401ResponseCodeEnum: {
163
170
  readonly AutomationInvalid: "AUTOMATION_INVALID";
164
171
  readonly ZippyDisabled: "ZIPPY_DISABLED";
165
172
  readonly ConversationNotFound: "CONVERSATION_NOT_FOUND";
173
+ readonly FilterInvalid: "FILTER_INVALID";
174
+ readonly SavedViewNotFound: "SAVED_VIEW_NOT_FOUND";
175
+ readonly SavedViewLimitReached: "SAVED_VIEW_LIMIT_REACHED";
166
176
  readonly AdminForbidden: "ADMIN_FORBIDDEN";
167
177
  readonly JobHandlerNotRegistered: "JOB_HANDLER_NOT_REGISTERED";
168
178
  readonly JobQueueNotConfigured: "JOB_QUEUE_NOT_CONFIGURED";
@@ -97,6 +97,10 @@ export const ListApiTokens401ResponseCodeEnum = {
97
97
  CarrierConfigInvalid: 'CARRIER_CONFIG_INVALID',
98
98
  CarrierParameterInvalid: 'CARRIER_PARAMETER_INVALID',
99
99
  CarrierServerUnavailable: 'CARRIER_SERVER_UNAVAILABLE',
100
+ CarrierUnreachable: 'CARRIER_UNREACHABLE',
101
+ CarrierNotResponding: 'CARRIER_NOT_RESPONDING',
102
+ LabelDownloadFailed: 'LABEL_DOWNLOAD_FAILED',
103
+ CarrierDocumentIncomplete: 'CARRIER_DOCUMENT_INCOMPLETE',
100
104
  CarrierGlsWrongAddress: 'CARRIER_GLS_WRONG_ADDRESS',
101
105
  CarrierDaoInvalidPostalCode: 'CARRIER_DAO_INVALID_POSTAL_CODE',
102
106
  CarrierPostnordBookingFailed: 'CARRIER_POSTNORD_BOOKING_FAILED',
@@ -104,6 +108,9 @@ export const ListApiTokens401ResponseCodeEnum = {
104
108
  CarrierDhlExpressBookingFailed: 'CARRIER_DHL_EXPRESS_BOOKING_FAILED',
105
109
  CarrierUpsBookingFailed: 'CARRIER_UPS_BOOKING_FAILED',
106
110
  CarrierMatkahuoltoBookingFailed: 'CARRIER_MATKAHUOLTO_BOOKING_FAILED',
111
+ CarrierDpdPlBookingFailed: 'CARRIER_DPD_PL_BOOKING_FAILED',
112
+ CarrierPostnlBookingFailed: 'CARRIER_POSTNL_BOOKING_FAILED',
113
+ CarrierRoyalMailBookingFailed: 'CARRIER_ROYAL_MAIL_BOOKING_FAILED',
107
114
  CarrierTrackingWebhookRegistrationFailed: 'CARRIER_TRACKING_WEBHOOK_REGISTRATION_FAILED',
108
115
  CarrierCustomsUnsupportedProduct: 'CARRIER_CUSTOMS_UNSUPPORTED_PRODUCT',
109
116
  CarrierCustomsIncomplete: 'CARRIER_CUSTOMS_INCOMPLETE',
@@ -140,6 +147,9 @@ export const ListApiTokens401ResponseCodeEnum = {
140
147
  AutomationInvalid: 'AUTOMATION_INVALID',
141
148
  ZippyDisabled: 'ZIPPY_DISABLED',
142
149
  ConversationNotFound: 'CONVERSATION_NOT_FOUND',
150
+ FilterInvalid: 'FILTER_INVALID',
151
+ SavedViewNotFound: 'SAVED_VIEW_NOT_FOUND',
152
+ SavedViewLimitReached: 'SAVED_VIEW_LIMIT_REACHED',
143
153
  AdminForbidden: 'ADMIN_FORBIDDEN',
144
154
  JobHandlerNotRegistered: 'JOB_HANDLER_NOT_REGISTERED',
145
155
  JobQueueNotConfigured: 'JOB_QUEUE_NOT_CONFIGURED',
@@ -127,6 +127,10 @@ export declare const SendShipment422ResponseCodeEnum: {
127
127
  readonly CarrierConfigInvalid: "CARRIER_CONFIG_INVALID";
128
128
  readonly CarrierParameterInvalid: "CARRIER_PARAMETER_INVALID";
129
129
  readonly CarrierServerUnavailable: "CARRIER_SERVER_UNAVAILABLE";
130
+ readonly CarrierUnreachable: "CARRIER_UNREACHABLE";
131
+ readonly CarrierNotResponding: "CARRIER_NOT_RESPONDING";
132
+ readonly LabelDownloadFailed: "LABEL_DOWNLOAD_FAILED";
133
+ readonly CarrierDocumentIncomplete: "CARRIER_DOCUMENT_INCOMPLETE";
130
134
  readonly CarrierGlsWrongAddress: "CARRIER_GLS_WRONG_ADDRESS";
131
135
  readonly CarrierDaoInvalidPostalCode: "CARRIER_DAO_INVALID_POSTAL_CODE";
132
136
  readonly CarrierPostnordBookingFailed: "CARRIER_POSTNORD_BOOKING_FAILED";
@@ -134,6 +138,9 @@ export declare const SendShipment422ResponseCodeEnum: {
134
138
  readonly CarrierDhlExpressBookingFailed: "CARRIER_DHL_EXPRESS_BOOKING_FAILED";
135
139
  readonly CarrierUpsBookingFailed: "CARRIER_UPS_BOOKING_FAILED";
136
140
  readonly CarrierMatkahuoltoBookingFailed: "CARRIER_MATKAHUOLTO_BOOKING_FAILED";
141
+ readonly CarrierDpdPlBookingFailed: "CARRIER_DPD_PL_BOOKING_FAILED";
142
+ readonly CarrierPostnlBookingFailed: "CARRIER_POSTNL_BOOKING_FAILED";
143
+ readonly CarrierRoyalMailBookingFailed: "CARRIER_ROYAL_MAIL_BOOKING_FAILED";
137
144
  readonly CarrierTrackingWebhookRegistrationFailed: "CARRIER_TRACKING_WEBHOOK_REGISTRATION_FAILED";
138
145
  readonly CarrierCustomsUnsupportedProduct: "CARRIER_CUSTOMS_UNSUPPORTED_PRODUCT";
139
146
  readonly CarrierCustomsIncomplete: "CARRIER_CUSTOMS_INCOMPLETE";
@@ -170,6 +177,9 @@ export declare const SendShipment422ResponseCodeEnum: {
170
177
  readonly AutomationInvalid: "AUTOMATION_INVALID";
171
178
  readonly ZippyDisabled: "ZIPPY_DISABLED";
172
179
  readonly ConversationNotFound: "CONVERSATION_NOT_FOUND";
180
+ readonly FilterInvalid: "FILTER_INVALID";
181
+ readonly SavedViewNotFound: "SAVED_VIEW_NOT_FOUND";
182
+ readonly SavedViewLimitReached: "SAVED_VIEW_LIMIT_REACHED";
173
183
  readonly AdminForbidden: "ADMIN_FORBIDDEN";
174
184
  readonly JobHandlerNotRegistered: "JOB_HANDLER_NOT_REGISTERED";
175
185
  readonly JobQueueNotConfigured: "JOB_QUEUE_NOT_CONFIGURED";
@@ -98,6 +98,10 @@ export const SendShipment422ResponseCodeEnum = {
98
98
  CarrierConfigInvalid: 'CARRIER_CONFIG_INVALID',
99
99
  CarrierParameterInvalid: 'CARRIER_PARAMETER_INVALID',
100
100
  CarrierServerUnavailable: 'CARRIER_SERVER_UNAVAILABLE',
101
+ CarrierUnreachable: 'CARRIER_UNREACHABLE',
102
+ CarrierNotResponding: 'CARRIER_NOT_RESPONDING',
103
+ LabelDownloadFailed: 'LABEL_DOWNLOAD_FAILED',
104
+ CarrierDocumentIncomplete: 'CARRIER_DOCUMENT_INCOMPLETE',
101
105
  CarrierGlsWrongAddress: 'CARRIER_GLS_WRONG_ADDRESS',
102
106
  CarrierDaoInvalidPostalCode: 'CARRIER_DAO_INVALID_POSTAL_CODE',
103
107
  CarrierPostnordBookingFailed: 'CARRIER_POSTNORD_BOOKING_FAILED',
@@ -105,6 +109,9 @@ export const SendShipment422ResponseCodeEnum = {
105
109
  CarrierDhlExpressBookingFailed: 'CARRIER_DHL_EXPRESS_BOOKING_FAILED',
106
110
  CarrierUpsBookingFailed: 'CARRIER_UPS_BOOKING_FAILED',
107
111
  CarrierMatkahuoltoBookingFailed: 'CARRIER_MATKAHUOLTO_BOOKING_FAILED',
112
+ CarrierDpdPlBookingFailed: 'CARRIER_DPD_PL_BOOKING_FAILED',
113
+ CarrierPostnlBookingFailed: 'CARRIER_POSTNL_BOOKING_FAILED',
114
+ CarrierRoyalMailBookingFailed: 'CARRIER_ROYAL_MAIL_BOOKING_FAILED',
108
115
  CarrierTrackingWebhookRegistrationFailed: 'CARRIER_TRACKING_WEBHOOK_REGISTRATION_FAILED',
109
116
  CarrierCustomsUnsupportedProduct: 'CARRIER_CUSTOMS_UNSUPPORTED_PRODUCT',
110
117
  CarrierCustomsIncomplete: 'CARRIER_CUSTOMS_INCOMPLETE',
@@ -141,6 +148,9 @@ export const SendShipment422ResponseCodeEnum = {
141
148
  AutomationInvalid: 'AUTOMATION_INVALID',
142
149
  ZippyDisabled: 'ZIPPY_DISABLED',
143
150
  ConversationNotFound: 'CONVERSATION_NOT_FOUND',
151
+ FilterInvalid: 'FILTER_INVALID',
152
+ SavedViewNotFound: 'SAVED_VIEW_NOT_FOUND',
153
+ SavedViewLimitReached: 'SAVED_VIEW_LIMIT_REACHED',
144
154
  AdminForbidden: 'ADMIN_FORBIDDEN',
145
155
  JobHandlerNotRegistered: 'JOB_HANDLER_NOT_REGISTERED',
146
156
  JobQueueNotConfigured: 'JOB_QUEUE_NOT_CONFIGURED',