@sixtyninecommerce/admin 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +294 -0
- package/dist/catalog/products.d.ts +162 -1
- package/dist/catalog/products.js +94 -1
- package/dist/catalog/variants.d.ts +50 -0
- package/dist/catalog/variants.js +48 -18
- package/dist/client.d.ts +21 -0
- package/dist/client.js +6 -0
- package/dist/fulfillments/index.d.ts +77 -0
- package/dist/fulfillments/index.js +109 -0
- package/dist/index.d.ts +15 -4
- package/dist/index.js +5 -0
- package/dist/integrations/index.d.ts +14 -0
- package/dist/integrations/index.js +9 -0
- package/dist/integrations/pipelines.d.ts +113 -0
- package/dist/integrations/pipelines.js +62 -0
- package/dist/integrations/types.d.ts +176 -0
- package/dist/integrations/types.js +8 -0
- package/dist/jobs/bulk-action-run.d.ts +11 -2
- package/dist/jobs/bulk-action-run.js +4 -5
- package/dist/orders/bulk.d.ts +75 -0
- package/dist/orders/bulk.js +150 -0
- package/dist/orders/deposit-policy.d.ts +103 -0
- package/dist/orders/deposit-policy.js +202 -0
- package/dist/orders/index.d.ts +80 -0
- package/dist/orders/index.js +13 -0
- package/dist/orders/manual-discounts.d.ts +11 -2
- package/dist/orders/manual-discounts.js +2 -0
- package/dist/payments/index.d.ts +7 -0
- package/dist/payments/index.js +2 -0
- package/dist/payments/methods.d.ts +37 -0
- package/dist/payments/methods.js +33 -0
- package/dist/pricing/index.d.ts +3 -0
- package/dist/pricing/index.js +2 -0
- package/dist/pricing/vouchers.d.ts +103 -0
- package/dist/pricing/vouchers.js +69 -0
- package/dist/returns/index.d.ts +225 -0
- package/dist/returns/index.js +160 -0
- package/dist/search/index.d.ts +99 -0
- package/dist/search/index.js +62 -0
- package/dist/types.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/** The engine's bounds, as `searchAcrossEntities` documents them. */
|
|
2
|
+
export const SEARCH_ENTITIES_MIN_TERM_LENGTH = 2;
|
|
3
|
+
export const SEARCH_ENTITIES_MAX_TAKE = 10;
|
|
4
|
+
export const SEARCH_ACROSS_ENTITIES_QUERY = /* GraphQL */ `
|
|
5
|
+
query SearchAcrossEntities($input: CommandSearchInput!) {
|
|
6
|
+
searchAcrossEntities(input: $input) {
|
|
7
|
+
products {
|
|
8
|
+
id
|
|
9
|
+
name
|
|
10
|
+
slug
|
|
11
|
+
previewUrl
|
|
12
|
+
}
|
|
13
|
+
orders {
|
|
14
|
+
id
|
|
15
|
+
code
|
|
16
|
+
state
|
|
17
|
+
orderPlacedAt
|
|
18
|
+
totalWithTax
|
|
19
|
+
currencyCode
|
|
20
|
+
lifecycleStatus
|
|
21
|
+
}
|
|
22
|
+
customers {
|
|
23
|
+
id
|
|
24
|
+
firstName
|
|
25
|
+
lastName
|
|
26
|
+
emailAddress
|
|
27
|
+
company
|
|
28
|
+
}
|
|
29
|
+
content {
|
|
30
|
+
id
|
|
31
|
+
collectionId
|
|
32
|
+
collectionSlug
|
|
33
|
+
slug
|
|
34
|
+
status
|
|
35
|
+
title
|
|
36
|
+
}
|
|
37
|
+
skipped {
|
|
38
|
+
type
|
|
39
|
+
reason
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
`;
|
|
44
|
+
export function createSearchModule(transport) {
|
|
45
|
+
return {
|
|
46
|
+
async entities(term, options = {}) {
|
|
47
|
+
const { types, take, ...call } = options;
|
|
48
|
+
const data = await transport.graphql({
|
|
49
|
+
api: 'admin',
|
|
50
|
+
query: SEARCH_ACROSS_ENTITIES_QUERY,
|
|
51
|
+
variables: {
|
|
52
|
+
input: {
|
|
53
|
+
term,
|
|
54
|
+
...(types === undefined ? {} : { types: [...types] }),
|
|
55
|
+
...(take === undefined ? {} : { take }),
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
}, call);
|
|
59
|
+
return data.searchAcrossEntities;
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
}
|
package/dist/types.d.ts
CHANGED
|
@@ -12,8 +12,8 @@ export interface Call {
|
|
|
12
12
|
* `customers.groups.replaceMembers`, `pricing.coupons.apply` / `remove`,
|
|
13
13
|
* `orders.setLinePrices` / `setOneTimeDiscounts`,
|
|
14
14
|
* `pos.sale.applyCouponCode` / `removeCouponCode`, `storedValue.issue` / `adjust` /
|
|
15
|
-
* `redeem`, `apps.releaseFieldGroup
|
|
16
|
-
* omitted). Repeating one under the same key
|
|
15
|
+
* `redeem`, `apps.releaseFieldGroup`, `catalog.products.bulk` and `orders.bulk` (both mint
|
|
16
|
+
* one when omitted), and `catalog.products.save`. Repeating one under the same key
|
|
17
17
|
* returns the first call's result instead of moving the money again; a
|
|
18
18
|
* DIFFERENT request under the same key is refused with a `ConflictError`
|
|
19
19
|
* (409) coded `IDEMPOTENCY_CONFLICT`, and a repeat that arrives while the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sixtyninecommerce/admin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Back-office SDK for sixtynine-commerce: every capability of the platform as a method",
|
|
5
5
|
"homepage": "https://github.com/SIXTYNINE-digital/sixtynine-commerce-engine/tree/main/packages/admin-client#readme",
|
|
6
6
|
"repository": {
|