@bizmap/sdk 0.0.102 → 0.0.103

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
@@ -1085,9 +1085,9 @@ declare const ClientForm: z.ZodObject<{
1085
1085
  type ClientForm = z.infer<typeof ClientForm>;
1086
1086
 
1087
1087
  declare const AppointmentSeverity: z.ZodObject<{
1088
- 1: z.ZodLiteral<"Emergency">;
1089
- 2: z.ZodLiteral<"Important">;
1090
- 3: z.ZodLiteral<"Average">;
1088
+ "1": z.ZodLiteral<"Emergency">;
1089
+ "2": z.ZodLiteral<"Important">;
1090
+ "3": z.ZodLiteral<"Average">;
1091
1091
  }, z.core.$strip>;
1092
1092
  type AppointmentSeverity = z.infer<typeof AppointmentSeverity>;
1093
1093
  declare const MiniAppointmentDetails: z.ZodObject<{
@@ -1097,11 +1097,11 @@ declare const MiniAppointmentDetails: z.ZodObject<{
1097
1097
  severity: z.ZodString;
1098
1098
  src: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1099
1099
  tkt: z.ZodReadonly<z.ZodInt>;
1100
- reason: z.ZodOptional<z.ZodObject<{
1100
+ reason: z.ZodObject<{
1101
1101
  createdAt: z.ZodReadonly<z.ZodISODateTime>;
1102
1102
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
1103
1103
  value: z.ZodString;
1104
- }, z.core.$strip>>;
1104
+ }, z.core.$strip>;
1105
1105
  invoiceNo: z.ZodOptional<z.ZodString>;
1106
1106
  charges: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodUUID, z.ZodObject<{
1107
1107
  createdAt: z.ZodReadonly<z.ZodISODateTime>;
@@ -1309,11 +1309,11 @@ declare const AppointmentDetails: z.ZodObject<{
1309
1309
  src: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1310
1310
  tkt: z.ZodReadonly<z.ZodInt>;
1311
1311
  severity: z.ZodString;
1312
- reason: z.ZodOptional<z.ZodObject<{
1312
+ reason: z.ZodObject<{
1313
1313
  createdAt: z.ZodReadonly<z.ZodISODateTime>;
1314
1314
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
1315
1315
  value: z.ZodString;
1316
- }, z.core.$strip>>;
1316
+ }, z.core.$strip>;
1317
1317
  invoiceNo: z.ZodOptional<z.ZodString>;
1318
1318
  charges: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodUUID, z.ZodObject<{
1319
1319
  createdAt: z.ZodReadonly<z.ZodISODateTime>;
@@ -1488,11 +1488,11 @@ declare const MutableAppointmentDetails: z.ZodObject<{
1488
1488
  src: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
1489
1489
  tkt: z.ZodReadonly<z.ZodInt>;
1490
1490
  severity: z.ZodString;
1491
- reason: z.ZodOptional<z.ZodObject<{
1491
+ reason: z.ZodObject<{
1492
1492
  createdAt: z.ZodReadonly<z.ZodISODateTime>;
1493
1493
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
1494
1494
  value: z.ZodString;
1495
- }, z.core.$strip>>;
1495
+ }, z.core.$strip>;
1496
1496
  invoiceNo: z.ZodOptional<z.ZodString>;
1497
1497
  charges: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodUUID, z.ZodObject<{
1498
1498
  createdAt: z.ZodReadonly<z.ZodISODateTime>;
@@ -1596,11 +1596,11 @@ declare const ScheduleAppointmentForm: z.ZodObject<{
1596
1596
  clientId: z.ZodUUID;
1597
1597
  serviceProviderId: z.ZodUnion<[z.ZodUUID, z.ZodLiteral<"next">]>;
1598
1598
  category: z.ZodString;
1599
- appointmentReason: z.ZodOptional<z.ZodObject<{
1599
+ appointmentReason: z.ZodObject<{
1600
1600
  createdAt: z.ZodReadonly<z.ZodISODateTime>;
1601
1601
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
1602
1602
  value: z.ZodString;
1603
- }, z.core.$strip>>;
1603
+ }, z.core.$strip>;
1604
1604
  charges: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodUUID, z.ZodObject<{
1605
1605
  createdAt: z.ZodReadonly<z.ZodISODateTime>;
1606
1606
  lastModified: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
@@ -1721,6 +1721,11 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
1721
1721
  src: string;
1722
1722
  tkt: number;
1723
1723
  severity: string;
1724
+ reason: {
1725
+ createdAt: string;
1726
+ value: string;
1727
+ lastModified?: string | null | undefined;
1728
+ };
1724
1729
  timeline: {
1725
1730
  scheduler: {
1726
1731
  userUid: string;
@@ -1837,11 +1842,6 @@ declare function scheduleAppointment(request: RequestParameter): Promise<{
1837
1842
  lastModified?: string | null | undefined;
1838
1843
  }[] | undefined;
1839
1844
  } | null | undefined;
1840
- reason?: {
1841
- createdAt: string;
1842
- value: string;
1843
- lastModified?: string | null | undefined;
1844
- } | undefined;
1845
1845
  invoiceNo?: string | undefined;
1846
1846
  charges?: Record<string, {
1847
1847
  createdAt: string;
package/dist/main.js CHANGED
@@ -810,9 +810,9 @@ var TimelineActivity = z21.object({
810
810
  userUid: CompanyUser.shape._id.nonoptional()
811
811
  });
812
812
  var AppointmentSeverity = z21.object({
813
- 1: z21.literal("Emergency"),
814
- 2: z21.literal("Important"),
815
- 3: z21.literal("Average")
813
+ "1": z21.literal("Emergency"),
814
+ "2": z21.literal("Important"),
815
+ "3": z21.literal("Average")
816
816
  });
817
817
  var MiniAppointmentDetails = z21.object({
818
818
  /** A random uid that identifies the document. */
@@ -827,7 +827,7 @@ var MiniAppointmentDetails = z21.object({
827
827
  reason: z21.object({
828
828
  value: Reason.shape.value,
829
829
  ...TimeLog.shape
830
- }).optional(),
830
+ }),
831
831
  /**
832
832
  * This gets resolved after the service provider attaches an invoice and posts the client
833
833
  * (resolving after posting the client is required for consistency - if it's added when the
@@ -1059,6 +1059,7 @@ async function scheduleAppointment(request) {
1059
1059
  src: stateCopy._id,
1060
1060
  tkt: request.state.tktNoCounter,
1061
1061
  severity: request.form.category,
1062
+ reason: request.form.appointmentReason,
1062
1063
  discounts: Object.fromEntries(
1063
1064
  Object.entries(request.billing.discounts || {}).filter(
1064
1065
  ([_, disc]) => !disc.isOptional
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizmap/sdk",
3
- "version": "0.0.102",
3
+ "version": "0.0.103",
4
4
  "main": "./dist/main.js",
5
5
  "types": "./dist/main.d.ts",
6
6
  "type": "module",