@modainteract/moda-interact-shared 5.8.0 → 5.10.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.
@@ -63,6 +63,55 @@ declare const InitialOutreachEvaluationInputSchema: z.ZodObject<{
63
63
  outputTokens: z.ZodNumber;
64
64
  }, z.core.$strict>;
65
65
  }, z.core.$strict>;
66
+ declare const OfferDecisionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
67
+ kind: z.ZodLiteral<"NO_VERIFIED_OFFER">;
68
+ reasonCode: z.ZodString;
69
+ discoveryIncomplete: z.ZodBoolean;
70
+ }, z.core.$strict>, z.ZodObject<{
71
+ kind: z.ZodLiteral<"CHECKOUT_DISCOUNT">;
72
+ offerSet: z.ZodObject<{
73
+ schemaVersion: z.ZodLiteral<"moda.outreach.checkout-offers.v1">;
74
+ offers: z.ZodArray<z.ZodObject<{
75
+ offerId: z.ZodString;
76
+ providerDiscountId: z.ZodNullable<z.ZodString>;
77
+ method: z.ZodEnum<{
78
+ AUTOMATIC: "AUTOMATIC";
79
+ CODE: "CODE";
80
+ }>;
81
+ code: z.ZodNullable<z.ZodString>;
82
+ }, z.core.$strict>>;
83
+ }, z.core.$strict>;
84
+ members: z.ZodArray<z.ZodObject<{
85
+ offerId: z.ZodString;
86
+ providerDiscountId: z.ZodString;
87
+ method: z.ZodEnum<{
88
+ AUTOMATIC: "AUTOMATIC";
89
+ CODE: "CODE";
90
+ }>;
91
+ code: z.ZodNullable<z.ZodString>;
92
+ description: z.ZodString;
93
+ eligibility: z.ZodObject<{
94
+ offerId: z.ZodString;
95
+ verdict: z.ZodEnum<{
96
+ SUPPORTED: "SUPPORTED";
97
+ NOT_APPLICABLE: "NOT_APPLICABLE";
98
+ UNVERIFIABLE: "UNVERIFIABLE";
99
+ }>;
100
+ eligibleLineKeys: z.ZodArray<z.ZodString>;
101
+ reasonCodes: z.ZodArray<z.ZodString>;
102
+ }, z.core.$strict>;
103
+ }, z.core.$strict>>;
104
+ group: z.ZodObject<{
105
+ verdict: z.ZodEnum<{
106
+ SUPPORTED: "SUPPORTED";
107
+ UNVERIFIABLE: "UNVERIFIABLE";
108
+ INCOMPATIBLE: "INCOMPATIBLE";
109
+ }>;
110
+ offerIds: z.ZodArray<z.ZodString>;
111
+ reasonCodes: z.ZodArray<z.ZodString>;
112
+ }, z.core.$strict>;
113
+ discoveryIncomplete: z.ZodBoolean;
114
+ }, z.core.$strict>], "kind">;
66
115
  declare const InitialOutreachEvaluationResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
67
116
  kind: z.ZodLiteral<"ready">;
68
117
  schemaVersion: z.ZodLiteral<1>;
@@ -282,6 +331,7 @@ declare const InitialOutreachEvaluationResultSchema: z.ZodDiscriminatedUnion<[z.
282
331
  }, z.core.$strict>], "kind">;
283
332
  type InitialOutreachEvaluationInput = z.infer<typeof InitialOutreachEvaluationInputSchema>;
284
333
  type InitialOutreachEvaluationResult = z.infer<typeof InitialOutreachEvaluationResultSchema>;
334
+ type OfferDecision = z.infer<typeof OfferDecisionSchema>;
285
335
  type CallContext = {
286
336
  runId: string;
287
337
  shopId: string;
@@ -314,6 +364,108 @@ interface InitialOutreachPorts {
314
364
  }): void;
315
365
  }
316
366
 
