@jsdev_ninja/core 0.19.0 → 0.21.0

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.
@@ -29,6 +29,26 @@ export declare const BillingAccountSchema: z.ZodObject<{
29
29
  restricted?: boolean | undefined;
30
30
  allowedCategories?: string[] | undefined;
31
31
  }>;
32
+ export declare const BranchSchema: z.ZodObject<{
33
+ id: z.ZodString;
34
+ label: z.ZodString;
35
+ address: z.ZodOptional<z.ZodString>;
36
+ phone: z.ZodOptional<z.ZodString>;
37
+ isPrimary: z.ZodOptional<z.ZodBoolean>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ id: string;
40
+ label: string;
41
+ address?: string | undefined;
42
+ phone?: string | undefined;
43
+ isPrimary?: boolean | undefined;
44
+ }, {
45
+ id: string;
46
+ label: string;
47
+ address?: string | undefined;
48
+ phone?: string | undefined;
49
+ isPrimary?: boolean | undefined;
50
+ }>;
51
+ export type TBranch = z.infer<typeof BranchSchema>;
32
52
  export declare const OrganizationSchema: z.ZodObject<{
33
53
  id: z.ZodString;
34
54
  name: z.ZodString;
@@ -97,6 +117,25 @@ export declare const OrganizationSchema: z.ZodObject<{
97
117
  email: z.ZodOptional<z.ZodString>;
98
118
  notes: z.ZodOptional<z.ZodString>;
99
119
  freeShipping: z.ZodOptional<z.ZodBoolean>;
120
+ branches: z.ZodOptional<z.ZodArray<z.ZodObject<{
121
+ id: z.ZodString;
122
+ label: z.ZodString;
123
+ address: z.ZodOptional<z.ZodString>;
124
+ phone: z.ZodOptional<z.ZodString>;
125
+ isPrimary: z.ZodOptional<z.ZodBoolean>;
126
+ }, "strip", z.ZodTypeAny, {
127
+ id: string;
128
+ label: string;
129
+ address?: string | undefined;
130
+ phone?: string | undefined;
131
+ isPrimary?: boolean | undefined;
132
+ }, {
133
+ id: string;
134
+ label: string;
135
+ address?: string | undefined;
136
+ phone?: string | undefined;
137
+ isPrimary?: boolean | undefined;
138
+ }>, "many">>;
100
139
  }, "strip", z.ZodTypeAny, {
101
140
  id: string;
102
141
  name: string;
@@ -129,6 +168,13 @@ export declare const OrganizationSchema: z.ZodObject<{
129
168
  groupId?: string | undefined;
130
169
  notes?: string | undefined;
131
170
  freeShipping?: boolean | undefined;
171
+ branches?: {
172
+ id: string;
173
+ label: string;
174
+ address?: string | undefined;
175
+ phone?: string | undefined;
176
+ isPrimary?: boolean | undefined;
177
+ }[] | undefined;
132
178
  }, {
133
179
  id: string;
134
180
  name: string;
@@ -161,6 +207,13 @@ export declare const OrganizationSchema: z.ZodObject<{
161
207
  groupId?: string | undefined;
162
208
  notes?: string | undefined;
163
209
  freeShipping?: boolean | undefined;
210
+ branches?: {
211
+ id: string;
212
+ label: string;
213
+ address?: string | undefined;
214
+ phone?: string | undefined;
215
+ isPrimary?: boolean | undefined;
216
+ }[] | undefined;
164
217
  }>;
165
218
  export declare const NewOrganizationSchema: z.ZodObject<Omit<{
166
219
  id: z.ZodString;
@@ -230,6 +283,25 @@ export declare const NewOrganizationSchema: z.ZodObject<Omit<{
230
283
  email: z.ZodOptional<z.ZodString>;
231
284
  notes: z.ZodOptional<z.ZodString>;
232
285
  freeShipping: z.ZodOptional<z.ZodBoolean>;
286
+ branches: z.ZodOptional<z.ZodArray<z.ZodObject<{
287
+ id: z.ZodString;
288
+ label: z.ZodString;
289
+ address: z.ZodOptional<z.ZodString>;
290
+ phone: z.ZodOptional<z.ZodString>;
291
+ isPrimary: z.ZodOptional<z.ZodBoolean>;
292
+ }, "strip", z.ZodTypeAny, {
293
+ id: string;
294
+ label: string;
295
+ address?: string | undefined;
296
+ phone?: string | undefined;
297
+ isPrimary?: boolean | undefined;
298
+ }, {
299
+ id: string;
300
+ label: string;
301
+ address?: string | undefined;
302
+ phone?: string | undefined;
303
+ isPrimary?: boolean | undefined;
304
+ }>, "many">>;
233
305
  }, "id">, "strip", z.ZodTypeAny, {
234
306
  name: string;
235
307
  paymentType: "none" | "external" | "j5";
@@ -261,6 +333,13 @@ export declare const NewOrganizationSchema: z.ZodObject<Omit<{
261
333
  groupId?: string | undefined;
262
334
  notes?: string | undefined;
263
335
  freeShipping?: boolean | undefined;
336
+ branches?: {
337
+ id: string;
338
+ label: string;
339
+ address?: string | undefined;
340
+ phone?: string | undefined;
341
+ isPrimary?: boolean | undefined;
342
+ }[] | undefined;
264
343
  }, {
265
344
  name: string;
266
345
  paymentType: "none" | "external" | "j5";
@@ -292,6 +371,13 @@ export declare const NewOrganizationSchema: z.ZodObject<Omit<{
292
371
  groupId?: string | undefined;
293
372
  notes?: string | undefined;
294
373
  freeShipping?: boolean | undefined;
374
+ branches?: {
375
+ id: string;
376
+ label: string;
377
+ address?: string | undefined;
378
+ phone?: string | undefined;
379
+ isPrimary?: boolean | undefined;
380
+ }[] | undefined;
295
381
  }>;
296
382
  export type TBillingAccount = z.infer<typeof BillingAccountSchema>;
297
383
  export type TNewOrganization = z.infer<typeof NewOrganizationSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"Organization.d.ts","sourceRoot":"","sources":["../../../lib/entities/Organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,kBAAkB,2DAM7B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE/D,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY/B,CAAC;AAGH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe7B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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wC,CAAC;AAE3E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACnE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACrE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -22,6 +22,14 @@ export const BillingAccountSchema = z.object({
22
22
  restricted: z.boolean().optional(),
23
23
  allowedCategories: z.array(z.string()).optional(),
24
24
  });
25
+ // A physical branch / office of the organization (admin-managed, optional).
26
+ export const BranchSchema = z.object({
27
+ id: z.string(),
28
+ label: z.string(),
29
+ address: z.string().optional(),
30
+ phone: z.string().optional(),
31
+ isPrimary: z.boolean().optional(),
32
+ });
25
33
  // client organization for clients
26
34
  export const OrganizationSchema = z.object({
27
35
  id: z.string(),
@@ -38,5 +46,6 @@ export const OrganizationSchema = z.object({
38
46
  email: z.string().optional(),
39
47
  notes: z.string().optional(),
40
48
  freeShipping: z.boolean().optional(),
49
+ branches: z.array(BranchSchema).optional(),
41
50
  });
42
51
  export const NewOrganizationSchema = OrganizationSchema.omit({ id: true });