@deliverart/sdk-js-point-of-sale 1.2.2 → 2.0.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 +39 -6
- package/dist/index.d.cts +118 -3
- package/dist/index.d.ts +118 -3
- package/dist/index.js +35 -6
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -22,6 +22,7 @@ var index_exports = {};
|
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
CreatePointOfSale: () => CreatePointOfSale,
|
|
24
24
|
DeletePointOfSale: () => DeletePointOfSale,
|
|
25
|
+
GetCompanyPointOfSales: () => GetCompanyPointOfSales,
|
|
25
26
|
GetPointOfSaleDetails: () => GetPointOfSaleDetails,
|
|
26
27
|
GetPointOfSales: () => GetPointOfSales,
|
|
27
28
|
UpdatePointOfSale: () => UpdatePointOfSale,
|
|
@@ -30,6 +31,9 @@ __export(index_exports, {
|
|
|
30
31
|
deletePointOfSaleInputSchema: () => deletePointOfSaleInputSchema,
|
|
31
32
|
deletePointOfSaleResponseSchema: () => deletePointOfSaleResponseSchema,
|
|
32
33
|
deliveryTimeSettingSchema: () => deliveryTimeSettingSchema,
|
|
34
|
+
getCompanyPointOfSalesInputSchema: () => getCompanyPointOfSalesInputSchema,
|
|
35
|
+
getCompanyPointOfSalesQuerySchema: () => getCompanyPointOfSalesQuerySchema,
|
|
36
|
+
getCompanyPointOfSalesResponseSchema: () => getCompanyPointOfSalesResponseSchema,
|
|
33
37
|
getPointOfSaleDetailsInputSchema: () => getPointOfSaleDetailsInputSchema,
|
|
34
38
|
getPointOfSaleDetailsResponseSchema: () => getPointOfSaleDetailsResponseSchema,
|
|
35
39
|
getPointOfSalesInputSchema: () => getPointOfSalesInputSchema,
|
|
@@ -11339,11 +11343,36 @@ var DeletePointOfSale = class extends import_sdk_js_core2.AbstractApiRequest {
|
|
|
11339
11343
|
}
|
|
11340
11344
|
};
|
|
11341
11345
|
|
|
11342
|
-
// src/requests/
|
|
11346
|
+
// src/requests/GetCompanyPointOfSales.ts
|
|
11343
11347
|
var import_sdk_js_core3 = require("@deliverart/sdk-js-core");
|
|
11348
|
+
var getCompanyPointOfSalesQuerySchema = pointOfSalesQuerySchema;
|
|
11349
|
+
var getCompanyPointOfSalesInputSchema = external_exports.undefined();
|
|
11350
|
+
var getCompanyPointOfSalesResponseSchema = external_exports.array(pointOfSaleSchema);
|
|
11351
|
+
var GetCompanyPointOfSales = class extends import_sdk_js_core3.AbstractApiRequest {
|
|
11352
|
+
constructor(companyId, options) {
|
|
11353
|
+
super(void 0, options);
|
|
11354
|
+
this.method = "GET";
|
|
11355
|
+
this.contentType = "application/json";
|
|
11356
|
+
this.accept = "application/json";
|
|
11357
|
+
this.inputSchema = getCompanyPointOfSalesInputSchema;
|
|
11358
|
+
this.outputSchema = getCompanyPointOfSalesResponseSchema;
|
|
11359
|
+
this.querySchema = getCompanyPointOfSalesQuerySchema;
|
|
11360
|
+
this.headersSchema = void 0;
|
|
11361
|
+
this.companyId = companyId;
|
|
11362
|
+
}
|
|
11363
|
+
getPath() {
|
|
11364
|
+
return `/companies/${this.companyId}/point_of_sales`;
|
|
11365
|
+
}
|
|
11366
|
+
parseResponse(data) {
|
|
11367
|
+
return external_exports.array(pointOfSaleSchema).parse(data);
|
|
11368
|
+
}
|
|
11369
|
+
};
|
|
11370
|
+
|
|
11371
|
+
// src/requests/GetPointOfSaleDetails.ts
|
|
11372
|
+
var import_sdk_js_core4 = require("@deliverart/sdk-js-core");
|
|
11344
11373
|
var getPointOfSaleDetailsInputSchema = external_exports.undefined();
|
|
11345
11374
|
var getPointOfSaleDetailsResponseSchema = pointOfSaleDetailsSchema;
|
|
11346
|
-
var GetPointOfSaleDetails = class extends
|
|
11375
|
+
var GetPointOfSaleDetails = class extends import_sdk_js_core4.AbstractApiRequest {
|
|
11347
11376
|
constructor(pointOfSaleId) {
|
|
11348
11377
|
super(void 0);
|
|
11349
11378
|
this.method = "GET";
|
|
@@ -11361,12 +11390,12 @@ var GetPointOfSaleDetails = class extends import_sdk_js_core3.AbstractApiRequest
|
|
|
11361
11390
|
};
|
|
11362
11391
|
|
|
11363
11392
|
// src/requests/GetPointOfSales.ts
|
|
11364
|
-
var
|
|
11393
|
+
var import_sdk_js_core5 = require("@deliverart/sdk-js-core");
|
|
11365
11394
|
var import_sdk_js_global_types3 = require("@deliverart/sdk-js-global-types");
|
|
11366
11395
|
var getPointOfSalesQuerySchema = pointOfSalesQuerySchema;
|
|
11367
11396
|
var getPointOfSalesInputSchema = external_exports.undefined();
|
|
11368
11397
|
var getPointOfSalesResponseSchema = (0, import_sdk_js_global_types3.createPaginatedSchema)(pointOfSaleSchema);
|
|
11369
|
-
var GetPointOfSales = class extends
|
|
11398
|
+
var GetPointOfSales = class extends import_sdk_js_core5.AbstractApiRequest {
|
|
11370
11399
|
constructor(options) {
|
|
11371
11400
|
super(void 0, options);
|
|
11372
11401
|
this.method = "GET";
|
|
@@ -11390,10 +11419,10 @@ var GetPointOfSales = class extends import_sdk_js_core4.AbstractApiRequest {
|
|
|
11390
11419
|
};
|
|
11391
11420
|
|
|
11392
11421
|
// src/requests/UpdatePointOfSale.ts
|
|
11393
|
-
var
|
|
11422
|
+
var import_sdk_js_core6 = require("@deliverart/sdk-js-core");
|
|
11394
11423
|
var updatePointOfSaleInputSchema = writablePointOfSaleSchema.partial();
|
|
11395
11424
|
var updatePointOfSaleResponseSchema = pointOfSaleDetailsSchema;
|
|
11396
|
-
var UpdatePointOfSale = class extends
|
|
11425
|
+
var UpdatePointOfSale = class extends import_sdk_js_core6.AbstractApiRequest {
|
|
11397
11426
|
constructor(pointOfSaleId, input) {
|
|
11398
11427
|
super(input);
|
|
11399
11428
|
this.method = "PATCH";
|
|
@@ -11413,6 +11442,7 @@ var UpdatePointOfSale = class extends import_sdk_js_core5.AbstractApiRequest {
|
|
|
11413
11442
|
0 && (module.exports = {
|
|
11414
11443
|
CreatePointOfSale,
|
|
11415
11444
|
DeletePointOfSale,
|
|
11445
|
+
GetCompanyPointOfSales,
|
|
11416
11446
|
GetPointOfSaleDetails,
|
|
11417
11447
|
GetPointOfSales,
|
|
11418
11448
|
UpdatePointOfSale,
|
|
@@ -11421,6 +11451,9 @@ var UpdatePointOfSale = class extends import_sdk_js_core5.AbstractApiRequest {
|
|
|
11421
11451
|
deletePointOfSaleInputSchema,
|
|
11422
11452
|
deletePointOfSaleResponseSchema,
|
|
11423
11453
|
deliveryTimeSettingSchema,
|
|
11454
|
+
getCompanyPointOfSalesInputSchema,
|
|
11455
|
+
getCompanyPointOfSalesQuerySchema,
|
|
11456
|
+
getCompanyPointOfSalesResponseSchema,
|
|
11424
11457
|
getPointOfSaleDetailsInputSchema,
|
|
11425
11458
|
getPointOfSaleDetailsResponseSchema,
|
|
11426
11459
|
getPointOfSalesInputSchema,
|
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,6 @@ import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-type
|
|
|
2
2
|
import { Paginated } from '@deliverart/sdk-js-global-types';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { AbstractApiRequest } from '@deliverart/sdk-js-core';
|
|
5
|
-
import { AxiosResponse } from 'axios';
|
|
6
5
|
|
|
7
6
|
declare const timeSettingSchema: z.ZodObject<{
|
|
8
7
|
dayOfWeek: z.ZodEnum<{
|
|
@@ -716,6 +715,122 @@ declare class DeletePointOfSale extends AbstractApiRequest<typeof deletePointOfS
|
|
|
716
715
|
getPath(): string;
|
|
717
716
|
}
|
|
718
717
|
|
|
718
|
+
declare const getCompanyPointOfSalesQuerySchema: z.ZodObject<{
|
|
719
|
+
name: z.ZodOptional<z.ZodString>;
|
|
720
|
+
openingStatus: z.ZodOptional<z.ZodEnum<{
|
|
721
|
+
OPEN: "OPEN";
|
|
722
|
+
CLOSED: "CLOSED";
|
|
723
|
+
}>>;
|
|
724
|
+
'integrationActivationRequests.connectionId': z.ZodOptional<z.ZodString>;
|
|
725
|
+
'address.city': z.ZodOptional<z.ZodString>;
|
|
726
|
+
'address.postalCode': z.ZodOptional<z.ZodString>;
|
|
727
|
+
'order[name]': z.ZodOptional<z.ZodEnum<{
|
|
728
|
+
asc: "asc";
|
|
729
|
+
desc: "desc";
|
|
730
|
+
}>>;
|
|
731
|
+
'order[createdAt]': z.ZodOptional<z.ZodEnum<{
|
|
732
|
+
asc: "asc";
|
|
733
|
+
desc: "desc";
|
|
734
|
+
}>>;
|
|
735
|
+
'order[updatedAt]': z.ZodOptional<z.ZodEnum<{
|
|
736
|
+
asc: "asc";
|
|
737
|
+
desc: "desc";
|
|
738
|
+
}>>;
|
|
739
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
740
|
+
}, z.core.$strip>;
|
|
741
|
+
type GetCompanyPointOfSalesQueryParams = z.infer<typeof getCompanyPointOfSalesQuerySchema>;
|
|
742
|
+
declare const getCompanyPointOfSalesInputSchema: z.ZodUndefined;
|
|
743
|
+
type GetCompanyPointOfSalesInput = z.input<typeof getCompanyPointOfSalesInputSchema>;
|
|
744
|
+
declare const getCompanyPointOfSalesResponseSchema: z.ZodArray<z.ZodObject<{
|
|
745
|
+
id: z.ZodString;
|
|
746
|
+
name: z.ZodString;
|
|
747
|
+
address: z.ZodObject<{
|
|
748
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
749
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
750
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
751
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
752
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
753
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
754
|
+
}, z.core.$strip>;
|
|
755
|
+
timezone: z.ZodString;
|
|
756
|
+
location: z.ZodObject<{
|
|
757
|
+
latitude: z.ZodNumber;
|
|
758
|
+
longitude: z.ZodNumber;
|
|
759
|
+
}, z.core.$strip>;
|
|
760
|
+
capabilities: z.ZodArray<z.ZodEnum<{
|
|
761
|
+
DELIVERY_OPTIMIZATION: "DELIVERY_OPTIMIZATION";
|
|
762
|
+
}>>;
|
|
763
|
+
openingStatus: z.ZodEnum<{
|
|
764
|
+
OPEN: "OPEN";
|
|
765
|
+
CLOSED: "CLOSED";
|
|
766
|
+
}>;
|
|
767
|
+
createdAt: z.ZodString;
|
|
768
|
+
updatedAt: z.ZodString;
|
|
769
|
+
}, z.core.$strip>>;
|
|
770
|
+
type GetCompanyPointOfSalesResponse = z.infer<typeof getCompanyPointOfSalesResponseSchema>;
|
|
771
|
+
declare class GetCompanyPointOfSales extends AbstractApiRequest<typeof getCompanyPointOfSalesInputSchema, typeof getCompanyPointOfSalesResponseSchema, GetCompanyPointOfSalesQueryParams> {
|
|
772
|
+
readonly method = "GET";
|
|
773
|
+
readonly contentType = "application/json";
|
|
774
|
+
readonly accept = "application/json";
|
|
775
|
+
readonly inputSchema: z.ZodUndefined;
|
|
776
|
+
readonly outputSchema: z.ZodArray<z.ZodObject<{
|
|
777
|
+
id: z.ZodString;
|
|
778
|
+
name: z.ZodString;
|
|
779
|
+
address: z.ZodObject<{
|
|
780
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
781
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
782
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
783
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
784
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
785
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
786
|
+
}, z.core.$strip>;
|
|
787
|
+
timezone: z.ZodString;
|
|
788
|
+
location: z.ZodObject<{
|
|
789
|
+
latitude: z.ZodNumber;
|
|
790
|
+
longitude: z.ZodNumber;
|
|
791
|
+
}, z.core.$strip>;
|
|
792
|
+
capabilities: z.ZodArray<z.ZodEnum<{
|
|
793
|
+
DELIVERY_OPTIMIZATION: "DELIVERY_OPTIMIZATION";
|
|
794
|
+
}>>;
|
|
795
|
+
openingStatus: z.ZodEnum<{
|
|
796
|
+
OPEN: "OPEN";
|
|
797
|
+
CLOSED: "CLOSED";
|
|
798
|
+
}>;
|
|
799
|
+
createdAt: z.ZodString;
|
|
800
|
+
updatedAt: z.ZodString;
|
|
801
|
+
}, z.core.$strip>>;
|
|
802
|
+
readonly querySchema: z.ZodObject<{
|
|
803
|
+
name: z.ZodOptional<z.ZodString>;
|
|
804
|
+
openingStatus: z.ZodOptional<z.ZodEnum<{
|
|
805
|
+
OPEN: "OPEN";
|
|
806
|
+
CLOSED: "CLOSED";
|
|
807
|
+
}>>;
|
|
808
|
+
'integrationActivationRequests.connectionId': z.ZodOptional<z.ZodString>;
|
|
809
|
+
'address.city': z.ZodOptional<z.ZodString>;
|
|
810
|
+
'address.postalCode': z.ZodOptional<z.ZodString>;
|
|
811
|
+
'order[name]': z.ZodOptional<z.ZodEnum<{
|
|
812
|
+
asc: "asc";
|
|
813
|
+
desc: "desc";
|
|
814
|
+
}>>;
|
|
815
|
+
'order[createdAt]': z.ZodOptional<z.ZodEnum<{
|
|
816
|
+
asc: "asc";
|
|
817
|
+
desc: "desc";
|
|
818
|
+
}>>;
|
|
819
|
+
'order[updatedAt]': z.ZodOptional<z.ZodEnum<{
|
|
820
|
+
asc: "asc";
|
|
821
|
+
desc: "desc";
|
|
822
|
+
}>>;
|
|
823
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
824
|
+
}, z.core.$strip>;
|
|
825
|
+
readonly headersSchema: undefined;
|
|
826
|
+
private readonly companyId;
|
|
827
|
+
constructor(companyId: string, options?: {
|
|
828
|
+
query?: GetCompanyPointOfSalesQueryParams;
|
|
829
|
+
});
|
|
830
|
+
getPath(): string;
|
|
831
|
+
parseResponse(data: unknown): PointOfSale[];
|
|
832
|
+
}
|
|
833
|
+
|
|
719
834
|
declare const getPointOfSaleDetailsInputSchema: z.ZodUndefined;
|
|
720
835
|
type GetPointOfSaleDetailsInput = z.input<typeof getPointOfSaleDetailsInputSchema>;
|
|
721
836
|
declare const getPointOfSaleDetailsResponseSchema: z.ZodObject<{
|
|
@@ -1033,7 +1148,7 @@ declare class GetPointOfSales extends AbstractApiRequest<typeof getPointOfSalesI
|
|
|
1033
1148
|
query?: GetPointOfSalesQueryParams;
|
|
1034
1149
|
});
|
|
1035
1150
|
getPath(): string;
|
|
1036
|
-
parseResponse(data: unknown, rawResponse:
|
|
1151
|
+
parseResponse(data: unknown, rawResponse: Response): Paginated<PointOfSale>;
|
|
1037
1152
|
}
|
|
1038
1153
|
|
|
1039
1154
|
declare const updatePointOfSaleInputSchema: z.ZodObject<{
|
|
@@ -1393,4 +1508,4 @@ type PointOfSaleIri = z.infer<typeof pointOfSaleIriSchema>;
|
|
|
1393
1508
|
declare const pointOfSaleNullableIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown>>;
|
|
1394
1509
|
type PointOfSaleNullableIri = z.infer<typeof pointOfSaleNullableIriSchema>;
|
|
1395
1510
|
|
|
1396
|
-
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 };
|
|
1511
|
+
export { CreatePointOfSale, type CreatePointOfSaleInput, type CreatePointOfSaleResponse, DeletePointOfSale, type DeliveryTimeSetting, GetCompanyPointOfSales, type GetCompanyPointOfSalesInput, type GetCompanyPointOfSalesQueryParams, type GetCompanyPointOfSalesResponse, 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, getCompanyPointOfSalesInputSchema, getCompanyPointOfSalesQuerySchema, getCompanyPointOfSalesResponseSchema, 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.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-type
|
|
|
2
2
|
import { Paginated } from '@deliverart/sdk-js-global-types';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { AbstractApiRequest } from '@deliverart/sdk-js-core';
|
|
5
|
-
import { AxiosResponse } from 'axios';
|
|
6
5
|
|
|
7
6
|
declare const timeSettingSchema: z.ZodObject<{
|
|
8
7
|
dayOfWeek: z.ZodEnum<{
|
|
@@ -716,6 +715,122 @@ declare class DeletePointOfSale extends AbstractApiRequest<typeof deletePointOfS
|
|
|
716
715
|
getPath(): string;
|
|
717
716
|
}
|
|
718
717
|
|
|
718
|
+
declare const getCompanyPointOfSalesQuerySchema: z.ZodObject<{
|
|
719
|
+
name: z.ZodOptional<z.ZodString>;
|
|
720
|
+
openingStatus: z.ZodOptional<z.ZodEnum<{
|
|
721
|
+
OPEN: "OPEN";
|
|
722
|
+
CLOSED: "CLOSED";
|
|
723
|
+
}>>;
|
|
724
|
+
'integrationActivationRequests.connectionId': z.ZodOptional<z.ZodString>;
|
|
725
|
+
'address.city': z.ZodOptional<z.ZodString>;
|
|
726
|
+
'address.postalCode': z.ZodOptional<z.ZodString>;
|
|
727
|
+
'order[name]': z.ZodOptional<z.ZodEnum<{
|
|
728
|
+
asc: "asc";
|
|
729
|
+
desc: "desc";
|
|
730
|
+
}>>;
|
|
731
|
+
'order[createdAt]': z.ZodOptional<z.ZodEnum<{
|
|
732
|
+
asc: "asc";
|
|
733
|
+
desc: "desc";
|
|
734
|
+
}>>;
|
|
735
|
+
'order[updatedAt]': z.ZodOptional<z.ZodEnum<{
|
|
736
|
+
asc: "asc";
|
|
737
|
+
desc: "desc";
|
|
738
|
+
}>>;
|
|
739
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
740
|
+
}, z.core.$strip>;
|
|
741
|
+
type GetCompanyPointOfSalesQueryParams = z.infer<typeof getCompanyPointOfSalesQuerySchema>;
|
|
742
|
+
declare const getCompanyPointOfSalesInputSchema: z.ZodUndefined;
|
|
743
|
+
type GetCompanyPointOfSalesInput = z.input<typeof getCompanyPointOfSalesInputSchema>;
|
|
744
|
+
declare const getCompanyPointOfSalesResponseSchema: z.ZodArray<z.ZodObject<{
|
|
745
|
+
id: z.ZodString;
|
|
746
|
+
name: z.ZodString;
|
|
747
|
+
address: z.ZodObject<{
|
|
748
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
749
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
750
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
751
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
752
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
753
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
754
|
+
}, z.core.$strip>;
|
|
755
|
+
timezone: z.ZodString;
|
|
756
|
+
location: z.ZodObject<{
|
|
757
|
+
latitude: z.ZodNumber;
|
|
758
|
+
longitude: z.ZodNumber;
|
|
759
|
+
}, z.core.$strip>;
|
|
760
|
+
capabilities: z.ZodArray<z.ZodEnum<{
|
|
761
|
+
DELIVERY_OPTIMIZATION: "DELIVERY_OPTIMIZATION";
|
|
762
|
+
}>>;
|
|
763
|
+
openingStatus: z.ZodEnum<{
|
|
764
|
+
OPEN: "OPEN";
|
|
765
|
+
CLOSED: "CLOSED";
|
|
766
|
+
}>;
|
|
767
|
+
createdAt: z.ZodString;
|
|
768
|
+
updatedAt: z.ZodString;
|
|
769
|
+
}, z.core.$strip>>;
|
|
770
|
+
type GetCompanyPointOfSalesResponse = z.infer<typeof getCompanyPointOfSalesResponseSchema>;
|
|
771
|
+
declare class GetCompanyPointOfSales extends AbstractApiRequest<typeof getCompanyPointOfSalesInputSchema, typeof getCompanyPointOfSalesResponseSchema, GetCompanyPointOfSalesQueryParams> {
|
|
772
|
+
readonly method = "GET";
|
|
773
|
+
readonly contentType = "application/json";
|
|
774
|
+
readonly accept = "application/json";
|
|
775
|
+
readonly inputSchema: z.ZodUndefined;
|
|
776
|
+
readonly outputSchema: z.ZodArray<z.ZodObject<{
|
|
777
|
+
id: z.ZodString;
|
|
778
|
+
name: z.ZodString;
|
|
779
|
+
address: z.ZodObject<{
|
|
780
|
+
line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
781
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
782
|
+
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
783
|
+
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
784
|
+
postalCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
785
|
+
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
786
|
+
}, z.core.$strip>;
|
|
787
|
+
timezone: z.ZodString;
|
|
788
|
+
location: z.ZodObject<{
|
|
789
|
+
latitude: z.ZodNumber;
|
|
790
|
+
longitude: z.ZodNumber;
|
|
791
|
+
}, z.core.$strip>;
|
|
792
|
+
capabilities: z.ZodArray<z.ZodEnum<{
|
|
793
|
+
DELIVERY_OPTIMIZATION: "DELIVERY_OPTIMIZATION";
|
|
794
|
+
}>>;
|
|
795
|
+
openingStatus: z.ZodEnum<{
|
|
796
|
+
OPEN: "OPEN";
|
|
797
|
+
CLOSED: "CLOSED";
|
|
798
|
+
}>;
|
|
799
|
+
createdAt: z.ZodString;
|
|
800
|
+
updatedAt: z.ZodString;
|
|
801
|
+
}, z.core.$strip>>;
|
|
802
|
+
readonly querySchema: z.ZodObject<{
|
|
803
|
+
name: z.ZodOptional<z.ZodString>;
|
|
804
|
+
openingStatus: z.ZodOptional<z.ZodEnum<{
|
|
805
|
+
OPEN: "OPEN";
|
|
806
|
+
CLOSED: "CLOSED";
|
|
807
|
+
}>>;
|
|
808
|
+
'integrationActivationRequests.connectionId': z.ZodOptional<z.ZodString>;
|
|
809
|
+
'address.city': z.ZodOptional<z.ZodString>;
|
|
810
|
+
'address.postalCode': z.ZodOptional<z.ZodString>;
|
|
811
|
+
'order[name]': z.ZodOptional<z.ZodEnum<{
|
|
812
|
+
asc: "asc";
|
|
813
|
+
desc: "desc";
|
|
814
|
+
}>>;
|
|
815
|
+
'order[createdAt]': z.ZodOptional<z.ZodEnum<{
|
|
816
|
+
asc: "asc";
|
|
817
|
+
desc: "desc";
|
|
818
|
+
}>>;
|
|
819
|
+
'order[updatedAt]': z.ZodOptional<z.ZodEnum<{
|
|
820
|
+
asc: "asc";
|
|
821
|
+
desc: "desc";
|
|
822
|
+
}>>;
|
|
823
|
+
page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
824
|
+
}, z.core.$strip>;
|
|
825
|
+
readonly headersSchema: undefined;
|
|
826
|
+
private readonly companyId;
|
|
827
|
+
constructor(companyId: string, options?: {
|
|
828
|
+
query?: GetCompanyPointOfSalesQueryParams;
|
|
829
|
+
});
|
|
830
|
+
getPath(): string;
|
|
831
|
+
parseResponse(data: unknown): PointOfSale[];
|
|
832
|
+
}
|
|
833
|
+
|
|
719
834
|
declare const getPointOfSaleDetailsInputSchema: z.ZodUndefined;
|
|
720
835
|
type GetPointOfSaleDetailsInput = z.input<typeof getPointOfSaleDetailsInputSchema>;
|
|
721
836
|
declare const getPointOfSaleDetailsResponseSchema: z.ZodObject<{
|
|
@@ -1033,7 +1148,7 @@ declare class GetPointOfSales extends AbstractApiRequest<typeof getPointOfSalesI
|
|
|
1033
1148
|
query?: GetPointOfSalesQueryParams;
|
|
1034
1149
|
});
|
|
1035
1150
|
getPath(): string;
|
|
1036
|
-
parseResponse(data: unknown, rawResponse:
|
|
1151
|
+
parseResponse(data: unknown, rawResponse: Response): Paginated<PointOfSale>;
|
|
1037
1152
|
}
|
|
1038
1153
|
|
|
1039
1154
|
declare const updatePointOfSaleInputSchema: z.ZodObject<{
|
|
@@ -1393,4 +1508,4 @@ type PointOfSaleIri = z.infer<typeof pointOfSaleIriSchema>;
|
|
|
1393
1508
|
declare const pointOfSaleNullableIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/point_of_sales/:id"> | null, unknown>>;
|
|
1394
1509
|
type PointOfSaleNullableIri = z.infer<typeof pointOfSaleNullableIriSchema>;
|
|
1395
1510
|
|
|
1396
|
-
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 };
|
|
1511
|
+
export { CreatePointOfSale, type CreatePointOfSaleInput, type CreatePointOfSaleResponse, DeletePointOfSale, type DeliveryTimeSetting, GetCompanyPointOfSales, type GetCompanyPointOfSalesInput, type GetCompanyPointOfSalesQueryParams, type GetCompanyPointOfSalesResponse, 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, getCompanyPointOfSalesInputSchema, getCompanyPointOfSalesQuerySchema, getCompanyPointOfSalesResponseSchema, 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
|
@@ -11291,11 +11291,36 @@ var DeletePointOfSale = class extends AbstractApiRequest2 {
|
|
|
11291
11291
|
}
|
|
11292
11292
|
};
|
|
11293
11293
|
|
|
11294
|
-
// src/requests/
|
|
11294
|
+
// src/requests/GetCompanyPointOfSales.ts
|
|
11295
11295
|
import { AbstractApiRequest as AbstractApiRequest3 } from "@deliverart/sdk-js-core";
|
|
11296
|
+
var getCompanyPointOfSalesQuerySchema = pointOfSalesQuerySchema;
|
|
11297
|
+
var getCompanyPointOfSalesInputSchema = external_exports.undefined();
|
|
11298
|
+
var getCompanyPointOfSalesResponseSchema = external_exports.array(pointOfSaleSchema);
|
|
11299
|
+
var GetCompanyPointOfSales = class extends AbstractApiRequest3 {
|
|
11300
|
+
constructor(companyId, options) {
|
|
11301
|
+
super(void 0, options);
|
|
11302
|
+
this.method = "GET";
|
|
11303
|
+
this.contentType = "application/json";
|
|
11304
|
+
this.accept = "application/json";
|
|
11305
|
+
this.inputSchema = getCompanyPointOfSalesInputSchema;
|
|
11306
|
+
this.outputSchema = getCompanyPointOfSalesResponseSchema;
|
|
11307
|
+
this.querySchema = getCompanyPointOfSalesQuerySchema;
|
|
11308
|
+
this.headersSchema = void 0;
|
|
11309
|
+
this.companyId = companyId;
|
|
11310
|
+
}
|
|
11311
|
+
getPath() {
|
|
11312
|
+
return `/companies/${this.companyId}/point_of_sales`;
|
|
11313
|
+
}
|
|
11314
|
+
parseResponse(data) {
|
|
11315
|
+
return external_exports.array(pointOfSaleSchema).parse(data);
|
|
11316
|
+
}
|
|
11317
|
+
};
|
|
11318
|
+
|
|
11319
|
+
// src/requests/GetPointOfSaleDetails.ts
|
|
11320
|
+
import { AbstractApiRequest as AbstractApiRequest4 } from "@deliverart/sdk-js-core";
|
|
11296
11321
|
var getPointOfSaleDetailsInputSchema = external_exports.undefined();
|
|
11297
11322
|
var getPointOfSaleDetailsResponseSchema = pointOfSaleDetailsSchema;
|
|
11298
|
-
var GetPointOfSaleDetails = class extends
|
|
11323
|
+
var GetPointOfSaleDetails = class extends AbstractApiRequest4 {
|
|
11299
11324
|
constructor(pointOfSaleId) {
|
|
11300
11325
|
super(void 0);
|
|
11301
11326
|
this.method = "GET";
|
|
@@ -11313,7 +11338,7 @@ var GetPointOfSaleDetails = class extends AbstractApiRequest3 {
|
|
|
11313
11338
|
};
|
|
11314
11339
|
|
|
11315
11340
|
// src/requests/GetPointOfSales.ts
|
|
11316
|
-
import { AbstractApiRequest as
|
|
11341
|
+
import { AbstractApiRequest as AbstractApiRequest5 } from "@deliverart/sdk-js-core";
|
|
11317
11342
|
import {
|
|
11318
11343
|
createPaginatedSchema,
|
|
11319
11344
|
responseToPagination
|
|
@@ -11321,7 +11346,7 @@ import {
|
|
|
11321
11346
|
var getPointOfSalesQuerySchema = pointOfSalesQuerySchema;
|
|
11322
11347
|
var getPointOfSalesInputSchema = external_exports.undefined();
|
|
11323
11348
|
var getPointOfSalesResponseSchema = createPaginatedSchema(pointOfSaleSchema);
|
|
11324
|
-
var GetPointOfSales = class extends
|
|
11349
|
+
var GetPointOfSales = class extends AbstractApiRequest5 {
|
|
11325
11350
|
constructor(options) {
|
|
11326
11351
|
super(void 0, options);
|
|
11327
11352
|
this.method = "GET";
|
|
@@ -11345,10 +11370,10 @@ var GetPointOfSales = class extends AbstractApiRequest4 {
|
|
|
11345
11370
|
};
|
|
11346
11371
|
|
|
11347
11372
|
// src/requests/UpdatePointOfSale.ts
|
|
11348
|
-
import { AbstractApiRequest as
|
|
11373
|
+
import { AbstractApiRequest as AbstractApiRequest6 } from "@deliverart/sdk-js-core";
|
|
11349
11374
|
var updatePointOfSaleInputSchema = writablePointOfSaleSchema.partial();
|
|
11350
11375
|
var updatePointOfSaleResponseSchema = pointOfSaleDetailsSchema;
|
|
11351
|
-
var UpdatePointOfSale = class extends
|
|
11376
|
+
var UpdatePointOfSale = class extends AbstractApiRequest6 {
|
|
11352
11377
|
constructor(pointOfSaleId, input) {
|
|
11353
11378
|
super(input);
|
|
11354
11379
|
this.method = "PATCH";
|
|
@@ -11367,6 +11392,7 @@ var UpdatePointOfSale = class extends AbstractApiRequest5 {
|
|
|
11367
11392
|
export {
|
|
11368
11393
|
CreatePointOfSale,
|
|
11369
11394
|
DeletePointOfSale,
|
|
11395
|
+
GetCompanyPointOfSales,
|
|
11370
11396
|
GetPointOfSaleDetails,
|
|
11371
11397
|
GetPointOfSales,
|
|
11372
11398
|
UpdatePointOfSale,
|
|
@@ -11375,6 +11401,9 @@ export {
|
|
|
11375
11401
|
deletePointOfSaleInputSchema,
|
|
11376
11402
|
deletePointOfSaleResponseSchema,
|
|
11377
11403
|
deliveryTimeSettingSchema,
|
|
11404
|
+
getCompanyPointOfSalesInputSchema,
|
|
11405
|
+
getCompanyPointOfSalesQuerySchema,
|
|
11406
|
+
getCompanyPointOfSalesResponseSchema,
|
|
11378
11407
|
getPointOfSaleDetailsInputSchema,
|
|
11379
11408
|
getPointOfSaleDetailsResponseSchema,
|
|
11380
11409
|
getPointOfSalesInputSchema,
|
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": "
|
|
4
|
+
"version": "2.0.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-company": "
|
|
22
|
-
"@deliverart/sdk-js-core": "
|
|
23
|
-
"@deliverart/sdk-js-global-types": "
|
|
21
|
+
"@deliverart/sdk-js-company": "2.0.0",
|
|
22
|
+
"@deliverart/sdk-js-core": "2.0.0",
|
|
23
|
+
"@deliverart/sdk-js-global-types": "2.0.0"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|