@deliverart/sdk-js-point-of-sale 0.0.7 → 0.1.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/CHANGELOG.md +12 -0
- package/dist/index.cjs +33 -39
- package/dist/index.d.cts +83 -48
- package/dist/index.d.ts +83 -48
- package/dist/index.js +30 -33
- package/package.json +4 -4
- package/src/models.ts +21 -3
- package/src/requests/CreatePointOfSale.ts +5 -9
- package/src/requests/DeletePointOfSale.ts +5 -2
- package/src/requests/GetPointOfSaleDetails.ts +8 -4
- package/src/requests/GetPointOfSales.ts +8 -19
- package/src/requests/UpdatePointOfSale.ts +5 -5
- package/src/types.ts +5 -19
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-types';
|
|
2
|
+
import { Paginated } from '@deliverart/sdk-js-global-types';
|
|
1
3
|
import { z } from 'zod';
|
|
2
4
|
import { AbstractApiRequest } from '@deliverart/sdk-js-core';
|
|
3
|
-
import { Paginated } from '@deliverart/sdk-js-global-types';
|
|
4
5
|
import { AxiosResponse } from 'axios';
|
|
5
6
|
|
|
6
7
|
declare const timeSettingSchema: z.ZodObject<{
|
|
@@ -316,7 +317,7 @@ declare const pointOfSaleDetailsSchema: z.ZodObject<{
|
|
|
316
317
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
317
318
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
318
319
|
} & {
|
|
319
|
-
company: z.
|
|
320
|
+
company: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/companies/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">>;
|
|
320
321
|
settings: z.ZodObject<{
|
|
321
322
|
menuLocales: z.ZodArray<z.ZodAny, "many">;
|
|
322
323
|
deliveryTimesInterval: z.ZodEffects<z.ZodNumber, number, number>;
|
|
@@ -449,7 +450,7 @@ declare const pointOfSaleDetailsSchema: z.ZodObject<{
|
|
|
449
450
|
openingStatus: "OPEN" | "CLOSED";
|
|
450
451
|
createdAt: string;
|
|
451
452
|
updatedAt: string;
|
|
452
|
-
company:
|
|
453
|
+
company: _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
453
454
|
settings: {
|
|
454
455
|
menuLocales: any[];
|
|
455
456
|
deliveryTimesInterval: number;
|
|
@@ -504,7 +505,7 @@ declare const pointOfSaleDetailsSchema: z.ZodObject<{
|
|
|
504
505
|
openingStatus: "OPEN" | "CLOSED";
|
|
505
506
|
createdAt: string;
|
|
506
507
|
updatedAt: string;
|
|
507
|
-
company: string
|
|
508
|
+
company: string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
508
509
|
settings: {
|
|
509
510
|
menuLocales: any[];
|
|
510
511
|
deliveryTimesInterval: number;
|
|
@@ -582,7 +583,7 @@ declare const writablePointOfSaleSchema: z.ZodObject<Pick<{
|
|
|
582
583
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
583
584
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
584
585
|
} & {
|
|
585
|
-
company: z.
|
|
586
|
+
company: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/companies/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">>;
|
|
586
587
|
settings: z.ZodObject<{
|
|
587
588
|
menuLocales: z.ZodArray<z.ZodAny, "many">;
|
|
588
589
|
deliveryTimesInterval: z.ZodEffects<z.ZodNumber, number, number>;
|
|
@@ -790,7 +791,7 @@ declare const writablePointOfSaleSchema: z.ZodObject<Pick<{
|
|
|
790
791
|
}>;
|
|
791
792
|
type WritablePointOfSale = z.infer<typeof writablePointOfSaleSchema>;
|
|
792
793
|
declare const writableCreatePointOfSaleSchema: z.ZodObject<{
|
|
793
|
-
company: z.
|
|
794
|
+
company: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/companies/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">>;
|
|
794
795
|
name: z.ZodString;
|
|
795
796
|
address: z.ZodObject<{
|
|
796
797
|
line1: z.ZodString;
|
|
@@ -941,7 +942,7 @@ declare const writableCreatePointOfSaleSchema: z.ZodObject<{
|
|
|
941
942
|
timezone: string;
|
|
942
943
|
capabilities: "DELIVERY_OPTIMIZATION"[];
|
|
943
944
|
openingStatus: "OPEN" | "CLOSED";
|
|
944
|
-
company:
|
|
945
|
+
company: _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
945
946
|
settings: {
|
|
946
947
|
menuLocales: any[];
|
|
947
948
|
deliveryTimesInterval: number;
|
|
@@ -988,7 +989,7 @@ declare const writableCreatePointOfSaleSchema: z.ZodObject<{
|
|
|
988
989
|
timezone: string;
|
|
989
990
|
capabilities: "DELIVERY_OPTIMIZATION"[];
|
|
990
991
|
openingStatus: "OPEN" | "CLOSED";
|
|
991
|
-
company: string
|
|
992
|
+
company: string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
992
993
|
settings: {
|
|
993
994
|
menuLocales: any[];
|
|
994
995
|
deliveryTimesInterval: number;
|
|
@@ -1024,9 +1025,41 @@ declare const writableCreatePointOfSaleSchema: z.ZodObject<{
|
|
|
1024
1025
|
}[];
|
|
1025
1026
|
}>;
|
|
1026
1027
|
type WritableCreatePointOfSale = z.infer<typeof writableCreatePointOfSaleSchema>;
|
|
1028
|
+
declare const pointOfSalesQuerySchema: z.ZodObject<{
|
|
1029
|
+
name: z.ZodOptional<z.ZodString>;
|
|
1030
|
+
openingStatus: z.ZodOptional<z.ZodEnum<["OPEN", "CLOSED"]>>;
|
|
1031
|
+
'integrationActivationRequests.connectionId': z.ZodOptional<z.ZodString>;
|
|
1032
|
+
'address.city': z.ZodOptional<z.ZodString>;
|
|
1033
|
+
'address.postalCode': z.ZodOptional<z.ZodString>;
|
|
1034
|
+
'order[name]': z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
1035
|
+
'order[createdAt]': z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
1036
|
+
'order[updatedAt]': z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
1037
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
1038
|
+
}, "strip", z.ZodTypeAny, {
|
|
1039
|
+
name?: string | undefined;
|
|
1040
|
+
openingStatus?: "OPEN" | "CLOSED" | undefined;
|
|
1041
|
+
'integrationActivationRequests.connectionId'?: string | undefined;
|
|
1042
|
+
'address.city'?: string | undefined;
|
|
1043
|
+
'address.postalCode'?: string | undefined;
|
|
1044
|
+
'order[name]'?: "asc" | "desc" | undefined;
|
|
1045
|
+
'order[createdAt]'?: "asc" | "desc" | undefined;
|
|
1046
|
+
'order[updatedAt]'?: "asc" | "desc" | undefined;
|
|
1047
|
+
page?: number | undefined;
|
|
1048
|
+
}, {
|
|
1049
|
+
name?: string | undefined;
|
|
1050
|
+
openingStatus?: "OPEN" | "CLOSED" | undefined;
|
|
1051
|
+
'integrationActivationRequests.connectionId'?: string | undefined;
|
|
1052
|
+
'address.city'?: string | undefined;
|
|
1053
|
+
'address.postalCode'?: string | undefined;
|
|
1054
|
+
'order[name]'?: "asc" | "desc" | undefined;
|
|
1055
|
+
'order[createdAt]'?: "asc" | "desc" | undefined;
|
|
1056
|
+
'order[updatedAt]'?: "asc" | "desc" | undefined;
|
|
1057
|
+
page?: number | undefined;
|
|
1058
|
+
}>;
|
|
1059
|
+
type PointOfSalesQueryParams = z.infer<typeof pointOfSalesQuerySchema>;
|
|
1027
1060
|
|
|
1028
1061
|
declare const createPointOfSaleInputSchema: z.ZodObject<{
|
|
1029
|
-
company: z.
|
|
1062
|
+
company: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/companies/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">>;
|
|
1030
1063
|
name: z.ZodString;
|
|
1031
1064
|
address: z.ZodObject<{
|
|
1032
1065
|
line1: z.ZodString;
|
|
@@ -1177,7 +1210,7 @@ declare const createPointOfSaleInputSchema: z.ZodObject<{
|
|
|
1177
1210
|
timezone: string;
|
|
1178
1211
|
capabilities: "DELIVERY_OPTIMIZATION"[];
|
|
1179
1212
|
openingStatus: "OPEN" | "CLOSED";
|
|
1180
|
-
company:
|
|
1213
|
+
company: _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
1181
1214
|
settings: {
|
|
1182
1215
|
menuLocales: any[];
|
|
1183
1216
|
deliveryTimesInterval: number;
|
|
@@ -1224,7 +1257,7 @@ declare const createPointOfSaleInputSchema: z.ZodObject<{
|
|
|
1224
1257
|
timezone: string;
|
|
1225
1258
|
capabilities: "DELIVERY_OPTIMIZATION"[];
|
|
1226
1259
|
openingStatus: "OPEN" | "CLOSED";
|
|
1227
|
-
company: string
|
|
1260
|
+
company: string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
1228
1261
|
settings: {
|
|
1229
1262
|
menuLocales: any[];
|
|
1230
1263
|
deliveryTimesInterval: number;
|
|
@@ -1259,7 +1292,7 @@ declare const createPointOfSaleInputSchema: z.ZodObject<{
|
|
|
1259
1292
|
}[];
|
|
1260
1293
|
}[];
|
|
1261
1294
|
}>;
|
|
1262
|
-
type CreatePointOfSaleInput = z.
|
|
1295
|
+
type CreatePointOfSaleInput = z.input<typeof createPointOfSaleInputSchema>;
|
|
1263
1296
|
declare const createPointOfSaleResponseSchema: z.ZodObject<{
|
|
1264
1297
|
id: z.ZodString;
|
|
1265
1298
|
name: z.ZodString;
|
|
@@ -1301,7 +1334,7 @@ declare const createPointOfSaleResponseSchema: z.ZodObject<{
|
|
|
1301
1334
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
1302
1335
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
1303
1336
|
} & {
|
|
1304
|
-
company: z.
|
|
1337
|
+
company: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/companies/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">>;
|
|
1305
1338
|
settings: z.ZodObject<{
|
|
1306
1339
|
menuLocales: z.ZodArray<z.ZodAny, "many">;
|
|
1307
1340
|
deliveryTimesInterval: z.ZodEffects<z.ZodNumber, number, number>;
|
|
@@ -1434,7 +1467,7 @@ declare const createPointOfSaleResponseSchema: z.ZodObject<{
|
|
|
1434
1467
|
openingStatus: "OPEN" | "CLOSED";
|
|
1435
1468
|
createdAt: string;
|
|
1436
1469
|
updatedAt: string;
|
|
1437
|
-
company:
|
|
1470
|
+
company: _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
1438
1471
|
settings: {
|
|
1439
1472
|
menuLocales: any[];
|
|
1440
1473
|
deliveryTimesInterval: number;
|
|
@@ -1489,7 +1522,7 @@ declare const createPointOfSaleResponseSchema: z.ZodObject<{
|
|
|
1489
1522
|
openingStatus: "OPEN" | "CLOSED";
|
|
1490
1523
|
createdAt: string;
|
|
1491
1524
|
updatedAt: string;
|
|
1492
|
-
company: string
|
|
1525
|
+
company: string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
1493
1526
|
settings: {
|
|
1494
1527
|
menuLocales: any[];
|
|
1495
1528
|
deliveryTimesInterval: number;
|
|
@@ -1525,13 +1558,13 @@ declare const createPointOfSaleResponseSchema: z.ZodObject<{
|
|
|
1525
1558
|
}[];
|
|
1526
1559
|
numberOfCouriers: number;
|
|
1527
1560
|
}>;
|
|
1528
|
-
type CreatePointOfSaleResponse =
|
|
1529
|
-
declare class CreatePointOfSale extends AbstractApiRequest<
|
|
1561
|
+
type CreatePointOfSaleResponse = z.infer<typeof createPointOfSaleResponseSchema>;
|
|
1562
|
+
declare class CreatePointOfSale extends AbstractApiRequest<typeof createPointOfSaleInputSchema, typeof createPointOfSaleResponseSchema> {
|
|
1530
1563
|
readonly method = "POST";
|
|
1531
1564
|
readonly contentType = "application/json";
|
|
1532
1565
|
readonly accept = "application/json";
|
|
1533
1566
|
readonly inputSchema: z.ZodObject<{
|
|
1534
|
-
company: z.
|
|
1567
|
+
company: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/companies/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">>;
|
|
1535
1568
|
name: z.ZodString;
|
|
1536
1569
|
address: z.ZodObject<{
|
|
1537
1570
|
line1: z.ZodString;
|
|
@@ -1682,7 +1715,7 @@ declare class CreatePointOfSale extends AbstractApiRequest<CreatePointOfSaleInpu
|
|
|
1682
1715
|
timezone: string;
|
|
1683
1716
|
capabilities: "DELIVERY_OPTIMIZATION"[];
|
|
1684
1717
|
openingStatus: "OPEN" | "CLOSED";
|
|
1685
|
-
company:
|
|
1718
|
+
company: _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
1686
1719
|
settings: {
|
|
1687
1720
|
menuLocales: any[];
|
|
1688
1721
|
deliveryTimesInterval: number;
|
|
@@ -1729,7 +1762,7 @@ declare class CreatePointOfSale extends AbstractApiRequest<CreatePointOfSaleInpu
|
|
|
1729
1762
|
timezone: string;
|
|
1730
1763
|
capabilities: "DELIVERY_OPTIMIZATION"[];
|
|
1731
1764
|
openingStatus: "OPEN" | "CLOSED";
|
|
1732
|
-
company: string
|
|
1765
|
+
company: string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
1733
1766
|
settings: {
|
|
1734
1767
|
menuLocales: any[];
|
|
1735
1768
|
deliveryTimesInterval: number;
|
|
@@ -1805,7 +1838,7 @@ declare class CreatePointOfSale extends AbstractApiRequest<CreatePointOfSaleInpu
|
|
|
1805
1838
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
1806
1839
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
1807
1840
|
} & {
|
|
1808
|
-
company: z.
|
|
1841
|
+
company: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/companies/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">>;
|
|
1809
1842
|
settings: z.ZodObject<{
|
|
1810
1843
|
menuLocales: z.ZodArray<z.ZodAny, "many">;
|
|
1811
1844
|
deliveryTimesInterval: z.ZodEffects<z.ZodNumber, number, number>;
|
|
@@ -1938,7 +1971,7 @@ declare class CreatePointOfSale extends AbstractApiRequest<CreatePointOfSaleInpu
|
|
|
1938
1971
|
openingStatus: "OPEN" | "CLOSED";
|
|
1939
1972
|
createdAt: string;
|
|
1940
1973
|
updatedAt: string;
|
|
1941
|
-
company:
|
|
1974
|
+
company: _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
1942
1975
|
settings: {
|
|
1943
1976
|
menuLocales: any[];
|
|
1944
1977
|
deliveryTimesInterval: number;
|
|
@@ -1993,7 +2026,7 @@ declare class CreatePointOfSale extends AbstractApiRequest<CreatePointOfSaleInpu
|
|
|
1993
2026
|
openingStatus: "OPEN" | "CLOSED";
|
|
1994
2027
|
createdAt: string;
|
|
1995
2028
|
updatedAt: string;
|
|
1996
|
-
company: string
|
|
2029
|
+
company: string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
1997
2030
|
settings: {
|
|
1998
2031
|
menuLocales: any[];
|
|
1999
2032
|
deliveryTimesInterval: number;
|
|
@@ -2037,7 +2070,7 @@ declare class CreatePointOfSale extends AbstractApiRequest<CreatePointOfSaleInpu
|
|
|
2037
2070
|
|
|
2038
2071
|
declare const deletePointOfSaleInputSchema: z.ZodUndefined;
|
|
2039
2072
|
declare const deletePointOfSaleResponseSchema: z.ZodUndefined;
|
|
2040
|
-
declare class DeletePointOfSale extends AbstractApiRequest<
|
|
2073
|
+
declare class DeletePointOfSale extends AbstractApiRequest<typeof deletePointOfSaleInputSchema, typeof deletePointOfSaleResponseSchema> {
|
|
2041
2074
|
readonly method = "DELETE";
|
|
2042
2075
|
readonly contentType = "application/json";
|
|
2043
2076
|
readonly accept = "application/json";
|
|
@@ -2051,6 +2084,7 @@ declare class DeletePointOfSale extends AbstractApiRequest<void, void> {
|
|
|
2051
2084
|
}
|
|
2052
2085
|
|
|
2053
2086
|
declare const getPointOfSaleDetailsInputSchema: z.ZodUndefined;
|
|
2087
|
+
type GetPointOfSaleDetailsInput = z.input<typeof getPointOfSaleDetailsInputSchema>;
|
|
2054
2088
|
declare const getPointOfSaleDetailsResponseSchema: z.ZodObject<{
|
|
2055
2089
|
id: z.ZodString;
|
|
2056
2090
|
name: z.ZodString;
|
|
@@ -2092,7 +2126,7 @@ declare const getPointOfSaleDetailsResponseSchema: z.ZodObject<{
|
|
|
2092
2126
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
2093
2127
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
2094
2128
|
} & {
|
|
2095
|
-
company: z.
|
|
2129
|
+
company: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/companies/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">>;
|
|
2096
2130
|
settings: z.ZodObject<{
|
|
2097
2131
|
menuLocales: z.ZodArray<z.ZodAny, "many">;
|
|
2098
2132
|
deliveryTimesInterval: z.ZodEffects<z.ZodNumber, number, number>;
|
|
@@ -2225,7 +2259,7 @@ declare const getPointOfSaleDetailsResponseSchema: z.ZodObject<{
|
|
|
2225
2259
|
openingStatus: "OPEN" | "CLOSED";
|
|
2226
2260
|
createdAt: string;
|
|
2227
2261
|
updatedAt: string;
|
|
2228
|
-
company:
|
|
2262
|
+
company: _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
2229
2263
|
settings: {
|
|
2230
2264
|
menuLocales: any[];
|
|
2231
2265
|
deliveryTimesInterval: number;
|
|
@@ -2280,7 +2314,7 @@ declare const getPointOfSaleDetailsResponseSchema: z.ZodObject<{
|
|
|
2280
2314
|
openingStatus: "OPEN" | "CLOSED";
|
|
2281
2315
|
createdAt: string;
|
|
2282
2316
|
updatedAt: string;
|
|
2283
|
-
company: string
|
|
2317
|
+
company: string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
2284
2318
|
settings: {
|
|
2285
2319
|
menuLocales: any[];
|
|
2286
2320
|
deliveryTimesInterval: number;
|
|
@@ -2316,8 +2350,8 @@ declare const getPointOfSaleDetailsResponseSchema: z.ZodObject<{
|
|
|
2316
2350
|
}[];
|
|
2317
2351
|
numberOfCouriers: number;
|
|
2318
2352
|
}>;
|
|
2319
|
-
type GetPointOfSaleDetailsResponse =
|
|
2320
|
-
declare class GetPointOfSaleDetails extends AbstractApiRequest<
|
|
2353
|
+
type GetPointOfSaleDetailsResponse = z.infer<typeof getPointOfSaleDetailsResponseSchema>;
|
|
2354
|
+
declare class GetPointOfSaleDetails extends AbstractApiRequest<typeof getPointOfSaleDetailsInputSchema, typeof getPointOfSaleDetailsResponseSchema> {
|
|
2321
2355
|
readonly method = "GET";
|
|
2322
2356
|
readonly contentType = "application/json";
|
|
2323
2357
|
readonly accept = "application/json";
|
|
@@ -2363,7 +2397,7 @@ declare class GetPointOfSaleDetails extends AbstractApiRequest<void, GetPointOfS
|
|
|
2363
2397
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
2364
2398
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
2365
2399
|
} & {
|
|
2366
|
-
company: z.
|
|
2400
|
+
company: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/companies/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">>;
|
|
2367
2401
|
settings: z.ZodObject<{
|
|
2368
2402
|
menuLocales: z.ZodArray<z.ZodAny, "many">;
|
|
2369
2403
|
deliveryTimesInterval: z.ZodEffects<z.ZodNumber, number, number>;
|
|
@@ -2496,7 +2530,7 @@ declare class GetPointOfSaleDetails extends AbstractApiRequest<void, GetPointOfS
|
|
|
2496
2530
|
openingStatus: "OPEN" | "CLOSED";
|
|
2497
2531
|
createdAt: string;
|
|
2498
2532
|
updatedAt: string;
|
|
2499
|
-
company:
|
|
2533
|
+
company: _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
2500
2534
|
settings: {
|
|
2501
2535
|
menuLocales: any[];
|
|
2502
2536
|
deliveryTimesInterval: number;
|
|
@@ -2551,7 +2585,7 @@ declare class GetPointOfSaleDetails extends AbstractApiRequest<void, GetPointOfS
|
|
|
2551
2585
|
openingStatus: "OPEN" | "CLOSED";
|
|
2552
2586
|
createdAt: string;
|
|
2553
2587
|
updatedAt: string;
|
|
2554
|
-
company: string
|
|
2588
|
+
company: string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
2555
2589
|
settings: {
|
|
2556
2590
|
menuLocales: any[];
|
|
2557
2591
|
deliveryTimesInterval: number;
|
|
@@ -2626,6 +2660,8 @@ declare const getPointOfSalesQuerySchema: z.ZodObject<{
|
|
|
2626
2660
|
page?: number | undefined;
|
|
2627
2661
|
}>;
|
|
2628
2662
|
type GetPointOfSalesQueryParams = z.infer<typeof getPointOfSalesQuerySchema>;
|
|
2663
|
+
declare const getPointOfSalesInputSchema: z.ZodUndefined;
|
|
2664
|
+
type GetPointOfSalesInput = z.input<typeof getPointOfSalesInputSchema>;
|
|
2629
2665
|
declare const getPointOfSalesResponseSchema: z.ZodObject<{
|
|
2630
2666
|
data: z.ZodArray<z.ZodObject<{
|
|
2631
2667
|
id: z.ZodString;
|
|
@@ -2792,8 +2828,7 @@ declare const getPointOfSalesResponseSchema: z.ZodObject<{
|
|
|
2792
2828
|
};
|
|
2793
2829
|
}>;
|
|
2794
2830
|
type GetPointOfSalesResponse = z.infer<typeof getPointOfSalesResponseSchema>;
|
|
2795
|
-
declare
|
|
2796
|
-
declare class GetPointOfSales extends AbstractApiRequest<void, GetPointOfSalesResponse, GetPointOfSalesQueryParams> {
|
|
2831
|
+
declare class GetPointOfSales extends AbstractApiRequest<typeof getPointOfSalesInputSchema, typeof getPointOfSalesResponseSchema, GetPointOfSalesQueryParams> {
|
|
2797
2832
|
readonly method = "GET";
|
|
2798
2833
|
readonly contentType = "application/json";
|
|
2799
2834
|
readonly accept = "application/json";
|
|
@@ -3233,7 +3268,7 @@ declare const updatePointOfSaleInputSchema: z.ZodObject<{
|
|
|
3233
3268
|
}[];
|
|
3234
3269
|
}[] | undefined;
|
|
3235
3270
|
}>;
|
|
3236
|
-
type UpdatePointOfSaleInput = z.
|
|
3271
|
+
type UpdatePointOfSaleInput = z.input<typeof updatePointOfSaleInputSchema>;
|
|
3237
3272
|
declare const updatePointOfSaleResponseSchema: z.ZodObject<{
|
|
3238
3273
|
id: z.ZodString;
|
|
3239
3274
|
name: z.ZodString;
|
|
@@ -3275,7 +3310,7 @@ declare const updatePointOfSaleResponseSchema: z.ZodObject<{
|
|
|
3275
3310
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3276
3311
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3277
3312
|
} & {
|
|
3278
|
-
company: z.
|
|
3313
|
+
company: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/companies/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">>;
|
|
3279
3314
|
settings: z.ZodObject<{
|
|
3280
3315
|
menuLocales: z.ZodArray<z.ZodAny, "many">;
|
|
3281
3316
|
deliveryTimesInterval: z.ZodEffects<z.ZodNumber, number, number>;
|
|
@@ -3408,7 +3443,7 @@ declare const updatePointOfSaleResponseSchema: z.ZodObject<{
|
|
|
3408
3443
|
openingStatus: "OPEN" | "CLOSED";
|
|
3409
3444
|
createdAt: string;
|
|
3410
3445
|
updatedAt: string;
|
|
3411
|
-
company:
|
|
3446
|
+
company: _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
3412
3447
|
settings: {
|
|
3413
3448
|
menuLocales: any[];
|
|
3414
3449
|
deliveryTimesInterval: number;
|
|
@@ -3463,7 +3498,7 @@ declare const updatePointOfSaleResponseSchema: z.ZodObject<{
|
|
|
3463
3498
|
openingStatus: "OPEN" | "CLOSED";
|
|
3464
3499
|
createdAt: string;
|
|
3465
3500
|
updatedAt: string;
|
|
3466
|
-
company: string
|
|
3501
|
+
company: string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
3467
3502
|
settings: {
|
|
3468
3503
|
menuLocales: any[];
|
|
3469
3504
|
deliveryTimesInterval: number;
|
|
@@ -3499,8 +3534,8 @@ declare const updatePointOfSaleResponseSchema: z.ZodObject<{
|
|
|
3499
3534
|
}[];
|
|
3500
3535
|
numberOfCouriers: number;
|
|
3501
3536
|
}>;
|
|
3502
|
-
type UpdatePointOfSaleResponse =
|
|
3503
|
-
declare class UpdatePointOfSale extends AbstractApiRequest<
|
|
3537
|
+
type UpdatePointOfSaleResponse = z.infer<typeof updatePointOfSaleResponseSchema>;
|
|
3538
|
+
declare class UpdatePointOfSale extends AbstractApiRequest<typeof updatePointOfSaleInputSchema, typeof updatePointOfSaleResponseSchema> {
|
|
3504
3539
|
readonly method = "PATCH";
|
|
3505
3540
|
readonly contentType = "application/merge-patch+json";
|
|
3506
3541
|
readonly accept = "application/json";
|
|
@@ -3776,7 +3811,7 @@ declare class UpdatePointOfSale extends AbstractApiRequest<UpdatePointOfSaleInpu
|
|
|
3776
3811
|
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3777
3812
|
updatedAt: z.ZodEffects<z.ZodString, string, string>;
|
|
3778
3813
|
} & {
|
|
3779
|
-
company: z.
|
|
3814
|
+
company: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/companies/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">>;
|
|
3780
3815
|
settings: z.ZodObject<{
|
|
3781
3816
|
menuLocales: z.ZodArray<z.ZodAny, "many">;
|
|
3782
3817
|
deliveryTimesInterval: z.ZodEffects<z.ZodNumber, number, number>;
|
|
@@ -3909,7 +3944,7 @@ declare class UpdatePointOfSale extends AbstractApiRequest<UpdatePointOfSaleInpu
|
|
|
3909
3944
|
openingStatus: "OPEN" | "CLOSED";
|
|
3910
3945
|
createdAt: string;
|
|
3911
3946
|
updatedAt: string;
|
|
3912
|
-
company:
|
|
3947
|
+
company: _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
3913
3948
|
settings: {
|
|
3914
3949
|
menuLocales: any[];
|
|
3915
3950
|
deliveryTimesInterval: number;
|
|
@@ -3964,7 +3999,7 @@ declare class UpdatePointOfSale extends AbstractApiRequest<UpdatePointOfSaleInpu
|
|
|
3964
3999
|
openingStatus: "OPEN" | "CLOSED";
|
|
3965
4000
|
createdAt: string;
|
|
3966
4001
|
updatedAt: string;
|
|
3967
|
-
company: string
|
|
4002
|
+
company: string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">;
|
|
3968
4003
|
settings: {
|
|
3969
4004
|
menuLocales: any[];
|
|
3970
4005
|
deliveryTimesInterval: number;
|
|
@@ -4016,9 +4051,9 @@ type PointOfSaleCapability = z.infer<typeof pointOfSaleCapabilitySchema>;
|
|
|
4016
4051
|
declare const pointOfSaleUserRoles: readonly ["ROLE_ADMIN", "ROLE_READER"];
|
|
4017
4052
|
declare const pointOfSaleUserRoleSchema: z.ZodEnum<["ROLE_ADMIN", "ROLE_READER"]>;
|
|
4018
4053
|
type PointOfSaleUserRole = z.infer<typeof pointOfSaleUserRoleSchema>;
|
|
4019
|
-
declare const
|
|
4020
|
-
type
|
|
4021
|
-
declare const
|
|
4022
|
-
type
|
|
4054
|
+
declare const pointOfSaleIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/customers/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/customers/:id">>;
|
|
4055
|
+
type PointOfSaleIri = z.infer<typeof pointOfSaleIriSchema>;
|
|
4056
|
+
declare const pointOfSaleNullableIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/customers/:id"> | null, any, string | _deliverart_sdk_js_global_types.IriObject<"/customers/:id"> | null>;
|
|
4057
|
+
type PointOfSaleNullableIri = z.infer<typeof pointOfSaleNullableIriSchema>;
|
|
4023
4058
|
|
|
4024
|
-
export { CreatePointOfSale, type CreatePointOfSaleInput, type CreatePointOfSaleResponse, DeletePointOfSale, type DeliveryTimeSetting, GetPointOfSaleDetails, type GetPointOfSaleDetailsResponse, GetPointOfSales, type GetPointOfSalesQueryParams, type GetPointOfSalesResponse, type PointOfSale, type PointOfSaleCapability, type PointOfSaleDetails, type
|
|
4059
|
+
export { CreatePointOfSale, type CreatePointOfSaleInput, type CreatePointOfSaleResponse, DeletePointOfSale, type DeliveryTimeSetting, GetPointOfSaleDetails, type GetPointOfSaleDetailsInput, type GetPointOfSaleDetailsResponse, GetPointOfSales, type GetPointOfSalesInput, type GetPointOfSalesQueryParams, type GetPointOfSalesResponse, type PointOfSale, type PointOfSaleCapability, type PointOfSaleDetails, type PointOfSaleIri, type PointOfSaleNullableIri, type PointOfSaleOpeningStatus, type PointOfSaleUserRole, type PointOfSalesQueryParams, type TimeSetting, UpdatePointOfSale, type UpdatePointOfSaleInput, type UpdatePointOfSaleResponse, type UserPointOfSale, type WritableCreatePointOfSale, type WritablePointOfSale, createPointOfSaleInputSchema, createPointOfSaleResponseSchema, deletePointOfSaleInputSchema, deletePointOfSaleResponseSchema, deliveryTimeSettingSchema, getPointOfSaleDetailsInputSchema, getPointOfSaleDetailsResponseSchema, getPointOfSalesInputSchema, getPointOfSalesQuerySchema, getPointOfSalesResponseSchema, pointOfSaleAutoAcceptOrderValues, pointOfSaleCapabilities, pointOfSaleCapabilitySchema, pointOfSaleDetailsSchema, pointOfSaleIntervalValues, pointOfSaleIriSchema, pointOfSaleNullableIriSchema, pointOfSaleOpeningStatusSchema, pointOfSaleOpeningStatuses, pointOfSaleSchema, pointOfSaleUserRoleSchema, pointOfSaleUserRoles, pointOfSalesQuerySchema, timeSettingSchema, updatePointOfSaleInputSchema, updatePointOfSaleResponseSchema, userPointOfSaleSchema, writableCreatePointOfSaleSchema, writablePointOfSaleSchema };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
// src/models.ts
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { companyIriSchema } from "@deliverart/sdk-js-company";
|
|
3
|
+
import {
|
|
4
|
+
addressSchema,
|
|
5
|
+
datetimeSchema,
|
|
6
|
+
dayOfWeekSchema,
|
|
7
|
+
sortDirSchema
|
|
8
|
+
} from "@deliverart/sdk-js-global-types";
|
|
4
9
|
import { z as z2 } from "zod";
|
|
5
10
|
|
|
6
11
|
// src/types.ts
|
|
12
|
+
import { iriNullableSchema, iriSchema } from "@deliverart/sdk-js-global-types";
|
|
7
13
|
import { z } from "zod";
|
|
8
14
|
var pointOfSaleOpeningStatuses = ["OPEN", "CLOSED"];
|
|
9
15
|
var pointOfSaleOpeningStatusSchema = z.enum(pointOfSaleOpeningStatuses);
|
|
@@ -11,18 +17,8 @@ var pointOfSaleCapabilities = ["DELIVERY_OPTIMIZATION"];
|
|
|
11
17
|
var pointOfSaleCapabilitySchema = z.enum(pointOfSaleCapabilities);
|
|
12
18
|
var pointOfSaleUserRoles = ["ROLE_ADMIN", "ROLE_READER"];
|
|
13
19
|
var pointOfSaleUserRoleSchema = z.enum(pointOfSaleUserRoles);
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
});
|
|
17
|
-
var pointOfSaleNullablePathSchema = z.string().nullable().refine(
|
|
18
|
-
(val) => {
|
|
19
|
-
if (!val) return true;
|
|
20
|
-
return /^\/point_of_sales\/[a-z_]+\/[0-9a-fA-F-]{36}$/.test(val);
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
message: "Invalid integration path format"
|
|
24
|
-
}
|
|
25
|
-
);
|
|
20
|
+
var pointOfSaleIriSchema = iriSchema("/customers/:id");
|
|
21
|
+
var pointOfSaleNullableIriSchema = iriNullableSchema("/customers/:id");
|
|
26
22
|
|
|
27
23
|
// src/models.ts
|
|
28
24
|
var timeSettingSchema = z2.object({
|
|
@@ -61,7 +57,7 @@ var userPointOfSaleSchema = z2.object({
|
|
|
61
57
|
var pointOfSaleIntervalValues = [5, 10, 15, 20, 30, 60];
|
|
62
58
|
var pointOfSaleAutoAcceptOrderValues = [0, 5, 10, 15];
|
|
63
59
|
var pointOfSaleDetailsSchema = pointOfSaleSchema.extend({
|
|
64
|
-
company:
|
|
60
|
+
company: companyIriSchema,
|
|
65
61
|
settings: z2.object({
|
|
66
62
|
menuLocales: z2.any().array(),
|
|
67
63
|
deliveryTimesInterval: z2.number().positive().refine((value) => pointOfSaleIntervalValues.includes(value)),
|
|
@@ -95,6 +91,17 @@ var writableCreatePointOfSaleSchema = z2.object({
|
|
|
95
91
|
company: true
|
|
96
92
|
}).shape
|
|
97
93
|
});
|
|
94
|
+
var pointOfSalesQuerySchema = z2.object({
|
|
95
|
+
name: z2.string().optional(),
|
|
96
|
+
openingStatus: pointOfSaleOpeningStatusSchema.optional(),
|
|
97
|
+
"integrationActivationRequests.connectionId": z2.string().optional(),
|
|
98
|
+
"address.city": z2.string().optional(),
|
|
99
|
+
"address.postalCode": z2.string().optional(),
|
|
100
|
+
"order[name]": sortDirSchema.optional(),
|
|
101
|
+
"order[createdAt]": sortDirSchema.optional(),
|
|
102
|
+
"order[updatedAt]": sortDirSchema.optional(),
|
|
103
|
+
page: z2.coerce.number().optional()
|
|
104
|
+
});
|
|
98
105
|
|
|
99
106
|
// src/requests/CreatePointOfSale.ts
|
|
100
107
|
import { AbstractApiRequest } from "@deliverart/sdk-js-core";
|
|
@@ -131,7 +138,7 @@ var DeletePointOfSale = class extends AbstractApiRequest2 {
|
|
|
131
138
|
headersSchema = void 0;
|
|
132
139
|
pointOfSaleId;
|
|
133
140
|
constructor(pointOfSaleId) {
|
|
134
|
-
super();
|
|
141
|
+
super(void 0);
|
|
135
142
|
this.pointOfSaleId = pointOfSaleId;
|
|
136
143
|
}
|
|
137
144
|
getPath() {
|
|
@@ -154,7 +161,7 @@ var GetPointOfSaleDetails = class extends AbstractApiRequest3 {
|
|
|
154
161
|
headersSchema = void 0;
|
|
155
162
|
pointOfSaleId;
|
|
156
163
|
constructor(pointOfSaleId) {
|
|
157
|
-
super();
|
|
164
|
+
super(void 0);
|
|
158
165
|
this.pointOfSaleId = pointOfSaleId;
|
|
159
166
|
}
|
|
160
167
|
getPath() {
|
|
@@ -166,23 +173,12 @@ var GetPointOfSaleDetails = class extends AbstractApiRequest3 {
|
|
|
166
173
|
import { AbstractApiRequest as AbstractApiRequest4 } from "@deliverart/sdk-js-core";
|
|
167
174
|
import {
|
|
168
175
|
createPaginatedSchema,
|
|
169
|
-
responseToPagination
|
|
170
|
-
sortDirSchema
|
|
176
|
+
responseToPagination
|
|
171
177
|
} from "@deliverart/sdk-js-global-types";
|
|
172
178
|
import { z as z5 } from "zod";
|
|
173
|
-
var getPointOfSalesQuerySchema =
|
|
174
|
-
name: z5.string().optional(),
|
|
175
|
-
openingStatus: pointOfSaleOpeningStatusSchema.optional(),
|
|
176
|
-
"integrationActivationRequests.connectionId": z5.string().optional(),
|
|
177
|
-
"address.city": z5.string().optional(),
|
|
178
|
-
"address.postalCode": z5.string().optional(),
|
|
179
|
-
"order[name]": sortDirSchema.optional(),
|
|
180
|
-
"order[createdAt]": sortDirSchema.optional(),
|
|
181
|
-
"order[updatedAt]": sortDirSchema.optional(),
|
|
182
|
-
page: z5.coerce.number().optional()
|
|
183
|
-
});
|
|
184
|
-
var getPointOfSalesResponseSchema = createPaginatedSchema(pointOfSaleSchema);
|
|
179
|
+
var getPointOfSalesQuerySchema = pointOfSalesQuerySchema;
|
|
185
180
|
var getPointOfSalesInputSchema = z5.undefined();
|
|
181
|
+
var getPointOfSalesResponseSchema = createPaginatedSchema(pointOfSaleSchema);
|
|
186
182
|
var GetPointOfSales = class extends AbstractApiRequest4 {
|
|
187
183
|
method = "GET";
|
|
188
184
|
contentType = "application/json";
|
|
@@ -248,13 +244,14 @@ export {
|
|
|
248
244
|
pointOfSaleCapabilitySchema,
|
|
249
245
|
pointOfSaleDetailsSchema,
|
|
250
246
|
pointOfSaleIntervalValues,
|
|
251
|
-
|
|
247
|
+
pointOfSaleIriSchema,
|
|
248
|
+
pointOfSaleNullableIriSchema,
|
|
252
249
|
pointOfSaleOpeningStatusSchema,
|
|
253
250
|
pointOfSaleOpeningStatuses,
|
|
254
|
-
pointOfSalePathSchema,
|
|
255
251
|
pointOfSaleSchema,
|
|
256
252
|
pointOfSaleUserRoleSchema,
|
|
257
253
|
pointOfSaleUserRoles,
|
|
254
|
+
pointOfSalesQuerySchema,
|
|
258
255
|
timeSettingSchema,
|
|
259
256
|
updatePointOfSaleInputSchema,
|
|
260
257
|
updatePointOfSaleResponseSchema,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deliverart/sdk-js-point-of-sale",
|
|
3
3
|
"description": "Deliverart JavaScript SDK for Point of Sale Management",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@deliverart/sdk-js-company": "0.
|
|
16
|
-
"@deliverart/sdk-js-core": "0.
|
|
17
|
-
"@deliverart/sdk-js-global-types": "0.0.
|
|
15
|
+
"@deliverart/sdk-js-company": "0.1.3",
|
|
16
|
+
"@deliverart/sdk-js-core": "0.2.0",
|
|
17
|
+
"@deliverart/sdk-js-global-types": "0.0.18",
|
|
18
18
|
"axios": "1.9.0",
|
|
19
19
|
"zod": "3.25.67"
|
|
20
20
|
},
|
package/src/models.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { companyIriSchema } from '@deliverart/sdk-js-company'
|
|
2
|
+
import {
|
|
3
|
+
addressSchema,
|
|
4
|
+
datetimeSchema,
|
|
5
|
+
dayOfWeekSchema,
|
|
6
|
+
sortDirSchema,
|
|
7
|
+
} from '@deliverart/sdk-js-global-types'
|
|
3
8
|
import { z } from 'zod'
|
|
4
9
|
|
|
5
10
|
import {
|
|
@@ -57,7 +62,7 @@ export const pointOfSaleIntervalValues = [5, 10, 15, 20, 30, 60]
|
|
|
57
62
|
export const pointOfSaleAutoAcceptOrderValues = [0, 5, 10, 15]
|
|
58
63
|
|
|
59
64
|
export const pointOfSaleDetailsSchema = pointOfSaleSchema.extend({
|
|
60
|
-
company:
|
|
65
|
+
company: companyIriSchema,
|
|
61
66
|
settings: z.object({
|
|
62
67
|
menuLocales: z.any().array(),
|
|
63
68
|
deliveryTimesInterval: z
|
|
@@ -105,3 +110,16 @@ export const writableCreatePointOfSaleSchema = z.object({
|
|
|
105
110
|
}).shape,
|
|
106
111
|
})
|
|
107
112
|
export type WritableCreatePointOfSale = z.infer<typeof writableCreatePointOfSaleSchema>
|
|
113
|
+
|
|
114
|
+
export const pointOfSalesQuerySchema = z.object({
|
|
115
|
+
name: z.string().optional(),
|
|
116
|
+
openingStatus: pointOfSaleOpeningStatusSchema.optional(),
|
|
117
|
+
'integrationActivationRequests.connectionId': z.string().optional(),
|
|
118
|
+
'address.city': z.string().optional(),
|
|
119
|
+
'address.postalCode': z.string().optional(),
|
|
120
|
+
'order[name]': sortDirSchema.optional(),
|
|
121
|
+
'order[createdAt]': sortDirSchema.optional(),
|
|
122
|
+
'order[updatedAt]': sortDirSchema.optional(),
|
|
123
|
+
page: z.coerce.number().optional(),
|
|
124
|
+
})
|
|
125
|
+
export type PointOfSalesQueryParams = z.infer<typeof pointOfSalesQuerySchema>
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
import { AbstractApiRequest } from '@deliverart/sdk-js-core'
|
|
2
2
|
import { z } from 'zod'
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
PointOfSaleDetails,
|
|
6
|
-
pointOfSaleDetailsSchema,
|
|
7
|
-
writableCreatePointOfSaleSchema,
|
|
8
|
-
} from '../models'
|
|
4
|
+
import { pointOfSaleDetailsSchema, writableCreatePointOfSaleSchema } from '../models'
|
|
9
5
|
|
|
10
6
|
export const createPointOfSaleInputSchema = writableCreatePointOfSaleSchema.required()
|
|
11
|
-
export type CreatePointOfSaleInput = z.
|
|
7
|
+
export type CreatePointOfSaleInput = z.input<typeof createPointOfSaleInputSchema>
|
|
12
8
|
|
|
13
9
|
export const createPointOfSaleResponseSchema = pointOfSaleDetailsSchema
|
|
14
|
-
export type CreatePointOfSaleResponse =
|
|
10
|
+
export type CreatePointOfSaleResponse = z.infer<typeof createPointOfSaleResponseSchema>
|
|
15
11
|
|
|
16
12
|
export class CreatePointOfSale extends AbstractApiRequest<
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
typeof createPointOfSaleInputSchema,
|
|
14
|
+
typeof createPointOfSaleResponseSchema
|
|
19
15
|
> {
|
|
20
16
|
readonly method = 'POST'
|
|
21
17
|
readonly contentType = 'application/json'
|
|
@@ -4,7 +4,10 @@ import { z } from 'zod'
|
|
|
4
4
|
export const deletePointOfSaleInputSchema = z.undefined()
|
|
5
5
|
export const deletePointOfSaleResponseSchema = z.undefined()
|
|
6
6
|
|
|
7
|
-
export class DeletePointOfSale extends AbstractApiRequest<
|
|
7
|
+
export class DeletePointOfSale extends AbstractApiRequest<
|
|
8
|
+
typeof deletePointOfSaleInputSchema,
|
|
9
|
+
typeof deletePointOfSaleResponseSchema
|
|
10
|
+
> {
|
|
8
11
|
readonly method = 'DELETE'
|
|
9
12
|
readonly contentType = 'application/json'
|
|
10
13
|
readonly accept = 'application/json'
|
|
@@ -17,7 +20,7 @@ export class DeletePointOfSale extends AbstractApiRequest<void, void> {
|
|
|
17
20
|
private readonly pointOfSaleId: string
|
|
18
21
|
|
|
19
22
|
constructor(pointOfSaleId: string) {
|
|
20
|
-
super()
|
|
23
|
+
super(undefined)
|
|
21
24
|
this.pointOfSaleId = pointOfSaleId
|
|
22
25
|
}
|
|
23
26
|
|