367
+ declare const FrozenBindingsSchema: z.ZodObject<{
368
+ schemaVersion: z.ZodOptional<z.ZodLiteral<1>>;
369
+ promotionTarget: z.ZodOptional<z.ZodEnum<{
370
+ CHECKOUT: "CHECKOUT";
371
+ ALTERNATIVE_PRODUCT: "ALTERNATIVE_PRODUCT";
372
+ }>>;
373
+ headerMediaRole: z.ZodOptional<z.ZodEnum<{
374
+ LOGO: "LOGO";
375
+ SQUARE_LOGO: "SQUARE_LOGO";
376
+ COVER_IMAGE: "COVER_IMAGE";
377
+ CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
378
+ }>>;
379
+ header: z.ZodOptional<z.ZodArray<z.ZodObject<{
380
+ position: z.ZodNumber;
381
+ variable: z.ZodEnum<{
382
+ "customer.firstName": "customer.firstName";
383
+ "shop.name": "shop.name";
384
+ "shop.categoryName": "shop.categoryName";
385
+ "checkout.url": "checkout.url";
386
+ "checkout.itemsSummary": "checkout.itemsSummary";
387
+ "offer.code": "offer.code";
388
+ "offer.codes": "offer.codes";
389
+ "offer.description": "offer.description";
390
+ "promotion.productName": "promotion.productName";
391
+ "promotion.productUrl": "promotion.productUrl";
392
+ "promotion.offerDescription": "promotion.offerDescription";
393
+ "promotion.code": "promotion.code";
394
+ "shopBrand.brandName": "shopBrand.brandName";
395
+ "shopBrand.logoAltText": "shopBrand.logoAltText";
396
+ "shopBrand.logoWidth": "shopBrand.logoWidth";
397
+ "shopBrand.logoHeight": "shopBrand.logoHeight";
398
+ "shopBrand.squareLogoAltText": "shopBrand.squareLogoAltText";
399
+ "shopBrand.logoUrl": "shopBrand.logoUrl";
400
+ "shopBrand.squareLogoUrl": "shopBrand.squareLogoUrl";
401
+ "shopBrand.coverImageUrl": "shopBrand.coverImageUrl";
402
+ }>;
403
+ }, z.core.$strict>>>;
404
+ body: z.ZodArray<z.ZodObject<{
405
+ position: z.ZodNumber;
406
+ variable: z.ZodEnum<{
407
+ "customer.firstName": "customer.firstName";
408
+ "shop.name": "shop.name";
409
+ "shop.categoryName": "shop.categoryName";
410
+ "checkout.url": "checkout.url";
411
+ "checkout.itemsSummary": "checkout.itemsSummary";
412
+ "offer.code": "offer.code";
413
+ "offer.codes": "offer.codes";
414
+ "offer.description": "offer.description";
415
+ "promotion.productName": "promotion.productName";
416
+ "promotion.productUrl": "promotion.productUrl";
417
+ "promotion.offerDescription": "promotion.offerDescription";
418
+ "promotion.code": "promotion.code";
419
+ "shopBrand.brandName": "shopBrand.brandName";
420
+ "shopBrand.logoAltText": "shopBrand.logoAltText";
421
+ "shopBrand.logoWidth": "shopBrand.logoWidth";
422
+ "shopBrand.logoHeight": "shopBrand.logoHeight";
423
+ "shopBrand.squareLogoAltText": "shopBrand.squareLogoAltText";
424
+ "shopBrand.logoUrl": "shopBrand.logoUrl";
425
+ "shopBrand.squareLogoUrl": "shopBrand.squareLogoUrl";
426
+ "shopBrand.coverImageUrl": "shopBrand.coverImageUrl";
427
+ }>;
428
+ }, z.core.$strict>>;
429
+ buttons: z.ZodArray<z.ZodObject<{
430
+ index: z.ZodNumber;
431
+ subType: z.ZodLiteral<"url">;
432
+ variable: z.ZodEnum<{
433
+ "checkout.url": "checkout.url";
434
+ "promotion.productUrl": "promotion.productUrl";
435
+ }>;
436
+ }, z.core.$strict>>;
437
+ }, z.core.$strict>;
438
+ declare const ComponentSchema: z.ZodUnion<readonly [z.ZodObject<{
439
+ type: z.ZodLiteral<"HEADER">;
440
+ format: z.ZodLiteral<"TEXT">;
441
+ text: z.ZodString;
442
+ example: z.ZodOptional<z.ZodObject<{
443
+ header_text: z.ZodArray<z.ZodString>;
444
+ }, z.core.$strict>>;
445
+ }, z.core.$strict>, z.ZodObject<{
446
+ type: z.ZodLiteral<"HEADER">;
447
+ format: z.ZodLiteral<"IMAGE">;
448
+ example: z.ZodOptional<z.ZodObject<{
449
+ header_handle: z.ZodArray<z.ZodString>;
450
+ }, z.core.$strict>>;
451
+ }, z.core.$strict>, z.ZodObject<{
452
+ type: z.ZodLiteral<"BODY">;
453
+ text: z.ZodString;
454
+ example: z.ZodOptional<z.ZodObject<{
455
+ body_text: z.ZodArray<z.ZodArray<z.ZodString>>;
456
+ }, z.core.$strict>>;
457
+ }, z.core.$strict>, z.ZodObject<{
458
+ type: z.ZodLiteral<"FOOTER">;
459
+ text: z.ZodString;
460
+ }, z.core.$strict>, z.ZodObject<{
461
+ type: z.ZodLiteral<"BUTTONS">;
462
+ buttons: z.ZodArray<z.ZodObject<{
463
+ type: z.ZodLiteral<"URL">;
464
+ text: z.ZodString;
465
+ url: z.ZodString;
466
+ example: z.ZodOptional<z.ZodArray<z.ZodString>>;
467
+ }, z.core.$strict>>;
468
+ }, z.core.$strict>]>;
317
469
  declare const AssignedVariantSchema: z.ZodObject<{
318
470
  id: z.ZodString;
319
471
  shopId: z.ZodString;
@@ -462,6 +614,67 @@ declare const AssignedVariantSchema: z.ZodObject<{
462
614
  }, z.core.$strict>;
463
615
  }, z.core.$strict>>;
464
616
  }, z.core.$strict>;
