@moonbase.sh/api 0.4.14 → 0.4.16

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 CHANGED
@@ -63,7 +63,7 @@ var addressSchema = import_zod.z.object({
63
63
  streetAddress2: import_zod.z.string().nullable(),
64
64
  locality: import_zod.z.string().nullable(),
65
65
  region: import_zod.z.string().nullable(),
66
- postCode: import_zod.z.string()
66
+ postCode: import_zod.z.string().nullable()
67
67
  });
68
68
  var communicationPreferencesSchema = import_zod.z.object({
69
69
  newsletterOptIn: import_zod.z.boolean()
@@ -148,14 +148,24 @@ var importLicenseRequestSchema = import_zod2.z.object({
148
148
  lastValidation: import_zod2.z.date().optional()
149
149
  }).array().optional()
150
150
  });
151
- var provisionLicensesRequestSchema = import_zod2.z.object({
152
- ownerId: import_zod2.z.string(),
153
- requests: import_zod2.z.object({
154
- productId: import_zod2.z.string(),
155
- quantity: import_zod2.z.number().optional(),
156
- limitPerCustomer: import_zod2.z.number().optional()
157
- }).array()
158
- });
151
+ var provisionLicensesRequestRequestSchema = import_zod2.z.object({
152
+ productId: import_zod2.z.string(),
153
+ quantity: import_zod2.z.number().optional(),
154
+ limitPerCustomer: import_zod2.z.number().optional()
155
+ }).array();
156
+ var provisionLicensesRequestSchema = import_zod2.z.union([
157
+ import_zod2.z.object({
158
+ ownerId: import_zod2.z.string(),
159
+ requests: provisionLicensesRequestRequestSchema
160
+ }),
161
+ import_zod2.z.object({
162
+ customer: import_zod2.z.object({
163
+ name: import_zod2.z.string(),
164
+ email: import_zod2.z.string()
165
+ }),
166
+ requests: provisionLicensesRequestRequestSchema
167
+ })
168
+ ]);
159
169
 
160
170
  // src/products/schemas.ts
161
171
  var import_zod3 = require("zod");
package/dist/index.d.cts CHANGED
@@ -105,21 +105,21 @@ declare const activationRequestSchema: z.ZodObject<{
105
105
  streetAddress2: z.ZodNullable<z.ZodString>;
106
106
  locality: z.ZodNullable<z.ZodString>;
107
107
  region: z.ZodNullable<z.ZodString>;
108
- postCode: z.ZodString;
108
+ postCode: z.ZodNullable<z.ZodString>;
109
109
  }, "strip", z.ZodTypeAny, {
110
110
  countryCode: string;
111
111
  streetAddress1: string;
112
112
  streetAddress2: string | null;
113
113
  locality: string | null;
114
114
  region: string | null;
115
- postCode: string;
115
+ postCode: string | null;
116
116
  }, {
117
117
  countryCode: string;
118
118
  streetAddress1: string;
119
119
  streetAddress2: string | null;
120
120
  locality: string | null;
121
121
  region: string | null;
122
- postCode: string;
122
+ postCode: string | null;
123
123
  }>>;
