@deliverart/sdk-js-sales-mode 2.5.34 → 2.6.0
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/index.cjs +4 -10
- package/dist/index.d.cts +22 -9
- package/dist/index.d.ts +22 -9
- package/dist/index.js +5 -14
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -11298,17 +11298,12 @@ var GetSalesModes = class extends import_sdk_js_core4.AbstractApiRequest {
|
|
|
11298
11298
|
this.outputSchema = getSalesModesResponseSchema;
|
|
11299
11299
|
this.querySchema = getSalesModesQuerySchema;
|
|
11300
11300
|
this.headersSchema = void 0;
|
|
11301
|
+
this.listItemSchema = salesModeSchema;
|
|
11302
|
+
this.paginationDefaultEnabled = true;
|
|
11301
11303
|
}
|
|
11302
11304
|
getPath() {
|
|
11303
11305
|
return "/sales_modes";
|
|
11304
11306
|
}
|
|
11305
|
-
parseResponse(data, rawResponse) {
|
|
11306
|
-
const salesModes = external_exports.array(salesModeSchema).parse(data);
|
|
11307
|
-
return this.validateOutput({
|
|
11308
|
-
data: salesModes,
|
|
11309
|
-
pagination: (0, import_sdk_js_global_types3.responseToPagination)(rawResponse)
|
|
11310
|
-
});
|
|
11311
|
-
}
|
|
11312
11307
|
};
|
|
11313
11308
|
|
|
11314
11309
|
// src/requests/GetSalesModesFromPointOfSale.ts
|
|
@@ -11326,14 +11321,13 @@ var GetSalesModesFromPointOfSale = class extends import_sdk_js_core5.AbstractApi
|
|
|
11326
11321
|
this.outputSchema = getSalesModesFromPointOfSaleResponseSchema;
|
|
11327
11322
|
this.querySchema = getSalesModesFromPointOfSaleQuerySchema;
|
|
11328
11323
|
this.headersSchema = void 0;
|
|
11324
|
+
this.listItemSchema = salesModeSchema;
|
|
11325
|
+
this.paginationDefaultEnabled = false;
|
|
11329
11326
|
this.pointOfSaleId = pointOfSaleId;
|
|
11330
11327
|
}
|
|
11331
11328
|
getPath() {
|
|
11332
11329
|
return `/point_of_sales/${this.pointOfSaleId}/sales_modes`;
|
|
11333
11330
|
}
|
|
11334
|
-
parseResponse(data) {
|
|
11335
|
-
return external_exports.array(salesModeSchema).parse(data);
|
|
11336
|
-
}
|
|
11337
11331
|
};
|
|
11338
11332
|
|
|
11339
11333
|
// src/requests/UpdateSalesMode.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-types';
|
|
2
|
-
import { Paginated } from '@deliverart/sdk-js-global-types';
|
|
3
2
|
import { z } from 'zod';
|
|
4
3
|
import { AbstractApiRequest } from '@deliverart/sdk-js-core';
|
|
5
4
|
|
|
@@ -154,9 +153,9 @@ declare const getSalesModesResponseSchema: z.ZodObject<{
|
|
|
154
153
|
}, z.core.$strip>;
|
|
155
154
|
type GetSalesModesResponse = z.infer<typeof getSalesModesResponseSchema>;
|
|
156
155
|
declare class GetSalesModes extends AbstractApiRequest<typeof getSalesModesInputSchema, typeof getSalesModesResponseSchema, GetSalesModesQueryParams> {
|
|
157
|
-
readonly method
|
|
158
|
-
readonly contentType
|
|
159
|
-
readonly accept
|
|
156
|
+
readonly method: "GET";
|
|
157
|
+
readonly contentType: "application/json";
|
|
158
|
+
readonly accept: "application/json";
|
|
160
159
|
readonly inputSchema: z.ZodUndefined;
|
|
161
160
|
readonly outputSchema: z.ZodObject<{
|
|
162
161
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -192,11 +191,18 @@ declare class GetSalesModes extends AbstractApiRequest<typeof getSalesModesInput
|
|
|
192
191
|
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
193
192
|
}, z.core.$strip>;
|
|
194
193
|
readonly headersSchema: undefined;
|
|
194
|
+
readonly listItemSchema: z.ZodObject<{
|
|
195
|
+
id: z.ZodString;
|
|
196
|
+
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>;
|
|
197
|
+
name: z.ZodString;
|
|
198
|
+
createdAt: z.ZodString;
|
|
199
|
+
updatedAt: z.ZodString;
|
|
200
|
+
}, z.core.$strip>;
|
|
201
|
+
readonly paginationDefaultEnabled = true;
|
|
195
202
|
constructor(options?: {
|
|
196
203
|
query?: GetSalesModesQueryParams;
|
|
197
204
|
});
|
|
198
205
|
getPath(): string;
|
|
199
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<SalesMode>;
|
|
200
206
|
}
|
|
201
207
|
|
|
202
208
|
declare const getSalesModesFromPointOfSaleQuerySchema: z.ZodObject<{
|
|
@@ -227,9 +233,9 @@ declare const getSalesModesFromPointOfSaleResponseSchema: z.ZodArray<z.ZodObject
|
|
|
227
233
|
}, z.core.$strip>>;
|
|
228
234
|
type GetSalesModesFromPointOfSaleResponse = z.infer<typeof getSalesModesFromPointOfSaleResponseSchema>;
|
|
229
235
|
declare class GetSalesModesFromPointOfSale extends AbstractApiRequest<typeof getSalesModesFromPointOfSaleInputSchema, typeof getSalesModesFromPointOfSaleResponseSchema, GetSalesModesFromPointOfSaleQueryParams> {
|
|
230
|
-
readonly method
|
|
231
|
-
readonly contentType
|
|
232
|
-
readonly accept
|
|
236
|
+
readonly method: "GET";
|
|
237
|
+
readonly contentType: "application/json";
|
|
238
|
+
readonly accept: "application/json";
|
|
233
239
|
readonly inputSchema: z.ZodUndefined;
|
|
234
240
|
readonly outputSchema: z.ZodArray<z.ZodObject<{
|
|
235
241
|
id: z.ZodString;
|
|
@@ -255,12 +261,19 @@ declare class GetSalesModesFromPointOfSale extends AbstractApiRequest<typeof get
|
|
|
255
261
|
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
256
262
|
}, z.core.$strip>;
|
|
257
263
|
readonly headersSchema: undefined;
|
|
264
|
+
readonly listItemSchema: z.ZodObject<{
|
|
265
|
+
id: z.ZodString;
|
|
266
|
+
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>;
|
|
267
|
+
name: z.ZodString;
|
|
268
|
+
createdAt: z.ZodString;
|
|
269
|
+
updatedAt: z.ZodString;
|
|
270
|
+
}, z.core.$strip>;
|
|
271
|
+
readonly paginationDefaultEnabled = false;
|
|
258
272
|
private readonly pointOfSaleId;
|
|
259
273
|
constructor(pointOfSaleId: string, options?: {
|
|
260
274
|
query?: GetSalesModesFromPointOfSaleQueryParams;
|
|
261
275
|
});
|
|
262
276
|
getPath(): string;
|
|
263
|
-
parseResponse(data: unknown): SalesMode[];
|
|
264
277
|
}
|
|
265
278
|
|
|
266
279
|
declare const updateSalesModeInputSchema: z.ZodObject<{
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-types';
|
|
2
|
-
import { Paginated } from '@deliverart/sdk-js-global-types';
|
|
3
2
|
import { z } from 'zod';
|
|
4
3
|
import { AbstractApiRequest } from '@deliverart/sdk-js-core';
|
|
5
4
|
|
|
@@ -154,9 +153,9 @@ declare const getSalesModesResponseSchema: z.ZodObject<{
|
|
|
154
153
|
}, z.core.$strip>;
|
|
155
154
|
type GetSalesModesResponse = z.infer<typeof getSalesModesResponseSchema>;
|
|
156
155
|
declare class GetSalesModes extends AbstractApiRequest<typeof getSalesModesInputSchema, typeof getSalesModesResponseSchema, GetSalesModesQueryParams> {
|
|
157
|
-
readonly method
|
|
158
|
-
readonly contentType
|
|
159
|
-
readonly accept
|
|
156
|
+
readonly method: "GET";
|
|
157
|
+
readonly contentType: "application/json";
|
|
158
|
+
readonly accept: "application/json";
|
|
160
159
|
readonly inputSchema: z.ZodUndefined;
|
|
161
160
|
readonly outputSchema: z.ZodObject<{
|
|
162
161
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -192,11 +191,18 @@ declare class GetSalesModes extends AbstractApiRequest<typeof getSalesModesInput
|
|
|
192
191
|
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
193
192
|
}, z.core.$strip>;
|
|
194
193
|
readonly headersSchema: undefined;
|
|
194
|
+
readonly listItemSchema: z.ZodObject<{
|
|
195
|
+
id: z.ZodString;
|
|
196
|
+
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>;
|
|
197
|
+
name: z.ZodString;
|
|
198
|
+
createdAt: z.ZodString;
|
|
199
|
+
updatedAt: z.ZodString;
|
|
200
|
+
}, z.core.$strip>;
|
|
201
|
+
readonly paginationDefaultEnabled = true;
|
|
195
202
|
constructor(options?: {
|
|
196
203
|
query?: GetSalesModesQueryParams;
|
|
197
204
|
});
|
|
198
205
|
getPath(): string;
|
|
199
|
-
parseResponse(data: unknown, rawResponse: Response): Paginated<SalesMode>;
|
|
200
206
|
}
|
|
201
207
|
|
|
202
208
|
declare const getSalesModesFromPointOfSaleQuerySchema: z.ZodObject<{
|
|
@@ -227,9 +233,9 @@ declare const getSalesModesFromPointOfSaleResponseSchema: z.ZodArray<z.ZodObject
|
|
|
227
233
|
}, z.core.$strip>>;
|
|
228
234
|
type GetSalesModesFromPointOfSaleResponse = z.infer<typeof getSalesModesFromPointOfSaleResponseSchema>;
|
|
229
235
|
declare class GetSalesModesFromPointOfSale extends AbstractApiRequest<typeof getSalesModesFromPointOfSaleInputSchema, typeof getSalesModesFromPointOfSaleResponseSchema, GetSalesModesFromPointOfSaleQueryParams> {
|
|
230
|
-
readonly method
|
|
231
|
-
readonly contentType
|
|
232
|
-
readonly accept
|
|
236
|
+
readonly method: "GET";
|
|
237
|
+
readonly contentType: "application/json";
|
|
238
|
+
readonly accept: "application/json";
|
|
233
239
|
readonly inputSchema: z.ZodUndefined;
|
|
234
240
|
readonly outputSchema: z.ZodArray<z.ZodObject<{
|
|
235
241
|
id: z.ZodString;
|
|
@@ -255,12 +261,19 @@ declare class GetSalesModesFromPointOfSale extends AbstractApiRequest<typeof get
|
|
|
255
261
|
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
256
262
|
}, z.core.$strip>;
|
|
257
263
|
readonly headersSchema: undefined;
|
|
264
|
+
readonly listItemSchema: z.ZodObject<{
|
|
265
|
+
id: z.ZodString;
|
|
266
|
+
pointOfSale: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id">, unknown>>;
|
|
267
|
+
name: z.ZodString;
|
|
268
|
+
createdAt: z.ZodString;
|
|
269
|
+
updatedAt: z.ZodString;
|
|
270
|
+
}, z.core.$strip>;
|
|
271
|
+
readonly paginationDefaultEnabled = false;
|
|
258
272
|
private readonly pointOfSaleId;
|
|
259
273
|
constructor(pointOfSaleId: string, options?: {
|
|
260
274
|
query?: GetSalesModesFromPointOfSaleQueryParams;
|
|
261
275
|
});
|
|
262
276
|
getPath(): string;
|
|
263
|
-
parseResponse(data: unknown): SalesMode[];
|
|
264
277
|
}
|
|
265
278
|
|
|
266
279
|
declare const updateSalesModeInputSchema: z.ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -11239,10 +11239,7 @@ var GetSalesModeDetails = class extends AbstractApiRequest3 {
|
|
|
11239
11239
|
|
|
11240
11240
|
// src/requests/GetSalesModes.ts
|
|
11241
11241
|
import { AbstractApiRequest as AbstractApiRequest4 } from "@deliverart/sdk-js-core";
|
|
11242
|
-
import {
|
|
11243
|
-
createPaginatedSchema,
|
|
11244
|
-
responseToPagination
|
|
11245
|
-
} from "@deliverart/sdk-js-global-types";
|
|
11242
|
+
import { createPaginatedSchema } from "@deliverart/sdk-js-global-types";
|
|
11246
11243
|
var getSalesModesQuerySchema = salesModesQuerySchema;
|
|
11247
11244
|
var getSalesModesInputSchema = external_exports.undefined();
|
|
11248
11245
|
var getSalesModesResponseSchema = createPaginatedSchema(salesModeSchema);
|
|
@@ -11256,17 +11253,12 @@ var GetSalesModes = class extends AbstractApiRequest4 {
|
|
|
11256
11253
|
this.outputSchema = getSalesModesResponseSchema;
|
|
11257
11254
|
this.querySchema = getSalesModesQuerySchema;
|
|
11258
11255
|
this.headersSchema = void 0;
|
|
11256
|
+
this.listItemSchema = salesModeSchema;
|
|
11257
|
+
this.paginationDefaultEnabled = true;
|
|
11259
11258
|
}
|
|
11260
11259
|
getPath() {
|
|
11261
11260
|
return "/sales_modes";
|
|
11262
11261
|
}
|
|
11263
|
-
parseResponse(data, rawResponse) {
|
|
11264
|
-
const salesModes = external_exports.array(salesModeSchema).parse(data);
|
|
11265
|
-
return this.validateOutput({
|
|
11266
|
-
data: salesModes,
|
|
11267
|
-
pagination: responseToPagination(rawResponse)
|
|
11268
|
-
});
|
|
11269
|
-
}
|
|
11270
11262
|
};
|
|
11271
11263
|
|
|
11272
11264
|
// src/requests/GetSalesModesFromPointOfSale.ts
|
|
@@ -11284,14 +11276,13 @@ var GetSalesModesFromPointOfSale = class extends AbstractApiRequest5 {
|
|
|
11284
11276
|
this.outputSchema = getSalesModesFromPointOfSaleResponseSchema;
|
|
11285
11277
|
this.querySchema = getSalesModesFromPointOfSaleQuerySchema;
|
|
11286
11278
|
this.headersSchema = void 0;
|
|
11279
|
+
this.listItemSchema = salesModeSchema;
|
|
11280
|
+
this.paginationDefaultEnabled = false;
|
|
11287
11281
|
this.pointOfSaleId = pointOfSaleId;
|
|
11288
11282
|
}
|
|
11289
11283
|
getPath() {
|
|
11290
11284
|
return `/point_of_sales/${this.pointOfSaleId}/sales_modes`;
|
|
11291
11285
|
}
|
|
11292
|
-
parseResponse(data) {
|
|
11293
|
-
return external_exports.array(salesModeSchema).parse(data);
|
|
11294
|
-
}
|
|
11295
11286
|
};
|
|
11296
11287
|
|
|
11297
11288
|
// src/requests/UpdateSalesMode.ts
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deliverart/sdk-js-sales-mode",
|
|
3
3
|
"description": "Deliverart JavaScript SDK for Sales Modes Management",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.6.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@deliverart/sdk-js-
|
|
22
|
-
"@deliverart/sdk-js-
|
|
23
|
-
"@deliverart/sdk-js-
|
|
21
|
+
"@deliverart/sdk-js-global-types": "2.6.0",
|
|
22
|
+
"@deliverart/sdk-js-point-of-sale": "2.6.0",
|
|
23
|
+
"@deliverart/sdk-js-core": "2.6.0"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|