@bizmap/sdk 0.0.129 → 0.0.131

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
@@ -115,7 +115,7 @@ declare const CompanyDetails: z.ZodObject<{
115
115
  tktNo: z.ZodInt;
116
116
  }, z.core.$strip>;
117
117
  }, z.core.$strip>;
118
- preferences: z.ZodObject<{
118
+ preference: z.ZodObject<{
119
119
  createdAt: z.ZodReadonly<z.ZodISODateTime>;
120
120
  lastModified: z.ZodOptional<z.ZodISODateTime>;
121
121
  serviceSelector: z.ZodEnum<{
@@ -220,6 +220,161 @@ declare const CompanyDetails: z.ZodObject<{
220
220
  }, z.core.$strip>;
221
221
  }, z.core.$strip>;
222
222
  type CompanyDetails = z.infer<typeof CompanyDetails>;
223
+ declare const _CompanyDetails: z.ZodObject<{
224
+ identity: z.ZodObject<{
225
+ createdAt: z.ZodReadonly<z.ZodISODateTime>;
226
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
227
+ _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
228
+ alias: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
229
+ address: z.ZodObject<{
230
+ streetAddress: z.ZodString;
231
+ city: z.ZodOptional<z.ZodString>;
232
+ parish: z.ZodString;
233
+ country: z.ZodString;
234
+ }, z.core.$strip>;
235
+ logo: z.ZodOptional<z.ZodString>;
236
+ industry: z.ZodEnum<{
237
+ healthcare: "healthcare";
238
+ }>;
239
+ sector: z.ZodString;
240
+ email: z.ZodEmail;
241
+ phoneNumber: z.ZodOptional<z.ZodString>;
242
+ emailVerified: z.ZodBoolean;
243
+ verified: z.ZodBoolean;
244
+ legal: z.ZodOptional<z.ZodObject<{
245
+ regNo: z.ZodReadonly<z.ZodString>;
246
+ trn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
247
+ gctRegNo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
248
+ }, z.core.$strip>>;
249
+ }, z.core.$strip>;
250
+ state: z.ZodObject<{
251
+ createdAt: z.ZodReadonly<z.ZodISODateTime>;
252
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
253
+ _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
254
+ credits: z.ZodObject<{
255
+ current: z.ZodNumber;
256
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
257
+ }, z.core.$strip>;
258
+ usedStorageInBytes: z.ZodObject<{
259
+ current: z.ZodNumber;
260
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
261
+ }, z.core.$strip>;
262
+ tierId: z.ZodObject<{
263
+ current: z.ZodString;
264
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
265
+ }, z.core.$strip>;
266
+ count: z.ZodObject<{
267
+ invoiceNo: z.ZodInt;
268
+ tktNo: z.ZodInt;
269
+ }, z.core.$strip>;
270
+ }, z.core.$strip>;
271
+ preference: z.ZodObject<{
272
+ createdAt: z.ZodReadonly<z.ZodISODateTime>;
273
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
274
+ _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
275
+ serviceSelector: z.ZodEnum<{
276
+ scheduler: "scheduler";
277
+ doctor: "doctor";
278
+ }>;
279
+ pps: z.ZodBoolean;
280
+ serviceDistAlg: z.ZodEnum<{
281
+ RR: "RR";
282
+ LOR: "LOR";
283
+ }>;
284
+ servicesDeployed: z.ZodBoolean;
285
+ }, z.core.$strip>;
286
+ billing: z.ZodObject<{
287
+ createdAt: z.ZodReadonly<z.ZodISODateTime>;
288
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
289
+ _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
290
+ additionalFees: z.ZodOptional<z.ZodRecord<z.ZodUUID, z.ZodObject<{
291
+ createdAt: z.ZodReadonly<z.ZodISODateTime>;
292
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
293
+ description: z.ZodString;
294
+ fixedAmount: z.ZodObject<{
295
+ value: z.ZodNumber;
296
+ currency: z.ZodEnum<{
297
+ JMD: "JMD";
298
+ }>;
299
+ }, z.core.$strip>;
300
+ percentage: z.ZodNumber;
301
+ isOptional: z.ZodBoolean;
302
+ }, z.core.$strip>>>;
303
+ discounts: z.ZodOptional<z.ZodRecord<z.ZodUUID, z.ZodObject<{
304
+ createdAt: z.ZodReadonly<z.ZodISODateTime>;
305
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
306
+ description: z.ZodString;
307
+ fixedAmount: z.ZodObject<{
308
+ value: z.ZodNumber;
309
+ currency: z.ZodEnum<{
310
+ JMD: "JMD";
311
+ }>;
312
+ }, z.core.$strip>;
313
+ percentage: z.ZodNumber;
314
+ isOptional: z.ZodBoolean;
315
+ }, z.core.$strip>>>;
316
+ prepayments: z.ZodOptional<z.ZodRecord<z.ZodUUID, z.ZodObject<{
317
+ createdAt: z.ZodReadonly<z.ZodISODateTime>;
318
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
319
+ description: z.ZodString;
320
+ fixedAmount: z.ZodObject<{
321
+ value: z.ZodNumber;
322
+ currency: z.ZodEnum<{
323
+ JMD: "JMD";
324
+ }>;
325
+ }, z.core.$strip>;
326
+ percentage: z.ZodNumber;
327
+ isOptional: z.ZodBoolean;
328
+ }, z.core.$strip>>>;
329
+ offeredServices: z.ZodOptional<z.ZodRecord<z.ZodUUID, z.ZodObject<{
330
+ createdAt: z.ZodReadonly<z.ZodISODateTime>;
331
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
332
+ currency: z.ZodEnum<{
333
+ JMD: "JMD";
334
+ }>;
335
+ item: z.ZodString;
336
+ cost: z.ZodNumber;
337
+ }, z.core.$strip>>>;
338
+ }, z.core.$strip>;
339
+ staff: z.ZodObject<{
340
+ createdAt: z.ZodReadonly<z.ZodISODateTime>;
341
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
342
+ _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
343
+ members: z.ZodRecord<z.ZodUUID, z.ZodObject<{
344
+ invitedAt: z.ZodOptional<z.ZodISODateTime>;
345
+ joinedAt: z.ZodISODateTime;
346
+ lastActive: z.ZodISODateTime;
347
+ roles: z.ZodPipe<z.ZodArray<z.ZodEnum<{
348
+ doc: "doc";
349
+ physAsst: "physAsst";
350
+ rcpst: "rcpst";
351
+ cshr: "cshr";
352
+ "a/r": "a/r";
353
+ ceo: "ceo";
354
+ }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "ceo")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "ceo")[]>>;
355
+ serviceCounter: z.ZodOptional<z.ZodRecord<z.ZodLiteral<"undone" | "done">, z.ZodInt>>;
356
+ }, z.core.$strip>>;
357
+ partnerMap: z.ZodOptional<z.ZodRecord<z.ZodUUID, z.ZodRecord<z.ZodUUID, z.ZodObject<{
358
+ addedAt: z.ZodISODateTime;
359
+ }, z.core.$strip>>>>;
360
+ updateQueue: z.ZodOptional<z.ZodRecord<z.ZodUUID, z.ZodObject<{
361
+ $REMOVE: z.ZodOptional<z.ZodObject<{
362
+ addedAt: z.ZodISODateTime;
363
+ }, z.core.$strip>>;
364
+ $CHANGE_ROLES: z.ZodOptional<z.ZodObject<{
365
+ newRoles: z.ZodPipe<z.ZodArray<z.ZodEnum<{
366
+ doc: "doc";
367
+ physAsst: "physAsst";
368
+ rcpst: "rcpst";
369
+ cshr: "cshr";
370
+ "a/r": "a/r";
371
+ ceo: "ceo";
372
+ }>>, z.ZodTransform<("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "ceo")[], ("doc" | "physAsst" | "rcpst" | "cshr" | "a/r" | "ceo")[]>>;
373
+ addedAt: z.ZodISODateTime;
374
+ }, z.core.$strip>>;
375
+ }, z.core.$strip>>>;
376
+ }, z.core.$strip>;
377
+ }, z.core.$strip>;
223
378
  declare const MutableCompanyDetails: z.ZodObject<{
224
379
  _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
225
380
  identity: z.ZodOptional<z.ZodObject<{
@@ -484,7 +639,7 @@ declare const CompanyNotifications: z.ZodArray<z.ZodObject<{
484
639
  }, z.core.$strip>>;
485
640
  type CompanyNotifications = z.infer<typeof CompanyNotifications>;
486
641
 
487
- declare const CompanyPreferences: z.ZodObject<{
642
+ declare const CompanyPreference: z.ZodObject<{
488
643
  createdAt: z.ZodReadonly<z.ZodISODateTime>;
489
644
  lastModified: z.ZodOptional<z.ZodISODateTime>;
490
645
  _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
@@ -499,7 +654,7 @@ declare const CompanyPreferences: z.ZodObject<{
499
654
  }>;
500
655
  servicesDeployed: z.ZodBoolean;
501
656
  }, z.core.$strip>;
502
- type CompanyPreferences = z.infer<typeof CompanyPreferences>;
657
+ type CompanyPreference = z.infer<typeof CompanyPreference>;
503
658
  declare const MutableCompanyPreferences: z.ZodObject<{
504
659
  createdAt: z.ZodReadonly<z.ZodISODateTime>;
505
660
  serviceSelector: z.ZodEnum<{
@@ -1218,4 +1373,4 @@ declare function createNotifId(options?: {
1218
1373
  to: string;
1219
1374
  }): string;
1220
1375
 
1221
- export { type AcceptedCurrency, AlphaNumeric, COMPANY_USER_RELATIONSHIP, ClientDetails, ClientForm, CompanyBilling, CompanyDetails, CompanyIdentity, CompanyIndustry, CompanyMemberRoles, CompanyNotifications, CompanyPreferences, type CompanyServiceSelector, CompanySession, CompanyStaff, CompanyState, type CompanyUserRole, CreateCompanyForm, CreditCurrency, type EmployeeRole, type Gender, type HealthcareProviderRole, InviteResponse, InvoiceNo, MAX_COMPANY_PRICE_MODS, MedicalDetails, Medicine, MutableCompanyBilling, MutableCompanyDetails, MutableCompanyIdentity, MutableCompanyPreferences, MutableCompanyStaff, MutableServiceDetails, Notification, PaymentDetails, type PaymentMethod, PriceMod, PriceModList, PriceTag, Reason, Receipts, ServiceDetails, type ServiceDistAlg, ServiceSeverity, StandardTime, TicketNo, type Tier, TierList, TimeLog, Timestamp, Trn, UserDetails, Vitals, acceptedCurrencies, adminRoles, calcBalance, calcPriceMod, companyServiceSelectors, companyUserRoles, createNotifId, employeeRoles, genders, getCompatibleRoles, getIncompatibleRoles, healthcareProviderRoles, normalizeCompanyId, normalizeNidKey, parseClientName, paymentMethods, safeParseSector, serviceDistAlgs, tiers, vitalKeys };
1376
+ export { type AcceptedCurrency, AlphaNumeric, COMPANY_USER_RELATIONSHIP, ClientDetails, ClientForm, CompanyBilling, CompanyDetails, CompanyIdentity, CompanyIndustry, CompanyMemberRoles, CompanyNotifications, CompanyPreference, type CompanyServiceSelector, CompanySession, CompanyStaff, CompanyState, type CompanyUserRole, CreateCompanyForm, CreditCurrency, type EmployeeRole, type Gender, type HealthcareProviderRole, InviteResponse, InvoiceNo, MAX_COMPANY_PRICE_MODS, MedicalDetails, Medicine, MutableCompanyBilling, MutableCompanyDetails, MutableCompanyIdentity, MutableCompanyPreferences, MutableCompanyStaff, MutableServiceDetails, Notification, PaymentDetails, type PaymentMethod, PriceMod, PriceModList, PriceTag, Reason, Receipts, ServiceDetails, type ServiceDistAlg, ServiceSeverity, StandardTime, TicketNo, type Tier, TierList, TimeLog, Timestamp, Trn, UserDetails, Vitals, _CompanyDetails, acceptedCurrencies, adminRoles, calcBalance, calcPriceMod, companyServiceSelectors, companyUserRoles, createNotifId, employeeRoles, genders, getCompatibleRoles, getIncompatibleRoles, healthcareProviderRoles, normalizeCompanyId, normalizeNidKey, parseClientName, paymentMethods, safeParseSector, serviceDistAlgs, tiers, vitalKeys };
package/dist/main.js CHANGED
@@ -252,7 +252,7 @@ var MutableCompanyIdentity = CompanyIdentity.pick({
252
252
 
253
253
  // src/schemas/company/components/Preferences.ts
254
254
  import * as z10 from "zod";
255
- var CompanyPreferences = z10.object({
255
+ var CompanyPreference = z10.object({
256
256
  _id: CompanyState.shape._id,
257
257
  /** The user that's allowed to record the client's services. */
258
258
  serviceSelector: companyServiceSelectors,
@@ -269,7 +269,7 @@ var CompanyPreferences = z10.object({
269
269
  (data) => !data.pps || data.pps && data.serviceSelector === "scheduler",
270
270
  `Pay per service is only allowed when the service selector is the "${"scheduler"}".`
271
271
  );
272
- var MutableCompanyPreferences = CompanyPreferences.omit({
272
+ var MutableCompanyPreferences = CompanyPreference.omit({
273
273
  _id: true,
274
274
  lastModified: true
275
275
  });
@@ -477,10 +477,17 @@ var CompanyDetails = z14.object({
477
477
  // notifications: CompanyNotifications,
478
478
  // receipts: Receipts,
479
479
  state: CompanyState.omit({ _id: true }),
480
- preferences: CompanyPreferences.omit({ _id: true }),
480
+ preference: CompanyPreference.omit({ _id: true }),
481
481
  billing: CompanyBilling.omit({ _id: true }),
482
482
  staff: CompanyStaff.omit({ _id: true })
483
483
  });
484
+ var _CompanyDetails = z14.object({
485
+ identity: CompanyIdentity,
486
+ state: CompanyState,
487
+ preference: CompanyPreference,
488
+ billing: CompanyBilling,
489
+ staff: CompanyStaff
490
+ });
484
491
  var MutableCompanyDetails = z14.object({
485
492
  _id: CompanyDetails.shape._id,
486
493
  identity: MutableCompanyIdentity.partial().optional(),
@@ -848,7 +855,7 @@ export {
848
855
  CompanyIndustry,
849
856
  CompanyMemberRoles,
850
857
  CompanyNotifications,
851
- CompanyPreferences,
858
+ CompanyPreference,
852
859
  CompanySession,
853
860
  CompanyStaff,
854
861
  CompanyState,
@@ -882,6 +889,7 @@ export {
882
889
  Trn,
883
890
  UserDetails,
884
891
  Vitals,
892
+ _CompanyDetails,
885
893
  acceptedCurrencies,
886
894
  adminRoles,
887
895
  calcBalance,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizmap/sdk",
3
- "version": "0.0.129",
3
+ "version": "0.0.131",
4
4
  "main": "./dist/main.js",
5
5
  "types": "./dist/main.d.ts",
6
6
  "type": "module",