@bizmap/sdk 0.0.24 → 0.0.26

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/main.d.ts CHANGED
@@ -4,30 +4,30 @@ declare const PricingRate: z.ZodObject<{
4
4
  companyRegistration: z.ZodObject<{
5
5
  flatFee: z.ZodNumber;
6
6
  feePerUser: z.ZodNumber;
7
- lastModified: z.ZodNumber;
7
+ lastModified: z.ZodInt;
8
8
  }, z.core.$strip>;
9
9
  }, z.core.$strip>;
10
10
  type PricingRate = z.infer<typeof PricingRate>;
11
11
  declare const PriceAdjustment: z.ZodObject<{
12
- createdAt: z.ZodReadonly<z.ZodNumber>;
13
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
12
+ createdAt: z.ZodReadonly<z.ZodInt>;
13
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
14
14
  description: z.ZodOptional<z.ZodString>;
15
15
  fixedAmount: z.ZodNumber;
16
16
  percentage: z.ZodNumber;
17
17
  }, z.core.$strip>;
18
18
  type PriceAdjustment = z.infer<typeof PriceAdjustment>;
19
19
  declare const PriceTag: z.ZodObject<{
20
- createdAt: z.ZodReadonly<z.ZodNumber>;
21
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
22
- uid: z.ZodString;
20
+ createdAt: z.ZodReadonly<z.ZodInt>;
21
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
22
+ uid: z.ZodReadonly<z.ZodString>;
23
23
  item: z.ZodString;
24
24
  cost: z.ZodNumber;
25
25
  }, z.core.$strip>;
26
26
  type PriceTag = z.infer<typeof PriceTag>;
27
27
 
