@bizmap/sdk 0.0.4 → 0.0.6

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
@@ -25,7 +25,7 @@ declare const PriceTag: z.ZodObject<{
25
25
  }, z.core.$strip>;
26
26
  type PriceTag = z.infer<typeof PriceTag>;
27
27
 
28
- declare const CompanyInfo: z.ZodObject<{
28
+ declare const CompanyIdentity: z.ZodObject<{
29
29
  createdAt: z.ZodReadonly<z.ZodNumber>;
30
30
  lastModified: z.ZodNullable<z.ZodNumber>;
31
31
  uid: z.ZodString;
@@ -41,17 +41,13 @@ declare const CompanyInfo: z.ZodObject<{
41
41
  }>, z.ZodString>;
42
42
  phoneNumber: z.ZodOptional<z.ZodString>;
43
43
  }, z.core.$strip>;
44
- type CompanyInfo = z.infer<typeof CompanyInfo>;
44
+ type CompanyIdentity = z.infer<typeof CompanyIdentity>;
45
45
  declare const CompanyOpState: z.ZodObject<{
46
46
  createdAt: z.ZodReadonly<z.ZodNumber>;
47
47
  lastModified: z.ZodNullable<z.ZodNumber>;
48
48
  uid: z.ZodString;
49
49
  availableBalance: z.ZodNumber;
50
50
  isOffline: z.ZodBoolean;
51
- workingHours: z.ZodObject<{
52
- start: z.ZodString;
53
- end: z.ZodString;
54
- }, z.core.$strip>;
55
51
  }, z.core.$strip>;
56
52
  type CompanyOpState = z.infer<typeof CompanyOpState>;
57
53
  declare const appointmentDistAlgs: z.ZodEnum<{
@@ -67,6 +63,10 @@ declare const CompanyPreferences: z.ZodObject<{
67
63
  RR: "RR";
68
64
  LOR: "LOR";
69
65
  }>;
66
+ workingHours: z.ZodObject<{
67
+ start: z.ZodString;
68
+ end: z.ZodString;
69
+ }, z.core.$strip>;
70
70
  }, z.core.$strip>;
71
71
  type CompanyPreferences = z.infer<typeof CompanyPreferences>;
72
72
  declare const CompanyBillingModel: z.ZodObject<{
@@ -181,7 +181,7 @@ declare const CompanyRegistrationClaims: z.ZodObject<{
181
181
  type CompanyRegistrationClaims = z.infer<typeof CompanyRegistrationClaims>;
182
182
 
183
183
  declare const UserCompaniesDTO: z.ZodObject<{
184
- companies: {
184
+ companies: z.ZodArray<z.ZodObject<{
185
185
  createdAt: z.ZodReadonly<z.ZodNumber>;
186
186
  lastModified: z.ZodNullable<z.ZodNumber>;
187
187
  uid: z.ZodString;
@@ -196,7 +196,7 @@ declare const UserCompaniesDTO: z.ZodObject<{
196
196
  country: "country";
197
197
  }>, z.ZodString>;
198
198
  phoneNumber: z.ZodOptional<z.ZodString>;
199
- };
199
+ }, z.core.$strip>>;
200
200
  }, z.core.$strip>;
201
201
  type UserCompaniesDTO = z.infer<typeof UserCompaniesDTO>;
202
202
  declare const companyUserRoles: z.ZodEnum<{
@@ -286,4 +286,4 @@ declare const TimeLog: z.ZodObject<{
286
286
  type TimeLog = z.infer<typeof TimeLog>;
287
287
  declare const Time: z.ZodString;
288
288
 
289
- export { CompanyBillingModel, CompanyInfo, CompanyOpState, type CompanyPartnerRole, CompanyPreferences, CompanyRegistrationClaims, CompanyUser, type CompanyUserRole, CompanyUsersOverviewDTO, type EmployeeRole, PriceAdjustment, PriceTag, PricingRate, RegisterCompanyForm, Time, TimeLog, UserCompaniesDTO, appointmentDistAlgs, companyPartnerRoles, companyUserRoles, employeeRoles };
289
+ export { CompanyBillingModel, CompanyIdentity, CompanyOpState, type CompanyPartnerRole, CompanyPreferences, CompanyRegistrationClaims, CompanyUser, type CompanyUserRole, CompanyUsersOverviewDTO, type EmployeeRole, PriceAdjustment, PriceTag, PricingRate, RegisterCompanyForm, Time, TimeLog, UserCompaniesDTO, appointmentDistAlgs, companyPartnerRoles, companyUserRoles, employeeRoles };
package/dist/main.js CHANGED
@@ -44,7 +44,7 @@ import * as z4 from "zod";
44
44
  import * as z3 from "zod";
45
45
  import { UserModel } from "@wavy/util";
46
46
  var UserCompaniesDTO = z3.object({
47
- companies: CompanyInfo.shape
47
+ companies: z3.array(CompanyIdentity)
48
48
  });
49
49
  var companyUserRoles = z3.enum([
50
50
  "doc",
@@ -73,7 +73,8 @@ var companyPartnerRoles = companyUserRoles.extract([
73
73
  var employeeRoles = companyUserRoles.exclude(["admin"]);
74
74
 
75
75
  // src/schemas/Company.ts
76
- var CompanyInfo = z4.object({
76
+ var CompanyIdentity = z4.object({
77
+ // The company's uid
77
78
  uid: z4.string(),
78
79
  displayName: z4.string(),
79
80
  logo: z4.string().nullish(),
@@ -84,21 +85,15 @@ var CompanyInfo = z4.object({
84
85
  ...TimeLog.shape
85
86
  });
86
87
  var CompanyOpState = z4.object({
88
+ // The company's uid
87
89
  uid: z4.string(),
88
90
  availableBalance: z4.number(),
89
91
  isOffline: z4.boolean(),
90
- // Required to determine:
91
- // [1] when the working directory on the server should reset
92
- // [2] the time that company session requests are cut-off
93
- // (the cutoff time affects non-admins)
94
- workingHours: z4.object({
95
- start: Time,
96
- end: Time
97
- }),
98
92
  ...TimeLog.shape
99
93
  });
100
94
  var appointmentDistAlgs = z4.enum(["RR", "LOR"]);
101
95
  var CompanyPreferences = z4.object({
96
+ // The company's uid
102
97
  uid: z4.string(),
103
98
  /** The amount of user provisions made for this company */
104
99
  userProvisions: z4.number(),
@@ -107,6 +102,14 @@ var CompanyPreferences = z4.object({
107
102
  * @property LOR (Least Outstanding Requests): Distribute based on availability.
108
103
  */
109
104
  apptDistAlg: appointmentDistAlgs,
105
+ // Required to determine:
106
+ // [1] when the working directory on the server should reset
107
+ // [2] the time that company session requests are cut-off
108
+ // (the cutoff time affects non-admins)
109
+ workingHours: z4.object({
110
+ start: Time,
111
+ end: Time
112
+ }),
110
113
  ...TimeLog.shape
111
114
  });
112
115
  var CompanyBillingModel = z4.object({
@@ -127,7 +130,7 @@ var RegisterCompanyForm = z4.object({
127
130
  slogan: z4.string(),
128
131
  email: z4.email(),
129
132
  phoneNumber: z4.string(),
130
- workingHours: CompanyOpState.shape.workingHours,
133
+ workingHours: CompanyPreferences.shape.workingHours,
131
134
  logo: FileDetails,
132
135
  receipt: FileDetails,
133
136
  _claims: z4.string()
@@ -139,7 +142,7 @@ var CompanyRegistrationClaims = z4.object({
139
142
  });
140
143
  export {
141
144
  CompanyBillingModel,
142
- CompanyInfo,
145
+ CompanyIdentity,
143
146
  CompanyOpState,
144
147
  CompanyPreferences,
145
148
  CompanyRegistrationClaims,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizmap/sdk",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "main": "./dist/main.js",
5
5
  "types": "./dist/main.d.ts",
6
6
  "type": "module",
@@ -15,9 +15,12 @@
15
15
  "keywords": [],
16
16
  "author": "",
17
17
  "license": "MIT",
18
+ "peerDependencies": {
19
+ "zod": "^4.2.1"
20
+ },
18
21
  "description": "",
19
22
  "devDependencies": {
20
- "@wavy/util": "^0.0.6",
23
+ "@wavy/util": "^0.0.7",
21
24
  "tsup": "^8.5.0",
22
25
  "typescript": "^5.9.2",
23
26
  "zod": "^4.2.1"