@voltade/envoy-sdk 1.1.1 → 1.1.2

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.
@@ -3,7 +3,7 @@ import { z } from "zod";
3
3
  * Zod Schemas for Orders
4
4
  */
5
5
  export declare const OrderSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
6
- export declare const OrderMetadataSchema: z.ZodObject<{
6
+ export declare const OrderLineItemSchema: z.ZodObject<{
7
7
  part_number: z.ZodOptional<z.ZodString>;
8
8
  quantity: z.ZodOptional<z.ZodNumber>;
9
9
  description: z.ZodOptional<z.ZodString>;
@@ -19,18 +19,8 @@ export declare const OrderMetadataSchema: z.ZodObject<{
19
19
  description?: string | undefined;
20
20
  line_total?: number | undefined;
21
21
  }>;
22
- export declare const UpsertOrderParamsSchema: z.ZodObject<{
23
- name: z.ZodOptional<z.ZodString>;
24
- contact_id: z.ZodOptional<z.ZodNumber>;
25
- total_amount: z.ZodOptional<z.ZodNumber>;
26
- currency_code: z.ZodOptional<z.ZodString>;
27
- financial_status: z.ZodOptional<z.ZodString>;
28
- fulfillment_status: z.ZodOptional<z.ZodString>;
29
- source: z.ZodString;
30
- source_id: z.ZodString;
31
- order_url: z.ZodOptional<z.ZodString>;
32
- notes: z.ZodOptional<z.ZodString>;
33
- metadata: z.ZodOptional<z.ZodObject<{
22
+ export declare const OrderMetadataSchema: z.ZodObject<{
23
+ line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
34
24
  part_number: z.ZodOptional<z.ZodString>;
35
25
  quantity: z.ZodOptional<z.ZodNumber>;
36
26
  description: z.ZodOptional<z.ZodString>;
@@ -45,6 +35,64 @@ export declare const UpsertOrderParamsSchema: z.ZodObject<{
45
35
  quantity?: number | undefined;
46
36
  description?: string | undefined;
47
37
  line_total?: number | undefined;
38
+ }>, "many">>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ line_items?: {
41
+ part_number?: string | undefined;
42
+ quantity?: number | undefined;
43
+ description?: string | undefined;
44
+ line_total?: number | undefined;
45
+ }[] | undefined;
46
+ }, {
47
+ line_items?: {
48
+ part_number?: string | undefined;
49
+ quantity?: number | undefined;
50
+ description?: string | undefined;
51
+ line_total?: number | undefined;
52
+ }[] | undefined;
53
+ }>;
54
+ export declare const UpsertOrderParamsSchema: z.ZodObject<{
55
+ name: z.ZodOptional<z.ZodString>;
56
+ contact_id: z.ZodOptional<z.ZodNumber>;
57
+ total_amount: z.ZodOptional<z.ZodNumber>;
58
+ currency_code: z.ZodOptional<z.ZodString>;
59
+ financial_status: z.ZodOptional<z.ZodString>;
60
+ fulfillment_status: z.ZodOptional<z.ZodString>;
61
+ source: z.ZodString;
62
+ source_id: z.ZodString;
63
+ order_url: z.ZodOptional<z.ZodString>;
64
+ notes: z.ZodOptional<z.ZodString>;
65
+ metadata: z.ZodOptional<z.ZodObject<{
66
+ line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
67
+ part_number: z.ZodOptional<z.ZodString>;
68
+ quantity: z.ZodOptional<z.ZodNumber>;
69
+ description: z.ZodOptional<z.ZodString>;
70
+ line_total: z.ZodOptional<z.ZodNumber>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ part_number?: string | undefined;
73
+ quantity?: number | undefined;
74
+ description?: string | undefined;
75
+ line_total?: number | undefined;
76
+ }, {
77
+ part_number?: string | undefined;
78
+ quantity?: number | undefined;
79
+ description?: string | undefined;
80
+ line_total?: number | undefined;
81
+ }>, "many">>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ line_items?: {
84
+ part_number?: string | undefined;
85
+ quantity?: number | undefined;
86
+ description?: string | undefined;
87
+ line_total?: number | undefined;
88
+ }[] | undefined;
89
+ }, {
90
+ line_items?: {
91
+ part_number?: string | undefined;
92
+ quantity?: number | undefined;
93
+ description?: string | undefined;
94
+ line_total?: number | undefined;
95
+ }[] | undefined;
48
96
  }>>;
49
97
  }, "strip", z.ZodTypeAny, {
50
98
  source_id: string;
@@ -58,10 +106,12 @@ export declare const UpsertOrderParamsSchema: z.ZodObject<{
58
106
  order_url?: string | undefined;
59
107
  notes?: string | undefined;
60
108
  metadata?: {
61
- part_number?: string | undefined;
62
- quantity?: number | undefined;
63
- description?: string | undefined;
64
- line_total?: number | undefined;
109
+ line_items?: {
110
+ part_number?: string | undefined;
111
+ quantity?: number | undefined;
112
+ description?: string | undefined;
113
+ line_total?: number | undefined;
114
+ }[] | undefined;
65
115
  } | undefined;
66
116
  }, {
67
117
  source_id: string;
@@ -75,10 +125,12 @@ export declare const UpsertOrderParamsSchema: z.ZodObject<{
75
125
  order_url?: string | undefined;
76
126
  notes?: string | undefined;
77
127
  metadata?: {
78
- part_number?: string | undefined;
79
- quantity?: number | undefined;
80
- description?: string | undefined;
81
- line_total?: number | undefined;
128
+ line_items?: {
129
+ part_number?: string | undefined;
130
+ quantity?: number | undefined;
131
+ description?: string | undefined;
132
+ line_total?: number | undefined;
133
+ }[] | undefined;
82
134
  } | undefined;
83
135
  }>;
84
136
  export declare const UpsertOrderRequestSchema: z.ZodObject<{
@@ -94,20 +146,36 @@ export declare const UpsertOrderRequestSchema: z.ZodObject<{
94
146
  order_url: z.ZodOptional<z.ZodString>;
95
147
  notes: z.ZodOptional<z.ZodString>;
96
148
  metadata: z.ZodOptional<z.ZodObject<{
97
- part_number: z.ZodOptional<z.ZodString>;
98
- quantity: z.ZodOptional<z.ZodNumber>;
99
- description: z.ZodOptional<z.ZodString>;
100
- line_total: z.ZodOptional<z.ZodNumber>;
149
+ line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
150
+ part_number: z.ZodOptional<z.ZodString>;
151
+ quantity: z.ZodOptional<z.ZodNumber>;
152
+ description: z.ZodOptional<z.ZodString>;
153
+ line_total: z.ZodOptional<z.ZodNumber>;
154
+ }, "strip", z.ZodTypeAny, {
155
+ part_number?: string | undefined;
156
+ quantity?: number | undefined;
157
+ description?: string | undefined;
158
+ line_total?: number | undefined;
159
+ }, {
160
+ part_number?: string | undefined;
161
+ quantity?: number | undefined;
162
+ description?: string | undefined;
163
+ line_total?: number | undefined;
164
+ }>, "many">>;
101
165
  }, "strip", z.ZodTypeAny, {
102
- part_number?: string | undefined;
103
- quantity?: number | undefined;
104
- description?: string | undefined;
105
- line_total?: number | undefined;
166
+ line_items?: {
167
+ part_number?: string | undefined;
168
+ quantity?: number | undefined;
169
+ description?: string | undefined;
170
+ line_total?: number | undefined;
171
+ }[] | undefined;
106
172
  }, {
107
- part_number?: string | undefined;
108
- quantity?: number | undefined;
109
- description?: string | undefined;
110
- line_total?: number | undefined;
173
+ line_items?: {
174
+ part_number?: string | undefined;
175
+ quantity?: number | undefined;
176
+ description?: string | undefined;
177
+ line_total?: number | undefined;
178
+ }[] | undefined;
111
179
  }>>;
112
180
  }, "strip", z.ZodTypeAny, {
113
181
  source_id: string;
@@ -121,10 +189,12 @@ export declare const UpsertOrderRequestSchema: z.ZodObject<{
121
189
  order_url?: string | undefined;
122
190
  notes?: string | undefined;
123
191
  metadata?: {
124
- part_number?: string | undefined;
125
- quantity?: number | undefined;
126
- description?: string | undefined;
127
- line_total?: number | undefined;
192
+ line_items?: {
193
+ part_number?: string | undefined;
194
+ quantity?: number | undefined;
195
+ description?: string | undefined;
196
+ line_total?: number | undefined;
197
+ }[] | undefined;
128
198
  } | undefined;
129
199
  }, {
130
200
  source_id: string;
@@ -138,10 +208,12 @@ export declare const UpsertOrderRequestSchema: z.ZodObject<{
138
208
  order_url?: string | undefined;
139
209
  notes?: string | undefined;
140
210
  metadata?: {
141
- part_number?: string | undefined;
142
- quantity?: number | undefined;
143
- description?: string | undefined;
144
- line_total?: number | undefined;
211
+ line_items?: {
212
+ part_number?: string | undefined;
213
+ quantity?: number | undefined;
214
+ description?: string | undefined;
215
+ line_total?: number | undefined;
216
+ }[] | undefined;
145
217
  } | undefined;
146
218
  }>;
147
219
  }, "strip", z.ZodTypeAny, {
@@ -157,10 +229,12 @@ export declare const UpsertOrderRequestSchema: z.ZodObject<{
157
229
  order_url?: string | undefined;
158
230
  notes?: string | undefined;
159
231
  metadata?: {
160
- part_number?: string | undefined;
161
- quantity?: number | undefined;
162
- description?: string | undefined;
163
- line_total?: number | undefined;
232
+ line_items?: {
233
+ part_number?: string | undefined;
234
+ quantity?: number | undefined;
235
+ description?: string | undefined;
236
+ line_total?: number | undefined;
237
+ }[] | undefined;
164
238
  } | undefined;
165
239
  };
166
240
  }, {
@@ -176,10 +250,12 @@ export declare const UpsertOrderRequestSchema: z.ZodObject<{
176
250
  order_url?: string | undefined;
177
251
  notes?: string | undefined;
178
252
  metadata?: {
179
- part_number?: string | undefined;
180
- quantity?: number | undefined;
181
- description?: string | undefined;
182
- line_total?: number | undefined;
253
+ line_items?: {
254
+ part_number?: string | undefined;
255
+ quantity?: number | undefined;
256
+ description?: string | undefined;
257
+ line_total?: number | undefined;
258
+ }[] | undefined;
183
259
  } | undefined;
184
260
  };
185
261
  }>;
@@ -197,20 +273,36 @@ export declare const UpsertOrderResponsePayloadSchema: z.ZodObject<{
197
273
  order_url: z.ZodOptional<z.ZodString>;
198
274
  notes: z.ZodOptional<z.ZodString>;
199
275
  metadata: z.ZodOptional<z.ZodObject<{
200
- part_number: z.ZodOptional<z.ZodString>;
201
- quantity: z.ZodOptional<z.ZodNumber>;
202
- description: z.ZodOptional<z.ZodString>;
203
- line_total: z.ZodOptional<z.ZodNumber>;
276
+ line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
277
+ part_number: z.ZodOptional<z.ZodString>;
278
+ quantity: z.ZodOptional<z.ZodNumber>;
279
+ description: z.ZodOptional<z.ZodString>;
280
+ line_total: z.ZodOptional<z.ZodNumber>;
281
+ }, "strip", z.ZodTypeAny, {
282
+ part_number?: string | undefined;
283
+ quantity?: number | undefined;
284
+ description?: string | undefined;
285
+ line_total?: number | undefined;
286
+ }, {
287
+ part_number?: string | undefined;
288
+ quantity?: number | undefined;
289
+ description?: string | undefined;
290
+ line_total?: number | undefined;
291
+ }>, "many">>;
204
292
  }, "strip", z.ZodTypeAny, {
205
- part_number?: string | undefined;
206
- quantity?: number | undefined;
207
- description?: string | undefined;
208
- line_total?: number | undefined;
293
+ line_items?: {
294
+ part_number?: string | undefined;
295
+ quantity?: number | undefined;
296
+ description?: string | undefined;
297
+ line_total?: number | undefined;
298
+ }[] | undefined;
209
299
  }, {
210
- part_number?: string | undefined;
211
- quantity?: number | undefined;
212
- description?: string | undefined;
213
- line_total?: number | undefined;
300
+ line_items?: {
301
+ part_number?: string | undefined;
302
+ quantity?: number | undefined;
303
+ description?: string | undefined;
304
+ line_total?: number | undefined;
305
+ }[] | undefined;
214
306
  }>>;
215
307
  created_at: z.ZodString;
216
308
  updated_at: z.ZodString;
@@ -229,10 +321,12 @@ export declare const UpsertOrderResponsePayloadSchema: z.ZodObject<{
229
321
  order_url?: string | undefined;
230
322
  notes?: string | undefined;
231
323
  metadata?: {
232
- part_number?: string | undefined;
233
- quantity?: number | undefined;
234
- description?: string | undefined;
235
- line_total?: number | undefined;
324
+ line_items?: {
325
+ part_number?: string | undefined;
326
+ quantity?: number | undefined;
327
+ description?: string | undefined;
328
+ line_total?: number | undefined;
329
+ }[] | undefined;
236
330
  } | undefined;
237
331
  contact_name?: string | undefined;
238
332
  }, {
@@ -250,10 +344,12 @@ export declare const UpsertOrderResponsePayloadSchema: z.ZodObject<{
250
344
  order_url?: string | undefined;
251
345
  notes?: string | undefined;
252
346
  metadata?: {
253
- part_number?: string | undefined;
254
- quantity?: number | undefined;
255
- description?: string | undefined;
256
- line_total?: number | undefined;
347
+ line_items?: {
348
+ part_number?: string | undefined;
349
+ quantity?: number | undefined;
350
+ description?: string | undefined;
351
+ line_total?: number | undefined;
352
+ }[] | undefined;
257
353
  } | undefined;
258
354
  contact_name?: string | undefined;
259
355
  }>;
@@ -272,20 +368,36 @@ export declare const UpsertOrderResponseSchema: z.ZodObject<{
272
368
  order_url: z.ZodOptional<z.ZodString>;
273
369
  notes: z.ZodOptional<z.ZodString>;
274
370
  metadata: z.ZodOptional<z.ZodObject<{
275
- part_number: z.ZodOptional<z.ZodString>;
276
- quantity: z.ZodOptional<z.ZodNumber>;
277
- description: z.ZodOptional<z.ZodString>;
278
- line_total: z.ZodOptional<z.ZodNumber>;
371
+ line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
372
+ part_number: z.ZodOptional<z.ZodString>;
373
+ quantity: z.ZodOptional<z.ZodNumber>;
374
+ description: z.ZodOptional<z.ZodString>;
375
+ line_total: z.ZodOptional<z.ZodNumber>;
376
+ }, "strip", z.ZodTypeAny, {
377
+ part_number?: string | undefined;
378
+ quantity?: number | undefined;
379
+ description?: string | undefined;
380
+ line_total?: number | undefined;
381
+ }, {
382
+ part_number?: string | undefined;
383
+ quantity?: number | undefined;
384
+ description?: string | undefined;
385
+ line_total?: number | undefined;
386
+ }>, "many">>;
279
387
  }, "strip", z.ZodTypeAny, {
280
- part_number?: string | undefined;
281
- quantity?: number | undefined;
282
- description?: string | undefined;
283
- line_total?: number | undefined;
388
+ line_items?: {
389
+ part_number?: string | undefined;
390
+ quantity?: number | undefined;
391
+ description?: string | undefined;
392
+ line_total?: number | undefined;
393
+ }[] | undefined;
284
394
  }, {
285
- part_number?: string | undefined;
286
- quantity?: number | undefined;
287
- description?: string | undefined;
288
- line_total?: number | undefined;
395
+ line_items?: {
396
+ part_number?: string | undefined;
397
+ quantity?: number | undefined;
398
+ description?: string | undefined;
399
+ line_total?: number | undefined;
400
+ }[] | undefined;
289
401
  }>>;
290
402
  created_at: z.ZodString;
291
403
  updated_at: z.ZodString;
@@ -304,10 +416,12 @@ export declare const UpsertOrderResponseSchema: z.ZodObject<{
304
416
  order_url?: string | undefined;
305
417
  notes?: string | undefined;
306
418
  metadata?: {
307
- part_number?: string | undefined;
308
- quantity?: number | undefined;
309
- description?: string | undefined;
310
- line_total?: number | undefined;
419
+ line_items?: {
420
+ part_number?: string | undefined;
421
+ quantity?: number | undefined;
422
+ description?: string | undefined;
423
+ line_total?: number | undefined;
424
+ }[] | undefined;
311
425
  } | undefined;
312
426
  contact_name?: string | undefined;
313
427
  }, {
@@ -325,10 +439,12 @@ export declare const UpsertOrderResponseSchema: z.ZodObject<{
325
439
  order_url?: string | undefined;
326
440
  notes?: string | undefined;
327
441
  metadata?: {
328
- part_number?: string | undefined;
329
- quantity?: number | undefined;
330
- description?: string | undefined;
331
- line_total?: number | undefined;
442
+ line_items?: {
443
+ part_number?: string | undefined;
444
+ quantity?: number | undefined;
445
+ description?: string | undefined;
446
+ line_total?: number | undefined;
447
+ }[] | undefined;
332
448
  } | undefined;
333
449
  contact_name?: string | undefined;
334
450
  }>;
@@ -348,10 +464,12 @@ export declare const UpsertOrderResponseSchema: z.ZodObject<{
348
464
  order_url?: string | undefined;
349
465
  notes?: string | undefined;
350
466
  metadata?: {
351
- part_number?: string | undefined;
352
- quantity?: number | undefined;
353
- description?: string | undefined;
354
- line_total?: number | undefined;
467
+ line_items?: {
468
+ part_number?: string | undefined;
469
+ quantity?: number | undefined;
470
+ description?: string | undefined;
471
+ line_total?: number | undefined;
472
+ }[] | undefined;
355
473
  } | undefined;
356
474
  contact_name?: string | undefined;
357
475
  };
@@ -371,10 +489,12 @@ export declare const UpsertOrderResponseSchema: z.ZodObject<{
371
489
  order_url?: string | undefined;
372
490
  notes?: string | undefined;
373
491
  metadata?: {
374
- part_number?: string | undefined;
375
- quantity?: number | undefined;
376
- description?: string | undefined;
377
- line_total?: number | undefined;
492
+ line_items?: {
493
+ part_number?: string | undefined;
494
+ quantity?: number | undefined;
495
+ description?: string | undefined;
496
+ line_total?: number | undefined;
497
+ }[] | undefined;
378
498
  } | undefined;
379
499
  contact_name?: string | undefined;
380
500
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../resources/orders/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AAGH,eAAO,MAAM,WAAW,wCAAwB,CAAC;AAEjD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAK9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C,CAAC;AAGH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;EAOjC,CAAC;AAGH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;EAM3B,CAAC;AAGH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGnC,CAAC;AAEH;;GAEG;AAEH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAChD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
@@ -4,12 +4,15 @@ import { z } from "zod";
4
4
  */
5
5
  // Order schema - minimal structure as per API docs
6
6
  export const OrderSchema = z.record(z.unknown());
7
- export const OrderMetadataSchema = z.object({
7
+ export const OrderLineItemSchema = z.object({
8
8
  part_number: z.string().optional(),
9
9
  quantity: z.number().optional(),
10
10
  description: z.string().optional(),
11
11
  line_total: z.number().optional(),
12
12
  });
13
+ export const OrderMetadataSchema = z.object({
14
+ line_items: z.array(OrderLineItemSchema).optional(),
15
+ });
13
16
  // Upsert order parameters schema
14
17
  export const UpsertOrderParamsSchema = z.object({
15
18
  name: z.string().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../resources/orders/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AAEH,mDAAmD;AACnD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAEjD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC;AAEH,iCAAiC;AACjC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACvC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,KA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AAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC;CAC3B,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltade/envoy-sdk",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "description": "A comprehensive TypeScript SDK for the Envoy API with built-in error handling and resource-based architecture",
6
6
  "main": "./dist/index.js",