@bizmap/sdk 0.0.42 → 0.0.43

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
@@ -798,12 +798,16 @@ declare const PartialCompanyDetails: z.ZodObject<{
798
798
  }, z.core.$strip>;
799
799
  type PartialCompanyDetails = z.infer<typeof PartialCompanyDetails>;
800
800
 
801
- declare const Tier: z.ZodObject<{
802
- name: z.ZodLiteral<"free" | "pro" | "premium" | "gold">;
801
+ declare const TierList: z.ZodRecord<z.ZodEnum<{
802
+ free: "free";
803
+ pro: "pro";
804
+ premium: "premium";
805
+ gold: "gold";
806
+ }>, z.ZodObject<{
803
807
  cost: z.ZodNumber;
804
808
  perks: z.ZodArray<z.ZodString>;
805
- }, z.core.$strip>;
806
- type Tier = z.infer<typeof Tier>;
809
+ }, z.core.$strip>>;
810
+ type TierList = z.infer<typeof TierList>;
807
811
  declare const Notification: z.ZodObject<{
808
812
  code: z.ZodLiteral<"COMPANY_INVITE" | "INVITE_RESPONSE" | "DEV_MESSAGE">;
809
813
  payload: z.ZodString;
@@ -892,4 +896,4 @@ declare const findConflictingPartners: (...partners: CompanyUser[]) => {
892
896
  /**@returns the roles that are compatible with the selected role. */
893
897
  declare const getCompatibleRoles: (role: CompanyUserRole) => CompanyUserRole[];
894
898
 
895
- export { type AppointmentDistAlg, CompanyDetails, type CompanyPartnerRole, type CompanyServiceSelector, CompanyUser, type CompanyUserRole, type EmployeeRole, type HealthcareProviderRole, InviteResponse, InvoiceNo, Jwt, Notification, PartialCompanyDetails, PriceAdjustment, PriceTag, PricingRate, StandardTime, Tier, TimeLog, Timestamp, UuidV4, UuidV7, appointmentDistAlgs, companyPartnerRoles, companyServiceSelectors, companyUserRoles, employeeRoles, findConflictingPartners, getCompatibleRoles, healthcareProviderRoles };
899
+ export { type AppointmentDistAlg, CompanyDetails, type CompanyPartnerRole, type CompanyServiceSelector, CompanyUser, type CompanyUserRole, type EmployeeRole, type HealthcareProviderRole, InviteResponse, InvoiceNo, Jwt, Notification, PartialCompanyDetails, PriceAdjustment, PriceTag, PricingRate, StandardTime, TierList, TimeLog, Timestamp, UuidV4, UuidV7, appointmentDistAlgs, companyPartnerRoles, companyServiceSelectors, companyUserRoles, employeeRoles, findConflictingPartners, getCompatibleRoles, healthcareProviderRoles };
package/dist/main.js CHANGED
@@ -317,10 +317,16 @@ var PartialCompanyDetails = createCompanyDetails({ partial: true });
317
317
 
318
318
  // src/schemas/Global.ts
319
319
  import * as z5 from "zod";
320
- var Tier = z5.object({
321
- name: z5.literal(["free", "pro", "premium", "gold"]),
322
- cost: z5.number().min(0),
323
- perks: z5.array(z5.string()).min(1)
320
+ var TierList = z5.record(
321
+ z5.enum(["free", "pro", "premium", "gold"]),
322
+ z5.object({
323
+ cost: z5.number().min(0),
324
+ perks: z5.array(z5.string()).min(1)
325
+ })
326
+ ).superRefine((data, ctx) => {
327
+ if (data.free.cost !== 0) {
328
+ ctx.addIssue("The free tier must always cost $0.00");
329
+ }
324
330
  });
325
331
  var Notification = z5.object({
326
332
  code: z5.literal(["COMPANY_INVITE", "INVITE_RESPONSE", "DEV_MESSAGE"]),
@@ -336,7 +342,7 @@ var Notification = z5.object({
336
342
  switch (data.code) {
337
343
  case "COMPANY_INVITE":
338
344
  if (!Jwt.safeParse(data.payload).success) {
339
- ctx.addIssue("A company invite's payload must be a valid jwt.");
345
+ ctx.addIssue("The payload of company invite must be a valid jwt.");
340
346
  }
341
347
  break;
342
348
  case "DEV_MESSAGE":
@@ -398,7 +404,7 @@ export {
398
404
  PriceTag,
399
405
  PricingRate,
400
406
  StandardTime,
401
- Tier,
407
+ TierList,
402
408
  TimeLog,
403
409
  Timestamp,
404
410
  UuidV4,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizmap/sdk",
3
- "version": "0.0.42",
3
+ "version": "0.0.43",
4
4
  "main": "./dist/main.js",
5
5
  "types": "./dist/main.d.ts",
6
6
  "type": "module",