@bizmap/sdk 0.0.44 → 0.0.45

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
@@ -147,7 +147,6 @@ declare const CompanyDetails: z.ZodObject<{
147
147
  lastModified: z.ZodNullable<z.ZodInt>;
148
148
  }, z.core.$strip>>>;
149
149
  preferences: z.ZodObject<{
150
- useCreatedServices: z.ZodBoolean;
151
150
  serviceSelector: z.ZodEnum<{
152
151
  scheduler: "scheduler";
153
152
  doctor: "doctor";
@@ -159,7 +158,6 @@ declare const CompanyDetails: z.ZodObject<{
159
158
  }>>;
160
159
  lastModified: z.ZodNullable<z.ZodInt>;
161
160
  }, z.core.$strip> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
162
- useCreatedServices: z.ZodBoolean;
163
161
  serviceSelector: z.ZodEnum<{
164
162
  scheduler: "scheduler";
165
163
  doctor: "doctor";
@@ -186,12 +184,15 @@ declare const CompanyDetails: z.ZodObject<{
186
184
  fixedAmount: z.ZodNumber;
187
185
  percentage: z.ZodNumber;
188
186
  }, z.core.$strip>>>;
189
- services: z.ZodDefault<z.ZodArray<z.ZodObject<{
190
- createdAt: z.ZodReadonly<z.ZodInt>;
191
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
192
- item: z.ZodString;
193
- cost: z.ZodNumber;
194
- }, z.core.$strip>>>;
187
+ services: z.ZodObject<{
188
+ deploy: z.ZodBoolean;
189
+ value: z.ZodDefault<z.ZodArray<z.ZodObject<{
190
+ createdAt: z.ZodReadonly<z.ZodInt>;
191
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
192
+ item: z.ZodString;
193
+ cost: z.ZodNumber;
194
+ }, z.core.$strip>>>;
195
+ }, z.core.$strip>;
195
196
  lastModified: z.ZodNullable<z.ZodInt>;
196
197
  }, z.core.$strip> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
197
198
  additionalFees: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -208,12 +209,15 @@ declare const CompanyDetails: z.ZodObject<{
208
209
  fixedAmount: z.ZodNumber;
209
210
  percentage: z.ZodNumber;
210
211
  }, z.core.$strip>>>;
211
- services: z.ZodDefault<z.ZodArray<z.ZodObject<{
212
- createdAt: z.ZodReadonly<z.ZodInt>;
213
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
214
- item: z.ZodString;
215
- cost: z.ZodNumber;
216
- }, z.core.$strip>>>;
212
+ services: z.ZodObject<{
213
+ deploy: z.ZodBoolean;
214
+ value: z.ZodDefault<z.ZodArray<z.ZodObject<{
215
+ createdAt: z.ZodReadonly<z.ZodInt>;
216
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
217
+ item: z.ZodString;
218
+ cost: z.ZodNumber;
219
+ }, z.core.$strip>>>;
220
+ }, z.core.$strip>;
217
221
  lastModified: z.ZodNullable<z.ZodInt>;
218
222
  }, z.core.$strip>>>;
