@bizmap/sdk 0.0.8 → 0.0.10

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
@@ -31,18 +31,21 @@ declare const CompanyIdentity: z.ZodObject<{
31
31
  uid: z.ZodReadonly<z.ZodString>;
32
32
  displayName: z.ZodString;
33
33
  logo: z.ZodOptional<z.ZodString>;
34
- slogan: z.ZodString;
35
- regNo: z.ZodReadonly<z.ZodString>;
36
- email: z.ZodEmail;
34
+ contact: z.ZodObject<{
35
+ email: z.ZodEmail;
36
+ phoneNumber: z.ZodOptional<z.ZodString>;
37
+ }, z.core.$strip>;
37
38
  address: z.ZodRecord<z.ZodEnum<{
38
39
  streetAddress: "streetAddress";
39
40
  city: "city";
40
41
  parish: "parish";
41
42
  country: "country";
42
43
  }>, z.ZodString>;
43
- phoneNumber: z.ZodOptional<z.ZodString>;
44
- trn: z.ZodOptional<z.ZodString>;
45
- gctRegNo: z.ZodOptional<z.ZodString>;
44
+ legal: z.ZodObject<{
45
+ regNo: z.ZodReadonly<z.ZodString>;
46
+ trn: z.ZodOptional<z.ZodString>;
47
+ gctRegNo: z.ZodOptional<z.ZodString>;
48
+ }, z.core.$strip>;
46
49
  }, z.core.$strip>;
47
50
  type CompanyIdentity = z.infer<typeof CompanyIdentity>;
48
51
  declare const CompanyOpState: z.ZodObject<{
@@ -62,10 +65,6 @@ declare const CompanyPreferences: z.ZodObject<{
62
65
  RR: "RR";
63
66
  LOR: "LOR";
64
67
  }>;
65
- workingHours: z.ZodObject<{
66
- start: z.ZodString;
67
- end: z.ZodString;
68
- }, z.core.$strip>;
69
68
  }, z.core.$strip>;
70
69
  type CompanyPreferences = z.infer<typeof CompanyPreferences>;
