order3000 1.3.0 → 1.5.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/schemas.mjs CHANGED
@@ -274,7 +274,7 @@ const cancelTeamOrderResponseSchema = z.object({
274
274
  });
275
275
 
276
276
  const cancellationReasonSchema = z.enum([
277
- "customer_request",
277
+ "guest_request",
278
278
  "restaurant_request"
279
279
  ]);
280
280
 
@@ -291,7 +291,7 @@ const confirmOrderResponseSchema = z.object({
291
291
  quickReferenceNumber: z.nullable(
292
292
  z.int().min(-9007199254740991).max(9007199254740991)
293
293
  ),
294
- customerId: z.optional(z.string())
294
+ guestId: z.optional(z.string())
295
295
  });
296
296
 
297
297
  const contactPreferenceSchema = z.enum(["email", "phone", "sms", "none"]);
@@ -572,11 +572,41 @@ const createAdResponseSchema = z.object({
572
572
  get status() {
573
573
  return adStatusSchema;
574
574
  },
575
+ campaignId: z.nullable(z.string()),
575
576
  content: z.union([
576
577
  z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
577
578
  z.array(z.any()),
578
579
  z.object({}).catchall(z.any())
579
580
  ]),
581
+ keywords: z.union([
582
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
583
+ z.array(z.any()),
584
+ z.object({}).catchall(z.any())
585
+ ]),
586
+ negativeKeywords: z.union([
587
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
588
+ z.array(z.any()),
589
+ z.object({}).catchall(z.any())
590
+ ]),
591
+ disabledVenueKeywords: z.union([
592
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
593
+ z.array(z.any()),
594
+ z.object({}).catchall(z.any())
595
+ ]),
596
+ dismissedKeywords: z.union([
597
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
598
+ z.array(z.any()),
599
+ z.object({}).catchall(z.any())
600
+ ]),
601
+ publishedContentHash: z.nullable(z.string()),
602
+ publishedAt: z.nullable(z.any()),
603
+ pushedKeywords: z.nullable(
604
+ z.union([
605
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
606
+ z.array(z.any()),
607
+ z.object({}).catchall(z.any())
608
+ ])
609
+ ),
580
610
  createdBy: z.nullable(z.string()),
581
611
  updatedBy: z.nullable(z.string()),
582
612
  createdAt: z.nullable(z.any()),
@@ -712,8 +742,8 @@ const createPaymentIntentRequestSchema = z.object({
712
742
  return fulfillmentTypeSchema;
713
743
  },
714
744
  fulfillmentAt: z.iso.datetime().nullish(),
715
- customerFirstName: z.optional(z.string()),
716
- customerLastName: z.optional(z.string()),
745
+ guestFirstName: z.optional(z.string()),
746
+ guestLastName: z.optional(z.string()),
717
747
  teamOrderPublicId: z.optional(z.string()),
718
748
  declaredReturns: z.optional(
719
749
  z.array(
@@ -782,11 +812,41 @@ const deleteAdResponseSchema = z.object({
782
812
  get status() {
783
813
  return adStatusSchema;
784
814
  },
815
+ campaignId: z.nullable(z.string()),
785
816
  content: z.union([
786
817
  z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
787
818
  z.array(z.any()),
788
819
  z.object({}).catchall(z.any())
789
820
  ]),
821
+ keywords: z.union([
822
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
823
+ z.array(z.any()),
824
+ z.object({}).catchall(z.any())
825
+ ]),
826
+ negativeKeywords: z.union([
827
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
828
+ z.array(z.any()),
829
+ z.object({}).catchall(z.any())
830
+ ]),
831
+ disabledVenueKeywords: z.union([
832
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
833
+ z.array(z.any()),
834
+ z.object({}).catchall(z.any())
835
+ ]),
836
+ dismissedKeywords: z.union([
837
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
838
+ z.array(z.any()),
839
+ z.object({}).catchall(z.any())
840
+ ]),
841
+ publishedContentHash: z.nullable(z.string()),
842
+ publishedAt: z.nullable(z.any()),
843
+ pushedKeywords: z.nullable(
844
+ z.union([
845
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
846
+ z.array(z.any()),
847
+ z.object({}).catchall(z.any())
848
+ ])
849
+ ),
790
850
  createdBy: z.nullable(z.string()),
791
851
  updatedBy: z.nullable(z.string()),
792
852
  createdAt: z.nullable(z.any()),
@@ -880,11 +940,41 @@ const editAdResponseSchema = z.object({
880
940
  get status() {
881
941
  return adStatusSchema;
882
942
  },
943
+ campaignId: z.nullable(z.string()),
883
944
  content: z.union([
884
945
  z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
885
946
  z.array(z.any()),
886
947
  z.object({}).catchall(z.any())
887
948
  ]),
949
+ keywords: z.union([
950
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
951
+ z.array(z.any()),
952
+ z.object({}).catchall(z.any())
953
+ ]),
954
+ negativeKeywords: z.union([
955
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
956
+ z.array(z.any()),
957
+ z.object({}).catchall(z.any())
958
+ ]),
959
+ disabledVenueKeywords: z.union([
960
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
961
+ z.array(z.any()),
962
+ z.object({}).catchall(z.any())
963
+ ]),
964
+ dismissedKeywords: z.union([
965
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
966
+ z.array(z.any()),
967
+ z.object({}).catchall(z.any())
968
+ ]),
969
+ publishedContentHash: z.nullable(z.string()),
970
+ publishedAt: z.nullable(z.any()),
971
+ pushedKeywords: z.nullable(
972
+ z.union([
973
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
974
+ z.array(z.any()),
975
+ z.object({}).catchall(z.any())
976
+ ])
977
+ ),
888
978
  createdBy: z.nullable(z.string()),
889
979
  updatedBy: z.nullable(z.string()),
890
980
  createdAt: z.nullable(z.any()),
@@ -1131,7 +1221,7 @@ const featureCategorySchema = z.enum([
1131
1221
  "auth",
1132
1222
  "billing",
1133
1223
  "core",
1134
- "customers",
1224
+ "guests",
1135
1225
  "events",
1136
1226
  "inventory",
1137
1227
  "menus",
@@ -1162,11 +1252,41 @@ const fetchAdResponseSchema = z.object({
1162
1252
  get status() {
1163
1253
  return adStatusSchema;
1164
1254
  },
1255
+ campaignId: z.nullable(z.string()),
1165
1256
  content: z.union([
1166
1257
  z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
1167
1258
  z.array(z.any()),
1168
1259
  z.object({}).catchall(z.any())
1169
1260
  ]),
1261
+ keywords: z.union([
1262
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
1263
+ z.array(z.any()),
1264
+ z.object({}).catchall(z.any())
1265
+ ]),
1266
+ negativeKeywords: z.union([
1267
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
1268
+ z.array(z.any()),
1269
+ z.object({}).catchall(z.any())
1270
+ ]),
1271
+ disabledVenueKeywords: z.union([
1272
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
1273
+ z.array(z.any()),
1274
+ z.object({}).catchall(z.any())
1275
+ ]),
1276
+ dismissedKeywords: z.union([
1277
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
1278
+ z.array(z.any()),
1279
+ z.object({}).catchall(z.any())
1280
+ ]),
1281
+ publishedContentHash: z.nullable(z.string()),
1282
+ publishedAt: z.nullable(z.any()),
1283
+ pushedKeywords: z.nullable(
1284
+ z.union([
1285
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
1286
+ z.array(z.any()),
1287
+ z.object({}).catchall(z.any())
1288
+ ])
1289
+ ),
1170
1290
  createdBy: z.nullable(z.string()),
1171
1291
  updatedBy: z.nullable(z.string()),
1172
1292
  createdAt: z.nullable(z.any()),
@@ -1187,11 +1307,41 @@ const fetchAdsResponseSchema = z.array(
1187
1307
  get status() {
1188
1308
  return adStatusSchema;
1189
1309
  },
1310
+ campaignId: z.nullable(z.string()),
1190
1311
  content: z.union([
1191
1312
  z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
1192
1313
  z.array(z.any()),
1193
1314
  z.object({}).catchall(z.any())
1194
1315
  ]),
1316
+ keywords: z.union([
1317
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
1318
+ z.array(z.any()),
1319
+ z.object({}).catchall(z.any())
1320
+ ]),
1321
+ negativeKeywords: z.union([
1322
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
1323
+ z.array(z.any()),
1324
+ z.object({}).catchall(z.any())
1325
+ ]),
1326
+ disabledVenueKeywords: z.union([
1327
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
1328
+ z.array(z.any()),
1329
+ z.object({}).catchall(z.any())
1330
+ ]),
1331
+ dismissedKeywords: z.union([
1332
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
1333
+ z.array(z.any()),
1334
+ z.object({}).catchall(z.any())
1335
+ ]),
1336
+ publishedContentHash: z.nullable(z.string()),
1337
+ publishedAt: z.nullable(z.any()),
1338
+ pushedKeywords: z.nullable(
1339
+ z.union([
1340
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
1341
+ z.array(z.any()),
1342
+ z.object({}).catchall(z.any())
1343
+ ])
1344
+ ),
1195
1345
  createdBy: z.nullable(z.string()),
1196
1346
  updatedBy: z.nullable(z.string()),
1197
1347
  createdAt: z.nullable(z.any()),
@@ -1210,8 +1360,8 @@ const fetchAreaBookingsResponseSchema = z.array(
1210
1360
  get status() {
1211
1361
  return areaBookingStatusSchema;
1212
1362
  },
1213
- customerFirstName: z.optional(z.string()),
1214
- customerLastName: z.optional(z.string()),
1363
+ guestFirstName: z.optional(z.string()),
1364
+ guestLastName: z.optional(z.string()),
1215
1365
  totalPrice: z.optional(
1216
1366
  z.int().min(-9007199254740991).max(9007199254740991)
1217
1367
  ),
@@ -2139,7 +2289,7 @@ const fetchTeamOrderResponseSchema = z.object({
2139
2289
  }),
2140
2290
  participants: z.array(
2141
2291
  z.object({
2142
- customerId: z.string(),
2292
+ guestId: z.string(),
2143
2293
  basketId: z.nullable(z.string()),
2144
2294
  orderId: z.nullable(z.string()),
2145
2295
  participantNumber: z.nullable(z.int().max(9007199254740991).gt(0)),
@@ -2384,7 +2534,7 @@ const joinTeamOrderRequestSchema = z.object({
2384
2534
  const joinTeamOrderResponseSchema = z.object({
2385
2535
  teamOrderId: z.uuid(),
2386
2536
  basketId: z.string(),
2387
- customerId: z.string(),
2537
+ guestId: z.string(),
2388
2538
  get status() {
2389
2539
  return teamOrderStatusSchema;
2390
2540
  },
@@ -2592,11 +2742,11 @@ const makeReservationRequestSchema = z.object({
2592
2742
  duration: z.int().min(30).max(300).describe(
2593
2743
  "Reservation duration in minutes. Defaults to 120 minutes if not specified. Range: 30-300 minutes."
2594
2744
  ).nullish(),
2595
- customerId: z.uuid().describe("UUID of existing customer profile if available").nullish(),
2596
- customerFirstName: z.string().min(1).max(50).describe("First name of the customer making the reservation"),
2597
- customerLastName: z.string().min(1).max(50).describe("Last name of the customer making the reservation"),
2598
- customerEmail: z.email().describe("Email address for reservation confirmations and updates").nullish(),
2599
- customerPhone: z.string().min(1).describe(
2745
+ guestId: z.uuid().describe("UUID of existing customer profile if available").nullish(),
2746
+ guestFirstName: z.string().min(1).max(50).describe("First name of the customer making the reservation"),
2747
+ guestLastName: z.string().min(1).max(50).describe("Last name of the customer making the reservation"),
2748
+ guestEmail: z.email().describe("Email address for reservation confirmations and updates").nullish(),
2749
+ guestPhone: z.string().min(1).describe(
2600
2750
  "Phone number for reservation confirmations and updates. Include country code for international numbers."
2601
2751
  ).nullish(),
2602
2752
  get contactPreference() {
@@ -2643,13 +2793,13 @@ const makeReservationResponseSchema = z.object({
2643
2793
  duration: z.nullable(
2644
2794
  z.int().min(-9007199254740991).max(9007199254740991).describe("Reservation duration in minutes")
2645
2795
  ),
2646
- customerId: z.nullable(
2796
+ guestId: z.nullable(
2647
2797
  z.uuid().describe("Link to customer profile if exists")
2648
2798
  ),
2649
- customerFirstName: z.string().describe("First name of the customer"),
2650
- customerLastName: z.string().describe("Last name of the customer"),
2651
- customerEmail: z.nullable(z.string().describe("Customer email address")),
2652
- customerPhone: z.nullable(z.string().describe("Customer phone number")),
2799
+ guestFirstName: z.string().describe("First name of the customer"),
2800
+ guestLastName: z.string().describe("Last name of the customer"),
2801
+ guestEmail: z.nullable(z.string().describe("Customer email address")),
2802
+ guestPhone: z.nullable(z.string().describe("Customer phone number")),
2653
2803
  get contactPreference() {
2654
2804
  return contactPreferenceSchema;
2655
2805
  },
@@ -2740,9 +2890,9 @@ const placeOrderRequestSchema = z.object({
2740
2890
  return fulfillmentTypeSchema;
2741
2891
  },
2742
2892
  fulfillmentAt: z.iso.datetime().nullish(),
2743
- customerFirstName: z.optional(z.string()),
2744
- customerLastName: z.optional(z.string()),
2745
- customerEmail: z.optional(z.string()),
2893
+ guestFirstName: z.optional(z.string()),
2894
+ guestLastName: z.optional(z.string()),
2895
+ guestEmail: z.optional(z.string()),
2746
2896
  declaredReturns: z.optional(
2747
2897
  z.array(
2748
2898
  z.object({
@@ -2798,12 +2948,29 @@ const removeFromBasketResponseSchema = z.object({
2798
2948
  }
2799
2949
  });
2800
2950
 
2951
+ const reservationMessageStatusSchema = z.enum(["draft", "sent"]);
2952
+
2801
2953
  const reservationPromotionStatusSchema = z.enum([
2802
2954
  "applied",
2803
2955
  "redeemed",
2804
2956
  "expired"
2805
2957
  ]);
2806
2958
 
2959
+ const saveAdKeywordsRequestSchema = z.object({
2960
+ venueAccessor: z.string().min(1),
2961
+ adId: z.string().min(1),
2962
+ keywords: z.array(z.string().min(1)),
2963
+ dismissedKeywords: z.array(z.string().min(1)),
2964
+ disabledVenueKeywords: z.array(z.string().min(1))
2965
+ });
2966
+
2967
+ const saveAdKeywordsResponseSchema = z.object({
2968
+ success: z.boolean(),
2969
+ keywords: z.array(z.string()),
2970
+ dismissedKeywords: z.array(z.string()),
2971
+ disabledVenueKeywords: z.array(z.string())
2972
+ });
2973
+
2807
2974
  const scanTokenEntityTypeSchema = z.enum(["order", "depositware"]);
2808
2975
 
2809
2976
  const setArticleFeatureImageUploadBodySchema = z.object({
@@ -2895,10 +3062,10 @@ const submitAreaBookingPayloadSchema = z.object({
2895
3062
  requestedStartTime: z.optional(z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/)),
2896
3063
  requestedEndTime: z.optional(z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/)),
2897
3064
  partySize: z.int().max(9007199254740991).gt(0),
2898
- customerFirstName: z.string().min(1),
2899
- customerLastName: z.string().min(1),
2900
- customerEmail: z.email(),
2901
- customerPhone: z.optional(z.string()),
3065
+ guestFirstName: z.string().min(1),
3066
+ guestLastName: z.string().min(1),
3067
+ guestEmail: z.email(),
3068
+ guestPhone: z.optional(z.string()),
2902
3069
  message: z.optional(z.string()),
2903
3070
  get source() {
2904
3071
  return areaBookingRequestSourceSchema.optional();
@@ -2913,10 +3080,10 @@ const submitAreaBookingRequestResponseSchema = z.object({
2913
3080
  requestedStartTime: z.nullable(z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/)),
2914
3081
  requestedEndTime: z.nullable(z.string().regex(/^\d{2}:\d{2}(:\d{2})?$/)),
2915
3082
  partySize: z.int().min(-9007199254740991).max(9007199254740991),
2916
- customerFirstName: z.string(),
2917
- customerLastName: z.string(),
2918
- customerEmail: z.string(),
2919
- customerPhone: z.nullable(z.string()),
3083
+ guestFirstName: z.string(),
3084
+ guestLastName: z.string(),
3085
+ guestEmail: z.string(),
3086
+ guestPhone: z.nullable(z.string()),
2920
3087
  message: z.nullable(z.string()),
2921
3088
  get source() {
2922
3089
  return areaBookingRequestSourceSchema;
@@ -3067,6 +3234,13 @@ const venueAssetTypeSchema = z.enum([
3067
3234
 
3068
3235
  const venueChargeKindSchema = z.enum(["base", "addon"]);
3069
3236
 
3237
+ const venueEmailSenderStatusSchema = z.enum([
3238
+ "pending",
3239
+ "verified",
3240
+ "failed",
3241
+ "temporary_failure"
3242
+ ]);
3243
+
3070
3244
  const venueTypeSchema = z.enum([
3071
3245
  "restaurant",
3072
3246
  "fine_dining_restaurant",
@@ -3194,9 +3368,12 @@ const schemas = {
3194
3368
  ReduceDeltaPaymentIntentRequest: reduceDeltaPaymentIntentRequestSchema,
3195
3369
  ReduceDeltaPaymentIntentResponse: reduceDeltaPaymentIntentResponseSchema,
3196
3370
  RemoveFromBasketResponse: removeFromBasketResponseSchema,
3371
+ ReservationMessageStatus: reservationMessageStatusSchema,
3197
3372
  ReservationPromotionStatus: reservationPromotionStatusSchema,
3198
3373
  ReservationStatus: reservationStatusSchema,
3199
3374
  RitualType: ritualTypeSchema,
3375
+ SaveAdKeywordsRequest: saveAdKeywordsRequestSchema,
3376
+ SaveAdKeywordsResponse: saveAdKeywordsResponseSchema,
3200
3377
  ScanTokenEntityType: scanTokenEntityTypeSchema,
3201
3378
  SetArticleFeatureImageUploadBody: setArticleFeatureImageUploadBodySchema,
3202
3379
  SetBasketDeclaredReturnsRequest: setBasketDeclaredReturnsRequestSchema,
@@ -3230,6 +3407,7 @@ const schemas = {
3230
3407
  UploadAssetResponse: uploadAssetResponseSchema,
3231
3408
  VenueAssetType: venueAssetTypeSchema,
3232
3409
  VenueChargeKind: venueChargeKindSchema,
3410
+ VenueEmailSenderStatus: venueEmailSenderStatusSchema,
3233
3411
  VenueType: venueTypeSchema,
3234
3412
  VenueUserStatus: venueUserStatusSchema
3235
3413
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "order3000",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "order3000 node.js sdk",
5
5
  "main": "./dist/client.cjs",
6
6
  "module": "./dist/client.mjs",
@@ -47,7 +47,7 @@
47
47
  "prettier": "^3.7.4",
48
48
  "tsx": "^4.19.2",
49
49
  "typescript": "^5.9.3",
50
- "@kolaveri/eslint-config": "1.10.1",
50
+ "@kolaveri/eslint-config": "1.10.2",
51
51
  "@kolaveri/prettier-config": "1.0.6",
52
52
  "@kolaveri/tsconfig": "1.0.1"
53
53
  },