@sixtyninecommerce/admin 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1509 -28
- package/dist/auth/index.d.ts +7 -1
- package/dist/auth/index.js +8 -1
- package/dist/catalog/documents.d.ts +142 -0
- package/dist/catalog/documents.js +114 -0
- package/dist/catalog/index.d.ts +48 -7
- package/dist/catalog/index.js +6 -1
- package/dist/catalog/metadata.d.ts +244 -0
- package/dist/catalog/metadata.js +220 -0
- package/dist/catalog/properties.d.ts +38 -0
- package/dist/catalog/properties.js +52 -1
- package/dist/catalog/recommendations.d.ts +33 -6
- package/dist/catalog/recommendations.js +94 -2
- package/dist/catalog/reviews.d.ts +17 -4
- package/dist/catalog/reviews.js +7 -0
- package/dist/catalog/variants.d.ts +60 -0
- package/dist/catalog/variants.js +39 -0
- package/dist/catalog/visibility.d.ts +18 -2
- package/dist/client.d.ts +29 -3
- package/dist/client.js +19 -8
- package/dist/content/assets.d.ts +3 -4
- package/dist/content/forms.d.ts +332 -1
- package/dist/content/forms.js +140 -4
- package/dist/content/items.d.ts +31 -8
- package/dist/content/items.js +1 -1
- package/dist/content/menus.d.ts +254 -0
- package/dist/content/menus.js +70 -0
- package/dist/content/strings.d.ts +137 -0
- package/dist/content/strings.js +82 -0
- package/dist/customers/delivery-terms.d.ts +44 -0
- package/dist/customers/delivery-terms.js +32 -0
- package/dist/customers/groups.d.ts +16 -5
- package/dist/customers/groups.js +6 -2
- package/dist/customers/index.d.ts +15 -0
- package/dist/customers/index.js +4 -0
- package/dist/documents/emails.d.ts +154 -0
- package/dist/documents/emails.js +220 -0
- package/dist/documents/index.d.ts +13 -0
- package/dist/documents/index.js +2 -0
- package/dist/fulfillments/create.d.ts +1 -1
- package/dist/fulfillments/create.js +5 -2
- package/dist/fulfillments/index.d.ts +119 -1
- package/dist/fulfillments/index.js +124 -4
- package/dist/fulfillments/warehouse.d.ts +29 -17
- package/dist/fulfillments/warehouse.js +32 -1
- package/dist/index.d.ts +43 -23
- package/dist/index.js +11 -5
- package/dist/integrations/exact-online-types.d.ts +542 -0
- package/dist/integrations/exact-online.d.ts +541 -5
- package/dist/integrations/exact-online.js +714 -1
- package/dist/integrations/index.d.ts +23 -8
- package/dist/integrations/index.js +9 -4
- package/dist/integrations/pipeline-discoveries.d.ts +65 -0
- package/dist/integrations/pipeline-discoveries.js +65 -0
- package/dist/integrations/pipeline-runs.d.ts +119 -0
- package/dist/integrations/pipeline-runs.js +87 -0
- package/dist/integrations/pipelines.d.ts +73 -2
- package/dist/integrations/pipelines.js +36 -1
- package/dist/integrations/price-import.d.ts +223 -0
- package/dist/integrations/price-import.js +124 -0
- package/dist/integrations/types.d.ts +221 -3
- package/dist/integrations/types.js +4 -3
- package/dist/meta/index.d.ts +10 -0
- package/dist/metafields/index.d.ts +8 -1
- package/dist/metafields/index.js +10 -0
- package/dist/orders/cancel-with-money.d.ts +10 -0
- package/dist/orders/cancel-with-money.js +2 -0
- package/dist/orders/commit-edit.d.ts +16 -0
- package/dist/orders/commit-edit.js +14 -1
- package/dist/orders/deposit-policy.d.ts +3 -1
- package/dist/orders/index.d.ts +22 -11
- package/dist/orders/index.js +5 -2
- package/dist/orders/list.d.ts +26 -5
- package/dist/orders/list.js +123 -13
- package/dist/orders/manual-discounts.d.ts +13 -5
- package/dist/orders/money-view.d.ts +149 -0
- package/dist/orders/money-view.js +99 -0
- package/dist/orders/plan-edit.d.ts +34 -2
- package/dist/orders/plan-edit.js +110 -12
- package/dist/orders/surcharges.d.ts +12 -0
- package/dist/orders/surcharges.js +34 -9
- package/dist/payments/account-credit.d.ts +17 -1
- package/dist/payments/account-credit.js +25 -2
- package/dist/payments/credit-noted-fields.d.ts +8 -1
- package/dist/payments/credit-noted-fields.js +34 -2
- package/dist/payments/customer-consent.d.ts +30 -0
- package/dist/payments/customer-consent.js +49 -0
- package/dist/payments/index.d.ts +89 -14
- package/dist/payments/index.js +22 -2
- package/dist/payments/requests.d.ts +6 -3
- package/dist/payments/requests.js +1 -0
- package/dist/pickups/index.d.ts +5 -3
- package/dist/pickups/index.js +5 -2
- package/dist/platform/email-gateways.d.ts +165 -0
- package/dist/platform/email-gateways.js +78 -0
- package/dist/platform/tax.d.ts +11 -3
- package/dist/platform/tax.js +30 -0
- package/dist/pos/exchanges.d.ts +6 -1
- package/dist/pos/index.d.ts +229 -10
- package/dist/pos/index.js +113 -4
- package/dist/pos/offline-sales.d.ts +44 -3
- package/dist/pos/offline-sales.js +57 -3
- package/dist/pos/returns.d.ts +28 -1
- package/dist/pos/returns.js +36 -6
- package/dist/pricing/price-lists.d.ts +3 -1
- package/dist/purchasing/alerts.d.ts +19 -4
- package/dist/purchasing/alerts.js +29 -3
- package/dist/purchasing/backorders.d.ts +61 -0
- package/dist/purchasing/backorders.js +92 -0
- package/dist/purchasing/index.d.ts +21 -3
- package/dist/purchasing/index.js +8 -0
- package/dist/purchasing/links.d.ts +263 -0
- package/dist/purchasing/links.js +192 -0
- package/dist/purchasing/purchase-orders.d.ts +4 -1
- package/dist/purchasing/receipts.d.ts +396 -0
- package/dist/purchasing/receipts.js +287 -0
- package/dist/purchasing/returns.d.ts +273 -0
- package/dist/purchasing/returns.js +229 -0
- package/dist/quotes/index.d.ts +20 -3
- package/dist/returns/index.d.ts +62 -1
- package/dist/returns/index.js +61 -0
- package/dist/seo/config.d.ts +128 -0
- package/dist/seo/config.js +95 -0
- package/dist/seo/redirects.d.ts +125 -0
- package/dist/seo/redirects.js +60 -1
- package/dist/seo/settings.d.ts +147 -0
- package/dist/seo/settings.js +209 -0
- package/dist/shipping/index.d.ts +6 -0
- package/dist/shipping/index.js +2 -0
- package/dist/shipping/methods.d.ts +8 -1
- package/dist/shipping/myparcel.d.ts +415 -1
- package/dist/shipping/myparcel.js +291 -3
- package/dist/shipping/rate-tables.d.ts +149 -4
- package/dist/shipping/rate-tables.js +229 -23
- package/dist/shipping/ship-to-countries.d.ts +75 -0
- package/dist/shipping/ship-to-countries.js +47 -0
- package/dist/stock/by-location.d.ts +86 -0
- package/dist/stock/by-location.js +94 -0
- package/dist/stock/index.d.ts +8 -1
- package/dist/stock/index.js +4 -0
- package/dist/stock/settings.d.ts +106 -0
- package/dist/stock/settings.js +103 -0
- package/dist/stock/transfers.d.ts +171 -10
- package/dist/stock/transfers.js +82 -4
- package/dist/stored-value/index.d.ts +98 -7
- package/dist/stored-value/index.js +71 -4
- package/dist/tax/display-policy.d.ts +105 -0
- package/dist/tax/display-policy.js +84 -0
- package/dist/tax/index.d.ts +3 -0
- package/dist/tax/index.js +2 -0
- package/dist/tenant/email-templates.d.ts +222 -1
- package/dist/tenant/email-templates.js +227 -10
- package/package.json +2 -2
|
@@ -263,6 +263,33 @@ export interface VariantPriceSource {
|
|
|
263
263
|
organizationName: string | null;
|
|
264
264
|
}
|
|
265
265
|
/** A field {@link VariantsModule.list} can order a product's variants by. */
|
|
266
|
+
/**
|
|
267
|
+
* Where a variant's pre-order date (`availableFrom`) comes from (purchase-orders spec §8.12.3):
|
|
268
|
+
* `manual`, the date staff set, or `incoming`, kept equal to the earliest confirmed delivery of an
|
|
269
|
+
* open purchase order into the store's storefront warehouses.
|
|
270
|
+
*/
|
|
271
|
+
export type AvailableFromSource = 'manual' | 'incoming';
|
|
272
|
+
/** The sources {@link VariantsModule.setAvailableFromSource} sends. */
|
|
273
|
+
export declare const AVAILABLE_FROM_SOURCES: readonly AvailableFromSource[];
|
|
274
|
+
/** A variant's pre-order date source in the active store, and what `incoming` follows. */
|
|
275
|
+
export interface VariantAvailableFromSource {
|
|
276
|
+
productVariantId: string;
|
|
277
|
+
/** A string on the wire: a newer engine may add a source. */
|
|
278
|
+
source: AvailableFromSource | (string & {});
|
|
279
|
+
/** The stored availability date, ISO-8601 UTC, whoever set it; null when unset. */
|
|
280
|
+
availableFrom: string | null;
|
|
281
|
+
/**
|
|
282
|
+
* The earliest future day (`YYYY-MM-DD`) a supplier confirmed for an open purchase order of the
|
|
283
|
+
* variant, the day `incoming` follows; null for "no confirmed purchase order" (the date then
|
|
284
|
+
* keeps its last value).
|
|
285
|
+
*/
|
|
286
|
+
confirmedIncomingOn: string | null;
|
|
287
|
+
/**
|
|
288
|
+
* Stores of more than one legal entity hold the variant, or an organization does: it cannot
|
|
289
|
+
* follow the purchase orders (`incoming` is refused `AVAILABLE_FROM_SOURCE_SHARED_VARIANT`).
|
|
290
|
+
*/
|
|
291
|
+
sharedAcrossLegalEntities: boolean;
|
|
292
|
+
}
|
|
266
293
|
export type VariantSortField = 'position' | 'name' | 'sku' | 'createdAt' | 'updatedAt';
|
|
267
294
|
/** Options of {@link VariantsModule.list}. */
|
|
268
295
|
export interface VariantListOptions extends ListOptions {
|
|
@@ -470,6 +497,36 @@ export interface VariantsModule {
|
|
|
470
497
|
revertPrice(variantIds: string[], options?: Call & {
|
|
471
498
|
currencyCodes?: readonly string[];
|
|
472
499
|
}): Promise<ProductVariant[]>;
|
|
500
|
+
/**
|
|
501
|
+
* Where the variant's pre-order date comes from in the active store, the day a supplier
|
|
502
|
+
* confirmed that `incoming` would follow, and whether the variant may follow it at all
|
|
503
|
+
* (purchase-orders spec §8.12.3). Needs `ReadCatalog` or `ReadProduct` and the Purchasing
|
|
504
|
+
* plugin on the store (`PLUGIN_ACCESS_DENIED`, 403). A variant this store does not have is a
|
|
505
|
+
* `NotFoundError` (`PURCHASING_VARIANT_NOT_FOUND`).
|
|
506
|
+
*
|
|
507
|
+
* A document of its own, never a field of the variant reads: those keep working against an
|
|
508
|
+
* engine older than the field. Needs an engine with purchase orders step 5.3.
|
|
509
|
+
*
|
|
510
|
+
* @effect read
|
|
511
|
+
*/
|
|
512
|
+
availableFromSource(variantId: string, options?: Call): Promise<VariantAvailableFromSource>;
|
|
513
|
+
/**
|
|
514
|
+
* Switches the variant's pre-order date between the date staff set (`manual`) and the earliest
|
|
515
|
+
* confirmed purchase-order delivery (`incoming`, recomputed at once and whenever a purchase
|
|
516
|
+
* order of the variant is confirmed, revised, received or cancelled). The date only takes effect
|
|
517
|
+
* under a variant availability state that is not `inherit`. Needs `UpdateCatalog` or
|
|
518
|
+
* `UpdateProduct` on every store holding the variant, and the Purchasing plugin. Answers the
|
|
519
|
+
* variant's source as {@link availableFromSource} reads it. Refusals:
|
|
520
|
+
* - `AVAILABLE_FROM_SOURCE_INVALID` → `ValidationError` (400): a source other than `manual` or
|
|
521
|
+
* `incoming`; refused before sending too.
|
|
522
|
+
* - `PURCHASING_NOT_ENABLED` → `BusinessRuleError` (422): `incoming` while purchasing is off.
|
|
523
|
+
* - `AVAILABLE_FROM_SOURCE_SHARED_VARIANT` → `BusinessRuleError` (422): `incoming` for a
|
|
524
|
+
* variant stores of several legal entities, or an organization, hold.
|
|
525
|
+
* - `ENTITY_NOT_FOUND` → `NotFoundError` (404): a variant this store does not have.
|
|
526
|
+
*
|
|
527
|
+
* @effect write
|
|
528
|
+
*/
|
|
529
|
+
setAvailableFromSource(variantId: string, source: AvailableFromSource, options?: Call): Promise<VariantAvailableFromSource>;
|
|
473
530
|
}
|
|
474
531
|
export declare const VARIANT_FIELDS = "\n id\n productId\n createdAt\n updatedAt\n languageCode\n name\n sku\n enabled\n storePrice {\n price\n priceWithTax\n currencyCode\n }\n prices {\n currencyCode\n price\n }\n stockOnHand\n taxCategory {\n id\n name\n }\n trackInventory\n outOfStockThreshold\n useGlobalOutOfStockThreshold\n stockLevels {\n stockLocationId\n stockOnHand\n stockAllocated\n }\n options {\n id\n code\n name\n groupId\n }\n featuredAsset { \n id\n name\n preview\n source\n type\n mimeType\n customFields {\n altText\n }\n }\n assets { \n id\n name\n preview\n source\n type\n mimeType\n customFields {\n altText\n }\n }\n facetValues { \n id\n code\n name\n facet {\n id\n code\n name\n }\n }\n translations {\n id\n languageCode\n name\n }\n customFields {\n taxClassKey\n availabilityState\n availableFrom\n preorderLimit\n parcelCapacity\n parcelPacking\n minOrderQuantity\n salesUnit\n position\n cost\n packageWeightGrams\n packageLengthCm\n packageWidthCm\n packageHeightCm\n backorderPolicy\n backorderLimit\n gtin\n mpn\n }\n";
|
|
475
532
|
export declare const VARIANTS_QUERY = "\n query CatalogVariants($productId: ID!, $options: ProductVariantListOptions) {\n productVariants(productId: $productId, options: $options) {\n items { \n id\n productId\n createdAt\n updatedAt\n languageCode\n name\n sku\n enabled\n storePrice {\n price\n priceWithTax\n currencyCode\n }\n prices {\n currencyCode\n price\n }\n stockOnHand\n taxCategory {\n id\n name\n }\n trackInventory\n outOfStockThreshold\n useGlobalOutOfStockThreshold\n stockLevels {\n stockLocationId\n stockOnHand\n stockAllocated\n }\n options {\n id\n code\n name\n groupId\n }\n featuredAsset { \n id\n name\n preview\n source\n type\n mimeType\n customFields {\n altText\n }\n }\n assets { \n id\n name\n preview\n source\n type\n mimeType\n customFields {\n altText\n }\n }\n facetValues { \n id\n code\n name\n facet {\n id\n code\n name\n }\n }\n translations {\n id\n languageCode\n name\n }\n customFields {\n taxClassKey\n availabilityState\n availableFrom\n preorderLimit\n parcelCapacity\n parcelPacking\n minOrderQuantity\n salesUnit\n position\n cost\n packageWeightGrams\n packageLengthCm\n packageWidthCm\n packageHeightCm\n backorderPolicy\n backorderLimit\n gtin\n mpn\n }\n }\n totalItems\n }\n }\n";
|
|
@@ -485,6 +542,9 @@ export declare const DELETE_VARIANTS_MUTATION = "\n mutation CatalogDeleteVaria
|
|
|
485
542
|
*/
|
|
486
543
|
export declare const VARIANT_PRICE_SOURCES_QUERY = "\n query CatalogVariantPriceSources($id: ID!) {\n productVariant(id: $id) {\n id\n priceSources {\n currencyCode\n price\n source\n organizationPrice\n organizationName\n }\n }\n }\n";
|
|
487
544
|
export declare const REVERT_TO_ORGANIZATION_PRICE_MUTATION = "\n mutation CatalogRevertToOrganizationPrice($variantIds: [ID!]!, $currencyCodes: [CurrencyCode!]) {\n revertToOrganizationPrice(variantIds: $variantIds, currencyCodes: $currencyCodes) { \n id\n productId\n createdAt\n updatedAt\n languageCode\n name\n sku\n enabled\n storePrice {\n price\n priceWithTax\n currencyCode\n }\n prices {\n currencyCode\n price\n }\n stockOnHand\n taxCategory {\n id\n name\n }\n trackInventory\n outOfStockThreshold\n useGlobalOutOfStockThreshold\n stockLevels {\n stockLocationId\n stockOnHand\n stockAllocated\n }\n options {\n id\n code\n name\n groupId\n }\n featuredAsset { \n id\n name\n preview\n source\n type\n mimeType\n customFields {\n altText\n }\n }\n assets { \n id\n name\n preview\n source\n type\n mimeType\n customFields {\n altText\n }\n }\n facetValues { \n id\n code\n name\n facet {\n id\n code\n name\n }\n }\n translations {\n id\n languageCode\n name\n }\n customFields {\n taxClassKey\n availabilityState\n availableFrom\n preorderLimit\n parcelCapacity\n parcelPacking\n minOrderQuantity\n salesUnit\n position\n cost\n packageWeightGrams\n packageLengthCm\n packageWidthCm\n packageHeightCm\n backorderPolicy\n backorderLimit\n gtin\n mpn\n }\n }\n }\n";
|
|
545
|
+
/** Its own document: see {@link VariantsModule.availableFromSource}. */
|
|
546
|
+
export declare const VARIANT_AVAILABLE_FROM_SOURCE_QUERY = "\n query CatalogVariantAvailableFromSource($productVariantId: ID!) {\n variantAvailableFromSource(productVariantId: $productVariantId) {\n \n productVariantId\n source\n availableFrom\n confirmedIncomingOn\n sharedAcrossLegalEntities\n\n }\n }\n";
|
|
547
|
+
export declare const SET_VARIANT_AVAILABLE_FROM_SOURCE_MUTATION = "\n mutation CatalogSetVariantAvailableFromSource(\n $input: SetVariantAvailableFromSourceInput!\n $idempotencyKey: String\n ) {\n setVariantAvailableFromSource(input: $input, idempotencyKey: $idempotencyKey) {\n \n productVariantId\n source\n availableFrom\n confirmedIncomingOn\n sharedAcrossLegalEntities\n\n }\n }\n";
|
|
488
548
|
/** The price basis the store stores, read on the SAME tenant as the write. */
|
|
489
549
|
export declare const PRICE_BASIS_QUERY = "\n query CatalogPriceBasis {\n activeChannel {\n pricesIncludeTax\n }\n }\n";
|
|
490
550
|
/** The variant fields read out of `customFields` as they are, null for an unset one. */
|
package/dist/catalog/variants.js
CHANGED
|
@@ -5,6 +5,8 @@ const PARCEL_PACKING_MODES = ['shared', 'separate', 'none'];
|
|
|
5
5
|
/** The engine's bounds for `parcelCapacity` (shipping-calculator's `MAX_PARCEL_CAPACITY`). */
|
|
6
6
|
const PARCEL_CAPACITY_MIN = 1;
|
|
7
7
|
const PARCEL_CAPACITY_MAX = 10_000;
|
|
8
|
+
/** The sources {@link VariantsModule.setAvailableFromSource} sends. */
|
|
9
|
+
export const AVAILABLE_FROM_SOURCES = ['manual', 'incoming'];
|
|
8
10
|
/** The variants {@link VariantsModule.optionSets} reads at most by default. */
|
|
9
11
|
export const DEFAULT_OPTION_SET_LIMIT = MAX_PAGE_SIZE;
|
|
10
12
|
/** The most variants one {@link VariantsModule.optionSets} call reads. */
|
|
@@ -142,6 +144,31 @@ export const REVERT_TO_ORGANIZATION_PRICE_MUTATION = /* GraphQL */ `
|
|
|
142
144
|
revertToOrganizationPrice(variantIds: $variantIds, currencyCodes: $currencyCodes) { ${VARIANT_FIELDS} }
|
|
143
145
|
}
|
|
144
146
|
`;
|
|
147
|
+
const VARIANT_AVAILABLE_FROM_SOURCE_FIELDS = /* GraphQL */ `
|
|
148
|
+
productVariantId
|
|
149
|
+
source
|
|
150
|
+
availableFrom
|
|
151
|
+
confirmedIncomingOn
|
|
152
|
+
sharedAcrossLegalEntities
|
|
153
|
+
`;
|
|
154
|
+
/** Its own document: see {@link VariantsModule.availableFromSource}. */
|
|
155
|
+
export const VARIANT_AVAILABLE_FROM_SOURCE_QUERY = /* GraphQL */ `
|
|
156
|
+
query CatalogVariantAvailableFromSource($productVariantId: ID!) {
|
|
157
|
+
variantAvailableFromSource(productVariantId: $productVariantId) {
|
|
158
|
+
${VARIANT_AVAILABLE_FROM_SOURCE_FIELDS}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
`;
|
|
162
|
+
export const SET_VARIANT_AVAILABLE_FROM_SOURCE_MUTATION = /* GraphQL */ `
|
|
163
|
+
mutation CatalogSetVariantAvailableFromSource(
|
|
164
|
+
$input: SetVariantAvailableFromSourceInput!
|
|
165
|
+
$idempotencyKey: String
|
|
166
|
+
) {
|
|
167
|
+
setVariantAvailableFromSource(input: $input, idempotencyKey: $idempotencyKey) {
|
|
168
|
+
${VARIANT_AVAILABLE_FROM_SOURCE_FIELDS}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
`;
|
|
145
172
|
/** The price basis the store stores, read on the SAME tenant as the write. */
|
|
146
173
|
export const PRICE_BASIS_QUERY = /* GraphQL */ `
|
|
147
174
|
query CatalogPriceBasis {
|
|
@@ -402,5 +429,17 @@ export function createVariantsModule(transport) {
|
|
|
402
429
|
const rows = await fieldOf(transport, REVERT_TO_ORGANIZATION_PRICE_MUTATION, 'revertToOrganizationPrice', { variantIds, currencyCodes: currencyCodes === undefined ? null : [...currencyCodes] }, call);
|
|
403
430
|
return mapAll(rows, 'revertToOrganizationPrice');
|
|
404
431
|
},
|
|
432
|
+
async availableFromSource(variantId, options) {
|
|
433
|
+
return fieldOf(transport, VARIANT_AVAILABLE_FROM_SOURCE_QUERY, 'variantAvailableFromSource', { productVariantId: variantId }, options);
|
|
434
|
+
},
|
|
435
|
+
async setAvailableFromSource(variantId, source, options) {
|
|
436
|
+
if (!AVAILABLE_FROM_SOURCES.includes(source)) {
|
|
437
|
+
throw refuse('AVAILABLE_FROM_SOURCE_INVALID', 'The pre-order date source must be manual or incoming. Nothing was sent.');
|
|
438
|
+
}
|
|
439
|
+
return fieldOf(transport, SET_VARIANT_AVAILABLE_FROM_SOURCE_MUTATION, 'setVariantAvailableFromSource', {
|
|
440
|
+
input: { productVariantId: variantId, source },
|
|
441
|
+
idempotencyKey: options?.idempotencyKey,
|
|
442
|
+
}, options);
|
|
443
|
+
},
|
|
405
444
|
};
|
|
406
445
|
}
|
|
@@ -42,12 +42,23 @@ export interface VisibilityModule {
|
|
|
42
42
|
* one ignored all but the page and counted other stores' products, so it is
|
|
43
43
|
* refused before running (`ValidationError`, `GRAPHQL_VALIDATION_FAILED` or
|
|
44
44
|
* `BAD_REQUEST`) rather than answered with an unfiltered page.
|
|
45
|
+
*
|
|
46
|
+
* @effect read
|
|
45
47
|
*/
|
|
46
48
|
list(mode: ProductVisibilityMode, options?: ProductListOptions): Promise<Page<Product>>;
|
|
47
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Null when the product has no override (it is public). `NotFoundError` for an unknown product.
|
|
51
|
+
*
|
|
52
|
+
* @effect read
|
|
53
|
+
*/
|
|
48
54
|
get(productId: string, options?: Call): Promise<ProductVisibility | null>;
|
|
55
|
+
/** @effect write */
|
|
49
56
|
set(input: SetProductVisibilityInput, options?: Call): Promise<ProductVisibility>;
|
|
50
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Apply one setting to many products; answers how many rows changed.
|
|
59
|
+
*
|
|
60
|
+
* @effect write
|
|
61
|
+
*/
|
|
51
62
|
bulkSet(input: {
|
|
52
63
|
productIds: string[];
|
|
53
64
|
mode: ProductVisibilityMode;
|
|
@@ -56,6 +67,11 @@ export interface VisibilityModule {
|
|
|
56
67
|
/**
|
|
57
68
|
* Remove the override (the product becomes public). Resolves the same way
|
|
58
69
|
* whether or not there was one: the engine does not say.
|
|
70
|
+
*
|
|
71
|
+
* Tagged `destructive`: it deletes the product's visibility record, and a private product
|
|
72
|
+
* becomes every shopper's at once.
|
|
73
|
+
*
|
|
74
|
+
* @effect destructive
|
|
59
75
|
*/
|
|
60
76
|
clear(productId: string, options?: Call): Promise<void>;
|
|
61
77
|
}
|
package/dist/client.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ import { type ComplianceModule } from './compliance/index.js';
|
|
|
13
13
|
import { type ContentAssetsModule } from './content/assets.js';
|
|
14
14
|
import { type FormsModule } from './content/forms.js';
|
|
15
15
|
import { type ContentItemsModule } from './content/items.js';
|
|
16
|
+
import { type ContentMenusModule } from './content/menus.js';
|
|
17
|
+
import { type ContentStringsModule } from './content/strings.js';
|
|
16
18
|
import { type ContentFieldsModule, type ContentPageValuesModule, type ContentTypesModule } from './content/types.js';
|
|
17
19
|
import { type CustomObjectsModule } from './custom-objects/index.js';
|
|
18
20
|
import { type CustomersModule } from './customers/index.js';
|
|
@@ -34,6 +36,7 @@ import { type PickupsModule } from './pickups/index.js';
|
|
|
34
36
|
import { type PlatformAppsModule } from './platform/apps.js';
|
|
35
37
|
import { type PlatformCatalogModule } from './platform/catalog.js';
|
|
36
38
|
import { type PlatformChannelsModule } from './platform/channels.js';
|
|
39
|
+
import { type PlatformEmailGatewaysModule } from './platform/email-gateways.js';
|
|
37
40
|
import { type PlatformEntitlementsModule } from './platform/entitlements.js';
|
|
38
41
|
import { type PlatformGeoModule } from './platform/geo.js';
|
|
39
42
|
import { type PlatformLegalEntitiesModule } from './platform/legal-entities.js';
|
|
@@ -50,7 +53,9 @@ import { type QuotesModule } from './quotes/index.js';
|
|
|
50
53
|
import { type ReportsModule } from './reports/index.js';
|
|
51
54
|
import { type ReturnsModule } from './returns/index.js';
|
|
52
55
|
import { type SearchModule } from './search/index.js';
|
|
56
|
+
import { type SeoConfigModule } from './seo/config.js';
|
|
53
57
|
import { type RedirectsModule } from './seo/redirects.js';
|
|
58
|
+
import { type SeoSettingsModule } from './seo/settings.js';
|
|
54
59
|
import { type ShippingModule } from './shipping/index.js';
|
|
55
60
|
import { type StockModule } from './stock/index.js';
|
|
56
61
|
import { type StoredValueModule } from './stored-value/index.js';
|
|
@@ -141,7 +146,8 @@ export interface AdminClient {
|
|
|
141
146
|
channels: ChannelsModule;
|
|
142
147
|
/**
|
|
143
148
|
* The CMS's content: forms, content types (collections) with their fields, each type's
|
|
144
|
-
* index-page values, the types' items,
|
|
149
|
+
* index-page values, the types' items, the media library, navigation menus and content
|
|
150
|
+
* strings (spec §9.2 `content`).
|
|
145
151
|
*/
|
|
146
152
|
content: {
|
|
147
153
|
forms: FormsModule;
|
|
@@ -150,6 +156,8 @@ export interface AdminClient {
|
|
|
150
156
|
pageValues: ContentPageValuesModule;
|
|
151
157
|
items: ContentItemsModule;
|
|
152
158
|
assets: ContentAssetsModule;
|
|
159
|
+
menus: ContentMenusModule;
|
|
160
|
+
strings: ContentStringsModule;
|
|
153
161
|
};
|
|
154
162
|
/**
|
|
155
163
|
* Compliance requests to installed apps: data requests, customer and
|
|
@@ -261,8 +269,9 @@ export interface AdminClient {
|
|
|
261
269
|
/**
|
|
262
270
|
* Buying stock from suppliers, per legal entity (purchase-orders spec §10.1): `settings` with
|
|
263
271
|
* its document `numbering`, `suppliers` with their `contacts`, `purchaseOrders` with their
|
|
264
|
-
* `lines`, `replenishment` (reorder rules and suggestions),
|
|
265
|
-
*
|
|
272
|
+
* `lines`, `replenishment` (reorder rules and suggestions), `cost` (a variant's cost ledger),
|
|
273
|
+
* `receipts` (goods receipts and what can be received), and `returns` (goods sent back to
|
|
274
|
+
* suppliers). Needs the Purchasing plugin on the store.
|
|
266
275
|
*/
|
|
267
276
|
purchasing: PurchasingModule;
|
|
268
277
|
/**
|
|
@@ -296,8 +305,15 @@ export interface AdminClient {
|
|
|
296
305
|
* the credential may not read is skipped and named, never refused.
|
|
297
306
|
*/
|
|
298
307
|
search: SearchModule;
|
|
308
|
+
/**
|
|
309
|
+
* SEO of the ACTIVE store (spec §9.2 `seo`): its URL redirects (`redirects`), its SEO channel
|
|
310
|
+
* settings and defaults (`settings`, on the engine) and its SEO automation (`config`, on the
|
|
311
|
+
* plugins service).
|
|
312
|
+
*/
|
|
299
313
|
seo: {
|
|
300
314
|
redirects: RedirectsModule;
|
|
315
|
+
settings: SeoSettingsModule;
|
|
316
|
+
config: SeoConfigModule;
|
|
301
317
|
};
|
|
302
318
|
/**
|
|
303
319
|
* Shipping of the ACTIVE channel (spec §9.2 `shipping`): the channel's
|
|
@@ -390,6 +406,11 @@ export interface AdminClient {
|
|
|
390
406
|
* connect or disconnect a plugin for a store — see {@link PlatformEntitlementsModule}.
|
|
391
407
|
*/
|
|
392
408
|
entitlements: PlatformEntitlementsModule;
|
|
409
|
+
/**
|
|
410
|
+
* The stores' email gateways (SMTP or sixtynine.email): list, create, change, delete and test
|
|
411
|
+
* the connection — see {@link PlatformEmailGatewaysModule}.
|
|
412
|
+
*/
|
|
413
|
+
emailGateways: PlatformEmailGatewaysModule;
|
|
393
414
|
/**
|
|
394
415
|
* The platform's zones and countries every store shares: create, rename, delete and change
|
|
395
416
|
* the members of a zone; switch a country on or off — see {@link PlatformGeoModule}. Reads
|
|
@@ -445,6 +466,11 @@ export interface SessionConfig {
|
|
|
445
466
|
* A bearer is not proof of a session: Vendure mints an ANONYMOUS session for
|
|
446
467
|
* an unauthenticated read. Treat "signed in" as "`auth.me()` resolved", never
|
|
447
468
|
* as "a token is stored".
|
|
469
|
+
*
|
|
470
|
+
* A rotation is stored (and reported here) only while `token` still holds
|
|
471
|
+
* the bearer its call was sent with: a call answered after a `logout()` or a
|
|
472
|
+
* new sign-in replaced it never overwrites the newer bearer. `login()`'s own
|
|
473
|
+
* bearer always applies.
|
|
448
474
|
*/
|
|
449
475
|
onToken?: (token: string) => void;
|
|
450
476
|
}
|
package/dist/client.js
CHANGED
|
@@ -13,6 +13,8 @@ import { createComplianceModule } from './compliance/index.js';
|
|
|
13
13
|
import { createContentAssetsModule } from './content/assets.js';
|
|
14
14
|
import { createFormsModule } from './content/forms.js';
|
|
15
15
|
import { createContentItemsModule } from './content/items.js';
|
|
16
|
+
import { createContentMenusModule } from './content/menus.js';
|
|
17
|
+
import { createContentStringsModule } from './content/strings.js';
|
|
16
18
|
import { createContentFieldsModule, createContentPageValuesModule, createContentTypesModule, } from './content/types.js';
|
|
17
19
|
import { createCustomObjectsModule } from './custom-objects/index.js';
|
|
18
20
|
import { createCustomersModule } from './customers/index.js';
|
|
@@ -34,6 +36,7 @@ import { createPickupsModule } from './pickups/index.js';
|
|
|
34
36
|
import { createPlatformAppsModule } from './platform/apps.js';
|
|
35
37
|
import { createPlatformCatalogModule } from './platform/catalog.js';
|
|
36
38
|
import { createPlatformChannelsModule } from './platform/channels.js';
|
|
39
|
+
import { createPlatformEmailGatewaysModule, } from './platform/email-gateways.js';
|
|
37
40
|
import { createPlatformEntitlementsModule, } from './platform/entitlements.js';
|
|
38
41
|
import { createPlatformGeoModule } from './platform/geo.js';
|
|
39
42
|
import { createPlatformLegalEntitiesModule, } from './platform/legal-entities.js';
|
|
@@ -50,7 +53,9 @@ import { createQuotesModule } from './quotes/index.js';
|
|
|
50
53
|
import { createReportsModule } from './reports/index.js';
|
|
51
54
|
import { createReturnsModule } from './returns/index.js';
|
|
52
55
|
import { createSearchModule } from './search/index.js';
|
|
56
|
+
import { createSeoConfigModule } from './seo/config.js';
|
|
53
57
|
import { createRedirectsModule } from './seo/redirects.js';
|
|
58
|
+
import { createSeoSettingsModule } from './seo/settings.js';
|
|
54
59
|
import { createShippingModule } from './shipping/index.js';
|
|
55
60
|
import { createStockModule } from './stock/index.js';
|
|
56
61
|
import { createStoredValueModule } from './stored-value/index.js';
|
|
@@ -337,14 +342,15 @@ function buildClient(config, overrides, resolver, shared, credential) {
|
|
|
337
342
|
throw credentialMissing();
|
|
338
343
|
return { kind: 'bearer', token };
|
|
339
344
|
}
|
|
340
|
-
const sent = store.read();
|
|
341
345
|
return {
|
|
342
346
|
kind: 'bearer',
|
|
343
|
-
token:
|
|
347
|
+
token: store.read(),
|
|
344
348
|
onToken: (rotated) => {
|
|
345
|
-
//
|
|
346
|
-
//
|
|
347
|
-
//
|
|
349
|
+
// `core` calls this only while the slot still holds what THIS call
|
|
350
|
+
// sent (it re-reads this principal, i.e. the caller's own store), or
|
|
351
|
+
// for `login`, which starts a session. A `logout()` that landed
|
|
352
|
+
// meanwhile cleared the slot, and a rotation for the session that
|
|
353
|
+
// ended must not re-arm the one that replaced it.
|
|
348
354
|
//
|
|
349
355
|
// Keyed on the bearer, never on a per-client counter: the session
|
|
350
356
|
// store is the CALLER's, and on the documented one-client-per-server
|
|
@@ -352,8 +358,6 @@ function buildClient(config, overrides, resolver, shared, credential) {
|
|
|
352
358
|
// process, so one administrator's sign-out discarded the bearer
|
|
353
359
|
// another administrator's concurrent sign-in had just been issued —
|
|
354
360
|
// reported to them as "the engine returned no vendure-auth-token".
|
|
355
|
-
if (store.read() !== sent)
|
|
356
|
-
return;
|
|
357
361
|
store.write(rotated);
|
|
358
362
|
shared.rotations += 1;
|
|
359
363
|
},
|
|
@@ -415,6 +419,8 @@ function buildClient(config, overrides, resolver, shared, credential) {
|
|
|
415
419
|
pageValues: createContentPageValuesModule(transport),
|
|
416
420
|
items: createContentItemsModule(transport),
|
|
417
421
|
assets: createContentAssetsModule(transport),
|
|
422
|
+
menus: createContentMenusModule(transport),
|
|
423
|
+
strings: createContentStringsModule(transport),
|
|
418
424
|
},
|
|
419
425
|
fulfillments: createFulfillmentsModule(transport),
|
|
420
426
|
heads: createHeadsModule(transport),
|
|
@@ -443,7 +449,11 @@ function buildClient(config, overrides, resolver, shared, credential) {
|
|
|
443
449
|
feeds: createFeedsModule(transport),
|
|
444
450
|
geo: createGeoModule(transport),
|
|
445
451
|
search: createSearchModule(transport),
|
|
446
|
-
seo: {
|
|
452
|
+
seo: {
|
|
453
|
+
redirects: createRedirectsModule(transport),
|
|
454
|
+
settings: createSeoSettingsModule(transport),
|
|
455
|
+
config: createSeoConfigModule(transport),
|
|
456
|
+
},
|
|
447
457
|
shipping: createShippingModule(transport),
|
|
448
458
|
stock: createStockModule(transport),
|
|
449
459
|
storedValue: createStoredValueModule(transport),
|
|
@@ -469,6 +479,7 @@ function buildClient(config, overrides, resolver, shared, credential) {
|
|
|
469
479
|
catalog: createPlatformCatalogModule(transport, config),
|
|
470
480
|
channels: createPlatformChannelsModule(transport, config),
|
|
471
481
|
entitlements: createPlatformEntitlementsModule(transport, config),
|
|
482
|
+
emailGateways: createPlatformEmailGatewaysModule(transport, config),
|
|
472
483
|
geo: createPlatformGeoModule(transport, config),
|
|
473
484
|
legalEntities: createPlatformLegalEntitiesModule(transport, config),
|
|
474
485
|
organizations: createPlatformOrganizationsModule(transport, config),
|
package/dist/content/assets.d.ts
CHANGED
|
@@ -69,10 +69,9 @@ export interface ContentAssetListOptions extends ListOptions {
|
|
|
69
69
|
/** Only the files whose MIME type starts with this (`image/`, `application/pdf`). */
|
|
70
70
|
mimeType?: string;
|
|
71
71
|
/**
|
|
72
|
-
* Full-text search over the file names and the alt text; the results come in relevance order
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* search covers every folder.
|
|
72
|
+
* Full-text search over the file names and the alt text; the results come in relevance order,
|
|
73
|
+
* filtered by `mimeType` and `folderId` as a list is. (A CMS before 2026-10-14 matched a search's
|
|
74
|
+
* `mimeType` exactly, so a prefix found nothing, and ignored `folderId: null`.)
|
|
76
75
|
*/
|
|
77
76
|
search?: string;
|
|
78
77
|
}
|