@aglyn/plugins-commerce 1.0.0-beta.221 → 1.0.0-beta.222
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 +4 -2
- package/package.json +14 -13
- package/src/lib/components/console/catalog-organization-card.component.js +9 -0
- package/src/lib/components/console/catalog-organization-card.component.js.map +1 -1
- package/src/lib/components/console/discounts-card.component.js +8 -0
- package/src/lib/components/console/discounts-card.component.js.map +1 -1
- package/src/lib/components/console/gift-cards-card.component.js +8 -0
- package/src/lib/components/console/gift-cards-card.component.js.map +1 -1
- package/src/lib/components/console/host-coupons-card.component.js +8 -0
- package/src/lib/components/console/host-coupons-card.component.js.map +1 -1
- package/src/lib/components/console/host-orders-card.component.js +34 -70
- package/src/lib/components/console/host-orders-card.component.js.map +1 -1
- package/src/lib/components/console/product-zones.d.ts +7 -6
- package/src/lib/components/console/product-zones.js +5 -4
- package/src/lib/components/console/product-zones.js.map +1 -1
- package/src/lib/components/console/products-hub-card.component.js +86 -284
- package/src/lib/components/console/products-hub-card.component.js.map +1 -1
- package/src/lib/declarations.console-server.d.ts +38 -0
- package/src/lib/declarations.console-server.js +67 -0
- package/src/lib/declarations.console-server.js.map +1 -0
- package/src/lib/model/commerce-gift-cards.d.ts +26 -0
- package/src/lib/model/commerce-gift-cards.js +42 -0
- package/src/lib/model/commerce-gift-cards.js.map +1 -1
- package/src/lib/model/commerce-orders.d.ts +0 -57
- package/src/lib/model/commerce-orders.js +0 -80
- package/src/lib/model/commerce-orders.js.map +1 -1
- package/src/lib/model/index.d.ts +0 -1
- package/src/lib/model/index.js +0 -1
- package/src/lib/model/index.js.map +1 -1
- package/src/lib/plugin.js +5 -0
- package/src/lib/plugin.js.map +1 -1
- package/src/lib/server/api-v1/openapi.d.ts +27 -0
- package/src/lib/server/api-v1/openapi.js +219 -0
- package/src/lib/server/api-v1/openapi.js.map +1 -0
- package/src/lib/server/api-v1/orders-and-products.d.ts +19 -0
- package/src/lib/server/api-v1/orders-and-products.js +419 -0
- package/src/lib/server/api-v1/orders-and-products.js.map +1 -0
- package/src/lib/server/billing-webhook.js +10 -13
- package/src/lib/server/billing-webhook.js.map +1 -1
- package/src/lib/server/download.js +4 -1
- package/src/lib/server/download.js.map +1 -1
- package/src/lib/server/fulfill-order.d.ts +52 -11
- package/src/lib/server/fulfill-order.js +6 -9
- package/src/lib/server/fulfill-order.js.map +1 -1
- package/src/lib/server/gift-card-issue.d.ts +57 -0
- package/src/lib/server/gift-card-issue.js +155 -0
- package/src/lib/server/gift-card-issue.js.map +1 -0
- package/src/lib/server/gift-cards.js +25 -84
- package/src/lib/server/gift-cards.js.map +1 -1
- package/src/lib/server/membership-register.js +9 -8
- package/src/lib/server/membership-register.js.map +1 -1
- package/src/lib/server/newsletter.js +7 -5
- package/src/lib/server/newsletter.js.map +1 -1
- package/src/lib/server/paid-media-delivery.d.ts +21 -0
- package/src/lib/server/paid-media-delivery.js +23 -5
- package/src/lib/server/paid-media-delivery.js.map +1 -1
- package/src/lib/server/paid-media-serve-count.d.ts +28 -0
- package/src/lib/server/paid-media-serve-count.js +46 -0
- package/src/lib/server/paid-media-serve-count.js.map +1 -0
- package/src/lib/server/person-eraser.d.ts +45 -0
- package/src/lib/server/person-eraser.js +57 -0
- package/src/lib/server/person-eraser.js.map +1 -0
- package/src/lib/server/refund.js +15 -15
- package/src/lib/server/refund.js.map +1 -1
- package/src/lib/server/restock-flag.d.ts +2 -2
- package/src/lib/server/restock-flag.js +1 -1
- package/src/lib/server/restock-flag.js.map +1 -1
- package/src/lib/server/stream.js +4 -1
- package/src/lib/server/stream.js.map +1 -1
- package/src/lib/server.js +5 -21
- package/src/lib/server.js.map +1 -1
- package/src/lib/testing/stand-in-person-records.d.ts +43 -0
- package/src/lib/testing/stand-in-person-records.js +63 -0
- package/src/lib/testing/stand-in-person-records.js.map +1 -0
- package/src/lib/transfer/gift-card-confirm-step.component.d.ts +22 -0
- package/src/lib/transfer/gift-card-confirm-step.component.js +259 -0
- package/src/lib/transfer/gift-card-confirm-step.component.js.map +1 -0
- package/src/lib/transfer/gift-cards-plan.d.ts +29 -0
- package/src/lib/transfer/gift-cards-plan.js +40 -0
- package/src/lib/transfer/gift-cards-plan.js.map +1 -0
- package/src/lib/transfer/gift-cards.server.d.ts +34 -0
- package/src/lib/transfer/gift-cards.server.js +296 -0
- package/src/lib/transfer/gift-cards.server.js.map +1 -0
- package/src/lib/transfer/list-filter.d.ts +29 -0
- package/src/lib/transfer/list-filter.js +112 -0
- package/src/lib/transfer/list-filter.js.map +1 -0
- package/src/lib/transfer/product-import-results.d.ts +29 -0
- package/src/lib/transfer/product-import-results.js +49 -0
- package/src/lib/transfer/product-import-results.js.map +1 -0
- package/src/lib/transfer/product-import-step.component.d.ts +30 -0
- package/src/lib/transfer/product-import-step.component.js +99 -0
- package/src/lib/transfer/product-import-step.component.js.map +1 -0
- package/src/lib/transfer/product-transfer.d.ts +211 -0
- package/src/lib/transfer/product-transfer.js +1594 -0
- package/src/lib/transfer/product-transfer.js.map +1 -0
- package/src/lib/transfer/products.server.d.ts +44 -0
- package/src/lib/transfer/products.server.js +550 -0
- package/src/lib/transfer/products.server.js.map +1 -0
- package/src/lib/transfer/records-transfer.d.ts +182 -0
- package/src/lib/transfer/records-transfer.js +1153 -0
- package/src/lib/transfer/records-transfer.js.map +1 -0
- package/src/lib/transfer/records.server.d.ts +68 -0
- package/src/lib/transfer/records.server.js +455 -0
- package/src/lib/transfer/records.server.js.map +1 -0
- package/src/lib/transfer/register-transfer-resources.d.ts +17 -0
- package/src/lib/transfer/register-transfer-resources.js +171 -0
- package/src/lib/transfer/register-transfer-resources.js.map +1 -0
- package/src/lib/transfer/register-transfer-ui.d.ts +23 -0
- package/src/lib/transfer/register-transfer-ui.js +78 -0
- package/src/lib/transfer/register-transfer-ui.js.map +1 -0
- package/src/lib/transfer/server-common.d.ts +76 -0
- package/src/lib/transfer/server-common.js +165 -0
- package/src/lib/transfer/server-common.js.map +1 -0
- package/src/lib/transfer/transfer-header-actions.component.d.ts +39 -0
- package/src/lib/transfer/transfer-header-actions.component.js +79 -0
- package/src/lib/transfer/transfer-header-actions.component.js.map +1 -0
- package/src/lib/transfer/transfer-keys.d.ts +31 -0
- package/src/lib/transfer/transfer-keys.js +56 -0
- package/src/lib/transfer/transfer-keys.js.map +1 -0
- package/src/lib/model/commerce-io.d.ts +0 -36
- package/src/lib/model/commerce-io.js +0 -245
- package/src/lib/model/commerce-io.js.map +0 -1
- package/src/lib/server/contact-refund.d.ts +0 -117
- package/src/lib/server/contact-refund.js +0 -196
- package/src/lib/server/contact-refund.js.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { type ApiV1ResourceDescription } from '@aglyn/tenant-data-admin/server/api-v1-description';
|
|
18
|
+
/**
|
|
19
|
+
* A site's products and orders as the customer API's OpenAPI document
|
|
20
|
+
* describes them — what the console's builder turns into paths, tags and
|
|
21
|
+
* schemas, and the MCP tools derive from. Transcribed unchanged from the
|
|
22
|
+
* builder's own list when the resources moved here (AGL-3080);
|
|
23
|
+
* `api-v1-openapi.spec.ts` holds the document to every endpoint the
|
|
24
|
+
* documentation promises.
|
|
25
|
+
*/
|
|
26
|
+
export declare const PRODUCTS_API_V1_DESCRIPTION: ApiV1ResourceDescription;
|
|
27
|
+
export declare const ORDERS_API_V1_DESCRIPTION: ApiV1ResourceDescription;
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2026 Aglyn LLC
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/ import { booleanField as bool, integerField as int, nullableField as nullable, objectKindField as OBJECT_FIELD, openObjectField as objectOf, postalAddressField as ADDRESS, queryParam as q, RECORD_STAMPS as STAMPS, stringField as str, stringListField as strList } from "@aglyn/tenant-data-admin/server/api-v1-description";
|
|
18
|
+
/**
|
|
19
|
+
* A site's products and orders as the customer API's OpenAPI document
|
|
20
|
+
* describes them — what the console's builder turns into paths, tags and
|
|
21
|
+
* schemas, and the MCP tools derive from. Transcribed unchanged from the
|
|
22
|
+
* builder's own list when the resources moved here (AGL-3080);
|
|
23
|
+
* `api-v1-openapi.spec.ts` holds the document to every endpoint the
|
|
24
|
+
* documentation promises.
|
|
25
|
+
*/ export const PRODUCTS_API_V1_DESCRIPTION = {
|
|
26
|
+
tag: 'Products',
|
|
27
|
+
description: 'A site’s catalog. Read-only over the API.',
|
|
28
|
+
schemaName: 'Product',
|
|
29
|
+
required: [
|
|
30
|
+
'id',
|
|
31
|
+
'object',
|
|
32
|
+
'name'
|
|
33
|
+
],
|
|
34
|
+
fields: _extends({
|
|
35
|
+
id: str('Product id.'),
|
|
36
|
+
object: OBJECT_FIELD('product'),
|
|
37
|
+
name: str('Product name.'),
|
|
38
|
+
slug: str('URL slug.'),
|
|
39
|
+
description: nullable(str('Description.')),
|
|
40
|
+
type: str('Product type.'),
|
|
41
|
+
status: str('Publication status.'),
|
|
42
|
+
tags: strList('Free-form tags.'),
|
|
43
|
+
categoryIds: strList('Categories this product belongs to.'),
|
|
44
|
+
mediaUrls: strList('Image URLs.'),
|
|
45
|
+
options: {
|
|
46
|
+
type: 'array',
|
|
47
|
+
description: 'Option definitions, e.g. size.',
|
|
48
|
+
items: {
|
|
49
|
+
type: 'object',
|
|
50
|
+
additionalProperties: true
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
variants: {
|
|
54
|
+
type: 'array',
|
|
55
|
+
description: 'Purchasable variants.',
|
|
56
|
+
items: {
|
|
57
|
+
type: 'object',
|
|
58
|
+
additionalProperties: true
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
inventory: nullable(int('Stock on hand, when tracked.')),
|
|
62
|
+
subscription: nullable(objectOf('Subscription terms, when the product is one.'))
|
|
63
|
+
}, STAMPS),
|
|
64
|
+
ops: [
|
|
65
|
+
{
|
|
66
|
+
path: '/v1/sites/{siteId}/products',
|
|
67
|
+
method: 'get',
|
|
68
|
+
operationId: 'listProducts',
|
|
69
|
+
summary: 'List products',
|
|
70
|
+
list: true,
|
|
71
|
+
returns: 'Product',
|
|
72
|
+
description: 'Rows deleted since they were written are dropped after the read, so pages can come back short.',
|
|
73
|
+
pathParams: [
|
|
74
|
+
{
|
|
75
|
+
name: 'siteId',
|
|
76
|
+
description: 'Site id.'
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
path: '/v1/sites/{siteId}/products/{productId}',
|
|
82
|
+
method: 'get',
|
|
83
|
+
operationId: 'getProduct',
|
|
84
|
+
summary: 'Retrieve a product',
|
|
85
|
+
returns: 'Product',
|
|
86
|
+
pathParams: [
|
|
87
|
+
{
|
|
88
|
+
name: 'siteId',
|
|
89
|
+
description: 'Site id.'
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'productId',
|
|
93
|
+
description: 'Product id.'
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
};
|
|
99
|
+
export const ORDERS_API_V1_DESCRIPTION = {
|
|
100
|
+
tag: 'Orders',
|
|
101
|
+
description: 'A site’s orders. Status moves are constrained.',
|
|
102
|
+
schemaName: 'Order',
|
|
103
|
+
required: [
|
|
104
|
+
'id',
|
|
105
|
+
'object',
|
|
106
|
+
'number',
|
|
107
|
+
'status'
|
|
108
|
+
],
|
|
109
|
+
writable: [
|
|
110
|
+
'status',
|
|
111
|
+
'carrier',
|
|
112
|
+
'trackingNumber'
|
|
113
|
+
],
|
|
114
|
+
writeOnly: {
|
|
115
|
+
status: {
|
|
116
|
+
type: 'string',
|
|
117
|
+
enum: [
|
|
118
|
+
'fulfilled',
|
|
119
|
+
'delivered'
|
|
120
|
+
],
|
|
121
|
+
description: 'The status to move the order to.'
|
|
122
|
+
},
|
|
123
|
+
carrier: str('Free text, e.g. `UPS`. Trimmed to 40 characters.'),
|
|
124
|
+
trackingNumber: str('Free text. Trimmed to 60 characters.')
|
|
125
|
+
},
|
|
126
|
+
writeRequired: [
|
|
127
|
+
'status'
|
|
128
|
+
],
|
|
129
|
+
fields: {
|
|
130
|
+
id: str('Order id.'),
|
|
131
|
+
object: OBJECT_FIELD('order'),
|
|
132
|
+
number: int('Human-facing order number.'),
|
|
133
|
+
status: str('Order status.'),
|
|
134
|
+
channel: str('`online` by default. Older orders carry no stored value, so `?channel=online` drops them after the read.'),
|
|
135
|
+
currency: str('ISO 4217 code.'),
|
|
136
|
+
customerEmail: nullable(str('Customer email.')),
|
|
137
|
+
customerName: nullable(str('Customer name.')),
|
|
138
|
+
lineItems: {
|
|
139
|
+
type: 'array',
|
|
140
|
+
description: 'What was bought.',
|
|
141
|
+
items: {
|
|
142
|
+
type: 'object',
|
|
143
|
+
additionalProperties: true
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
totals: objectOf('Money totals, in the smallest unit of `currency`.'),
|
|
147
|
+
refundedCents: int('Amount refunded so far.'),
|
|
148
|
+
disputed: bool('Whether a chargeback is open.'),
|
|
149
|
+
shippingAddress: ADDRESS(),
|
|
150
|
+
couponCode: nullable(str('Coupon applied.')),
|
|
151
|
+
fulfillments: {
|
|
152
|
+
type: 'array',
|
|
153
|
+
description: 'Shipments and deliveries.',
|
|
154
|
+
items: {
|
|
155
|
+
type: 'object',
|
|
156
|
+
additionalProperties: true
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
created: STAMPS.created
|
|
160
|
+
},
|
|
161
|
+
ops: [
|
|
162
|
+
{
|
|
163
|
+
path: '/v1/sites/{siteId}/orders',
|
|
164
|
+
method: 'get',
|
|
165
|
+
operationId: 'listOrders',
|
|
166
|
+
summary: 'List orders',
|
|
167
|
+
list: true,
|
|
168
|
+
returns: 'Order',
|
|
169
|
+
filters: [
|
|
170
|
+
q('channel', '`online` is a default rather than a stored value, so filtering on it drops older orders after the read.'),
|
|
171
|
+
q('status', 'Order status.')
|
|
172
|
+
],
|
|
173
|
+
pathParams: [
|
|
174
|
+
{
|
|
175
|
+
name: 'siteId',
|
|
176
|
+
description: 'Site id.'
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
path: '/v1/sites/{siteId}/orders/{orderId}',
|
|
182
|
+
method: 'get',
|
|
183
|
+
operationId: 'getOrder',
|
|
184
|
+
summary: 'Retrieve an order',
|
|
185
|
+
returns: 'Order',
|
|
186
|
+
pathParams: [
|
|
187
|
+
{
|
|
188
|
+
name: 'siteId',
|
|
189
|
+
description: 'Site id.'
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: 'orderId',
|
|
193
|
+
description: 'Order id.'
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
path: '/v1/sites/{siteId}/orders/{orderId}',
|
|
199
|
+
method: 'patch',
|
|
200
|
+
operationId: 'updateOrder',
|
|
201
|
+
summary: 'Move an order’s status',
|
|
202
|
+
accepts: 'OrderWrite',
|
|
203
|
+
returns: 'Order',
|
|
204
|
+
description: 'An illegal transition is `409 conflict` (`code: "order_transition"`), and the message names the status it is in.',
|
|
205
|
+
pathParams: [
|
|
206
|
+
{
|
|
207
|
+
name: 'siteId',
|
|
208
|
+
description: 'Site id.'
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: 'orderId',
|
|
212
|
+
description: 'Order id.'
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
]
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
//# sourceMappingURL=openapi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../libs/plugins/commerce/src/lib/server/api-v1/openapi.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n type ApiV1ResourceDescription,\n booleanField as bool,\n integerField as int,\n nullableField as nullable,\n objectKindField as OBJECT_FIELD,\n openObjectField as objectOf,\n postalAddressField as ADDRESS,\n queryParam as q,\n RECORD_STAMPS as STAMPS,\n stringField as str,\n stringListField as strList,\n} from '@aglyn/tenant-data-admin/server/api-v1-description'\n\n/**\n * A site's products and orders as the customer API's OpenAPI document\n * describes them — what the console's builder turns into paths, tags and\n * schemas, and the MCP tools derive from. Transcribed unchanged from the\n * builder's own list when the resources moved here (AGL-3080);\n * `api-v1-openapi.spec.ts` holds the document to every endpoint the\n * documentation promises.\n */\nexport const PRODUCTS_API_V1_DESCRIPTION: ApiV1ResourceDescription = {\n tag: 'Products',\n description: 'A site’s catalog. Read-only over the API.',\n schemaName: 'Product',\n required: ['id', 'object', 'name'],\n fields: {\n id: str('Product id.'),\n object: OBJECT_FIELD('product'),\n name: str('Product name.'),\n slug: str('URL slug.'),\n description: nullable(str('Description.')),\n type: str('Product type.'),\n status: str('Publication status.'),\n tags: strList('Free-form tags.'),\n categoryIds: strList('Categories this product belongs to.'),\n mediaUrls: strList('Image URLs.'),\n options: { type: 'array', description: 'Option definitions, e.g. size.', items: { type: 'object', additionalProperties: true } },\n variants: { type: 'array', description: 'Purchasable variants.', items: { type: 'object', additionalProperties: true } },\n inventory: nullable(int('Stock on hand, when tracked.')),\n subscription: nullable(objectOf('Subscription terms, when the product is one.')),\n ...STAMPS,\n },\n ops: [\n { path: '/v1/sites/{siteId}/products', method: 'get', operationId: 'listProducts', summary: 'List products', list: true, returns: 'Product', description: 'Rows deleted since they were written are dropped after the read, so pages can come back short.', pathParams: [{ name: 'siteId', description: 'Site id.' }] },\n { path: '/v1/sites/{siteId}/products/{productId}', method: 'get', operationId: 'getProduct', summary: 'Retrieve a product', returns: 'Product', pathParams: [{ name: 'siteId', description: 'Site id.' }, { name: 'productId', description: 'Product id.' }] },\n ],\n}\n\nexport const ORDERS_API_V1_DESCRIPTION: ApiV1ResourceDescription = {\n tag: 'Orders',\n description: 'A site’s orders. Status moves are constrained.',\n schemaName: 'Order',\n required: ['id', 'object', 'number', 'status'],\n writable: ['status', 'carrier', 'trackingNumber'],\n writeOnly: {\n status: { type: 'string', enum: ['fulfilled', 'delivered'], description: 'The status to move the order to.' },\n carrier: str('Free text, e.g. `UPS`. Trimmed to 40 characters.'),\n trackingNumber: str('Free text. Trimmed to 60 characters.'),\n },\n writeRequired: ['status'],\n fields: {\n id: str('Order id.'),\n object: OBJECT_FIELD('order'),\n number: int('Human-facing order number.'),\n status: str('Order status.'),\n channel: str('`online` by default. Older orders carry no stored value, so `?channel=online` drops them after the read.'),\n currency: str('ISO 4217 code.'),\n customerEmail: nullable(str('Customer email.')),\n customerName: nullable(str('Customer name.')),\n lineItems: { type: 'array', description: 'What was bought.', items: { type: 'object', additionalProperties: true } },\n totals: objectOf('Money totals, in the smallest unit of `currency`.'),\n refundedCents: int('Amount refunded so far.'),\n disputed: bool('Whether a chargeback is open.'),\n shippingAddress: ADDRESS(),\n couponCode: nullable(str('Coupon applied.')),\n fulfillments: { type: 'array', description: 'Shipments and deliveries.', items: { type: 'object', additionalProperties: true } },\n created: STAMPS.created,\n },\n ops: [\n { path: '/v1/sites/{siteId}/orders', method: 'get', operationId: 'listOrders', summary: 'List orders', list: true, returns: 'Order', filters: [q('channel', '`online` is a default rather than a stored value, so filtering on it drops older orders after the read.'), q('status', 'Order status.')], pathParams: [{ name: 'siteId', description: 'Site id.' }] },\n { path: '/v1/sites/{siteId}/orders/{orderId}', method: 'get', operationId: 'getOrder', summary: 'Retrieve an order', returns: 'Order', pathParams: [{ name: 'siteId', description: 'Site id.' }, { name: 'orderId', description: 'Order id.' }] },\n { path: '/v1/sites/{siteId}/orders/{orderId}', method: 'patch', operationId: 'updateOrder', summary: 'Move an order’s status', accepts: 'OrderWrite', returns: 'Order', description: 'An illegal transition is `409 conflict` (`code: \"order_transition\"`), and the message names the status it is in.', pathParams: [{ name: 'siteId', description: 'Site id.' }, { name: 'orderId', description: 'Order id.' }] },\n ],\n}\n"],"names":["booleanField","bool","integerField","int","nullableField","nullable","objectKindField","OBJECT_FIELD","openObjectField","objectOf","postalAddressField","ADDRESS","queryParam","q","RECORD_STAMPS","STAMPS","stringField","str","stringListField","strList","PRODUCTS_API_V1_DESCRIPTION","tag","description","schemaName","required","fields","id","object","name","slug","type","status","tags","categoryIds","mediaUrls","options","items","additionalProperties","variants","inventory","subscription","ops","path","method","operationId","summary","list","returns","pathParams","ORDERS_API_V1_DESCRIPTION","writable","writeOnly","enum","carrier","trackingNumber","writeRequired","number","channel","currency","customerEmail","customerName","lineItems","totals","refundedCents","disputed","shippingAddress","couponCode","fulfillments","created","filters","accepts"],"mappings":"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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { type ApiV1Context } from '@aglyn/tenant-data-admin/server/api-v1-kit';
|
|
18
|
+
export declare function handleOrders(request: Request, ctx: ApiV1Context, segments: string[], url: URL): Promise<Response>;
|
|
19
|
+
export declare function handleProducts(request: Request, ctx: ApiV1Context, segments: string[], url: URL): Promise<Response>;
|