@viu/emporix-sdk 2.33.3 → 2.33.5
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/CHANGELOG.md +16 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +71 -9
- package/dist/index.d.ts +71 -9
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1023,12 +1023,30 @@ type SequenceSchema$1 = SequenceSchemaCreate$1 & {
|
|
|
1023
1023
|
};
|
|
1024
1024
|
};
|
|
1025
1025
|
/**
|
|
1026
|
-
*
|
|
1026
|
+
* Placeholder definitions used in `preText` and `postText`. Names must start and end with `__`.
|
|
1027
1027
|
*/
|
|
1028
1028
|
type Placeholders = {
|
|
1029
1029
|
[key: string]: {
|
|
1030
|
-
|
|
1030
|
+
/**
|
|
1031
|
+
* Flag indicating whether the placeholder must be resolved when generating an ID.
|
|
1032
|
+
*/
|
|
1033
|
+
required: boolean;
|
|
1034
|
+
/**
|
|
1035
|
+
* Replacement used when the placeholder is not set in the request. Used only when `required` is `false`.
|
|
1036
|
+
*/
|
|
1031
1037
|
default?: string;
|
|
1038
|
+
/**
|
|
1039
|
+
* Dotted path into the site or site mixins response. Resolved when `siteCode` is provided.
|
|
1040
|
+
*/
|
|
1041
|
+
sitePath?: string;
|
|
1042
|
+
/**
|
|
1043
|
+
* Maximum array elements to include. Defaults to `3`. Ignored for scalars.
|
|
1044
|
+
*/
|
|
1045
|
+
arrayLimit?: number;
|
|
1046
|
+
/**
|
|
1047
|
+
* Separator for joined array elements. Defaults to `-`. Ignored for scalars.
|
|
1048
|
+
*/
|
|
1049
|
+
delimiter?: string;
|
|
1032
1050
|
};
|
|
1033
1051
|
};
|
|
1034
1052
|
type SequenceSchemaCreate$1 = {
|
|
@@ -1470,7 +1488,15 @@ type SvixConfig = {
|
|
|
1470
1488
|
};
|
|
1471
1489
|
type EventConfiguration = {
|
|
1472
1490
|
/**
|
|
1473
|
-
*
|
|
1491
|
+
* Stable server-generated identifier of this event configuration entry. Omit on create; client-supplied ids are rejected with `400`. On update, known ids must refer to existing entries; unknown ids are rejected with `400`. Ids are immutable once assigned.
|
|
1492
|
+
*/
|
|
1493
|
+
id?: string;
|
|
1494
|
+
/**
|
|
1495
|
+
* Optional user-facing label for this entry (for example "ERP integration"). Purely descriptive — it has no impact on delivery. Maximum 255 characters.
|
|
1496
|
+
*/
|
|
1497
|
+
name?: string;
|
|
1498
|
+
/**
|
|
1499
|
+
* Unique identifier of the event. Multiple entries may share the same `eventType`.
|
|
1474
1500
|
*/
|
|
1475
1501
|
eventType?: string;
|
|
1476
1502
|
/**
|
|
@@ -1485,7 +1511,22 @@ type EventConfiguration = {
|
|
|
1485
1511
|
* List of key-value pairs which can decorate outgoing HTTP POST request as headers. The size limit for this list is `10`. It has higher priority than `headers` on root level. Each event can have defined a separated headers.
|
|
1486
1512
|
*/
|
|
1487
1513
|
headers?: HttpHeadersConfig;
|
|
1514
|
+
/**
|
|
1515
|
+
* Optional Jayway JsonPath predicate evaluated against the event payload. When omitted or empty, the entry matches every event of the given `eventType`. Invalid expressions are rejected with `400`. Examples: `$[?(@.status == 'DECLINED')]`, `$[?(@.total.amount > 100)]`.
|
|
1516
|
+
*/
|
|
1517
|
+
filter?: string;
|
|
1518
|
+
/**
|
|
1519
|
+
* Optional per-entry field exclusion list. Only non-blank top-level field names are allowed. Omit or set to `null` to inherit the event-subscription `excludedFields`. An empty array `[]` overrides the subscription exclusions with no exclusions for this target.
|
|
1520
|
+
*/
|
|
1521
|
+
excludedFields?: Array<string>;
|
|
1522
|
+
/**
|
|
1523
|
+
* Per-endpoint activation switch. When `false`, events for this endpoint are dropped without filter evaluation, delivery, or retries; other endpoints are not affected. Omitted means active.
|
|
1524
|
+
*/
|
|
1525
|
+
active?: boolean;
|
|
1488
1526
|
};
|
|
1527
|
+
/**
|
|
1528
|
+
* List of HTTP event-specific configuration entries. Multiple entries for the same `eventType` are allowed. Uniqueness is by entry `id`. Duplicate entry ids are rejected with `400`.
|
|
1529
|
+
*/
|
|
1489
1530
|
type EventsConfiguration = Array<EventConfiguration>;
|
|
1490
1531
|
type HttpHeaderConfigValue = {
|
|
1491
1532
|
value?: string;
|
|
@@ -1509,7 +1550,7 @@ type HttpConfig = {
|
|
|
1509
1550
|
* List of key-value pairs which can decorate outgoing HTTP POST request as headers. The size limit for this list is `10`.
|
|
1510
1551
|
*/
|
|
1511
1552
|
headers?: HttpHeadersConfig;
|
|
1512
|
-
eventsConfiguration?:
|
|
1553
|
+
eventsConfiguration?: EventsConfiguration;
|
|
1513
1554
|
};
|
|
1514
1555
|
type Configuration = EmptyConfiguration | SvixConfig | HttpConfig;
|
|
1515
1556
|
type WebhookConfigPartialUpdate = {
|
|
@@ -1518,10 +1559,15 @@ type WebhookConfigPartialUpdate = {
|
|
|
1518
1559
|
*/
|
|
1519
1560
|
op: 'REMOVE' | 'UPSERT';
|
|
1520
1561
|
/**
|
|
1521
|
-
* Path
|
|
1562
|
+
* Path identifying which properties should be updated.
|
|
1563
|
+
* Use `UPSERT` on `/configuration/http/eventsConfigurationEntry` (no id) to create a new entry — body must omit `id` (server-generated); `REMOVE` on this path is rejected.
|
|
1564
|
+
* Prefer `/configuration/http/eventsConfigurationEntry/{entryId}` paths to address a specific existing entry.
|
|
1565
|
+
* Use `UPSERT` on `/configuration/http/eventsConfigurationEntry/{entryId}/active` with a boolean value to deactivate (`false`) or reactivate (`true`) a single endpoint without removing it; the value is required.
|
|
1566
|
+
* Legacy `/configuration/http/eventsConfiguration/{eventType}` paths remain supported when at most one entry exists for that event type; they return `409` when multiple entries exist.
|
|
1567
|
+
* Create/update can return `400` for a client-supplied entry id or an invalid JsonPath `filter`.
|
|
1522
1568
|
*/
|
|
1523
|
-
path: '/active' | '/configuration' | '/configuration/svix/apiKey' | '/configuration/http/headers' | '/configuration/http/destinationUrl' | '/configuration/http/secretKey' | '/configuration/http/eventsConfiguration' | '/configuration/http/eventsConfiguration/{eventType}' | '/configuration/http/eventsConfiguration/{eventType}/destinationUrl' | '/configuration/http/eventsConfiguration/{eventType}/secretKey' | '/configuration/http/eventsConfiguration/{eventType}/headers';
|
|
1524
|
-
value?: SvixConfig | HttpConfig | string | boolean | EventsConfiguration | EventConfiguration;
|
|
1569
|
+
path: '/active' | '/configuration' | '/configuration/svix/apiKey' | '/configuration/http/headers' | '/configuration/http/destinationUrl' | '/configuration/http/secretKey' | '/configuration/http/eventsConfiguration' | '/configuration/http/eventsConfiguration/{eventType}' | '/configuration/http/eventsConfiguration/{eventType}/destinationUrl' | '/configuration/http/eventsConfiguration/{eventType}/secretKey' | '/configuration/http/eventsConfiguration/{eventType}/headers' | '/configuration/http/eventsConfigurationEntry' | '/configuration/http/eventsConfigurationEntry/{entryId}' | '/configuration/http/eventsConfigurationEntry/{entryId}/destinationUrl' | '/configuration/http/eventsConfigurationEntry/{entryId}/secretKey' | '/configuration/http/eventsConfigurationEntry/{entryId}/headers' | '/configuration/http/eventsConfigurationEntry/{entryId}/filter' | '/configuration/http/eventsConfigurationEntry/{entryId}/excludedFields' | '/configuration/http/eventsConfigurationEntry/{entryId}/name' | '/configuration/http/eventsConfigurationEntry/{entryId}/active';
|
|
1570
|
+
value?: SvixConfig | HttpConfig | string | boolean | Array<string> | EventsConfiguration | EventConfiguration;
|
|
1525
1571
|
};
|
|
1526
1572
|
type ConfigurationGet = {
|
|
1527
1573
|
/**
|
|
@@ -1538,7 +1584,11 @@ type ConfigurationGet = {
|
|
|
1538
1584
|
headers?: HttpHeadersConfig;
|
|
1539
1585
|
eventsConfiguration?: Array<{
|
|
1540
1586
|
/**
|
|
1541
|
-
*
|
|
1587
|
+
* Stable server-generated identifier of this event configuration entry.
|
|
1588
|
+
*/
|
|
1589
|
+
id?: string;
|
|
1590
|
+
/**
|
|
1591
|
+
* Type of the event. Multiple entries may share the same `eventType`.
|
|
1542
1592
|
*/
|
|
1543
1593
|
eventType?: string;
|
|
1544
1594
|
/**
|
|
@@ -1553,6 +1603,18 @@ type ConfigurationGet = {
|
|
|
1553
1603
|
* List of key-value pairs which can decorate outgoing HTTP POST request as headers.
|
|
1554
1604
|
*/
|
|
1555
1605
|
headers?: HttpHeadersConfig;
|
|
1606
|
+
/**
|
|
1607
|
+
* Optional Jayway JsonPath predicate. When omitted, the entry matches every event of the given `eventType`.
|
|
1608
|
+
*/
|
|
1609
|
+
filter?: string;
|
|
1610
|
+
/**
|
|
1611
|
+
* Per-entry field exclusion list. Omitted or `null` means inherit the event-subscription exclusions. An empty array `[]` overrides with no exclusions for this target.
|
|
1612
|
+
*/
|
|
1613
|
+
excludedFields?: Array<string>;
|
|
1614
|
+
/**
|
|
1615
|
+
* Per-endpoint activation switch. Always returned as an explicit boolean; entries created before the flag existed report `true`. When `false`, events for this endpoint are dropped without filter evaluation, delivery, or retries.
|
|
1616
|
+
*/
|
|
1617
|
+
active?: boolean;
|
|
1556
1618
|
}>;
|
|
1557
1619
|
};
|
|
1558
1620
|
/**
|
|
@@ -1823,7 +1885,7 @@ type IdResponse$1 = {
|
|
|
1823
1885
|
/**
|
|
1824
1886
|
* Type which the schema should be assigned to. Can be one of the predefined values or any custom schema type id.
|
|
1825
1887
|
*/
|
|
1826
|
-
type SchemaType = 'CART' | 'CART_ITEM' | 'CATEGORY' | 'COMPANY' | 'COUPON' | 'CUSTOMER' | 'CUSTOMER_ADDRESS' | 'ORDER' | 'ORDER_ENTRY' | 'PRODUCT' | 'QUOTE' | 'RETURN' | 'PRICE_LIST' | 'SITE' | 'CUSTOM_ENTITY' | 'VENDOR' | 'MEDIA';
|
|
1888
|
+
type SchemaType = 'AVAILABILITY' | 'CART' | 'CART_ITEM' | 'CATEGORY' | 'COMPANY' | 'COUPON' | 'CUSTOMER' | 'CUSTOMER_ADDRESS' | 'LOCATION' | 'ORDER' | 'ORDER_ENTRY' | 'PRODUCT' | 'QUOTE' | 'RETURN' | 'PRICE_LIST' | 'SITE' | 'CUSTOM_ENTITY' | 'VENDOR' | 'MEDIA';
|
|
1827
1889
|
/**
|
|
1828
1890
|
* Type of the attribute.
|
|
1829
1891
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1023,12 +1023,30 @@ type SequenceSchema$1 = SequenceSchemaCreate$1 & {
|
|
|
1023
1023
|
};
|
|
1024
1024
|
};
|
|
1025
1025
|
/**
|
|
1026
|
-
*
|
|
1026
|
+
* Placeholder definitions used in `preText` and `postText`. Names must start and end with `__`.
|
|
1027
1027
|
*/
|
|
1028
1028
|
type Placeholders = {
|
|
1029
1029
|
[key: string]: {
|
|
1030
|
-
|
|
1030
|
+
/**
|
|
1031
|
+
* Flag indicating whether the placeholder must be resolved when generating an ID.
|
|
1032
|
+
*/
|
|
1033
|
+
required: boolean;
|
|
1034
|
+
/**
|
|
1035
|
+
* Replacement used when the placeholder is not set in the request. Used only when `required` is `false`.
|
|
1036
|
+
*/
|
|
1031
1037
|
default?: string;
|
|
1038
|
+
/**
|
|
1039
|
+
* Dotted path into the site or site mixins response. Resolved when `siteCode` is provided.
|
|
1040
|
+
*/
|
|
1041
|
+
sitePath?: string;
|
|
1042
|
+
/**
|
|
1043
|
+
* Maximum array elements to include. Defaults to `3`. Ignored for scalars.
|
|
1044
|
+
*/
|
|
1045
|
+
arrayLimit?: number;
|
|
1046
|
+
/**
|
|
1047
|
+
* Separator for joined array elements. Defaults to `-`. Ignored for scalars.
|
|
1048
|
+
*/
|
|
1049
|
+
delimiter?: string;
|
|
1032
1050
|
};
|
|
1033
1051
|
};
|
|
1034
1052
|
type SequenceSchemaCreate$1 = {
|
|
@@ -1470,7 +1488,15 @@ type SvixConfig = {
|
|
|
1470
1488
|
};
|
|
1471
1489
|
type EventConfiguration = {
|
|
1472
1490
|
/**
|
|
1473
|
-
*
|
|
1491
|
+
* Stable server-generated identifier of this event configuration entry. Omit on create; client-supplied ids are rejected with `400`. On update, known ids must refer to existing entries; unknown ids are rejected with `400`. Ids are immutable once assigned.
|
|
1492
|
+
*/
|
|
1493
|
+
id?: string;
|
|
1494
|
+
/**
|
|
1495
|
+
* Optional user-facing label for this entry (for example "ERP integration"). Purely descriptive — it has no impact on delivery. Maximum 255 characters.
|
|
1496
|
+
*/
|
|
1497
|
+
name?: string;
|
|
1498
|
+
/**
|
|
1499
|
+
* Unique identifier of the event. Multiple entries may share the same `eventType`.
|
|
1474
1500
|
*/
|
|
1475
1501
|
eventType?: string;
|
|
1476
1502
|
/**
|
|
@@ -1485,7 +1511,22 @@ type EventConfiguration = {
|
|
|
1485
1511
|
* List of key-value pairs which can decorate outgoing HTTP POST request as headers. The size limit for this list is `10`. It has higher priority than `headers` on root level. Each event can have defined a separated headers.
|
|
1486
1512
|
*/
|
|
1487
1513
|
headers?: HttpHeadersConfig;
|
|
1514
|
+
/**
|
|
1515
|
+
* Optional Jayway JsonPath predicate evaluated against the event payload. When omitted or empty, the entry matches every event of the given `eventType`. Invalid expressions are rejected with `400`. Examples: `$[?(@.status == 'DECLINED')]`, `$[?(@.total.amount > 100)]`.
|
|
1516
|
+
*/
|
|
1517
|
+
filter?: string;
|
|
1518
|
+
/**
|
|
1519
|
+
* Optional per-entry field exclusion list. Only non-blank top-level field names are allowed. Omit or set to `null` to inherit the event-subscription `excludedFields`. An empty array `[]` overrides the subscription exclusions with no exclusions for this target.
|
|
1520
|
+
*/
|
|
1521
|
+
excludedFields?: Array<string>;
|
|
1522
|
+
/**
|
|
1523
|
+
* Per-endpoint activation switch. When `false`, events for this endpoint are dropped without filter evaluation, delivery, or retries; other endpoints are not affected. Omitted means active.
|
|
1524
|
+
*/
|
|
1525
|
+
active?: boolean;
|
|
1488
1526
|
};
|
|
1527
|
+
/**
|
|
1528
|
+
* List of HTTP event-specific configuration entries. Multiple entries for the same `eventType` are allowed. Uniqueness is by entry `id`. Duplicate entry ids are rejected with `400`.
|
|
1529
|
+
*/
|
|
1489
1530
|
type EventsConfiguration = Array<EventConfiguration>;
|
|
1490
1531
|
type HttpHeaderConfigValue = {
|
|
1491
1532
|
value?: string;
|
|
@@ -1509,7 +1550,7 @@ type HttpConfig = {
|
|
|
1509
1550
|
* List of key-value pairs which can decorate outgoing HTTP POST request as headers. The size limit for this list is `10`.
|
|
1510
1551
|
*/
|
|
1511
1552
|
headers?: HttpHeadersConfig;
|
|
1512
|
-
eventsConfiguration?:
|
|
1553
|
+
eventsConfiguration?: EventsConfiguration;
|
|
1513
1554
|
};
|
|
1514
1555
|
type Configuration = EmptyConfiguration | SvixConfig | HttpConfig;
|
|
1515
1556
|
type WebhookConfigPartialUpdate = {
|
|
@@ -1518,10 +1559,15 @@ type WebhookConfigPartialUpdate = {
|
|
|
1518
1559
|
*/
|
|
1519
1560
|
op: 'REMOVE' | 'UPSERT';
|
|
1520
1561
|
/**
|
|
1521
|
-
* Path
|
|
1562
|
+
* Path identifying which properties should be updated.
|
|
1563
|
+
* Use `UPSERT` on `/configuration/http/eventsConfigurationEntry` (no id) to create a new entry — body must omit `id` (server-generated); `REMOVE` on this path is rejected.
|
|
1564
|
+
* Prefer `/configuration/http/eventsConfigurationEntry/{entryId}` paths to address a specific existing entry.
|
|
1565
|
+
* Use `UPSERT` on `/configuration/http/eventsConfigurationEntry/{entryId}/active` with a boolean value to deactivate (`false`) or reactivate (`true`) a single endpoint without removing it; the value is required.
|
|
1566
|
+
* Legacy `/configuration/http/eventsConfiguration/{eventType}` paths remain supported when at most one entry exists for that event type; they return `409` when multiple entries exist.
|
|
1567
|
+
* Create/update can return `400` for a client-supplied entry id or an invalid JsonPath `filter`.
|
|
1522
1568
|
*/
|
|
1523
|
-
path: '/active' | '/configuration' | '/configuration/svix/apiKey' | '/configuration/http/headers' | '/configuration/http/destinationUrl' | '/configuration/http/secretKey' | '/configuration/http/eventsConfiguration' | '/configuration/http/eventsConfiguration/{eventType}' | '/configuration/http/eventsConfiguration/{eventType}/destinationUrl' | '/configuration/http/eventsConfiguration/{eventType}/secretKey' | '/configuration/http/eventsConfiguration/{eventType}/headers';
|
|
1524
|
-
value?: SvixConfig | HttpConfig | string | boolean | EventsConfiguration | EventConfiguration;
|
|
1569
|
+
path: '/active' | '/configuration' | '/configuration/svix/apiKey' | '/configuration/http/headers' | '/configuration/http/destinationUrl' | '/configuration/http/secretKey' | '/configuration/http/eventsConfiguration' | '/configuration/http/eventsConfiguration/{eventType}' | '/configuration/http/eventsConfiguration/{eventType}/destinationUrl' | '/configuration/http/eventsConfiguration/{eventType}/secretKey' | '/configuration/http/eventsConfiguration/{eventType}/headers' | '/configuration/http/eventsConfigurationEntry' | '/configuration/http/eventsConfigurationEntry/{entryId}' | '/configuration/http/eventsConfigurationEntry/{entryId}/destinationUrl' | '/configuration/http/eventsConfigurationEntry/{entryId}/secretKey' | '/configuration/http/eventsConfigurationEntry/{entryId}/headers' | '/configuration/http/eventsConfigurationEntry/{entryId}/filter' | '/configuration/http/eventsConfigurationEntry/{entryId}/excludedFields' | '/configuration/http/eventsConfigurationEntry/{entryId}/name' | '/configuration/http/eventsConfigurationEntry/{entryId}/active';
|
|
1570
|
+
value?: SvixConfig | HttpConfig | string | boolean | Array<string> | EventsConfiguration | EventConfiguration;
|
|
1525
1571
|
};
|
|
1526
1572
|
type ConfigurationGet = {
|
|
1527
1573
|
/**
|
|
@@ -1538,7 +1584,11 @@ type ConfigurationGet = {
|
|
|
1538
1584
|
headers?: HttpHeadersConfig;
|
|
1539
1585
|
eventsConfiguration?: Array<{
|
|
1540
1586
|
/**
|
|
1541
|
-
*
|
|
1587
|
+
* Stable server-generated identifier of this event configuration entry.
|
|
1588
|
+
*/
|
|
1589
|
+
id?: string;
|
|
1590
|
+
/**
|
|
1591
|
+
* Type of the event. Multiple entries may share the same `eventType`.
|
|
1542
1592
|
*/
|
|
1543
1593
|
eventType?: string;
|
|
1544
1594
|
/**
|
|
@@ -1553,6 +1603,18 @@ type ConfigurationGet = {
|
|
|
1553
1603
|
* List of key-value pairs which can decorate outgoing HTTP POST request as headers.
|
|
1554
1604
|
*/
|
|
1555
1605
|
headers?: HttpHeadersConfig;
|
|
1606
|
+
/**
|
|
1607
|
+
* Optional Jayway JsonPath predicate. When omitted, the entry matches every event of the given `eventType`.
|
|
1608
|
+
*/
|
|
1609
|
+
filter?: string;
|
|
1610
|
+
/**
|
|
1611
|
+
* Per-entry field exclusion list. Omitted or `null` means inherit the event-subscription exclusions. An empty array `[]` overrides with no exclusions for this target.
|
|
1612
|
+
*/
|
|
1613
|
+
excludedFields?: Array<string>;
|
|
1614
|
+
/**
|
|
1615
|
+
* Per-endpoint activation switch. Always returned as an explicit boolean; entries created before the flag existed report `true`. When `false`, events for this endpoint are dropped without filter evaluation, delivery, or retries.
|
|
1616
|
+
*/
|
|
1617
|
+
active?: boolean;
|
|
1556
1618
|
}>;
|
|
1557
1619
|
};
|
|
1558
1620
|
/**
|
|
@@ -1823,7 +1885,7 @@ type IdResponse$1 = {
|
|
|
1823
1885
|
/**
|
|
1824
1886
|
* Type which the schema should be assigned to. Can be one of the predefined values or any custom schema type id.
|
|
1825
1887
|
*/
|
|
1826
|
-
type SchemaType = 'CART' | 'CART_ITEM' | 'CATEGORY' | 'COMPANY' | 'COUPON' | 'CUSTOMER' | 'CUSTOMER_ADDRESS' | 'ORDER' | 'ORDER_ENTRY' | 'PRODUCT' | 'QUOTE' | 'RETURN' | 'PRICE_LIST' | 'SITE' | 'CUSTOM_ENTITY' | 'VENDOR' | 'MEDIA';
|
|
1888
|
+
type SchemaType = 'AVAILABILITY' | 'CART' | 'CART_ITEM' | 'CATEGORY' | 'COMPANY' | 'COUPON' | 'CUSTOMER' | 'CUSTOMER_ADDRESS' | 'LOCATION' | 'ORDER' | 'ORDER_ENTRY' | 'PRODUCT' | 'QUOTE' | 'RETURN' | 'PRICE_LIST' | 'SITE' | 'CUSTOM_ENTITY' | 'VENDOR' | 'MEDIA';
|
|
1827
1889
|
/**
|
|
1828
1890
|
* Type of the attribute.
|
|
1829
1891
|
*
|