@salesforce/b2c-tooling-sdk 2.1.0 → 2.2.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/data/content-schemas/databindingcontext.json +1 -1
- package/data/guides/enrichment.json +2030 -1413
- package/data/guides/index.json +2637 -1807
- package/data/help/index.json +1537 -1457
- package/data/help-kb/enrichment.json +6122 -0
- package/data/help-kb/index.json +8496 -0
- package/data/job-steps/index.json +1 -1
- package/data/job-steps/job-steps.json +1 -1
- package/data/script-api/index.json +137 -22
- package/data/tooling/index.json +11 -2
- package/data/xsd/channels.xsd +47 -0
- package/data/xsd/index.json +6 -2
- package/data/xsd/library.xsd +31 -0
- package/data/xsd/order.xsd +317 -0
- package/data/xsd/search2.xsd +1 -1
- package/data/xsd/sort.xsd +17 -0
- package/data/xsd/storefronts.xsd +34 -48
- package/dist/esm/clients/middleware-registry.d.ts +8 -36
- package/dist/esm/clients/middleware-registry.js +62 -1
- package/dist/esm/clients/middleware-registry.js.map +1 -1
- package/dist/esm/config/dw-json.d.ts +28 -0
- package/dist/esm/config/dw-json.js +47 -1
- package/dist/esm/config/dw-json.js.map +1 -1
- package/dist/esm/config/index.d.ts +2 -2
- package/dist/esm/config/index.js +1 -1
- package/dist/esm/config/index.js.map +1 -1
- package/dist/esm/docs/search.js +3 -1
- package/dist/esm/docs/search.js.map +1 -1
- package/dist/esm/docs/types.d.ts +4 -1
- package/dist/esm/docs/types.js +1 -0
- package/dist/esm/docs/types.js.map +1 -1
- package/dist/esm/operations/mtls/index.d.ts +135 -0
- package/dist/esm/operations/mtls/index.js +270 -0
- package/dist/esm/operations/mtls/index.js.map +1 -0
- package/package.json +7 -1
package/data/xsd/order.xsd
CHANGED
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
fields account-id and account-type are exported. Since version 22.9 details to a
|
|
34
34
|
Salesforce Payments payment are no longer exported in a custom method element.
|
|
35
35
|
Since version 26.5 multi-level tax items can be exported for line items.
|
|
36
|
+
Since version 26.9 custom attributes are exported for tax items.
|
|
37
|
+
Since version 26.10 payment-details, fraud-decisions and transaction-details
|
|
38
|
+
elements can be exported per payment.
|
|
36
39
|
</xsd:documentation>
|
|
37
40
|
</xsd:annotation>
|
|
38
41
|
<xsd:enumeration value="18.5" />
|
|
@@ -45,6 +48,8 @@
|
|
|
45
48
|
<xsd:enumeration value="22.9" />
|
|
46
49
|
<xsd:enumeration value="23.4" />
|
|
47
50
|
<xsd:enumeration value="26.5" />
|
|
51
|
+
<xsd:enumeration value="26.9" />
|
|
52
|
+
<xsd:enumeration value="26.10" />
|
|
48
53
|
</xsd:restriction>
|
|
49
54
|
</xsd:simpleType>
|
|
50
55
|
|
|
@@ -230,6 +235,8 @@
|
|
|
230
235
|
<xsd:documentation>Tax amount in purchase currency.</xsd:documentation>
|
|
231
236
|
</xsd:annotation>
|
|
232
237
|
</xsd:element>
|
|
238
|
+
<!-- Since 26.9: custom attributes on a tax item -->
|
|
239
|
+
<xsd:element name="custom-attributes" type="sharedType.CustomAttributes" minOccurs="0"/>
|
|
233
240
|
</xsd:sequence>
|
|
234
241
|
</xsd:complexType>
|
|
235
242
|
|
|
@@ -631,6 +638,23 @@
|
|
|
631
638
|
<xsd:element name="custom-method" type="complexType.CustomPaymentMethod" />
|
|
632
639
|
</xsd:choice>
|
|
633
640
|
|
|
641
|
+
<xsd:element name="payment-details" type="complexType.PaymentDetails" minOccurs="0" maxOccurs="1">
|
|
642
|
+
<xsd:annotation>
|
|
643
|
+
<xsd:documentation>
|
|
644
|
+
Since version 26.10.
|
|
645
|
+
The normalized payment details for the order payment instrument.
|
|
646
|
+
</xsd:documentation>
|
|
647
|
+
</xsd:annotation>
|
|
648
|
+
</xsd:element>
|
|
649
|
+
<xsd:element name="fraud-decisions" type="complexType.FraudDecisions" minOccurs="0" maxOccurs="1">
|
|
650
|
+
<xsd:annotation>
|
|
651
|
+
<xsd:documentation>
|
|
652
|
+
Since version 26.10.
|
|
653
|
+
The normalized fraud decisions for the order payment instrument.
|
|
654
|
+
</xsd:documentation>
|
|
655
|
+
</xsd:annotation>
|
|
656
|
+
</xsd:element>
|
|
657
|
+
|
|
634
658
|
<!-- payment transaction details -->
|
|
635
659
|
<xsd:element name="amount" type="xsd:decimal" minOccurs="0" maxOccurs="1"/>
|
|
636
660
|
<xsd:element name="processor-id" type="simpleType.Generic.NonEmptyString.256" minOccurs="0" maxOccurs="1" />
|
|
@@ -652,6 +676,14 @@
|
|
|
652
676
|
</xsd:documentation>
|
|
653
677
|
</xsd:annotation>
|
|
654
678
|
</xsd:element>
|
|
679
|
+
<xsd:element name="transaction-details" type="complexType.TransactionDetails" minOccurs="0" maxOccurs="1">
|
|
680
|
+
<xsd:annotation>
|
|
681
|
+
<xsd:documentation>
|
|
682
|
+
Since version 26.10.
|
|
683
|
+
The normalized transaction details for the order payment transaction.
|
|
684
|
+
</xsd:documentation>
|
|
685
|
+
</xsd:annotation>
|
|
686
|
+
</xsd:element>
|
|
655
687
|
<xsd:element name="custom-attributes" type="sharedType.CustomAttributes" minOccurs="0" maxOccurs="1">
|
|
656
688
|
<xsd:annotation>
|
|
657
689
|
<xsd:documentation>These are the custom attributes of the PaymentTransaction system object.</xsd:documentation>
|
|
@@ -1168,6 +1200,54 @@
|
|
|
1168
1200
|
</xsd:restriction>
|
|
1169
1201
|
</xsd:simpleType>
|
|
1170
1202
|
|
|
1203
|
+
<xsd:simpleType name="simpleType.Generic.NonEmptyString.4">
|
|
1204
|
+
<xsd:restriction base="simpleType.Generic.String">
|
|
1205
|
+
<xsd:minLength value="1" />
|
|
1206
|
+
<xsd:maxLength value="4" />
|
|
1207
|
+
<xsd:pattern value="\S|(\S(.*)\S)" />
|
|
1208
|
+
</xsd:restriction>
|
|
1209
|
+
</xsd:simpleType>
|
|
1210
|
+
|
|
1211
|
+
<xsd:simpleType name="simpleType.Generic.NonEmptyString.8">
|
|
1212
|
+
<xsd:restriction base="simpleType.Generic.String">
|
|
1213
|
+
<xsd:minLength value="1" />
|
|
1214
|
+
<xsd:maxLength value="8" />
|
|
1215
|
+
<xsd:pattern value="\S|(\S(.*)\S)" />
|
|
1216
|
+
</xsd:restriction>
|
|
1217
|
+
</xsd:simpleType>
|
|
1218
|
+
|
|
1219
|
+
<xsd:simpleType name="simpleType.Generic.NonEmptyString.1">
|
|
1220
|
+
<xsd:restriction base="simpleType.Generic.String">
|
|
1221
|
+
<xsd:minLength value="1" />
|
|
1222
|
+
<xsd:maxLength value="1" />
|
|
1223
|
+
<xsd:pattern value="\S" />
|
|
1224
|
+
</xsd:restriction>
|
|
1225
|
+
</xsd:simpleType>
|
|
1226
|
+
|
|
1227
|
+
<xsd:simpleType name="simpleType.Generic.NonEmptyString.2">
|
|
1228
|
+
<xsd:restriction base="simpleType.Generic.String">
|
|
1229
|
+
<xsd:minLength value="1" />
|
|
1230
|
+
<xsd:maxLength value="2" />
|
|
1231
|
+
<xsd:pattern value="\S|(\S(.*)\S)" />
|
|
1232
|
+
</xsd:restriction>
|
|
1233
|
+
</xsd:simpleType>
|
|
1234
|
+
|
|
1235
|
+
<xsd:simpleType name="simpleType.Generic.NonEmptyString.3">
|
|
1236
|
+
<xsd:restriction base="simpleType.Generic.String">
|
|
1237
|
+
<xsd:minLength value="1" />
|
|
1238
|
+
<xsd:maxLength value="3" />
|
|
1239
|
+
<xsd:pattern value="\S|(\S(.*)\S)" />
|
|
1240
|
+
</xsd:restriction>
|
|
1241
|
+
</xsd:simpleType>
|
|
1242
|
+
|
|
1243
|
+
<xsd:simpleType name="simpleType.Generic.NonEmptyString.20">
|
|
1244
|
+
<xsd:restriction base="simpleType.Generic.String">
|
|
1245
|
+
<xsd:minLength value="1" />
|
|
1246
|
+
<xsd:maxLength value="20" />
|
|
1247
|
+
<xsd:pattern value="\S|(\S(.*)\S)" />
|
|
1248
|
+
</xsd:restriction>
|
|
1249
|
+
</xsd:simpleType>
|
|
1250
|
+
|
|
1171
1251
|
<xsd:simpleType name="simpleType.Generic.NonEmptyString.40">
|
|
1172
1252
|
<xsd:restriction base="simpleType.Generic.String">
|
|
1173
1253
|
<xsd:minLength value="1" />
|
|
@@ -1224,6 +1304,243 @@
|
|
|
1224
1304
|
</xsd:restriction>
|
|
1225
1305
|
</xsd:simpleType>
|
|
1226
1306
|
|
|
1307
|
+
<xsd:complexType name="complexType.PaymentDetails">
|
|
1308
|
+
<xsd:annotation>
|
|
1309
|
+
<xsd:documentation>
|
|
1310
|
+
Since version 26.10.
|
|
1311
|
+
Normalized payment details for the order payment instrument. Specific fields are populated depending on
|
|
1312
|
+
the type value.
|
|
1313
|
+
</xsd:documentation>
|
|
1314
|
+
</xsd:annotation>
|
|
1315
|
+
<xsd:sequence>
|
|
1316
|
+
<xsd:element name="brand" type="simpleType.Generic.NonEmptyString.20" minOccurs="0" maxOccurs="1">
|
|
1317
|
+
<xsd:annotation>
|
|
1318
|
+
<xsd:documentation>
|
|
1319
|
+
The normalized card brand. Expected values are amex, diners, discover, jcb,
|
|
1320
|
+
mastercard, unionpay, visa, and unknown. A custom value may also be returned.
|
|
1321
|
+
</xsd:documentation>
|
|
1322
|
+
</xsd:annotation>
|
|
1323
|
+
</xsd:element>
|
|
1324
|
+
<xsd:element name="last-4" type="simpleType.Generic.NonEmptyString.4" minOccurs="0" maxOccurs="1">
|
|
1325
|
+
<xsd:annotation>
|
|
1326
|
+
<xsd:documentation>
|
|
1327
|
+
The last four digits of the payment instrument.
|
|
1328
|
+
</xsd:documentation>
|
|
1329
|
+
</xsd:annotation>
|
|
1330
|
+
</xsd:element>
|
|
1331
|
+
<xsd:element name="wallet-type" type="simpleType.Generic.NonEmptyString.20" minOccurs="0" maxOccurs="1">
|
|
1332
|
+
<xsd:annotation>
|
|
1333
|
+
<xsd:documentation>
|
|
1334
|
+
The normalized digital wallet used for the payment. Expected values are
|
|
1335
|
+
apple_pay and google_pay. A custom value may also be returned.
|
|
1336
|
+
</xsd:documentation>
|
|
1337
|
+
</xsd:annotation>
|
|
1338
|
+
</xsd:element>
|
|
1339
|
+
<xsd:element name="expiration-month" type="simpleType.PaymentDetails.ExpirationMonth" minOccurs="0" maxOccurs="1">
|
|
1340
|
+
<xsd:annotation>
|
|
1341
|
+
<xsd:documentation>
|
|
1342
|
+
The month when the payment instrument expires.
|
|
1343
|
+
</xsd:documentation>
|
|
1344
|
+
</xsd:annotation>
|
|
1345
|
+
</xsd:element>
|
|
1346
|
+
<xsd:element name="expiration-year" type="xsd:int" minOccurs="0" maxOccurs="1">
|
|
1347
|
+
<xsd:annotation>
|
|
1348
|
+
<xsd:documentation>
|
|
1349
|
+
The year when the payment instrument expires.
|
|
1350
|
+
</xsd:documentation>
|
|
1351
|
+
</xsd:annotation>
|
|
1352
|
+
</xsd:element>
|
|
1353
|
+
<xsd:element name="token" type="simpleType.Generic.NonEmptyString.40" minOccurs="0" maxOccurs="1">
|
|
1354
|
+
<xsd:annotation>
|
|
1355
|
+
<xsd:documentation>
|
|
1356
|
+
The reference token representing the payment instrument. This is an opaque
|
|
1357
|
+
identifier, not the card number (PAN).
|
|
1358
|
+
</xsd:documentation>
|
|
1359
|
+
</xsd:annotation>
|
|
1360
|
+
</xsd:element>
|
|
1361
|
+
<xsd:element name="token-type" type="simpleType.Generic.NonEmptyString.20" minOccurs="0" maxOccurs="1">
|
|
1362
|
+
<xsd:annotation>
|
|
1363
|
+
<xsd:documentation>
|
|
1364
|
+
The type of token backing the reference token. Expected values are NETWORK
|
|
1365
|
+
and GATEWAY. A custom value may also be returned.
|
|
1366
|
+
</xsd:documentation>
|
|
1367
|
+
</xsd:annotation>
|
|
1368
|
+
</xsd:element>
|
|
1369
|
+
<xsd:element name="account-holder-name" type="simpleType.Generic.NonEmptyString.256" minOccurs="0" maxOccurs="1">
|
|
1370
|
+
<xsd:annotation>
|
|
1371
|
+
<xsd:documentation>
|
|
1372
|
+
The name of the payment instrument account holder.
|
|
1373
|
+
</xsd:documentation>
|
|
1374
|
+
</xsd:annotation>
|
|
1375
|
+
</xsd:element>
|
|
1376
|
+
<xsd:element name="bin" type="simpleType.Generic.NonEmptyString.8" minOccurs="0" maxOccurs="1">
|
|
1377
|
+
<xsd:annotation>
|
|
1378
|
+
<xsd:documentation>
|
|
1379
|
+
The bank identification number (BIN) of the payment card.
|
|
1380
|
+
</xsd:documentation>
|
|
1381
|
+
</xsd:annotation>
|
|
1382
|
+
</xsd:element>
|
|
1383
|
+
<xsd:element name="dpan-last-4" type="simpleType.Generic.NonEmptyString.4" minOccurs="0" maxOccurs="1">
|
|
1384
|
+
<xsd:annotation>
|
|
1385
|
+
<xsd:documentation>
|
|
1386
|
+
The last four digits of the device primary account number for a
|
|
1387
|
+
wallet-tokenized card.
|
|
1388
|
+
</xsd:documentation>
|
|
1389
|
+
</xsd:annotation>
|
|
1390
|
+
</xsd:element>
|
|
1391
|
+
<xsd:element name="issuing-country" type="simpleType.CountryCode" minOccurs="0" maxOccurs="1">
|
|
1392
|
+
<xsd:annotation>
|
|
1393
|
+
<xsd:documentation>
|
|
1394
|
+
The ISO 3166-1 alpha-2 country code of the issuing bank.
|
|
1395
|
+
</xsd:documentation>
|
|
1396
|
+
</xsd:annotation>
|
|
1397
|
+
</xsd:element>
|
|
1398
|
+
<xsd:element name="funding-type" type="simpleType.Generic.NonEmptyString.20" minOccurs="0" maxOccurs="1">
|
|
1399
|
+
<xsd:annotation>
|
|
1400
|
+
<xsd:documentation>
|
|
1401
|
+
The normalized card funding type. Expected values are CREDIT, DEBIT, and
|
|
1402
|
+
PREPAID. A custom value may also be returned.
|
|
1403
|
+
</xsd:documentation>
|
|
1404
|
+
</xsd:annotation>
|
|
1405
|
+
</xsd:element>
|
|
1406
|
+
</xsd:sequence>
|
|
1407
|
+
<xsd:attribute name="type" type="simpleType.Generic.NonEmptyString.256" use="required">
|
|
1408
|
+
<xsd:annotation>
|
|
1409
|
+
<xsd:documentation>
|
|
1410
|
+
The normalized payment method type. Expected values are bancontact, card,
|
|
1411
|
+
eps, gift_card, ideal, klarna, sepa_debit, paypal, venmo, afterpay_clearpay,
|
|
1412
|
+
amazon_pay, and twint. A custom value may also be returned.
|
|
1413
|
+
</xsd:documentation>
|
|
1414
|
+
</xsd:annotation>
|
|
1415
|
+
</xsd:attribute>
|
|
1416
|
+
</xsd:complexType>
|
|
1417
|
+
|
|
1418
|
+
<xsd:complexType name="complexType.TransactionDetails">
|
|
1419
|
+
<xsd:annotation>
|
|
1420
|
+
<xsd:documentation>
|
|
1421
|
+
Since version 26.10.
|
|
1422
|
+
Normalized transaction details for the order payment transaction. Specific fields
|
|
1423
|
+
are populated depending on the payment-details type value.
|
|
1424
|
+
</xsd:documentation>
|
|
1425
|
+
</xsd:annotation>
|
|
1426
|
+
<xsd:sequence>
|
|
1427
|
+
<xsd:element name="cvc-result" type="simpleType.Generic.NonEmptyString.20" minOccurs="0" maxOccurs="1">
|
|
1428
|
+
<xsd:annotation>
|
|
1429
|
+
<xsd:documentation>
|
|
1430
|
+
The card verification code check result. Expected values are MATCH, NO_MATCH,
|
|
1431
|
+
NOT_PROCESSED, and UNAVAILABLE. A custom value may also be returned.
|
|
1432
|
+
</xsd:documentation>
|
|
1433
|
+
</xsd:annotation>
|
|
1434
|
+
</xsd:element>
|
|
1435
|
+
<xsd:element name="avs-result" type="simpleType.Generic.NonEmptyString.1" minOccurs="0" maxOccurs="1">
|
|
1436
|
+
<xsd:annotation>
|
|
1437
|
+
<xsd:documentation>
|
|
1438
|
+
The address verification service result. Expected values are Y (full match),
|
|
1439
|
+
N (no match), A (address only), Z (postal code only), U (unavailable), S
|
|
1440
|
+
(unsupported), and R (retry). A custom value may also be returned.
|
|
1441
|
+
</xsd:documentation>
|
|
1442
|
+
</xsd:annotation>
|
|
1443
|
+
</xsd:element>
|
|
1444
|
+
<xsd:element name="three-ds-result" type="simpleType.Generic.NonEmptyString.20" minOccurs="0" maxOccurs="1">
|
|
1445
|
+
<xsd:annotation>
|
|
1446
|
+
<xsd:documentation>
|
|
1447
|
+
The 3D Secure authentication result. Expected values are AUTHENTICATED,
|
|
1448
|
+
ATTEMPTED, FAILED, REJECTED, and UNAVAILABLE. A custom value may also be returned.
|
|
1449
|
+
</xsd:documentation>
|
|
1450
|
+
</xsd:annotation>
|
|
1451
|
+
</xsd:element>
|
|
1452
|
+
<xsd:element name="three-ds-version" type="simpleType.Generic.NonEmptyString.2" minOccurs="0" maxOccurs="1">
|
|
1453
|
+
<xsd:annotation>
|
|
1454
|
+
<xsd:documentation>
|
|
1455
|
+
The 3D Secure protocol version. Expected values are V1 and V2. A custom value may also be returned.
|
|
1456
|
+
</xsd:documentation>
|
|
1457
|
+
</xsd:annotation>
|
|
1458
|
+
</xsd:element>
|
|
1459
|
+
<xsd:element name="three-ds-transaction-id" type="simpleType.Generic.NonEmptyString.40" minOccurs="0" maxOccurs="1">
|
|
1460
|
+
<xsd:annotation>
|
|
1461
|
+
<xsd:documentation>
|
|
1462
|
+
The 3D Secure transaction identifier.
|
|
1463
|
+
</xsd:documentation>
|
|
1464
|
+
</xsd:annotation>
|
|
1465
|
+
</xsd:element>
|
|
1466
|
+
<xsd:element name="electronic-commerce-indicator" type="simpleType.Generic.NonEmptyString.3" minOccurs="0" maxOccurs="1">
|
|
1467
|
+
<xsd:annotation>
|
|
1468
|
+
<xsd:documentation>
|
|
1469
|
+
The electronic commerce indicator (ECI) value returned by the processor.
|
|
1470
|
+
</xsd:documentation>
|
|
1471
|
+
</xsd:annotation>
|
|
1472
|
+
</xsd:element>
|
|
1473
|
+
<xsd:element name="approval-code" type="simpleType.Generic.NonEmptyString.256" minOccurs="0" maxOccurs="1">
|
|
1474
|
+
<xsd:annotation>
|
|
1475
|
+
<xsd:documentation>
|
|
1476
|
+
The approval code returned by the provider on a successful gift card capture.
|
|
1477
|
+
</xsd:documentation>
|
|
1478
|
+
</xsd:annotation>
|
|
1479
|
+
</xsd:element>
|
|
1480
|
+
<xsd:element name="reason-code" type="simpleType.Generic.NonEmptyString.256" minOccurs="0" maxOccurs="1">
|
|
1481
|
+
<xsd:annotation>
|
|
1482
|
+
<xsd:documentation>
|
|
1483
|
+
The reason code returned by the provider on a failed gift card capture.
|
|
1484
|
+
Expected values are DECLINED and INSUFFICIENT_FUNDS. A custom value may also
|
|
1485
|
+
be returned.
|
|
1486
|
+
</xsd:documentation>
|
|
1487
|
+
</xsd:annotation>
|
|
1488
|
+
</xsd:element>
|
|
1489
|
+
<xsd:element name="processor-response-text" type="simpleType.Generic.NonEmptyString.256" minOccurs="0" maxOccurs="1">
|
|
1490
|
+
<xsd:annotation>
|
|
1491
|
+
<xsd:documentation>
|
|
1492
|
+
The human-readable gift card processor response text. The language and localization of this
|
|
1493
|
+
text are provider-defined and may vary by provider integration.
|
|
1494
|
+
</xsd:documentation>
|
|
1495
|
+
</xsd:annotation>
|
|
1496
|
+
</xsd:element>
|
|
1497
|
+
</xsd:sequence>
|
|
1498
|
+
</xsd:complexType>
|
|
1499
|
+
|
|
1500
|
+
<xsd:complexType name="complexType.FraudDecisions">
|
|
1501
|
+
<xsd:annotation>
|
|
1502
|
+
<xsd:documentation>
|
|
1503
|
+
Since version 26.10.
|
|
1504
|
+
Normalized fraud decisions for the order payment instrument. The values remain
|
|
1505
|
+
readable for historical orders.
|
|
1506
|
+
</xsd:documentation>
|
|
1507
|
+
</xsd:annotation>
|
|
1508
|
+
<xsd:sequence>
|
|
1509
|
+
<xsd:element name="pre-authorization" type="simpleType.Generic.NonEmptyString.256" minOccurs="0" maxOccurs="1">
|
|
1510
|
+
<xsd:annotation>
|
|
1511
|
+
<xsd:documentation>
|
|
1512
|
+
The pre-authorization fraud decision used by the client to orchestrate
|
|
1513
|
+
checkout. Expected values are NOT_REVIEWED (no pre-authorization fraud
|
|
1514
|
+
decision was made), APPROVED (the payment authorization can proceed),
|
|
1515
|
+
CHALLENGE (the payment authorization should be challenged with additional
|
|
1516
|
+
verification such as a 3D Secure challenge before it can proceed), and
|
|
1517
|
+
DECLINED (the payment authorization is declined). A custom value may also be
|
|
1518
|
+
returned.
|
|
1519
|
+
</xsd:documentation>
|
|
1520
|
+
</xsd:annotation>
|
|
1521
|
+
</xsd:element>
|
|
1522
|
+
<xsd:element name="post-authorization" type="simpleType.Generic.NonEmptyString.256" minOccurs="0" maxOccurs="1">
|
|
1523
|
+
<xsd:annotation>
|
|
1524
|
+
<xsd:documentation>
|
|
1525
|
+
The post-authorization fraud decision indicating whether the transaction is
|
|
1526
|
+
covered by a fraud guarantee. Expected values are NOT_REVIEWED (no
|
|
1527
|
+
post-authorization fraud decision was made), GUARANTEED (the transaction is
|
|
1528
|
+
covered by a fraud guarantee), NOT_GUARANTEED (the transaction is not covered
|
|
1529
|
+
by a fraud guarantee), and PENDING (the post-authorization fraud decision is
|
|
1530
|
+
still pending). A custom value may also be returned.
|
|
1531
|
+
</xsd:documentation>
|
|
1532
|
+
</xsd:annotation>
|
|
1533
|
+
</xsd:element>
|
|
1534
|
+
</xsd:sequence>
|
|
1535
|
+
</xsd:complexType>
|
|
1536
|
+
|
|
1537
|
+
<xsd:simpleType name="simpleType.PaymentDetails.ExpirationMonth">
|
|
1538
|
+
<xsd:restriction base="xsd:int">
|
|
1539
|
+
<xsd:minInclusive value="1"/>
|
|
1540
|
+
<xsd:maxInclusive value="12"/>
|
|
1541
|
+
</xsd:restriction>
|
|
1542
|
+
</xsd:simpleType>
|
|
1543
|
+
|
|
1227
1544
|
<xsd:simpleType name="simpleType.OrderBusinessType">
|
|
1228
1545
|
<xsd:restriction base="xsd:string">
|
|
1229
1546
|
<xsd:enumeration value="B2C" />
|
package/data/xsd/search2.xsd
CHANGED
|
@@ -467,7 +467,7 @@
|
|
|
467
467
|
<xsd:simpleType name="simpleType.Generic.String.256">
|
|
468
468
|
<xsd:restriction base="simpleType.Generic.String">
|
|
469
469
|
<xsd:minLength value="0"/>
|
|
470
|
-
<xsd:maxLength value="
|
|
470
|
+
<xsd:maxLength value="256"/>
|
|
471
471
|
</xsd:restriction>
|
|
472
472
|
</xsd:simpleType>
|
|
473
473
|
|
package/data/xsd/sort.xsd
CHANGED
|
@@ -191,8 +191,16 @@
|
|
|
191
191
|
<xsd:element name="description" type="LocalizedString" minOccurs="0" maxOccurs="unbounded" />
|
|
192
192
|
</xsd:sequence>
|
|
193
193
|
<xsd:attribute name="option-id" type="Generic.NonEmptyString.256" use="required" />
|
|
194
|
+
<xsd:attribute name="search-type" type="SearchType" use="optional" />
|
|
194
195
|
</xsd:complexType>
|
|
195
196
|
|
|
197
|
+
<xsd:simpleType name="SearchType">
|
|
198
|
+
<xsd:restriction base="xsd:string">
|
|
199
|
+
<xsd:enumeration value="standard" />
|
|
200
|
+
<xsd:enumeration value="agentic" />
|
|
201
|
+
</xsd:restriction>
|
|
202
|
+
</xsd:simpleType>
|
|
203
|
+
|
|
196
204
|
<xsd:simpleType name="SortingDirection">
|
|
197
205
|
<xsd:restriction base="xsd:string">
|
|
198
206
|
<xsd:enumeration value="ascending" />
|
|
@@ -268,9 +276,18 @@
|
|
|
268
276
|
</xsd:restriction>
|
|
269
277
|
</xsd:simpleType>
|
|
270
278
|
|
|
279
|
+
<!-- Owning system object type for a boostable attribute. -->
|
|
280
|
+
<xsd:simpleType name="BoostableObjectType">
|
|
281
|
+
<xsd:restriction base="xsd:string">
|
|
282
|
+
<xsd:enumeration value="Product" />
|
|
283
|
+
<xsd:enumeration value="ProductActiveData" />
|
|
284
|
+
</xsd:restriction>
|
|
285
|
+
</xsd:simpleType>
|
|
286
|
+
|
|
271
287
|
<xsd:complexType name="BoostableAttribute">
|
|
272
288
|
<xsd:attribute name="attribute-id" type="Generic.NonEmptyString.256" use="required" />
|
|
273
289
|
<xsd:attribute name="system" type="xsd:boolean" use="required" />
|
|
290
|
+
<xsd:attribute name="object-type" type="BoostableObjectType" use="optional" default="Product" />
|
|
274
291
|
<xsd:attribute name="mode" type="ImportMode" use="optional" />
|
|
275
292
|
</xsd:complexType>
|
|
276
293
|
|
package/data/xsd/storefronts.xsd
CHANGED
|
@@ -24,21 +24,50 @@
|
|
|
24
24
|
<xsd:complexType name="complexType.Storefront" mixed="false">
|
|
25
25
|
<xsd:sequence>
|
|
26
26
|
<xsd:element name="ecom-site" type="simpleType.Generic.String.48" minOccurs="0" maxOccurs="1"/>
|
|
27
|
-
|
|
28
|
-
<xsd:element name="storefront-
|
|
27
|
+
<!-- Accepted values (case-insensitive on import): composable, pwa_kit. Export emits lowercase. -->
|
|
28
|
+
<xsd:element name="storefront-type" type="simpleType.Generic.String.32" minOccurs="1" maxOccurs="1"/>
|
|
29
|
+
<!--
|
|
30
|
+
Deprecated. Retained solely for backward compatibility: storefront import validates incoming
|
|
31
|
+
files against this schema (StorefrontImpexUnit.setSchema), so pre-cleanup export files that still
|
|
32
|
+
carry <storefront-status> must remain declared here to pass validation. Optional and ignored on
|
|
33
|
+
import; no longer emitted on export. Do not add new consumers.
|
|
34
|
+
-->
|
|
35
|
+
<xsd:element name="storefront-status" type="simpleType.Generic.String.32" minOccurs="0" maxOccurs="1"/>
|
|
29
36
|
<xsd:element name="associated-sites" type="complexType.AssociatedSites" minOccurs="0" maxOccurs="1"/>
|
|
30
|
-
|
|
37
|
+
<!--
|
|
38
|
+
Optional. For interactive Business Manager (session-based) imports the importer's authenticated
|
|
39
|
+
session identity is authoritative and this value is ignored. It supplies the acting identity only for
|
|
40
|
+
server-to-server (client-credentials) imports, which have no session; such imports are rejected if it
|
|
41
|
+
is absent or unauthorized. Retained and declared here because storefront import validates incoming
|
|
42
|
+
files against this schema (StorefrontImpexUnit.setSchema).
|
|
43
|
+
-->
|
|
44
|
+
<xsd:element name="user-id" type="simpleType.Generic.String.48" minOccurs="0" maxOccurs="1"/>
|
|
31
45
|
<xsd:element name="org-slug" type="simpleType.Generic.String.64" minOccurs="1" maxOccurs="1"/>
|
|
32
46
|
<xsd:element name="mrt-site" type="simpleType.Generic.String.64" minOccurs="1" maxOccurs="1"/>
|
|
33
47
|
<xsd:element name="scm-repo" type="simpleType.Generic.String.512" minOccurs="0" maxOccurs="1"/>
|
|
34
48
|
<xsd:element name="scm-target" type="simpleType.Generic.String.64" minOccurs="0" maxOccurs="1"/>
|
|
49
|
+
<!--
|
|
50
|
+
Deprecated (W-23546554). Retained solely for backward compatibility: storefront import validates
|
|
51
|
+
incoming files against this schema (StorefrontImpexUnit.setSchema), so pre-cleanup export files that
|
|
52
|
+
still carry <github-app-installation> must remain declared here to pass validation. Optional and
|
|
53
|
+
ignored on import; no longer emitted on export. Carrying the source realm's GitHub App installation
|
|
54
|
+
onto a target would enable a cross-realm credential-leak (spike W-23298074 3.3), so it is dropped on
|
|
55
|
+
import and the GitHub App must be reconnected manually. Do not add new consumers. This element will be
|
|
56
|
+
removed in a future schema version once all pre-cleanup export files carrying it have cycled out.
|
|
57
|
+
-->
|
|
35
58
|
<xsd:element name="github-app-installation" type="complexType.GitHubAppInstallation" minOccurs="0" maxOccurs="1"/>
|
|
36
59
|
</xsd:sequence>
|
|
37
60
|
<xsd:attribute name="storefront-name" type="simpleType.Generic.NonEmptyString.64" use="required"/>
|
|
38
|
-
|
|
61
|
+
<!--
|
|
62
|
+
Deprecated. Retained solely for backward compatibility: pre-cleanup delta-export files could carry
|
|
63
|
+
mode="delete". Optional and ignored on import (the import delete decision is driven by the framework
|
|
64
|
+
import mode, not this attribute); no longer emitted on export. Do not add new consumers.
|
|
65
|
+
-->
|
|
66
|
+
<xsd:attribute name="mode" type="simpleType.Generic.String.32"/>
|
|
39
67
|
</xsd:complexType>
|
|
40
68
|
|
|
41
|
-
<!-- GitHub App Installation
|
|
69
|
+
<!-- GitHub App Installation. Deprecated (W-23546554): declared only so legacy files that still carry
|
|
70
|
+
<github-app-installation> validate on import. Ignored on import, never exported. Do not add new consumers. -->
|
|
42
71
|
<xsd:complexType name="complexType.GitHubAppInstallation" mixed="false">
|
|
43
72
|
<xsd:sequence>
|
|
44
73
|
<xsd:element name="app-id" type="simpleType.Generic.String.64" minOccurs="1" maxOccurs="1"/>
|
|
@@ -57,49 +86,6 @@
|
|
|
57
86
|
</xsd:sequence>
|
|
58
87
|
</xsd:complexType>
|
|
59
88
|
|
|
60
|
-
<!-- Storefront Type enumeration -->
|
|
61
|
-
<xsd:simpleType name="simpleType.StorefrontType">
|
|
62
|
-
<xsd:restriction base="xsd:string">
|
|
63
|
-
<xsd:enumeration value="composable"/>
|
|
64
|
-
<xsd:enumeration value="headless"/>
|
|
65
|
-
</xsd:restriction>
|
|
66
|
-
</xsd:simpleType>
|
|
67
|
-
|
|
68
|
-
<!--
|
|
69
|
-
Storefront Status enumeration.
|
|
70
|
-
|
|
71
|
-
These values must stay in sync with StorefrontSetupStatusEnum (core/internal/storefront).
|
|
72
|
-
There is no compile-time link between this XSD and the Java enum; drift is caught by
|
|
73
|
-
comparing the JAXB-generated SimpleTypeStorefrontStatus against StorefrontSetupStatusEnum
|
|
74
|
-
in _JAXBStorefrontExportHandler (testStorefrontStatusEnumAndXsdInSync).
|
|
75
|
-
|
|
76
|
-
Export currently restricts output to SUCCESS storefronts only
|
|
77
|
-
(JAXBStorefrontExportHandler.mapStorefront). Adding a new exportable status requires:
|
|
78
|
-
1. Adding the value here
|
|
79
|
-
2. Adding the enum constant in StorefrontSetupStatusEnum
|
|
80
|
-
3. Updating the export guard in mapStorefront to allow the new status
|
|
81
|
-
4. Updating the sync unit test's expected set if needed
|
|
82
|
-
-->
|
|
83
|
-
<xsd:simpleType name="simpleType.StorefrontStatus">
|
|
84
|
-
<xsd:restriction base="xsd:string">
|
|
85
|
-
<xsd:enumeration value="in_progress"/>
|
|
86
|
-
<xsd:enumeration value="success"/>
|
|
87
|
-
<xsd:enumeration value="backfilled"/>
|
|
88
|
-
<xsd:enumeration value="failed"/>
|
|
89
|
-
<xsd:enumeration value="delete_in_progress"/>
|
|
90
|
-
<xsd:enumeration value="delete_failed"/>
|
|
91
|
-
<xsd:enumeration value="deleted"/>
|
|
92
|
-
<xsd:enumeration value="unknown"/>
|
|
93
|
-
</xsd:restriction>
|
|
94
|
-
</xsd:simpleType>
|
|
95
|
-
|
|
96
|
-
<!-- Import Mode -->
|
|
97
|
-
<xsd:simpleType name="simpleType.ImportMode">
|
|
98
|
-
<xsd:restriction base="xsd:string">
|
|
99
|
-
<xsd:enumeration value="delete"/>
|
|
100
|
-
</xsd:restriction>
|
|
101
|
-
</xsd:simpleType>
|
|
102
|
-
|
|
103
89
|
<!-- simple generic types -->
|
|
104
90
|
<xsd:simpleType name="simpleType.Generic.String">
|
|
105
91
|
<xsd:restriction base="xsd:string"/>
|
|
@@ -1,39 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HTTP Middleware Registry for B2C SDK.
|
|
3
|
-
*
|
|
4
|
-
* Provides a unified middleware system that works across all HTTP clients,
|
|
5
|
-
* including openapi-fetch clients (OCAPI, SLAS, etc.) and the WebDAV client.
|
|
6
|
-
*
|
|
7
|
-
* ## SDK Usage
|
|
8
|
-
*
|
|
9
|
-
* ```typescript
|
|
10
|
-
* import { globalMiddlewareRegistry, HttpMiddlewareProvider } from '@salesforce/b2c-tooling-sdk/clients';
|
|
11
|
-
*
|
|
12
|
-
* const loggingProvider: HttpMiddlewareProvider = {
|
|
13
|
-
* name: 'my-logger',
|
|
14
|
-
* getMiddleware(clientType) {
|
|
15
|
-
* return {
|
|
16
|
-
* onRequest({ request }) {
|
|
17
|
-
* console.log(`[${clientType}] ${request.method} ${request.url}`);
|
|
18
|
-
* return request;
|
|
19
|
-
* },
|
|
20
|
-
* onResponse({ response }) {
|
|
21
|
-
* console.log(`[${clientType}] ${response.status}`);
|
|
22
|
-
* return response;
|
|
23
|
-
* },
|
|
24
|
-
* };
|
|
25
|
-
* },
|
|
26
|
-
* };
|
|
27
|
-
*
|
|
28
|
-
* globalMiddlewareRegistry.register(loggingProvider);
|
|
29
|
-
* ```
|
|
30
|
-
*
|
|
31
|
-
* ## CLI Plugin Usage
|
|
32
|
-
*
|
|
33
|
-
* Plugins can provide middleware via the `b2c:http-middleware` hook.
|
|
34
|
-
*
|
|
35
|
-
* @module clients/middleware-registry
|
|
36
|
-
*/
|
|
37
1
|
import type { Middleware } from 'openapi-fetch';
|
|
38
2
|
/**
|
|
39
3
|
* Types of HTTP clients that can receive middleware.
|
|
@@ -121,6 +85,14 @@ export interface HttpMiddlewareProvider {
|
|
|
121
85
|
*/
|
|
122
86
|
export declare class MiddlewareRegistry {
|
|
123
87
|
private providers;
|
|
88
|
+
private overrides;
|
|
89
|
+
/**
|
|
90
|
+
* Replace named providers for one execution and its asynchronous descendants.
|
|
91
|
+
* Other providers remain installed. Nested scopes inherit overrides, while
|
|
92
|
+
* concurrent executions and callers outside the scope keep their own policy.
|
|
93
|
+
* Clients that capture middleware should be created inside the callback.
|
|
94
|
+
*/
|
|
95
|
+
runWithOverrides<T>(providers: readonly HttpMiddlewareProvider[], callback: () => T): T;
|
|
124
96
|
/**
|
|
125
97
|
* Registers a middleware provider.
|
|
126
98
|
*
|
|
@@ -1,3 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025, Salesforce, Inc.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2
|
|
4
|
+
* For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* HTTP Middleware Registry for B2C SDK.
|
|
8
|
+
*
|
|
9
|
+
* Provides a unified middleware system that works across all HTTP clients,
|
|
10
|
+
* including openapi-fetch clients (OCAPI, SLAS, etc.) and the WebDAV client.
|
|
11
|
+
*
|
|
12
|
+
* ## SDK Usage
|
|
13
|
+
*
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import { globalMiddlewareRegistry, HttpMiddlewareProvider } from '@salesforce/b2c-tooling-sdk/clients';
|
|
16
|
+
*
|
|
17
|
+
* const loggingProvider: HttpMiddlewareProvider = {
|
|
18
|
+
* name: 'my-logger',
|
|
19
|
+
* getMiddleware(clientType) {
|
|
20
|
+
* return {
|
|
21
|
+
* onRequest({ request }) {
|
|
22
|
+
* console.log(`[${clientType}] ${request.method} ${request.url}`);
|
|
23
|
+
* return request;
|
|
24
|
+
* },
|
|
25
|
+
* onResponse({ response }) {
|
|
26
|
+
* console.log(`[${clientType}] ${response.status}`);
|
|
27
|
+
* return response;
|
|
28
|
+
* },
|
|
29
|
+
* };
|
|
30
|
+
* },
|
|
31
|
+
* };
|
|
32
|
+
*
|
|
33
|
+
* globalMiddlewareRegistry.register(loggingProvider);
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* ## CLI Plugin Usage
|
|
37
|
+
*
|
|
38
|
+
* Plugins can provide middleware via the `b2c:http-middleware` hook.
|
|
39
|
+
*
|
|
40
|
+
* @module clients/middleware-registry
|
|
41
|
+
*/
|
|
42
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
1
43
|
/**
|
|
2
44
|
* Registry for HTTP middleware providers.
|
|
3
45
|
*
|
|
@@ -16,6 +58,19 @@
|
|
|
16
58
|
*/
|
|
17
59
|
export class MiddlewareRegistry {
|
|
18
60
|
providers = [];
|
|
61
|
+
overrides = new AsyncLocalStorage();
|
|
62
|
+
/**
|
|
63
|
+
* Replace named providers for one execution and its asynchronous descendants.
|
|
64
|
+
* Other providers remain installed. Nested scopes inherit overrides, while
|
|
65
|
+
* concurrent executions and callers outside the scope keep their own policy.
|
|
66
|
+
* Clients that capture middleware should be created inside the callback.
|
|
67
|
+
*/
|
|
68
|
+
runWithOverrides(providers, callback) {
|
|
69
|
+
const overrides = new Map(this.overrides.getStore());
|
|
70
|
+
for (const provider of providers)
|
|
71
|
+
overrides.set(provider.name, provider);
|
|
72
|
+
return this.overrides.run(overrides, callback);
|
|
73
|
+
}
|
|
19
74
|
/**
|
|
20
75
|
* Registers a middleware provider.
|
|
21
76
|
*
|
|
@@ -48,7 +103,13 @@ export class MiddlewareRegistry {
|
|
|
48
103
|
*/
|
|
49
104
|
getMiddleware(clientType, options = {}) {
|
|
50
105
|
const middleware = [];
|
|
51
|
-
|
|
106
|
+
const overrides = this.overrides.getStore();
|
|
107
|
+
const providers = this.providers.map((provider) => overrides?.get(provider.name) ?? provider);
|
|
108
|
+
for (const provider of overrides?.values() ?? []) {
|
|
109
|
+
if (!this.providers.some((registered) => registered.name === provider.name))
|
|
110
|
+
providers.push(provider);
|
|
111
|
+
}
|
|
112
|
+
for (const provider of providers) {
|
|
52
113
|
if (options.exclude?.includes(provider.name))
|
|
53
114
|
continue;
|
|
54
115
|
const m = provider.getMiddleware(clientType);
|