@voltade/envoy-sdk 1.4.0 → 1.4.1
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/index.d.ts +14 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/dist/resources/campaigns/index.d.ts.map +1 -1
- package/dist/resources/campaigns/index.js +2 -3
- package/dist/resources/campaigns/index.js.map +1 -1
- package/dist/resources/campaigns/types.d.ts +0 -3
- package/dist/resources/campaigns/types.d.ts.map +1 -1
- package/dist/resources/campaigns/types.js +0 -1
- package/dist/resources/campaigns/types.js.map +1 -1
- package/dist/resources/companies/index.d.ts +28 -3
- package/dist/resources/companies/index.d.ts.map +1 -1
- package/dist/resources/companies/index.js +42 -3
- package/dist/resources/companies/index.js.map +1 -1
- package/dist/resources/companies/types.d.ts +41 -0
- package/dist/resources/companies/types.d.ts.map +1 -1
- package/dist/resources/companies/types.js +4 -0
- package/dist/resources/companies/types.js.map +1 -1
- package/dist/resources/contacts/index.d.ts +36 -3
- package/dist/resources/contacts/index.d.ts.map +1 -1
- package/dist/resources/contacts/index.js +42 -2
- package/dist/resources/contacts/index.js.map +1 -1
- package/dist/resources/contacts/types.d.ts +41 -0
- package/dist/resources/contacts/types.d.ts.map +1 -1
- package/dist/resources/contacts/types.js +4 -0
- package/dist/resources/contacts/types.js.map +1 -1
- package/dist/resources/filters.d.ts +172 -0
- package/dist/resources/filters.d.ts.map +1 -0
- package/dist/resources/filters.js +299 -0
- package/dist/resources/filters.js.map +1 -0
- package/dist/resources/index.d.ts +1 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +1 -0
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/orders/index.d.ts +22 -5
- package/dist/resources/orders/index.d.ts.map +1 -1
- package/dist/resources/orders/index.js +24 -7
- package/dist/resources/orders/index.js.map +1 -1
- package/dist/resources/orders/types.d.ts +38 -3
- package/dist/resources/orders/types.d.ts.map +1 -1
- package/dist/resources/orders/types.js +3 -1
- package/dist/resources/orders/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -15,6 +15,8 @@ export declare class Orders extends BaseResource {
|
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* ```typescript
|
|
18
|
+
* import { filters, sort } from 'envoy-sdk';
|
|
19
|
+
*
|
|
18
20
|
* // List orders with default pagination
|
|
19
21
|
* const response = await client.orders.list();
|
|
20
22
|
* console.log(response.data); // Array of orders
|
|
@@ -30,13 +32,28 @@ export declare class Orders extends BaseResource {
|
|
|
30
32
|
* const response = await client.orders.list({
|
|
31
33
|
* since: '2024-01-01',
|
|
32
34
|
* until: '2024-12-31',
|
|
33
|
-
* sort: '
|
|
35
|
+
* sort: sort.desc('created_at')
|
|
36
|
+
* });
|
|
37
|
+
*
|
|
38
|
+
* // List paid orders from the last 7 days
|
|
39
|
+
* const response = await client.orders.list({
|
|
40
|
+
* filters: [
|
|
41
|
+
* filters.eq('payment_status', ['paid']),
|
|
42
|
+
* filters.dateWithinLast('created_at', 7, 'days'),
|
|
43
|
+
* ]
|
|
44
|
+
* });
|
|
45
|
+
*
|
|
46
|
+
* // List orders with total > $100
|
|
47
|
+
* const response = await client.orders.list({
|
|
48
|
+
* filters: [
|
|
49
|
+
* filters.gt('total_amount', 100),
|
|
50
|
+
* ]
|
|
34
51
|
* });
|
|
35
52
|
*
|
|
36
|
-
* // List orders
|
|
53
|
+
* // List orders by fulfillment status (multiple values)
|
|
37
54
|
* const response = await client.orders.list({
|
|
38
|
-
*
|
|
39
|
-
*
|
|
55
|
+
* filters: [
|
|
56
|
+
* filters.in('fulfillment_status', ['unfulfilled', 'partially_fulfilled']),
|
|
40
57
|
* ]
|
|
41
58
|
* });
|
|
42
59
|
* ```
|
|
@@ -73,6 +90,6 @@ export declare class Orders extends BaseResource {
|
|
|
73
90
|
*/
|
|
74
91
|
upsert(params: UpsertOrderParams): Promise<UpsertOrderResponse>;
|
|
75
92
|
}
|
|
76
|
-
export type { FulfillmentStatus, ListOrdersParams, ListOrdersResponse, Order, OrdersMeta, PartyableType, PaymentStatus, UpsertOrderParams, UpsertOrderRequest, UpsertOrderResponse, UpsertOrderResponsePayload, } from "./types.js";
|
|
93
|
+
export type { FulfillmentStatus, ListOrdersParams, ListOrdersResponse, Order, OrderFilterAttribute, OrdersMeta, PartyableType, PaymentStatus, UpsertOrderParams, UpsertOrderRequest, UpsertOrderResponse, UpsertOrderResponsePayload, } from "./types.js";
|
|
77
94
|
export { FulfillmentStatusSchema, ListOrdersParamsSchema, ListOrdersResponseSchema, OrdersMetaSchema, OrderSchema, PartyableTypeSchema, PaymentStatusSchema, UpsertOrderParamsSchema, UpsertOrderRequestSchema, UpsertOrderResponsePayloadSchema, UpsertOrderResponseSchema, } from "./types.js";
|
|
78
95
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../resources/orders/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,qBAAa,MAAO,SAAQ,YAAY;IACtC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../resources/orders/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,qBAAa,MAAO,SAAQ,YAAY;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiDG;IACG,IAAI,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA4BlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACG,MAAM,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC;CAKtE;AAGD,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,oBAAoB,EACpB,UAAU,EACV,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,gBAAgB,EAChB,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACxB,gCAAgC,EAChC,yBAAyB,GAC1B,MAAM,YAAY,CAAC"}
|
|
@@ -14,6 +14,8 @@ export class Orders extends BaseResource {
|
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
16
|
* ```typescript
|
|
17
|
+
* import { filters, sort } from 'envoy-sdk';
|
|
18
|
+
*
|
|
17
19
|
* // List orders with default pagination
|
|
18
20
|
* const response = await client.orders.list();
|
|
19
21
|
* console.log(response.data); // Array of orders
|
|
@@ -29,13 +31,28 @@ export class Orders extends BaseResource {
|
|
|
29
31
|
* const response = await client.orders.list({
|
|
30
32
|
* since: '2024-01-01',
|
|
31
33
|
* until: '2024-12-31',
|
|
32
|
-
* sort: '
|
|
34
|
+
* sort: sort.desc('created_at')
|
|
35
|
+
* });
|
|
36
|
+
*
|
|
37
|
+
* // List paid orders from the last 7 days
|
|
38
|
+
* const response = await client.orders.list({
|
|
39
|
+
* filters: [
|
|
40
|
+
* filters.eq('payment_status', ['paid']),
|
|
41
|
+
* filters.dateWithinLast('created_at', 7, 'days'),
|
|
42
|
+
* ]
|
|
43
|
+
* });
|
|
44
|
+
*
|
|
45
|
+
* // List orders with total > $100
|
|
46
|
+
* const response = await client.orders.list({
|
|
47
|
+
* filters: [
|
|
48
|
+
* filters.gt('total_amount', 100),
|
|
49
|
+
* ]
|
|
33
50
|
* });
|
|
34
51
|
*
|
|
35
|
-
* // List orders
|
|
52
|
+
* // List orders by fulfillment status (multiple values)
|
|
36
53
|
* const response = await client.orders.list({
|
|
37
|
-
*
|
|
38
|
-
*
|
|
54
|
+
* filters: [
|
|
55
|
+
* filters.in('fulfillment_status', ['unfulfilled', 'partially_fulfilled']),
|
|
39
56
|
* ]
|
|
40
57
|
* });
|
|
41
58
|
* ```
|
|
@@ -57,9 +74,9 @@ export class Orders extends BaseResource {
|
|
|
57
74
|
if (params?.sort) {
|
|
58
75
|
queryParams.sort = params.sort;
|
|
59
76
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
queryParams.payload = JSON.stringify(params.
|
|
77
|
+
// Only include payload when there are actual filters
|
|
78
|
+
if (params?.filters && params.filters.length > 0) {
|
|
79
|
+
queryParams.payload = JSON.stringify(params.filters);
|
|
63
80
|
}
|
|
64
81
|
return await this.client.get("/orders", {
|
|
65
82
|
params: queryParams,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../resources/orders/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAQnD;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,YAAY;IACtC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../resources/orders/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAQnD;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,YAAY;IACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiDG;IACH,KAAK,CAAC,IAAI,CAAC,MAAyB;QAClC,MAAM,W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mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EACxB,gCAAgC,EAChC,yBAAyB,GAC1B,MAAM,YAAY,CAAC"}
|
|
@@ -524,17 +524,48 @@ export declare const ListOrdersParamsSchema: z.ZodObject<{
|
|
|
524
524
|
since: z.ZodOptional<z.ZodString>;
|
|
525
525
|
until: z.ZodOptional<z.ZodString>;
|
|
526
526
|
sort: z.ZodOptional<z.ZodString>;
|
|
527
|
-
|
|
527
|
+
/** Filter conditions array */
|
|
528
|
+
filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
529
|
+
attribute_key: z.ZodString;
|
|
530
|
+
filter_operator: z.ZodEnum<["equal_to", "not_equal_to", "contains", "does_not_contain", "matches_phrase", "does_not_match_phrase", "starts_with", "is_present", "is_not_present", "is_greater_than", "is_less_than", "date_is", "date_is_before", "date_is_after", "date_is_between", "date_within_last_n", "date_within_next_n", "date_more_than_n_ago", "date_is_n_from_today", "in", "not_in"]>;
|
|
531
|
+
values: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">]>;
|
|
532
|
+
query_operator: z.ZodEnum<["and", "or"]>;
|
|
533
|
+
attribute_model: z.ZodOptional<z.ZodEnum<["standard", "customAttributes"]>>;
|
|
534
|
+
}, "strip", z.ZodTypeAny, {
|
|
535
|
+
values: string | number | boolean | (string | number)[];
|
|
536
|
+
attribute_key: string;
|
|
537
|
+
filter_operator: "equal_to" | "not_equal_to" | "contains" | "does_not_contain" | "matches_phrase" | "does_not_match_phrase" | "starts_with" | "is_present" | "is_not_present" | "is_greater_than" | "is_less_than" | "date_is" | "date_is_before" | "date_is_after" | "date_is_between" | "date_within_last_n" | "date_within_next_n" | "date_more_than_n_ago" | "date_is_n_from_today" | "in" | "not_in";
|
|
538
|
+
query_operator: "and" | "or";
|
|
539
|
+
attribute_model?: "standard" | "customAttributes" | undefined;
|
|
540
|
+
}, {
|
|
541
|
+
values: string | number | boolean | (string | number)[];
|
|
542
|
+
attribute_key: string;
|
|
543
|
+
filter_operator: "equal_to" | "not_equal_to" | "contains" | "does_not_contain" | "matches_phrase" | "does_not_match_phrase" | "starts_with" | "is_present" | "is_not_present" | "is_greater_than" | "is_less_than" | "date_is" | "date_is_before" | "date_is_after" | "date_is_between" | "date_within_last_n" | "date_within_next_n" | "date_more_than_n_ago" | "date_is_n_from_today" | "in" | "not_in";
|
|
544
|
+
query_operator: "and" | "or";
|
|
545
|
+
attribute_model?: "standard" | "customAttributes" | undefined;
|
|
546
|
+
}>, "many">>;
|
|
528
547
|
}, "strip", z.ZodTypeAny, {
|
|
529
548
|
page: number;
|
|
530
549
|
per_page: number;
|
|
531
550
|
sort?: string | undefined;
|
|
532
|
-
|
|
551
|
+
filters?: {
|
|
552
|
+
values: string | number | boolean | (string | number)[];
|
|
553
|
+
attribute_key: string;
|
|
554
|
+
filter_operator: "equal_to" | "not_equal_to" | "contains" | "does_not_contain" | "matches_phrase" | "does_not_match_phrase" | "starts_with" | "is_present" | "is_not_present" | "is_greater_than" | "is_less_than" | "date_is" | "date_is_before" | "date_is_after" | "date_is_between" | "date_within_last_n" | "date_within_next_n" | "date_more_than_n_ago" | "date_is_n_from_today" | "in" | "not_in";
|
|
555
|
+
query_operator: "and" | "or";
|
|
556
|
+
attribute_model?: "standard" | "customAttributes" | undefined;
|
|
557
|
+
}[] | undefined;
|
|
533
558
|
since?: string | undefined;
|
|
534
559
|
until?: string | undefined;
|
|
535
560
|
}, {
|
|
536
561
|
sort?: string | undefined;
|
|
537
|
-
|
|
562
|
+
filters?: {
|
|
563
|
+
values: string | number | boolean | (string | number)[];
|
|
564
|
+
attribute_key: string;
|
|
565
|
+
filter_operator: "equal_to" | "not_equal_to" | "contains" | "does_not_contain" | "matches_phrase" | "does_not_match_phrase" | "starts_with" | "is_present" | "is_not_present" | "is_greater_than" | "is_less_than" | "date_is" | "date_is_before" | "date_is_after" | "date_is_between" | "date_within_last_n" | "date_within_next_n" | "date_more_than_n_ago" | "date_is_n_from_today" | "in" | "not_in";
|
|
566
|
+
query_operator: "and" | "or";
|
|
567
|
+
attribute_model?: "standard" | "customAttributes" | undefined;
|
|
568
|
+
}[] | undefined;
|
|
538
569
|
page?: number | undefined;
|
|
539
570
|
per_page?: number | undefined;
|
|
540
571
|
since?: string | undefined;
|
|
@@ -599,6 +630,10 @@ export declare const ListOrdersResponseSchema: z.ZodObject<{
|
|
|
599
630
|
};
|
|
600
631
|
data: Record<string, unknown>[];
|
|
601
632
|
}>;
|
|
633
|
+
/**
|
|
634
|
+
* Order filter attribute keys (standard fields)
|
|
635
|
+
*/
|
|
636
|
+
export type OrderFilterAttribute = "name" | "company_name" | "contact_name" | "payment_status" | "fulfillment_status" | "total_amount" | "currency_code" | "source" | "created_at" | "updated_at" | "line_item_part_number" | "line_item_description" | (string & {});
|
|
602
637
|
/**
|
|
603
638
|
* TypeScript Types (inferred from Zod schemas)
|
|
604
639
|
*/
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../resources/orders/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AAGH,eAAO,MAAM,WAAW,wCAAwB,CAAC;AAGjD,eAAO,MAAM,mBAAmB,mCAAiC,CAAC;AAElE,eAAO,MAAM,mBAAmB,4GAQ9B,CAAC;AAEH,eAAO,MAAM,uBAAuB,4EAKlC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAI9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;EAE9B,CAAC;AAGH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,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"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { FilterConditionSchema } from "../filters.js";
|
|
2
3
|
/**
|
|
3
4
|
* Zod Schemas for Orders
|
|
4
5
|
*/
|
|
@@ -83,7 +84,8 @@ export const ListOrdersParamsSchema = z.object({
|
|
|
83
84
|
since: z.string().optional(),
|
|
84
85
|
until: z.string().optional(),
|
|
85
86
|
sort: z.string().optional(),
|
|
86
|
-
|
|
87
|
+
/** Filter conditions array */
|
|
88
|
+
filters: z.array(FilterConditionSchema).optional(),
|
|
87
89
|
});
|
|
88
90
|
// List orders response meta schema
|
|
89
91
|
export const OrdersMetaSchema = z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../resources/orders/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../resources/orders/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEtD;;GAEG;AAEH,mDAAmD;AACnD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAEjD,eAAe;AACf,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;AAElE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC;IACxC,SAAS;IACT,YAAY;IACZ,MAAM;IACN,oBAAoB;IACpB,UAAU;IACV,QAAQ;IACR,gBAAgB;CACjB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC5C,aAAa;IACb,qBAAqB;IACrB,WAAW;IACX,UAAU;CACX,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,UAAU,EA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