219
223
  staff: z.ZodPipe<z.ZodObject<{
@@ -540,7 +544,6 @@ declare const PartialCompanyDetails: z.ZodObject<{
540
544
  lastModified: z.ZodNullable<z.ZodInt>;
541
545
  }, z.core.$strip>>>;
542
546
  preferences: z.ZodObject<{
543
- useCreatedServices: z.ZodBoolean;
544
547
  serviceSelector: z.ZodEnum<{
545
548
  scheduler: "scheduler";
546
549
  doctor: "doctor";
@@ -552,7 +555,6 @@ declare const PartialCompanyDetails: z.ZodObject<{
552
555
  }>>;
553
556
  lastModified: z.ZodNullable<z.ZodInt>;
554
557
  }, z.core.$strip> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
555
- useCreatedServices: z.ZodBoolean;
556
558
  serviceSelector: z.ZodEnum<{
557
559
  scheduler: "scheduler";
558
560
  doctor: "doctor";
@@ -579,12 +581,15 @@ declare const PartialCompanyDetails: z.ZodObject<{
579
581
  fixedAmount: z.ZodNumber;
580
582
  percentage: z.ZodNumber;
581
583
  }, z.core.$strip>>>;
582
- services: z.ZodDefault<z.ZodArray<z.ZodObject<{
583
- createdAt: z.ZodReadonly<z.ZodInt>;
584
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
585
- item: z.ZodString;
586
- cost: z.ZodNumber;
587
- }, z.core.$strip>>>;
584
+ services: z.ZodObject<{
585
+ deploy: z.ZodBoolean;
586
+ value: z.ZodDefault<z.ZodArray<z.ZodObject<{
587
+ createdAt: z.ZodReadonly<z.ZodInt>;
588
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
589
+ item: z.ZodString;
590
+ cost: z.ZodNumber;
591
+ }, z.core.$strip>>>;
592
+ }, z.core.$strip>;
588
593
  lastModified: z.ZodNullable<z.ZodInt>;
589
594
  }, z.core.$strip> | z.ZodOptional<z.ZodNullable<z.ZodObject<{
590
595
  additionalFees: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -601,12 +606,15 @@ declare const PartialCompanyDetails: z.ZodObject<{
601
606
  fixedAmount: z.ZodNumber;
602
607
  percentage: z.ZodNumber;
603
608
  }, z.core.$strip>>>;
604
- services: z.ZodDefault<z.ZodArray<z.ZodObject<{
605
- createdAt: z.ZodReadonly<z.ZodInt>;
606
- lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
607
- item: z.ZodString;
608
- cost: z.ZodNumber;
609
- }, z.core.$strip>>>;
609
+ services: z.ZodObject<{
610
+ deploy: z.ZodBoolean;
611
+ value: z.ZodDefault<z.ZodArray<z.ZodObject<{
612
+ createdAt: z.ZodReadonly<z.ZodInt>;
613
+ lastModified: z.ZodOptional<z.ZodNullable<z.ZodInt>>;
614
+ item: z.ZodString;
615
+ cost: z.ZodNumber;
616
+ }, z.core.$strip>>>;
617
+ }, z.core.$strip>;
610
618
  lastModified: z.ZodNullable<z.ZodInt>;
611
619
  }, z.core.$strip>>>;
612
620
  staff: z.ZodPipe<z.ZodObject<{
package/dist/main.js CHANGED
@@ -159,8 +159,6 @@ var CompanyState = z4.object({
159
159
  lastModified: Timestamp.nullable()
160
160
  });
161
161
  var CompanyPreferences = z4.object({
162
- /** Forces service selectors to use the list of service(s) that you've created. */
163
- useCreatedServices: z4.boolean(),
164
162
  /** The user that's allowed to record the client's services. */
165
163
  serviceSelector: companyServiceSelectors,
166
164
  /** A record of the payments made must be attached before creating the
@@ -169,15 +167,6 @@ var CompanyPreferences = z4.object({
169
167
  * - only allowed when `serviceDecider === "scheduler"`
170
168
  * */
171
169
  enforcePaidAppts: z4.boolean(),
172
- // primaryCurrency: currencies,
173
- // acceptedCurrencies: z.array(currencies).transform((currencies) => {
174
- // const newCurrencies: Currency[] = [];
175
- // for (const currency of currencies) {
176
- // if (newCurrencies.includes(currency)) continue;
177
- // newCurrencies.push(currency);
178
- // }
179
- // return newCurrencies;
180
- // }),
181
170
  /**
182
171
  * @property RR (Round Robin): Even distribution.
183
172
  * @property LOR (Least Outstanding Requests): Distribute based on availability.
@@ -186,39 +175,16 @@ var CompanyPreferences = z4.object({
186
175
  lastModified: Timestamp.nullable()
187
176
  });
188
177
  var Billing = z4.object({
189
- // preferences: z
190
- // .object({
191
- // /** Forces service selectors to use the list of service(s) that you've created. */
192
- // useCreatedServices: z.boolean(),
193
- // /** The user that's allowed to record the client's services. */
194
- // serviceSelector: companyServiceSelectors,
195
- // /** A record of the payments made must be attached before creating the
196
- // * appointment
197
- // * @note
198
- // * - only allowed when `serviceDecider === "scheduler"`
199
- // * */
200
- // enforcePaidAppts: z.boolean(),
201
- // primaryCurrency: currencies,
202
- // acceptedCurrencies: z.array(currencies).transform((currencies) => {
203
- // const newCurrencies: Currency[] = [];
204
- // for (const currency of currencies) {
205
- // if (newCurrencies.includes(currency)) continue;
206
- // newCurrencies.push(currency);
207
- // }
208
- // return newCurrencies;
209
- // }),
210
- // lastModified: Timestamp.nullable(),
211
- // })
212
- // .superRefine((data, ctx) => {
213
- // if (data.enforcePaidAppts && data.serviceSelector !== "scheduler") {
214
- // ctx.addIssue(
215
- // "serviceDecider must be scheduler when enforcePaidAppts is true.",
216
- // );
217
- // }
218
- // }),
219
178
  additionalFees: z4.array(PriceAdjustment).default([]),
220
179
  discounts: z4.array(PriceAdjustment).default([]),
221
- services: z4.array(PriceTag.omit({ uid: true })).max(100).default([]),
180
+ services: z4.object({
181
+ /** Forces service selectors to use the list of service(s) that you've created. */
182
+ deploy: z4.boolean(),
183
+ value: z4.array(PriceTag.omit({ uid: true })).max(100).default([])
184
+ }).refine(
185
+ (data) => !data.deploy || data.deploy && data.value.length > 0,
186
+ "You must create at least (1) service in order to deploy your service list."
187
+ ),
222
188
  lastModified: Timestamp.nullable()
223
189
  });
224
190
  var Staff = z4.object({
@@ -323,12 +289,6 @@ var createCompanyDetails = (options) => {
323
289
  billing: options.partial ? Billing.nullish() : Billing,
324
290
  staff: options.partial ? Staff.nullish() : Staff,
325
291
  createdAt: options.partial ? Timestamp.nullish() : Timestamp
326
- }).superRefine((data, ctx) => {
327
- if (data.billing && data.preferences && data.preferences?.useCreatedServices && (data.billing?.services.length || 0) < 1) {
328
- ctx.addIssue(
329
- "You must create At least (1) service in order to select the useCreatedServices option."
330
- );
331
- }
332
292
  });
333
293
  };
334
294
  var CompanyDetails = createCompanyDetails({ partial: false });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bizmap/sdk",
3
- "version": "0.0.44",
3
+ "version": "0.0.45",
4
4
  "main": "./dist/main.js",
5
5
  "types": "./dist/main.d.ts",
6
6
  "type": "module",