617
+ declare const PreparedOutreachBrandSchema: z.ZodObject<{
618
+ shopId: z.ZodString;
619
+ brandName: z.ZodNullable<z.ZodString>;
620
+ logoAltText: z.ZodNullable<z.ZodString>;
621
+ logoWidth: z.ZodNullable<z.ZodNumber>;
622
+ logoHeight: z.ZodNullable<z.ZodNumber>;
623
+ squareLogoAltText: z.ZodNullable<z.ZodString>;
624
+ }, z.core.$strict>;
625
+ declare const PreparedOutreachBrandMediaItemSchema: z.ZodObject<{
626
+ shopId: z.ZodString;
627
+ role: z.ZodEnum<{
628
+ LOGO: "LOGO";
629
+ SQUARE_LOGO: "SQUARE_LOGO";
630
+ COVER_IMAGE: "COVER_IMAGE";
631
+ CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
632
+ }>;
633
+ status: z.ZodLiteral<"READY">;
634
+ kind: z.ZodLiteral<"R2_DERIVATIVE">;
635
+ httpsUrl: z.ZodString;
636
+ }, z.core.$strict>;
637
+ declare const PreparedOutreachBrandMediaSchema: z.ZodObject<{
638
+ logo: z.ZodNullable<z.ZodObject<{
639
+ shopId: z.ZodString;
640
+ role: z.ZodEnum<{
641
+ LOGO: "LOGO";
642
+ SQUARE_LOGO: "SQUARE_LOGO";
643
+ COVER_IMAGE: "COVER_IMAGE";
644
+ CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
645
+ }>;
646
+ status: z.ZodLiteral<"READY">;
647
+ kind: z.ZodLiteral<"R2_DERIVATIVE">;
648
+ httpsUrl: z.ZodString;
649
+ }, z.core.$strict>>;
650
+ squareLogo: z.ZodNullable<z.ZodObject<{
651
+ shopId: z.ZodString;
652
+ role: z.ZodEnum<{
653
+ LOGO: "LOGO";
654
+ SQUARE_LOGO: "SQUARE_LOGO";
655
+ COVER_IMAGE: "COVER_IMAGE";
656
+ CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
657
+ }>;
658
+ status: z.ZodLiteral<"READY">;
659
+ kind: z.ZodLiteral<"R2_DERIVATIVE">;
660
+ httpsUrl: z.ZodString;
661
+ }, z.core.$strict>>;
662
+ coverImage: z.ZodNullable<z.ZodObject<{
663
+ shopId: z.ZodString;
664
+ role: z.ZodEnum<{
665
+ LOGO: "LOGO";
666
+ SQUARE_LOGO: "SQUARE_LOGO";
667
+ COVER_IMAGE: "COVER_IMAGE";
668
+ CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
669
+ }>;
670
+ status: z.ZodLiteral<"READY">;
671
+ kind: z.ZodLiteral<"R2_DERIVATIVE">;
672
+ httpsUrl: z.ZodString;
673
+ }, z.core.$strict>>;
674
+ }, z.core.$strict>;
675
+ type PreparedOutreachBrand = z.infer<typeof PreparedOutreachBrandSchema>;
676
+ type PreparedOutreachBrandMediaItem = z.infer<typeof PreparedOutreachBrandMediaItemSchema>;
677
+ type PreparedOutreachBrandMedia = z.infer<typeof PreparedOutreachBrandMediaSchema>;
465
678
  declare const InitialOutreachRenderInputSchema: z.ZodObject<{
466
679
  schemaVersion: z.ZodLiteral<1>;
467
680
  evaluation: z.ZodObject<{
@@ -953,6 +1166,52 @@ declare const InitialOutreachRenderInputSchema: z.ZodObject<{
953
1166
  kind: z.ZodLiteral<"R2_DERIVATIVE">;
954
1167
  httpsUrl: z.ZodString;
955
1168
  }, z.core.$strict>>;
1169
+ preparedBrand: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1170
+ shopId: z.ZodString;
1171
+ brandName: z.ZodNullable<z.ZodString>;
1172
+ logoAltText: z.ZodNullable<z.ZodString>;
1173
+ logoWidth: z.ZodNullable<z.ZodNumber>;
1174
+ logoHeight: z.ZodNullable<z.ZodNumber>;
1175
+ squareLogoAltText: z.ZodNullable<z.ZodString>;
1176
+ }, z.core.$strict>>>;
1177
+ preparedBrandMedia: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1178
+ logo: z.ZodNullable<z.ZodObject<{
1179
+ shopId: z.ZodString;
1180
+ role: z.ZodEnum<{
1181
+ LOGO: "LOGO";
1182
+ SQUARE_LOGO: "SQUARE_LOGO";
1183
+ COVER_IMAGE: "COVER_IMAGE";
1184
+ CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
1185
+ }>;
1186
+ status: z.ZodLiteral<"READY">;
1187
+ kind: z.ZodLiteral<"R2_DERIVATIVE">;
1188
+ httpsUrl: z.ZodString;
1189
+ }, z.core.$strict>>;
1190
+ squareLogo: z.ZodNullable<z.ZodObject<{
1191
+ shopId: z.ZodString;
1192
+ role: z.ZodEnum<{
1193
+ LOGO: "LOGO";
1194
+ SQUARE_LOGO: "SQUARE_LOGO";
1195
+ COVER_IMAGE: "COVER_IMAGE";
1196
+ CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
1197
+ }>;
1198
+ status: z.ZodLiteral<"READY">;
1199
+ kind: z.ZodLiteral<"R2_DERIVATIVE">;
1200
+ httpsUrl: z.ZodString;
1201
+ }, z.core.$strict>>;
1202
+ coverImage: z.ZodNullable<z.ZodObject<{
1203
+ shopId: z.ZodString;
1204
+ role: z.ZodEnum<{
1205
+ LOGO: "LOGO";
1206
+ SQUARE_LOGO: "SQUARE_LOGO";
1207
+ COVER_IMAGE: "COVER_IMAGE";
1208
+ CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
1209
+ }>;
1210
+ status: z.ZodLiteral<"READY">;
1211
+ kind: z.ZodLiteral<"R2_DERIVATIVE">;
1212
+ httpsUrl: z.ZodString;
1213
+ }, z.core.$strict>>;
1214
+ }, z.core.$strict>>>;
956
1215
  }, z.core.$strict>;
957
1216
  declare const InitialOutreachRenderResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
958
1217
  kind: z.ZodLiteral<"ready">;
@@ -1040,6 +1299,519 @@ declare const InitialOutreachRenderResultSchema: z.ZodDiscriminatedUnion<[z.ZodO
1040
1299
  }, z.core.$strict>], "kind">;
1041
1300
  type InitialOutreachRenderInput = z.infer<typeof InitialOutreachRenderInputSchema>;
1042
1301
  type InitialOutreachRenderResult = z.infer<typeof InitialOutreachRenderResultSchema>;
