@revenexx/node 0.1.0 → 0.1.1
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/README.md +3 -0
- package/dist/client.d.mts +25 -0
- package/dist/client.d.ts +25 -0
- package/dist/client.js +39 -18
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +35 -14
- package/dist/client.mjs.map +1 -1
- package/dist/enums/approval-rule-approver-type.d.mts +7 -0
- package/dist/enums/approval-rule-approver-type.d.ts +7 -0
- package/dist/enums/approval-rule-approver-type.js +12 -0
- package/dist/enums/approval-rule-approver-type.js.map +1 -0
- package/dist/enums/approval-rule-approver-type.mjs +11 -0
- package/dist/enums/approval-rule-approver-type.mjs.map +1 -0
- package/dist/enums/approval-rule-condition.d.mts +10 -0
- package/dist/enums/approval-rule-condition.d.ts +10 -0
- package/dist/enums/approval-rule-condition.js +15 -0
- package/dist/enums/approval-rule-condition.js.map +1 -0
- package/dist/enums/approval-rule-condition.mjs +14 -0
- package/dist/enums/approval-rule-condition.mjs.map +1 -0
- package/dist/enums/approval-rule-create-request-approver-type.d.mts +7 -0
- package/dist/enums/approval-rule-create-request-approver-type.d.ts +7 -0
- package/dist/enums/approval-rule-create-request-approver-type.js +12 -0
- package/dist/enums/approval-rule-create-request-approver-type.js.map +1 -0
- package/dist/enums/approval-rule-create-request-approver-type.mjs +11 -0
- package/dist/enums/approval-rule-create-request-approver-type.mjs.map +1 -0
- package/dist/enums/approval-rule-create-request-condition.d.mts +10 -0
- package/dist/enums/approval-rule-create-request-condition.d.ts +10 -0
- package/dist/enums/approval-rule-create-request-condition.js +15 -0
- package/dist/enums/approval-rule-create-request-condition.js.map +1 -0
- package/dist/enums/approval-rule-create-request-condition.mjs +14 -0
- package/dist/enums/approval-rule-create-request-condition.mjs.map +1 -0
- package/dist/enums/approval-rule-create-request-effect.d.mts +7 -0
- package/dist/enums/approval-rule-create-request-effect.d.ts +7 -0
- package/dist/enums/approval-rule-create-request-effect.js +12 -0
- package/dist/enums/approval-rule-create-request-effect.js.map +1 -0
- package/dist/enums/approval-rule-create-request-effect.mjs +11 -0
- package/dist/enums/approval-rule-create-request-effect.mjs.map +1 -0
- package/dist/enums/approval-rule-effect.d.mts +7 -0
- package/dist/enums/approval-rule-effect.d.ts +7 -0
- package/dist/enums/approval-rule-effect.js +12 -0
- package/dist/enums/approval-rule-effect.js.map +1 -0
- package/dist/enums/approval-rule-effect.mjs +11 -0
- package/dist/enums/approval-rule-effect.mjs.map +1 -0
- package/dist/enums/approval-rule-update-request-approver-type.d.mts +7 -0
- package/dist/enums/approval-rule-update-request-approver-type.d.ts +7 -0
- package/dist/enums/approval-rule-update-request-approver-type.js +12 -0
- package/dist/enums/approval-rule-update-request-approver-type.js.map +1 -0
- package/dist/enums/approval-rule-update-request-approver-type.mjs +11 -0
- package/dist/enums/approval-rule-update-request-approver-type.mjs.map +1 -0
- package/dist/enums/approval-rule-update-request-condition.d.mts +10 -0
- package/dist/enums/approval-rule-update-request-condition.d.ts +10 -0
- package/dist/enums/approval-rule-update-request-condition.js +15 -0
- package/dist/enums/approval-rule-update-request-condition.js.map +1 -0
- package/dist/enums/approval-rule-update-request-condition.mjs +14 -0
- package/dist/enums/approval-rule-update-request-condition.mjs.map +1 -0
- package/dist/enums/approval-rule-update-request-effect.d.mts +7 -0
- package/dist/enums/approval-rule-update-request-effect.d.ts +7 -0
- package/dist/enums/approval-rule-update-request-effect.js +12 -0
- package/dist/enums/approval-rule-update-request-effect.js.map +1 -0
- package/dist/enums/approval-rule-update-request-effect.mjs +11 -0
- package/dist/enums/approval-rule-update-request-effect.mjs.map +1 -0
- package/dist/enums/approver-type.d.mts +7 -0
- package/dist/enums/approver-type.d.ts +7 -0
- package/dist/enums/approver-type.js +12 -0
- package/dist/enums/approver-type.js.map +1 -0
- package/dist/enums/approver-type.mjs +11 -0
- package/dist/enums/approver-type.mjs.map +1 -0
- package/dist/enums/condition.d.mts +10 -0
- package/dist/enums/condition.d.ts +10 -0
- package/dist/enums/condition.js +15 -0
- package/dist/enums/condition.js.map +1 -0
- package/dist/enums/condition.mjs +14 -0
- package/dist/enums/condition.mjs.map +1 -0
- package/dist/enums/effect.d.mts +7 -0
- package/dist/enums/effect.d.ts +7 -0
- package/dist/enums/effect.js +12 -0
- package/dist/enums/effect.js.map +1 -0
- package/dist/enums/effect.mjs +11 -0
- package/dist/enums/effect.mjs.map +1 -0
- package/dist/enums/pending-approval-approver-type.d.mts +7 -0
- package/dist/enums/pending-approval-approver-type.d.ts +7 -0
- package/dist/enums/pending-approval-approver-type.js +12 -0
- package/dist/enums/pending-approval-approver-type.js.map +1 -0
- package/dist/enums/pending-approval-approver-type.mjs +11 -0
- package/dist/enums/pending-approval-approver-type.mjs.map +1 -0
- package/dist/enums/pending-approval-status.d.mts +7 -0
- package/dist/enums/pending-approval-status.d.ts +7 -0
- package/dist/enums/pending-approval-status.js +12 -0
- package/dist/enums/pending-approval-status.js.map +1 -0
- package/dist/enums/pending-approval-status.mjs +11 -0
- package/dist/enums/pending-approval-status.mjs.map +1 -0
- package/dist/enums/procurement-purchase-request-items-create-type.d.mts +7 -0
- package/dist/enums/procurement-purchase-request-items-create-type.d.ts +7 -0
- package/dist/enums/procurement-purchase-request-items-create-type.js +12 -0
- package/dist/enums/procurement-purchase-request-items-create-type.js.map +1 -0
- package/dist/enums/procurement-purchase-request-items-create-type.mjs +11 -0
- package/dist/enums/procurement-purchase-request-items-create-type.mjs.map +1 -0
- package/dist/enums/purchase-request-event-name.d.mts +12 -0
- package/dist/enums/purchase-request-event-name.d.ts +12 -0
- package/dist/enums/purchase-request-event-name.js +17 -0
- package/dist/enums/purchase-request-event-name.js.map +1 -0
- package/dist/enums/purchase-request-event-name.mjs +16 -0
- package/dist/enums/purchase-request-event-name.mjs.map +1 -0
- package/dist/enums/purchase-request-item-create-request-type.d.mts +7 -0
- package/dist/enums/purchase-request-item-create-request-type.d.ts +7 -0
- package/dist/enums/purchase-request-item-create-request-type.js +12 -0
- package/dist/enums/purchase-request-item-create-request-type.js.map +1 -0
- package/dist/enums/purchase-request-item-create-request-type.mjs +11 -0
- package/dist/enums/purchase-request-item-create-request-type.mjs.map +1 -0
- package/dist/enums/purchase-request-item-type.d.mts +7 -0
- package/dist/enums/purchase-request-item-type.d.ts +7 -0
- package/dist/enums/purchase-request-item-type.js +12 -0
- package/dist/enums/purchase-request-item-type.js.map +1 -0
- package/dist/enums/purchase-request-item-type.mjs +11 -0
- package/dist/enums/purchase-request-item-type.mjs.map +1 -0
- package/dist/enums/purchase-request-item-update-request-type.d.mts +7 -0
- package/dist/enums/purchase-request-item-update-request-type.d.ts +7 -0
- package/dist/enums/purchase-request-item-update-request-type.js +12 -0
- package/dist/enums/purchase-request-item-update-request-type.js.map +1 -0
- package/dist/enums/purchase-request-item-update-request-type.mjs +11 -0
- package/dist/enums/purchase-request-item-update-request-type.mjs.map +1 -0
- package/dist/enums/purchase-request-status.d.mts +9 -0
- package/dist/enums/purchase-request-status.d.ts +9 -0
- package/dist/enums/purchase-request-status.js +14 -0
- package/dist/enums/purchase-request-status.js.map +1 -0
- package/dist/enums/purchase-request-status.mjs +13 -0
- package/dist/enums/purchase-request-status.mjs.map +1 -0
- package/dist/enums/submit-item-type.d.mts +7 -0
- package/dist/enums/submit-item-type.d.ts +7 -0
- package/dist/enums/submit-item-type.js +12 -0
- package/dist/enums/submit-item-type.js.map +1 -0
- package/dist/enums/submit-item-type.mjs +11 -0
- package/dist/enums/submit-item-type.mjs.map +1 -0
- package/dist/enums/submit-result-outcome.d.mts +9 -0
- package/dist/enums/submit-result-outcome.d.ts +9 -0
- package/dist/enums/submit-result-outcome.js +14 -0
- package/dist/enums/submit-result-outcome.js.map +1 -0
- package/dist/enums/submit-result-outcome.mjs +13 -0
- package/dist/enums/submit-result-outcome.mjs.map +1 -0
- package/dist/index.d.mts +23 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +115 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -0
- package/dist/index.mjs.map +1 -1
- package/dist/inputFile.js +1 -2
- package/dist/inputFile.js.map +1 -1
- package/dist/inputFile.mjs +0 -1
- package/dist/inputFile.mjs.map +1 -1
- package/dist/models.d.mts +1027 -36
- package/dist/models.d.ts +1027 -36
- package/dist/operator.js +243 -204
- package/dist/operator.js.map +1 -1
- package/dist/operator.mjs +242 -203
- package/dist/operator.mjs.map +1 -1
- package/dist/permission.js +58 -48
- package/dist/permission.js.map +1 -1
- package/dist/permission.mjs +58 -48
- package/dist/permission.mjs.map +1 -1
- package/dist/query.js +525 -422
- package/dist/query.js.map +1 -1
- package/dist/query.mjs +524 -421
- package/dist/query.mjs.map +1 -1
- package/dist/services/apps.d.mts +18 -0
- package/dist/services/apps.d.ts +18 -0
- package/dist/services/avatars.d.mts +18 -0
- package/dist/services/avatars.d.ts +18 -0
- package/dist/services/carts-io.d.mts +46 -28
- package/dist/services/carts-io.d.ts +46 -28
- package/dist/services/carts-io.js.map +1 -1
- package/dist/services/carts-io.mjs.map +1 -1
- package/dist/services/carts-items.d.mts +42 -24
- package/dist/services/carts-items.d.ts +42 -24
- package/dist/services/carts-items.js.map +1 -1
- package/dist/services/carts-items.mjs.map +1 -1
- package/dist/services/carts.d.mts +70 -52
- package/dist/services/carts.d.ts +70 -52
- package/dist/services/carts.js.map +1 -1
- package/dist/services/carts.mjs.map +1 -1
- package/dist/services/channels.d.mts +64 -46
- package/dist/services/channels.d.ts +64 -46
- package/dist/services/channels.js +1 -1
- package/dist/services/channels.js.map +1 -1
- package/dist/services/channels.mjs +1 -1
- package/dist/services/channels.mjs.map +1 -1
- package/dist/services/cost-centers.d.mts +18 -0
- package/dist/services/cost-centers.d.ts +18 -0
- package/dist/services/customers-contacts.d.mts +62 -44
- package/dist/services/customers-contacts.d.ts +62 -44
- package/dist/services/customers-contacts.js.map +1 -1
- package/dist/services/customers-contacts.mjs.map +1 -1
- package/dist/services/customers-organizations.d.mts +58 -40
- package/dist/services/customers-organizations.d.ts +58 -40
- package/dist/services/customers-organizations.js.map +1 -1
- package/dist/services/customers-organizations.mjs.map +1 -1
- package/dist/services/customers-roles.d.mts +26 -8
- package/dist/services/customers-roles.d.ts +26 -8
- package/dist/services/customers-roles.js.map +1 -1
- package/dist/services/customers-roles.mjs.map +1 -1
- package/dist/services/customers-segments.d.mts +62 -44
- package/dist/services/customers-segments.d.ts +62 -44
- package/dist/services/customers-segments.js.map +1 -1
- package/dist/services/customers-segments.mjs.map +1 -1
- package/dist/services/customers-value-lists.d.mts +90 -72
- package/dist/services/customers-value-lists.d.ts +90 -72
- package/dist/services/customers-value-lists.js.map +1 -1
- package/dist/services/customers-value-lists.mjs.map +1 -1
- package/dist/services/customers.d.mts +78 -60
- package/dist/services/customers.d.ts +78 -60
- package/dist/services/customers.js.map +1 -1
- package/dist/services/customers.mjs.map +1 -1
- package/dist/services/events.d.mts +18 -0
- package/dist/services/events.d.ts +18 -0
- package/dist/services/forms.d.mts +66 -48
- package/dist/services/forms.d.ts +66 -48
- package/dist/services/forms.js.map +1 -1
- package/dist/services/forms.mjs.map +1 -1
- package/dist/services/health.d.mts +18 -0
- package/dist/services/health.d.ts +18 -0
- package/dist/services/inventories-locations.d.mts +38 -20
- package/dist/services/inventories-locations.d.ts +38 -20
- package/dist/services/inventories-locations.js.map +1 -1
- package/dist/services/inventories-locations.mjs.map +1 -1
- package/dist/services/inventories-reservations.d.mts +38 -20
- package/dist/services/inventories-reservations.d.ts +38 -20
- package/dist/services/inventories-reservations.js.map +1 -1
- package/dist/services/inventories-reservations.mjs.map +1 -1
- package/dist/services/inventories-stock.d.mts +70 -52
- package/dist/services/inventories-stock.d.ts +70 -52
- package/dist/services/inventories-stock.js.map +1 -1
- package/dist/services/inventories-stock.mjs.map +1 -1
- package/dist/services/io.d.mts +66 -48
- package/dist/services/io.d.ts +66 -48
- package/dist/services/io.js +2 -2
- package/dist/services/io.js.map +1 -1
- package/dist/services/io.mjs +2 -2
- package/dist/services/io.mjs.map +1 -1
- package/dist/services/locale.d.mts +18 -0
- package/dist/services/locale.d.ts +18 -0
- package/dist/services/markets.d.mts +122 -104
- package/dist/services/markets.d.ts +122 -104
- package/dist/services/markets.js.map +1 -1
- package/dist/services/markets.mjs.map +1 -1
- package/dist/services/messaging.d.mts +194 -176
- package/dist/services/messaging.d.ts +194 -176
- package/dist/services/messaging.js +3 -3
- package/dist/services/messaging.js.map +1 -1
- package/dist/services/messaging.mjs +3 -3
- package/dist/services/messaging.mjs.map +1 -1
- package/dist/services/orderlists.d.mts +96 -78
- package/dist/services/orderlists.d.ts +96 -78
- package/dist/services/orderlists.js +1 -1
- package/dist/services/orderlists.js.map +1 -1
- package/dist/services/orderlists.mjs +1 -1
- package/dist/services/orderlists.mjs.map +1 -1
- package/dist/services/orders.d.mts +114 -96
- package/dist/services/orders.d.ts +114 -96
- package/dist/services/orders.js.map +1 -1
- package/dist/services/orders.mjs.map +1 -1
- package/dist/services/pages-collaboration.d.mts +34 -16
- package/dist/services/pages-collaboration.d.ts +34 -16
- package/dist/services/pages-collaboration.js.map +1 -1
- package/dist/services/pages-collaboration.mjs.map +1 -1
- package/dist/services/pages-delivery.d.mts +26 -8
- package/dist/services/pages-delivery.d.ts +26 -8
- package/dist/services/pages-delivery.js.map +1 -1
- package/dist/services/pages-delivery.mjs.map +1 -1
- package/dist/services/pages-editor.d.mts +34 -16
- package/dist/services/pages-editor.d.ts +34 -16
- package/dist/services/pages-editor.js.map +1 -1
- package/dist/services/pages-editor.mjs.map +1 -1
- package/dist/services/pages.d.mts +82 -64
- package/dist/services/pages.d.ts +82 -64
- package/dist/services/pages.js.map +1 -1
- package/dist/services/pages.mjs.map +1 -1
- package/dist/services/payments-ledger.d.mts +54 -36
- package/dist/services/payments-ledger.d.ts +54 -36
- package/dist/services/payments-ledger.js.map +1 -1
- package/dist/services/payments-ledger.mjs.map +1 -1
- package/dist/services/payments-methods.d.mts +34 -16
- package/dist/services/payments-methods.d.ts +34 -16
- package/dist/services/payments-methods.js.map +1 -1
- package/dist/services/payments-methods.mjs.map +1 -1
- package/dist/services/payments-providers.d.mts +38 -20
- package/dist/services/payments-providers.d.ts +38 -20
- package/dist/services/payments-providers.js.map +1 -1
- package/dist/services/payments-providers.mjs.map +1 -1
- package/dist/services/prices.d.mts +86 -68
- package/dist/services/prices.d.ts +86 -68
- package/dist/services/prices.js.map +1 -1
- package/dist/services/prices.mjs.map +1 -1
- package/dist/services/procurement.d.mts +991 -0
- package/dist/services/procurement.d.ts +991 -0
- package/dist/services/procurement.js +1185 -0
- package/dist/services/procurement.js.map +1 -0
- package/dist/services/procurement.mjs +1184 -0
- package/dist/services/procurement.mjs.map +1 -0
- package/dist/services/products-assets.d.mts +34 -16
- package/dist/services/products-assets.d.ts +34 -16
- package/dist/services/products-assets.js.map +1 -1
- package/dist/services/products-assets.mjs.map +1 -1
- package/dist/services/products-categories.d.mts +66 -48
- package/dist/services/products-categories.d.ts +66 -48
- package/dist/services/products-categories.js.map +1 -1
- package/dist/services/products-categories.mjs.map +1 -1
- package/dist/services/products-data-model.d.mts +166 -148
- package/dist/services/products-data-model.d.ts +166 -148
- package/dist/services/products-data-model.js.map +1 -1
- package/dist/services/products-data-model.mjs.map +1 -1
- package/dist/services/products-references.d.mts +50 -32
- package/dist/services/products-references.d.ts +50 -32
- package/dist/services/products-references.js.map +1 -1
- package/dist/services/products-references.mjs.map +1 -1
- package/dist/services/products.d.mts +70 -52
- package/dist/services/products.d.ts +70 -52
- package/dist/services/products.js.map +1 -1
- package/dist/services/products.mjs.map +1 -1
- package/dist/services/search.d.mts +40 -22
- package/dist/services/search.d.ts +40 -22
- package/dist/services/search.js +1 -1
- package/dist/services/search.js.map +1 -1
- package/dist/services/search.mjs +1 -1
- package/dist/services/search.mjs.map +1 -1
- package/dist/services/settings.d.mts +18 -0
- package/dist/services/settings.d.ts +18 -0
- package/dist/services/shipping-carriers.d.mts +42 -24
- package/dist/services/shipping-carriers.d.ts +42 -24
- package/dist/services/shipping-carriers.js.map +1 -1
- package/dist/services/shipping-carriers.mjs.map +1 -1
- package/dist/services/shipping-methods.d.mts +70 -52
- package/dist/services/shipping-methods.d.ts +70 -52
- package/dist/services/shipping-methods.js.map +1 -1
- package/dist/services/shipping-methods.mjs.map +1 -1
- package/dist/services/shipping-value-lists.d.mts +62 -44
- package/dist/services/shipping-value-lists.d.ts +62 -44
- package/dist/services/shipping-value-lists.js.map +1 -1
- package/dist/services/shipping-value-lists.mjs.map +1 -1
- package/dist/services/sites.d.mts +18 -0
- package/dist/services/sites.d.ts +18 -0
- package/dist/services/storage.d.mts +18 -0
- package/dist/services/storage.d.ts +18 -0
- package/package.json +6 -3
|
@@ -8,6 +8,15 @@ import '../query.js';
|
|
|
8
8
|
import '../enums/address-type-row-tone.js';
|
|
9
9
|
import '../enums/address-type-row-create-request-tone.js';
|
|
10
10
|
import '../enums/address-type-row-update-request-tone.js';
|
|
11
|
+
import '../enums/approval-rule-approver-type.js';
|
|
12
|
+
import '../enums/approval-rule-condition.js';
|
|
13
|
+
import '../enums/approval-rule-effect.js';
|
|
14
|
+
import '../enums/approval-rule-create-request-approver-type.js';
|
|
15
|
+
import '../enums/approval-rule-create-request-condition.js';
|
|
16
|
+
import '../enums/approval-rule-create-request-effect.js';
|
|
17
|
+
import '../enums/approval-rule-update-request-approver-type.js';
|
|
18
|
+
import '../enums/approval-rule-update-request-condition.js';
|
|
19
|
+
import '../enums/approval-rule-update-request-effect.js';
|
|
11
20
|
import '../enums/assets-source.js';
|
|
12
21
|
import '../enums/attribute-value-bucket.js';
|
|
13
22
|
import '../enums/auth-mail-source.js';
|
|
@@ -118,6 +127,8 @@ import '../enums/payment-term-tone.js';
|
|
|
118
127
|
import '../enums/payment-term-create-request-tone.js';
|
|
119
128
|
import '../enums/payment-term-update-request-tone.js';
|
|
120
129
|
import '../enums/payment-vocabulary-tone.js';
|
|
130
|
+
import '../enums/pending-approval-approver-type.js';
|
|
131
|
+
import '../enums/pending-approval-status.js';
|
|
121
132
|
import '../enums/price-ending-rule.js';
|
|
122
133
|
import '../enums/price-entries-adjust-response-rounding.js';
|
|
123
134
|
import '../enums/price-entries-adjust-response-rounding-mode.js';
|
|
@@ -140,6 +151,11 @@ import '../enums/product-grid-column-source.js';
|
|
|
140
151
|
import '../enums/product-label-source.js';
|
|
141
152
|
import '../enums/product-label-attribute-source.js';
|
|
142
153
|
import '../enums/products-kind.js';
|
|
154
|
+
import '../enums/purchase-request-status.js';
|
|
155
|
+
import '../enums/purchase-request-event-name.js';
|
|
156
|
+
import '../enums/purchase-request-item-type.js';
|
|
157
|
+
import '../enums/purchase-request-item-create-request-type.js';
|
|
158
|
+
import '../enums/purchase-request-item-update-request-type.js';
|
|
143
159
|
import '../enums/reorder-point-source.js';
|
|
144
160
|
import '../enums/reservation-status.js';
|
|
145
161
|
import '../enums/price-on-request-reason.js';
|
|
@@ -177,6 +193,8 @@ import '../enums/shipping-weight-unit-row-tone.js';
|
|
|
177
193
|
import '../enums/shipping-weight-unit-update-request-tone.js';
|
|
178
194
|
import '../enums/stock-movement-type.js';
|
|
179
195
|
import '../enums/store-asset-request-visibility.js';
|
|
196
|
+
import '../enums/submit-item-type.js';
|
|
197
|
+
import '../enums/submit-result-outcome.js';
|
|
180
198
|
import '../enums/validation-failed-response-status.js';
|
|
181
199
|
import '../enums/vocabulary-default-tone.js';
|
|
182
200
|
import '../enums/vocabulary-source.js';
|
|
@@ -245,7 +263,7 @@ declare class Channels {
|
|
|
245
263
|
* @param {number} params.offset - Row offset for pagination (default 0).
|
|
246
264
|
* @param {string} params.order - Sort by one column: 'column' | 'column.asc' | 'column.desc'. A bare column sorts ascending. Anything else — or a column this entity does not have — is refused with 400.
|
|
247
265
|
* @throws {RevenexxException}
|
|
248
|
-
* @returns {Promise<
|
|
266
|
+
* @returns {Promise<{}>}
|
|
249
267
|
*/
|
|
250
268
|
channelsList(params?: {
|
|
251
269
|
id?: string;
|
|
@@ -262,7 +280,7 @@ declare class Channels {
|
|
|
262
280
|
limit?: number;
|
|
263
281
|
offset?: number;
|
|
264
282
|
order?: string;
|
|
265
|
-
}): Promise<
|
|
283
|
+
}): Promise<{}>;
|
|
266
284
|
/**
|
|
267
285
|
* The filters are what make this list usable: `?code=` turns a scope slug another app stored into the channel row that owns it, `?is_default=true` finds the fallback channel without resolving a context, and `?unassigned_visibility=assigned_only` finds the channels that closed their assortment. Every filter is an exact-column equality — there is no contains, prefix or range form — and the honoured set is exactly this entity's 11 columns, because the generic list mount matches any query key that names one. Each of them is declared as a query parameter with the column's own CHECK behind it, so the 11 that work are the 11 the document offers rather than a list a caller has to keep somewhere. An unknown column is dropped rather than refused, so `?stauts=active` returns the unfiltered page; `filter` echoes what was understood, which is the only way to catch that. Paging is `limit`/`offset` over whatever survived the filters, and `?order=` sorts by one column with an optional `.asc`/`.desc`; ask for no order and the page comes back in insertion order. `order` is the one input here that is refused rather than ignored — a malformed value, or one naming a column this entity does not have, is a 400 where the same mistake in a filter key passes silently.
|
|
268
286
|
*
|
|
@@ -281,10 +299,10 @@ declare class Channels {
|
|
|
281
299
|
* @param {number} offset - Row offset for pagination (default 0).
|
|
282
300
|
* @param {string} order - Sort by one column: 'column' | 'column.asc' | 'column.desc'. A bare column sorts ascending. Anything else — or a column this entity does not have — is refused with 400.
|
|
283
301
|
* @throws {RevenexxException}
|
|
284
|
-
* @returns {Promise<
|
|
302
|
+
* @returns {Promise<{}>}
|
|
285
303
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
286
304
|
*/
|
|
287
|
-
channelsList(id?: string, code?: string, name?: string, labels?: string, type?: string, status?: ChannelStatus, unassignedVisibility?: ChannelUnassignedVisibility, isDefault?: boolean, position?: number, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string): Promise<
|
|
305
|
+
channelsList(id?: string, code?: string, name?: string, labels?: string, type?: string, status?: ChannelStatus, unassignedVisibility?: ChannelUnassignedVisibility, isDefault?: boolean, position?: number, createdAt?: string, updatedAt?: string, limit?: number, offset?: number, order?: string): Promise<{}>;
|
|
288
306
|
/**
|
|
289
307
|
* Two fields are yours and everything else has an answer already: `code` and `name` are the only columns the database will not fill in, and the rest arrive from their defaults — `status` active, `unassigned_visibility` inherit, `is_default` false, `position` 0. `type` is the exception the app makes for itself: omitted, it becomes the type the tenant FLAGGED as their default rather than the column default, so a merchant who retired the seeded `storefront` does not get channels carrying a type they no longer keep. `code` is the load-bearing one. It is the scope slug Baseline matches every channel assignment on, which is why it is held to Baseline's own shape here rather than to the column's `length > 0`, and why it is unique per tenant — a second channel claiming a code another already holds is a 409 off the `(tenant_id, code)` index. Treat it as permanent: the API will let you change it later and nothing follows it (see PUT /channels/{id}). Creating a channel assigns nothing to it. Products, categories and everything else scopeable stay exactly as visible as they were — until rows are assigned, what this channel shows is whatever `unassigned_channel_visibility` says, which on the shipped default is the entire catalogue. And a code is only free in THIS app: assignments made against a code that a since-deleted channel used are still in Baseline, so re-using the code adopts them.
|
|
290
308
|
*
|
|
@@ -297,7 +315,7 @@ declare class Channels {
|
|
|
297
315
|
* @param {string} params.type - Which channel type this is. One of the codes the tenant keeps under GET /channels/types — served with labels as the 'channels.types' vocabulary. Deliberately NOT an enum: the set is the tenant's own rows, not a CHECK constraint this repo could quote. A fresh install starts with storefront, punchout, marketplace, api, pos, which is why 'storefront' is the example here, but a merchant may rename or retire any of them and add their own (a feed or a print channel), so read the list rather than assuming it. Omitted on create it falls back to the type the tenant flagged as their default, never to a hardcoded value; a code the tenant does not keep is a 400 that names the ones they do.
|
|
298
316
|
* @param {ChannelUnassignedVisibility} params.unassignedVisibility - Default 'inherit'. What it means, IN THIS CHANNEL, that a row carries no channel assignment at all — the per-channel override of the tenant-wide unassigned_channel_visibility setting. 'inherit' (the default) takes the tenant's answer and changes nothing. 'all' shows unassigned rows: everything is on sale unless somebody carved it out, which is what an open storefront wants and what Baseline's is_visible() does today. 'assigned_only' hides them until they are explicitly assigned — the negotiated assortment a punchout contract describes, and the one answer the generated _scoped view has no way to express, which is why POST /channels/visibility exists to apply it. Rows that DO carry assignments are unaffected either way. Served with its labels as the 'channels.unassigned-visibility' vocabulary.
|
|
299
317
|
* @throws {RevenexxException}
|
|
300
|
-
* @returns {Promise<Models.
|
|
318
|
+
* @returns {Promise<Models.Channel>}
|
|
301
319
|
*/
|
|
302
320
|
channelsCreate(params: {
|
|
303
321
|
code: string;
|
|
@@ -308,7 +326,7 @@ declare class Channels {
|
|
|
308
326
|
status?: ChannelStatus;
|
|
309
327
|
type?: string;
|
|
310
328
|
unassignedVisibility?: ChannelUnassignedVisibility;
|
|
311
|
-
}): Promise<Models.
|
|
329
|
+
}): Promise<Models.Channel>;
|
|
312
330
|
/**
|
|
313
331
|
* Two fields are yours and everything else has an answer already: `code` and `name` are the only columns the database will not fill in, and the rest arrive from their defaults — `status` active, `unassigned_visibility` inherit, `is_default` false, `position` 0. `type` is the exception the app makes for itself: omitted, it becomes the type the tenant FLAGGED as their default rather than the column default, so a merchant who retired the seeded `storefront` does not get channels carrying a type they no longer keep. `code` is the load-bearing one. It is the scope slug Baseline matches every channel assignment on, which is why it is held to Baseline's own shape here rather than to the column's `length > 0`, and why it is unique per tenant — a second channel claiming a code another already holds is a 409 off the `(tenant_id, code)` index. Treat it as permanent: the API will let you change it later and nothing follows it (see PUT /channels/{id}). Creating a channel assigns nothing to it. Products, categories and everything else scopeable stay exactly as visible as they were — until rows are assigned, what this channel shows is whatever `unassigned_channel_visibility` says, which on the shipped default is the entire catalogue. And a code is only free in THIS app: assignments made against a code that a since-deleted channel used are still in Baseline, so re-using the code adopts them.
|
|
314
332
|
*
|
|
@@ -321,10 +339,10 @@ declare class Channels {
|
|
|
321
339
|
* @param {string} type - Which channel type this is. One of the codes the tenant keeps under GET /channels/types — served with labels as the 'channels.types' vocabulary. Deliberately NOT an enum: the set is the tenant's own rows, not a CHECK constraint this repo could quote. A fresh install starts with storefront, punchout, marketplace, api, pos, which is why 'storefront' is the example here, but a merchant may rename or retire any of them and add their own (a feed or a print channel), so read the list rather than assuming it. Omitted on create it falls back to the type the tenant flagged as their default, never to a hardcoded value; a code the tenant does not keep is a 400 that names the ones they do.
|
|
322
340
|
* @param {ChannelUnassignedVisibility} unassignedVisibility - Default 'inherit'. What it means, IN THIS CHANNEL, that a row carries no channel assignment at all — the per-channel override of the tenant-wide unassigned_channel_visibility setting. 'inherit' (the default) takes the tenant's answer and changes nothing. 'all' shows unassigned rows: everything is on sale unless somebody carved it out, which is what an open storefront wants and what Baseline's is_visible() does today. 'assigned_only' hides them until they are explicitly assigned — the negotiated assortment a punchout contract describes, and the one answer the generated _scoped view has no way to express, which is why POST /channels/visibility exists to apply it. Rows that DO carry assignments are unaffected either way. Served with its labels as the 'channels.unassigned-visibility' vocabulary.
|
|
323
341
|
* @throws {RevenexxException}
|
|
324
|
-
* @returns {Promise<Models.
|
|
342
|
+
* @returns {Promise<Models.Channel>}
|
|
325
343
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
326
344
|
*/
|
|
327
|
-
channelsCreate(code: string, name: string, isDefault?: boolean, labels?: object, position?: number, status?: ChannelStatus, type?: string, unassignedVisibility?: ChannelUnassignedVisibility): Promise<Models.
|
|
345
|
+
channelsCreate(code: string, name: string, isDefault?: boolean, labels?: object, position?: number, status?: ChannelStatus, type?: string, unassignedVisibility?: ChannelUnassignedVisibility): Promise<Models.Channel>;
|
|
328
346
|
/**
|
|
329
347
|
* The storefront/punchout bootstrap: one call tells a shop front, a punchout front-end or a feed builder which channel it is in and what an unassigned row means there, so it can apply the policy itself instead of hardcoding one. Resolution order is body/query, then the x-revenexx-channel header, then the scope_context.channel claim, then the channel flagged is_default — header before claim, the same order baseline.is_visible() uses. Through api.revenexx.com the header step is inert (the gateway does not forward it), so in practice it is `?channel=`, then the claim, then the default. Never errors on an unknown or inactive channel: it answers resolved:false with a reason, so a caller can tell "no such channel" from "the service is down". That is why this operation declares no 4xx of its own — a tenant with no channels at all answers 200 with reason no_default_channel. Two things come back, not one: the channel that was resolved, and the visibility policy in force for it — the tenant-wide unassigned_channel_visibility answer, or the channel's own override where it has one. The policy travels with the channel because a caller that has one and not the other still cannot render anything: knowing you are in the punchout channel says nothing about whether an unassigned product belongs in its catalogue. With both, a client reproduces the decision itself and calls POST /channels/visibility only when it wants the app to decide row by row.
|
|
330
348
|
*
|
|
@@ -348,9 +366,9 @@ declare class Channels {
|
|
|
348
366
|
* The repair call. A tenant installed before `channel_types` existed, or one that deleted its way into a state where nothing works, gets the shipped starting point back — the 5 seeded types first, because the seeded channel carries one of them, then the `shop` channel. Most tenants never call it: the platform invokes the same routine itself on `app.installed`, so a fresh install already has its 5 types and its shop channel before anyone asks, and this route exists for the tenant whose install predates them or who has since removed them. Calling it on a settled tenant is safe and cheap for the same reason it is safe to fire on every install: it is idempotent, keyed on the code, so a second call writes nothing. Everything a merchant added themselves is left alone, and a row that already exists is reported under `existing` rather than rewritten — the values you edited on a seeded type survive this call. It RESTORES THE WHOLE SEED SET, including a seeded type the merchant deliberately deleted. Idempotency here is keyed on the code and nothing else, and there is nowhere to remember a retirement: retirement is not a state this app can represent. Retiring a type IS deleting the row; `channel_types` has no retired flag and these tables carry no foreign keys, so nothing anywhere distinguishes a code a merchant removed on purpose from one they never had. Honouring the retirement would mean inventing a tombstone rather than reading one. Given that, restoring all 5 is the better half of the trade: this is the call a tenant makes when something is missing, and a repair that silently skips part of what it repairs, with no way to ask for the rest, is worse than one that says plainly what it puts back. It is also never a surprise. The only automatic seeding elsewhere in the app fires when the type table is completely EMPTY, which cannot happen once installed because the last remaining type cannot be deleted — so a retired type comes back exactly when somebody calls this route or the app is installed again, and never as a side effect of an unrelated read. Deleting it a second time costs one DELETE, and is refused only if a channel has since started carrying it. What it does not do: it creates no assignments, it does not repair a channel whose own code you deleted (only `shop` comes back), and it does not restore the seeded VALUES of a type that still exists — a renamed `storefront` stays renamed.
|
|
349
367
|
*
|
|
350
368
|
* @throws {RevenexxException}
|
|
351
|
-
* @returns {Promise<Models.
|
|
369
|
+
* @returns {Promise<Models.ChannelDefaults>}
|
|
352
370
|
*/
|
|
353
|
-
channelsDefaults(): Promise<Models.
|
|
371
|
+
channelsDefaults(): Promise<Models.ChannelDefaults>;
|
|
354
372
|
/**
|
|
355
373
|
* What a channel may BE. This used to be a CHECK constraint over five values, which meant the merchant who runs a feed channel or a print channel needed a release of this app to say so — and nothing in the app ever branched on the value, only on membership. The set is the tenant's rows now. Seeds itself on first read, so the list is never empty and a channel can always carry a type. Rows come back in `position` order, always: this route is not the generic list mount and takes no `order` — `limit` and `offset` are the whole of its query, and it takes no filters, so a caller looking for one code reads the list and matches. The set is bounded: a tenant keeps at most 200 types, which is the size this app can check a channel's type against in one query, and POST /channels/types refuses the 201st rather than build a set it could not read back. `page.total` counts the rows that exist, not the ones this answer carries, and the order is total — `position` then `code`, because `position` is not unique and an order that leaves rows tied is one the database is free to answer differently on the next page, which is how a walk serves a row twice and skips another.
|
|
356
374
|
*
|
|
@@ -385,7 +403,7 @@ declare class Channels {
|
|
|
385
403
|
* @param {number} params.position - Sort position (default 0). GET /channels/types answers in this order; ties fall back to the code.
|
|
386
404
|
* @param {ChannelTypeTone} params.tone - Badge colour (default 'neutral'). A value outside the palette is ignored rather than refused.
|
|
387
405
|
* @throws {RevenexxException}
|
|
388
|
-
* @returns {Promise<Models.
|
|
406
|
+
* @returns {Promise<Models.ChannelTypeRow>}
|
|
389
407
|
*/
|
|
390
408
|
channelsTypesCreate(params: {
|
|
391
409
|
code: string;
|
|
@@ -396,7 +414,7 @@ declare class Channels {
|
|
|
396
414
|
labels?: object;
|
|
397
415
|
position?: number;
|
|
398
416
|
tone?: ChannelTypeTone;
|
|
399
|
-
}): Promise<Models.
|
|
417
|
+
}): Promise<Models.ChannelTypeRow>;
|
|
400
418
|
/**
|
|
401
419
|
* What lets a merchant name a kind of channel this app never thought of — a feed, a print catalogue, a kiosk — without waiting for a release. `code` and `title` are the only two the database will not fill in; everything else has a default. The code is trimmed and lowercased and becomes exactly what `channels.type` stores, and it is fixed from then on, because there is no foreign key behind that column to carry a rename: every channel holding the old string would be left pointing at nothing. The title is the part a merchant renames later. A duplicate code is a 409, and it is worth knowing that the collision is wider than this tenant — `channel_types.code` is unique on the column alone, so a code held by another tenant collides too and the read this route does before inserting cannot see it. A tenant keeps at most 200 types; the 201st is a 409 `type_limit_reached` rather than a row the app would then be unable to read back. Creating a type changes nothing about existing channels: it is a name that becomes available, not one that gets applied. Adding a type does not make it the default either — pass `is_default: true` for that, which demotes the current holder.
|
|
402
420
|
*
|
|
@@ -409,48 +427,48 @@ declare class Channels {
|
|
|
409
427
|
* @param {number} position - Sort position (default 0). GET /channels/types answers in this order; ties fall back to the code.
|
|
410
428
|
* @param {ChannelTypeTone} tone - Badge colour (default 'neutral'). A value outside the palette is ignored rather than refused.
|
|
411
429
|
* @throws {RevenexxException}
|
|
412
|
-
* @returns {Promise<Models.
|
|
430
|
+
* @returns {Promise<Models.ChannelTypeRow>}
|
|
413
431
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
414
432
|
*/
|
|
415
|
-
channelsTypesCreate(code: string, title: string, description?: string, descriptions?: object, isDefault?: boolean, labels?: object, position?: number, tone?: ChannelTypeTone): Promise<Models.
|
|
433
|
+
channelsTypesCreate(code: string, title: string, description?: string, descriptions?: object, isDefault?: boolean, labels?: object, position?: number, tone?: ChannelTypeTone): Promise<Models.ChannelTypeRow>;
|
|
416
434
|
/**
|
|
417
435
|
* Retiring a type IS deleting the row — there is no retired flag on `channel_types` — which is why the two things that would make a deletion destructive are refused instead of allowed: a type at least one channel still carries is a 409, and so is the last remaining type. There is no foreign key behind `channels.type`, so those two checks are not a convenience on top of the database, they ARE the integrity. Move the channels to another type first and the delete goes through. Nothing else goes with it. A type has no dependents once no channel names it: no rows in this app point at it and none in Baseline do either, since assignments are made against a channel `code`, never a type. Deleting the type the tenant had flagged as default is allowed, and the flag is handed to the next type by position rather than left unheld, so a channel created afterwards still has something to fall back to. Because the guard is a read followed by a write with no transaction between them, and no constraint underneath it, a channel created against this type in the same instant can survive it. Worth knowing what that leaves, since it is not what "orphaned" usually means: the channel keeps working. `channels.type` is a stored string that nothing joins on, so the channel still reads, still filters under `?type=` by that same string, and still resolves in /channels/context and POST /channels/visibility — neither of which consults `type` at all. What it loses is its label, because the types vocabulary is built from the rows and there is no longer one to render a badge from. An update that does not mention `type` leaves the value alone; naming it is refused, which is how the channel is moved to a type that exists. One thing the deletion frees is wider than the tenant: `channel_types.code` is unique on the column alone, so the code becomes available platform-wide, not just here. And the seed does not know the row is gone — POST /channels/defaults and a re-install both put a deleted SEEDED type back, by design; see that operation.
|
|
418
436
|
*
|
|
419
437
|
* @param {string} params.id - The channel type, by id. This is the uuid, not the type `code`.
|
|
420
438
|
* @throws {RevenexxException}
|
|
421
|
-
* @returns {Promise<
|
|
439
|
+
* @returns {Promise<{}>}
|
|
422
440
|
*/
|
|
423
441
|
channelsTypesDelete(params: {
|
|
424
442
|
id: string;
|
|
425
|
-
}): Promise<
|
|
443
|
+
}): Promise<{}>;
|
|
426
444
|
/**
|
|
427
445
|
* Retiring a type IS deleting the row — there is no retired flag on `channel_types` — which is why the two things that would make a deletion destructive are refused instead of allowed: a type at least one channel still carries is a 409, and so is the last remaining type. There is no foreign key behind `channels.type`, so those two checks are not a convenience on top of the database, they ARE the integrity. Move the channels to another type first and the delete goes through. Nothing else goes with it. A type has no dependents once no channel names it: no rows in this app point at it and none in Baseline do either, since assignments are made against a channel `code`, never a type. Deleting the type the tenant had flagged as default is allowed, and the flag is handed to the next type by position rather than left unheld, so a channel created afterwards still has something to fall back to. Because the guard is a read followed by a write with no transaction between them, and no constraint underneath it, a channel created against this type in the same instant can survive it. Worth knowing what that leaves, since it is not what "orphaned" usually means: the channel keeps working. `channels.type` is a stored string that nothing joins on, so the channel still reads, still filters under `?type=` by that same string, and still resolves in /channels/context and POST /channels/visibility — neither of which consults `type` at all. What it loses is its label, because the types vocabulary is built from the rows and there is no longer one to render a badge from. An update that does not mention `type` leaves the value alone; naming it is refused, which is how the channel is moved to a type that exists. One thing the deletion frees is wider than the tenant: `channel_types.code` is unique on the column alone, so the code becomes available platform-wide, not just here. And the seed does not know the row is gone — POST /channels/defaults and a re-install both put a deleted SEEDED type back, by design; see that operation.
|
|
428
446
|
*
|
|
429
447
|
* @param {string} id - The channel type, by id. This is the uuid, not the type `code`.
|
|
430
448
|
* @throws {RevenexxException}
|
|
431
|
-
* @returns {Promise<
|
|
449
|
+
* @returns {Promise<{}>}
|
|
432
450
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
433
451
|
*/
|
|
434
|
-
channelsTypesDelete(id: string): Promise<
|
|
452
|
+
channelsTypesDelete(id: string): Promise<{}>;
|
|
435
453
|
/**
|
|
436
454
|
* One type row, by its uuid — the handle PUT and DELETE take, and the reason to hold on to what the list gave you. It is NOT the `code`: the code is what `channels.type` stores, and this route will not look one up. Neither will the list, which takes no filters at all, so a caller holding only a code pages `GET /channels/types` and matches client-side. Since the whole set is bounded and small that is one call, not a search. Unlike the list, this route does not seed. The list is hand-written so that a tenant whose table is still empty is given the 5 shipped types instead of being told they have none; this is the generic item route, so on that same tenant it answers 404 for every id — which is the correct answer, since there is genuinely no such row yet. Read the list first. Nothing here is cached: the type list changes when a merchant edits it and this route always reflects that. Rows seeded before 0.7.0 may hold a serialized locale map in `title` or `description` rather than plain text (PE-452); `labels` and `descriptions` are the columns that carry the per-locale copy now.
|
|
437
455
|
*
|
|
438
456
|
* @param {string} params.id - The channel type, by id. This is the uuid, not the type `code`.
|
|
439
457
|
* @throws {RevenexxException}
|
|
440
|
-
* @returns {Promise<Models.
|
|
458
|
+
* @returns {Promise<Models.ChannelTypeRow>}
|
|
441
459
|
*/
|
|
442
460
|
channelsTypesGet(params: {
|
|
443
461
|
id: string;
|
|
444
|
-
}): Promise<Models.
|
|
462
|
+
}): Promise<Models.ChannelTypeRow>;
|
|
445
463
|
/**
|
|
446
464
|
* One type row, by its uuid — the handle PUT and DELETE take, and the reason to hold on to what the list gave you. It is NOT the `code`: the code is what `channels.type` stores, and this route will not look one up. Neither will the list, which takes no filters at all, so a caller holding only a code pages `GET /channels/types` and matches client-side. Since the whole set is bounded and small that is one call, not a search. Unlike the list, this route does not seed. The list is hand-written so that a tenant whose table is still empty is given the 5 shipped types instead of being told they have none; this is the generic item route, so on that same tenant it answers 404 for every id — which is the correct answer, since there is genuinely no such row yet. Read the list first. Nothing here is cached: the type list changes when a merchant edits it and this route always reflects that. Rows seeded before 0.7.0 may hold a serialized locale map in `title` or `description` rather than plain text (PE-452); `labels` and `descriptions` are the columns that carry the per-locale copy now.
|
|
447
465
|
*
|
|
448
466
|
* @param {string} id - The channel type, by id. This is the uuid, not the type `code`.
|
|
449
467
|
* @throws {RevenexxException}
|
|
450
|
-
* @returns {Promise<Models.
|
|
468
|
+
* @returns {Promise<Models.ChannelTypeRow>}
|
|
451
469
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
452
470
|
*/
|
|
453
|
-
channelsTypesGet(id: string): Promise<Models.
|
|
471
|
+
channelsTypesGet(id: string): Promise<Models.ChannelTypeRow>;
|
|
454
472
|
/**
|
|
455
473
|
* Everything but the code. This is where a merchant renames a seeded type into their own words, gives it its German, moves it in the list a person picks from, or hands it the default flag. Seeded types are as editable as ones the merchant added — `is_system` records where a row came from and grants it nothing. Sending a different `code` is a 400 rather than a silent no-op: it is what `channels.type` stores, there is no foreign key behind that column to carry the change — the database has none at all on these tables — and a rename would therefore move nothing. Every channel holding the old string would keep holding it, still working but with no type row to draw its name from. This refusal is the whole of the protection; to move channels to a new code, create the type and update the channels, in that order. Two fields are quietly forgiving rather than strict — a blank `title` and a `tone` outside the palette are both ignored and the stored value kept, so a client that sends a half-filled form does not clear what is there. `is_default` is one-way: true promotes this type and demotes the previous holder, false does nothing at all, because some type has to be the one a channel created without one gets.
|
|
456
474
|
*
|
|
@@ -463,7 +481,7 @@ declare class Channels {
|
|
|
463
481
|
* @param {string} params.title - Rename the type. A blank or non-string title is ignored, not refused — the stored one is kept.
|
|
464
482
|
* @param {ChannelTypeTone} params.tone - Change the badge colour. A value outside the palette is ignored rather than refused, and the stored tone is kept.
|
|
465
483
|
* @throws {RevenexxException}
|
|
466
|
-
* @returns {Promise<Models.
|
|
484
|
+
* @returns {Promise<Models.ChannelTypeRow>}
|
|
467
485
|
*/
|
|
468
486
|
channelsTypesUpdate(params: {
|
|
469
487
|
id: string;
|
|
@@ -474,7 +492,7 @@ declare class Channels {
|
|
|
474
492
|
position?: number;
|
|
475
493
|
title?: string;
|
|
476
494
|
tone?: ChannelTypeTone;
|
|
477
|
-
}): Promise<Models.
|
|
495
|
+
}): Promise<Models.ChannelTypeRow>;
|
|
478
496
|
/**
|
|
479
497
|
* Everything but the code. This is where a merchant renames a seeded type into their own words, gives it its German, moves it in the list a person picks from, or hands it the default flag. Seeded types are as editable as ones the merchant added — `is_system` records where a row came from and grants it nothing. Sending a different `code` is a 400 rather than a silent no-op: it is what `channels.type` stores, there is no foreign key behind that column to carry the change — the database has none at all on these tables — and a rename would therefore move nothing. Every channel holding the old string would keep holding it, still working but with no type row to draw its name from. This refusal is the whole of the protection; to move channels to a new code, create the type and update the channels, in that order. Two fields are quietly forgiving rather than strict — a blank `title` and a `tone` outside the palette are both ignored and the stored value kept, so a client that sends a half-filled form does not clear what is there. `is_default` is one-way: true promotes this type and demotes the previous holder, false does nothing at all, because some type has to be the one a channel created without one gets.
|
|
480
498
|
*
|
|
@@ -487,10 +505,10 @@ declare class Channels {
|
|
|
487
505
|
* @param {string} title - Rename the type. A blank or non-string title is ignored, not refused — the stored one is kept.
|
|
488
506
|
* @param {ChannelTypeTone} tone - Change the badge colour. A value outside the palette is ignored rather than refused, and the stored tone is kept.
|
|
489
507
|
* @throws {RevenexxException}
|
|
490
|
-
* @returns {Promise<Models.
|
|
508
|
+
* @returns {Promise<Models.ChannelTypeRow>}
|
|
491
509
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
492
510
|
*/
|
|
493
|
-
channelsTypesUpdate(id: string, description?: string, descriptions?: object, isDefault?: boolean, labels?: object, position?: number, title?: string, tone?: ChannelTypeTone): Promise<Models.
|
|
511
|
+
channelsTypesUpdate(id: string, description?: string, descriptions?: object, isDefault?: boolean, labels?: object, position?: number, title?: string, tone?: ChannelTypeTone): Promise<Models.ChannelTypeRow>;
|
|
494
512
|
/**
|
|
495
513
|
* The gate. A row WITH channel assignments is decided exactly as baseline.is_visible() decides it — visible iff the active channel is among them. A row WITHOUT assignments is the case unassigned_channel_visibility owns: 'all' shows it (Baseline's open-by-default, unchanged) and 'assigned_only' hides it, which the generated _scoped view has no way to express. A channel may override the tenant answer for itself, so the shop can stay open while a punchout channel serves only its negotiated assortment.
|
|
496
514
|
*
|
|
@@ -498,13 +516,13 @@ declare class Channels {
|
|
|
498
516
|
* @param {string} params.channel - Channel code to evaluate against, for a caller that would rather not touch the payload. The body field wins if both are sent; everything else about it is identical.
|
|
499
517
|
* @param {string} params.channelBody - The channel `code` (the scope slug) to evaluate against, trimmed and lowercased before it is matched. Optional, and through api.revenexx.com it is the ONLY way to name a channel explicitly: the x-revenexx-channel header is not forwarded to the app, so without this the resolution falls through to the scope_context.channel claim and then to the tenant's default channel. A code no channel carries is not an error — the answer is resolved:false with reason 'unknown_channel', so a caller can tell it from an outage.
|
|
500
518
|
* @throws {RevenexxException}
|
|
501
|
-
* @returns {Promise<Models.
|
|
519
|
+
* @returns {Promise<Models.ChannelVisibility>}
|
|
502
520
|
*/
|
|
503
521
|
channelsVisibility(params: {
|
|
504
522
|
items: Models.ChannelVisibilityItem[];
|
|
505
523
|
channel?: string;
|
|
506
524
|
channelBody?: string;
|
|
507
|
-
}): Promise<Models.
|
|
525
|
+
}): Promise<Models.ChannelVisibility>;
|
|
508
526
|
/**
|
|
509
527
|
* The gate. A row WITH channel assignments is decided exactly as baseline.is_visible() decides it — visible iff the active channel is among them. A row WITHOUT assignments is the case unassigned_channel_visibility owns: 'all' shows it (Baseline's open-by-default, unchanged) and 'assigned_only' hides it, which the generated _scoped view has no way to express. A channel may override the tenant answer for itself, so the shop can stay open while a punchout channel serves only its negotiated assortment.
|
|
510
528
|
*
|
|
@@ -512,10 +530,10 @@ declare class Channels {
|
|
|
512
530
|
* @param {string} channel - Channel code to evaluate against, for a caller that would rather not touch the payload. The body field wins if both are sent; everything else about it is identical.
|
|
513
531
|
* @param {string} channelBody - The channel `code` (the scope slug) to evaluate against, trimmed and lowercased before it is matched. Optional, and through api.revenexx.com it is the ONLY way to name a channel explicitly: the x-revenexx-channel header is not forwarded to the app, so without this the resolution falls through to the scope_context.channel claim and then to the tenant's default channel. A code no channel carries is not an error — the answer is resolved:false with reason 'unknown_channel', so a caller can tell it from an outage.
|
|
514
532
|
* @throws {RevenexxException}
|
|
515
|
-
* @returns {Promise<Models.
|
|
533
|
+
* @returns {Promise<Models.ChannelVisibility>}
|
|
516
534
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
517
535
|
*/
|
|
518
|
-
channelsVisibility(items: Models.ChannelVisibilityItem[], channel?: string, channelBody?: string): Promise<Models.
|
|
536
|
+
channelsVisibility(items: Models.ChannelVisibilityItem[], channel?: string, channelBody?: string): Promise<Models.ChannelVisibility>;
|
|
519
537
|
/**
|
|
520
538
|
* Discovery for the vocabulary routes: which enums this app publishes, not what is in them. An entry carries the name and the localised title and description a UI would put above a select, and stops there — the permitted values, their labels and their badge tones are the other route's answer. The split is deliberate. This index is a fixed, tiny answer a client can hold onto, while a vocabulary's contents are not fixed at all: `types` is backed by the tenant's own rows, so its values change whenever a merchant adds or retires one, and folding them in here would make every consumer re-fetch the whole set to learn a title. Names: statuses, types, unassigned-visibility. Fetch one with GET /channels/vocabularies/{name}; a client holding the qualified pair 'channels.<name>' builds that URL from the pair alone.
|
|
521
539
|
*
|
|
@@ -528,58 +546,58 @@ declare class Channels {
|
|
|
528
546
|
*
|
|
529
547
|
* @param {ChannelsVocabulariesGetName} params.name - The vocabulary name — the part after the dot in the qualified id.
|
|
530
548
|
* @throws {RevenexxException}
|
|
531
|
-
* @returns {Promise<Models.
|
|
549
|
+
* @returns {Promise<Models.ChannelVocabulary>}
|
|
532
550
|
*/
|
|
533
551
|
channelsVocabulariesGet(params: {
|
|
534
552
|
name: ChannelsVocabulariesGetName;
|
|
535
|
-
}): Promise<Models.
|
|
553
|
+
}): Promise<Models.ChannelVocabulary>;
|
|
536
554
|
/**
|
|
537
555
|
* One vocabulary with every permitted value in it, and a value here is more than the string the column stores: it arrives with the localised title and description a select puts in front of a person, and with a badge tone for rendering it as a status chip — `default_tone` is what a value carrying none falls back to, so there is always something to render. That is the whole reason this route exists rather than a client hardcoding the list. Two sources, one guarantee: what is served is what is in force, so no UI keeps a second copy. 'source' says which — 'schema' means the values are read out of the column's CHECK constraint (a value added to the constraint appears here even before anyone labels it, titled from its own key); 'table' means they are the tenant's own rows, which a merchant may add to, rename and retire without a release of this app. Values come back in author order, which is the order a select should offer. 'closed' says the set is exhaustive at this moment, so a value outside it is stale data rather than a missing label. Names: statuses, types, unassigned-visibility.
|
|
538
556
|
*
|
|
539
557
|
* @param {ChannelsVocabulariesGetName} name - The vocabulary name — the part after the dot in the qualified id.
|
|
540
558
|
* @throws {RevenexxException}
|
|
541
|
-
* @returns {Promise<Models.
|
|
559
|
+
* @returns {Promise<Models.ChannelVocabulary>}
|
|
542
560
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
543
561
|
*/
|
|
544
|
-
channelsVocabulariesGet(name: ChannelsVocabulariesGetName): Promise<Models.
|
|
562
|
+
channelsVocabulariesGet(name: ChannelsVocabulariesGetName): Promise<Models.ChannelVocabulary>;
|
|
545
563
|
/**
|
|
546
564
|
* Nothing cascades from here, and that is a statement about the schema rather than a reassurance: this app declares no foreign key in either direction, so there is nothing to cascade TO. The channel ASSIGNMENTS other apps hold live in Baseline, keyed by the scope slug, and deleting the channel does not remove them. A slug that no longer names a channel simply stops resolving. The consequence is that the assignments OUTLIVE the row. Create a channel again under a code a deleted one used and it silently adopts every assignment ever made against that code — which is the opposite of the fresh channel the call looks like it produces. If that is not what you want, choose a new code. The other half is the default flag, which nothing here protects. There is no rule that a tenant keeps at least one channel and none reserving the one flagged `is_default` — both of which the channel TYPES do have — so deleting the default is permitted and leaves the tenant without one. From that moment every request that names no channel resolves to nothing: `GET /channels/context` answers resolved:false with reason no_default_channel, and `POST /channels/visibility` hides every row that carries assignments (no_channel_context) while rows carrying none still follow the tenant policy. Promote another channel first, or restore the seeded `shop` with POST /channels/defaults — which brings back `shop`, never the code you deleted.
|
|
547
565
|
*
|
|
548
566
|
* @param {string} params.id - The channel, by id. This is the uuid, not the `code` — filter the list with ?code= to go the other way.
|
|
549
567
|
* @throws {RevenexxException}
|
|
550
|
-
* @returns {Promise<
|
|
568
|
+
* @returns {Promise<{}>}
|
|
551
569
|
*/
|
|
552
570
|
channelsDelete(params: {
|
|
553
571
|
id: string;
|
|
554
|
-
}): Promise<
|
|
572
|
+
}): Promise<{}>;
|
|
555
573
|
/**
|
|
556
574
|
* Nothing cascades from here, and that is a statement about the schema rather than a reassurance: this app declares no foreign key in either direction, so there is nothing to cascade TO. The channel ASSIGNMENTS other apps hold live in Baseline, keyed by the scope slug, and deleting the channel does not remove them. A slug that no longer names a channel simply stops resolving. The consequence is that the assignments OUTLIVE the row. Create a channel again under a code a deleted one used and it silently adopts every assignment ever made against that code — which is the opposite of the fresh channel the call looks like it produces. If that is not what you want, choose a new code. The other half is the default flag, which nothing here protects. There is no rule that a tenant keeps at least one channel and none reserving the one flagged `is_default` — both of which the channel TYPES do have — so deleting the default is permitted and leaves the tenant without one. From that moment every request that names no channel resolves to nothing: `GET /channels/context` answers resolved:false with reason no_default_channel, and `POST /channels/visibility` hides every row that carries assignments (no_channel_context) while rows carrying none still follow the tenant policy. Promote another channel first, or restore the seeded `shop` with POST /channels/defaults — which brings back `shop`, never the code you deleted.
|
|
557
575
|
*
|
|
558
576
|
* @param {string} id - The channel, by id. This is the uuid, not the `code` — filter the list with ?code= to go the other way.
|
|
559
577
|
* @throws {RevenexxException}
|
|
560
|
-
* @returns {Promise<
|
|
578
|
+
* @returns {Promise<{}>}
|
|
561
579
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
562
580
|
*/
|
|
563
|
-
channelsDelete(id: string): Promise<
|
|
581
|
+
channelsDelete(id: string): Promise<{}>;
|
|
564
582
|
/**
|
|
565
583
|
* One row, by its uuid. The `code` is the handle everything else in the platform uses — it is the scope slug Baseline stores assignments against — and this route does not accept it: to go from a slug to the channel that owns it, use `GET /channels?code=…`, which answers the same row inside the list envelope. What this does NOT tell you is whether the request is in this channel. It returns an inactive channel as readily as an active one and applies no policy: which channel a caller is in, and what an unassigned row means there, is `GET /channels/context`. Answers are cached per tenant for 30 minutes and invalidated on any write to `channels`, so a read that follows someone else's write within that window can be stale by exactly one revision.
|
|
566
584
|
*
|
|
567
585
|
* @param {string} params.id - The channel, by id. This is the uuid, not the `code` — filter the list with ?code= to go the other way.
|
|
568
586
|
* @throws {RevenexxException}
|
|
569
|
-
* @returns {Promise<Models.
|
|
587
|
+
* @returns {Promise<Models.Channel>}
|
|
570
588
|
*/
|
|
571
589
|
channelsGet(params: {
|
|
572
590
|
id: string;
|
|
573
|
-
}): Promise<Models.
|
|
591
|
+
}): Promise<Models.Channel>;
|
|
574
592
|
/**
|
|
575
593
|
* One row, by its uuid. The `code` is the handle everything else in the platform uses — it is the scope slug Baseline stores assignments against — and this route does not accept it: to go from a slug to the channel that owns it, use `GET /channels?code=…`, which answers the same row inside the list envelope. What this does NOT tell you is whether the request is in this channel. It returns an inactive channel as readily as an active one and applies no policy: which channel a caller is in, and what an unassigned row means there, is `GET /channels/context`. Answers are cached per tenant for 30 minutes and invalidated on any write to `channels`, so a read that follows someone else's write within that window can be stale by exactly one revision.
|
|
576
594
|
*
|
|
577
595
|
* @param {string} id - The channel, by id. This is the uuid, not the `code` — filter the list with ?code= to go the other way.
|
|
578
596
|
* @throws {RevenexxException}
|
|
579
|
-
* @returns {Promise<Models.
|
|
597
|
+
* @returns {Promise<Models.Channel>}
|
|
580
598
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
581
599
|
*/
|
|
582
|
-
channelsGet(id: string): Promise<Models.
|
|
600
|
+
channelsGet(id: string): Promise<Models.Channel>;
|
|
583
601
|
/**
|
|
584
602
|
* A partial write: send the fields you are changing, keep the rest. An empty body is a 400 rather than a no-op, so a client that computed no diff hears about it. Two of these fields do more than they look like they do, and neither is guarded the way its counterpart on the channel TYPES is. Sending `code` is accepted — it is only checked for scope-slug shape — and nothing follows it: the assignments other apps made are held by Baseline against the OLD slug, there is no foreign key to cascade, so a rename silently detaches every one of them and the channel filters as if it had just been created. The types route refuses the same edit outright for the same reason; here it is permitted, so do it deliberately or not at all. And `is_default` is a two-way switch here. Setting it true demotes whoever held it, which is what you want; setting it FALSE on the only holder leaves the tenant with no default channel at all, and every request that names none then resolves to nothing — `GET /channels/context` answers resolved:false with reason no_default_channel. Promote another channel in the same breath. On the types route sending false does nothing, precisely because some row must hold that flag; channels have no such rule.
|
|
585
603
|
*
|
|
@@ -593,7 +611,7 @@ declare class Channels {
|
|
|
593
611
|
* @param {string} params.type - Which channel type this is. One of the codes the tenant keeps under GET /channels/types — served with labels as the 'channels.types' vocabulary. Deliberately NOT an enum: the set is the tenant's own rows, not a CHECK constraint this repo could quote. A fresh install starts with storefront, punchout, marketplace, api, pos, which is why 'storefront' is the example here, but a merchant may rename or retire any of them and add their own (a feed or a print channel), so read the list rather than assuming it. Omitted on create it falls back to the type the tenant flagged as their default, never to a hardcoded value; a code the tenant does not keep is a 400 that names the ones they do.
|
|
594
612
|
* @param {ChannelUnassignedVisibility} params.unassignedVisibility - Default 'inherit'. What it means, IN THIS CHANNEL, that a row carries no channel assignment at all — the per-channel override of the tenant-wide unassigned_channel_visibility setting. 'inherit' (the default) takes the tenant's answer and changes nothing. 'all' shows unassigned rows: everything is on sale unless somebody carved it out, which is what an open storefront wants and what Baseline's is_visible() does today. 'assigned_only' hides them until they are explicitly assigned — the negotiated assortment a punchout contract describes, and the one answer the generated _scoped view has no way to express, which is why POST /channels/visibility exists to apply it. Rows that DO carry assignments are unaffected either way. Served with its labels as the 'channels.unassigned-visibility' vocabulary.
|
|
595
613
|
* @throws {RevenexxException}
|
|
596
|
-
* @returns {Promise<Models.
|
|
614
|
+
* @returns {Promise<Models.Channel>}
|
|
597
615
|
*/
|
|
598
616
|
channelsUpdate(params: {
|
|
599
617
|
id: string;
|
|
@@ -605,7 +623,7 @@ declare class Channels {
|
|
|
605
623
|
status?: ChannelStatus;
|
|
606
624
|
type?: string;
|
|
607
625
|
unassignedVisibility?: ChannelUnassignedVisibility;
|
|
608
|
-
}): Promise<Models.
|
|
626
|
+
}): Promise<Models.Channel>;
|
|
609
627
|
/**
|
|
610
628
|
* A partial write: send the fields you are changing, keep the rest. An empty body is a 400 rather than a no-op, so a client that computed no diff hears about it. Two of these fields do more than they look like they do, and neither is guarded the way its counterpart on the channel TYPES is. Sending `code` is accepted — it is only checked for scope-slug shape — and nothing follows it: the assignments other apps made are held by Baseline against the OLD slug, there is no foreign key to cascade, so a rename silently detaches every one of them and the channel filters as if it had just been created. The types route refuses the same edit outright for the same reason; here it is permitted, so do it deliberately or not at all. And `is_default` is a two-way switch here. Setting it true demotes whoever held it, which is what you want; setting it FALSE on the only holder leaves the tenant with no default channel at all, and every request that names none then resolves to nothing — `GET /channels/context` answers resolved:false with reason no_default_channel. Promote another channel in the same breath. On the types route sending false does nothing, precisely because some row must hold that flag; channels have no such rule.
|
|
611
629
|
*
|
|
@@ -619,10 +637,10 @@ declare class Channels {
|
|
|
619
637
|
* @param {string} type - Which channel type this is. One of the codes the tenant keeps under GET /channels/types — served with labels as the 'channels.types' vocabulary. Deliberately NOT an enum: the set is the tenant's own rows, not a CHECK constraint this repo could quote. A fresh install starts with storefront, punchout, marketplace, api, pos, which is why 'storefront' is the example here, but a merchant may rename or retire any of them and add their own (a feed or a print channel), so read the list rather than assuming it. Omitted on create it falls back to the type the tenant flagged as their default, never to a hardcoded value; a code the tenant does not keep is a 400 that names the ones they do.
|
|
620
638
|
* @param {ChannelUnassignedVisibility} unassignedVisibility - Default 'inherit'. What it means, IN THIS CHANNEL, that a row carries no channel assignment at all — the per-channel override of the tenant-wide unassigned_channel_visibility setting. 'inherit' (the default) takes the tenant's answer and changes nothing. 'all' shows unassigned rows: everything is on sale unless somebody carved it out, which is what an open storefront wants and what Baseline's is_visible() does today. 'assigned_only' hides them until they are explicitly assigned — the negotiated assortment a punchout contract describes, and the one answer the generated _scoped view has no way to express, which is why POST /channels/visibility exists to apply it. Rows that DO carry assignments are unaffected either way. Served with its labels as the 'channels.unassigned-visibility' vocabulary.
|
|
621
639
|
* @throws {RevenexxException}
|
|
622
|
-
* @returns {Promise<Models.
|
|
640
|
+
* @returns {Promise<Models.Channel>}
|
|
623
641
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
624
642
|
*/
|
|
625
|
-
channelsUpdate(id: string, code?: string, isDefault?: boolean, labels?: object, name?: string, position?: number, status?: ChannelStatus, type?: string, unassignedVisibility?: ChannelUnassignedVisibility): Promise<Models.
|
|
643
|
+
channelsUpdate(id: string, code?: string, isDefault?: boolean, labels?: object, name?: string, position?: number, status?: ChannelStatus, type?: string, unassignedVisibility?: ChannelUnassignedVisibility): Promise<Models.Channel>;
|
|
626
644
|
}
|
|
627
645
|
|
|
628
646
|
export { Channels };
|
|
@@ -190,7 +190,7 @@ class Channels {
|
|
|
190
190
|
* The repair call. A tenant installed before `channel_types` existed, or one that deleted its way into a state where nothing works, gets the shipped starting point back — the 5 seeded types first, because the seeded channel carries one of them, then the `shop` channel. Most tenants never call it: the platform invokes the same routine itself on `app.installed`, so a fresh install already has its 5 types and its shop channel before anyone asks, and this route exists for the tenant whose install predates them or who has since removed them. Calling it on a settled tenant is safe and cheap for the same reason it is safe to fire on every install: it is idempotent, keyed on the code, so a second call writes nothing. Everything a merchant added themselves is left alone, and a row that already exists is reported under `existing` rather than rewritten — the values you edited on a seeded type survive this call. It RESTORES THE WHOLE SEED SET, including a seeded type the merchant deliberately deleted. Idempotency here is keyed on the code and nothing else, and there is nowhere to remember a retirement: retirement is not a state this app can represent. Retiring a type IS deleting the row; `channel_types` has no retired flag and these tables carry no foreign keys, so nothing anywhere distinguishes a code a merchant removed on purpose from one they never had. Honouring the retirement would mean inventing a tombstone rather than reading one. Given that, restoring all 5 is the better half of the trade: this is the call a tenant makes when something is missing, and a repair that silently skips part of what it repairs, with no way to ask for the rest, is worse than one that says plainly what it puts back. It is also never a surprise. The only automatic seeding elsewhere in the app fires when the type table is completely EMPTY, which cannot happen once installed because the last remaining type cannot be deleted — so a retired type comes back exactly when somebody calls this route or the app is installed again, and never as a side effect of an unrelated read. Deleting it a second time costs one DELETE, and is refused only if a channel has since started carrying it. What it does not do: it creates no assignments, it does not repair a channel whose own code you deleted (only `shop` comes back), and it does not restore the seeded VALUES of a type that still exists — a renamed `storefront` stays renamed.
|
|
191
191
|
*
|
|
192
192
|
* @throws {RevenexxException}
|
|
193
|
-
* @returns {Promise<Models.
|
|
193
|
+
* @returns {Promise<Models.ChannelDefaults>}
|
|
194
194
|
*/
|
|
195
195
|
channelsDefaults() {
|
|
196
196
|
const apiPath = "/v1/channels/defaults";
|