@deliverart/sdk-js-integration 0.0.1 → 0.0.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.
- package/CHANGELOG.md +13 -0
- package/dist/index.cjs +21 -11
- package/dist/index.d.cts +912 -912
- package/dist/index.d.ts +912 -912
- package/dist/index.js +21 -11
- package/package.json +5 -5
- package/src/schemas.ts +2 -2
- package/src/service-schemas/justeat.ts +1 -1
- package/src/types.ts +21 -8
package/dist/index.js
CHANGED
|
@@ -107,14 +107,24 @@ var integrationJustEatPathSchema = integrationPathSchemas.justeat.pathSchema;
|
|
|
107
107
|
var integrationJustEatNullablePathSchema = integrationPathSchemas.justeat.nullablePathSchema;
|
|
108
108
|
var integrationCassaInCloudPathSchema = integrationPathSchemas.cassa_in_cloud.pathSchema;
|
|
109
109
|
var integrationCassaInCloudNullablePathSchema = integrationPathSchemas.cassa_in_cloud.nullablePathSchema;
|
|
110
|
-
var integrationPathSchema = z.string().refine(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
110
|
+
var integrationPathSchema = z.string().refine(
|
|
111
|
+
(val) => /^\/integrations\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
112
|
+
val
|
|
113
|
+
),
|
|
114
|
+
{
|
|
115
|
+
message: "Invalid integration path format"
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
var integrationNullablePathSchema = z.string().nullable().refine(
|
|
119
|
+
(val) => val == null || /^\/integrations\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
120
|
+
val
|
|
121
|
+
),
|
|
122
|
+
{
|
|
123
|
+
message: "Invalid integration path format"
|
|
124
|
+
}
|
|
125
|
+
);
|
|
116
126
|
var integrationCassaInCloudSyncMenuErrorLogPathSchema = z.string().refine(
|
|
117
|
-
(val) => /^\/integrations\/cassa_in_cloud\/[
|
|
127
|
+
(val) => /^\/integrations\/cassa_in_cloud\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\/sync_menu_processes\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\/error_logs\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
118
128
|
val
|
|
119
129
|
),
|
|
120
130
|
{
|
|
@@ -122,7 +132,7 @@ var integrationCassaInCloudSyncMenuErrorLogPathSchema = z.string().refine(
|
|
|
122
132
|
}
|
|
123
133
|
);
|
|
124
134
|
var integrationCassaInCloudSyncMenuErrorLogNullablePathSchema = z.string().nullable().refine(
|
|
125
|
-
(val) => val == null || /^\/integrations\/cassa_in_cloud\/[
|
|
135
|
+
(val) => val == null || /^\/integrations\/cassa_in_cloud\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\/sync_menu_processes\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\/error_logs\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
126
136
|
val
|
|
127
137
|
),
|
|
128
138
|
{
|
|
@@ -801,8 +811,8 @@ var integrationDeliveryProviderCommonSchema = z23.object({
|
|
|
801
811
|
importTaggedItems: z23.boolean(),
|
|
802
812
|
tagsForImport: z23.array(z23.string()).optional(),
|
|
803
813
|
isValidMenu: z23.boolean(),
|
|
804
|
-
latestMenuSyncAt: datetimeSchema3,
|
|
805
|
-
latestMenuCheckAt: datetimeSchema3,
|
|
814
|
+
latestMenuSyncAt: datetimeSchema3.nullable(),
|
|
815
|
+
latestMenuCheckAt: datetimeSchema3.nullable(),
|
|
806
816
|
currentMenuVersion: menuVersionSchema.nullable(),
|
|
807
817
|
salesMode: salesModeNullablePathSchema
|
|
808
818
|
});
|
|
@@ -1164,7 +1174,7 @@ var integrationJustEatSchema = integrationBaseSchema.omit({ service: true }).ext
|
|
|
1164
1174
|
syncType: integrationJustEatSyncTypeSchema,
|
|
1165
1175
|
defaultLanguage: z27.string(),
|
|
1166
1176
|
restaurantId: z27.string(),
|
|
1167
|
-
latestOpeningTimesSyncAt: datetimeSchema7,
|
|
1177
|
+
latestOpeningTimesSyncAt: datetimeSchema7.nullable(),
|
|
1168
1178
|
service: integrationServiceSchema.extract(["justeat"]),
|
|
1169
1179
|
autoAcceptOrders: z27.boolean(),
|
|
1170
1180
|
nextSyncMenuScheduledAt: datetimeSchema7.nullable()
|
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": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@deliverart/sdk-js-core": "0.1.
|
|
16
|
-
"@deliverart/sdk-js-global-types": "0.0.
|
|
17
|
-
"@deliverart/sdk-js-point-of-sale": "0.0.
|
|
18
|
-
"@deliverart/sdk-js-sales-mode": "0.0.
|
|
15
|
+
"@deliverart/sdk-js-core": "0.1.4",
|
|
16
|
+
"@deliverart/sdk-js-global-types": "0.0.16",
|
|
17
|
+
"@deliverart/sdk-js-point-of-sale": "0.0.8",
|
|
18
|
+
"@deliverart/sdk-js-sales-mode": "0.0.5",
|
|
19
19
|
"axios": "1.9.0",
|
|
20
20
|
"zod": "3.25.67"
|
|
21
21
|
},
|
package/src/schemas.ts
CHANGED
|
@@ -53,8 +53,8 @@ export const integrationDeliveryProviderCommonSchema = z.object({
|
|
|
53
53
|
importTaggedItems: z.boolean(),
|
|
54
54
|
tagsForImport: z.array(z.string()).optional(),
|
|
55
55
|
isValidMenu: z.boolean(),
|
|
56
|
-
latestMenuSyncAt: datetimeSchema,
|
|
57
|
-
latestMenuCheckAt: datetimeSchema,
|
|
56
|
+
latestMenuSyncAt: datetimeSchema.nullable(),
|
|
57
|
+
latestMenuCheckAt: datetimeSchema.nullable(),
|
|
58
58
|
currentMenuVersion: menuVersionSchema.nullable(),
|
|
59
59
|
salesMode: salesModeNullablePathSchema,
|
|
60
60
|
})
|
|
@@ -24,7 +24,7 @@ export const integrationJustEatSchema = integrationBaseSchema
|
|
|
24
24
|
syncType: integrationJustEatSyncTypeSchema,
|
|
25
25
|
defaultLanguage: z.string(),
|
|
26
26
|
restaurantId: z.string(),
|
|
27
|
-
latestOpeningTimesSyncAt: datetimeSchema,
|
|
27
|
+
latestOpeningTimesSyncAt: datetimeSchema.nullable(),
|
|
28
28
|
service: integrationServiceSchema.extract(['justeat']),
|
|
29
29
|
autoAcceptOrders: z.boolean(),
|
|
30
30
|
nextSyncMenuScheduledAt: datetimeSchema.nullable(),
|
package/src/types.ts
CHANGED
|
@@ -181,24 +181,37 @@ export type IntegrationCassaInCloudNullablePath = z.infer<
|
|
|
181
181
|
|
|
182
182
|
export const integrationPathSchema = z
|
|
183
183
|
.string()
|
|
184
|
-
.refine(
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
.refine(
|
|
185
|
+
val =>
|
|
186
|
+
/^\/integrations\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
187
|
+
val,
|
|
188
|
+
),
|
|
189
|
+
{
|
|
190
|
+
message: 'Invalid integration path format',
|
|
191
|
+
},
|
|
192
|
+
)
|
|
187
193
|
export type IntegrationPath = z.infer<typeof integrationPathSchema>
|
|
188
194
|
|
|
189
195
|
export const integrationNullablePathSchema = z
|
|
190
196
|
.string()
|
|
191
197
|
.nullable()
|
|
192
|
-
.refine(
|
|
193
|
-
|
|
194
|
-
|
|
198
|
+
.refine(
|
|
199
|
+
val =>
|
|
200
|
+
val == null ||
|
|
201
|
+
/^\/integrations\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
202
|
+
val,
|
|
203
|
+
),
|
|
204
|
+
{
|
|
205
|
+
message: 'Invalid integration path format',
|
|
206
|
+
},
|
|
207
|
+
)
|
|
195
208
|
export type IntegrationNullablePath = z.infer<typeof integrationNullablePathSchema>
|
|
196
209
|
|
|
197
210
|
export const integrationCassaInCloudSyncMenuErrorLogPathSchema = z
|
|
198
211
|
.string()
|
|
199
212
|
.refine(
|
|
200
213
|
val =>
|
|
201
|
-
/^\/integrations\/cassa_in_cloud\/[
|
|
214
|
+
/^\/integrations\/cassa_in_cloud\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\/sync_menu_processes\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\/error_logs\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
202
215
|
val,
|
|
203
216
|
),
|
|
204
217
|
{
|
|
@@ -215,7 +228,7 @@ export const integrationCassaInCloudSyncMenuErrorLogNullablePathSchema = z
|
|
|
215
228
|
.refine(
|
|
216
229
|
val =>
|
|
217
230
|
val == null ||
|
|
218
|
-
/^\/integrations\/cassa_in_cloud\/[
|
|
231
|
+
/^\/integrations\/cassa_in_cloud\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\/sync_menu_processes\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\/error_logs\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(
|
|
219
232
|
val,
|
|
220
233
|
),
|
|
221
234
|
{
|