1302
+ declare const StudioOutreachTemplateSchema: z.ZodObject<{
1303
+ templateId: z.ZodString;
1304
+ localeId: z.ZodString;
1305
+ languageTag: z.ZodString;
1306
+ components: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1307
+ type: z.ZodLiteral<"HEADER">;
1308
+ format: z.ZodLiteral<"TEXT">;
1309
+ text: z.ZodString;
1310
+ example: z.ZodOptional<z.ZodObject<{
1311
+ header_text: z.ZodArray<z.ZodString>;
1312
+ }, z.core.$strict>>;
1313
+ }, z.core.$strict>, z.ZodObject<{
1314
+ type: z.ZodLiteral<"HEADER">;
1315
+ format: z.ZodLiteral<"IMAGE">;
1316
+ example: z.ZodOptional<z.ZodObject<{
1317
+ header_handle: z.ZodArray<z.ZodString>;
1318
+ }, z.core.$strict>>;
1319
+ }, z.core.$strict>, z.ZodObject<{
1320
+ type: z.ZodLiteral<"BODY">;
1321
+ text: z.ZodString;
1322
+ example: z.ZodOptional<z.ZodObject<{
1323
+ body_text: z.ZodArray<z.ZodArray<z.ZodString>>;
1324
+ }, z.core.$strict>>;
1325
+ }, z.core.$strict>, z.ZodObject<{
1326
+ type: z.ZodLiteral<"FOOTER">;
1327
+ text: z.ZodString;
1328
+ }, z.core.$strict>, z.ZodObject<{
1329
+ type: z.ZodLiteral<"BUTTONS">;
1330
+ buttons: z.ZodArray<z.ZodObject<{
1331
+ type: z.ZodLiteral<"URL">;
1332
+ text: z.ZodString;
1333
+ url: z.ZodString;
1334
+ example: z.ZodOptional<z.ZodArray<z.ZodString>>;
1335
+ }, z.core.$strict>>;
1336
+ }, z.core.$strict>]>>;
1337
+ bindings: z.ZodObject<{
1338
+ schemaVersion: z.ZodOptional<z.ZodLiteral<1>>;
1339
+ promotionTarget: z.ZodOptional<z.ZodEnum<{
1340
+ CHECKOUT: "CHECKOUT";
1341
+ ALTERNATIVE_PRODUCT: "ALTERNATIVE_PRODUCT";
1342
+ }>>;
1343
+ headerMediaRole: z.ZodOptional<z.ZodEnum<{
1344
+ LOGO: "LOGO";
1345
+ SQUARE_LOGO: "SQUARE_LOGO";
1346
+ COVER_IMAGE: "COVER_IMAGE";
1347
+ CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
1348
+ }>>;
1349
+ header: z.ZodOptional<z.ZodArray<z.ZodObject<{
1350
+ position: z.ZodNumber;
1351
+ variable: z.ZodEnum<{
1352
+ "customer.firstName": "customer.firstName";
1353
+ "shop.name": "shop.name";
1354
+ "shop.categoryName": "shop.categoryName";
1355
+ "checkout.url": "checkout.url";
1356
+ "checkout.itemsSummary": "checkout.itemsSummary";
1357
+ "offer.code": "offer.code";
1358
+ "offer.codes": "offer.codes";
1359
+ "offer.description": "offer.description";
1360
+ "promotion.productName": "promotion.productName";
1361
+ "promotion.productUrl": "promotion.productUrl";
1362
+ "promotion.offerDescription": "promotion.offerDescription";
1363
+ "promotion.code": "promotion.code";
1364
+ "shopBrand.brandName": "shopBrand.brandName";
1365
+ "shopBrand.logoAltText": "shopBrand.logoAltText";
1366
+ "shopBrand.logoWidth": "shopBrand.logoWidth";
1367
+ "shopBrand.logoHeight": "shopBrand.logoHeight";
1368
+ "shopBrand.squareLogoAltText": "shopBrand.squareLogoAltText";
1369
+ "shopBrand.logoUrl": "shopBrand.logoUrl";
1370
+ "shopBrand.squareLogoUrl": "shopBrand.squareLogoUrl";
1371
+ "shopBrand.coverImageUrl": "shopBrand.coverImageUrl";
1372
+ }>;
1373
+ }, z.core.$strict>>>;
1374
+ body: z.ZodArray<z.ZodObject<{
1375
+ position: z.ZodNumber;
1376
+ variable: z.ZodEnum<{
1377
+ "customer.firstName": "customer.firstName";
1378
+ "shop.name": "shop.name";
1379
+ "shop.categoryName": "shop.categoryName";
1380
+ "checkout.url": "checkout.url";
1381
+ "checkout.itemsSummary": "checkout.itemsSummary";
1382
+ "offer.code": "offer.code";
1383
+ "offer.codes": "offer.codes";
1384
+ "offer.description": "offer.description";
1385
+ "promotion.productName": "promotion.productName";
1386
+ "promotion.productUrl": "promotion.productUrl";
1387
+ "promotion.offerDescription": "promotion.offerDescription";
1388
+ "promotion.code": "promotion.code";
1389
+ "shopBrand.brandName": "shopBrand.brandName";
1390
+ "shopBrand.logoAltText": "shopBrand.logoAltText";
1391
+ "shopBrand.logoWidth": "shopBrand.logoWidth";
1392
+ "shopBrand.logoHeight": "shopBrand.logoHeight";
1393
+ "shopBrand.squareLogoAltText": "shopBrand.squareLogoAltText";
1394
+ "shopBrand.logoUrl": "shopBrand.logoUrl";
1395
+ "shopBrand.squareLogoUrl": "shopBrand.squareLogoUrl";
1396
+ "shopBrand.coverImageUrl": "shopBrand.coverImageUrl";
1397
+ }>;
1398
+ }, z.core.$strict>>;
1399
+ buttons: z.ZodArray<z.ZodObject<{
1400
+ index: z.ZodNumber;
1401
+ subType: z.ZodLiteral<"url">;
1402
+ variable: z.ZodEnum<{
1403
+ "checkout.url": "checkout.url";
1404
+ "promotion.productUrl": "promotion.productUrl";
1405
+ }>;
1406
+ }, z.core.$strict>>;
1407
+ }, z.core.$strict>;
1408
+ }, z.core.$strict>;
1409
+ declare const StudioInitialOutreachRenderInputSchema: z.ZodObject<{
1410
+ variables: z.ZodObject<{
1411
+ shopName: z.ZodNullable<z.ZodString>;
1412
+ customerFirstName: z.ZodNullable<z.ZodString>;
1413
+ checkoutUrl: z.ZodString;
1414
+ shopCategory: z.ZodNullable<z.ZodString>;
1415
+ }, z.core.$strict>;
1416
+ schemaVersion: z.ZodLiteral<1>;
1417
+ evaluation: z.ZodObject<{
1418
+ kind: z.ZodLiteral<"ready">;
1419
+ schemaVersion: z.ZodLiteral<1>;
1420
+ runId: z.ZodString;
1421
+ shopId: z.ZodString;
1422
+ basketFingerprint: z.ZodString;
1423
+ evaluatedAt: z.ZodISODateTime;
1424
+ lines: z.ZodArray<z.ZodObject<{
1425
+ lineKey: z.ZodString;
1426
+ productId: z.ZodString;
1427
+ variantId: z.ZodNullable<z.ZodString>;
1428
+ quantity: z.ZodNumber;
1429
+ checkoutUnitPrice: z.ZodNullable<z.ZodString>;
1430
+ currentProduct: z.ZodObject<{
1431
+ description: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
1432
+ status: z.ZodEnum<{
1433
+ AVAILABLE: "AVAILABLE";
1434
+ NOT_PROVIDED: "NOT_PROVIDED";
1435
+ PARTIAL: "PARTIAL";
1436
+ }>;
1437
+ text: z.ZodString;
1438
+ }, z.core.$strict>>>;
1439
+ attributes: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
1440
+ status: z.ZodEnum<{
1441
+ AVAILABLE: "AVAILABLE";
1442
+ NOT_PROVIDED: "NOT_PROVIDED";
1443
+ PARTIAL: "PARTIAL";
1444
+ }>;
1445
+ items: z.ZodArray<z.ZodObject<{
1446
+ name: z.ZodString;
1447
+ values: z.ZodArray<z.ZodString>;
1448
+ }, z.core.$strict>>;
1449
+ }, z.core.$strict>>>;
1450
+ options: z.ZodOptional<z.ZodPreprocess<z.ZodObject<{
1451
+ status: z.ZodEnum<{
1452
+ AVAILABLE: "AVAILABLE";
1453
+ NOT_PROVIDED: "NOT_PROVIDED";
1454
+ PARTIAL: "PARTIAL";
1455
+ }>;
1456
+ items: z.ZodArray<z.ZodObject<{
1457
+ name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
1458
+ values: z.ZodArray<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>>;
1459
+ usedForVariants: z.ZodNullable<z.ZodBoolean>;
1460
+ }, z.core.$strict>>;
1461
+ }, z.core.$strict>>>;
1462
+ selectedOptions: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodObject<{
1463
+ name: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
1464
+ value: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodString>;
1465
+ }, z.core.$strict>>>>;
1466
+ productId: z.ZodString;
1467
+ variantId: z.ZodNullable<z.ZodString>;
1468
+ title: z.ZodString;
1469
+ url: z.ZodNullable<z.ZodURL>;
1470
+ available: z.ZodNullable<z.ZodBoolean>;
1471
+ unitPrice: z.ZodNullable<z.ZodString>;
1472
+ currency: z.ZodNullable<z.ZodString>;
1473
+ productType: z.ZodNullable<z.ZodString>;
1474
+ vendor: z.ZodNullable<z.ZodString>;
1475
+ categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
1476
+ categoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1477
+ collectionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1478
+ imageUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1479
+ saleEvidence: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1480
+ regularPrice: z.ZodNullable<z.ZodString>;
1481
+ salePrice: z.ZodNullable<z.ZodString>;
1482
+ observedAt: z.ZodISODateTime;
1483
+ }, z.core.$strict>>>;
1484
+ observedAt: z.ZodISODateTime;
1485
+ }, z.core.$strict>;
1486
+ comparison: z.ZodEnum<{
1487
+ EQUAL: "EQUAL";
1488
+ DIFFERENT: "DIFFERENT";
1489
+ INCOMPARABLE: "INCOMPARABLE";
1490
+ }>;
1491
+ }, z.core.$strict>>;
1492
+ currentMerchandiseSubtotal: z.ZodObject<{
1493
+ amountDecimal: z.ZodString;
1494
+ currency: z.ZodString;
1495
+ }, z.core.$strict>;
1496
+ offerDecision: z.ZodDiscriminatedUnion<[z.ZodObject<{
1497
+ kind: z.ZodLiteral<"NO_VERIFIED_OFFER">;
1498
+ reasonCode: z.ZodString;
1499
+ discoveryIncomplete: z.ZodBoolean;
1500
+ }, z.core.$strict>, z.ZodObject<{
1501
+ kind: z.ZodLiteral<"CHECKOUT_DISCOUNT">;
1502
+ offerSet: z.ZodObject<{
1503
+ schemaVersion: z.ZodLiteral<"moda.outreach.checkout-offers.v1">;
1504
+ offers: z.ZodArray<z.ZodObject<{
1505
+ offerId: z.ZodString;
1506
+ providerDiscountId: z.ZodNullable<z.ZodString>;
1507
+ method: z.ZodEnum<{
1508
+ AUTOMATIC: "AUTOMATIC";
1509
+ CODE: "CODE";
1510
+ }>;
1511
+ code: z.ZodNullable<z.ZodString>;
1512
+ }, z.core.$strict>>;
1513
+ }, z.core.$strict>;
1514
+ members: z.ZodArray<z.ZodObject<{
1515
+ offerId: z.ZodString;
1516
+ providerDiscountId: z.ZodString;
1517
+ method: z.ZodEnum<{
1518
+ AUTOMATIC: "AUTOMATIC";
1519
+ CODE: "CODE";
1520
+ }>;
1521
+ code: z.ZodNullable<z.ZodString>;
1522
+ description: z.ZodString;
1523
+ eligibility: z.ZodObject<{
1524
+ offerId: z.ZodString;
1525
+ verdict: z.ZodEnum<{
1526
+ SUPPORTED: "SUPPORTED";
1527
+ NOT_APPLICABLE: "NOT_APPLICABLE";
1528
+ UNVERIFIABLE: "UNVERIFIABLE";
1529
+ }>;
1530
+ eligibleLineKeys: z.ZodArray<z.ZodString>;
1531
+ reasonCodes: z.ZodArray<z.ZodString>;
1532
+ }, z.core.$strict>;
1533
+ }, z.core.$strict>>;
1534
+ group: z.ZodObject<{
1535
+ verdict: z.ZodEnum<{
1536
+ SUPPORTED: "SUPPORTED";
1537
+ UNVERIFIABLE: "UNVERIFIABLE";
1538
+ INCOMPATIBLE: "INCOMPATIBLE";
1539
+ }>;
1540
+ offerIds: z.ZodArray<z.ZodString>;
1541
+ reasonCodes: z.ZodArray<z.ZodString>;
1542
+ }, z.core.$strict>;
1543
+ discoveryIncomplete: z.ZodBoolean;
1544
+ }, z.core.$strict>], "kind">;
1545
+ toolActivity: z.ZodArray<z.ZodObject<{
1546
+ toolName: z.ZodString;
1547
+ modelStep: z.ZodNumber;
1548
+ attempt: z.ZodNumber;
1549
+ status: z.ZodEnum<{
1550
+ OK: "OK";
1551
+ ERROR: "ERROR";
1552
+ }>;
1553
+ durationMs: z.ZodNumber;
1554
+ errorCode: z.ZodNullable<z.ZodEnum<{
1555
+ DEADLINE: "DEADLINE";
1556
+ CANCELLED: "CANCELLED";
1557
+ DENIED: "DENIED";
1558
+ BUDGET_EXHAUSTED: "BUDGET_EXHAUSTED";
1559
+ INPUT_INVALID: "INPUT_INVALID";
1560
+ OUTSIDE_CHECKOUT: "OUTSIDE_CHECKOUT";
1561
+ PRODUCT_NOT_FOUND: "PRODUCT_NOT_FOUND";
1562
+ PRODUCT_UNAVAILABLE: "PRODUCT_UNAVAILABLE";
1563
+ IDENTITY_MISMATCH: "IDENTITY_MISMATCH";
1564
+ CURRENCY_MISMATCH: "CURRENCY_MISMATCH";
1565
+ PRICE_UNAVAILABLE: "PRICE_UNAVAILABLE";
1566
+ ARITHMETIC_UNSAFE: "ARITHMETIC_UNSAFE";
1567
+ PROVIDER_UNAVAILABLE: "PROVIDER_UNAVAILABLE";
1568
+ INVALID_RESULT: "INVALID_RESULT";
1569
+ CURRENT_FACTS_CHANGED: "CURRENT_FACTS_CHANGED";
1570
+ RESULT_TOO_LARGE: "RESULT_TOO_LARGE";
1571
+ }>>;
1572
+ }, z.core.$strict>>;
1573
+ }, z.core.$strict>;
1574
+ headerMedia: z.ZodNullable<z.ZodObject<{
1575
+ shopId: z.ZodString;
1576
+ role: z.ZodEnum<{
1577
+ LOGO: "LOGO";
1578
+ SQUARE_LOGO: "SQUARE_LOGO";
1579
+ COVER_IMAGE: "COVER_IMAGE";
1580
+ CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
1581
+ }>;
1582
+ status: z.ZodLiteral<"READY">;
1583
+ kind: z.ZodLiteral<"R2_DERIVATIVE">;
1584
+ httpsUrl: z.ZodString;
1585
+ }, z.core.$strict>>;
1586
+ preparedBrand: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1587
+ shopId: z.ZodString;
1588
+ brandName: z.ZodNullable<z.ZodString>;
1589
+ logoAltText: z.ZodNullable<z.ZodString>;
1590
+ logoWidth: z.ZodNullable<z.ZodNumber>;
1591
+ logoHeight: z.ZodNullable<z.ZodNumber>;
1592
+ squareLogoAltText: z.ZodNullable<z.ZodString>;
1593
+ }, z.core.$strict>>>;
1594
+ preparedBrandMedia: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1595
+ logo: z.ZodNullable<z.ZodObject<{
1596
+ shopId: z.ZodString;
1597
+ role: z.ZodEnum<{
1598
+ LOGO: "LOGO";
1599
+ SQUARE_LOGO: "SQUARE_LOGO";
1600
+ COVER_IMAGE: "COVER_IMAGE";
1601
+ CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
1602
+ }>;
1603
+ status: z.ZodLiteral<"READY">;
1604
+ kind: z.ZodLiteral<"R2_DERIVATIVE">;
1605
+ httpsUrl: z.ZodString;
1606
+ }, z.core.$strict>>;
1607
+ squareLogo: z.ZodNullable<z.ZodObject<{
1608
+ shopId: z.ZodString;
1609
+ role: z.ZodEnum<{
1610
+ LOGO: "LOGO";
1611
+ SQUARE_LOGO: "SQUARE_LOGO";
1612
+ COVER_IMAGE: "COVER_IMAGE";
1613
+ CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
1614
+ }>;
1615
+ status: z.ZodLiteral<"READY">;
1616
+ kind: z.ZodLiteral<"R2_DERIVATIVE">;
1617
+ httpsUrl: z.ZodString;
1618
+ }, z.core.$strict>>;
1619
+ coverImage: z.ZodNullable<z.ZodObject<{
1620
+ shopId: z.ZodString;
1621
+ role: z.ZodEnum<{
1622
+ LOGO: "LOGO";
1623
+ SQUARE_LOGO: "SQUARE_LOGO";
1624
+ COVER_IMAGE: "COVER_IMAGE";
1625
+ CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
1626
+ }>;
1627
+ status: z.ZodLiteral<"READY">;
1628
+ kind: z.ZodLiteral<"R2_DERIVATIVE">;
1629
+ httpsUrl: z.ZodString;
1630
+ }, z.core.$strict>>;
1631
+ }, z.core.$strict>>>;
1632
+ template: z.ZodObject<{
1633
+ templateId: z.ZodString;
1634
+ localeId: z.ZodString;
1635
+ languageTag: z.ZodString;
1636
+ components: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1637
+ type: z.ZodLiteral<"HEADER">;
1638
+ format: z.ZodLiteral<"TEXT">;
1639
+ text: z.ZodString;
1640
+ example: z.ZodOptional<z.ZodObject<{
1641
+ header_text: z.ZodArray<z.ZodString>;
1642
+ }, z.core.$strict>>;
1643
+ }, z.core.$strict>, z.ZodObject<{
1644
+ type: z.ZodLiteral<"HEADER">;
1645
+ format: z.ZodLiteral<"IMAGE">;
1646
+ example: z.ZodOptional<z.ZodObject<{
1647
+ header_handle: z.ZodArray<z.ZodString>;
1648
+ }, z.core.$strict>>;
1649
+ }, z.core.$strict>, z.ZodObject<{
1650
+ type: z.ZodLiteral<"BODY">;
1651
+ text: z.ZodString;
1652
+ example: z.ZodOptional<z.ZodObject<{
1653
+ body_text: z.ZodArray<z.ZodArray<z.ZodString>>;
1654
+ }, z.core.$strict>>;
1655
+ }, z.core.$strict>, z.ZodObject<{
1656
+ type: z.ZodLiteral<"FOOTER">;
1657
+ text: z.ZodString;
1658
+ }, z.core.$strict>, z.ZodObject<{
1659
+ type: z.ZodLiteral<"BUTTONS">;
1660
+ buttons: z.ZodArray<z.ZodObject<{
1661
+ type: z.ZodLiteral<"URL">;
1662
+ text: z.ZodString;
1663
+ url: z.ZodString;
1664
+ example: z.ZodOptional<z.ZodArray<z.ZodString>>;
1665
+ }, z.core.$strict>>;
1666
+ }, z.core.$strict>]>>;
1667
+ bindings: z.ZodObject<{
1668
+ schemaVersion: z.ZodOptional<z.ZodLiteral<1>>;
1669
+ promotionTarget: z.ZodOptional<z.ZodEnum<{
1670
+ CHECKOUT: "CHECKOUT";
1671
+ ALTERNATIVE_PRODUCT: "ALTERNATIVE_PRODUCT";
1672
+ }>>;
1673
+ headerMediaRole: z.ZodOptional<z.ZodEnum<{
1674
+ LOGO: "LOGO";
1675
+ SQUARE_LOGO: "SQUARE_LOGO";
1676
+ COVER_IMAGE: "COVER_IMAGE";
1677
+ CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
1678
+ }>>;
1679
+ header: z.ZodOptional<z.ZodArray<z.ZodObject<{
1680
+ position: z.ZodNumber;
1681
+ variable: z.ZodEnum<{
1682
+ "customer.firstName": "customer.firstName";
1683
+ "shop.name": "shop.name";
1684
+ "shop.categoryName": "shop.categoryName";
1685
+ "checkout.url": "checkout.url";
1686
+ "checkout.itemsSummary": "checkout.itemsSummary";
1687
+ "offer.code": "offer.code";
1688
+ "offer.codes": "offer.codes";
1689
+ "offer.description": "offer.description";
1690
+ "promotion.productName": "promotion.productName";
1691
+ "promotion.productUrl": "promotion.productUrl";
1692
+ "promotion.offerDescription": "promotion.offerDescription";
1693
+ "promotion.code": "promotion.code";
1694
+ "shopBrand.brandName": "shopBrand.brandName";
1695
+ "shopBrand.logoAltText": "shopBrand.logoAltText";
1696
+ "shopBrand.logoWidth": "shopBrand.logoWidth";
1697
+ "shopBrand.logoHeight": "shopBrand.logoHeight";
1698
+ "shopBrand.squareLogoAltText": "shopBrand.squareLogoAltText";
1699
+ "shopBrand.logoUrl": "shopBrand.logoUrl";
1700
+ "shopBrand.squareLogoUrl": "shopBrand.squareLogoUrl";
1701
+ "shopBrand.coverImageUrl": "shopBrand.coverImageUrl";
1702
+ }>;
1703
+ }, z.core.$strict>>>;
1704
+ body: z.ZodArray<z.ZodObject<{
1705
+ position: z.ZodNumber;
1706
+ variable: z.ZodEnum<{
1707
+ "customer.firstName": "customer.firstName";
1708
+ "shop.name": "shop.name";
1709
+ "shop.categoryName": "shop.categoryName";
1710
+ "checkout.url": "checkout.url";
1711
+ "checkout.itemsSummary": "checkout.itemsSummary";
1712
+ "offer.code": "offer.code";
1713
+ "offer.codes": "offer.codes";
1714
+ "offer.description": "offer.description";
1715
+ "promotion.productName": "promotion.productName";
1716
+ "promotion.productUrl": "promotion.productUrl";
1717
+ "promotion.offerDescription": "promotion.offerDescription";
1718
+ "promotion.code": "promotion.code";
1719
+ "shopBrand.brandName": "shopBrand.brandName";
1720
+ "shopBrand.logoAltText": "shopBrand.logoAltText";
1721
+ "shopBrand.logoWidth": "shopBrand.logoWidth";
1722
+ "shopBrand.logoHeight": "shopBrand.logoHeight";
1723
+ "shopBrand.squareLogoAltText": "shopBrand.squareLogoAltText";
1724
+ "shopBrand.logoUrl": "shopBrand.logoUrl";
1725
+ "shopBrand.squareLogoUrl": "shopBrand.squareLogoUrl";
1726
+ "shopBrand.coverImageUrl": "shopBrand.coverImageUrl";
1727
+ }>;
1728
+ }, z.core.$strict>>;
1729
+ buttons: z.ZodArray<z.ZodObject<{
1730
+ index: z.ZodNumber;
1731
+ subType: z.ZodLiteral<"url">;
1732
+ variable: z.ZodEnum<{
1733
+ "checkout.url": "checkout.url";
1734
+ "promotion.productUrl": "promotion.productUrl";
1735
+ }>;
1736
+ }, z.core.$strict>>;
1737
+ }, z.core.$strict>;
1738
+ }, z.core.$strict>;
1739
+ }, z.core.$strict>;
1740
+ declare const StudioInitialOutreachRenderResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1741
+ kind: z.ZodLiteral<"ready">;
1742
+ renderedText: z.ZodString;
1743
+ parameters: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1744
+ type: z.ZodLiteral<"header">;
1745
+ parameters: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1746
+ type: z.ZodLiteral<"text">;
1747
+ text: z.ZodString;
1748
+ }, z.core.$strict>, z.ZodObject<{
1749
+ type: z.ZodLiteral<"image">;
1750
+ image: z.ZodObject<{
1751
+ link: z.ZodString;
1752
+ }, z.core.$strict>;
1753
+ }, z.core.$strict>]>>;
1754
+ }, z.core.$strict>, z.ZodObject<{
1755
+ type: z.ZodLiteral<"body">;
1756
+ parameters: z.ZodArray<z.ZodObject<{
1757
+ type: z.ZodLiteral<"text">;
1758
+ text: z.ZodString;
1759
+ }, z.core.$strict>>;
1760
+ }, z.core.$strict>, z.ZodObject<{
1761
+ type: z.ZodLiteral<"button">;
1762
+ sub_type: z.ZodLiteral<"url">;
1763
+ index: z.ZodString;
1764
+ parameters: z.ZodTuple<[z.ZodObject<{
1765
+ type: z.ZodLiteral<"text">;
1766
+ text: z.ZodString;
1767
+ }, z.core.$strict>], null>;
1768
+ }, z.core.$strict>]>>;
1769
+ headerPreview: z.ZodNullable<z.ZodObject<{
1770
+ shopId: z.ZodString;
1771
+ role: z.ZodEnum<{
1772
+ LOGO: "LOGO";
1773
+ SQUARE_LOGO: "SQUARE_LOGO";
1774
+ COVER_IMAGE: "COVER_IMAGE";
1775
+ CHECKOUT_PRODUCT: "CHECKOUT_PRODUCT";
1776
+ }>;
1777
+ status: z.ZodLiteral<"READY">;
1778
+ kind: z.ZodLiteral<"R2_DERIVATIVE">;
1779
+ httpsUrl: z.ZodString;
1780
+ }, z.core.$strict>>;
1781
+ templateId: z.ZodString;
1782
+ localeId: z.ZodString;
1783
+ templateValidation: z.ZodLiteral<"NOT_EVALUATED">;
1784
+ }, z.core.$strict>, z.ZodObject<{
1785
+ kind: z.ZodLiteral<"refused">;
1786
+ reasonCode: z.ZodEnum<{
1787
+ IDENTITY_MISMATCH: "IDENTITY_MISMATCH";
1788
+ PROVIDER_UNAVAILABLE: "PROVIDER_UNAVAILABLE";
1789
+ INVALID_REQUEST: "INVALID_REQUEST";
1790
+ INVALID_LANGUAGE: "INVALID_LANGUAGE";
1791
+ SHOP_UNAVAILABLE: "SHOP_UNAVAILABLE";
1792
+ SENDER_UNAVAILABLE: "SENDER_UNAVAILABLE";
1793
+ SENDER_MISMATCH: "SENDER_MISMATCH";
1794
+ NO_LANGUAGE: "NO_LANGUAGE";
1795
+ NO_APPROVED_ASSIGNMENT: "NO_APPROVED_ASSIGNMENT";
1796
+ LEGACY_ASSIGNMENT: "LEGACY_ASSIGNMENT";
1797
+ AMBIGUOUS_ASSIGNMENT: "AMBIGUOUS_ASSIGNMENT";
1798
+ REGISTRATION_UNAVAILABLE: "REGISTRATION_UNAVAILABLE";
1799
+ PROVIDER_DRIFT: "PROVIDER_DRIFT";
1800
+ DEFINITION_UNAVAILABLE: "DEFINITION_UNAVAILABLE";
1801
+ LOCALE_UNAVAILABLE: "LOCALE_UNAVAILABLE";
1802
+ BINDINGS_INVALID: "BINDINGS_INVALID";
1803
+ BINDING_FINGERPRINT_MISMATCH: "BINDING_FINGERPRINT_MISMATCH";
1804
+ BINDING_VALUE_UNAVAILABLE: "BINDING_VALUE_UNAVAILABLE";
1805
+ CHECKOUT_UNAVAILABLE: "CHECKOUT_UNAVAILABLE";
1806
+ CHECKOUT_UNTRUSTED: "CHECKOUT_UNTRUSTED";
1807
+ MEDIA_NOT_READY: "MEDIA_NOT_READY";
1808
+ PROMOTION_PRODUCT_URL_UNAVAILABLE: "PROMOTION_PRODUCT_URL_UNAVAILABLE";
1809
+ MESSAGE_TOO_LARGE: "MESSAGE_TOO_LARGE";
1810
+ }>;
1811
+ }, z.core.$strict>], "kind">;
1812
+ type StudioOutreachTemplate = z.infer<typeof StudioOutreachTemplateSchema>;
1813
+ type StudioInitialOutreachRenderInput = z.infer<typeof StudioInitialOutreachRenderInputSchema>;
1814
+ type StudioInitialOutreachRenderResult = z.infer<typeof StudioInitialOutreachRenderResultSchema>;
1043
1815
 
