@bizmap/sdk 0.0.34 → 0.0.36

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
@@ -112,7 +112,7 @@ declare const CompanyUser: z.ZodObject<{
112
112
  cshr: "cshr";
113
113
  admin: "admin";
114
114
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
115
- totalAppts: z.ZodDefault<z.ZodInt>;
115
+ totalAppts: z.ZodInt;
116
116
  lastActive: z.ZodInt;
117
117
  name: z.ZodRecord<z.ZodEnum<{
118
118
  first: "first";
@@ -148,14 +148,14 @@ declare const CompanyDetails: z.ZodObject<{
148
148
  state: z.ZodObject<{
149
149
  availableBalance: z.ZodNumber;
150
150
  totalUploads: z.ZodNumber;
151
- lastInvoiceNo: z.ZodNullable<z.ZodString>;
152
- lastTktNo: z.ZodNumber;
151
+ invoiceNoCounter: z.ZodInt;
152
+ tktNoCounter: z.ZodInt;
153
153
  lastModified: z.ZodNullable<z.ZodInt>;
154
154
  }, z.core.$strip> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
155
155
  availableBalance: z.ZodNumber;
156
156
  totalUploads: z.ZodNumber;
157
- lastInvoiceNo: z.ZodNullable<z.ZodString>;
158
- lastTktNo: z.ZodNumber;
157
+ invoiceNoCounter: z.ZodInt;
158
+ tktNoCounter: z.ZodInt;
159
159
  lastModified: z.ZodNullable<z.ZodInt>;
160
160
  }, z.core.$strip>>>;
161
161
  preferences: z.ZodObject<{
@@ -175,7 +175,6 @@ declare const CompanyDetails: z.ZodObject<{
175
175
  }, z.core.$strip>>>;
176
176
  billing: z.ZodObject<{
177
177
  preferences: z.ZodObject<{
178
- allowInvoiceDist: z.ZodBoolean;
179
178
  useCreatedServices: z.ZodBoolean;
180
179
  serviceSelector: z.ZodEnum<{
181
180
  scheduler: "scheduler";
@@ -213,7 +212,6 @@ declare const CompanyDetails: z.ZodObject<{
213
212
  lastModified: z.ZodNullable<z.ZodInt>;
214
213
  }, z.core.$strip> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
215
214
  preferences: z.ZodObject<{
216
- allowInvoiceDist: z.ZodBoolean;
217
215
  useCreatedServices: z.ZodBoolean;
218
216
  serviceSelector: z.ZodEnum<{
219
217
  scheduler: "scheduler";
@@ -271,7 +269,7 @@ declare const CompanyDetails: z.ZodObject<{
271
269
  cshr: "cshr";
272
270
  admin: "admin";
273
271
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
274
- totalAppts: z.ZodDefault<z.ZodInt>;
272
+ totalAppts: z.ZodInt;
275
273
  lastActive: z.ZodInt;
276
274
  name: z.ZodRecord<z.ZodEnum<{
277
275
  first: "first";
@@ -353,7 +351,7 @@ declare const CompanyDetails: z.ZodObject<{
353
351
  cshr: "cshr";
354
352
  admin: "admin";
355
353
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
356
- totalAppts: z.ZodDefault<z.ZodInt>;
354
+ totalAppts: z.ZodInt;
357
355
  lastActive: z.ZodInt;
358
356
  name: z.ZodRecord<z.ZodEnum<{
359
357
  first: "first";
@@ -443,14 +441,14 @@ declare const PartialCompanyDetails: z.ZodObject<{
443
441
  state: z.ZodObject<{
444
442
  availableBalance: z.ZodNumber;
445
443
  totalUploads: z.ZodNumber;
446
- lastInvoiceNo: z.ZodNullable<z.ZodString>;
447
- lastTktNo: z.ZodNumber;
444
+ invoiceNoCounter: z.ZodInt;
445
+ tktNoCounter: z.ZodInt;
448
446
  lastModified: z.ZodNullable<z.ZodInt>;
449
447
  }, z.core.$strip> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
450
448
  availableBalance: z.ZodNumber;
451
449
  totalUploads: z.ZodNumber;
452
- lastInvoiceNo: z.ZodNullable<z.ZodString>;
453
- lastTktNo: z.ZodNumber;
450
+ invoiceNoCounter: z.ZodInt;
451
+ tktNoCounter: z.ZodInt;
454
452
  lastModified: z.ZodNullable<z.ZodInt>;
455
453
  }, z.core.$strip>>>;
456
454
  preferences: z.ZodObject<{
@@ -470,7 +468,6 @@ declare const PartialCompanyDetails: z.ZodObject<{
470
468
  }, z.core.$strip>>>;
471
469
  billing: z.ZodObject<{
472
470
  preferences: z.ZodObject<{
473
- allowInvoiceDist: z.ZodBoolean;
474
471
  useCreatedServices: z.ZodBoolean;
475
472
  serviceSelector: z.ZodEnum<{
476
473
  scheduler: "scheduler";
@@ -508,7 +505,6 @@ declare const PartialCompanyDetails: z.ZodObject<{
508
505
  lastModified: z.ZodNullable<z.ZodInt>;
509
506
  }, z.core.$strip> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
510
507
  preferences: z.ZodObject<{
511
- allowInvoiceDist: z.ZodBoolean;
512
508
  useCreatedServices: z.ZodBoolean;
513
509
  serviceSelector: z.ZodEnum<{
514
510
  scheduler: "scheduler";
@@ -566,7 +562,7 @@ declare const PartialCompanyDetails: z.ZodObject<{
566
562
  cshr: "cshr";
567
563
  admin: "admin";
568
564
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
569
- totalAppts: z.ZodDefault<z.ZodInt>;
565
+ totalAppts: z.ZodInt;
570
566
  lastActive: z.ZodInt;
571
567
  name: z.ZodRecord<z.ZodEnum<{
572
568
  first: "first";
@@ -648,7 +644,7 @@ declare const PartialCompanyDetails: z.ZodObject<{
648
644
  cshr: "cshr";
649
645
  admin: "admin";
650
646
  }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "admin")[]>>;
651
- totalAppts: z.ZodDefault<z.ZodInt>;
647
+ totalAppts: z.ZodInt;
652
648
  lastActive: z.ZodInt;
653
649
  name: z.ZodRecord<z.ZodEnum<{
654
650
  first: "first";
package/dist/main.js CHANGED
@@ -31,22 +31,22 @@ var TimeLog = z.object({
31
31
  // src/schemas/Billing.ts
32
32
  var PricingRate = z2.object({
33
33
  companyRegistration: z2.object({
34
- flatFee: z2.number().positive(),
35
- feePerUser: z2.number().positive(),
34
+ flatFee: z2.number().gte(0),
35
+ feePerUser: z2.number().gte(0),
36
36
  lastModified: Timestamp
37
37
  })
38
38
  });
39
39
  var PriceAdjustment = z2.object({
40
40
  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(),
41
- fixedAmount: z2.number().positive().max(1e6, "The max fixed amount is $1,000,000.00"),
42
- percentage: z2.number().positive().max(1e3, "The max percentage is 1,000%"),
41
+ fixedAmount: z2.number().gte(0).max(1e6, "The max fixed amount is $1,000,000.00"),
42
+ percentage: z2.number().gte(0).max(1e3, "The max percentage is 1,000%"),
43
43
  ...TimeLog.shape
44
44
  });
45
45
  var PriceTag = z2.object({
46
46
  uid: UuidV4,
47
47
  /**The name of the item that's being priced */
48
48
  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."),
49
- 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(),
49
+ cost: z2.number().min(1, "The minimum allowed cost is $1.00").max(1e9, "The max allowed cost is $1,000,000,000.00."),
50
50
  ...TimeLog.shape
51
51
  });
52
52
 
@@ -113,7 +113,7 @@ var CompanyUser = z4.object({
113
113
  );
114
114
  }, "A user is not allowed to have conflicting roles."),
115
115
  /** This should reset at the end of every cycle. */
116
- totalAppts: z4.int().positive().default(0),
116
+ totalAppts: z4.int().gte(0),
117
117
  lastActive: Timestamp,
118
118
  ...TimeLog.shape
119
119
  }).superRefine((data, ctx) => {
@@ -153,10 +153,9 @@ var CompanyState = z4.object({
153
153
  /** A counter for the company's invoice no.
154
154
  * @note This should only be null when the cycle resets
155
155
  */
156
- lastInvoiceNo: InvoiceNo.nullable(),
156
+ invoiceNoCounter: z4.int().gte(1),
157
157
  /** A counter for the company's ticket no. */
158
- lastTktNo: z4.number().positive(),
159
- // distAppts: z.record(CompanyUser.shape.uid, z.number().positive().nullable()),
158
+ tktNoCounter: z4.int().gte(1),
160
159
  lastModified: Timestamp.nullable()
161
160
  });
162
161
  var CompanyPreferences = z4.object({
@@ -174,8 +173,6 @@ var CompanyPreferences = z4.object({
174
173
  });
175
174
  var CompanyBillingModel = z4.object({
176
175
  preferences: z4.object({
177
- /** Allows the serviceDecider to distribute invoices. */
178
- allowInvoiceDist: z4.boolean(),
179
176
  /** Forces service selectors to use the list of service(s) that you've created. */
180
177
  useCreatedServices: z4.boolean(),
181
178
  /** The user that's allowed to record the client's services. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizmap/sdk",
3
- "version": "0.0.34",
3
+ "version": "0.0.36",
4
4
  "main": "./dist/main.js",
5
5
  "types": "./dist/main.d.ts",
6
6
  "type": "module",