71
70
  declare const CompanyBillingModel: z.ZodObject<{
@@ -111,10 +110,6 @@ declare const RegisterCompanyForm: z.ZodObject<{
111
110
  slogan: z.ZodString;
112
111
  email: z.ZodEmail;
113
112
  phoneNumber: z.ZodString;
114
- workingHours: z.ZodObject<{
115
- start: z.ZodString;
116
- end: z.ZodString;
117
- }, z.core.$strip>;
118
113
  logo: z.ZodObject<{
119
114
  lastModified: z.ZodNullable<z.ZodNumber>;
120
115
  uid: z.ZodOptional<z.ZodString>;
@@ -232,7 +227,8 @@ declare const StaffDetails: z.ZodObject<{
232
227
  phoneNumber: z.ZodOptional<z.ZodString>;
233
228
  uid: z.ZodString;
234
229
  }, z.core.$strip>>;
235
- partnerMap: z.ZodRecord<z.ZodEmail, z.ZodArray<z.ZodEmail>>;
230
+ partnerMap: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
231
+ blackListedMembers: z.ZodArray<z.ZodString>;
236
232
  }, z.core.$strip>;
237
233
  type StaffDetails = z.infer<typeof StaffDetails>;
238
234
 
package/dist/main.js CHANGED
@@ -38,110 +38,113 @@ import {
38
38
  PhoneNumber,
39
39
  UserModel
40
40
  } from "@wavy/util";
41
+ import * as z4 from "zod";
42
+
43
+ // src/enums/CompanyEnums.ts
41
44
  import * as z3 from "zod";
42
- import { appointmentDistAlgs, companyUserRoles } from "src/enums/CompanyEnums";
43
- var CompanyIdentity = z3.object({
44
- uid: z3.string().readonly(),
45
+ var companyUserRoles = z3.enum([
46
+ "doc",
47
+ "physAsst",
48
+ "rcpst",
49
+ "cshr",
50
+ "fdc",
51
+ "admin"
52
+ ]);
53
+ var companyPartnerRoles = companyUserRoles.extract([
54
+ "doc",
55
+ "physAsst"
56
+ ]);
57
+ var employeeRoles = companyUserRoles.exclude(["admin"]);
58
+ var appointmentDistAlgs = z3.enum(["RR", "LOR"]);
59
+
60
+ // src/schemas/Company.ts
61
+ var CompanyIdentity = z4.object({
62
+ uid: z4.string().readonly(),
45
63
  // The company's uid
46
- // Organizational
47
- displayName: z3.string(),
48
- logo: z3.string().optional(),
49
- slogan: z3.string(),
50
- regNo: z3.string().readonly(),
51
- // The company's registration number
52
- // Social
53
- email: z3.email(),
64
+ displayName: z4.string(),
65
+ logo: z4.string().optional(),
66
+ contact: z4.object({
67
+ email: z4.email(),
68
+ phoneNumber: PhoneNumber.optional()
69
+ }),
54
70
  address: Address,
55
- phoneNumber: PhoneNumber.optional(),
56
- // Legal
57
- trn: z3.string().optional(),
58
- gctRegNo: z3.string().optional(),
71
+ legal: z4.object({
72
+ regNo: z4.string().readonly(),
73
+ // The company's registration number
74
+ trn: z4.string().optional(),
75
+ gctRegNo: z4.string().optional()
76
+ }),
59
77
  ...TimeLog.shape
60
78
  });
61
- var CompanyOpState = z3.object({
79
+ var CompanyOpState = z4.object({
62
80
  // The company's uid
63
81
  uid: CompanyIdentity.shape.uid,
64
- availableBalance: z3.number(),
65
- isOffline: z3.boolean(),
82
+ availableBalance: z4.number(),
83
+ isOffline: z4.boolean(),
66
84
  ...TimeLog.shape
67
85
  });
68
- var CompanyPreferences = z3.object({
86
+ var CompanyPreferences = z4.object({
69
87
  // The company's uid
70
88
  uid: CompanyIdentity.shape.uid,
71
89
  /** The amount of user provisions made for this company */
72
- userProvisions: z3.number(),
90
+ userProvisions: z4.number(),
73
91
  /**
74
92
  * @property RR (Round Robin): Even distribution.
75
93
  * @property LOR (Least Outstanding Requests): Distribute based on availability.
76
94
  */
77
95
  apptDistAlg: appointmentDistAlgs,
78
- // Required to determine:
79
- // [1] when the working directory on the server should reset
80
- // [2] the time that company session requests are cut-off
81
- // (the cutoff time affects non-admins)
82
- workingHours: z3.object({
83
- start: Time,
84
- end: Time
85
- }),
96
+ // // Required to determine:
97
+ // // [1] when the working directory on the server should reset
98
+ // // [2] the time that company session requests are cut-off
99
+ // // (the cutoff time affects non-admins)
100
+ // workingHours: z.object({
101
+ // start: Time,
102
+ // end: Time,
103
+ // }),
86
104
  ...TimeLog.shape
87
105
  });
88
- var CompanyBillingModel = z3.object({
106
+ var CompanyBillingModel = z4.object({
89
107
  uid: CompanyIdentity.shape.uid,
90
108
  /** The user that provides the bill to the client */
91
109
  biller: companyUserRoles.extract(["doc", "fdc"]),
92
110
  primaryCurrency: currencies,
93
- additionalFees: z3.array(PriceAdjustment).optional(),
94
- discounts: z3.array(PriceAdjustment).optional(),
95
- services: z3.array(PriceTag).optional(),
96
- acceptedCurrencies: z3.array(currencies),
111
+ additionalFees: z4.array(PriceAdjustment).optional(),
112
+ discounts: z4.array(PriceAdjustment).optional(),
113
+ services: z4.array(PriceTag).optional(),
114
+ acceptedCurrencies: z4.array(currencies),
97
115
  ...TimeLog.shape
98
116
  });
99
- var RegisterCompanyForm = z3.object({
100
- regNo: z3.string(),
101
- userProvisions: z3.number(),
102
- slogan: z3.string(),
103
- email: z3.email(),
117
+ var RegisterCompanyForm = z4.object({
118
+ regNo: z4.string(),
119
+ userProvisions: z4.number(),
120
+ slogan: z4.string(),
121
+ email: z4.email(),
104
122
  phoneNumber: PhoneNumber,
105
- workingHours: CompanyPreferences.shape.workingHours,
106
123
  logo: FileDetails,
107
124
  receipt: FileDetails,
108
- _claims: z3.string()
125
+ _claims: z4.string()
109
126
  });
110
- var CompanyRegistrationClaims = z3.object({
127
+ var CompanyRegistrationClaims = z4.object({
111
128
  sender: UserModel,
112
129
  pricingRate: PricingRate.shape.companyRegistration,
113
130
  ...TimeLog.shape
114
131
  });
115
- var CompanyUser = z3.object({
132
+ var CompanyUser = z4.object({
116
133
  ...UserModel.shape,
117
- lastActive: z3.number(),
118
- status: z3.enum(["inviteSent", "active", "inactive"]),
119
- roles: z3.array(companyUserRoles),
134
+ lastActive: z4.number(),
135
+ status: z4.enum(["inviteSent", "active", "inactive"]),
136
+ roles: z4.array(companyUserRoles),
120
137
  ...TimeLog.shape
121
138
  });
122
- var StaffDetails = z3.object({
139
+ var StaffDetails = z4.object({
123
140
  uid: CompanyIdentity.shape.uid,
124
- members: z3.array(CompanyUser),
125
- /**doc (one) -> physAsst (many) */
126
- partnerMap: z3.record(z3.email(), z3.array(z3.email()))
141
+ members: z4.array(CompanyUser),
142
+ /**
143
+ * @relationship one -> many
144
+ *@description A map of doctor `uids` to their assistants `uids` */
145
+ partnerMap: z4.record(CompanyUser.shape.uid, z4.array(CompanyUser.shape.uid)),
146
+ blackListedMembers: z4.array(CompanyUser.shape.uid)
127
147
  });
128
-
129
- // src/enums/CompanyEnums.ts
130
- import * as z4 from "zod";
131
- var companyUserRoles2 = z4.enum([
132
- "doc",
133
- "physAsst",
134
- "rcpst",
135
- "cshr",
136
- "fdc",
137
- "admin"
138
- ]);
139
- var companyPartnerRoles = companyUserRoles2.extract([
140
- "doc",
141
- "physAsst"
142
- ]);
143
- var employeeRoles = companyUserRoles2.exclude(["admin"]);
144
- var appointmentDistAlgs2 = z4.enum(["RR", "LOR"]);
145
148
  export {
146
149
  CompanyBillingModel,
147
150
  CompanyIdentity,
@@ -156,8 +159,8 @@ export {
156
159
  StaffDetails,
157
160
  Time,
158
161
  TimeLog,
159
- appointmentDistAlgs2 as appointmentDistAlgs,
162
+ appointmentDistAlgs,
160
163
  companyPartnerRoles,
161
- companyUserRoles2 as companyUserRoles,
164
+ companyUserRoles,
162
165
  employeeRoles
163
166
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizmap/sdk",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "main": "./dist/main.js",
5
5
  "types": "./dist/main.d.ts",
6
6
  "type": "module",