124
124
  communicationPreferences: z.ZodObject<{
125
125
  newsletterOptIn: z.ZodBoolean;
@@ -147,7 +147,7 @@ declare const activationRequestSchema: z.ZodObject<{
147
147
  streetAddress2: string | null;
148
148
  locality: string | null;
149
149
  region: string | null;
150
- postCode: string;
150
+ postCode: string | null;
151
151
  } | null;
152
152
  communicationPreferences: {
153
153
  newsletterOptIn: boolean;
@@ -172,7 +172,7 @@ declare const activationRequestSchema: z.ZodObject<{
172
172
  streetAddress2: string | null;
173
173
  locality: string | null;
174
174
  region: string | null;
175
- postCode: string;
175
+ postCode: string | null;
176
176
  } | null;
177
177
  communicationPreferences: {
178
178
  newsletterOptIn: boolean;
@@ -215,7 +215,7 @@ declare const activationRequestSchema: z.ZodObject<{
215
215
  streetAddress2: string | null;
216
216
  locality: string | null;
217
217
  region: string | null;
218
- postCode: string;
218
+ postCode: string | null;
219
219
  } | null;
220
220
  communicationPreferences: {
221
221
  newsletterOptIn: boolean;
@@ -258,7 +258,7 @@ declare const activationRequestSchema: z.ZodObject<{
258
258
  streetAddress2: string | null;
259
259
  locality: string | null;
260
260
  region: string | null;
261
- postCode: string;
261
+ postCode: string | null;
262
262
  } | null;
263
263
  communicationPreferences: {
264
264
  newsletterOptIn: boolean;
@@ -295,21 +295,21 @@ declare const activationRequestSchema: z.ZodObject<{
295
295
  streetAddress2: z.ZodNullable<z.ZodString>;
296
296
  locality: z.ZodNullable<z.ZodString>;
297
297
  region: z.ZodNullable<z.ZodString>;
298
- postCode: z.ZodString;
298
+ postCode: z.ZodNullable<z.ZodString>;
299
299
  }, "strip", z.ZodTypeAny, {
300
300
  countryCode: string;
301
301
  streetAddress1: string;
302
302
  streetAddress2: string | null;
303
303
  locality: string | null;
304
304
  region: string | null;
305
- postCode: string;
305
+ postCode: string | null;
306
306
  }, {
307
307
  countryCode: string;
308
308
  streetAddress1: string;
309
309
  streetAddress2: string | null;
310
310
  locality: string | null;
311
311
  region: string | null;
312
- postCode: string;
312
+ postCode: string | null;
313
313
  }>>;
314
314
  communicationPreferences: z.ZodObject<{
315
315
  newsletterOptIn: z.ZodBoolean;
@@ -337,7 +337,7 @@ declare const activationRequestSchema: z.ZodObject<{
337
337
  streetAddress2: string | null;
338
338
  locality: string | null;
339
339
  region: string | null;
340
- postCode: string;
340
+ postCode: string | null;
341
341
  } | null;
342
342
  communicationPreferences: {
343
343
  newsletterOptIn: boolean;
@@ -362,7 +362,7 @@ declare const activationRequestSchema: z.ZodObject<{
362
362
  streetAddress2: string | null;
363
363
  locality: string | null;
364
364
  region: string | null;
365
- postCode: string;
365
+ postCode: string | null;
366
366
  } | null;
367
367
  communicationPreferences: {
368
368
  newsletterOptIn: boolean;
@@ -397,7 +397,7 @@ declare const activationRequestSchema: z.ZodObject<{
397
397
  streetAddress2: string | null;
398
398
  locality: string | null;
399
399
  region: string | null;
400
- postCode: string;
400
+ postCode: string | null;
401
401
  } | null;
402
402
  communicationPreferences: {
403
403
  newsletterOptIn: boolean;
@@ -432,7 +432,7 @@ declare const activationRequestSchema: z.ZodObject<{
432
432
  streetAddress2: string | null;
433
433
  locality: string | null;
434
434
  region: string | null;
435
- postCode: string;
435
+ postCode: string | null;
436
436
  } | null;
437
437
  communicationPreferences: {
438
438
  newsletterOptIn: boolean;
@@ -492,7 +492,7 @@ declare const activationRequestSchema: z.ZodObject<{
492
492
  streetAddress2: string | null;
493
493
  locality: string | null;
494
494
  region: string | null;
495
- postCode: string;
495
+ postCode: string | null;
496
496
  } | null;
497
497
  communicationPreferences: {
498
498
  newsletterOptIn: boolean;
@@ -528,7 +528,7 @@ declare const activationRequestSchema: z.ZodObject<{
528
528
  streetAddress2: string | null;
529
529
  locality: string | null;
530
530
  region: string | null;
531
- postCode: string;
531
+ postCode: string | null;
532
532
  } | null;
533
533
  communicationPreferences: {
534
534
  newsletterOptIn: boolean;
@@ -588,7 +588,7 @@ declare const activationRequestSchema: z.ZodObject<{
588
588
  streetAddress2: string | null;
589
589
  locality: string | null;
590
590
  region: string | null;
591
- postCode: string;
591
+ postCode: string | null;
592
592
  } | null;
593
593
  communicationPreferences: {
594
594
  newsletterOptIn: boolean;
@@ -624,7 +624,7 @@ declare const activationRequestSchema: z.ZodObject<{
624
624
  streetAddress2: string | null;
625
625
  locality: string | null;
626
626
  region: string | null;
627
- postCode: string;
627
+ postCode: string | null;
628
628
  } | null;
629
629
  communicationPreferences: {
630
630
  newsletterOptIn: boolean;
@@ -697,21 +697,21 @@ declare const customerSchema: z.ZodObject<{
697
697
  streetAddress2: z.ZodNullable<z.ZodString>;
698
698
  locality: z.ZodNullable<z.ZodString>;
699
699
  region: z.ZodNullable<z.ZodString>;
700
- postCode: z.ZodString;
700
+ postCode: z.ZodNullable<z.ZodString>;
701
701
  }, "strip", z.ZodTypeAny, {
702
702
  countryCode: string;
703
703
  streetAddress1: string;
704
704
  streetAddress2: string | null;
705
705
  locality: string | null;
706
706
  region: string | null;
707
- postCode: string;
707
+ postCode: string | null;
708
708
  }, {
709
709
  countryCode: string;
710
710
  streetAddress1: string;
711
711
  streetAddress2: string | null;
712
712
  locality: string | null;
713
713
  region: string | null;
714
- postCode: string;
714
+ postCode: string | null;
715
715
  }>>;
716
716
  communicationPreferences: z.ZodObject<{
717
717
  newsletterOptIn: z.ZodBoolean;
@@ -739,7 +739,7 @@ declare const customerSchema: z.ZodObject<{
739
739
  streetAddress2: string | null;
740
740
  locality: string | null;
741
741
  region: string | null;
742
- postCode: string;
742
+ postCode: string | null;
743
743
  } | null;
744
744
  communicationPreferences: {
745
745
  newsletterOptIn: boolean;
@@ -764,7 +764,7 @@ declare const customerSchema: z.ZodObject<{
764
764
  streetAddress2: string | null;
765
765
  locality: string | null;
766
766
  region: string | null;
767
- postCode: string;
767
+ postCode: string | null;
768
768
  } | null;
769
769
  communicationPreferences: {
770
770
  newsletterOptIn: boolean;
@@ -782,21 +782,21 @@ declare const importCustomerRequestSchema: z.ZodObject<{
782
782
  streetAddress2: z.ZodNullable<z.ZodString>;
783
783
  locality: z.ZodNullable<z.ZodString>;
784
784
  region: z.ZodNullable<z.ZodString>;
785
- postCode: z.ZodString;
785
+ postCode: z.ZodNullable<z.ZodString>;
786
786
  }, "strip", z.ZodTypeAny, {
787
787
  countryCode: string;
788
788
  streetAddress1: string;
789
789
  streetAddress2: string | null;
790
790
  locality: string | null;
791
791
  region: string | null;
792
- postCode: string;
792
+ postCode: string | null;
793
793
  }, {
794
794
  countryCode: string;
795
795
  streetAddress1: string;
796
796
  streetAddress2: string | null;
797
797
  locality: string | null;
798
798
  region: string | null;
799
- postCode: string;
799
+ postCode: string | null;
800
800
  }>>;
801
801
  createdAt: z.ZodOptional<z.ZodDate>;
802
802
  }, "strip", z.ZodTypeAny, {
@@ -809,7 +809,7 @@ declare const importCustomerRequestSchema: z.ZodObject<{
809
809
  streetAddress2: string | null;
810
810
  locality: string | null;
811
811
  region: string | null;
812
- postCode: string;
812
+ postCode: string | null;
813
813
  } | undefined;
814
814
  password?: string | undefined;
815
815
  createdAt?: Date | undefined;
@@ -823,7 +823,7 @@ declare const importCustomerRequestSchema: z.ZodObject<{
823
823
  streetAddress2: string | null;
824
824
  locality: string | null;
825
825
  region: string | null;
826
- postCode: string;
826
+ postCode: string | null;
827
827
  } | undefined;
828
828
  password?: string | undefined;
829
829
  createdAt?: Date | undefined;
@@ -928,21 +928,21 @@ declare const licenseActivationSchema: z.ZodObject<{
928
928
  streetAddress2: z.ZodNullable<z.ZodString>;
929
929
  locality: z.ZodNullable<z.ZodString>;
930
930
  region: z.ZodNullable<z.ZodString>;
931
- postCode: z.ZodString;
931
+ postCode: z.ZodNullable<z.ZodString>;
932
932
  }, "strip", z.ZodTypeAny, {
933
933
  countryCode: string;
934
934
  streetAddress1: string;
935
935
  streetAddress2: string | null;
936
936
  locality: string | null;
937
937
  region: string | null;
938
- postCode: string;
938
+ postCode: string | null;
939
939
  }, {
940
940
  countryCode: string;
941
941
  streetAddress1: string;
942
942
  streetAddress2: string | null;
943
943
  locality: string | null;
944
944
  region: string | null;
945
- postCode: string;
945
+ postCode: string | null;
946
946
  }>>;
947
947
  communicationPreferences: z.ZodObject<{
948
948
  newsletterOptIn: z.ZodBoolean;
@@ -970,7 +970,7 @@ declare const licenseActivationSchema: z.ZodObject<{
970
970
  streetAddress2: string | null;
971
971
  locality: string | null;
972
972
  region: string | null;
973
- postCode: string;
973
+ postCode: string | null;
974
974
  } | null;
975
975
  communicationPreferences: {
976
976
  newsletterOptIn: boolean;
@@ -995,7 +995,7 @@ declare const licenseActivationSchema: z.ZodObject<{
995
995
  streetAddress2: string | null;
996
996
  locality: string | null;
997
997
  region: string | null;
998
- postCode: string;
998
+ postCode: string | null;
999
999
  } | null;
1000
1000
  communicationPreferences: {
1001
1001
  newsletterOptIn: boolean;
@@ -1038,7 +1038,7 @@ declare const licenseActivationSchema: z.ZodObject<{
1038
1038
  streetAddress2: string | null;
1039
1039
  locality: string | null;
1040
1040
  region: string | null;
1041
- postCode: string;
1041
+ postCode: string | null;
1042
1042
  } | null;
1043
1043
  communicationPreferences: {
1044
1044
  newsletterOptIn: boolean;
@@ -1081,7 +1081,7 @@ declare const licenseActivationSchema: z.ZodObject<{
1081
1081
  streetAddress2: string | null;
1082
1082
  locality: string | null;
1083
1083
  region: string | null;
1084
- postCode: string;
1084
+ postCode: string | null;
1085
1085
  } | null;
1086
1086
  communicationPreferences: {
1087
1087
  newsletterOptIn: boolean;
@@ -1139,7 +1139,7 @@ declare const importLicenseRequestSchema: z.ZodObject<{
1139
1139
  lastValidation?: Date | undefined;
1140
1140
  }[] | undefined;
1141
1141
  }>;
1142
- declare const provisionLicensesRequestSchema: z.ZodObject<{
1142
+ declare const provisionLicensesRequestSchema: z.ZodUnion<[z.ZodObject<{
1143
1143
  ownerId: z.ZodString;
1144
1144
  requests: z.ZodArray<z.ZodObject<{
1145
1145
  productId: z.ZodString;
@@ -1168,7 +1168,51 @@ declare const provisionLicensesRequestSchema: z.ZodObject<{
1168
1168
  quantity?: number | undefined;
1169
1169
  limitPerCustomer?: number | undefined;
1170
1170
  }[];
1171
- }>;
1171
+ }>, z.ZodObject<{
1172
+ customer: z.ZodObject<{
1173
+ name: z.ZodString;
1174
+ email: z.ZodString;
1175
+ }, "strip", z.ZodTypeAny, {
1176
+ name: string;
1177
+ email: string;
1178
+ }, {
1179
+ name: string;
1180
+ email: string;
1181
+ }>;
1182
+ requests: z.ZodArray<z.ZodObject<{
1183
+ productId: z.ZodString;
1184
+ quantity: z.ZodOptional<z.ZodNumber>;
1185
+ limitPerCustomer: z.ZodOptional<z.ZodNumber>;
1186
+ }, "strip", z.ZodTypeAny, {
1187
+ productId: string;
1188
+ quantity?: number | undefined;
1189
+ limitPerCustomer?: number | undefined;
1190
+ }, {
1191
+ productId: string;
1192
+ quantity?: number | undefined;
1193
+ limitPerCustomer?: number | undefined;
1194
+ }>, "many">;
1195
+ }, "strip", z.ZodTypeAny, {
1196
+ customer: {
1197
+ name: string;
1198
+ email: string;
1199
+ };
1200
+ requests: {
1201
+ productId: string;
1202
+ quantity?: number | undefined;
1203
+ limitPerCustomer?: number | undefined;
1204
+ }[];
1205
+ }, {
1206
+ customer: {
1207
+ name: string;
1208
+ email: string;
1209
+ };
1210
+ requests: {
1211
+ productId: string;
1212
+ quantity?: number | undefined;
1213
+ limitPerCustomer?: number | undefined;
1214
+ }[];
1215
+ }>]>;
1172
1216
 
1173
1217
  declare enum LicenseStatus {
1174
1218
  Active = "Active",
@@ -1486,21 +1530,21 @@ declare const orderSchema: z.ZodObject<{
1486
1530
  streetAddress2: z.ZodNullable<z.ZodString>;
1487
1531
  locality: z.ZodNullable<z.ZodString>;
1488
1532
  region: z.ZodNullable<z.ZodString>;
1489
- postCode: z.ZodString;
1533
+ postCode: z.ZodNullable<z.ZodString>;
1490
1534
  }, "strip", z.ZodTypeAny, {
1491
1535
  countryCode: string;
1492
1536
  streetAddress1: string;
1493
1537
  streetAddress2: string | null;
1494
1538
  locality: string | null;
1495
1539
  region: string | null;
1496
- postCode: string;
1540
+ postCode: string | null;
1497
1541
  }, {
1498
1542
  countryCode: string;
1499
1543
  streetAddress1: string;
1500
1544
  streetAddress2: string | null;
1501
1545
  locality: string | null;
1502
1546
  region: string | null;
1503
- postCode: string;
1547
+ postCode: string | null;
1504
1548
  }>>;
1505
1549
  }, "strip", z.ZodTypeAny, {
1506
1550
  name: string | null;
@@ -1513,7 +1557,7 @@ declare const orderSchema: z.ZodObject<{
1513
1557
  streetAddress2: string | null;
1514
1558
  locality: string | null;
1515
1559
  region: string | null;
1516
- postCode: string;
1560
+ postCode: string | null;
1517
1561
  } | null;
1518
1562
  }, {
1519
1563
  name: string | null;
@@ -1526,7 +1570,7 @@ declare const orderSchema: z.ZodObject<{
1526
1570
  streetAddress2: string | null;
1527
1571
  locality: string | null;
1528
1572
  region: string | null;
1529
- postCode: string;
1573
+ postCode: string | null;
1530
1574
  } | null;
1531
1575
  }>>;
1532
1576
  couponsApplied: z.ZodArray<z.ZodObject<{
@@ -2914,7 +2958,7 @@ declare const orderSchema: z.ZodObject<{
2914
2958
  streetAddress2: string | null;
2915
2959
  locality: string | null;
2916
2960
  region: string | null;
2917
- postCode: string;
2961
+ postCode: string | null;
2918
2962
  } | null;
2919
2963
  } | undefined;
2920
2964
  total?: {
@@ -3215,7 +3259,7 @@ declare const orderSchema: z.ZodObject<{
3215
3259
  streetAddress2: string | null;
3216
3260
  locality: string | null;
3217
3261
  region: string | null;
3218
- postCode: string;
3262
+ postCode: string | null;
3219
3263
  } | null;
3220
3264
  } | undefined;
3221
3265
  total?: {
@@ -3465,21 +3509,21 @@ declare const trialSchema: z.ZodObject<{
3465
3509
  streetAddress2: z.ZodNullable<z.ZodString>;
3466
3510
  locality: z.ZodNullable<z.ZodString>;
3467
3511
  region: z.ZodNullable<z.ZodString>;
3468
- postCode: z.ZodString;
3512
+ postCode: z.ZodNullable<z.ZodString>;
3469
3513
  }, "strip", z.ZodTypeAny, {
3470
3514
  countryCode: string;
3471
3515
  streetAddress1: string;
3472
3516
  streetAddress2: string | null;
3473
3517
  locality: string | null;
3474
3518
  region: string | null;
3475
- postCode: string;
3519
+ postCode: string | null;
3476
3520
  }, {
3477
3521
  countryCode: string;
3478
3522
  streetAddress1: string;
3479
3523
  streetAddress2: string | null;
3480
3524
  locality: string | null;
3481
3525
  region: string | null;
3482
- postCode: string;
3526
+ postCode: string | null;
3483
3527
  }>>;
3484
3528
  communicationPreferences: z.ZodObject<{
3485
3529
  newsletterOptIn: z.ZodBoolean;
@@ -3507,7 +3551,7 @@ declare const trialSchema: z.ZodObject<{
3507
3551
  streetAddress2: string | null;
3508
3552
  locality: string | null;
3509
3553
  region: string | null;
3510
- postCode: string;
3554
+ postCode: string | null;
3511
3555
  } | null;
3512
3556
  communicationPreferences: {
3513
3557
  newsletterOptIn: boolean;
@@ -3532,7 +3576,7 @@ declare const trialSchema: z.ZodObject<{
3532
3576
  streetAddress2: string | null;
3533
3577
  locality: string | null;
3534
3578
  region: string | null;
3535
- postCode: string;
3579
+ postCode: string | null;
3536
3580
  } | null;
3537
3581
  communicationPreferences: {
3538
3582
  newsletterOptIn: boolean;
@@ -3567,7 +3611,7 @@ declare const trialSchema: z.ZodObject<{
3567
3611
  streetAddress2: string | null;
3568
3612
  locality: string | null;
3569
3613
  region: string | null;
3570
- postCode: string;
3614
+ postCode: string | null;
3571
3615
  } | null;
3572
3616
  communicationPreferences: {
3573
3617
  newsletterOptIn: boolean;
@@ -3602,7 +3646,7 @@ declare const trialSchema: z.ZodObject<{
3602
3646
  streetAddress2: string | null;
3603
3647
  locality: string | null;
3604
3648
  region: string | null;
3605
- postCode: string;
3649
+ postCode: string | null;
3606
3650
  } | null;
3607
3651
  communicationPreferences: {
3608
3652
  newsletterOptIn: boolean;
package/dist/index.d.ts CHANGED
@@ -105,21 +105,21 @@ declare const activationRequestSchema: z.ZodObject<{
105
105
  streetAddress2: z.ZodNullable<z.ZodString>;
106
106
  locality: z.ZodNullable<z.ZodString>;
107
107
  region: z.ZodNullable<z.ZodString>;
108
- postCode: z.ZodString;
108
+ postCode: z.ZodNullable<z.ZodString>;
109
109
  }, "strip", z.ZodTypeAny, {
110
110
  countryCode: string;
111
111
  streetAddress1: string;
112
112
  streetAddress2: string | null;
113
113
  locality: string | null;
114
114
  region: string | null;
115
- postCode: string;
115
+ postCode: string | null;
116
116
  }, {
117
117
  countryCode: string;
118
118
  streetAddress1: string;
119
119
  streetAddress2: string | null;
120
120
  locality: string | null;
121
121
  region: string | null;
122
- postCode: string;
122
+ postCode: string | null;
123
123
  }>>;
124
124
  communicationPreferences: z.ZodObject<{
125
125
  newsletterOptIn: z.ZodBoolean;
@@ -147,7 +147,7 @@ declare const activationRequestSchema: z.ZodObject<{
147
147
  streetAddress2: string | null;
148
148
  locality: string | null;
149
149
  region: string | null;
150
- postCode: string;
150
+ postCode: string | null;
151
151
  } | null;
152
152
  communicationPreferences: {
153
153
  newsletterOptIn: boolean;
@@ -172,7 +172,7 @@ declare const activationRequestSchema: z.ZodObject<{
172
172
  streetAddress2: string | null;
173
173
  locality: string | null;
174
174
  region: string | null;
175
- postCode: string;
175
+ postCode: string | null;
176
176
  } | null;
177
177
  communicationPreferences: {
178
178
  newsletterOptIn: boolean;
@@ -215,7 +215,7 @@ declare const activationRequestSchema: z.ZodObject<{
215
215
  streetAddress2: string | null;
216
216
  locality: string | null;
217
217
  region: string | null;
218
- postCode: string;
218
+ postCode: string | null;
219
219
  } | null;
220
220
  communicationPreferences: {
221
221
  newsletterOptIn: boolean;
@@ -258,7 +258,7 @@ declare const activationRequestSchema: z.ZodObject<{
258
258
  streetAddress2: string | null;
259
259
  locality: string | null;
260
260
  region: string | null;
261
- postCode: string;
261
+ postCode: string | null;
262
262
  } | null;
263
263
  communicationPreferences: {
264
264
  newsletterOptIn: boolean;
@@ -295,21 +295,21 @@ declare const activationRequestSchema: z.ZodObject<{
295
295
  streetAddress2: z.ZodNullable<z.ZodString>;
296
296
  locality: z.ZodNullable<z.ZodString>;
297
297
  region: z.ZodNullable<z.ZodString>;
298
- postCode: z.ZodString;
298
+ postCode: z.ZodNullable<z.ZodString>;
299
299
  }, "strip", z.ZodTypeAny, {
300
300
  countryCode: string;
301
301
  streetAddress1: string;
302
302
  streetAddress2: string | null;
303
303
  locality: string | null;
304
304
  region: string | null;
305
- postCode: string;
305
+ postCode: string | null;
306
306
  }, {
307
307
  countryCode: string;
308
308
  streetAddress1: string;
309
309
  streetAddress2: string | null;
310
310
  locality: string | null;
311
311
  region: string | null;
312
- postCode: string;
312
+ postCode: string | null;
313
313
  }>>;
314
314
  communicationPreferences: z.ZodObject<{
315
315
  newsletterOptIn: z.ZodBoolean;
@@ -337,7 +337,7 @@ declare const activationRequestSchema: z.ZodObject<{
337
337
  streetAddress2: string | null;
338
338
  locality: string | null;
339
339
  region: string | null;
340
- postCode: string;
340
+ postCode: string | null;
341
341
  } | null;
342
342
  communicationPreferences: {
343
343
  newsletterOptIn: boolean;
@@ -362,7 +362,7 @@ declare const activationRequestSchema: z.ZodObject<{
362
362
  streetAddress2: string | null;
363
363
  locality: string | null;
364
364
  region: string | null;
365
- postCode: string;
365
+ postCode: string | null;
366
366
  } | null;
367
367
  communicationPreferences: {
368
368
  newsletterOptIn: boolean;
@@ -397,7 +397,7 @@ declare const activationRequestSchema: z.ZodObject<{
397
397
  streetAddress2: string | null;
398
398
  locality: string | null;
399
399
  region: string | null;
400
- postCode: string;
400
+ postCode: string | null;
401
401
  } | null;
402
402
  communicationPreferences: {
403
403
  newsletterOptIn: boolean;
@@ -432,7 +432,7 @@ declare const activationRequestSchema: z.ZodObject<{
432
432
  streetAddress2: string | null;
433
433
  locality: string | null;
434
434
  region: string | null;
435
- postCode: string;
435
+ postCode: string | null;
436
436
  } | null;
437
437
  communicationPreferences: {
438
438
  newsletterOptIn: boolean;
@@ -492,7 +492,7 @@ declare const activationRequestSchema: z.ZodObject<{
492
492
  streetAddress2: string | null;
493
493
  locality: string | null;
494
494
  region: string | null;
495
- postCode: string;
495
+ postCode: string | null;
496
496
  } | null;
497
497
  communicationPreferences: {
498
498
  newsletterOptIn: boolean;
@@ -528,7 +528,7 @@ declare const activationRequestSchema: z.ZodObject<{
528
528
  streetAddress2: string | null;
529
529
  locality: string | null;
530
530
  region: string | null;
531
- postCode: string;
531
+ postCode: string | null;
532
532
  } | null;
533
533
  communicationPreferences: {
534
534
  newsletterOptIn: boolean;
@@ -588,7 +588,7 @@ declare const activationRequestSchema: z.ZodObject<{
588
588
  streetAddress2: string | null;
589
589
  locality: string | null;
590
590
  region: string | null;
591
- postCode: string;
591
+ postCode: string | null;
592
592
  } | null;
593
593
  communicationPreferences: {
594
594
  newsletterOptIn: boolean;
@@ -624,7 +624,7 @@ declare const activationRequestSchema: z.ZodObject<{
624
624
  streetAddress2: string | null;
625
625
  locality: string | null;
626
626
  region: string | null;
627
- postCode: string;
627
+ postCode: string | null;
628
628
  } | null;
629
629
  communicationPreferences: {
630
630
  newsletterOptIn: boolean;
@@ -697,21 +697,21 @@ declare const customerSchema: z.ZodObject<{
697
697
  streetAddress2: z.ZodNullable<z.ZodString>;
698
698
  locality: z.ZodNullable<z.ZodString>;
699
699
  region: z.ZodNullable<z.ZodString>;
700
- postCode: z.ZodString;
700
+ postCode: z.ZodNullable<z.ZodString>;
701
701
  }, "strip", z.ZodTypeAny, {
702
702
  countryCode: string;
703
703
  streetAddress1: string;
704
704
  streetAddress2: string | null;
705
705
  locality: string | null;
706
706
  region: string | null;
707
- postCode: string;
707
+ postCode: string | null;
708
708
  }, {
709
709
  countryCode: string;
710
710
  streetAddress1: string;
711
711
  streetAddress2: string | null;
712
712
  locality: string | null;
713
713
  region: string | null;
714
- postCode: string;
714
+ postCode: string | null;
715
715
  }>>;
716
716
  communicationPreferences: z.ZodObject<{
717
717
  newsletterOptIn: z.ZodBoolean;
@@ -739,7 +739,7 @@ declare const customerSchema: z.ZodObject<{
739
739
  streetAddress2: string | null;
740
740
  locality: string | null;
741
741
  region: string | null;
742
- postCode: string;
742
+ postCode: string | null;
743
743
  } | null;
744
744
  communicationPreferences: {
745
745
  newsletterOptIn: boolean;
@@ -764,7 +764,7 @@ declare const customerSchema: z.ZodObject<{
764
764
  streetAddress2: string | null;
765
765
  locality: string | null;
766
766
  region: string | null;
767
- postCode: string;
767
+ postCode: string | null;
768
768
  } | null;
769
769
  communicationPreferences: {
770
770
  newsletterOptIn: boolean;
@@ -782,21 +782,21 @@ declare const importCustomerRequestSchema: z.ZodObject<{
782
782
  streetAddress2: z.ZodNullable<z.ZodString>;
783
783
  locality: z.ZodNullable<z.ZodString>;
784
784
  region: z.ZodNullable<z.ZodString>;
785
- postCode: z.ZodString;
785
+ postCode: z.ZodNullable<z.ZodString>;
786
786
  }, "strip", z.ZodTypeAny, {
787
787
  countryCode: string;
788
788
  streetAddress1: string;
789
789
  streetAddress2: string | null;
790
790
  locality: string | null;
791
791
  region: string | null;
792
- postCode: string;
792
+ postCode: string | null;
793
793
  }, {
794
794
  countryCode: string;
795
795
  streetAddress1: string;
796
796
  streetAddress2: string | null;
797
797
  locality: string | null;
798
798
  region: string | null;
799
- postCode: string;
799
+ postCode: string | null;
800
800
  }>>;
801
801
  createdAt: z.ZodOptional<z.ZodDate>;
802
802
  }, "strip", z.ZodTypeAny, {
@@ -809,7 +809,7 @@ declare const importCustomerRequestSchema: z.ZodObject<{
809
809
  streetAddress2: string | null;
810
810
  locality: string | null;
811
811
  region: string | null;
812
- postCode: string;
812
+ postCode: string | null;
813
813
  } | undefined;
814
814
  password?: string | undefined;
815
815
  createdAt?: Date | undefined;
@@ -823,7 +823,7 @@ declare const importCustomerRequestSchema: z.ZodObject<{
823
823
  streetAddress2: string | null;
824
824
  locality: string | null;
825
825
  region: string | null;
826
- postCode: string;
826
+ postCode: string | null;
827
827
  } | undefined;
828
828
  password?: string | undefined;
829
829
  createdAt?: Date | undefined;
@@ -928,21 +928,21 @@ declare const licenseActivationSchema: z.ZodObject<{
928
928
  streetAddress2: z.ZodNullable<z.ZodString>;
929
929
  locality: z.ZodNullable<z.ZodString>;
930
930
  region: z.ZodNullable<z.ZodString>;
931
- postCode: z.ZodString;
931
+ postCode: z.ZodNullable<z.ZodString>;
932
932
  }, "strip", z.ZodTypeAny, {
933
933
  countryCode: string;
934
934
  streetAddress1: string;
935
935
  streetAddress2: string | null;
936
936
  locality: string | null;
937
937
  region: string | null;
938
- postCode: string;
938
+ postCode: string | null;
939
939
  }, {
940
940
  countryCode: string;
941
941
  streetAddress1: string;
942
942
  streetAddress2: string | null;
943
943
  locality: string | null;
944
944
  region: string | null;
945
- postCode: string;
945
+ postCode: string | null;
946
946
  }>>;
947
947
  communicationPreferences: z.ZodObject<{
948
948
  newsletterOptIn: z.ZodBoolean;
@@ -970,7 +970,7 @@ declare const licenseActivationSchema: z.ZodObject<{
970
970
  streetAddress2: string | null;
971
971
  locality: string | null;
972
972
  region: string | null;
973
- postCode: string;
973
+ postCode: string | null;
974
974
  } | null;
975
975
  communicationPreferences: {
976
976
  newsletterOptIn: boolean;
@@ -995,7 +995,7 @@ declare const licenseActivationSchema: z.ZodObject<{
995
995
  streetAddress2: string | null;
996
996
  locality: string | null;
997
997
  region: string | null;
998
- postCode: string;
998
+ postCode: string | null;
999
999
  } | null;
1000
1000
  communicationPreferences: {
1001
1001
  newsletterOptIn: boolean;
@@ -1038,7 +1038,7 @@ declare const licenseActivationSchema: z.ZodObject<{
1038
1038
  streetAddress2: string | null;
1039
1039
  locality: string | null;
1040
1040
  region: string | null;
1041
- postCode: string;
1041
+ postCode: string | null;
1042
1042
  } | null;
1043
1043
  communicationPreferences: {
1044
1044
  newsletterOptIn: boolean;
@@ -1081,7 +1081,7 @@ declare const licenseActivationSchema: z.ZodObject<{
1081
1081
  streetAddress2: string | null;
1082
1082
  locality: string | null;
1083
1083
  region: string | null;
1084
- postCode: string;
1084
+ postCode: string | null;
1085
1085
  } | null;
1086
1086
  communicationPreferences: {
1087
1087
  newsletterOptIn: boolean;
@@ -1139,7 +1139,7 @@ declare const importLicenseRequestSchema: z.ZodObject<{
1139
1139
  lastValidation?: Date | undefined;
1140
1140
  }[] | undefined;
1141
1141
  }>;
1142
- declare const provisionLicensesRequestSchema: z.ZodObject<{
1142
+ declare const provisionLicensesRequestSchema: z.ZodUnion<[z.ZodObject<{
1143
1143
  ownerId: z.ZodString;
1144
1144
  requests: z.ZodArray<z.ZodObject<{
1145
1145
  productId: z.ZodString;
@@ -1168,7 +1168,51 @@ declare const provisionLicensesRequestSchema: z.ZodObject<{
1168
1168
  quantity?: number | undefined;
1169
1169
  limitPerCustomer?: number | undefined;
1170
1170
  }[];
1171
- }>;
1171
+ }>, z.ZodObject<{
1172
+ customer: z.ZodObject<{
1173
+ name: z.ZodString;
1174
+ email: z.ZodString;
1175
+ }, "strip", z.ZodTypeAny, {
1176
+ name: string;
1177
+ email: string;
1178
+ }, {
1179
+ name: string;
1180
+ email: string;
1181
+ }>;
1182
+ requests: z.ZodArray<z.ZodObject<{
1183
+ productId: z.ZodString;
1184
+ quantity: z.ZodOptional<z.ZodNumber>;
1185
+ limitPerCustomer: z.ZodOptional<z.ZodNumber>;
1186
+ }, "strip", z.ZodTypeAny, {
1187
+ productId: string;
1188
+ quantity?: number | undefined;
1189
+ limitPerCustomer?: number | undefined;
1190
+ }, {
1191
+ productId: string;
1192
+ quantity?: number | undefined;
1193
+ limitPerCustomer?: number | undefined;
1194
+ }>, "many">;
1195
+ }, "strip", z.ZodTypeAny, {
1196
+ customer: {
1197
+ name: string;
1198
+ email: string;
1199
+ };
1200
+ requests: {
1201
+ productId: string;
1202
+ quantity?: number | undefined;
1203
+ limitPerCustomer?: number | undefined;
1204
+ }[];
1205
+ }, {
1206
+ customer: {
1207
+ name: string;
1208
+ email: string;
1209
+ };
1210
+ requests: {
1211
+ productId: string;
1212
+ quantity?: number | undefined;
1213
+ limitPerCustomer?: number | undefined;
1214
+ }[];
1215
+ }>]>;
1172
1216
 
1173
1217
  declare enum LicenseStatus {
1174
1218
  Active = "Active",
@@ -1486,21 +1530,21 @@ declare const orderSchema: z.ZodObject<{
1486
1530
  streetAddress2: z.ZodNullable<z.ZodString>;
1487
1531
  locality: z.ZodNullable<z.ZodString>;
1488
1532
  region: z.ZodNullable<z.ZodString>;
1489
- postCode: z.ZodString;
1533
+ postCode: z.ZodNullable<z.ZodString>;
1490
1534
  }, "strip", z.ZodTypeAny, {
1491
1535
  countryCode: string;
1492
1536
  streetAddress1: string;
1493
1537
  streetAddress2: string | null;
1494
1538
  locality: string | null;
1495
1539
  region: string | null;
1496
- postCode: string;
1540
+ postCode: string | null;
1497
1541
  }, {
1498
1542
  countryCode: string;
1499
1543
  streetAddress1: string;
1500
1544
  streetAddress2: string | null;
1501
1545
  locality: string | null;
1502
1546
  region: string | null;
1503
- postCode: string;
1547
+ postCode: string | null;
1504
1548
  }>>;
1505
1549
  }, "strip", z.ZodTypeAny, {
1506
1550
  name: string | null;
@@ -1513,7 +1557,7 @@ declare const orderSchema: z.ZodObject<{
1513
1557
  streetAddress2: string | null;
1514
1558
  locality: string | null;
1515
1559
  region: string | null;
1516
- postCode: string;
1560
+ postCode: string | null;
1517
1561
  } | null;
1518
1562
  }, {
1519
1563
  name: string | null;
@@ -1526,7 +1570,7 @@ declare const orderSchema: z.ZodObject<{
1526
1570
  streetAddress2: string | null;
1527
1571
  locality: string | null;
1528
1572
  region: string | null;
1529
- postCode: string;
1573
+ postCode: string | null;
1530
1574
  } | null;
1531
1575
  }>>;
1532
1576
  couponsApplied: z.ZodArray<z.ZodObject<{
@@ -2914,7 +2958,7 @@ declare const orderSchema: z.ZodObject<{
2914
2958
  streetAddress2: string | null;
2915
2959
  locality: string | null;
2916
2960
  region: string | null;
2917
- postCode: string;
2961
+ postCode: string | null;
2918
2962
  } | null;
2919
2963
  } | undefined;
2920
2964
  total?: {
@@ -3215,7 +3259,7 @@ declare const orderSchema: z.ZodObject<{
3215
3259
  streetAddress2: string | null;
3216
3260
  locality: string | null;
3217
3261
  region: string | null;
3218
- postCode: string;
3262
+ postCode: string | null;
3219
3263
  } | null;
3220
3264
  } | undefined;
3221
3265
  total?: {
@@ -3465,21 +3509,21 @@ declare const trialSchema: z.ZodObject<{
3465
3509
  streetAddress2: z.ZodNullable<z.ZodString>;
3466
3510
  locality: z.ZodNullable<z.ZodString>;
3467
3511
  region: z.ZodNullable<z.ZodString>;
3468
- postCode: z.ZodString;
3512
+ postCode: z.ZodNullable<z.ZodString>;
3469
3513
  }, "strip", z.ZodTypeAny, {
3470
3514
  countryCode: string;
3471
3515
  streetAddress1: string;
3472
3516
  streetAddress2: string | null;
3473
3517
  locality: string | null;
3474
3518
  region: string | null;
3475
- postCode: string;
3519
+ postCode: string | null;
3476
3520
  }, {
3477
3521
  countryCode: string;
3478
3522
  streetAddress1: string;
3479
3523
  streetAddress2: string | null;
3480
3524
  locality: string | null;
3481
3525
  region: string | null;
3482
- postCode: string;
3526
+ postCode: string | null;
3483
3527
  }>>;
3484
3528
  communicationPreferences: z.ZodObject<{
3485
3529
  newsletterOptIn: z.ZodBoolean;
@@ -3507,7 +3551,7 @@ declare const trialSchema: z.ZodObject<{
3507
3551
  streetAddress2: string | null;
3508
3552
  locality: string | null;
3509
3553
  region: string | null;
3510
- postCode: string;
3554
+ postCode: string | null;
3511
3555
  } | null;
3512
3556
  communicationPreferences: {
3513
3557
  newsletterOptIn: boolean;
@@ -3532,7 +3576,7 @@ declare const trialSchema: z.ZodObject<{
3532
3576
  streetAddress2: string | null;
3533
3577
  locality: string | null;
3534
3578
  region: string | null;
3535
- postCode: string;
3579
+ postCode: string | null;
3536
3580
  } | null;
3537
3581
  communicationPreferences: {
3538
3582
  newsletterOptIn: boolean;
@@ -3567,7 +3611,7 @@ declare const trialSchema: z.ZodObject<{
3567
3611
  streetAddress2: string | null;
3568
3612
  locality: string | null;
3569
3613
  region: string | null;
3570
- postCode: string;
3614
+ postCode: string | null;
3571
3615
  } | null;
3572
3616
  communicationPreferences: {
3573
3617
  newsletterOptIn: boolean;
@@ -3602,7 +3646,7 @@ declare const trialSchema: z.ZodObject<{
3602
3646
  streetAddress2: string | null;
3603
3647
  locality: string | null;
3604
3648
  region: string | null;
3605
- postCode: string;
3649
+ postCode: string | null;
3606
3650
  } | null;
3607
3651
  communicationPreferences: {
3608
3652
  newsletterOptIn: boolean;
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ var addressSchema = z.object({
12
12
  streetAddress2: z.string().nullable(),
13
13
  locality: z.string().nullable(),
14
14
  region: z.string().nullable(),
15
- postCode: z.string()
15
+ postCode: z.string().nullable()
16
16
  });
17
17
  var communicationPreferencesSchema = z.object({
18
18
  newsletterOptIn: z.boolean()
@@ -97,14 +97,24 @@ var importLicenseRequestSchema = z2.object({
97
97
  lastValidation: z2.date().optional()
98
98
  }).array().optional()
99
99
  });
100
- var provisionLicensesRequestSchema = z2.object({
101
- ownerId: z2.string(),
102
- requests: z2.object({
103
- productId: z2.string(),
104
- quantity: z2.number().optional(),
105
- limitPerCustomer: z2.number().optional()
106
- }).array()
107
- });
100
+ var provisionLicensesRequestRequestSchema = z2.object({
101
+ productId: z2.string(),
102
+ quantity: z2.number().optional(),
103
+ limitPerCustomer: z2.number().optional()
104
+ }).array();
105
+ var provisionLicensesRequestSchema = z2.union([
106
+ z2.object({
107
+ ownerId: z2.string(),
108
+ requests: provisionLicensesRequestRequestSchema
109
+ }),
110
+ z2.object({
111
+ customer: z2.object({
112
+ name: z2.string(),
113
+ email: z2.string()
114
+ }),
115
+ requests: provisionLicensesRequestRequestSchema
116
+ })
117
+ ]);
108
118
 
109
119
  // src/products/schemas.ts
110
120
  import { z as z3 } from "zod";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moonbase.sh/api",
3
3
  "type": "module",
4
- "version": "0.4.14",
4
+ "version": "0.4.16",
5
5
  "description": "Package to let you integrate backends with Moonbase.sh as payment and delivery provider",
6
6
  "author": "Tobias Lønnerød Madsen <m@dsen.tv>",
7
7
  "license": "MIT",