@bizmap/sdk 0.0.1 → 0.0.2

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.
Files changed (3) hide show
  1. package/dist/main.d.ts +41 -1715
  2. package/dist/main.js +21 -23
  3. package/package.json +2 -3
package/dist/main.js CHANGED
@@ -4,10 +4,10 @@ import * as z2 from "zod";
4
4
  // src/schemas/utils.ts
5
5
  import * as z from "zod";
6
6
  var TimeLog = z.object({
7
- createdAt: z.number(),
8
- lastModified: z.number()
7
+ createdAt: z.number().readonly(),
8
+ lastModified: z.number().nullable()
9
9
  });
10
- var Time = z.string().regex(/[0-9]{1,2}:[0-9]{2} (am|pm)/);
10
+ var Time = z.string().regex(/^[0-9]{1,2}:[0-9]{2} (am|AM|pm|PM)/, { error: "Must match the pattern hh:mm A" });
11
11
 
12
12
  // src/schemas/Billing.ts
13
13
  var PricingRate = z2.object({
@@ -18,14 +18,17 @@ var PricingRate = z2.object({
18
18
  })
19
19
  });
20
20
  var PriceAdjustment = z2.object({
21
+ description: z2.string().trim().optional(),
21
22
  fixedAmount: z2.number(),
22
- percentage: z2.number()
23
+ percentage: z2.number(),
24
+ ...TimeLog.shape
23
25
  });
24
26
  var PriceTag = z2.object({
25
27
  uid: z2.string(),
26
28
  name: z2.string(),
27
- cost: z2.number()
28
- }).extend(TimeLog.shape);
29
+ cost: z2.number(),
30
+ ...TimeLog.shape
31
+ });
29
32
 
30
33
  // src/schemas/Company.ts
31
34
  import {
@@ -91,8 +94,9 @@ var CompanyOpState = z4.object({
91
94
  workingHours: z4.object({
92
95
  start: Time,
93
96
  end: Time
94
- })
95
- }).extend(TimeLog.shape);
97
+ }),
98
+ ...TimeLog.shape
99
+ });
96
100
  var appointmentDistAlgs = z4.enum(["RR", "LOR"]);
97
101
  var CompanyPreferences = z4.object({
98
102
  uid: z4.string(),
@@ -102,27 +106,21 @@ var CompanyPreferences = z4.object({
102
106
  * @property RR (Round Robin): Even distribution.
103
107
  * @property LOR (Least Outstanding Requests): Distribute based on availability.
104
108
  */
105
- apptDistAlg: appointmentDistAlgs
106
- }).extend(TimeLog.shape);
109
+ apptDistAlg: appointmentDistAlgs,
110
+ ...TimeLog.shape
111
+ });
107
112
  var CompanyBillingModel = z4.object({
108
113
  uid: z4.string(),
109
114
  trn: z4.string().nullish(),
110
115
  gctRegNo: z4.string().nullish(),
111
116
  billingProvider: CompanyUser.shape.roles.extract(["doc", "physAsst"]),
112
117
  primaryCurrency: Currencies,
113
- additionalFees: z4.array(
114
- z4.object({
115
- ...PriceAdjustment.shape,
116
- description: z4.string().nullish(),
117
- createdAt: z4.number()
118
- })
119
- ),
120
- get discounts() {
121
- return this.additionalFees;
122
- },
118
+ additionalFees: z4.array(PriceAdjustment).optional(),
119
+ discounts: z4.array(PriceAdjustment).optional(),
123
120
  services: z4.array(PriceTag),
124
- acceptedCurrencies: z4.array(Currencies)
125
- }).extend(TimeLog.shape);
121
+ acceptedCurrencies: z4.array(Currencies),
122
+ ...TimeLog.shape
123
+ });
126
124
  var RegisterCompanyForm = z4.object({
127
125
  regNo: z4.string(),
128
126
  userProvisions: z4.number(),
@@ -137,7 +135,7 @@ var RegisterCompanyForm = z4.object({
137
135
  var CompanyRegistrationClaims = z4.object({
138
136
  sender: UserModel2,
139
137
  pricingRate: PricingRate.shape.companyRegistration,
140
- timestamp: z4.number()
138
+ ...TimeLog.shape
141
139
  });
142
140
  export {
143
141
  CompanyBillingModel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizmap/sdk",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "main": "./dist/main.js",
5
5
  "types": "./dist/main.d.ts",
6
6
  "type": "module",
@@ -17,8 +17,7 @@
17
17
  "license": "MIT",
18
18
  "description": "",
19
19
  "devDependencies": {
20
- "@wavy/types": "^0.0.46",
21
- "@wavy/util": "^0.0.3",
20
+ "@wavy/util": "^0.0.4",
22
21
  "tsup": "^8.5.0",
23
22
  "typescript": "^5.9.2",
24
23
  "zod": "^4.2.1"