1044
1816
  /** One implementation for production and preview. Ports must authenticate every call. No retries. */
1045
1817
  declare function evaluateInitialOutreach(raw: InitialOutreachEvaluationInput, ports: InitialOutreachPorts): Promise<InitialOutreachEvaluationResult>;
@@ -1048,6 +1820,7 @@ declare const evaluateInitialOutreachPreview: typeof evaluateInitialOutreach;
1048
1820
  declare function fingerprintInitialOutreachBasket(raw: InitialOutreachEvaluationInput): string;
1049
1821
 
1050
1822
  declare function renderInitialOutreachPreview(raw: InitialOutreachRenderInput): InitialOutreachRenderResult;
1823
+ declare function renderStudioInitialOutreachPreview(raw: StudioInitialOutreachRenderInput): StudioInitialOutreachRenderResult;
1051
1824
 
1052
1825
  type RecoveryStage = "INITIAL" | "FOLLOW_UP";
1053
1826
  type VerifiedOfferPresentation = "NO_OFFER" | "CODE_OFFER" | "AUTOMATIC_OFFER";
@@ -1058,8 +1831,9 @@ type ShopSelectionRow = {
1058
1831
  defaultLanguageTag: string | null;
1059
1832
  };
1060
1833
  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";
1834
+ type TemplateUnavailableReason = "MESSAGE_TOO_LARGE" | "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
1835
 
