order3000 1.1.0 → 1.2.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
@@ -11,6 +11,12 @@ const abandonBasketResponseSchema = z.object({
11
11
 
12
12
  const actorTypeSchema = z.enum(["human", "robot"]);
13
13
 
14
+ const adChannelSchema = z.enum(["google"]);
15
+
16
+ const adOwnerTypeSchema = z.enum(["event"]);
17
+
18
+ const adStatusSchema = z.enum(["draft", "ready", "archived"]);
19
+
14
20
  const unitSchema = z.enum([
15
21
  "grams",
16
22
  "kilograms",
@@ -542,6 +548,41 @@ const countryCodeSchema = z.enum([
542
548
  "ZW"
543
549
  ]);
544
550
 
551
+ const createAdRequestSchema = z.object({
552
+ venueAccessor: z.string().min(1),
553
+ get ownerEntityType() {
554
+ return adOwnerTypeSchema;
555
+ },
556
+ ownerEntityId: z.string().min(1),
557
+ get channel() {
558
+ return adChannelSchema;
559
+ }
560
+ }).describe("Request payload for creating a new ad");
561
+
562
+ const createAdResponseSchema = z.object({
563
+ id: z.string(),
564
+ venueId: z.string(),
565
+ get ownerEntityType() {
566
+ return adOwnerTypeSchema;
567
+ },
568
+ ownerEntityId: z.string(),
569
+ get channel() {
570
+ return adChannelSchema;
571
+ },
572
+ get status() {
573
+ return adStatusSchema;
574
+ },
575
+ content: z.union([
576
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
577
+ z.array(z.any()),
578
+ z.object({}).catchall(z.any())
579
+ ]),
580
+ createdBy: z.nullable(z.string()),
581
+ updatedBy: z.nullable(z.string()),
582
+ createdAt: z.nullable(z.any()),
583
+ updatedAt: z.nullable(z.any())
584
+ }).describe("Successfully created ad");
585
+
545
586
  const createDeltaPaymentIntentRequestSchema = z.object({
546
587
  venueAccessor: z.string().min(1),
547
588
  basketId: z.string().min(1),
@@ -590,12 +631,12 @@ const createEventRequestSchema = z.object({
590
631
  z.object({}).catchall(z.any())
591
632
  ]).nullish(),
592
633
  scheduleId: z.string().nullish(),
634
+ occurrenceDate: z.string().nullish(),
593
635
  maxBookings: z.int().min(-2147483648).max(2147483647).nullish(),
594
636
  maxGuests: z.int().min(-2147483648).max(2147483647).nullish(),
595
637
  minPartySize: z.int().min(-2147483648).max(2147483647).nullish(),
596
638
  maxPartySize: z.int().min(-2147483648).max(2147483647).nullish(),
597
639
  isPublic: z.optional(z.boolean()),
598
- isRecurring: z.optional(z.boolean()),
599
640
  reservationsEnabled: z.optional(z.boolean()),
600
641
  bookingOpensAtDays: z.int().min(-2147483648).max(2147483647).nullish(),
601
642
  bookingClosesAtOffset: z.int().min(-2147483648).max(2147483647).nullish(),
@@ -642,12 +683,12 @@ const createEventResponseSchema = z.object({
642
683
  ),
643
684
  scheduleId: z.nullable(z.string()),
644
685
  ritualId: z.nullable(z.string()),
686
+ occurrenceDate: z.nullable(z.string()),
645
687
  maxBookings: z.nullable(z.int().min(-2147483648).max(2147483647)),
646
688
  maxGuests: z.nullable(z.int().min(-2147483648).max(2147483647)),
647
689
  minPartySize: z.nullable(z.int().min(-2147483648).max(2147483647)),
648
690
  maxPartySize: z.nullable(z.int().min(-2147483648).max(2147483647)),
649
691
  isPublic: z.boolean(),
650
- isRecurring: z.boolean(),
651
692
  reservationsEnabled: z.boolean(),
652
693
  bookingOpensAtDays: z.nullable(z.int().min(-2147483648).max(2147483647)),
653
694
  bookingClosesAtOffset: z.nullable(z.int().min(-2147483648).max(2147483647)),
@@ -728,6 +769,30 @@ const dayOfWeekSchema = z.enum([
728
769
  "sunday"
729
770
  ]);
730
771
 
772
+ const deleteAdResponseSchema = z.object({
773
+ id: z.string(),
774
+ venueId: z.string(),
775
+ get ownerEntityType() {
776
+ return adOwnerTypeSchema;
777
+ },
778
+ ownerEntityId: z.string(),
779
+ get channel() {
780
+ return adChannelSchema;
781
+ },
782
+ get status() {
783
+ return adStatusSchema;
784
+ },
785
+ content: z.union([
786
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
787
+ z.array(z.any()),
788
+ z.object({}).catchall(z.any())
789
+ ]),
790
+ createdBy: z.nullable(z.string()),
791
+ updatedBy: z.nullable(z.string()),
792
+ createdAt: z.nullable(z.any()),
793
+ updatedAt: z.nullable(z.any())
794
+ });
795
+
731
796
  const deleteAssetResponseSchema = z.object({
732
797
  success: z.boolean()
733
798
  });
@@ -750,12 +815,12 @@ const deleteEventResponseSchema = z.object({
750
815
  ),
751
816
  scheduleId: z.nullable(z.string()),
752
817
  ritualId: z.nullable(z.string()),
818
+ occurrenceDate: z.nullable(z.string()),
753
819
  maxBookings: z.nullable(z.int().min(-2147483648).max(2147483647)),
754
820
  maxGuests: z.nullable(z.int().min(-2147483648).max(2147483647)),
755
821
  minPartySize: z.nullable(z.int().min(-2147483648).max(2147483647)),
756
822
  maxPartySize: z.nullable(z.int().min(-2147483648).max(2147483647)),
757
823
  isPublic: z.boolean(),
758
- isRecurring: z.boolean(),
759
824
  reservationsEnabled: z.boolean(),
760
825
  bookingOpensAtDays: z.nullable(z.int().min(-2147483648).max(2147483647)),
761
826
  bookingClosesAtOffset: z.nullable(z.int().min(-2147483648).max(2147483647)),
@@ -785,6 +850,47 @@ const depositwareStatusSchema = z.enum([
785
850
  "retired"
786
851
  ]);
787
852
 
853
+ const editAdRequestSchema = z.object({
854
+ venueAccessor: z.string().min(1),
855
+ id: z.string().min(1),
856
+ content: z.optional(
857
+ z.object({
858
+ businessName: z.object({}).catchall(z.string().max(25)),
859
+ headlines: z.object({}).catchall(z.array(z.string().max(30)).max(15)),
860
+ descriptions: z.object({}).catchall(z.array(z.string().max(90)).max(4)),
861
+ paths: z.object({}).catchall(z.array(z.string().max(15)).max(2)),
862
+ finalUrl: z.url()
863
+ })
864
+ ),
865
+ get status() {
866
+ return adStatusSchema.optional();
867
+ }
868
+ }).describe("Partial-update body for an existing ad");
869
+
870
+ const editAdResponseSchema = z.object({
871
+ id: z.string(),
872
+ venueId: z.string(),
873
+ get ownerEntityType() {
874
+ return adOwnerTypeSchema;
875
+ },
876
+ ownerEntityId: z.string(),
877
+ get channel() {
878
+ return adChannelSchema;
879
+ },
880
+ get status() {
881
+ return adStatusSchema;
882
+ },
883
+ content: z.union([
884
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
885
+ z.array(z.any()),
886
+ z.object({}).catchall(z.any())
887
+ ]),
888
+ createdBy: z.nullable(z.string()),
889
+ updatedBy: z.nullable(z.string()),
890
+ createdAt: z.nullable(z.any()),
891
+ updatedAt: z.nullable(z.any())
892
+ }).describe("Successfully updated ad");
893
+
788
894
  const editArticleRequestSchema = z.object({
789
895
  slug: z.optional(z.object({}).catchall(z.any())),
790
896
  title: z.optional(z.object({}).catchall(z.any())),
@@ -861,12 +967,12 @@ const editEventRequestSchema = z.object({
861
967
  z.object({}).catchall(z.any())
862
968
  ]).nullish(),
863
969
  scheduleId: z.string().nullish(),
970
+ occurrenceDate: z.string().nullish(),
864
971
  maxBookings: z.int().min(-2147483648).max(2147483647).nullish(),
865
972
  maxGuests: z.int().min(-2147483648).max(2147483647).nullish(),
866
973
  minPartySize: z.int().min(-2147483648).max(2147483647).nullish(),
867
974
  maxPartySize: z.int().min(-2147483648).max(2147483647).nullish(),
868
975
  isPublic: z.optional(z.boolean()),
869
- isRecurring: z.optional(z.boolean()),
870
976
  reservationsEnabled: z.optional(z.boolean()),
871
977
  bookingOpensAtDays: z.int().min(-2147483648).max(2147483647).nullish(),
872
978
  bookingClosesAtOffset: z.int().min(-2147483648).max(2147483647).nullish(),
@@ -912,12 +1018,12 @@ const editEventResponseSchema = z.object({
912
1018
  ),
913
1019
  scheduleId: z.nullable(z.string()),
914
1020
  ritualId: z.nullable(z.string()),
1021
+ occurrenceDate: z.nullable(z.string()),
915
1022
  maxBookings: z.nullable(z.int().min(-2147483648).max(2147483647)),
916
1023
  maxGuests: z.nullable(z.int().min(-2147483648).max(2147483647)),
917
1024
  minPartySize: z.nullable(z.int().min(-2147483648).max(2147483647)),
918
1025
  maxPartySize: z.nullable(z.int().min(-2147483648).max(2147483647)),
919
1026
  isPublic: z.boolean(),
920
- isRecurring: z.boolean(),
921
1027
  reservationsEnabled: z.boolean(),
922
1028
  bookingOpensAtDays: z.nullable(z.int().min(-2147483648).max(2147483647)),
923
1029
  bookingClosesAtOffset: z.nullable(z.int().min(-2147483648).max(2147483647)),
@@ -1004,6 +1110,8 @@ const enumFalseSchema = z.enum(["false"]);
1004
1110
 
1005
1111
  const enumTrueSchema = z.enum(["true"]);
1006
1112
 
1113
+ const eventAssetSourceSchema = z.enum(["inherited", "manual"]);
1114
+
1007
1115
  const extendDeadlineTeamOrderRequestSchema = z.object({
1008
1116
  publicId: z.string().min(1),
1009
1117
  sessionId: z.string().min(1),
@@ -1041,6 +1149,56 @@ const featureStatusSchema = z.enum([
1041
1149
  "released"
1042
1150
  ]);
1043
1151
 
1152
+ const fetchAdResponseSchema = z.object({
1153
+ id: z.string(),
1154
+ venueId: z.string(),
1155
+ get ownerEntityType() {
1156
+ return adOwnerTypeSchema;
1157
+ },
1158
+ ownerEntityId: z.string(),
1159
+ get channel() {
1160
+ return adChannelSchema;
1161
+ },
1162
+ get status() {
1163
+ return adStatusSchema;
1164
+ },
1165
+ content: z.union([
1166
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
1167
+ z.array(z.any()),
1168
+ z.object({}).catchall(z.any())
1169
+ ]),
1170
+ createdBy: z.nullable(z.string()),
1171
+ updatedBy: z.nullable(z.string()),
1172
+ createdAt: z.nullable(z.any()),
1173
+ updatedAt: z.nullable(z.any())
1174
+ });
1175
+
1176
+ const fetchAdsResponseSchema = z.array(
1177
+ z.object({
1178
+ id: z.string(),
1179
+ venueId: z.string(),
1180
+ get ownerEntityType() {
1181
+ return adOwnerTypeSchema;
1182
+ },
1183
+ ownerEntityId: z.string(),
1184
+ get channel() {
1185
+ return adChannelSchema;
1186
+ },
1187
+ get status() {
1188
+ return adStatusSchema;
1189
+ },
1190
+ content: z.union([
1191
+ z.union([z.boolean(), z.string(), z.number(), z.enum([])]),
1192
+ z.array(z.any()),
1193
+ z.object({}).catchall(z.any())
1194
+ ]),
1195
+ createdBy: z.nullable(z.string()),
1196
+ updatedBy: z.nullable(z.string()),
1197
+ createdAt: z.nullable(z.any()),
1198
+ updatedAt: z.nullable(z.any())
1199
+ })
1200
+ );
1201
+
1044
1202
  const fetchAreaBookingsResponseSchema = z.array(
1045
1203
  z.object({
1046
1204
  id: z.string(),
@@ -1199,6 +1357,46 @@ const fetchArticlesResponseSchema = z.array(
1199
1357
  })
1200
1358
  );
1201
1359
 
1360
+ const fetchAssetsByTagResponseSchema = z.array(
1361
+ z.object({
1362
+ id: z.string(),
1363
+ get type() {
1364
+ return assetTypeSchema;
1365
+ },
1366
+ metadata: z.nullable(
1367
+ z.object({
1368
+ width: z.optional(z.number()),
1369
+ height: z.optional(z.number()),
1370
+ duration: z.optional(z.number())
1371
+ })
1372
+ ),
1373
+ isActive: z.boolean(),
1374
+ sortIndex: z.nullable(z.string()),
1375
+ updatedAt: z.nullable(z.any()),
1376
+ updatedBy: z.nullable(z.string()),
1377
+ createdAt: z.nullable(z.any()),
1378
+ createdBy: z.nullable(z.string()),
1379
+ venueId: z.nullable(z.string()),
1380
+ tags: z.nullable(z.array(z.string())),
1381
+ bucket: z.string(),
1382
+ storagePath: z.string(),
1383
+ filename: z.string(),
1384
+ contentType: z.string(),
1385
+ sizeBytes: z.number(),
1386
+ caption: z.object({}).catchall(z.any()),
1387
+ alt: z.object({}).catchall(z.any()),
1388
+ cropArea: z.nullable(
1389
+ z.object({
1390
+ x: z.number(),
1391
+ y: z.number(),
1392
+ width: z.number(),
1393
+ height: z.number()
1394
+ })
1395
+ ),
1396
+ publicUrl: z.string()
1397
+ })
1398
+ );
1399
+
1202
1400
  const fetchBasketResponseSchema = z.object({
1203
1401
  id: z.uuid(),
1204
1402
  sessionId: z.string(),
@@ -1316,7 +1514,7 @@ const fetchEventResponseSchema = z.object({
1316
1514
  })
1317
1515
  )
1318
1516
  ),
1319
- posters: z.optional(
1517
+ assets: z.optional(
1320
1518
  z.array(
1321
1519
  z.object({
1322
1520
  id: z.string(),
@@ -1341,6 +1539,8 @@ const promotionBenefitTypeSchema = z.enum([
1341
1539
  "buy_x_get_y"
1342
1540
  ]);
1343
1541
 
1542
+ const ritualTypeSchema = z.enum(["service", "special"]);
1543
+
1344
1544
  const fetchEventsResponseSchema = z.array(
1345
1545
  z.object({
1346
1546
  id: z.string(),
@@ -1350,6 +1550,10 @@ const fetchEventsResponseSchema = z.array(
1350
1550
  description: z.nullable(z.object({}).catchall(z.string())),
1351
1551
  scheduleId: z.nullable(z.string()),
1352
1552
  ritualId: z.nullable(z.string()),
1553
+ occurrenceDate: z.nullable(z.string()),
1554
+ get ritualType() {
1555
+ return ritualTypeSchema;
1556
+ },
1353
1557
  maxBookings: z.nullable(z.number()),
1354
1558
  maxGuests: z.nullable(z.number()),
1355
1559
  minPartySize: z.nullable(z.number()),
@@ -1448,7 +1652,7 @@ const fetchEventsResponseSchema = z.array(
1448
1652
  })
1449
1653
  ),
1450
1654
  nextOccurrence: z.nullable(z.string()),
1451
- posters: z.array(
1655
+ assets: z.array(
1452
1656
  z.object({
1453
1657
  id: z.string(),
1454
1658
  get type() {
@@ -2149,7 +2353,7 @@ const integrationNotificationTypeSchema = z.enum([
2149
2353
  "reservation_cancelled"
2150
2354
  ]);
2151
2355
 
2152
- const integrationTypeSchema = z.enum(["telegram"]);
2356
+ const integrationTypeSchema = z.enum(["telegram", "google_ads"]);
2153
2357
 
2154
2358
  const inventoryAssetStatusSchema = z.enum([
2155
2359
  "available",
@@ -2406,6 +2610,15 @@ const makeReservationRequestSchema = z.object({
2406
2610
  ).nullish(),
2407
2611
  tablePreference: z.string().max(100).describe(
2408
2612
  'Preferred seating area or table type (e.g., "window seat", "quiet area", "patio")'
2613
+ ).nullish(),
2614
+ gclid: z.string().describe(
2615
+ "Google Ads click identifier from the landing URL (auto-tagging). Stored for server-side conversion reporting."
2616
+ ).nullish(),
2617
+ gbraid: z.string().describe(
2618
+ "Google Ads click identifier for app/web (iOS) where `gclid` is unavailable."
2619
+ ).nullish(),
2620
+ wbraid: z.string().describe(
2621
+ "Google Ads click identifier for web-to-app (iOS) where `gclid` is unavailable."
2409
2622
  ).nullish()
2410
2623
  }).describe("Request payload for making a new reservation");
2411
2624
 
@@ -2464,6 +2677,9 @@ const makeReservationResponseSchema = z.object({
2464
2677
  get source() {
2465
2678
  return areaBookingRequestSourceSchema;
2466
2679
  },
2680
+ gclid: z.nullable(z.string()),
2681
+ gbraid: z.nullable(z.string()),
2682
+ wbraid: z.nullable(z.string()),
2467
2683
  specialRequests: z.nullable(
2468
2684
  z.string().describe("Any special requirements or notes")
2469
2685
  ),
@@ -2864,6 +3080,9 @@ const schemas = {
2864
3080
  AbandonBasketRequest: abandonBasketRequestSchema,
2865
3081
  AbandonBasketResponse: abandonBasketResponseSchema,
2866
3082
  ActorType: actorTypeSchema,
3083
+ AdChannel: adChannelSchema,
3084
+ AdOwnerType: adOwnerTypeSchema,
3085
+ AdStatus: adStatusSchema,
2867
3086
  AddToBasketRequest: addToBasketRequestSchema,
2868
3087
  AddToBasketResponse: addToBasketResponseSchema,
2869
3088
  AdditiveFunction: additiveFunctionSchema,
@@ -2891,6 +3110,8 @@ const schemas = {
2891
3110
  ConfirmOrderResponse: confirmOrderResponseSchema,
2892
3111
  ContactPreference: contactPreferenceSchema,
2893
3112
  CountryCode: countryCodeSchema,
3113
+ CreateAdRequest: createAdRequestSchema,
3114
+ CreateAdResponse: createAdResponseSchema,
2894
3115
  CreateDeltaPaymentIntentRequest: createDeltaPaymentIntentRequestSchema,
2895
3116
  CreateDeltaPaymentIntentResponse: createDeltaPaymentIntentResponseSchema,
2896
3117
  CreateEventRequest: createEventRequestSchema,
@@ -2901,11 +3122,14 @@ const schemas = {
2901
3122
  CreateTeamOrderResponse: createTeamOrderResponseSchema,
2902
3123
  Currency: currencySchema,
2903
3124
  DayOfWeek: dayOfWeekSchema,
3125
+ DeleteAdResponse: deleteAdResponseSchema,
2904
3126
  DeleteAssetResponse: deleteAssetResponseSchema,
2905
3127
  DeleteEventResponse: deleteEventResponseSchema,
2906
3128
  DeliveryAddress: deliveryAddressSchema,
2907
3129
  DepositTransactionType: depositTransactionTypeSchema,
2908
3130
  DepositwareStatus: depositwareStatusSchema,
3131
+ EditAdRequest: editAdRequestSchema,
3132
+ EditAdResponse: editAdResponseSchema,
2909
3133
  EditArticleRequest: editArticleRequestSchema,
2910
3134
  EditArticleResponse: editArticleResponseSchema,
2911
3135
  EditEventRequest: editEventRequestSchema,
@@ -2913,16 +3137,20 @@ const schemas = {
2913
3137
  EntityOwnerType: entityOwnerTypeSchema,
2914
3138
  EnumFalse: enumFalseSchema,
2915
3139
  EnumTrue: enumTrueSchema,
3140
+ EventAssetSource: eventAssetSourceSchema,
2916
3141
  ExtendDeadlineTeamOrderRequest: extendDeadlineTeamOrderRequestSchema,
2917
3142
  ExtendDeadlineTeamOrderResponse: extendDeadlineTeamOrderResponseSchema,
2918
3143
  FeatureCategory: featureCategorySchema,
2919
3144
  FeatureImage: featureImageSchema,
2920
3145
  FeatureStatus: featureStatusSchema,
3146
+ FetchAdResponse: fetchAdResponseSchema,
3147
+ FetchAdsResponse: fetchAdsResponseSchema,
2921
3148
  FetchAreaBookingsResponse: fetchAreaBookingsResponseSchema,
2922
3149
  FetchAreaResponse: fetchAreaResponseSchema,
2923
3150
  FetchAreasResponse: fetchAreasResponseSchema,
2924
3151
  FetchArticleResponse: fetchArticleResponseSchema,
2925
3152
  FetchArticlesResponse: fetchArticlesResponseSchema,
3153
+ FetchAssetsByTagResponse: fetchAssetsByTagResponseSchema,
2926
3154
  FetchBasketResponse: fetchBasketResponseSchema,
2927
3155
  FetchEventResponse: fetchEventResponseSchema,
2928
3156
  FetchEventsResponse: fetchEventsResponseSchema,
@@ -2968,6 +3196,7 @@ const schemas = {
2968
3196
  RemoveFromBasketResponse: removeFromBasketResponseSchema,
2969
3197
  ReservationPromotionStatus: reservationPromotionStatusSchema,
2970
3198
  ReservationStatus: reservationStatusSchema,
3199
+ RitualType: ritualTypeSchema,
2971
3200
  ScanTokenEntityType: scanTokenEntityTypeSchema,
2972
3201
  SetArticleFeatureImageUploadBody: setArticleFeatureImageUploadBodySchema,
2973
3202
  SetBasketDeclaredReturnsRequest: setBasketDeclaredReturnsRequestSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "order3000",
3
- "version": "1.1.0",
3
+ "version": "1.2.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.8.12",
50
+ "@kolaveri/eslint-config": "1.10.1",
51
51
  "@kolaveri/prettier-config": "1.0.6",
52
52
  "@kolaveri/tsconfig": "1.0.1"
53
53
  },