@deliverart/sdk-js-integration 2.40.0-dev.2 → 2.40.1
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/README.md +4 -0
- package/dist/index.cjs +19 -1
- package/dist/index.d.cts +42 -41
- package/dist/index.d.ts +42 -41
- package/dist/index.js +24 -6
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -1075,6 +1075,7 @@ __export(index_exports, {
|
|
|
1075
1075
|
integrationEcommerceMenuPriceOverrideSchema: () => integrationEcommerceMenuPriceOverrideSchema,
|
|
1076
1076
|
integrationEcommerceMenuPriceSchema: () => integrationEcommerceMenuPriceSchema,
|
|
1077
1077
|
integrationEcommerceMenuSchema: () => integrationEcommerceMenuSchema,
|
|
1078
|
+
integrationEcommercePaymentConfigIriSchema: () => integrationEcommercePaymentConfigIriSchema,
|
|
1078
1079
|
integrationEcommercePaymentMethodInfoSchema: () => integrationEcommercePaymentMethodInfoSchema,
|
|
1079
1080
|
integrationEcommercePointOfSaleInfoSchema: () => integrationEcommercePointOfSaleInfoSchema,
|
|
1080
1081
|
integrationEcommerceRegistrationLinkInputSchema: () => integrationEcommerceRegistrationLinkInputSchema,
|
|
@@ -2554,7 +2555,7 @@ import {
|
|
|
2554
2555
|
sortDirSchema as sortDirSchema4,
|
|
2555
2556
|
timestampsFilterSchema as timestampsFilterSchema3
|
|
2556
2557
|
} from "@deliverart/sdk-js-global-types";
|
|
2557
|
-
import {
|
|
2558
|
+
import { IriObject, matchesIriPattern } from "@deliverart/sdk-js-global-types";
|
|
2558
2559
|
import { imageNullableIriSchema as imageNullableIriSchema2, imageSchema } from "@deliverart/sdk-js-image";
|
|
2559
2560
|
import {
|
|
2560
2561
|
localeItemSchema,
|
|
@@ -2566,8 +2567,24 @@ import {
|
|
|
2566
2567
|
import { deliveryTimeSettingSchema, timeSettingSchema } from "@deliverart/sdk-js-point-of-sale";
|
|
2567
2568
|
import { salesModeNullableIriSchema as salesModeNullableIriSchema2 } from "@deliverart/sdk-js-sales-mode";
|
|
2568
2569
|
import { z as z7 } from "zod";
|
|
2570
|
+
var paymentConfigPatterns = [
|
|
2571
|
+
"/payment_configs/cash/:id",
|
|
2572
|
+
"/payment_configs/credit_card/:id",
|
|
2573
|
+
"/payment_configs/bank_transfer/:id",
|
|
2574
|
+
"/payment_configs/stripe/:id",
|
|
2575
|
+
"/payment_configs/ticket/:id"
|
|
2576
|
+
];
|
|
2577
|
+
var integrationEcommercePaymentConfigIriSchema = z7.unknown().transform((value, context) => {
|
|
2578
|
+
const iri = typeof value === "string" ? value : value !== null && typeof value === "object" && "iri" in value ? value.iri : null;
|
|
2579
|
+
const pattern = typeof iri === "string" ? paymentConfigPatterns.find((candidate) => matchesIriPattern(iri, candidate)) : void 0;
|
|
2580
|
+
if (!pattern || typeof iri !== "string") {
|
|
2581
|
+
context.addIssue({ code: "custom", message: "Invalid payment configuration reference" });
|
|
2582
|
+
return z7.NEVER;
|
|
2583
|
+
}
|
|
2584
|
+
return new IriObject(iri, pattern);
|
|
2585
|
+
});
|
|
2569
2586
|
var integrationEcommerceSchema = integrationBaseSchema.omit({ service: true }).extend({
|
|
2570
|
-
paymentConfigs: z7.array(
|
|
2587
|
+
paymentConfigs: z7.array(integrationEcommercePaymentConfigIriSchema),
|
|
2571
2588
|
path: z7.string(),
|
|
2572
2589
|
orderingModes: z7.array(types_exports.integrationEcommerceOrderingModeSchema).min(1),
|
|
2573
2590
|
minOrderValue: z7.coerce.number().nonnegative(),
|
|
@@ -3611,12 +3628,12 @@ var integrationJustEatMenuValidationQuerySchema = z10.object({
|
|
|
3611
3628
|
import {
|
|
3612
3629
|
datetimeSchema as datetimeSchema9,
|
|
3613
3630
|
iriNullableSchema as iriNullableSchema2,
|
|
3614
|
-
iriSchema as
|
|
3631
|
+
iriSchema as iriSchema2,
|
|
3615
3632
|
sortDirSchema as sortDirSchema8,
|
|
3616
3633
|
timestampsFilterSchema as timestampsFilterSchema7
|
|
3617
3634
|
} from "@deliverart/sdk-js-global-types";
|
|
3618
3635
|
import { z as z11 } from "zod";
|
|
3619
|
-
var integrationKitchenAccessTokenIriSchema =
|
|
3636
|
+
var integrationKitchenAccessTokenIriSchema = iriSchema2(
|
|
3620
3637
|
"/integrations/kitchen/:integrationId/tokens/:id"
|
|
3621
3638
|
);
|
|
3622
3639
|
var integrationKitchenAccessTokenNullableIriSchema = iriNullableSchema2(
|
|
@@ -4312,9 +4329,9 @@ var integrationDetailsSchema = z13.discriminatedUnion("service", [
|
|
|
4312
4329
|
]);
|
|
4313
4330
|
|
|
4314
4331
|
// src/lead-integration.ts
|
|
4315
|
-
import { iriSchema as
|
|
4332
|
+
import { iriSchema as iriSchema3 } from "@deliverart/sdk-js-global-types";
|
|
4316
4333
|
import { z as z14 } from "zod";
|
|
4317
|
-
var leadIriSchema =
|
|
4334
|
+
var leadIriSchema = iriSchema3("/leads/:id");
|
|
4318
4335
|
var leadIntegrationSchema = activatable_integration_exports.activatableIntegrationSchema;
|
|
4319
4336
|
var leadIntegrationBaseSchema = activatable_integration_exports.activatableIntegrationBaseSchema.extend({
|
|
4320
4337
|
integration: activatable_integration_exports.activatableIntegrationBaseSchema.shape.integration.default(null)
|
|
@@ -12972,6 +12989,7 @@ export {
|
|
|
12972
12989
|
integrationEcommerceMenuPriceOverrideSchema,
|
|
12973
12990
|
integrationEcommerceMenuPriceSchema,
|
|
12974
12991
|
integrationEcommerceMenuSchema,
|
|
12992
|
+
integrationEcommercePaymentConfigIriSchema,
|
|
12975
12993
|
integrationEcommercePaymentMethodInfoSchema,
|
|
12976
12994
|
integrationEcommercePointOfSaleInfoSchema,
|
|
12977
12995
|
integrationEcommerceRegistrationLinkInputSchema,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deliverart/sdk-js-integration",
|
|
3
3
|
"description": "Deliverart JavaScript SDK for Integration Management",
|
|
4
|
-
"version": "2.40.
|
|
4
|
+
"version": "2.40.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"zod": "4.3.5",
|
|
22
|
-
"@deliverart/sdk-js-
|
|
23
|
-
"@deliverart/sdk-js-
|
|
24
|
-
"@deliverart/sdk-js-
|
|
25
|
-
"@deliverart/sdk-js-
|
|
26
|
-
"@deliverart/sdk-js-integration-types": "2.40.
|
|
27
|
-
"@deliverart/sdk-js-
|
|
28
|
-
"@deliverart/sdk-js-
|
|
29
|
-
"@deliverart/sdk-js-order": "2.40.
|
|
30
|
-
"@deliverart/sdk-js-sales-mode": "2.40.
|
|
31
|
-
"@deliverart/sdk-js-point-of-sale": "2.40.
|
|
22
|
+
"@deliverart/sdk-js-api-token": "2.40.1",
|
|
23
|
+
"@deliverart/sdk-js-core": "2.40.1",
|
|
24
|
+
"@deliverart/sdk-js-customer": "2.40.1",
|
|
25
|
+
"@deliverart/sdk-js-image": "2.40.1",
|
|
26
|
+
"@deliverart/sdk-js-integration-types": "2.40.1",
|
|
27
|
+
"@deliverart/sdk-js-menu": "2.40.1",
|
|
28
|
+
"@deliverart/sdk-js-global-types": "2.40.1",
|
|
29
|
+
"@deliverart/sdk-js-order": "2.40.1",
|
|
30
|
+
"@deliverart/sdk-js-sales-mode": "2.40.1",
|
|
31
|
+
"@deliverart/sdk-js-point-of-sale": "2.40.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"vitest": "4.1.11"
|