@modainteract/moda-interact-shared 5.5.0 → 5.7.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-QVPEX7KY.js → chunk-GCCT2BDE.js} +4 -4
- package/dist/chunk-QFUK7FIO.js +16 -0
- package/dist/chunk-QFUK7FIO.js.map +1 -0
- package/dist/{chunk-BDGLKOCW.js → chunk-WF2BDUPZ.js} +483 -315
- package/dist/chunk-WF2BDUPZ.js.map +1 -0
- package/dist/chunk-WHZAAF2Q.js +25 -0
- package/dist/chunk-WHZAAF2Q.js.map +1 -0
- package/dist/chunk-WK7QSBHJ.js +148 -0
- package/dist/chunk-WK7QSBHJ.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 +34 -4
- package/dist/commerce/index.js +31 -16
- package/dist/commerce/index.js.map +1 -1
- package/dist/commerce/model/node.d.ts +3 -2
- package/dist/commerce/model/node.js +4 -4
- package/dist/commerce/outreach/index.d.ts +1094 -0
- package/dist/commerce/outreach/index.js +1355 -0
- package/dist/commerce/outreach/index.js.map +1 -0
- package/dist/commerce/presentation/index.d.ts +420 -0
- package/dist/commerce/presentation/index.js +661 -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 +69 -43
- package/dist/commerce/runner/index.js.map +1 -1
- package/dist/product-context-Bh74WGOo.d.ts +746 -0
- package/dist/recovery-offer-proof.js +2 -2
- package/dist/{response-C1JsiFoO.d.ts → response-DFDEw4K0.d.ts} +254 -707
- package/dist/{types-Ds5QJ621.d.ts → types-vIMrj5J4.d.ts} +6 -2
- package/package.json +17 -6
- 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
- /package/dist/{chunk-QVPEX7KY.js.map → chunk-GCCT2BDE.js.map} +0 -0
|
@@ -0,0 +1,1094 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { g as CommerceToolInputs } from '../../response-DFDEw4K0.js';
|
|
3
|
+
import { C as CommerceModelInvoker } from '../../types-vIMrj5J4.js';
|
|
4
|
+
import { S as StructuredLogger } from '../../types-B32wDMLO.js';
|
|
5
|
+
import '../../product-context-Bh74WGOo.js';
|
|
6
|
+
|
|
7
|
+
declare const StageSchema: z.ZodEnum<{
|
|
8
|
+
COMPLETE: "COMPLETE";
|
|
9
|
+
INPUT: "INPUT";
|
|
10
|
+
PRODUCT_READ: "PRODUCT_READ";
|
|
11
|
+
RECONCILE: "RECONCILE";
|
|
12
|
+
OFFER_SELECT: "OFFER_SELECT";
|
|
13
|
+
REVALIDATE: "REVALIDATE";
|
|
14
|
+
}>;
|
|
15
|
+
declare const InitialOutreachEvaluationInputSchema: z.ZodObject<{
|
|
16
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
17
|
+
runId: z.ZodString;
|
|
18
|
+
shopId: z.ZodString;
|
|
19
|
+
platform: z.ZodEnum<{
|
|
20
|
+
SHOPIFY: "SHOPIFY";
|
|
21
|
+
WOOCOMMERCE: "WOOCOMMERCE";
|
|
22
|
+
}>;
|
|
23
|
+
environment: z.ZodEnum<{
|
|
24
|
+
LOCAL: "LOCAL";
|
|
25
|
+
TEST: "TEST";
|
|
26
|
+
DEVELOPMENT: "DEVELOPMENT";
|
|
27
|
+
STAGING: "STAGING";
|
|
28
|
+
PRODUCTION: "PRODUCTION";
|
|
29
|
+
}>;
|
|
30
|
+
checkout: z.ZodObject<{
|
|
31
|
+
id: z.ZodString;
|
|
32
|
+
generation: z.ZodNumber;
|
|
33
|
+
currency: z.ZodString;
|
|
34
|
+
url: z.ZodString;
|
|
35
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
36
|
+
lineKey: z.ZodString;
|
|
37
|
+
productId: z.ZodString;
|
|
38
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
39
|
+
quantity: z.ZodNumber;
|
|
40
|
+
checkoutUnitPrice: z.ZodNullable<z.ZodString>;
|
|
41
|
+
}, z.core.$strict>>;
|
|
42
|
+
}, z.core.$strict>;
|
|
43
|
+
policy: z.ZodObject<{
|
|
44
|
+
mode: z.ZodEnum<{
|
|
45
|
+
NONE: "NONE";
|
|
46
|
+
FIXED: "FIXED";
|
|
47
|
+
AI_BEST_APPLICABLE: "AI_BEST_APPLICABLE";
|
|
48
|
+
}>;
|
|
49
|
+
authorisedDiscountIds: z.ZodArray<z.ZodString>;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
instructions: z.ZodObject<{
|
|
52
|
+
platformText: z.ZodString;
|
|
53
|
+
platformRevisionId: z.ZodString;
|
|
54
|
+
merchantText: z.ZodNullable<z.ZodString>;
|
|
55
|
+
merchantRevisionId: z.ZodNullable<z.ZodString>;
|
|
56
|
+
purposeText: z.ZodString;
|
|
57
|
+
purposeProfileRevisionId: z.ZodString;
|
|
58
|
+
}, z.core.$strict>;
|
|
59
|
+
limits: z.ZodObject<{
|
|
60
|
+
deadlineMs: z.ZodNumber;
|
|
61
|
+
modelSteps: z.ZodNumber;
|
|
62
|
+
remoteCalls: z.ZodNumber;
|
|
63
|
+
outputTokens: z.ZodNumber;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
}, z.core.$strict>;
|
|
66
|
+
declare const InitialOutreachEvaluationResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
67
|
+
kind: z.ZodLiteral<"ready">;
|
|
68
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
69
|
+
runId: z.ZodString;
|
|
70
|
+
shopId: z.ZodString;
|
|
71
|
+
basketFingerprint: z.ZodString;
|
|
72
|
+
evaluatedAt: z.ZodISODateTime;
|
|
73
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
74
|
+
lineKey: z.ZodString;
|
|
75
|
+
productId: z.ZodString;
|
|
76
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
77
|
+
quantity: z.ZodNumber;
|
|
78
|
+
checkoutUnitPrice: z.ZodNullable<z.ZodString>;
|
|
79
|
+
currentProduct: z.ZodObject<{
|
|
80
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
81
|
+
status: z.ZodEnum<{
|
|
82
|
+
AVAILABLE: "AVAILABLE";
|
|
83
|
+
NOT_PROVIDED: "NOT_PROVIDED";
|
|
84
|
+
PARTIAL: "PARTIAL";
|
|
85
|
+
}>;
|
|
86
|
+
text: z.ZodString;
|
|
87
|
+
}, z.core.$strict>>>;
|
|
88
|
+
attributes: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
89
|
+
status: z.ZodEnum<{
|
|
90
|
+
AVAILABLE: "AVAILABLE";
|
|
91
|
+
NOT_PROVIDED: "NOT_PROVIDED";
|
|
92
|
+
PARTIAL: "PARTIAL";
|
|
93
|
+
}>;
|
|
94
|
+
items: z.ZodArray<z.ZodObject<{
|
|
95
|
+
name: z.ZodString;
|
|
96
|
+
values: z.ZodArray<z.ZodString>;
|
|
97
|
+
}, z.core.$strict>>;
|
|
98
|
+
}, z.core.$strict>>>;
|
|
99
|
+
options: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
100
|
+
status: z.ZodEnum<{
|
|
101
|
+
AVAILABLE: "AVAILABLE";
|
|
102
|
+
NOT_PROVIDED: "NOT_PROVIDED";
|
|
103
|
+
PARTIAL: "PARTIAL";
|
|
104
|
+
}>;
|
|
105
|
+
items: z.ZodArray<z.ZodObject<{
|
|
106
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
107
|
+
values: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
|
|
108
|
+
usedForVariants: z.ZodNullable<z.ZodBoolean>;
|
|
109
|
+
}, z.core.$strict>>;
|
|
110
|
+
}, z.core.$strict>>>;
|
|
111
|
+
selectedOptions: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodObject<{
|
|
112
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
113
|
+
value: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
114
|
+
}, z.core.$strict>>>>;
|
|
115
|
+
productId: z.ZodString;
|
|
116
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
117
|
+
title: z.ZodString;
|
|
118
|
+
url: z.ZodNullable<z.ZodURL>;
|
|
119
|
+
available: z.ZodNullable<z.ZodBoolean>;
|
|
120
|
+
unitPrice: z.ZodNullable<z.ZodString>;
|
|
121
|
+
currency: z.ZodNullable<z.ZodString>;
|
|
122
|
+
productType: z.ZodNullable<z.ZodString>;
|
|
123
|
+
vendor: z.ZodNullable<z.ZodString>;
|
|
124
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
125
|
+
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
126
|
+
collectionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
127
|
+
imageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
128
|
+
saleEvidence: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
129
|
+
regularPrice: z.ZodNullable<z.ZodString>;
|
|
130
|
+
salePrice: z.ZodNullable<z.ZodString>;
|
|
131
|
+
observedAt: z.ZodISODateTime;
|
|
132
|
+
}, z.core.$strict>>>;
|
|
133
|
+
observedAt: z.ZodISODateTime;
|
|
134
|
+
}, z.core.$strict>;
|
|
135
|
+
comparison: z.ZodEnum<{
|
|
136
|
+
EQUAL: "EQUAL";
|
|
137
|
+
DIFFERENT: "DIFFERENT";
|
|
138
|
+
INCOMPARABLE: "INCOMPARABLE";
|
|
139
|
+
}>;
|
|
140
|
+
}, z.core.$strict>>;
|
|
141
|
+
currentMerchandiseSubtotal: z.ZodObject<{
|
|
142
|
+
amountDecimal: z.ZodString;
|
|
143
|
+
currency: z.ZodString;
|
|
144
|
+
}, z.core.$strict>;
|
|
145
|
+
offerDecision: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
146
|
+
kind: z.ZodLiteral<"NO_VERIFIED_OFFER">;
|
|
147
|
+
reasonCode: z.ZodString;
|
|
148
|
+
discoveryIncomplete: z.ZodBoolean;
|
|
149
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
150
|
+
kind: z.ZodLiteral<"CHECKOUT_DISCOUNT">;
|
|
151
|
+
offerSet: z.ZodObject<{
|
|
152
|
+
schemaVersion: z.ZodLiteral<"moda.outreach.checkout-offers.v1">;
|
|
153
|
+
offers: z.ZodArray<z.ZodObject<{
|
|
154
|
+
offerId: z.ZodString;
|
|
155
|
+
providerDiscountId: z.ZodNullable<z.ZodString>;
|
|
156
|
+
method: z.ZodEnum<{
|
|
157
|
+
AUTOMATIC: "AUTOMATIC";
|
|
158
|
+
CODE: "CODE";
|
|
159
|
+
}>;
|
|
160
|
+
code: z.ZodNullable<z.ZodString>;
|
|
161
|
+
}, z.core.$strict>>;
|
|
162
|
+
}, z.core.$strict>;
|
|
163
|
+
members: z.ZodArray<z.ZodObject<{
|
|
164
|
+
offerId: z.ZodString;
|
|
165
|
+
providerDiscountId: z.ZodString;
|
|
166
|
+
method: z.ZodEnum<{
|
|
167
|
+
AUTOMATIC: "AUTOMATIC";
|
|
168
|
+
CODE: "CODE";
|
|
169
|
+
}>;
|
|
170
|
+
code: z.ZodNullable<z.ZodString>;
|
|
171
|
+
description: z.ZodString;
|
|
172
|
+
eligibility: z.ZodObject<{
|
|
173
|
+
offerId: z.ZodString;
|
|
174
|
+
verdict: z.ZodEnum<{
|
|
175
|
+
SUPPORTED: "SUPPORTED";
|
|
176
|
+
NOT_APPLICABLE: "NOT_APPLICABLE";
|
|
177
|
+
UNVERIFIABLE: "UNVERIFIABLE";
|
|
178
|
+
}>;
|
|
179
|
+
eligibleLineKeys: z.ZodArray<z.ZodString>;
|
|
180
|
+
reasonCodes: z.ZodArray<z.ZodString>;
|
|
181
|
+
}, z.core.$strict>;
|
|
182
|
+
}, z.core.$strict>>;
|
|
183
|
+
group: z.ZodObject<{
|
|
184
|
+
verdict: z.ZodEnum<{
|
|
185
|
+
SUPPORTED: "SUPPORTED";
|
|
186
|
+
UNVERIFIABLE: "UNVERIFIABLE";
|
|
187
|
+
INCOMPATIBLE: "INCOMPATIBLE";
|
|
188
|
+
}>;
|
|
189
|
+
offerIds: z.ZodArray<z.ZodString>;
|
|
190
|
+
reasonCodes: z.ZodArray<z.ZodString>;
|
|
191
|
+
}, z.core.$strict>;
|
|
192
|
+
discoveryIncomplete: z.ZodBoolean;
|
|
193
|
+
}, z.core.$strict>], "kind">;
|
|
194
|
+
toolActivity: z.ZodArray<z.ZodObject<{
|
|
195
|
+
toolName: z.ZodString;
|
|
196
|
+
modelStep: z.ZodNumber;
|
|
197
|
+
attempt: z.ZodNumber;
|
|
198
|
+
status: z.ZodEnum<{
|
|
199
|
+
OK: "OK";
|
|
200
|
+
ERROR: "ERROR";
|
|
201
|
+
}>;
|
|
202
|
+
durationMs: z.ZodNumber;
|
|
203
|
+
errorCode: z.ZodNullable<z.ZodEnum<{
|
|
204
|
+
DEADLINE: "DEADLINE";
|
|
205
|
+
CANCELLED: "CANCELLED";
|
|
206
|
+
DENIED: "DENIED";
|
|
207
|
+
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
208
|
+
INPUT_INVALID: "INPUT_INVALID";
|
|
209
|
+
OUTSIDE_CHECKOUT: "OUTSIDE_CHECKOUT";
|
|
210
|
+
PRODUCT_NOT_FOUND: "PRODUCT_NOT_FOUND";
|
|
211
|
+
PRODUCT_UNAVAILABLE: "PRODUCT_UNAVAILABLE";
|
|
212
|
+
IDENTITY_MISMATCH: "IDENTITY_MISMATCH";
|
|
213
|
+
CURRENCY_MISMATCH: "CURRENCY_MISMATCH";
|
|
214
|
+
PRICE_UNAVAILABLE: "PRICE_UNAVAILABLE";
|
|
215
|
+
ARITHMETIC_UNSAFE: "ARITHMETIC_UNSAFE";
|
|
216
|
+
PROVIDER_UNAVAILABLE: "PROVIDER_UNAVAILABLE";
|
|
217
|
+
INVALID_RESULT: "INVALID_RESULT";
|
|
218
|
+
CURRENT_FACTS_CHANGED: "CURRENT_FACTS_CHANGED";
|
|
219
|
+
RESULT_TOO_LARGE: "RESULT_TOO_LARGE";
|
|
220
|
+
}>>;
|
|
221
|
+
}, z.core.$strict>>;
|
|
222
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
223
|
+
kind: z.ZodLiteral<"refused">;
|
|
224
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
225
|
+
runId: z.ZodString;
|
|
226
|
+
shopId: z.ZodString;
|
|
227
|
+
stage: z.ZodEnum<{
|
|
228
|
+
COMPLETE: "COMPLETE";
|
|
229
|
+
INPUT: "INPUT";
|
|
230
|
+
PRODUCT_READ: "PRODUCT_READ";
|
|
231
|
+
RECONCILE: "RECONCILE";
|
|
232
|
+
OFFER_SELECT: "OFFER_SELECT";
|
|
233
|
+
REVALIDATE: "REVALIDATE";
|
|
234
|
+
}>;
|
|
235
|
+
reasonCode: z.ZodEnum<{
|
|
236
|
+
DEADLINE: "DEADLINE";
|
|
237
|
+
CANCELLED: "CANCELLED";
|
|
238
|
+
DENIED: "DENIED";
|
|
239
|
+
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
240
|
+
INPUT_INVALID: "INPUT_INVALID";
|
|
241
|
+
OUTSIDE_CHECKOUT: "OUTSIDE_CHECKOUT";
|
|
242
|
+
PRODUCT_NOT_FOUND: "PRODUCT_NOT_FOUND";
|
|
243
|
+
PRODUCT_UNAVAILABLE: "PRODUCT_UNAVAILABLE";
|
|
244
|
+
IDENTITY_MISMATCH: "IDENTITY_MISMATCH";
|
|
245
|
+
CURRENCY_MISMATCH: "CURRENCY_MISMATCH";
|
|
246
|
+
PRICE_UNAVAILABLE: "PRICE_UNAVAILABLE";
|
|
247
|
+
ARITHMETIC_UNSAFE: "ARITHMETIC_UNSAFE";
|
|
248
|
+
PROVIDER_UNAVAILABLE: "PROVIDER_UNAVAILABLE";
|
|
249
|
+
INVALID_RESULT: "INVALID_RESULT";
|
|
250
|
+
CURRENT_FACTS_CHANGED: "CURRENT_FACTS_CHANGED";
|
|
251
|
+
RESULT_TOO_LARGE: "RESULT_TOO_LARGE";
|
|
252
|
+
}>;
|
|
253
|
+
lineKey: z.ZodNullable<z.ZodString>;
|
|
254
|
+
toolActivity: z.ZodArray<z.ZodObject<{
|
|
255
|
+
toolName: z.ZodString;
|
|
256
|
+
modelStep: z.ZodNumber;
|
|
257
|
+
attempt: z.ZodNumber;
|
|
258
|
+
status: z.ZodEnum<{
|
|
259
|
+
OK: "OK";
|
|
260
|
+
ERROR: "ERROR";
|
|
261
|
+
}>;
|
|
262
|
+
durationMs: z.ZodNumber;
|
|
263
|
+
errorCode: z.ZodNullable<z.ZodEnum<{
|
|
264
|
+
DEADLINE: "DEADLINE";
|
|
265
|
+
CANCELLED: "CANCELLED";
|
|
266
|
+
DENIED: "DENIED";
|
|
267
|
+
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
268
|
+
INPUT_INVALID: "INPUT_INVALID";
|
|
269
|
+
OUTSIDE_CHECKOUT: "OUTSIDE_CHECKOUT";
|
|
270
|
+
PRODUCT_NOT_FOUND: "PRODUCT_NOT_FOUND";
|
|
271
|
+
PRODUCT_UNAVAILABLE: "PRODUCT_UNAVAILABLE";
|
|
272
|
+
IDENTITY_MISMATCH: "IDENTITY_MISMATCH";
|
|
273
|
+
CURRENCY_MISMATCH: "CURRENCY_MISMATCH";
|
|
274
|
+
PRICE_UNAVAILABLE: "PRICE_UNAVAILABLE";
|
|
275
|
+
ARITHMETIC_UNSAFE: "ARITHMETIC_UNSAFE";
|
|
276
|
+
PROVIDER_UNAVAILABLE: "PROVIDER_UNAVAILABLE";
|
|
277
|
+
INVALID_RESULT: "INVALID_RESULT";
|
|
278
|
+
CURRENT_FACTS_CHANGED: "CURRENT_FACTS_CHANGED";
|
|
279
|
+
RESULT_TOO_LARGE: "RESULT_TOO_LARGE";
|
|
280
|
+
}>>;
|
|
281
|
+
}, z.core.$strict>>;
|
|
282
|
+
}, z.core.$strict>], "kind">;
|
|
283
|
+
type InitialOutreachEvaluationInput = z.infer<typeof InitialOutreachEvaluationInputSchema>;
|
|
284
|
+
type InitialOutreachEvaluationResult = z.infer<typeof InitialOutreachEvaluationResultSchema>;
|
|
285
|
+
type CallContext = {
|
|
286
|
+
runId: string;
|
|
287
|
+
shopId: string;
|
|
288
|
+
platform: 'SHOPIFY' | 'WOOCOMMERCE';
|
|
289
|
+
signal: AbortSignal;
|
|
290
|
+
};
|
|
291
|
+
type InitialOutreachToolCall = CallContext & ({
|
|
292
|
+
name: 'commerce_get_product';
|
|
293
|
+
arguments: z.infer<typeof CommerceToolInputs.commerce_get_product>;
|
|
294
|
+
} | {
|
|
295
|
+
name: 'commerce_get_discount_options';
|
|
296
|
+
arguments: z.infer<typeof CommerceToolInputs.commerce_get_discount_options>;
|
|
297
|
+
} | {
|
|
298
|
+
name: 'commerce_get_discount_details';
|
|
299
|
+
arguments: z.infer<typeof CommerceToolInputs.commerce_get_discount_details>;
|
|
300
|
+
});
|
|
301
|
+
interface InitialOutreachPorts {
|
|
302
|
+
signal: AbortSignal;
|
|
303
|
+
now(): Date;
|
|
304
|
+
callTool(call: InitialOutreachToolCall): Promise<unknown>;
|
|
305
|
+
modelInvoker: CommerceModelInvoker;
|
|
306
|
+
log(event: {
|
|
307
|
+
stage: z.infer<typeof StageSchema>;
|
|
308
|
+
runId: string;
|
|
309
|
+
shopId: string;
|
|
310
|
+
reasonCode: string | null;
|
|
311
|
+
lineKey: string | null;
|
|
312
|
+
toolName: string | null;
|
|
313
|
+
durationMs: number;
|
|
314
|
+
}): void;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
declare const AssignedVariantSchema: z.ZodObject<{
|
|
318
|
+
id: z.ZodString;
|
|
319
|
+
shopId: z.ZodString;
|
|
320
|
+
providerAccountId: z.ZodString;
|
|
321
|
+
purpose: z.ZodString;
|
|
322
|
+
languageTag: z.ZodString;
|
|
323
|
+
providerLanguageCode: z.ZodString;
|
|
324
|
+
providerTemplateName: z.ZodString;
|
|
325
|
+
providerTemplateId: z.ZodNullable<z.ZodString>;
|
|
326
|
+
status: z.ZodString;
|
|
327
|
+
enabled: z.ZodBoolean;
|
|
328
|
+
metaRegistrationId: z.ZodNullable<z.ZodString>;
|
|
329
|
+
metaRegistration: z.ZodNullable<z.ZodObject<{
|
|
330
|
+
id: z.ZodString;
|
|
331
|
+
wabaId: z.ZodString;
|
|
332
|
+
providerTemplateName: z.ZodString;
|
|
333
|
+
providerLanguageCode: z.ZodString;
|
|
334
|
+
providerTemplateId: z.ZodNullable<z.ZodString>;
|
|
335
|
+
category: z.ZodString;
|
|
336
|
+
providerStatus: z.ZodNullable<z.ZodString>;
|
|
337
|
+
submissionState: z.ZodString;
|
|
338
|
+
failureCode: z.ZodNullable<z.ZodString>;
|
|
339
|
+
lastObservedContentHash: z.ZodNullable<z.ZodString>;
|
|
340
|
+
lastObservedCategory: z.ZodNullable<z.ZodString>;
|
|
341
|
+
driftDetectedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
342
|
+
submittedContentHash: z.ZodString;
|
|
343
|
+
componentsSnapshot: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
344
|
+
type: z.ZodLiteral<"HEADER">;
|
|
345
|
+
format: z.ZodLiteral<"TEXT">;
|
|
346
|
+
text: z.ZodString;
|
|
347
|
+
example: z.ZodOptional<z.ZodObject<{
|
|
348
|
+
header_text: z.ZodArray<z.ZodString>;
|
|
349
|
+
}, z.core.$strict>>;
|
|
350
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
351
|
+
type: z.ZodLiteral<"HEADER">;
|
|
352
|
+
format: z.ZodLiteral<"IMAGE">;
|
|
353
|
+
example: z.ZodOptional<z.ZodObject<{
|
|
354
|
+
header_handle: z.ZodArray<z.ZodString>;
|
|
355
|
+
}, z.core.$strict>>;
|
|
356
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
357
|
+
type: z.ZodLiteral<"BODY">;
|
|
358
|
+
text: z.ZodString;
|
|
359
|
+
example: z.ZodOptional<z.ZodObject<{
|
|
360
|
+
body_text: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
361
|
+
}, z.core.$strict>>;
|
|
362
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
363
|
+
type: z.ZodLiteral<"FOOTER">;
|
|
364
|
+
text: z.ZodString;
|
|
365
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
366
|
+
type: z.ZodLiteral<"BUTTONS">;
|
|
367
|
+
buttons: z.ZodArray<z.ZodObject<{
|
|
368
|
+
type: z.ZodLiteral<"URL">;
|
|
369
|
+
text: z.ZodString;
|
|
370
|
+
url: z.ZodString;
|
|
371
|
+
example: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
372
|
+
}, z.core.$strict>>;
|
|
373
|
+
}, z.core.$strict>]>>;
|
|
374
|
+
parameterBindingsSnapshot: z.ZodObject<{
|
|
375
|
+
schemaVersion: z.ZodOptional<z.ZodLiteral<1>>;
|
|
376
|
+
promotionTarget: z.ZodOptional<z.ZodEnum<{
|
|
377
|
+
CHECKOUT: "CHECKOUT";
|
|
378
|
+
ALTERNATIVE_PRODUCT: "ALTERNATIVE_PRODUCT";
|
|
379
|
+
}>>;
|
|
380
|
+
headerMediaRole: z.ZodOptional<z.ZodEnum<{
|
|
381
|
+
LOGO: "LOGO";
|
|
382
|
+
SQUARE_LOGO: "SQUARE_LOGO";
|
|
383
|
+
COVER_IMAGE: "COVER_IMAGE";
|
|
384
|
+
CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
|
|
385
|
+
}>>;
|
|
386
|
+
header: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
387
|
+
position: z.ZodNumber;
|
|
388
|
+
variable: z.ZodEnum<{
|
|
389
|
+
"customer.firstName": "customer.firstName";
|
|
390
|
+
"shop.name": "shop.name";
|
|
391
|
+
"shop.categoryName": "shop.categoryName";
|
|
392
|
+
"checkout.url": "checkout.url";
|
|
393
|
+
"checkout.itemsSummary": "checkout.itemsSummary";
|
|
394
|
+
"offer.code": "offer.code";
|
|
395
|
+
"offer.codes": "offer.codes";
|
|
396
|
+
"offer.description": "offer.description";
|
|
397
|
+
"promotion.productName": "promotion.productName";
|
|
398
|
+
"promotion.productUrl": "promotion.productUrl";
|
|
399
|
+
"promotion.offerDescription": "promotion.offerDescription";
|
|
400
|
+
"promotion.code": "promotion.code";
|
|
401
|
+
"shopBrand.brandName": "shopBrand.brandName";
|
|
402
|
+
"shopBrand.logoAltText": "shopBrand.logoAltText";
|
|
403
|
+
"shopBrand.logoWidth": "shopBrand.logoWidth";
|
|
404
|
+
"shopBrand.logoHeight": "shopBrand.logoHeight";
|
|
405
|
+
"shopBrand.squareLogoAltText": "shopBrand.squareLogoAltText";
|
|
406
|
+
"shopBrand.logoUrl": "shopBrand.logoUrl";
|
|
407
|
+
"shopBrand.squareLogoUrl": "shopBrand.squareLogoUrl";
|
|
408
|
+
"shopBrand.coverImageUrl": "shopBrand.coverImageUrl";
|
|
409
|
+
}>;
|
|
410
|
+
}, z.core.$strict>>>;
|
|
411
|
+
body: z.ZodArray<z.ZodObject<{
|
|
412
|
+
position: z.ZodNumber;
|
|
413
|
+
variable: z.ZodEnum<{
|
|
414
|
+
"customer.firstName": "customer.firstName";
|
|
415
|
+
"shop.name": "shop.name";
|
|
416
|
+
"shop.categoryName": "shop.categoryName";
|
|
417
|
+
"checkout.url": "checkout.url";
|
|
418
|
+
"checkout.itemsSummary": "checkout.itemsSummary";
|
|
419
|
+
"offer.code": "offer.code";
|
|
420
|
+
"offer.codes": "offer.codes";
|
|
421
|
+
"offer.description": "offer.description";
|
|
422
|
+
"promotion.productName": "promotion.productName";
|
|
423
|
+
"promotion.productUrl": "promotion.productUrl";
|
|
424
|
+
"promotion.offerDescription": "promotion.offerDescription";
|
|
425
|
+
"promotion.code": "promotion.code";
|
|
426
|
+
"shopBrand.brandName": "shopBrand.brandName";
|
|
427
|
+
"shopBrand.logoAltText": "shopBrand.logoAltText";
|
|
428
|
+
"shopBrand.logoWidth": "shopBrand.logoWidth";
|
|
429
|
+
"shopBrand.logoHeight": "shopBrand.logoHeight";
|
|
430
|
+
"shopBrand.squareLogoAltText": "shopBrand.squareLogoAltText";
|
|
431
|
+
"shopBrand.logoUrl": "shopBrand.logoUrl";
|
|
432
|
+
"shopBrand.squareLogoUrl": "shopBrand.squareLogoUrl";
|
|
433
|
+
"shopBrand.coverImageUrl": "shopBrand.coverImageUrl";
|
|
434
|
+
}>;
|
|
435
|
+
}, z.core.$strict>>;
|
|
436
|
+
buttons: z.ZodArray<z.ZodObject<{
|
|
437
|
+
index: z.ZodNumber;
|
|
438
|
+
subType: z.ZodLiteral<"url">;
|
|
439
|
+
variable: z.ZodEnum<{
|
|
440
|
+
"checkout.url": "checkout.url";
|
|
441
|
+
"promotion.productUrl": "promotion.productUrl";
|
|
442
|
+
}>;
|
|
443
|
+
}, z.core.$strict>>;
|
|
444
|
+
}, z.core.$strict>;
|
|
445
|
+
locale: z.ZodObject<{
|
|
446
|
+
id: z.ZodString;
|
|
447
|
+
languageTag: z.ZodString;
|
|
448
|
+
providerLanguageCode: z.ZodNullable<z.ZodString>;
|
|
449
|
+
status: z.ZodString;
|
|
450
|
+
contentHash: z.ZodNullable<z.ZodString>;
|
|
451
|
+
definition: z.ZodObject<{
|
|
452
|
+
id: z.ZodString;
|
|
453
|
+
kind: z.ZodString;
|
|
454
|
+
purpose: z.ZodNullable<z.ZodString>;
|
|
455
|
+
offerType: z.ZodNullable<z.ZodString>;
|
|
456
|
+
status: z.ZodString;
|
|
457
|
+
category: z.ZodNullable<z.ZodString>;
|
|
458
|
+
providerTemplateName: z.ZodNullable<z.ZodString>;
|
|
459
|
+
publishedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
460
|
+
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
461
|
+
}, z.core.$strict>;
|
|
462
|
+
}, z.core.$strict>;
|
|
463
|
+
}, z.core.$strict>>;
|
|
464
|
+
}, z.core.$strict>;
|
|
465
|
+
declare const InitialOutreachRenderInputSchema: z.ZodObject<{
|
|
466
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
467
|
+
evaluation: z.ZodObject<{
|
|
468
|
+
kind: z.ZodLiteral<"ready">;
|
|
469
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
470
|
+
runId: z.ZodString;
|
|
471
|
+
shopId: z.ZodString;
|
|
472
|
+
basketFingerprint: z.ZodString;
|
|
473
|
+
evaluatedAt: z.ZodISODateTime;
|
|
474
|
+
lines: z.ZodArray<z.ZodObject<{
|
|
475
|
+
lineKey: z.ZodString;
|
|
476
|
+
productId: z.ZodString;
|
|
477
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
478
|
+
quantity: z.ZodNumber;
|
|
479
|
+
checkoutUnitPrice: z.ZodNullable<z.ZodString>;
|
|
480
|
+
currentProduct: z.ZodObject<{
|
|
481
|
+
description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
482
|
+
status: z.ZodEnum<{
|
|
483
|
+
AVAILABLE: "AVAILABLE";
|
|
484
|
+
NOT_PROVIDED: "NOT_PROVIDED";
|
|
485
|
+
PARTIAL: "PARTIAL";
|
|
486
|
+
}>;
|
|
487
|
+
text: z.ZodString;
|
|
488
|
+
}, z.core.$strict>>>;
|
|
489
|
+
attributes: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
490
|
+
status: z.ZodEnum<{
|
|
491
|
+
AVAILABLE: "AVAILABLE";
|
|
492
|
+
NOT_PROVIDED: "NOT_PROVIDED";
|
|
493
|
+
PARTIAL: "PARTIAL";
|
|
494
|
+
}>;
|
|
495
|
+
items: z.ZodArray<z.ZodObject<{
|
|
496
|
+
name: z.ZodString;
|
|
497
|
+
values: z.ZodArray<z.ZodString>;
|
|
498
|
+
}, z.core.$strict>>;
|
|
499
|
+
}, z.core.$strict>>>;
|
|
500
|
+
options: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
|
|
501
|
+
status: z.ZodEnum<{
|
|
502
|
+
AVAILABLE: "AVAILABLE";
|
|
503
|
+
NOT_PROVIDED: "NOT_PROVIDED";
|
|
504
|
+
PARTIAL: "PARTIAL";
|
|
505
|
+
}>;
|
|
506
|
+
items: z.ZodArray<z.ZodObject<{
|
|
507
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
508
|
+
values: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
|
|
509
|
+
usedForVariants: z.ZodNullable<z.ZodBoolean>;
|
|
510
|
+
}, z.core.$strict>>;
|
|
511
|
+
}, z.core.$strict>>>;
|
|
512
|
+
selectedOptions: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodObject<{
|
|
513
|
+
name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
514
|
+
value: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
|
|
515
|
+
}, z.core.$strict>>>>;
|
|
516
|
+
productId: z.ZodString;
|
|
517
|
+
variantId: z.ZodNullable<z.ZodString>;
|
|
518
|
+
title: z.ZodString;
|
|
519
|
+
url: z.ZodNullable<z.ZodURL>;
|
|
520
|
+
available: z.ZodNullable<z.ZodBoolean>;
|
|
521
|
+
unitPrice: z.ZodNullable<z.ZodString>;
|
|
522
|
+
currency: z.ZodNullable<z.ZodString>;
|
|
523
|
+
productType: z.ZodNullable<z.ZodString>;
|
|
524
|
+
vendor: z.ZodNullable<z.ZodString>;
|
|
525
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
526
|
+
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
527
|
+
collectionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
528
|
+
imageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
529
|
+
saleEvidence: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
530
|
+
regularPrice: z.ZodNullable<z.ZodString>;
|
|
531
|
+
salePrice: z.ZodNullable<z.ZodString>;
|
|
532
|
+
observedAt: z.ZodISODateTime;
|
|
533
|
+
}, z.core.$strict>>>;
|
|
534
|
+
observedAt: z.ZodISODateTime;
|
|
535
|
+
}, z.core.$strict>;
|
|
536
|
+
comparison: z.ZodEnum<{
|
|
537
|
+
EQUAL: "EQUAL";
|
|
538
|
+
DIFFERENT: "DIFFERENT";
|
|
539
|
+
INCOMPARABLE: "INCOMPARABLE";
|
|
540
|
+
}>;
|
|
541
|
+
}, z.core.$strict>>;
|
|
542
|
+
currentMerchandiseSubtotal: z.ZodObject<{
|
|
543
|
+
amountDecimal: z.ZodString;
|
|
544
|
+
currency: z.ZodString;
|
|
545
|
+
}, z.core.$strict>;
|
|
546
|
+
offerDecision: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
547
|
+
kind: z.ZodLiteral<"NO_VERIFIED_OFFER">;
|
|
548
|
+
reasonCode: z.ZodString;
|
|
549
|
+
discoveryIncomplete: z.ZodBoolean;
|
|
550
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
551
|
+
kind: z.ZodLiteral<"CHECKOUT_DISCOUNT">;
|
|
552
|
+
offerSet: z.ZodObject<{
|
|
553
|
+
schemaVersion: z.ZodLiteral<"moda.outreach.checkout-offers.v1">;
|
|
554
|
+
offers: z.ZodArray<z.ZodObject<{
|
|
555
|
+
offerId: z.ZodString;
|
|
556
|
+
providerDiscountId: z.ZodNullable<z.ZodString>;
|
|
557
|
+
method: z.ZodEnum<{
|
|
558
|
+
AUTOMATIC: "AUTOMATIC";
|
|
559
|
+
CODE: "CODE";
|
|
560
|
+
}>;
|
|
561
|
+
code: z.ZodNullable<z.ZodString>;
|
|
562
|
+
}, z.core.$strict>>;
|
|
563
|
+
}, z.core.$strict>;
|
|
564
|
+
members: z.ZodArray<z.ZodObject<{
|
|
565
|
+
offerId: z.ZodString;
|
|
566
|
+
providerDiscountId: z.ZodString;
|
|
567
|
+
method: z.ZodEnum<{
|
|
568
|
+
AUTOMATIC: "AUTOMATIC";
|
|
569
|
+
CODE: "CODE";
|
|
570
|
+
}>;
|
|
571
|
+
code: z.ZodNullable<z.ZodString>;
|
|
572
|
+
description: z.ZodString;
|
|
573
|
+
eligibility: z.ZodObject<{
|
|
574
|
+
offerId: z.ZodString;
|
|
575
|
+
verdict: z.ZodEnum<{
|
|
576
|
+
SUPPORTED: "SUPPORTED";
|
|
577
|
+
NOT_APPLICABLE: "NOT_APPLICABLE";
|
|
578
|
+
UNVERIFIABLE: "UNVERIFIABLE";
|
|
579
|
+
}>;
|
|
580
|
+
eligibleLineKeys: z.ZodArray<z.ZodString>;
|
|
581
|
+
reasonCodes: z.ZodArray<z.ZodString>;
|
|
582
|
+
}, z.core.$strict>;
|
|
583
|
+
}, z.core.$strict>>;
|
|
584
|
+
group: z.ZodObject<{
|
|
585
|
+
verdict: z.ZodEnum<{
|
|
586
|
+
SUPPORTED: "SUPPORTED";
|
|
587
|
+
UNVERIFIABLE: "UNVERIFIABLE";
|
|
588
|
+
INCOMPATIBLE: "INCOMPATIBLE";
|
|
589
|
+
}>;
|
|
590
|
+
offerIds: z.ZodArray<z.ZodString>;
|
|
591
|
+
reasonCodes: z.ZodArray<z.ZodString>;
|
|
592
|
+
}, z.core.$strict>;
|
|
593
|
+
discoveryIncomplete: z.ZodBoolean;
|
|
594
|
+
}, z.core.$strict>], "kind">;
|
|
595
|
+
toolActivity: z.ZodArray<z.ZodObject<{
|
|
596
|
+
toolName: z.ZodString;
|
|
597
|
+
modelStep: z.ZodNumber;
|
|
598
|
+
attempt: z.ZodNumber;
|
|
599
|
+
status: z.ZodEnum<{
|
|
600
|
+
OK: "OK";
|
|
601
|
+
ERROR: "ERROR";
|
|
602
|
+
}>;
|
|
603
|
+
durationMs: z.ZodNumber;
|
|
604
|
+
errorCode: z.ZodNullable<z.ZodEnum<{
|
|
605
|
+
DEADLINE: "DEADLINE";
|
|
606
|
+
CANCELLED: "CANCELLED";
|
|
607
|
+
DENIED: "DENIED";
|
|
608
|
+
BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
|
|
609
|
+
INPUT_INVALID: "INPUT_INVALID";
|
|
610
|
+
OUTSIDE_CHECKOUT: "OUTSIDE_CHECKOUT";
|
|
611
|
+
PRODUCT_NOT_FOUND: "PRODUCT_NOT_FOUND";
|
|
612
|
+
PRODUCT_UNAVAILABLE: "PRODUCT_UNAVAILABLE";
|
|
613
|
+
IDENTITY_MISMATCH: "IDENTITY_MISMATCH";
|
|
614
|
+
CURRENCY_MISMATCH: "CURRENCY_MISMATCH";
|
|
615
|
+
PRICE_UNAVAILABLE: "PRICE_UNAVAILABLE";
|
|
616
|
+
ARITHMETIC_UNSAFE: "ARITHMETIC_UNSAFE";
|
|
617
|
+
PROVIDER_UNAVAILABLE: "PROVIDER_UNAVAILABLE";
|
|
618
|
+
INVALID_RESULT: "INVALID_RESULT";
|
|
619
|
+
CURRENT_FACTS_CHANGED: "CURRENT_FACTS_CHANGED";
|
|
620
|
+
RESULT_TOO_LARGE: "RESULT_TOO_LARGE";
|
|
621
|
+
}>>;
|
|
622
|
+
}, z.core.$strict>>;
|
|
623
|
+
}, z.core.$strict>;
|
|
624
|
+
preparedProjection: z.ZodNullable<z.ZodObject<{
|
|
625
|
+
variant: z.ZodObject<{
|
|
626
|
+
id: z.ZodString;
|
|
627
|
+
shopId: z.ZodString;
|
|
628
|
+
providerAccountId: z.ZodString;
|
|
629
|
+
purpose: z.ZodString;
|
|
630
|
+
languageTag: z.ZodString;
|
|
631
|
+
providerLanguageCode: z.ZodString;
|
|
632
|
+
providerTemplateName: z.ZodString;
|
|
633
|
+
providerTemplateId: z.ZodNullable<z.ZodString>;
|
|
634
|
+
status: z.ZodString;
|
|
635
|
+
enabled: z.ZodBoolean;
|
|
636
|
+
metaRegistrationId: z.ZodNullable<z.ZodString>;
|
|
637
|
+
metaRegistration: z.ZodNullable<z.ZodObject<{
|
|
638
|
+
id: z.ZodString;
|
|
639
|
+
wabaId: z.ZodString;
|
|
640
|
+
providerTemplateName: z.ZodString;
|
|
641
|
+
providerLanguageCode: z.ZodString;
|
|
642
|
+
providerTemplateId: z.ZodNullable<z.ZodString>;
|
|
643
|
+
category: z.ZodString;
|
|
644
|
+
providerStatus: z.ZodNullable<z.ZodString>;
|
|
645
|
+
submissionState: z.ZodString;
|
|
646
|
+
failureCode: z.ZodNullable<z.ZodString>;
|
|
647
|
+
lastObservedContentHash: z.ZodNullable<z.ZodString>;
|
|
648
|
+
lastObservedCategory: z.ZodNullable<z.ZodString>;
|
|
649
|
+
driftDetectedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
650
|
+
submittedContentHash: z.ZodString;
|
|
651
|
+
componentsSnapshot: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
652
|
+
type: z.ZodLiteral<"HEADER">;
|
|
653
|
+
format: z.ZodLiteral<"TEXT">;
|
|
654
|
+
text: z.ZodString;
|
|
655
|
+
example: z.ZodOptional<z.ZodObject<{
|
|
656
|
+
header_text: z.ZodArray<z.ZodString>;
|
|
657
|
+
}, z.core.$strict>>;
|
|
658
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
659
|
+
type: z.ZodLiteral<"HEADER">;
|
|
660
|
+
format: z.ZodLiteral<"IMAGE">;
|
|
661
|
+
example: z.ZodOptional<z.ZodObject<{
|
|
662
|
+
header_handle: z.ZodArray<z.ZodString>;
|
|
663
|
+
}, z.core.$strict>>;
|
|
664
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
665
|
+
type: z.ZodLiteral<"BODY">;
|
|
666
|
+
text: z.ZodString;
|
|
667
|
+
example: z.ZodOptional<z.ZodObject<{
|
|
668
|
+
body_text: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
669
|
+
}, z.core.$strict>>;
|
|
670
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
671
|
+
type: z.ZodLiteral<"FOOTER">;
|
|
672
|
+
text: z.ZodString;
|
|
673
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
674
|
+
type: z.ZodLiteral<"BUTTONS">;
|
|
675
|
+
buttons: z.ZodArray<z.ZodObject<{
|
|
676
|
+
type: z.ZodLiteral<"URL">;
|
|
677
|
+
text: z.ZodString;
|
|
678
|
+
url: z.ZodString;
|
|
679
|
+
example: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
680
|
+
}, z.core.$strict>>;
|
|
681
|
+
}, z.core.$strict>]>>;
|
|
682
|
+
parameterBindingsSnapshot: z.ZodObject<{
|
|
683
|
+
schemaVersion: z.ZodOptional<z.ZodLiteral<1>>;
|
|
684
|
+
promotionTarget: z.ZodOptional<z.ZodEnum<{
|
|
685
|
+
CHECKOUT: "CHECKOUT";
|
|
686
|
+
ALTERNATIVE_PRODUCT: "ALTERNATIVE_PRODUCT";
|
|
687
|
+
}>>;
|
|
688
|
+
headerMediaRole: z.ZodOptional<z.ZodEnum<{
|
|
689
|
+
LOGO: "LOGO";
|
|
690
|
+
SQUARE_LOGO: "SQUARE_LOGO";
|
|
691
|
+
COVER_IMAGE: "COVER_IMAGE";
|
|
692
|
+
CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
|
|
693
|
+
}>>;
|
|
694
|
+
header: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
695
|
+
position: z.ZodNumber;
|
|
696
|
+
variable: z.ZodEnum<{
|
|
697
|
+
"customer.firstName": "customer.firstName";
|
|
698
|
+
"shop.name": "shop.name";
|
|
699
|
+
"shop.categoryName": "shop.categoryName";
|
|
700
|
+
"checkout.url": "checkout.url";
|
|
701
|
+
"checkout.itemsSummary": "checkout.itemsSummary";
|
|
702
|
+
"offer.code": "offer.code";
|
|
703
|
+
"offer.codes": "offer.codes";
|
|
704
|
+
"offer.description": "offer.description";
|
|
705
|
+
"promotion.productName": "promotion.productName";
|
|
706
|
+
"promotion.productUrl": "promotion.productUrl";
|
|
707
|
+
"promotion.offerDescription": "promotion.offerDescription";
|
|
708
|
+
"promotion.code": "promotion.code";
|
|
709
|
+
"shopBrand.brandName": "shopBrand.brandName";
|
|
710
|
+
"shopBrand.logoAltText": "shopBrand.logoAltText";
|
|
711
|
+
"shopBrand.logoWidth": "shopBrand.logoWidth";
|
|
712
|
+
"shopBrand.logoHeight": "shopBrand.logoHeight";
|
|
713
|
+
"shopBrand.squareLogoAltText": "shopBrand.squareLogoAltText";
|
|
714
|
+
"shopBrand.logoUrl": "shopBrand.logoUrl";
|
|
715
|
+
"shopBrand.squareLogoUrl": "shopBrand.squareLogoUrl";
|
|
716
|
+
"shopBrand.coverImageUrl": "shopBrand.coverImageUrl";
|
|
717
|
+
}>;
|
|
718
|
+
}, z.core.$strict>>>;
|
|
719
|
+
body: z.ZodArray<z.ZodObject<{
|
|
720
|
+
position: z.ZodNumber;
|
|
721
|
+
variable: z.ZodEnum<{
|
|
722
|
+
"customer.firstName": "customer.firstName";
|
|
723
|
+
"shop.name": "shop.name";
|
|
724
|
+
"shop.categoryName": "shop.categoryName";
|
|
725
|
+
"checkout.url": "checkout.url";
|
|
726
|
+
"checkout.itemsSummary": "checkout.itemsSummary";
|
|
727
|
+
"offer.code": "offer.code";
|
|
728
|
+
"offer.codes": "offer.codes";
|
|
729
|
+
"offer.description": "offer.description";
|
|
730
|
+
"promotion.productName": "promotion.productName";
|
|
731
|
+
"promotion.productUrl": "promotion.productUrl";
|
|
732
|
+
"promotion.offerDescription": "promotion.offerDescription";
|
|
733
|
+
"promotion.code": "promotion.code";
|
|
734
|
+
"shopBrand.brandName": "shopBrand.brandName";
|
|
735
|
+
"shopBrand.logoAltText": "shopBrand.logoAltText";
|
|
736
|
+
"shopBrand.logoWidth": "shopBrand.logoWidth";
|
|
737
|
+
"shopBrand.logoHeight": "shopBrand.logoHeight";
|
|
738
|
+
"shopBrand.squareLogoAltText": "shopBrand.squareLogoAltText";
|
|
739
|
+
"shopBrand.logoUrl": "shopBrand.logoUrl";
|
|
740
|
+
"shopBrand.squareLogoUrl": "shopBrand.squareLogoUrl";
|
|
741
|
+
"shopBrand.coverImageUrl": "shopBrand.coverImageUrl";
|
|
742
|
+
}>;
|
|
743
|
+
}, z.core.$strict>>;
|
|
744
|
+
buttons: z.ZodArray<z.ZodObject<{
|
|
745
|
+
index: z.ZodNumber;
|
|
746
|
+
subType: z.ZodLiteral<"url">;
|
|
747
|
+
variable: z.ZodEnum<{
|
|
748
|
+
"checkout.url": "checkout.url";
|
|
749
|
+
"promotion.productUrl": "promotion.productUrl";
|
|
750
|
+
}>;
|
|
751
|
+
}, z.core.$strict>>;
|
|
752
|
+
}, z.core.$strict>;
|
|
753
|
+
locale: z.ZodObject<{
|
|
754
|
+
id: z.ZodString;
|
|
755
|
+
languageTag: z.ZodString;
|
|
756
|
+
providerLanguageCode: z.ZodNullable<z.ZodString>;
|
|
757
|
+
status: z.ZodString;
|
|
758
|
+
contentHash: z.ZodNullable<z.ZodString>;
|
|
759
|
+
definition: z.ZodObject<{
|
|
760
|
+
id: z.ZodString;
|
|
761
|
+
kind: z.ZodString;
|
|
762
|
+
purpose: z.ZodNullable<z.ZodString>;
|
|
763
|
+
offerType: z.ZodNullable<z.ZodString>;
|
|
764
|
+
status: z.ZodString;
|
|
765
|
+
category: z.ZodNullable<z.ZodString>;
|
|
766
|
+
providerTemplateName: z.ZodNullable<z.ZodString>;
|
|
767
|
+
publishedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
768
|
+
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
769
|
+
}, z.core.$strict>;
|
|
770
|
+
}, z.core.$strict>;
|
|
771
|
+
}, z.core.$strict>>;
|
|
772
|
+
}, z.core.$strict>;
|
|
773
|
+
canonicalLanguageTag: z.ZodString;
|
|
774
|
+
selectionSource: z.ZodEnum<{
|
|
775
|
+
exact: "exact";
|
|
776
|
+
base: "base";
|
|
777
|
+
"merchant-fallback": "merchant-fallback";
|
|
778
|
+
"platform-fallback": "platform-fallback";
|
|
779
|
+
}>;
|
|
780
|
+
textFallback: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
781
|
+
variant: z.ZodObject<{
|
|
782
|
+
id: z.ZodString;
|
|
783
|
+
shopId: z.ZodString;
|
|
784
|
+
providerAccountId: z.ZodString;
|
|
785
|
+
purpose: z.ZodString;
|
|
786
|
+
languageTag: z.ZodString;
|
|
787
|
+
providerLanguageCode: z.ZodString;
|
|
788
|
+
providerTemplateName: z.ZodString;
|
|
789
|
+
providerTemplateId: z.ZodNullable<z.ZodString>;
|
|
790
|
+
status: z.ZodString;
|
|
791
|
+
enabled: z.ZodBoolean;
|
|
792
|
+
metaRegistrationId: z.ZodNullable<z.ZodString>;
|
|
793
|
+
metaRegistration: z.ZodNullable<z.ZodObject<{
|
|
794
|
+
id: z.ZodString;
|
|
795
|
+
wabaId: z.ZodString;
|
|
796
|
+
providerTemplateName: z.ZodString;
|
|
797
|
+
providerLanguageCode: z.ZodString;
|
|
798
|
+
providerTemplateId: z.ZodNullable<z.ZodString>;
|
|
799
|
+
category: z.ZodString;
|
|
800
|
+
providerStatus: z.ZodNullable<z.ZodString>;
|
|
801
|
+
submissionState: z.ZodString;
|
|
802
|
+
failureCode: z.ZodNullable<z.ZodString>;
|
|
803
|
+
lastObservedContentHash: z.ZodNullable<z.ZodString>;
|
|
804
|
+
lastObservedCategory: z.ZodNullable<z.ZodString>;
|
|
805
|
+
driftDetectedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
806
|
+
submittedContentHash: z.ZodString;
|
|
807
|
+
componentsSnapshot: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
808
|
+
type: z.ZodLiteral<"HEADER">;
|
|
809
|
+
format: z.ZodLiteral<"TEXT">;
|
|
810
|
+
text: z.ZodString;
|
|
811
|
+
example: z.ZodOptional<z.ZodObject<{
|
|
812
|
+
header_text: z.ZodArray<z.ZodString>;
|
|
813
|
+
}, z.core.$strict>>;
|
|
814
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
815
|
+
type: z.ZodLiteral<"HEADER">;
|
|
816
|
+
format: z.ZodLiteral<"IMAGE">;
|
|
817
|
+
example: z.ZodOptional<z.ZodObject<{
|
|
818
|
+
header_handle: z.ZodArray<z.ZodString>;
|
|
819
|
+
}, z.core.$strict>>;
|
|
820
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
821
|
+
type: z.ZodLiteral<"BODY">;
|
|
822
|
+
text: z.ZodString;
|
|
823
|
+
example: z.ZodOptional<z.ZodObject<{
|
|
824
|
+
body_text: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
825
|
+
}, z.core.$strict>>;
|
|
826
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
827
|
+
type: z.ZodLiteral<"FOOTER">;
|
|
828
|
+
text: z.ZodString;
|
|
829
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
830
|
+
type: z.ZodLiteral<"BUTTONS">;
|
|
831
|
+
buttons: z.ZodArray<z.ZodObject<{
|
|
832
|
+
type: z.ZodLiteral<"URL">;
|
|
833
|
+
text: z.ZodString;
|
|
834
|
+
url: z.ZodString;
|
|
835
|
+
example: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
836
|
+
}, z.core.$strict>>;
|
|
837
|
+
}, z.core.$strict>]>>;
|
|
838
|
+
parameterBindingsSnapshot: z.ZodObject<{
|
|
839
|
+
schemaVersion: z.ZodOptional<z.ZodLiteral<1>>;
|
|
840
|
+
promotionTarget: z.ZodOptional<z.ZodEnum<{
|
|
841
|
+
CHECKOUT: "CHECKOUT";
|
|
842
|
+
ALTERNATIVE_PRODUCT: "ALTERNATIVE_PRODUCT";
|
|
843
|
+
}>>;
|
|
844
|
+
headerMediaRole: z.ZodOptional<z.ZodEnum<{
|
|
845
|
+
LOGO: "LOGO";
|
|
846
|
+
SQUARE_LOGO: "SQUARE_LOGO";
|
|
847
|
+
COVER_IMAGE: "COVER_IMAGE";
|
|
848
|
+
CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
|
|
849
|
+
}>>;
|
|
850
|
+
header: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
851
|
+
position: z.ZodNumber;
|
|
852
|
+
variable: z.ZodEnum<{
|
|
853
|
+
"customer.firstName": "customer.firstName";
|
|
854
|
+
"shop.name": "shop.name";
|
|
855
|
+
"shop.categoryName": "shop.categoryName";
|
|
856
|
+
"checkout.url": "checkout.url";
|
|
857
|
+
"checkout.itemsSummary": "checkout.itemsSummary";
|
|
858
|
+
"offer.code": "offer.code";
|
|
859
|
+
"offer.codes": "offer.codes";
|
|
860
|
+
"offer.description": "offer.description";
|
|
861
|
+
"promotion.productName": "promotion.productName";
|
|
862
|
+
"promotion.productUrl": "promotion.productUrl";
|
|
863
|
+
"promotion.offerDescription": "promotion.offerDescription";
|
|
864
|
+
"promotion.code": "promotion.code";
|
|
865
|
+
"shopBrand.brandName": "shopBrand.brandName";
|
|
866
|
+
"shopBrand.logoAltText": "shopBrand.logoAltText";
|
|
867
|
+
"shopBrand.logoWidth": "shopBrand.logoWidth";
|
|
868
|
+
"shopBrand.logoHeight": "shopBrand.logoHeight";
|
|
869
|
+
"shopBrand.squareLogoAltText": "shopBrand.squareLogoAltText";
|
|
870
|
+
"shopBrand.logoUrl": "shopBrand.logoUrl";
|
|
871
|
+
"shopBrand.squareLogoUrl": "shopBrand.squareLogoUrl";
|
|
872
|
+
"shopBrand.coverImageUrl": "shopBrand.coverImageUrl";
|
|
873
|
+
}>;
|
|
874
|
+
}, z.core.$strict>>>;
|
|
875
|
+
body: z.ZodArray<z.ZodObject<{
|
|
876
|
+
position: z.ZodNumber;
|
|
877
|
+
variable: z.ZodEnum<{
|
|
878
|
+
"customer.firstName": "customer.firstName";
|
|
879
|
+
"shop.name": "shop.name";
|
|
880
|
+
"shop.categoryName": "shop.categoryName";
|
|
881
|
+
"checkout.url": "checkout.url";
|
|
882
|
+
"checkout.itemsSummary": "checkout.itemsSummary";
|
|
883
|
+
"offer.code": "offer.code";
|
|
884
|
+
"offer.codes": "offer.codes";
|
|
885
|
+
"offer.description": "offer.description";
|
|
886
|
+
"promotion.productName": "promotion.productName";
|
|
887
|
+
"promotion.productUrl": "promotion.productUrl";
|
|
888
|
+
"promotion.offerDescription": "promotion.offerDescription";
|
|
889
|
+
"promotion.code": "promotion.code";
|
|
890
|
+
"shopBrand.brandName": "shopBrand.brandName";
|
|
891
|
+
"shopBrand.logoAltText": "shopBrand.logoAltText";
|
|
892
|
+
"shopBrand.logoWidth": "shopBrand.logoWidth";
|
|
893
|
+
"shopBrand.logoHeight": "shopBrand.logoHeight";
|
|
894
|
+
"shopBrand.squareLogoAltText": "shopBrand.squareLogoAltText";
|
|
895
|
+
"shopBrand.logoUrl": "shopBrand.logoUrl";
|
|
896
|
+
"shopBrand.squareLogoUrl": "shopBrand.squareLogoUrl";
|
|
897
|
+
"shopBrand.coverImageUrl": "shopBrand.coverImageUrl";
|
|
898
|
+
}>;
|
|
899
|
+
}, z.core.$strict>>;
|
|
900
|
+
buttons: z.ZodArray<z.ZodObject<{
|
|
901
|
+
index: z.ZodNumber;
|
|
902
|
+
subType: z.ZodLiteral<"url">;
|
|
903
|
+
variable: z.ZodEnum<{
|
|
904
|
+
"checkout.url": "checkout.url";
|
|
905
|
+
"promotion.productUrl": "promotion.productUrl";
|
|
906
|
+
}>;
|
|
907
|
+
}, z.core.$strict>>;
|
|
908
|
+
}, z.core.$strict>;
|
|
909
|
+
locale: z.ZodObject<{
|
|
910
|
+
id: z.ZodString;
|
|
911
|
+
languageTag: z.ZodString;
|
|
912
|
+
providerLanguageCode: z.ZodNullable<z.ZodString>;
|
|
913
|
+
status: z.ZodString;
|
|
914
|
+
contentHash: z.ZodNullable<z.ZodString>;
|
|
915
|
+
definition: z.ZodObject<{
|
|
916
|
+
id: z.ZodString;
|
|
917
|
+
kind: z.ZodString;
|
|
918
|
+
purpose: z.ZodNullable<z.ZodString>;
|
|
919
|
+
offerType: z.ZodNullable<z.ZodString>;
|
|
920
|
+
status: z.ZodString;
|
|
921
|
+
category: z.ZodNullable<z.ZodString>;
|
|
922
|
+
providerTemplateName: z.ZodNullable<z.ZodString>;
|
|
923
|
+
publishedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
924
|
+
retiredAt: z.ZodNullable<z.ZodISODateTime>;
|
|
925
|
+
}, z.core.$strict>;
|
|
926
|
+
}, z.core.$strict>;
|
|
927
|
+
}, z.core.$strict>>;
|
|
928
|
+
}, z.core.$strict>;
|
|
929
|
+
canonicalLanguageTag: z.ZodString;
|
|
930
|
+
selectionSource: z.ZodEnum<{
|
|
931
|
+
exact: "exact";
|
|
932
|
+
base: "base";
|
|
933
|
+
"merchant-fallback": "merchant-fallback";
|
|
934
|
+
"platform-fallback": "platform-fallback";
|
|
935
|
+
}>;
|
|
936
|
+
}, z.core.$strict>>>;
|
|
937
|
+
}, z.core.$strict>>;
|
|
938
|
+
variables: z.ZodObject<{
|
|
939
|
+
shopName: z.ZodNullable<z.ZodString>;
|
|
940
|
+
customerFirstName: z.ZodNullable<z.ZodString>;
|
|
941
|
+
checkoutUrl: z.ZodString;
|
|
942
|
+
shopCategory: z.ZodNullable<z.ZodString>;
|
|
943
|
+
}, z.core.$strict>;
|
|
944
|
+
headerMedia: z.ZodNullable<z.ZodObject<{
|
|
945
|
+
shopId: z.ZodString;
|
|
946
|
+
role: z.ZodEnum<{
|
|
947
|
+
LOGO: "LOGO";
|
|
948
|
+
SQUARE_LOGO: "SQUARE_LOGO";
|
|
949
|
+
COVER_IMAGE: "COVER_IMAGE";
|
|
950
|
+
CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
|
|
951
|
+
}>;
|
|
952
|
+
status: z.ZodLiteral<"READY">;
|
|
953
|
+
kind: z.ZodLiteral<"R2_DERIVATIVE">;
|
|
954
|
+
httpsUrl: z.ZodString;
|
|
955
|
+
}, z.core.$strict>>;
|
|
956
|
+
}, z.core.$strict>;
|
|
957
|
+
declare const InitialOutreachRenderResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
958
|
+
kind: z.ZodLiteral<"ready">;
|
|
959
|
+
purpose: z.ZodEnum<{
|
|
960
|
+
INITIAL_NO_OFFER: "INITIAL_NO_OFFER";
|
|
961
|
+
INITIAL_CODE_OFFER: "INITIAL_CODE_OFFER";
|
|
962
|
+
INITIAL_AUTOMATIC_OFFER: "INITIAL_AUTOMATIC_OFFER";
|
|
963
|
+
}>;
|
|
964
|
+
templateProvenance: z.ZodObject<{
|
|
965
|
+
variantId: z.ZodString;
|
|
966
|
+
registrationId: z.ZodString;
|
|
967
|
+
definitionId: z.ZodString;
|
|
968
|
+
providerTemplateId: z.ZodString;
|
|
969
|
+
providerTemplateName: z.ZodString;
|
|
970
|
+
providerLanguageCode: z.ZodString;
|
|
971
|
+
submittedContentHash: z.ZodString;
|
|
972
|
+
bindingFingerprint: z.ZodString;
|
|
973
|
+
}, z.core.$strict>;
|
|
974
|
+
parameters: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
975
|
+
type: z.ZodLiteral<"header">;
|
|
976
|
+
parameters: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
977
|
+
type: z.ZodLiteral<"text">;
|
|
978
|
+
text: z.ZodString;
|
|
979
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
980
|
+
type: z.ZodLiteral<"image">;
|
|
981
|
+
image: z.ZodObject<{
|
|
982
|
+
link: z.ZodString;
|
|
983
|
+
}, z.core.$strict>;
|
|
984
|
+
}, z.core.$strict>]>>;
|
|
985
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
986
|
+
type: z.ZodLiteral<"body">;
|
|
987
|
+
parameters: z.ZodArray<z.ZodObject<{
|
|
988
|
+
type: z.ZodLiteral<"text">;
|
|
989
|
+
text: z.ZodString;
|
|
990
|
+
}, z.core.$strict>>;
|
|
991
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
992
|
+
type: z.ZodLiteral<"button">;
|
|
993
|
+
sub_type: z.ZodLiteral<"url">;
|
|
994
|
+
index: z.ZodString;
|
|
995
|
+
parameters: z.ZodTuple<[z.ZodObject<{
|
|
996
|
+
type: z.ZodLiteral<"text">;
|
|
997
|
+
text: z.ZodString;
|
|
998
|
+
}, z.core.$strict>], null>;
|
|
999
|
+
}, z.core.$strict>]>>;
|
|
1000
|
+
headerPreview: z.ZodNullable<z.ZodObject<{
|
|
1001
|
+
shopId: z.ZodString;
|
|
1002
|
+
role: z.ZodEnum<{
|
|
1003
|
+
LOGO: "LOGO";
|
|
1004
|
+
SQUARE_LOGO: "SQUARE_LOGO";
|
|
1005
|
+
COVER_IMAGE: "COVER_IMAGE";
|
|
1006
|
+
CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
|
|
1007
|
+
}>;
|
|
1008
|
+
status: z.ZodLiteral<"READY">;
|
|
1009
|
+
kind: z.ZodLiteral<"R2_DERIVATIVE">;
|
|
1010
|
+
httpsUrl: z.ZodString;
|
|
1011
|
+
}, z.core.$strict>>;
|
|
1012
|
+
renderedText: z.ZodString;
|
|
1013
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1014
|
+
kind: z.ZodLiteral<"refused">;
|
|
1015
|
+
reasonCode: z.ZodEnum<{
|
|
1016
|
+
IDENTITY_MISMATCH: "IDENTITY_MISMATCH";
|
|
1017
|
+
PROVIDER_UNAVAILABLE: "PROVIDER_UNAVAILABLE";
|
|
1018
|
+
INVALID_REQUEST: "INVALID_REQUEST";
|
|
1019
|
+
INVALID_LANGUAGE: "INVALID_LANGUAGE";
|
|
1020
|
+
SHOP_UNAVAILABLE: "SHOP_UNAVAILABLE";
|
|
1021
|
+
SENDER_UNAVAILABLE: "SENDER_UNAVAILABLE";
|
|
1022
|
+
SENDER_MISMATCH: "SENDER_MISMATCH";
|
|
1023
|
+
NO_LANGUAGE: "NO_LANGUAGE";
|
|
1024
|
+
NO_APPROVED_ASSIGNMENT: "NO_APPROVED_ASSIGNMENT";
|
|
1025
|
+
LEGACY_ASSIGNMENT: "LEGACY_ASSIGNMENT";
|
|
1026
|
+
AMBIGUOUS_ASSIGNMENT: "AMBIGUOUS_ASSIGNMENT";
|
|
1027
|
+
REGISTRATION_UNAVAILABLE: "REGISTRATION_UNAVAILABLE";
|
|
1028
|
+
PROVIDER_DRIFT: "PROVIDER_DRIFT";
|
|
1029
|
+
DEFINITION_UNAVAILABLE: "DEFINITION_UNAVAILABLE";
|
|
1030
|
+
LOCALE_UNAVAILABLE: "LOCALE_UNAVAILABLE";
|
|
1031
|
+
BINDINGS_INVALID: "BINDINGS_INVALID";
|
|
1032
|
+
BINDING_FINGERPRINT_MISMATCH: "BINDING_FINGERPRINT_MISMATCH";
|
|
1033
|
+
BINDING_VALUE_UNAVAILABLE: "BINDING_VALUE_UNAVAILABLE";
|
|
1034
|
+
CHECKOUT_UNAVAILABLE: "CHECKOUT_UNAVAILABLE";
|
|
1035
|
+
CHECKOUT_UNTRUSTED: "CHECKOUT_UNTRUSTED";
|
|
1036
|
+
MEDIA_NOT_READY: "MEDIA_NOT_READY";
|
|
1037
|
+
PROMOTION_PRODUCT_URL_UNAVAILABLE: "PROMOTION_PRODUCT_URL_UNAVAILABLE";
|
|
1038
|
+
MESSAGE_TOO_LARGE: "MESSAGE_TOO_LARGE";
|
|
1039
|
+
}>;
|
|
1040
|
+
}, z.core.$strict>], "kind">;
|
|
1041
|
+
type InitialOutreachRenderInput = z.infer<typeof InitialOutreachRenderInputSchema>;
|
|
1042
|
+
type InitialOutreachRenderResult = z.infer<typeof InitialOutreachRenderResultSchema>;
|
|
1043
|
+
|
|
1044
|
+
/** One implementation for production and preview. Ports must authenticate every call. No retries. */
|
|
1045
|
+
declare function evaluateInitialOutreach(raw: InitialOutreachEvaluationInput, ports: InitialOutreachPorts): Promise<InitialOutreachEvaluationResult>;
|
|
1046
|
+
declare const evaluateInitialOutreachPreview: typeof evaluateInitialOutreach;
|
|
1047
|
+
|
|
1048
|
+
declare function fingerprintInitialOutreachBasket(raw: InitialOutreachEvaluationInput): string;
|
|
1049
|
+
|
|
1050
|
+
declare function renderInitialOutreachPreview(raw: InitialOutreachRenderInput): InitialOutreachRenderResult;
|
|
1051
|
+
|
|
1052
|
+
type RecoveryStage = "INITIAL" | "FOLLOW_UP";
|
|
1053
|
+
type VerifiedOfferPresentation = "NO_OFFER" | "CODE_OFFER" | "AUTOMATIC_OFFER";
|
|
1054
|
+
type SelectionSource = "exact" | "base" | "merchant-fallback" | "platform-fallback";
|
|
1055
|
+
type ShopSelectionRow = {
|
|
1056
|
+
id: string;
|
|
1057
|
+
status: string;
|
|
1058
|
+
defaultLanguageTag: string | null;
|
|
1059
|
+
};
|
|
1060
|
+
type AssignedVariantRow = z.infer<typeof AssignedVariantSchema>;
|
|
1061
|
+
type TemplateUnavailableReason = "INVALID_REQUEST" | "INVALID_LANGUAGE" | "SHOP_UNAVAILABLE" | "SENDER_UNAVAILABLE" | "SENDER_MISMATCH" | "NO_LANGUAGE" | "NO_APPROVED_ASSIGNMENT" | "LEGACY_ASSIGNMENT" | "AMBIGUOUS_ASSIGNMENT" | "REGISTRATION_UNAVAILABLE" | "PROVIDER_UNAVAILABLE" | "PROVIDER_DRIFT" | "IDENTITY_MISMATCH" | "DEFINITION_UNAVAILABLE" | "LOCALE_UNAVAILABLE" | "BINDINGS_INVALID" | "BINDING_FINGERPRINT_MISMATCH" | "BINDING_VALUE_UNAVAILABLE" | "CHECKOUT_UNAVAILABLE" | "CHECKOUT_UNTRUSTED" | "MEDIA_NOT_READY" | "PROMOTION_PRODUCT_URL_UNAVAILABLE";
|
|
1062
|
+
|
|
1063
|
+
type SelectedAssignment = Readonly<{
|
|
1064
|
+
variant: AssignedVariantRow;
|
|
1065
|
+
canonicalLanguageTag: string;
|
|
1066
|
+
selectionSource: SelectionSource;
|
|
1067
|
+
}>;
|
|
1068
|
+
type AssignmentSelection = {
|
|
1069
|
+
outcome: "selected";
|
|
1070
|
+
value: SelectedAssignment;
|
|
1071
|
+
} | {
|
|
1072
|
+
outcome: "unavailable";
|
|
1073
|
+
reason: TemplateUnavailableReason;
|
|
1074
|
+
};
|
|
1075
|
+
/** Selection is pure except for bounded diagnostics on caught parsing errors. */
|
|
1076
|
+
declare function selectRecoveryAssignment(input: {
|
|
1077
|
+
shop: ShopSelectionRow;
|
|
1078
|
+
shopId: string;
|
|
1079
|
+
senderWabaId: string;
|
|
1080
|
+
purpose: string;
|
|
1081
|
+
variants: readonly AssignedVariantRow[];
|
|
1082
|
+
stage: RecoveryStage;
|
|
1083
|
+
promotionTarget?: "CHECKOUT" | "ALTERNATIVE_PRODUCT";
|
|
1084
|
+
offer: VerifiedOfferPresentation;
|
|
1085
|
+
offerCount?: number;
|
|
1086
|
+
conversationLanguageTag: string | null;
|
|
1087
|
+
merchantLanguageTag: string | null;
|
|
1088
|
+
platformFallbackEnabled: boolean;
|
|
1089
|
+
platformFallbackLanguageTag: string | null;
|
|
1090
|
+
headerFormat?: "TEXT" | "IMAGE";
|
|
1091
|
+
logger: Pick<StructuredLogger, "warn">;
|
|
1092
|
+
}): AssignmentSelection;
|
|
1093
|
+
|
|
1094
|
+
export { type InitialOutreachEvaluationInput, InitialOutreachEvaluationInputSchema, type InitialOutreachEvaluationResult, InitialOutreachEvaluationResultSchema, type InitialOutreachPorts, type InitialOutreachRenderInput, InitialOutreachRenderInputSchema, type InitialOutreachRenderResult, InitialOutreachRenderResultSchema, type InitialOutreachToolCall, evaluateInitialOutreach, evaluateInitialOutreachPreview, fingerprintInitialOutreachBasket, renderInitialOutreachPreview, selectRecoveryAssignment };
|