28
28
  declare const CompanyIdentity: z.ZodObject<{
29
- createdAt: z.ZodReadonly<z.ZodNumber>;
30
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
29
+ createdAt: z.ZodReadonly<z.ZodInt>;
30
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
31
31
  uid: z.ZodReadonly<z.ZodString>;
32
32
  displayName: z.ZodString;
33
33
  logo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -49,14 +49,15 @@ declare const CompanyIdentity: z.ZodObject<{
49
49
  }, z.core.$strip>;
50
50
  type CompanyIdentity = z.infer<typeof CompanyIdentity>;
51
51
  declare const CompanyOpState: z.ZodObject<{
52
- createdAt: z.ZodReadonly<z.ZodNumber>;
53
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
52
+ createdAt: z.ZodReadonly<z.ZodInt>;
53
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
54
54
  uid: z.ZodReadonly<z.ZodString>;
55
55
  availableBalance: z.ZodNumber;
56
+ invoiceNoRef: z.ZodString;
56
57
  totalUploads: z.ZodNumber;
57
58
  preferences: z.ZodObject<{
58
- createdAt: z.ZodReadonly<z.ZodNumber>;
59
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
59
+ createdAt: z.ZodReadonly<z.ZodInt>;
60
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
60
61
  userProvisions: z.ZodNumber;
61
62
  apptDistAlg: z.ZodDefault<z.ZodEnum<{
62
63
  RR: "RR";
@@ -66,12 +67,12 @@ declare const CompanyOpState: z.ZodObject<{
66
67
  }, z.core.$strip>;
67
68
  type CompanyOpState = z.infer<typeof CompanyOpState>;
68
69
  declare const CompanyBillingModel: z.ZodObject<{
69
- createdAt: z.ZodReadonly<z.ZodNumber>;
70
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
70
+ createdAt: z.ZodReadonly<z.ZodInt>;
71
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
71
72
  uid: z.ZodReadonly<z.ZodString>;
72
73
  preferences: z.ZodObject<{
73
- createdAt: z.ZodReadonly<z.ZodNumber>;
74
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
74
+ createdAt: z.ZodReadonly<z.ZodInt>;
75
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
75
76
  allowInvoiceDist: z.ZodBoolean;
76
77
  useCreatedServices: z.ZodBoolean;
77
78
  serviceSelector: z.ZodEnum<{
@@ -82,27 +83,27 @@ declare const CompanyBillingModel: z.ZodObject<{
82
83
  primaryCurrency: z.ZodEnum<{
83
84
  JMD: "JMD";
84
85
  }>;
85
- acceptedCurrencies: z.ZodArray<z.ZodEnum<{
86
+ acceptedCurrencies: z.ZodPipe<z.ZodArray<z.ZodEnum<{
86
87
  JMD: "JMD";
87
- }>>;
88
+ }>>, z.ZodTransform<"JMD"[], "JMD"[]>>;
88
89
  }, z.core.$strip>;
89
90
  additionalFees: z.ZodDefault<z.ZodArray<z.ZodObject<{
90
- createdAt: z.ZodReadonly<z.ZodNumber>;
91
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
91
+ createdAt: z.ZodReadonly<z.ZodInt>;
92
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
92
93
  description: z.ZodOptional<z.ZodString>;
93
94
  fixedAmount: z.ZodNumber;
94
95
  percentage: z.ZodNumber;
95
96
  }, z.core.$strip>>>;
96
97
  discounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
97
- createdAt: z.ZodReadonly<z.ZodNumber>;
98
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
98
+ createdAt: z.ZodReadonly<z.ZodInt>;
99
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
99
100
  description: z.ZodOptional<z.ZodString>;
100
101
  fixedAmount: z.ZodNumber;
101
102
  percentage: z.ZodNumber;
102
103
  }, z.core.$strip>>>;
103
104
  services: z.ZodDefault<z.ZodArray<z.ZodObject<{
104
- createdAt: z.ZodReadonly<z.ZodNumber>;
105
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
105
+ createdAt: z.ZodReadonly<z.ZodInt>;
106
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
106
107
  item: z.ZodString;
107
108
  cost: z.ZodNumber;
108
109
  }, z.core.$strip>>>;
@@ -156,8 +157,8 @@ declare const RegisterCompanyForm: z.ZodObject<{
156
157
  }, z.core.$strip>;
157
158
  type RegisterCompanyForm = z.infer<typeof RegisterCompanyForm>;
158
159
  declare const CompanyRegistrationClaims: z.ZodObject<{
159
- createdAt: z.ZodReadonly<z.ZodNumber>;
160
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
160
+ createdAt: z.ZodReadonly<z.ZodInt>;
161
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
161
162
  sender: z.ZodObject<{
162
163
  name: z.ZodRecord<z.ZodEnum<{
163
164
  first: "first";
@@ -171,13 +172,14 @@ declare const CompanyRegistrationClaims: z.ZodObject<{
171
172
  pricingRate: z.ZodObject<{
172
173
  flatFee: z.ZodNumber;
173
174
  feePerUser: z.ZodNumber;
174
- lastModified: z.ZodNumber;
175
+ lastModified: z.ZodInt;
175
176
  }, z.core.$strip>;
176
177
  }, z.core.$strip>;
177
178
  type CompanyRegistrationClaims = z.infer<typeof CompanyRegistrationClaims>;
178
179
  declare const CompanyUser: z.ZodObject<{
179
- createdAt: z.ZodReadonly<z.ZodNumber>;
180
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
180
+ createdAt: z.ZodReadonly<z.ZodInt>;
181
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
182
+ uid: z.ZodReadonly<z.ZodString>;
181
183
  status: z.ZodEnum<{
182
184
  inviteSent: "inviteSent";
183
185
  active: "active";
@@ -190,7 +192,7 @@ declare const CompanyUser: z.ZodObject<{
190
192
  cshr: "cshr";
191
193
  admin: "admin";
192
194
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
193
- lastActive: z.ZodNumber;
195
+ lastActive: z.ZodInt;
194
196
  name: z.ZodRecord<z.ZodEnum<{
195
197
  first: "first";
196
198
  last: "last";
@@ -198,14 +200,16 @@ declare const CompanyUser: z.ZodObject<{
198
200
  photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
199
201
  email: z.ZodEmail;
200
202
  phoneNumber: z.ZodOptional<z.ZodString>;
201
- uid: z.ZodString;
202
203
  }, z.core.$strip>;
203
204
  type CompanyUser = z.infer<typeof CompanyUser>;
204
205
  declare const _staffDetails: z.ZodObject<{
206
+ createdAt: z.ZodReadonly<z.ZodInt>;
207
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
205
208
  uid: z.ZodReadonly<z.ZodString>;
206
209
  members: z.ZodArray<z.ZodObject<{
207
- createdAt: z.ZodReadonly<z.ZodNumber>;
208
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
210
+ createdAt: z.ZodReadonly<z.ZodInt>;
211
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
212
+ uid: z.ZodReadonly<z.ZodString>;
209
213
  status: z.ZodEnum<{
210
214
  inviteSent: "inviteSent";
211
215
  active: "active";
@@ -218,7 +222,7 @@ declare const _staffDetails: z.ZodObject<{
218
222
  cshr: "cshr";
219
223
  admin: "admin";
220
224
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
221
- lastActive: z.ZodNumber;
225
+ lastActive: z.ZodInt;
222
226
  name: z.ZodRecord<z.ZodEnum<{
223
227
  first: "first";
224
228
  last: "last";
@@ -226,17 +230,19 @@ declare const _staffDetails: z.ZodObject<{
226
230
  photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
227
231
  email: z.ZodEmail;
228
232
  phoneNumber: z.ZodOptional<z.ZodString>;
229
- uid: z.ZodString;
230
233
  }, z.core.$strip>>;
231
- partnerMap: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
232
- blackList: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
234
+ partnerMap: z.ZodRecord<z.ZodReadonly<z.ZodString>, z.ZodPipe<z.ZodArray<z.ZodReadonly<z.ZodString>>, z.ZodTransform<string[], string[]>>>;
235
+ blackList: z.ZodPipe<z.ZodArray<z.ZodReadonly<z.ZodString>>, z.ZodTransform<string[], string[]>>;
233
236
  }, z.core.$strip>;
234
237
  /** The unpacked Staff Details */
235
238
  declare const StaffDetails: z.ZodPipe<z.ZodObject<{
239
+ createdAt: z.ZodReadonly<z.ZodInt>;
240
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
236
241
  uid: z.ZodReadonly<z.ZodString>;
237
242
  members: z.ZodArray<z.ZodObject<{
238
- createdAt: z.ZodReadonly<z.ZodNumber>;
239
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
243
+ createdAt: z.ZodReadonly<z.ZodInt>;
244
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
245
+ uid: z.ZodReadonly<z.ZodString>;
240
246
  status: z.ZodEnum<{
241
247
  inviteSent: "inviteSent";
242
248
  active: "active";
@@ -249,7 +255,7 @@ declare const StaffDetails: z.ZodPipe<z.ZodObject<{
249
255
  cshr: "cshr";
250
256
  admin: "admin";
251
257
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
252
- lastActive: z.ZodNumber;
258
+ lastActive: z.ZodInt;
253
259
  name: z.ZodRecord<z.ZodEnum<{
254
260
  first: "first";
255
261
  last: "last";
@@ -257,49 +263,52 @@ declare const StaffDetails: z.ZodPipe<z.ZodObject<{
257
263
  photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
258
264
  email: z.ZodEmail;
259
265
  phoneNumber: z.ZodOptional<z.ZodString>;
260
- uid: z.ZodString;
261
266
  }, z.core.$strip>>;
262
- partnerMap: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
263
- blackList: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
267
+ partnerMap: z.ZodRecord<z.ZodReadonly<z.ZodString>, z.ZodPipe<z.ZodArray<z.ZodReadonly<z.ZodString>>, z.ZodTransform<string[], string[]>>>;
268
+ blackList: z.ZodPipe<z.ZodArray<z.ZodReadonly<z.ZodString>>, z.ZodTransform<string[], string[]>>;
264
269
  }, z.core.$strip>, z.ZodTransform<{
270
+ createdAt: number;
265
271
  uid: string;
266
272
  members: {
267
273
  createdAt: number;
274
+ uid: string;
268
275
  status: "inviteSent" | "active" | "inactive";
269
276
  roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
270
277
  lastActive: number;
271
278
  name: Record<"first" | "last", string>;
272
279
  email: string;
273
- uid: string;
274
280
  lastModified?: number | null | undefined;
275
281
  photoUrl?: string | null | undefined;
276
282
  phoneNumber?: string | undefined;
277
283
  }[];
278
284
  partnerMap: Record<string, string[]>;
279
285
  blackList: string[];
286
+ lastModified?: number | null | undefined;
280
287
  }, {
288
+ createdAt: number;
281
289
  uid: string;
282
290
  members: {
283
291
  createdAt: number;
292
+ uid: string;
284
293
  status: "inviteSent" | "active" | "inactive";
285
294
  roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
286
295
  lastActive: number;
287
296
  name: Record<"first" | "last", string>;
288
297
  email: string;
289
- uid: string;
290
298
  lastModified?: number | null | undefined;
291
299
  photoUrl?: string | null | undefined;
292
300
  phoneNumber?: string | undefined;
293
301
  }[];
294
302
  partnerMap: Record<string, string[]>;
295
303
  blackList: string[];
304
+ lastModified?: number | null | undefined;
296
305
  }>>;
297
306
  type StaffDetails = z.infer<typeof _staffDetails>;
298
307
  declare const CompanyDetails: z.ZodObject<{
299
- uid: z.ZodString;
308
+ uid: z.ZodReadonly<z.ZodString>;
300
309
  identity: z.ZodObject<{
301
- createdAt: z.ZodReadonly<z.ZodNumber>;
302
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
310
+ createdAt: z.ZodReadonly<z.ZodInt>;
311
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
303
312
  address: z.ZodObject<{
304
313
  streetAddress: z.ZodString;
305
314
  city: z.ZodOptional<z.ZodString>;
@@ -319,13 +328,14 @@ declare const CompanyDetails: z.ZodObject<{
319
328
  }, z.core.$strip>;
320
329
  }, z.core.$strip>;
321
330
  opState: z.ZodObject<{
322
- createdAt: z.ZodReadonly<z.ZodNumber>;
323
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
331
+ createdAt: z.ZodReadonly<z.ZodInt>;
332
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
333
+ invoiceNoRef: z.ZodString;
324
334
  availableBalance: z.ZodNumber;
325
335
  totalUploads: z.ZodNumber;
326
336
  preferences: z.ZodObject<{
327
- createdAt: z.ZodReadonly<z.ZodNumber>;
328
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
337
+ createdAt: z.ZodReadonly<z.ZodInt>;
338
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
329
339
  userProvisions: z.ZodNumber;
330
340
  apptDistAlg: z.ZodDefault<z.ZodEnum<{
331
341
  RR: "RR";
@@ -334,11 +344,11 @@ declare const CompanyDetails: z.ZodObject<{
334
344
  }, z.core.$strip>;
335
345
  }, z.core.$strip>;
336
346
  billing: z.ZodObject<{
337
- createdAt: z.ZodReadonly<z.ZodNumber>;
338
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
347
+ createdAt: z.ZodReadonly<z.ZodInt>;
348
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
339
349
  preferences: z.ZodObject<{
340
- createdAt: z.ZodReadonly<z.ZodNumber>;
341
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
350
+ createdAt: z.ZodReadonly<z.ZodInt>;
351
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
342
352
  allowInvoiceDist: z.ZodBoolean;
343
353
  useCreatedServices: z.ZodBoolean;
344
354
  serviceSelector: z.ZodEnum<{
@@ -349,35 +359,38 @@ declare const CompanyDetails: z.ZodObject<{
349
359
  primaryCurrency: z.ZodEnum<{
350
360
  JMD: "JMD";
351
361
  }>;
352
- acceptedCurrencies: z.ZodArray<z.ZodEnum<{
362
+ acceptedCurrencies: z.ZodPipe<z.ZodArray<z.ZodEnum<{
353
363
  JMD: "JMD";
354
- }>>;
364
+ }>>, z.ZodTransform<"JMD"[], "JMD"[]>>;
355
365
  }, z.core.$strip>;
356
366
  additionalFees: z.ZodDefault<z.ZodArray<z.ZodObject<{
357
- createdAt: z.ZodReadonly<z.ZodNumber>;
358
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
367
+ createdAt: z.ZodReadonly<z.ZodInt>;
368
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
359
369
  description: z.ZodOptional<z.ZodString>;
360
370
  fixedAmount: z.ZodNumber;
361
371
  percentage: z.ZodNumber;
362
372
  }, z.core.$strip>>>;
363
373
  discounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
364
- createdAt: z.ZodReadonly<z.ZodNumber>;
365
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
374
+ createdAt: z.ZodReadonly<z.ZodInt>;
375
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
366
376
  description: z.ZodOptional<z.ZodString>;
367
377
  fixedAmount: z.ZodNumber;
368
378
  percentage: z.ZodNumber;
369
379
  }, z.core.$strip>>>;
370
380
  services: z.ZodDefault<z.ZodArray<z.ZodObject<{
371
- createdAt: z.ZodReadonly<z.ZodNumber>;
372
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
381
+ createdAt: z.ZodReadonly<z.ZodInt>;
382
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
373
383
  item: z.ZodString;
374
384
  cost: z.ZodNumber;
375
385
  }, z.core.$strip>>>;
376
386
  }, z.core.$strip>;
377
387
  staffDetails: z.ZodObject<{
388
+ createdAt: z.ZodReadonly<z.ZodInt>;
389
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
378
390
  members: z.ZodArray<z.ZodObject<{
379
- createdAt: z.ZodReadonly<z.ZodNumber>;
380
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
391
+ createdAt: z.ZodReadonly<z.ZodInt>;
392
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
393
+ uid: z.ZodReadonly<z.ZodString>;
381
394
  status: z.ZodEnum<{
382
395
  inviteSent: "inviteSent";
383
396
  active: "active";
@@ -390,7 +403,7 @@ declare const CompanyDetails: z.ZodObject<{
390
403
  cshr: "cshr";
391
404
  admin: "admin";
392
405
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
393
- lastActive: z.ZodNumber;
406
+ lastActive: z.ZodInt;
394
407
  name: z.ZodRecord<z.ZodEnum<{
395
408
  first: "first";
396
409
  last: "last";
@@ -398,20 +411,23 @@ declare const CompanyDetails: z.ZodObject<{
398
411
  photoUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
399
412
  email: z.ZodEmail;
400
413
  phoneNumber: z.ZodOptional<z.ZodString>;
401
- uid: z.ZodString;
402
414
  }, z.core.$strip>>;
403
- partnerMap: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
404
- blackList: z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>;
415
+ partnerMap: z.ZodRecord<z.ZodReadonly<z.ZodString>, z.ZodPipe<z.ZodArray<z.ZodReadonly<z.ZodString>>, z.ZodTransform<string[], string[]>>>;
416
+ blackList: z.ZodPipe<z.ZodArray<z.ZodReadonly<z.ZodString>>, z.ZodTransform<string[], string[]>>;
405
417
  }, z.core.$strip>;
406
418
  }, z.core.$strip>;
407
419
  type CompanyDetails = z.infer<typeof CompanyDetails>;
408
420
 
421
+ declare const InvoiceNo: z.ZodString;
422
+ declare const UuidV4: z.ZodReadonly<z.ZodString>;
423
+ declare const UuidV7: z.ZodReadonly<z.ZodString>;
424
+ declare const StandardTime: z.ZodString;
425
+ declare const Timestamp: z.ZodInt;
409
426
  declare const TimeLog: z.ZodObject<{
410
- createdAt: z.ZodReadonly<z.ZodNumber>;
411
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
427
+ createdAt: z.ZodReadonly<z.ZodInt>;
428
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
412
429
  }, z.core.$strip>;
413
430
  type TimeLog = z.infer<typeof TimeLog>;
414
- declare const Time: z.ZodString;
415
431
 
416
432
  declare const companyUserRoles: z.ZodEnum<{
417
433
  doc: "doc";
@@ -442,12 +458,12 @@ type AppointmentDistAlg = z.infer<typeof appointmentDistAlgs>;
442
458
  /**@returns an array of the users that have conflicting roles or are incompatible with the other partners, or null if none was found. */
443
459
  declare const findConflictingPartners: (...partners: CompanyUser[]) => {
444
460
  createdAt: number;
461
+ uid: string;
445
462
  status: "inviteSent" | "active" | "inactive";
446
463
  roles: ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[];
447
464
  lastActive: number;
448
465
  name: Record<"first" | "last", string>;
449
466
  email: string;
450
- uid: string;
451
467
  lastModified?: number | null | undefined;
452
468
  photoUrl?: string | null | undefined;
453
469
  phoneNumber?: string | undefined;
@@ -455,4 +471,4 @@ declare const findConflictingPartners: (...partners: CompanyUser[]) => {
455
471
  /**@returns the roles that are compatible with the selected role. */
456
472
  declare const getCompatibleRoles: (role: CompanyUserRole) => CompanyUserRole[];
457
473
 
458
- export { type AppointmentDistAlg, CompanyBillingModel, CompanyDetails, CompanyIdentity, CompanyOpState, type CompanyPartnerRole, CompanyRegistrationClaims, CompanyUser, type CompanyUserRole, type EmployeeRole, PriceAdjustment, PriceTag, PricingRate, RegisterCompanyForm, StaffDetails, Time, TimeLog, appointmentDistAlgs, companyPartnerRoles, companyUserRoles, employeeRoles, findConflictingPartners, getCompatibleRoles };
474
+ export { type AppointmentDistAlg, CompanyBillingModel, CompanyDetails, CompanyIdentity, CompanyOpState, type CompanyPartnerRole, CompanyRegistrationClaims, CompanyUser, type CompanyUserRole, type EmployeeRole, InvoiceNo, PriceAdjustment, PriceTag, PricingRate, RegisterCompanyForm, StaffDetails, StandardTime, TimeLog, Timestamp, UuidV4, UuidV7, appointmentDistAlgs, companyPartnerRoles, companyUserRoles, employeeRoles, findConflictingPartners, getCompatibleRoles };
package/dist/main.js CHANGED
@@ -2,34 +2,45 @@
2
2
  import * as z2 from "zod";
3
3
 
4
4
  // src/schemas/utils.ts
5
+ import { validate, version } from "uuid";
5
6
  import * as z from "zod";
6
- var TimeLog = z.object({
7
- createdAt: z.number().readonly(),
8
- lastModified: z.number().nullish()
7
+ var InvoiceNo = z.string().regex(
8
+ /^[0-9]{4}-(01|(0[2-9])|(1[0-2]))-(30|31|([1-2][0-9])|0[1-9])-[0-9]{7}/,
9
+ 'An invoice no. must match the pattern "yyyy-mm-dd-9999999".'
10
+ );
11
+ var UuidV4 = z.string().readonly().refine((uid) => validate(uid) && version(uid) === 4, "Invalid uuid.");
12
+ var UuidV7 = z.string().readonly().refine((uid) => validate(uid) && version(uid) === 7, "Invalid uuid.");
13
+ var StandardTime = z.string().regex(/^(01|(0[2-9])|(1[0-2])):(([1-5][0-9])|0[0-9]) (am|pm)/i, {
14
+ error: "A standard time must match the pattern hh:mm A."
9
15
  });
10
- var Time = z.string().regex(/^[0-9]{1,2}:[0-9]{2} (am|AM|pm|PM)/, {
11
- error: "Must match the pattern hh:mm A"
16
+ var Timestamp = z.int().refine(
17
+ (t) => t.toString().length === 13,
18
+ "A timestamp must have (13) digits."
19
+ ).positive();
20
+ var TimeLog = z.object({
21
+ createdAt: Timestamp.readonly(),
22
+ lastModified: Timestamp.nullish()
12
23
  });
13
24
 
14
25
  // src/schemas/Billing.ts
15
26
  var PricingRate = z2.object({
16
27
  companyRegistration: z2.object({
17
- flatFee: z2.number(),
18
- feePerUser: z2.number(),
19
- lastModified: z2.number()
28
+ flatFee: z2.number().positive(),
29
+ feePerUser: z2.number().positive(),
30
+ lastModified: Timestamp
20
31
  })
21
32
  });
22
33
  var PriceAdjustment = z2.object({
23
- description: z2.string().trim().optional(),
24
- fixedAmount: z2.number(),
25
- percentage: z2.number(),
34
+ description: z2.string().trim().min(3, "A description must have atleast (3) characters.").max(25, "A description can't have more that (25) characters.").optional(),
35
+ fixedAmount: z2.number().positive().max(1e6, "The max fixed amount is $1,000,000.00"),
36
+ percentage: z2.number().positive().max(1e3, "The max percentage is 1,000%"),
26
37
  ...TimeLog.shape
27
38
  });
28
39
  var PriceTag = z2.object({
29
- uid: z2.string(),
40
+ uid: UuidV4,
30
41
  /**The name of the item that's being priced */
31
42
  item: z2.string().trim().min(3, "The price item must be atleast (3) characters long.").max(50, "The price item can't be more than (50) characters long."),
32
- cost: z2.number().min(1, "The minimum allowed cost is $1.00"),
43
+ cost: z2.number().min(1, "The minimum allowed cost is $1.00").max(1e9, "The max allowed cost is $1,000,000,000.00.").positive(),
33
44
  ...TimeLog.shape
34
45
  });
35
46
 
@@ -61,29 +72,31 @@ var appointmentDistAlgs = z3.enum(["RR", "LOR"]);
61
72
 
62
73
  // src/schemas/Company.ts
63
74
  var CompanyIdentity = z4.object({
64
- uid: z4.string().readonly(),
75
+ uid: UuidV7,
65
76
  // The company's uid
66
- displayName: z4.string(),
67
- logo: z4.string().nullish(),
77
+ displayName: z4.string().min(3).max(20),
78
+ logo: z4.string().max(2500).nullish(),
68
79
  contact: z4.object({
69
- email: z4.email(),
80
+ email: z4.email().max(25),
70
81
  phoneNumber: PhoneNumber.optional()
71
82
  }),
72
83
  address: Address,
73
84
  legal: z4.object({
74
- regNo: z4.string().readonly(),
85
+ regNo: z4.string().max(20).readonly(),
75
86
  // The company's registration number
76
- trn: z4.string().nullish(),
77
- gctRegNo: z4.string().nullish()
87
+ trn: z4.string().regex(/[0-9]{3}-[0-9]{3}-[0-9]{3}/).nullish(),
88
+ gctRegNo: z4.string().max(15).nullish()
78
89
  }),
79
90
  ...TimeLog.shape
80
91
  });
81
92
  var CompanyOpState = z4.object({
82
93
  // The company's uid
83
- uid: CompanyIdentity.shape.uid,
94
+ uid: UuidV7,
84
95
  // This can only be changed by the server/app admin
85
96
  availableBalance: z4.number(),
86
- /**
97
+ /** A counter for the company's invoice numbers. */
98
+ invoiceNoRef: InvoiceNo,
99
+ /**
87
100
  * The total amount of uploads made by an admin.
88
101
  * @note - This should be refreshed daily.
89
102
  */
@@ -105,7 +118,7 @@ var CompanyOpState = z4.object({
105
118
  ...TimeLog.shape
106
119
  });
107
120
  var CompanyBillingModel = z4.object({
108
- uid: CompanyIdentity.shape.uid,
121
+ uid: UuidV7,
109
122
  preferences: z4.object({
110
123
  /** Allows the serviceDecider to distribute invoices. */
111
124
  allowInvoiceDist: z4.boolean(),
@@ -120,7 +133,14 @@ var CompanyBillingModel = z4.object({
120
133
  * */
121
134
  enforcePaidAppts: z4.boolean(),
122
135
  primaryCurrency: currencies,
123
- acceptedCurrencies: z4.array(currencies),
136
+ acceptedCurrencies: z4.array(currencies).transform((currencies2) => {
137
+ const newCurrencies = [];
138
+ for (const currency of currencies2) {
139
+ if (newCurrencies.includes(currency)) continue;
140
+ newCurrencies.push(currency);
141
+ }
142
+ return newCurrencies;
143
+ }),
124
144
  ...TimeLog.shape
125
145
  }).superRefine((data, ctx) => {
126
146
  if (data.enforcePaidAppts && data.serviceSelector !== "scheduler") {
@@ -156,6 +176,7 @@ var CompanyRegistrationClaims = z4.object({
156
176
  });
157
177
  var CompanyUser = z4.object({
158
178
  ...UserModel.shape,
179
+ uid: UuidV7,
159
180
  status: z4.enum(["inviteSent", "active", "inactive"]),
160
181
  roles: z4.array(companyUserRoles).transform((roles) => {
161
182
  const newRoles = [];
@@ -169,11 +190,11 @@ var CompanyUser = z4.object({
169
190
  (role, i) => i === 0 || compatibleRoles.includes(role)
170
191
  );
171
192
  }, "A user is not allowed to have conflicting roles."),
172
- lastActive: z4.number(),
193
+ lastActive: Timestamp,
173
194
  ...TimeLog.shape
174
195
  });
175
196
  var _staffDetails = z4.object({
176
- uid: CompanyIdentity.shape.uid,
197
+ uid: UuidV7,
177
198
  members: z4.array(CompanyUser).superRefine((users, ctx) => {
178
199
  const duplicateUids = [];
179
200
  const duplicateEmails = [];
@@ -230,8 +251,8 @@ var _staffDetails = z4.object({
230
251
  }
231
252
  }
232
253
  return newList.sort();
233
- })
234
- // ...TimeLog.shape,
254
+ }),
255
+ ...TimeLog.shape
235
256
  });
236
257
  var StaffDetails = _staffDetails.transform((d) => {
237
258
  let blackListWithExisitingUsers = [];
@@ -273,7 +294,7 @@ var StaffDetails = _staffDetails.transform((d) => {
273
294
  }
274
295
  });
275
296
  var CompanyDetails = z4.object({
276
- uid: z4.string(),
297
+ uid: CompanyIdentity.shape.uid,
277
298
  identity: CompanyIdentity.omit({ uid: true }),
278
299
  opState: CompanyOpState.omit({ uid: true }),
279
300
  billing: CompanyBillingModel.omit({ uid: true }),
@@ -317,13 +338,17 @@ export {
317
338
  CompanyOpState,
318
339
  CompanyRegistrationClaims,
319
340
  CompanyUser,
341
+ InvoiceNo,
320
342
  PriceAdjustment,
321
343
  PriceTag,
322
344
  PricingRate,
323
345
  RegisterCompanyForm,
324
346
  StaffDetails,
325
- Time,
347
+ StandardTime,
326
348
  TimeLog,
349
+ Timestamp,
350
+ UuidV4,
351
+ UuidV7,
327
352
  appointmentDistAlgs,
328
353
  companyPartnerRoles,
329
354
  companyUserRoles,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizmap/sdk",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "main": "./dist/main.js",
5
5
  "types": "./dist/main.d.ts",
6
6
  "type": "module",
@@ -24,5 +24,8 @@
24
24
  "tsup": "^8.5.0",
25
25
  "typescript": "^5.9.2",
26
26
  "zod": "^4.2.1"
27
+ },
28
+ "dependencies": {
29
+ "uuid": "^13.0.0"
27
30
  }
28
31
  }