@modainteract/moda-interact-shared 5.5.0 → 5.6.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.
- package/dist/chunk-KIHGDO35.js +148 -0
- package/dist/chunk-KIHGDO35.js.map +1 -0
- package/dist/{chunk-BDGLKOCW.js → chunk-S42O2OCG.js} +62 -2
- package/dist/chunk-S42O2OCG.js.map +1 -0
- package/dist/{chunk-XB5NIOKJ.js → chunk-WONND3OK.js} +3 -1
- package/dist/chunk-WONND3OK.js.map +1 -0
- package/dist/commerce/index.d.ts +5 -3
- package/dist/commerce/index.js +16 -2
- package/dist/commerce/index.js.map +1 -1
- package/dist/commerce/model/node.d.ts +3 -2
- package/dist/commerce/model/node.js +2 -2
- package/dist/commerce/presentation/index.d.ts +323 -0
- package/dist/commerce/presentation/index.js +594 -0
- package/dist/commerce/presentation/index.js.map +1 -0
- package/dist/commerce/runner/index.d.ts +4 -3
- package/dist/commerce/runner/index.js +62 -20
- package/dist/commerce/runner/index.js.map +1 -1
- package/dist/product-context-D3FuI6ah.d.ts +746 -0
- package/dist/{response-C1JsiFoO.d.ts → response-Cs4zC3d3.d.ts} +140 -707
- package/dist/{types-Ds5QJ621.d.ts → types-ByoKuP90.d.ts} +6 -2
- package/package.json +7 -2
- package/dist/chunk-BDGLKOCW.js.map +0 -1
- package/dist/chunk-BYAI6W7T.js +0 -97
- package/dist/chunk-BYAI6W7T.js.map +0 -1
- package/dist/chunk-XB5NIOKJ.js.map +0 -1
|
@@ -62,705 +62,6 @@ declare const CommercePurposeOutputSchemaSchema: z.ZodCustom<CommercePurposeOutp
|
|
|
62
62
|
* result without projection, coercion or changing existing generic Details users. */
|
|
63
63
|
declare function compileCommercePurposeOutputSchema(raw: unknown): z.ZodCustom<Record<string, unknown>, Record<string, unknown>>;
|
|
64
64
|
|
|
65
|
-
declare const ToolNameSchema: z.ZodString;
|
|
66
|
-
declare const CommerceExecutionPurposeSchema: z.ZodLiteral<"INITIAL_RECOVERY_OUTREACH">;
|
|
67
|
-
declare const CommercePurposeProfileSchema: z.ZodPipe<z.ZodObject<{
|
|
68
|
-
purpose: z.ZodLiteral<"INITIAL_RECOVERY_OUTREACH">;
|
|
69
|
-
featureId: z.ZodString;
|
|
70
|
-
releaseId: z.ZodString;
|
|
71
|
-
behaviourPrompt: z.ZodString;
|
|
72
|
-
capabilities: z.ZodArray<z.ZodObject<{
|
|
73
|
-
capabilityId: z.ZodString;
|
|
74
|
-
toolId: z.ZodString;
|
|
75
|
-
revisionId: z.ZodString;
|
|
76
|
-
name: z.ZodString;
|
|
77
|
-
position: z.ZodNumber;
|
|
78
|
-
inputSchema: z.ZodCustom<SubsetSchema, SubsetSchema>;
|
|
79
|
-
outputSchema: z.ZodCustom<CommercePurposeOutputSchema, CommercePurposeOutputSchema>;
|
|
80
|
-
}, z.core.$strict>>;
|
|
81
|
-
}, z.core.$strict>, z.ZodTransform<{
|
|
82
|
-
purpose: "INITIAL_RECOVERY_OUTREACH";
|
|
83
|
-
featureId: string;
|
|
84
|
-
releaseId: string;
|
|
85
|
-
behaviourPrompt: string;
|
|
86
|
-
capabilities: {
|
|
87
|
-
capabilityId: string;
|
|
88
|
-
toolId: string;
|
|
89
|
-
revisionId: string;
|
|
90
|
-
name: string;
|
|
91
|
-
position: number;
|
|
92
|
-
inputSchema: SubsetSchema;
|
|
93
|
-
outputSchema: CommercePurposeOutputSchema;
|
|
94
|
-
}[];
|
|
95
|
-
}, {
|
|
96
|
-
purpose: "INITIAL_RECOVERY_OUTREACH";
|
|
97
|
-
featureId: string;
|
|
98
|
-
releaseId: string;
|
|
99
|
-
behaviourPrompt: string;
|
|
100
|
-
capabilities: {
|
|
101
|
-
capabilityId: string;
|
|
102
|
-
toolId: string;
|
|
103
|
-
revisionId: string;
|
|
104
|
-
name: string;
|
|
105
|
-
position: number;
|
|
106
|
-
inputSchema: SubsetSchema;
|
|
107
|
-
outputSchema: CommercePurposeOutputSchema;
|
|
108
|
-
}[];
|
|
109
|
-
}>>;
|
|
110
|
-
/** New outreach callers must resolve a present validated snapshot; legacy conversation parsing remains optional. */
|
|
111
|
-
declare function requireCommercePurposeProfile(raw: unknown): {
|
|
112
|
-
purpose: "INITIAL_RECOVERY_OUTREACH";
|
|
113
|
-
featureId: string;
|
|
114
|
-
releaseId: string;
|
|
115
|
-
behaviourPrompt: string;
|
|
116
|
-
capabilities: {
|
|
117
|
-
capabilityId: string;
|
|
118
|
-
toolId: string;
|
|
119
|
-
revisionId: string;
|
|
120
|
-
name: string;
|
|
121
|
-
position: number;
|
|
122
|
-
inputSchema: SubsetSchema;
|
|
123
|
-
outputSchema: CommercePurposeOutputSchema;
|
|
124
|
-
}[];
|
|
125
|
-
};
|
|
126
|
-
type CommerceExecutionPurpose = z.infer<typeof CommerceExecutionPurposeSchema>;
|
|
127
|
-
type CommercePurposeProfile = z.infer<typeof CommercePurposeProfileSchema>;
|
|
128
|
-
declare const PublishedGrantedToolSchema: z.ZodObject<{
|
|
129
|
-
toolId: z.ZodString;
|
|
130
|
-
toolRevisionId: z.ZodString;
|
|
131
|
-
toolName: z.ZodString;
|
|
132
|
-
definitionVersion: z.ZodString;
|
|
133
|
-
capabilityKeys: z.ZodArray<z.ZodString>;
|
|
134
|
-
}, z.core.$strict>;
|
|
135
|
-
declare const PublishedToolDescriptorSchema: z.ZodObject<{
|
|
136
|
-
toolId: z.ZodString;
|
|
137
|
-
toolRevisionId: z.ZodString;
|
|
138
|
-
name: z.ZodString;
|
|
139
|
-
definitionVersion: z.ZodString;
|
|
140
|
-
description: z.ZodString;
|
|
141
|
-
inputSchema: z.ZodCustom<SubsetSchema, SubsetSchema>;
|
|
142
|
-
}, z.core.$strict>;
|
|
143
|
-
declare const CommerceBuiltInToolNameSchema: z.ZodEnum<{
|
|
144
|
-
commerce_get_discount_options: "commerce_get_discount_options";
|
|
145
|
-
commerce_get_discount_details: "commerce_get_discount_details";
|
|
146
|
-
}>;
|
|
147
|
-
declare const CommerceBuiltInToolGrantSchema: z.ZodObject<{
|
|
148
|
-
kind: z.ZodEnum<{
|
|
149
|
-
BUILT_IN: "BUILT_IN";
|
|
150
|
-
}>;
|
|
151
|
-
toolName: z.ZodEnum<{
|
|
152
|
-
commerce_get_discount_options: "commerce_get_discount_options";
|
|
153
|
-
commerce_get_discount_details: "commerce_get_discount_details";
|
|
154
|
-
}>;
|
|
155
|
-
definitionVersion: z.ZodEnum<{
|
|
156
|
-
"2.0.0": "2.0.0";
|
|
157
|
-
}>;
|
|
158
|
-
}, z.core.$strict>;
|
|
159
|
-
declare const CommerceBuiltInToolDescriptorSchema: z.ZodObject<{
|
|
160
|
-
kind: z.ZodEnum<{
|
|
161
|
-
BUILT_IN: "BUILT_IN";
|
|
162
|
-
}>;
|
|
163
|
-
name: z.ZodEnum<{
|
|
164
|
-
commerce_get_discount_options: "commerce_get_discount_options";
|
|
165
|
-
commerce_get_discount_details: "commerce_get_discount_details";
|
|
166
|
-
}>;
|
|
167
|
-
definitionVersion: z.ZodEnum<{
|
|
168
|
-
"2.0.0": "2.0.0";
|
|
169
|
-
}>;
|
|
170
|
-
description: z.ZodString;
|
|
171
|
-
inputSchema: z.ZodCustom<SubsetSchema, SubsetSchema>;
|
|
172
|
-
}, z.core.$strict>;
|
|
173
|
-
type PublishedGrantedTool = z.infer<typeof PublishedGrantedToolSchema>;
|
|
174
|
-
type PublishedToolDescriptor = z.infer<typeof PublishedToolDescriptorSchema>;
|
|
175
|
-
type CommerceBuiltInToolGrant = z.infer<typeof CommerceBuiltInToolGrantSchema>;
|
|
176
|
-
type CommerceBuiltInToolDescriptor = z.infer<typeof CommerceBuiltInToolDescriptorSchema>;
|
|
177
|
-
declare const GrantedToolSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
178
|
-
toolId: z.ZodString;
|
|
179
|
-
toolRevisionId: z.ZodString;
|
|
180
|
-
toolName: z.ZodString;
|
|
181
|
-
definitionVersion: z.ZodString;
|
|
182
|
-
capabilityKeys: z.ZodArray<z.ZodString>;
|
|
183
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
184
|
-
kind: z.ZodEnum<{
|
|
185
|
-
BUILT_IN: "BUILT_IN";
|
|
186
|
-
}>;
|
|
187
|
-
toolName: z.ZodEnum<{
|
|
188
|
-
commerce_get_discount_options: "commerce_get_discount_options";
|
|
189
|
-
commerce_get_discount_details: "commerce_get_discount_details";
|
|
190
|
-
}>;
|
|
191
|
-
definitionVersion: z.ZodEnum<{
|
|
192
|
-
"2.0.0": "2.0.0";
|
|
193
|
-
}>;
|
|
194
|
-
}, z.core.$strict>]>;
|
|
195
|
-
declare const ToolDescriptorSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
196
|
-
toolId: z.ZodString;
|
|
197
|
-
toolRevisionId: z.ZodString;
|
|
198
|
-
name: z.ZodString;
|
|
199
|
-
definitionVersion: z.ZodString;
|
|
200
|
-
description: z.ZodString;
|
|
201
|
-
inputSchema: z.ZodCustom<SubsetSchema, SubsetSchema>;
|
|
202
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
203
|
-
kind: z.ZodEnum<{
|
|
204
|
-
BUILT_IN: "BUILT_IN";
|
|
205
|
-
}>;
|
|
206
|
-
name: z.ZodEnum<{
|
|
207
|
-
commerce_get_discount_options: "commerce_get_discount_options";
|
|
208
|
-
commerce_get_discount_details: "commerce_get_discount_details";
|
|
209
|
-
}>;
|
|
210
|
-
definitionVersion: z.ZodEnum<{
|
|
211
|
-
"2.0.0": "2.0.0";
|
|
212
|
-
}>;
|
|
213
|
-
description: z.ZodString;
|
|
214
|
-
inputSchema: z.ZodCustom<SubsetSchema, SubsetSchema>;
|
|
215
|
-
}, z.core.$strict>]>;
|
|
216
|
-
declare const GrantedToolsSchema: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
217
|
-
toolId: z.ZodString;
|
|
218
|
-
toolRevisionId: z.ZodString;
|
|
219
|
-
toolName: z.ZodString;
|
|
220
|
-
definitionVersion: z.ZodString;
|
|
221
|
-
capabilityKeys: z.ZodArray<z.ZodString>;
|
|
222
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
223
|
-
kind: z.ZodEnum<{
|
|
224
|
-
BUILT_IN: "BUILT_IN";
|
|
225
|
-
}>;
|
|
226
|
-
toolName: z.ZodEnum<{
|
|
227
|
-
commerce_get_discount_options: "commerce_get_discount_options";
|
|
228
|
-
commerce_get_discount_details: "commerce_get_discount_details";
|
|
229
|
-
}>;
|
|
230
|
-
definitionVersion: z.ZodEnum<{
|
|
231
|
-
"2.0.0": "2.0.0";
|
|
232
|
-
}>;
|
|
233
|
-
}, z.core.$strict>]>>;
|
|
234
|
-
declare const isBuiltInTool: <T extends GrantedTool | ToolDescriptor>(value: T) => value is Extract<T, {
|
|
235
|
-
kind: "BUILT_IN";
|
|
236
|
-
}>;
|
|
237
|
-
declare const POLICY_OPERATIONS: readonly ["taxonomy.resolveCategories", "products.search", "products.get", "shipping.getInformation", "recovery.getBasket", "shopify.searchProducts", "discounts.getOptions", "discounts.getDetails", "discounts.evaluate", "products.findQualifying", "products.findSimilar"];
|
|
238
|
-
declare const ExternalHttpExecutionSchema: z.ZodObject<{
|
|
239
|
-
kind: z.ZodLiteral<"EXTERNAL_HTTP">;
|
|
240
|
-
executorVersion: z.ZodLiteral<"1.0.0">;
|
|
241
|
-
connectionRevisionId: z.ZodString;
|
|
242
|
-
method: z.ZodLiteral<"GET">;
|
|
243
|
-
path: z.ZodString;
|
|
244
|
-
query: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
245
|
-
input: z.ZodString;
|
|
246
|
-
omitIfMissing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
247
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
248
|
-
literal: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
249
|
-
}, z.core.$strict>]>>;
|
|
250
|
-
responseFormat: z.ZodObject<{
|
|
251
|
-
mode: z.ZodEnum<{
|
|
252
|
-
JSON: "JSON";
|
|
253
|
-
TEXT: "TEXT";
|
|
254
|
-
}>;
|
|
255
|
-
mediaTypes: z.ZodArray<z.ZodString>;
|
|
256
|
-
}, z.core.$strict>;
|
|
257
|
-
resultPath: z.ZodString;
|
|
258
|
-
responseProcessing: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
259
|
-
kind: z.ZodLiteral<"OBJECT">;
|
|
260
|
-
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
261
|
-
path: z.ZodString;
|
|
262
|
-
omitIfMissing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
263
|
-
}, z.core.$strict>>;
|
|
264
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
265
|
-
kind: z.ZodLiteral<"LIST">;
|
|
266
|
-
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
267
|
-
path: z.ZodString;
|
|
268
|
-
omitIfMissing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
269
|
-
}, z.core.$strict>>;
|
|
270
|
-
filters: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
271
|
-
path: z.ZodString;
|
|
272
|
-
op: z.ZodEnum<{
|
|
273
|
-
GT: "GT";
|
|
274
|
-
LT: "LT";
|
|
275
|
-
NE: "NE";
|
|
276
|
-
EQ: "EQ";
|
|
277
|
-
GTE: "GTE";
|
|
278
|
-
LTE: "LTE";
|
|
279
|
-
CONTAINS: "CONTAINS";
|
|
280
|
-
STARTS_WITH: "STARTS_WITH";
|
|
281
|
-
}>;
|
|
282
|
-
value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodNull]>;
|
|
283
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
284
|
-
path: z.ZodString;
|
|
285
|
-
op: z.ZodLiteral<"IN">;
|
|
286
|
-
values: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodNull]>>;
|
|
287
|
-
}, z.core.$strict>], "op">>;
|
|
288
|
-
sort: z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
289
|
-
path: z.ZodString;
|
|
290
|
-
direction: z.ZodEnum<{
|
|
291
|
-
ASC: "ASC";
|
|
292
|
-
DESC: "DESC";
|
|
293
|
-
}>;
|
|
294
|
-
}, z.core.$strict>]>;
|
|
295
|
-
limit: z.ZodInt;
|
|
296
|
-
}, z.core.$strict>]>, z.ZodObject<{
|
|
297
|
-
kind: z.ZodLiteral<"JAVASCRIPT">;
|
|
298
|
-
runtimeVersion: z.ZodLiteral<"quickjs-sync.v1">;
|
|
299
|
-
source: z.ZodString;
|
|
300
|
-
}, z.core.$strict>]>;
|
|
301
|
-
resultSchema: z.ZodCustom<SubsetSchema, SubsetSchema>;
|
|
302
|
-
}, z.core.$strict>;
|
|
303
|
-
declare const CommerceExecutionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
304
|
-
kind: z.ZodLiteral<"SHOPIFY_STOREFRONT_QUERY">;
|
|
305
|
-
executorVersion: z.ZodLiteral<"1.0.0">;
|
|
306
|
-
apiVersion: z.ZodLiteral<"2026-07">;
|
|
307
|
-
schemaHash: z.ZodString;
|
|
308
|
-
document: z.ZodString;
|
|
309
|
-
operationName: z.ZodString;
|
|
310
|
-
variables: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
311
|
-
input: z.ZodString;
|
|
312
|
-
omitIfMissing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
313
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
314
|
-
literal: z.ZodUnknown;
|
|
315
|
-
}, z.core.$strict>]>>;
|
|
316
|
-
resultPath: z.ZodString;
|
|
317
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
318
|
-
kind: z.ZodLiteral<"POLICY_OPERATION">;
|
|
319
|
-
operation: z.ZodEnum<{
|
|
320
|
-
"taxonomy.resolveCategories": "taxonomy.resolveCategories";
|
|
321
|
-
"products.search": "products.search";
|
|
322
|
-
"products.get": "products.get";
|
|
323
|
-
"shipping.getInformation": "shipping.getInformation";
|
|
324
|
-
"recovery.getBasket": "recovery.getBasket";
|
|
325
|
-
"shopify.searchProducts": "shopify.searchProducts";
|
|
326
|
-
"discounts.getOptions": "discounts.getOptions";
|
|
327
|
-
"discounts.getDetails": "discounts.getDetails";
|
|
328
|
-
"discounts.evaluate": "discounts.evaluate";
|
|
329
|
-
"products.findQualifying": "products.findQualifying";
|
|
330
|
-
"products.findSimilar": "products.findSimilar";
|
|
331
|
-
}>;
|
|
332
|
-
operationVersion: z.ZodLiteral<"1.0.0">;
|
|
333
|
-
arguments: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
334
|
-
input: z.ZodString;
|
|
335
|
-
omitIfMissing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
336
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
337
|
-
literal: z.ZodUnknown;
|
|
338
|
-
}, z.core.$strict>]>>;
|
|
339
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
340
|
-
kind: z.ZodLiteral<"EXTERNAL_HTTP">;
|
|
341
|
-
executorVersion: z.ZodLiteral<"1.0.0">;
|
|
342
|
-
connectionRevisionId: z.ZodString;
|
|
343
|
-
method: z.ZodLiteral<"GET">;
|
|
344
|
-
path: z.ZodString;
|
|
345
|
-
query: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
346
|
-
input: z.ZodString;
|
|
347
|
-
omitIfMissing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
348
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
349
|
-
literal: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
350
|
-
}, z.core.$strict>]>>;
|
|
351
|
-
responseFormat: z.ZodObject<{
|
|
352
|
-
mode: z.ZodEnum<{
|
|
353
|
-
JSON: "JSON";
|
|
354
|
-
TEXT: "TEXT";
|
|
355
|
-
}>;
|
|
356
|
-
mediaTypes: z.ZodArray<z.ZodString>;
|
|
357
|
-
}, z.core.$strict>;
|
|
358
|
-
resultPath: z.ZodString;
|
|
359
|
-
responseProcessing: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
360
|
-
kind: z.ZodLiteral<"OBJECT">;
|
|
361
|
-
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
362
|
-
path: z.ZodString;
|
|
363
|
-
omitIfMissing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
364
|
-
}, z.core.$strict>>;
|
|
365
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
366
|
-
kind: z.ZodLiteral<"LIST">;
|
|
367
|
-
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
368
|
-
path: z.ZodString;
|
|
369
|
-
omitIfMissing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
370
|
-
}, z.core.$strict>>;
|
|
371
|
-
filters: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
372
|
-
path: z.ZodString;
|
|
373
|
-
op: z.ZodEnum<{
|
|
374
|
-
GT: "GT";
|
|
375
|
-
LT: "LT";
|
|
376
|
-
NE: "NE";
|
|
377
|
-
EQ: "EQ";
|
|
378
|
-
GTE: "GTE";
|
|
379
|
-
LTE: "LTE";
|
|
380
|
-
CONTAINS: "CONTAINS";
|
|
381
|
-
STARTS_WITH: "STARTS_WITH";
|
|
382
|
-
}>;
|
|
383
|
-
value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodNull]>;
|
|
384
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
385
|
-
path: z.ZodString;
|
|
386
|
-
op: z.ZodLiteral<"IN">;
|
|
387
|
-
values: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodNull]>>;
|
|
388
|
-
}, z.core.$strict>], "op">>;
|
|
389
|
-
sort: z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
390
|
-
path: z.ZodString;
|
|
391
|
-
direction: z.ZodEnum<{
|
|
392
|
-
ASC: "ASC";
|
|
393
|
-
DESC: "DESC";
|
|
394
|
-
}>;
|
|
395
|
-
}, z.core.$strict>]>;
|
|
396
|
-
limit: z.ZodInt;
|
|
397
|
-
}, z.core.$strict>]>, z.ZodObject<{
|
|
398
|
-
kind: z.ZodLiteral<"JAVASCRIPT">;
|
|
399
|
-
runtimeVersion: z.ZodLiteral<"quickjs-sync.v1">;
|
|
400
|
-
source: z.ZodString;
|
|
401
|
-
}, z.core.$strict>]>;
|
|
402
|
-
resultSchema: z.ZodCustom<SubsetSchema, SubsetSchema>;
|
|
403
|
-
}, z.core.$strict>], "kind">;
|
|
404
|
-
type ExternalHttpExecution = Extract<z.infer<typeof CommerceExecutionSchema>, {
|
|
405
|
-
kind: "EXTERNAL_HTTP";
|
|
406
|
-
}>;
|
|
407
|
-
declare const ResponseTemplateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
408
|
-
kind: z.ZodLiteral<"text">;
|
|
409
|
-
text: z.ZodString;
|
|
410
|
-
unavailable: z.ZodString;
|
|
411
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
412
|
-
kind: z.ZodLiteral<"items">;
|
|
413
|
-
itemsPath: z.ZodString;
|
|
414
|
-
item: z.ZodString;
|
|
415
|
-
empty: z.ZodString;
|
|
416
|
-
unavailable: z.ZodString;
|
|
417
|
-
}, z.core.$strict>], "kind">;
|
|
418
|
-
declare const CommerceToolDefinitionSchema: z.ZodObject<{
|
|
419
|
-
inputSchema: z.ZodCustom<SubsetSchema, SubsetSchema>;
|
|
420
|
-
execution: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
421
|
-
kind: z.ZodLiteral<"SHOPIFY_STOREFRONT_QUERY">;
|
|
422
|
-
executorVersion: z.ZodLiteral<"1.0.0">;
|
|
423
|
-
apiVersion: z.ZodLiteral<"2026-07">;
|
|
424
|
-
schemaHash: z.ZodString;
|
|
425
|
-
document: z.ZodString;
|
|
426
|
-
operationName: z.ZodString;
|
|
427
|
-
variables: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
428
|
-
input: z.ZodString;
|
|
429
|
-
omitIfMissing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
430
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
431
|
-
literal: z.ZodUnknown;
|
|
432
|
-
}, z.core.$strict>]>>;
|
|
433
|
-
resultPath: z.ZodString;
|
|
434
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
435
|
-
kind: z.ZodLiteral<"POLICY_OPERATION">;
|
|
436
|
-
operation: z.ZodEnum<{
|
|
437
|
-
"taxonomy.resolveCategories": "taxonomy.resolveCategories";
|
|
438
|
-
"products.search": "products.search";
|
|
439
|
-
"products.get": "products.get";
|
|
440
|
-
"shipping.getInformation": "shipping.getInformation";
|
|
441
|
-
"recovery.getBasket": "recovery.getBasket";
|
|
442
|
-
"shopify.searchProducts": "shopify.searchProducts";
|
|
443
|
-
"discounts.getOptions": "discounts.getOptions";
|
|
444
|
-
"discounts.getDetails": "discounts.getDetails";
|
|
445
|
-
"discounts.evaluate": "discounts.evaluate";
|
|
446
|
-
"products.findQualifying": "products.findQualifying";
|
|
447
|
-
"products.findSimilar": "products.findSimilar";
|
|
448
|
-
}>;
|
|
449
|
-
operationVersion: z.ZodLiteral<"1.0.0">;
|
|
450
|
-
arguments: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
451
|
-
input: z.ZodString;
|
|
452
|
-
omitIfMissing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
453
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
454
|
-
literal: z.ZodUnknown;
|
|
455
|
-
}, z.core.$strict>]>>;
|
|
456
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
457
|
-
kind: z.ZodLiteral<"EXTERNAL_HTTP">;
|
|
458
|
-
executorVersion: z.ZodLiteral<"1.0.0">;
|
|
459
|
-
connectionRevisionId: z.ZodString;
|
|
460
|
-
method: z.ZodLiteral<"GET">;
|
|
461
|
-
path: z.ZodString;
|
|
462
|
-
query: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
463
|
-
input: z.ZodString;
|
|
464
|
-
omitIfMissing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
465
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
466
|
-
literal: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
467
|
-
}, z.core.$strict>]>>;
|
|
468
|
-
responseFormat: z.ZodObject<{
|
|
469
|
-
mode: z.ZodEnum<{
|
|
470
|
-
JSON: "JSON";
|
|
471
|
-
TEXT: "TEXT";
|
|
472
|
-
}>;
|
|
473
|
-
mediaTypes: z.ZodArray<z.ZodString>;
|
|
474
|
-
}, z.core.$strict>;
|
|
475
|
-
resultPath: z.ZodString;
|
|
476
|
-
responseProcessing: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
|
|
477
|
-
kind: z.ZodLiteral<"OBJECT">;
|
|
478
|
-
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
479
|
-
path: z.ZodString;
|
|
480
|
-
omitIfMissing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
481
|
-
}, z.core.$strict>>;
|
|
482
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
483
|
-
kind: z.ZodLiteral<"LIST">;
|
|
484
|
-
fields: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
485
|
-
path: z.ZodString;
|
|
486
|
-
omitIfMissing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
487
|
-
}, z.core.$strict>>;
|
|
488
|
-
filters: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
489
|
-
path: z.ZodString;
|
|
490
|
-
op: z.ZodEnum<{
|
|
491
|
-
GT: "GT";
|
|
492
|
-
LT: "LT";
|
|
493
|
-
NE: "NE";
|
|
494
|
-
EQ: "EQ";
|
|
495
|
-
GTE: "GTE";
|
|
496
|
-
LTE: "LTE";
|
|
497
|
-
CONTAINS: "CONTAINS";
|
|
498
|
-
STARTS_WITH: "STARTS_WITH";
|
|
499
|
-
}>;
|
|
500
|
-
value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodNull]>;
|
|
501
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
502
|
-
path: z.ZodString;
|
|
503
|
-
op: z.ZodLiteral<"IN">;
|
|
504
|
-
values: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>, z.ZodNull]>>;
|
|
505
|
-
}, z.core.$strict>], "op">>;
|
|
506
|
-
sort: z.ZodUnion<readonly [z.ZodNull, z.ZodObject<{
|
|
507
|
-
path: z.ZodString;
|
|
508
|
-
direction: z.ZodEnum<{
|
|
509
|
-
ASC: "ASC";
|
|
510
|
-
DESC: "DESC";
|
|
511
|
-
}>;
|
|
512
|
-
}, z.core.$strict>]>;
|
|
513
|
-
limit: z.ZodInt;
|
|
514
|
-
}, z.core.$strict>]>, z.ZodObject<{
|
|
515
|
-
kind: z.ZodLiteral<"JAVASCRIPT">;
|
|
516
|
-
runtimeVersion: z.ZodLiteral<"quickjs-sync.v1">;
|
|
517
|
-
source: z.ZodString;
|
|
518
|
-
}, z.core.$strict>]>;
|
|
519
|
-
resultSchema: z.ZodCustom<SubsetSchema, SubsetSchema>;
|
|
520
|
-
}, z.core.$strict>], "kind">;
|
|
521
|
-
responseTemplate: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
522
|
-
kind: z.ZodLiteral<"text">;
|
|
523
|
-
text: z.ZodString;
|
|
524
|
-
unavailable: z.ZodString;
|
|
525
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
526
|
-
kind: z.ZodLiteral<"items">;
|
|
527
|
-
itemsPath: z.ZodString;
|
|
528
|
-
item: z.ZodString;
|
|
529
|
-
empty: z.ZodString;
|
|
530
|
-
unavailable: z.ZodString;
|
|
531
|
-
}, z.core.$strict>], "kind">;
|
|
532
|
-
name: z.ZodString;
|
|
533
|
-
definitionVersion: z.ZodString;
|
|
534
|
-
description: z.ZodString;
|
|
535
|
-
}, z.core.$strict>;
|
|
536
|
-
declare const CommerceToolDraftDefinitionSchema: z.ZodObject<{
|
|
537
|
-
inputSchema: z.ZodUnknown;
|
|
538
|
-
execution: z.ZodUnknown;
|
|
539
|
-
responseTemplate: z.ZodUnknown;
|
|
540
|
-
name: z.ZodString;
|
|
541
|
-
definitionVersion: z.ZodString;
|
|
542
|
-
description: z.ZodString;
|
|
543
|
-
}, z.core.$strict>;
|
|
544
|
-
type CommerceToolDefinition = z.infer<typeof CommerceToolDefinitionSchema>;
|
|
545
|
-
type CommerceToolDraftDefinition = z.infer<typeof CommerceToolDraftDefinitionSchema>;
|
|
546
|
-
type GrantedTool = z.infer<typeof GrantedToolSchema>;
|
|
547
|
-
type ToolDescriptor = z.infer<typeof ToolDescriptorSchema>;
|
|
548
|
-
/** Commerce owns schema-backed GraphQL parsing, restrictions and output derivation. */
|
|
549
|
-
interface CommerceDefinitionCompiler {
|
|
550
|
-
compile(execution: CommerceToolDefinition["execution"], input: SubsetSchema): {
|
|
551
|
-
outputSchema: SubsetSchema;
|
|
552
|
-
validateMappedArguments: (mapping: CommerceToolDefinition["execution"]) => boolean;
|
|
553
|
-
};
|
|
554
|
-
}
|
|
555
|
-
declare function validateDefinitionForPublication(raw: unknown, compiler: CommerceDefinitionCompiler): {
|
|
556
|
-
inputSchema: SubsetSchema;
|
|
557
|
-
execution: {
|
|
558
|
-
kind: "EXTERNAL_HTTP";
|
|
559
|
-
executorVersion: "1.0.0";
|
|
560
|
-
connectionRevisionId: string;
|
|
561
|
-
method: "GET";
|
|
562
|
-
path: string;
|
|
563
|
-
query: Record<string, {
|
|
564
|
-
input: string;
|
|
565
|
-
omitIfMissing?: true | undefined;
|
|
566
|
-
} | {
|
|
567
|
-
literal: string | number | boolean;
|
|
568
|
-
}>;
|
|
569
|
-
responseFormat: {
|
|
570
|
-
mode: "JSON" | "TEXT";
|
|
571
|
-
mediaTypes: string[];
|
|
572
|
-
};
|
|
573
|
-
resultPath: string;
|
|
574
|
-
responseProcessing: {
|
|
575
|
-
kind: "OBJECT";
|
|
576
|
-
fields: Record<string, {
|
|
577
|
-
path: string;
|
|
578
|
-
omitIfMissing?: true | undefined;
|
|
579
|
-
}>;
|
|
580
|
-
} | {
|
|
581
|
-
kind: "LIST";
|
|
582
|
-
fields: Record<string, {
|
|
583
|
-
path: string;
|
|
584
|
-
omitIfMissing?: true | undefined;
|
|
585
|
-
}>;
|
|
586
|
-
filters: ({
|
|
587
|
-
path: string;
|
|
588
|
-
op: "GT" | "LT" | "NE" | "EQ" | "GTE" | "LTE" | "CONTAINS" | "STARTS_WITH";
|
|
589
|
-
value: string | number | boolean | null;
|
|
590
|
-
} | {
|
|
591
|
-
path: string;
|
|
592
|
-
op: "IN";
|
|
593
|
-
values: (string | number | boolean | null)[];
|
|
594
|
-
})[];
|
|
595
|
-
sort: {
|
|
596
|
-
path: string;
|
|
597
|
-
direction: "ASC" | "DESC";
|
|
598
|
-
} | null;
|
|
599
|
-
limit: number;
|
|
600
|
-
} | {
|
|
601
|
-
kind: "JAVASCRIPT";
|
|
602
|
-
runtimeVersion: "quickjs-sync.v1";
|
|
603
|
-
source: string;
|
|
604
|
-
};
|
|
605
|
-
resultSchema: SubsetSchema;
|
|
606
|
-
} | {
|
|
607
|
-
kind: "SHOPIFY_STOREFRONT_QUERY";
|
|
608
|
-
executorVersion: "1.0.0";
|
|
609
|
-
apiVersion: "2026-07";
|
|
610
|
-
schemaHash: string;
|
|
611
|
-
document: string;
|
|
612
|
-
operationName: string;
|
|
613
|
-
variables: Record<string, {
|
|
614
|
-
input: string;
|
|
615
|
-
omitIfMissing?: true | undefined;
|
|
616
|
-
} | {
|
|
617
|
-
literal: unknown;
|
|
618
|
-
}>;
|
|
619
|
-
resultPath: string;
|
|
620
|
-
} | {
|
|
621
|
-
kind: "POLICY_OPERATION";
|
|
622
|
-
operation: "taxonomy.resolveCategories" | "products.search" | "products.get" | "shipping.getInformation" | "recovery.getBasket" | "shopify.searchProducts" | "discounts.getOptions" | "discounts.getDetails" | "discounts.evaluate" | "products.findQualifying" | "products.findSimilar";
|
|
623
|
-
operationVersion: "1.0.0";
|
|
624
|
-
arguments: Record<string, {
|
|
625
|
-
input: string;
|
|
626
|
-
omitIfMissing?: true | undefined;
|
|
627
|
-
} | {
|
|
628
|
-
literal: unknown;
|
|
629
|
-
}>;
|
|
630
|
-
};
|
|
631
|
-
responseTemplate: {
|
|
632
|
-
kind: "text";
|
|
633
|
-
text: string;
|
|
634
|
-
unavailable: string;
|
|
635
|
-
} | {
|
|
636
|
-
kind: "items";
|
|
637
|
-
itemsPath: string;
|
|
638
|
-
item: string;
|
|
639
|
-
empty: string;
|
|
640
|
-
unavailable: string;
|
|
641
|
-
};
|
|
642
|
-
name: string;
|
|
643
|
-
definitionVersion: string;
|
|
644
|
-
description: string;
|
|
645
|
-
};
|
|
646
|
-
declare function definitionToMcpDescriptor(definition: CommerceToolDefinition): {
|
|
647
|
-
name: string;
|
|
648
|
-
description: string;
|
|
649
|
-
inputSchema: SubsetSchema;
|
|
650
|
-
};
|
|
651
|
-
declare function mapToolArguments(definition: CommerceToolDefinition, raw: unknown): Record<string, unknown>;
|
|
652
|
-
declare const toolHashInput: (definition: CommerceToolDefinition) => {
|
|
653
|
-
contractVersion: "commerce.v1";
|
|
654
|
-
definition: {
|
|
655
|
-
inputSchema: SubsetSchema;
|
|
656
|
-
execution: {
|
|
657
|
-
kind: "EXTERNAL_HTTP";
|
|
658
|
-
executorVersion: "1.0.0";
|
|
659
|
-
connectionRevisionId: string;
|
|
660
|
-
method: "GET";
|
|
661
|
-
path: string;
|
|
662
|
-
query: Record<string, {
|
|
663
|
-
input: string;
|
|
664
|
-
omitIfMissing?: true | undefined;
|
|
665
|
-
} | {
|
|
666
|
-
literal: string | number | boolean;
|
|
667
|
-
}>;
|
|
668
|
-
responseFormat: {
|
|
669
|
-
mode: "JSON" | "TEXT";
|
|
670
|
-
mediaTypes: string[];
|
|
671
|
-
};
|
|
672
|
-
resultPath: string;
|
|
673
|
-
responseProcessing: {
|
|
674
|
-
kind: "OBJECT";
|
|
675
|
-
fields: Record<string, {
|
|
676
|
-
path: string;
|
|
677
|
-
omitIfMissing?: true | undefined;
|
|
678
|
-
}>;
|
|
679
|
-
} | {
|
|
680
|
-
kind: "LIST";
|
|
681
|
-
fields: Record<string, {
|
|
682
|
-
path: string;
|
|
683
|
-
omitIfMissing?: true | undefined;
|
|
684
|
-
}>;
|
|
685
|
-
filters: ({
|
|
686
|
-
path: string;
|
|
687
|
-
op: "GT" | "LT" | "NE" | "EQ" | "GTE" | "LTE" | "CONTAINS" | "STARTS_WITH";
|
|
688
|
-
value: string | number | boolean | null;
|
|
689
|
-
} | {
|
|
690
|
-
path: string;
|
|
691
|
-
op: "IN";
|
|
692
|
-
values: (string | number | boolean | null)[];
|
|
693
|
-
})[];
|
|
694
|
-
sort: {
|
|
695
|
-
path: string;
|
|
696
|
-
direction: "ASC" | "DESC";
|
|
697
|
-
} | null;
|
|
698
|
-
limit: number;
|
|
699
|
-
} | {
|
|
700
|
-
kind: "JAVASCRIPT";
|
|
701
|
-
runtimeVersion: "quickjs-sync.v1";
|
|
702
|
-
source: string;
|
|
703
|
-
};
|
|
704
|
-
resultSchema: SubsetSchema;
|
|
705
|
-
} | {
|
|
706
|
-
kind: "SHOPIFY_STOREFRONT_QUERY";
|
|
707
|
-
executorVersion: "1.0.0";
|
|
708
|
-
apiVersion: "2026-07";
|
|
709
|
-
schemaHash: string;
|
|
710
|
-
document: string;
|
|
711
|
-
operationName: string;
|
|
712
|
-
variables: Record<string, {
|
|
713
|
-
input: string;
|
|
714
|
-
omitIfMissing?: true | undefined;
|
|
715
|
-
} | {
|
|
716
|
-
literal: unknown;
|
|
717
|
-
}>;
|
|
718
|
-
resultPath: string;
|
|
719
|
-
} | {
|
|
720
|
-
kind: "POLICY_OPERATION";
|
|
721
|
-
operation: "taxonomy.resolveCategories" | "products.search" | "products.get" | "shipping.getInformation" | "recovery.getBasket" | "shopify.searchProducts" | "discounts.getOptions" | "discounts.getDetails" | "discounts.evaluate" | "products.findQualifying" | "products.findSimilar";
|
|
722
|
-
operationVersion: "1.0.0";
|
|
723
|
-
arguments: Record<string, {
|
|
724
|
-
input: string;
|
|
725
|
-
omitIfMissing?: true | undefined;
|
|
726
|
-
} | {
|
|
727
|
-
literal: unknown;
|
|
728
|
-
}>;
|
|
729
|
-
};
|
|
730
|
-
responseTemplate: {
|
|
731
|
-
kind: "text";
|
|
732
|
-
text: string;
|
|
733
|
-
unavailable: string;
|
|
734
|
-
} | {
|
|
735
|
-
kind: "items";
|
|
736
|
-
itemsPath: string;
|
|
737
|
-
item: string;
|
|
738
|
-
empty: string;
|
|
739
|
-
unavailable: string;
|
|
740
|
-
};
|
|
741
|
-
name: string;
|
|
742
|
-
definitionVersion: string;
|
|
743
|
-
description: string;
|
|
744
|
-
};
|
|
745
|
-
};
|
|
746
|
-
/** Publication adapters supply the actual highest published version from persistence. */
|
|
747
|
-
declare function validateDefinitionVersion(proposed: string, highestPublished: string | null): boolean;
|
|
748
|
-
declare const CommerceToolIdentitySchema: z.ZodObject<{
|
|
749
|
-
id: z.ZodString;
|
|
750
|
-
name: z.ZodString;
|
|
751
|
-
enabled: z.ZodBoolean;
|
|
752
|
-
}, z.core.$strict>;
|
|
753
|
-
declare const CommerceToolRevisionIdentitySchema: z.ZodObject<{
|
|
754
|
-
toolId: z.ZodString;
|
|
755
|
-
toolRevisionId: z.ZodString;
|
|
756
|
-
definitionVersion: z.ZodString;
|
|
757
|
-
contentHash: z.ZodString;
|
|
758
|
-
}, z.core.$strict>;
|
|
759
|
-
declare const POLICY_OPERATION_DESCRIPTORS: {
|
|
760
|
-
operation: "taxonomy.resolveCategories" | "products.search" | "products.get" | "shipping.getInformation" | "recovery.getBasket" | "shopify.searchProducts" | "discounts.getOptions" | "discounts.getDetails" | "discounts.evaluate" | "products.findQualifying" | "products.findSimilar";
|
|
761
|
-
operationVersion: "1.0.0";
|
|
762
|
-
}[];
|
|
763
|
-
|
|
764
65
|
declare const CommerceTurnIdentitySchema: z.ZodObject<{
|
|
765
66
|
contractVersion: z.ZodLiteral<"commerce.v1">;
|
|
766
67
|
shopId: z.ZodString;
|
|
@@ -1024,7 +325,52 @@ declare const CommerceProductSaleEvidenceSchema: z.ZodObject<{
|
|
|
1024
325
|
observedAt: z.ZodISODateTime;
|
|
1025
326
|
}, z.core.$strict>;
|
|
1026
327
|
type CommerceProductSaleEvidence = z.infer<typeof CommerceProductSaleEvidenceSchema>;
|
|
328
|
+
/** Provider facts are bounded by omission, never by truncating factual labels. */
|
|
329
|
+
declare function normalizeCommerceProductOptions(raw: unknown): {
|
|
330
|
+
status: "AVAILABLE" | "NOT_PROVIDED" | "PARTIAL";
|
|
331
|
+
items: Array<{
|
|
332
|
+
name: string;
|
|
333
|
+
values: string[];
|
|
334
|
+
usedForVariants: boolean | null;
|
|
335
|
+
}>;
|
|
336
|
+
};
|
|
337
|
+
declare const CommerceProductOptionsSchema: z.ZodPreprocess<z.ZodObject<{
|
|
338
|
+
status: z.ZodEnum<{
|
|
339
|
+
AVAILABLE: "AVAILABLE";
|
|
340
|
+
NOT_PROVIDED: "NOT_PROVIDED";
|
|
341
|
+
PARTIAL: "PARTIAL";
|
|
342
|
+
}>;
|
|
343
|
+
items: z.ZodArray<z.ZodObject<{
|
|
344
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
345
|
+
values: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
|
|
346
|
+
usedForVariants: z.ZodNullable<z.ZodBoolean>;
|
|
347
|
+
}, z.core.$strict>>;
|
|
348
|
+
}, z.core.$strict>>;
|
|
349
|
+
declare function normalizeCommerceProductSelectedOptions(raw: unknown): Array<{
|
|
350
|
+
name: string;
|
|
351
|
+
value: string;
|
|
352
|
+
}>;
|
|
353
|
+
declare const CommerceProductSelectedOptionsSchema: z.ZodPreprocess<z.ZodArray<z.ZodObject<{
|
|
354
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
355
|
+
value: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
356
|
+
}, z.core.$strict>>>;
|
|
1027
357
|
declare const CommerceProductSchema: z.ZodObject<{
|
|
358
|
+
options: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
359
|
+
status: z.ZodEnum<{
|
|
360
|
+
AVAILABLE: "AVAILABLE";
|
|
361
|
+
NOT_PROVIDED: "NOT_PROVIDED";
|
|
362
|
+
PARTIAL: "PARTIAL";
|
|
363
|
+
}>;
|
|
364
|
+
items: z.ZodArray<z.ZodObject<{
|
|
365
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
366
|
+
values: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
|
|
367
|
+
usedForVariants: z.ZodNullable<z.ZodBoolean>;
|
|
368
|
+
}, z.core.$strict>>;
|
|
369
|
+
}, z.core.$strict>>>;
|
|
370
|
+
selectedOptions: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodObject<{
|
|
371
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
372
|
+
value: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
373
|
+
}, z.core.$strict>>>>;
|
|
1028
374
|
productId: z.ZodString;
|
|
1029
375
|
variantId: z.ZodNullable<z.ZodString>;
|
|
1030
376
|
title: z.ZodString;
|
|
@@ -1045,6 +391,7 @@ declare const CommerceProductSchema: z.ZodObject<{
|
|
|
1045
391
|
}, z.core.$strict>>>;
|
|
1046
392
|
observedAt: z.ZodISODateTime;
|
|
1047
393
|
}, z.core.$strict>;
|
|
394
|
+
type CommerceProduct = z.infer<typeof CommerceProductSchema>;
|
|
1048
395
|
declare const CommerceOfferSchema: z.ZodObject<{
|
|
1049
396
|
offerId: z.ZodString;
|
|
1050
397
|
title: z.ZodString;
|
|
@@ -1084,9 +431,9 @@ declare const CommerceDiscountConditionFactsSchema: z.ZodObject<{
|
|
|
1084
431
|
WOOCOMMERCE: "WOOCOMMERCE";
|
|
1085
432
|
}>;
|
|
1086
433
|
completeness: z.ZodEnum<{
|
|
434
|
+
PARTIAL: "PARTIAL";
|
|
1087
435
|
UNKNOWN: "UNKNOWN";
|
|
1088
436
|
COMPLETE: "COMPLETE";
|
|
1089
|
-
PARTIAL: "PARTIAL";
|
|
1090
437
|
}>;
|
|
1091
438
|
observedAt: z.ZodString;
|
|
1092
439
|
providerStatus: z.ZodString;
|
|
@@ -1176,9 +523,9 @@ declare const CommerceDiscountDetailsSchema: z.ZodObject<{
|
|
|
1176
523
|
WOOCOMMERCE: "WOOCOMMERCE";
|
|
1177
524
|
}>;
|
|
1178
525
|
completeness: z.ZodEnum<{
|
|
526
|
+
PARTIAL: "PARTIAL";
|
|
1179
527
|
UNKNOWN: "UNKNOWN";
|
|
1180
528
|
COMPLETE: "COMPLETE";
|
|
1181
|
-
PARTIAL: "PARTIAL";
|
|
1182
529
|
}>;
|
|
1183
530
|
observedAt: z.ZodString;
|
|
1184
531
|
providerStatus: z.ZodString;
|
|
@@ -1295,6 +642,22 @@ declare const CommerceEvidenceSchema: z.ZodObject<{
|
|
|
1295
642
|
type CommerceEvidence = z.infer<typeof CommerceEvidenceSchema>;
|
|
1296
643
|
declare const CommerceAlternativeSchema: z.ZodObject<{
|
|
1297
644
|
product: z.ZodObject<{
|
|
645
|
+
options: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
646
|
+
status: z.ZodEnum<{
|
|
647
|
+
AVAILABLE: "AVAILABLE";
|
|
648
|
+
NOT_PROVIDED: "NOT_PROVIDED";
|
|
649
|
+
PARTIAL: "PARTIAL";
|
|
650
|
+
}>;
|
|
651
|
+
items: z.ZodArray<z.ZodObject<{
|
|
652
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
653
|
+
values: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
|
|
654
|
+
usedForVariants: z.ZodNullable<z.ZodBoolean>;
|
|
655
|
+
}, z.core.$strict>>;
|
|
656
|
+
}, z.core.$strict>>>;
|
|
657
|
+
selectedOptions: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodObject<{
|
|
658
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
659
|
+
value: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
660
|
+
}, z.core.$strict>>>>;
|
|
1298
661
|
productId: z.ZodString;
|
|
1299
662
|
variantId: z.ZodNullable<z.ZodString>;
|
|
1300
663
|
title: z.ZodString;
|
|
@@ -1507,13 +870,19 @@ declare const CommerceResponseDispositionSchema: z.ZodEnum<{
|
|
|
1507
870
|
STANDARD: "STANDARD";
|
|
1508
871
|
OUT_OF_SCOPE_REDIRECT: "OUT_OF_SCOPE_REDIRECT";
|
|
1509
872
|
SHIPPING_INFORMATION_UNVERIFIED: "SHIPPING_INFORMATION_UNVERIFIED";
|
|
873
|
+
PRODUCT_OPTIONS: "PRODUCT_OPTIONS";
|
|
1510
874
|
}>;
|
|
1511
875
|
type CommerceResponseDisposition = z.infer<typeof CommerceResponseDispositionSchema>;
|
|
1512
876
|
declare const CommerceAnswerPresentationSelectionSchema: z.ZodObject<{
|
|
877
|
+
productOptionSelections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
878
|
+
productId: z.ZodString;
|
|
879
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
880
|
+
}, z.core.$strict>>>;
|
|
1513
881
|
responseDisposition: z.ZodOptional<z.ZodEnum<{
|
|
1514
882
|
STANDARD: "STANDARD";
|
|
1515
883
|
OUT_OF_SCOPE_REDIRECT: "OUT_OF_SCOPE_REDIRECT";
|
|
1516
884
|
SHIPPING_INFORMATION_UNVERIFIED: "SHIPPING_INFORMATION_UNVERIFIED";
|
|
885
|
+
PRODUCT_OPTIONS: "PRODUCT_OPTIONS";
|
|
1517
886
|
}>>;
|
|
1518
887
|
shippingInformationSelection: z.ZodOptional<z.ZodObject<{
|
|
1519
888
|
productId: z.ZodNullable<z.ZodString>;
|
|
@@ -1534,9 +903,9 @@ declare const CommerceShippingInformationSchema: z.ZodObject<{
|
|
|
1534
903
|
observedAt: z.ZodISODateTime;
|
|
1535
904
|
product: z.ZodObject<{
|
|
1536
905
|
status: z.ZodEnum<{
|
|
906
|
+
AVAILABLE: "AVAILABLE";
|
|
1537
907
|
NOT_REQUESTED: "NOT_REQUESTED";
|
|
1538
908
|
VARIANT_REQUIRED: "VARIANT_REQUIRED";
|
|
1539
|
-
AVAILABLE: "AVAILABLE";
|
|
1540
909
|
}>;
|
|
1541
910
|
productId: z.ZodNullable<z.ZodString>;
|
|
1542
911
|
variantId: z.ZodNullable<z.ZodString>;
|
|
@@ -1562,8 +931,8 @@ declare const CommerceShippingInformationSchema: z.ZodObject<{
|
|
|
1562
931
|
}, z.core.$strict>;
|
|
1563
932
|
policy: z.ZodObject<{
|
|
1564
933
|
status: z.ZodEnum<{
|
|
1565
|
-
UNSUPPORTED: "UNSUPPORTED";
|
|
1566
934
|
AVAILABLE: "AVAILABLE";
|
|
935
|
+
UNSUPPORTED: "UNSUPPORTED";
|
|
1567
936
|
NOT_CONFIGURED: "NOT_CONFIGURED";
|
|
1568
937
|
SCOPE_NOT_GRANTED: "SCOPE_NOT_GRANTED";
|
|
1569
938
|
}>;
|
|
@@ -1684,9 +1053,9 @@ declare const CommerceToolOutputs: {
|
|
|
1684
1053
|
observedAt: z.ZodISODateTime;
|
|
1685
1054
|
product: z.ZodObject<{
|
|
1686
1055
|
status: z.ZodEnum<{
|
|
1056
|
+
AVAILABLE: "AVAILABLE";
|
|
1687
1057
|
NOT_REQUESTED: "NOT_REQUESTED";
|
|
1688
1058
|
VARIANT_REQUIRED: "VARIANT_REQUIRED";
|
|
1689
|
-
AVAILABLE: "AVAILABLE";
|
|
1690
1059
|
}>;
|
|
1691
1060
|
productId: z.ZodNullable<z.ZodString>;
|
|
1692
1061
|
variantId: z.ZodNullable<z.ZodString>;
|
|
@@ -1712,8 +1081,8 @@ declare const CommerceToolOutputs: {
|
|
|
1712
1081
|
}, z.core.$strict>;
|
|
1713
1082
|
policy: z.ZodObject<{
|
|
1714
1083
|
status: z.ZodEnum<{
|
|
1715
|
-
UNSUPPORTED: "UNSUPPORTED";
|
|
1716
1084
|
AVAILABLE: "AVAILABLE";
|
|
1085
|
+
UNSUPPORTED: "UNSUPPORTED";
|
|
1717
1086
|
NOT_CONFIGURED: "NOT_CONFIGURED";
|
|
1718
1087
|
SCOPE_NOT_GRANTED: "SCOPE_NOT_GRANTED";
|
|
1719
1088
|
}>;
|
|
@@ -1752,6 +1121,22 @@ declare const CommerceToolOutputs: {
|
|
|
1752
1121
|
}, z.core.$strict>;
|
|
1753
1122
|
commerce_search_products: z.ZodObject<{
|
|
1754
1123
|
products: z.ZodArray<z.ZodObject<{
|
|
1124
|
+
options: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
1125
|
+
status: z.ZodEnum<{
|
|
1126
|
+
AVAILABLE: "AVAILABLE";
|
|
1127
|
+
NOT_PROVIDED: "NOT_PROVIDED";
|
|
1128
|
+
PARTIAL: "PARTIAL";
|
|
1129
|
+
}>;
|
|
1130
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1131
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
1132
|
+
values: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
|
|
1133
|
+
usedForVariants: z.ZodNullable<z.ZodBoolean>;
|
|
1134
|
+
}, z.core.$strict>>;
|
|
1135
|
+
}, z.core.$strict>>>;
|
|
1136
|
+
selectedOptions: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodObject<{
|
|
1137
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
1138
|
+
value: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
1139
|
+
}, z.core.$strict>>>>;
|
|
1755
1140
|
productId: z.ZodString;
|
|
1756
1141
|
variantId: z.ZodNullable<z.ZodString>;
|
|
1757
1142
|
title: z.ZodString;
|
|
@@ -1777,6 +1162,22 @@ declare const CommerceToolOutputs: {
|
|
|
1777
1162
|
}, z.core.$strict>;
|
|
1778
1163
|
commerce_get_product: z.ZodObject<{
|
|
1779
1164
|
product: z.ZodNullable<z.ZodObject<{
|
|
1165
|
+
options: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
1166
|
+
status: z.ZodEnum<{
|
|
1167
|
+
AVAILABLE: "AVAILABLE";
|
|
1168
|
+
NOT_PROVIDED: "NOT_PROVIDED";
|
|
1169
|
+
PARTIAL: "PARTIAL";
|
|
1170
|
+
}>;
|
|
1171
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1172
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
1173
|
+
values: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
|
|
1174
|
+
usedForVariants: z.ZodNullable<z.ZodBoolean>;
|
|
1175
|
+
}, z.core.$strict>>;
|
|
1176
|
+
}, z.core.$strict>>>;
|
|
1177
|
+
selectedOptions: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodObject<{
|
|
1178
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
1179
|
+
value: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
1180
|
+
}, z.core.$strict>>>>;
|
|
1780
1181
|
productId: z.ZodString;
|
|
1781
1182
|
variantId: z.ZodNullable<z.ZodString>;
|
|
1782
1183
|
title: z.ZodString;
|
|
@@ -1863,9 +1264,9 @@ declare const CommerceToolOutputs: {
|
|
|
1863
1264
|
WOOCOMMERCE: "WOOCOMMERCE";
|
|
1864
1265
|
}>;
|
|
1865
1266
|
completeness: z.ZodEnum<{
|
|
1267
|
+
PARTIAL: "PARTIAL";
|
|
1866
1268
|
UNKNOWN: "UNKNOWN";
|
|
1867
1269
|
COMPLETE: "COMPLETE";
|
|
1868
|
-
PARTIAL: "PARTIAL";
|
|
1869
1270
|
}>;
|
|
1870
1271
|
observedAt: z.ZodString;
|
|
1871
1272
|
providerStatus: z.ZodString;
|
|
@@ -1982,6 +1383,22 @@ declare const CommerceToolOutputs: {
|
|
|
1982
1383
|
commerce_find_qualifying_products: z.ZodObject<{
|
|
1983
1384
|
alternatives: z.ZodArray<z.ZodObject<{
|
|
1984
1385
|
product: z.ZodObject<{
|
|
1386
|
+
options: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
1387
|
+
status: z.ZodEnum<{
|
|
1388
|
+
AVAILABLE: "AVAILABLE";
|
|
1389
|
+
NOT_PROVIDED: "NOT_PROVIDED";
|
|
1390
|
+
PARTIAL: "PARTIAL";
|
|
1391
|
+
}>;
|
|
1392
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1393
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
1394
|
+
values: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
|
|
1395
|
+
usedForVariants: z.ZodNullable<z.ZodBoolean>;
|
|
1396
|
+
}, z.core.$strict>>;
|
|
1397
|
+
}, z.core.$strict>>>;
|
|
1398
|
+
selectedOptions: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodObject<{
|
|
1399
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
1400
|
+
value: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
1401
|
+
}, z.core.$strict>>>>;
|
|
1985
1402
|
productId: z.ZodString;
|
|
1986
1403
|
variantId: z.ZodNullable<z.ZodString>;
|
|
1987
1404
|
title: z.ZodString;
|
|
@@ -2070,6 +1487,22 @@ declare const CommerceToolOutputs: {
|
|
|
2070
1487
|
commerce_find_similar_products: z.ZodObject<{
|
|
2071
1488
|
alternatives: z.ZodArray<z.ZodObject<{
|
|
2072
1489
|
product: z.ZodObject<{
|
|
1490
|
+
options: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
1491
|
+
status: z.ZodEnum<{
|
|
1492
|
+
AVAILABLE: "AVAILABLE";
|
|
1493
|
+
NOT_PROVIDED: "NOT_PROVIDED";
|
|
1494
|
+
PARTIAL: "PARTIAL";
|
|
1495
|
+
}>;
|
|
1496
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1497
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
1498
|
+
values: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
|
|
1499
|
+
usedForVariants: z.ZodNullable<z.ZodBoolean>;
|
|
1500
|
+
}, z.core.$strict>>;
|
|
1501
|
+
}, z.core.$strict>>>;
|
|
1502
|
+
selectedOptions: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodObject<{
|
|
1503
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
1504
|
+
value: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
1505
|
+
}, z.core.$strict>>>>;
|
|
2073
1506
|
productId: z.ZodString;
|
|
2074
1507
|
variantId: z.ZodNullable<z.ZodString>;
|
|
2075
1508
|
title: z.ZodString;
|
|
@@ -2214,4 +1647,4 @@ declare function verifyResponseContract(definition: unknown, hash: string, diges
|
|
|
2214
1647
|
/** JSON Schema branches retain the immutable envelope; only ANSWER details vary. */
|
|
2215
1648
|
declare function finalResponseToolSchema(definition: CommerceResponseContract): Json;
|
|
2216
1649
|
|
|
2217
|
-
export {
|
|
1650
|
+
export { CommerceToolInputs as $, CommerceFinalResponseSchema as A, CommerceManifestSchema as B, type CommerceTurnIdentity as C, type Digest as D, CommerceOfferSchema as E, type CommerceOptionalLookupUnavailable as F, CommerceOptionalLookupUnavailableSchema as G, type CommerceProduct as H, CommerceProductOptionsSchema as I, type CommerceProductRecommendationSelection as J, CommerceProductRecommendationSelectionSchema as K, type CommerceProductSaleEvidence as L, CommerceProductSaleEvidenceSchema as M, CommerceProductSelectedOptionsSchema as N, CommerceProposalSchema as O, CommercePurposeOutputSchemaSchema as P, CommerceReleaseIdentitySchema as Q, CommerceResolveAssertionSchema as R, type SubsetSchema as S, type CommerceResponseContract as T, CommerceResponseContractSchema as U, type CommerceResponseDisposition as V, CommerceResponseDispositionSchema as W, type CommerceShippingInformation as X, type CommerceShippingInformationInput as Y, CommerceShippingInformationInputSchema as Z, CommerceShippingInformationSchema as _, type CommerceConversationGrant as a, CommerceToolOutputs as a0, CommerceToolResultSchema as a1, CommerceTurnIdentitySchema as a2, DetailsSchemaSchema as a3, EMPTY_RESPONSE_CONTRACT as a4, InputSchemaSchema as a5, type Json as a6, MONEY_PATTERN as a7, ReferralReasonSchema as a8, canonicalJson as a9, commerceToolResultSchema as aa, compileCommercePurposeOutputSchema as ab, compileSubset as ac, finalResponseSchema as ad, finalResponseToolSchema as ae, jsonBytes as af, matchesSubset as ag, normalizeCommerceProductOptions as ah, normalizeCommerceProductSelectedOptions as ai, productBelongsToDomain as aj, responseContractCanonicalJson as ak, safeName as al, safePath as am, validateCommercePurposeOutputSchema as an, validateSubset as ao, verifyResponseContract as ap, type CommerceManifest as b, type CommerceToolResult as c, type CommerceFinalResponse as d, type CommercePurposeOutputSchema as e, CommerceProductSchema as f, CommerceAlternativeSchema as g, type CommerceAnswerPresentationSelection as h, CommerceAnswerPresentationSelectionSchema as i, CommerceAssertionSchema as j, CommerceBasketSchema as k, type CommerceCategoryCandidate as l, CommerceCategoryCandidateSchema as m, type CommerceCategoryResolution as n, CommerceCategoryResolutionSchema as o, CommerceConversationGrantSchema as p, type CommerceDiscountCombinationFacts as q, CommerceDiscountCombinationFactsSchema as r, type CommerceDiscountConditionFacts as s, CommerceDiscountConditionFactsSchema as t, type CommerceDiscountDetails as u, CommerceDiscountDetailsSchema as v, CommerceErrorCodeSchema as w, type CommerceEvidence as x, CommerceEvidenceSchema as y, CommerceExecuteAssertionSchema as z };
|