1836
+ declare function purposeFor(stage: RecoveryStage, offer: VerifiedOfferPresentation): "INITIAL_NO_OFFER" | "INITIAL_CODE_OFFER" | "INITIAL_AUTOMATIC_OFFER" | "FOLLOW_UP_NO_OFFER" | "FOLLOW_UP_CODE_OFFER" | "FOLLOW_UP_AUTOMATIC_OFFER";
1063
1837
  type SelectedAssignment = Readonly<{
1064
1838
  variant: AssignedVariantRow;
1065
1839
  canonicalLanguageTag: string;
@@ -1091,4 +1865,14 @@ declare function selectRecoveryAssignment(input: {
1091
1865
  logger: Pick<StructuredLogger, "warn">;
1092
1866
  }): AssignmentSelection;
1093
1867
 
1094
- export { type InitialOutreachEvaluationInput, InitialOutreachEvaluationInputSchema, type InitialOutreachEvaluationResult, InitialOutreachEvaluationResultSchema, type InitialOutreachPorts, type InitialOutreachRenderInput, InitialOutreachRenderInputSchema, type InitialOutreachRenderResult, InitialOutreachRenderResultSchema, type InitialOutreachToolCall, evaluateInitialOutreach, evaluateInitialOutreachPreview, fingerprintInitialOutreachBasket, renderInitialOutreachPreview, selectRecoveryAssignment };
1868
+ type CheckoutMember = Extract<OfferDecision, {
1869
+ kind: 'CHECKOUT_DISCOUNT';
1870
+ }>['members'][number];
1871
+ type SendableOutreachOffer = Readonly<{
1872
+ presentation: VerifiedOfferPresentation;
1873
+ members: readonly CheckoutMember[];
1874
+ }>;
1875
+ /** Preserve Background's largest-method-group selection and stable first-method tie. */
1876
+ declare function selectSendableOutreachOffer(decision: OfferDecision): SendableOutreachOffer;
1877
+
1878
+ export { ComponentSchema, FrozenBindingsSchema, type InitialOutreachEvaluationInput, InitialOutreachEvaluationInputSchema, type InitialOutreachEvaluationResult, InitialOutreachEvaluationResultSchema, type InitialOutreachPorts, type InitialOutreachRenderInput, InitialOutreachRenderInputSchema, type InitialOutreachRenderResult, InitialOutreachRenderResultSchema, type InitialOutreachToolCall, type PreparedOutreachBrand, type PreparedOutreachBrandMedia, type PreparedOutreachBrandMediaItem, PreparedOutreachBrandMediaItemSchema, PreparedOutreachBrandMediaSchema, PreparedOutreachBrandSchema, type SendableOutreachOffer, type StudioInitialOutreachRenderInput, StudioInitialOutreachRenderInputSchema, type StudioInitialOutreachRenderResult, StudioInitialOutreachRenderResultSchema, type StudioOutreachTemplate, StudioOutreachTemplateSchema, evaluateInitialOutreach, evaluateInitialOutreachPreview, fingerprintInitialOutreachBasket, purposeFor, renderInitialOutreachPreview, renderStudioInitialOutreachPreview, selectRecoveryAssignment, selectSendableOutreachOffer };