@bizmap/sdk 0.0.123 → 0.0.124

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
@@ -908,13 +908,13 @@ declare const ClientForm: z.ZodObject<{
908
908
  }, z.core.$strip>;
909
909
  type ClientForm = z.infer<typeof ClientForm>;
910
910
 
911
- declare const TaskSeverity: z.ZodObject<{
911
+ declare const ServiceSeverity: z.ZodObject<{
912
912
  "1": z.ZodLiteral<"Emergency">;
913
913
  "2": z.ZodLiteral<"Important">;
914
914
  "3": z.ZodLiteral<"Average">;
915
915
  }, z.core.$strip>;
916
- type TaskSeverity = z.infer<typeof TaskSeverity>;
917
- declare const TaskDetails: z.ZodObject<{
916
+ type ServiceSeverity = z.infer<typeof ServiceSeverity>;
917
+ declare const ServiceDetails: z.ZodObject<{
918
918
  createdAt: z.ZodReadonly<z.ZodISODateTime>;
919
919
  lastModified: z.ZodOptional<z.ZodISODateTime>;
920
920
  _id: z.ZodUUID;
@@ -1049,8 +1049,8 @@ declare const TaskDetails: z.ZodObject<{
1049
1049
  changes: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
1050
1050
  }, z.core.$strip>>>;
1051
1051
  }, z.core.$strip>;
1052
- type TaskDetails = z.infer<typeof TaskDetails>;
1053
- declare const MutableTaskDetails: z.ZodObject<{
1052
+ type ServiceDetails = z.infer<typeof ServiceDetails>;
1053
+ declare const MutableServiceDetails: z.ZodObject<{
1054
1054
  createdAt: z.ZodReadonly<z.ZodISODateTime>;
1055
1055
  lastModified: z.ZodOptional<z.ZodISODateTime>;
1056
1056
  _id: z.ZodUUID;
@@ -1186,10 +1186,10 @@ declare const MutableTaskDetails: z.ZodObject<{
1186
1186
  }, z.core.$strip>>>;
1187
1187
  _hash: z.ZodString;
1188
1188
  }, z.core.$strip>;
1189
- type MutableTaskDetails = z.infer<typeof MutableTaskDetails>;
1189
+ type MutableServiceDetails = z.infer<typeof MutableServiceDetails>;
1190
1190
 
1191
1191
  /** @disclaimer This doesn't handle currency conversion */
1192
- declare function calcBalance(components: Prettify<Partial<Pick<TaskDetails, "charges" | "discounts" | "additionalFees" | "prepayments" | "payments">>>, options?: {
1192
+ declare function calcBalance(components: Prettify<Partial<Pick<ServiceDetails, "charges" | "discounts" | "additionalFees" | "prepayments" | "payments">>>, options?: {
1193
1193
  logger?: boolean;
1194
1194
  }): number;
1195
1195
  declare const calcPriceMod: (mods: PriceModList | null | undefined, subtotal: number) => number;
@@ -1209,4 +1209,4 @@ declare function createNotifId(options?: {
1209
1209
  to: string;
1210
1210
  }): string;
1211
1211
 
1212
- export { type AcceptedCurrency, AlphaNumeric, COMPANY_USER_RELATIONSHIP, ClientDetails, ClientForm, CompanyBilling, CompanyDetails, CompanyIdentity, CompanyIndustry, 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, MutableTaskDetails, Notification, PaymentDetails, type PaymentMethod, PriceMod, PriceModList, PriceTag, Reason, Receipts, StandardTime, TaskDetails, type TaskDistAlg, TaskSeverity, 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, taskDistAlgs, tiers, vitalKeys };
1212
+ export { type AcceptedCurrency, AlphaNumeric, COMPANY_USER_RELATIONSHIP, ClientDetails, ClientForm, CompanyBilling, CompanyDetails, CompanyIdentity, CompanyIndustry, 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, ServiceSeverity, StandardTime, type TaskDistAlg, 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, taskDistAlgs, tiers, vitalKeys };
package/dist/main.js CHANGED
@@ -186,7 +186,7 @@ var MutableCompanyBilling = CompanyBilling.omit({
186
186
  import * as z9 from "zod";
187
187
  import { Address, PhoneNumber } from "@wavy/util";
188
188
 
189
- // src/schemas/company/utils/CompanyIndustry.ts
189
+ // src/schemas/company/core/CompanyIndustry.ts
190
190
  import * as z8 from "zod";
191
191
  var CompanyIndustry = z8.object({
192
192
  healthcare: z8.object({
@@ -198,7 +198,7 @@ var CompanyIndustry = z8.object({
198
198
  })
199
199
  });
200
200
 
201
- // src/schemas/company/utils/utils.ts
201
+ // src/schemas/company/core/utils.ts
202
202
  var getInvalidSectorError = (industry, sector) => `Invalid sector: "${sector}" isn't a sector under the "${industry}" industry.`;
203
203
  var COMPANY_USER_RELATIONSHIP = {
204
204
  doc: ["physAsst"],
@@ -409,7 +409,7 @@ var parseClientName = ({
409
409
  lastName
410
410
  }) => [firstName, middleName[0] + ".", lastName].join(" ");
411
411
 
412
- // src/schemas/company/utils/CompanySession.ts
412
+ // src/schemas/company/core/CompanySession.ts
413
413
  import * as z13 from "zod";
414
414
  var CompanySession = z13.object({
415
415
  _id: z13.uuidv4(),
@@ -626,7 +626,7 @@ var CompanyNotifications = z17.array(Notification).refine(
626
626
  "A company can't receive a company invite."
627
627
  );
628
628
 
629
- // src/schemas/company/utils/CreateCompanyForm.ts
629
+ // src/schemas/company/core/CreateCompanyForm.ts
630
630
  import * as z18 from "zod";
631
631
  var CreateCompanyForm = z18.object({
632
632
  alias: CompanyIdentity.shape.alias.optional(),
@@ -645,7 +645,7 @@ var CreateCompanyForm = z18.object({
645
645
  }
646
646
  });
647
647
 
648
- // src/schemas/task/components/Medical.ts
648
+ // src/schemas/company/core/service/components/Medical.ts
649
649
  import * as z19 from "zod";
650
650
  var Vitals = z19.record(
651
651
  vitalKeys,
@@ -680,20 +680,20 @@ var MedicalDetails = z19.object({
680
680
  ).optional()
681
681
  });
682
682
 
683
- // src/schemas/task/Task.ts
683
+ // src/schemas/company/core/service/ServiceDetails.ts
684
684
  import * as z20 from "zod";
685
- var TaskSeverity = z20.object({
685
+ var ServiceSeverity = z20.object({
686
686
  "1": z20.literal("Emergency"),
687
687
  "2": z20.literal("Important"),
688
688
  "3": z20.literal("Average")
689
689
  });
690
- var TaskDetails = z20.object({
690
+ var ServiceDetails = z20.object({
691
691
  /** A random uid that identifies the document. */
692
692
  _id: z20.uuidv4(),
693
693
  /** The amount of credits used to create the appointment */
694
694
  _cost: z20.number().readonly(),
695
695
  // This helps to identify the urgency of the appointment
696
- severity: z20.string().refine((data) => TaskSeverity.keyof().safeParse(data).success),
696
+ severity: z20.string().refine((data) => ServiceSeverity.keyof().safeParse(data).success),
697
697
  /** The company's uid */
698
698
  src: CompanyState.shape._id,
699
699
  /** The ticket number */
@@ -778,7 +778,7 @@ var TaskDetails = z20.object({
778
778
  // } satisfies Record<z.infer<typeof serviceProviders>, any>),
779
779
  ...TimeLog.shape
780
780
  });
781
- var MutableTaskDetails = TaskDetails.safeExtend(
781
+ var MutableServiceDetails = ServiceDetails.safeExtend(
782
782
  z20.object({
783
783
  /**
784
784
  * @description An encrypted copy of the last state of the appointment.
@@ -856,7 +856,7 @@ export {
856
856
  MutableCompanyIdentity,
857
857
  MutableCompanyPreferences,
858
858
  MutableCompanyStaff,
859
- MutableTaskDetails,
859
+ MutableServiceDetails,
860
860
  Notification,
861
861
  PaymentDetails,
862
862
  PriceMod,
@@ -864,9 +864,9 @@ export {
864
864
  PriceTag,
865
865
  Reason,
866
866
  Receipts,
867
+ ServiceDetails,
868
+ ServiceSeverity,
867
869
  StandardTime,
868
- TaskDetails,
869
- TaskSeverity,
870
870
  TicketNo,
871
871
  TierList,
872
872
  TimeLog,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizmap/sdk",
3
- "version": "0.0.123",
3
+ "version": "0.0.124",
4
4
  "main": "./dist/main.js",
5
5
  "types": "./dist/main.d.ts",
6
6
  "type": "module",