@minipim/sdk 0.4.0 → 0.5.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 +37 -0
- package/dist/index.cjs +6 -2
- package/dist/index.d.cts +13 -6
- package/dist/index.d.ts +13 -6
- package/dist/index.js +6 -2
- package/dist/openapi.d.cts +1143 -138
- package/dist/openapi.d.ts +1143 -138
- package/package.json +1 -1
package/dist/openapi.d.cts
CHANGED
|
@@ -143,9 +143,12 @@ interface paths {
|
|
|
143
143
|
put?: never;
|
|
144
144
|
/**
|
|
145
145
|
* Create an organization (tenant)
|
|
146
|
-
* @description Creates a new tenant
|
|
146
|
+
* @description Creates a new tenant. Two callers:
|
|
147
147
|
*
|
|
148
|
-
*
|
|
148
|
+
* - **Self-serve** (a logged-in user already in some org): the caller becomes the new org's admin.
|
|
149
|
+
* - **Service provisioning** (`x-pim-service-key` header): the org is created *on behalf of* the `initialAdmin` (email or userId) — an existing user is seated as admin immediately; a not-yet-registered email gets a pending admin invite that auto-claims on sign-in. This is how the hosted control plane creates client orgs, and how OSS operators script tenant provisioning.
|
|
150
|
+
*
|
|
151
|
+
* Emits `organization.created` on both paths. Blocked entirely in `single` tenant mode — the deployment ships one bootstrap org and that's the entire surface.
|
|
149
152
|
*/
|
|
150
153
|
post: {
|
|
151
154
|
parameters: {
|
|
@@ -164,6 +167,12 @@ interface paths {
|
|
|
164
167
|
default_channel?: string;
|
|
165
168
|
default_currency?: string;
|
|
166
169
|
};
|
|
170
|
+
initialAdmin?: {
|
|
171
|
+
/** Format: email */
|
|
172
|
+
email?: string;
|
|
173
|
+
/** Format: uuid */
|
|
174
|
+
userId?: string;
|
|
175
|
+
};
|
|
167
176
|
};
|
|
168
177
|
};
|
|
169
178
|
};
|
|
@@ -205,6 +214,21 @@ interface paths {
|
|
|
205
214
|
};
|
|
206
215
|
};
|
|
207
216
|
/** @description Default Response */
|
|
217
|
+
404: {
|
|
218
|
+
headers: {
|
|
219
|
+
[name: string]: unknown;
|
|
220
|
+
};
|
|
221
|
+
content: {
|
|
222
|
+
"application/json": {
|
|
223
|
+
error: {
|
|
224
|
+
code: string;
|
|
225
|
+
message: string;
|
|
226
|
+
details?: unknown;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
/** @description Default Response */
|
|
208
232
|
422: {
|
|
209
233
|
headers: {
|
|
210
234
|
[name: string]: unknown;
|
|
@@ -364,6 +388,103 @@ interface paths {
|
|
|
364
388
|
};
|
|
365
389
|
trace?: never;
|
|
366
390
|
};
|
|
391
|
+
"/v1/organizations/{id}": {
|
|
392
|
+
parameters: {
|
|
393
|
+
query?: never;
|
|
394
|
+
header?: never;
|
|
395
|
+
path?: never;
|
|
396
|
+
cookie?: never;
|
|
397
|
+
};
|
|
398
|
+
get?: never;
|
|
399
|
+
put?: never;
|
|
400
|
+
post?: never;
|
|
401
|
+
/**
|
|
402
|
+
* Delete an organization (tenant) — irreversible
|
|
403
|
+
* @description Exports the tenant to storage, emits `organization.deleted`, then hard-cascade-deletes it. The caller must be an `admin` of the target org (the one they are currently in), and `confirm` must equal the org slug. Never calls out to connected platforms: the cascade is DB-local and emits no per-entity events, so no destructive webhooks are sent.
|
|
404
|
+
*/
|
|
405
|
+
delete: {
|
|
406
|
+
parameters: {
|
|
407
|
+
query?: never;
|
|
408
|
+
header?: never;
|
|
409
|
+
path: {
|
|
410
|
+
id: string;
|
|
411
|
+
};
|
|
412
|
+
cookie?: never;
|
|
413
|
+
};
|
|
414
|
+
requestBody: {
|
|
415
|
+
content: {
|
|
416
|
+
"application/json": {
|
|
417
|
+
confirm: string;
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
responses: {
|
|
422
|
+
/** @description Default Response */
|
|
423
|
+
200: {
|
|
424
|
+
headers: {
|
|
425
|
+
[name: string]: unknown;
|
|
426
|
+
};
|
|
427
|
+
content: {
|
|
428
|
+
"application/json": {
|
|
429
|
+
exportKey: string;
|
|
430
|
+
deletedCounts: {
|
|
431
|
+
[key: string]: number;
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
};
|
|
436
|
+
/** @description Default Response */
|
|
437
|
+
403: {
|
|
438
|
+
headers: {
|
|
439
|
+
[name: string]: unknown;
|
|
440
|
+
};
|
|
441
|
+
content: {
|
|
442
|
+
"application/json": {
|
|
443
|
+
error: {
|
|
444
|
+
code: string;
|
|
445
|
+
message: string;
|
|
446
|
+
details?: unknown;
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
/** @description Default Response */
|
|
452
|
+
404: {
|
|
453
|
+
headers: {
|
|
454
|
+
[name: string]: unknown;
|
|
455
|
+
};
|
|
456
|
+
content: {
|
|
457
|
+
"application/json": {
|
|
458
|
+
error: {
|
|
459
|
+
code: string;
|
|
460
|
+
message: string;
|
|
461
|
+
details?: unknown;
|
|
462
|
+
};
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
/** @description Default Response */
|
|
467
|
+
422: {
|
|
468
|
+
headers: {
|
|
469
|
+
[name: string]: unknown;
|
|
470
|
+
};
|
|
471
|
+
content: {
|
|
472
|
+
"application/json": {
|
|
473
|
+
error: {
|
|
474
|
+
code: string;
|
|
475
|
+
message: string;
|
|
476
|
+
details?: unknown;
|
|
477
|
+
};
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
};
|
|
481
|
+
};
|
|
482
|
+
};
|
|
483
|
+
options?: never;
|
|
484
|
+
head?: never;
|
|
485
|
+
patch?: never;
|
|
486
|
+
trace?: never;
|
|
487
|
+
};
|
|
367
488
|
"/v1/attribute-groups": {
|
|
368
489
|
parameters: {
|
|
369
490
|
query?: never;
|
|
@@ -511,7 +632,7 @@ interface paths {
|
|
|
511
632
|
[key: string]: unknown;
|
|
512
633
|
};
|
|
513
634
|
/** @enum {string} */
|
|
514
|
-
type: "text" | "textarea" | "richtext" | "number" | "decimal" | "boolean" | "date" | "datetime" | "select" | "multiselect" | "reference" | "media" | "measurement" | "url" | "email" | "json" | "money" | "tags";
|
|
635
|
+
type: "text" | "textarea" | "richtext" | "number" | "decimal" | "boolean" | "date" | "datetime" | "select" | "multiselect" | "reference" | "media" | "measurement" | "url" | "email" | "json" | "money" | "tags" | "file";
|
|
515
636
|
/** Format: uuid */
|
|
516
637
|
groupId: string | null;
|
|
517
638
|
isLocalizable: boolean;
|
|
@@ -552,7 +673,7 @@ interface paths {
|
|
|
552
673
|
[key: string]: string;
|
|
553
674
|
};
|
|
554
675
|
/** @enum {string} */
|
|
555
|
-
type: "text" | "textarea" | "richtext" | "number" | "decimal" | "boolean" | "date" | "datetime" | "select" | "multiselect" | "reference" | "media" | "measurement" | "url" | "email" | "json" | "money" | "tags";
|
|
676
|
+
type: "text" | "textarea" | "richtext" | "number" | "decimal" | "boolean" | "date" | "datetime" | "select" | "multiselect" | "reference" | "media" | "measurement" | "url" | "email" | "json" | "money" | "tags" | "file";
|
|
556
677
|
/** Format: uuid */
|
|
557
678
|
groupId?: string | null;
|
|
558
679
|
/** @default false */
|
|
@@ -593,7 +714,7 @@ interface paths {
|
|
|
593
714
|
[key: string]: unknown;
|
|
594
715
|
};
|
|
595
716
|
/** @enum {string} */
|
|
596
|
-
type: "text" | "textarea" | "richtext" | "number" | "decimal" | "boolean" | "date" | "datetime" | "select" | "multiselect" | "reference" | "media" | "measurement" | "url" | "email" | "json" | "money" | "tags";
|
|
717
|
+
type: "text" | "textarea" | "richtext" | "number" | "decimal" | "boolean" | "date" | "datetime" | "select" | "multiselect" | "reference" | "media" | "measurement" | "url" | "email" | "json" | "money" | "tags" | "file";
|
|
597
718
|
/** Format: uuid */
|
|
598
719
|
groupId: string | null;
|
|
599
720
|
isLocalizable: boolean;
|
|
@@ -674,7 +795,7 @@ interface paths {
|
|
|
674
795
|
[key: string]: unknown;
|
|
675
796
|
};
|
|
676
797
|
/** @enum {string} */
|
|
677
|
-
type: "text" | "textarea" | "richtext" | "number" | "decimal" | "boolean" | "date" | "datetime" | "select" | "multiselect" | "reference" | "media" | "measurement" | "url" | "email" | "json" | "money" | "tags";
|
|
798
|
+
type: "text" | "textarea" | "richtext" | "number" | "decimal" | "boolean" | "date" | "datetime" | "select" | "multiselect" | "reference" | "media" | "measurement" | "url" | "email" | "json" | "money" | "tags" | "file";
|
|
678
799
|
/** Format: uuid */
|
|
679
800
|
groupId: string | null;
|
|
680
801
|
isLocalizable: boolean;
|
|
@@ -770,7 +891,7 @@ interface paths {
|
|
|
770
891
|
[key: string]: string;
|
|
771
892
|
};
|
|
772
893
|
/** @enum {string} */
|
|
773
|
-
type?: "text" | "textarea" | "richtext" | "number" | "decimal" | "boolean" | "date" | "datetime" | "select" | "multiselect" | "reference" | "media" | "measurement" | "url" | "email" | "json" | "money" | "tags";
|
|
894
|
+
type?: "text" | "textarea" | "richtext" | "number" | "decimal" | "boolean" | "date" | "datetime" | "select" | "multiselect" | "reference" | "media" | "measurement" | "url" | "email" | "json" | "money" | "tags" | "file";
|
|
774
895
|
/** Format: uuid */
|
|
775
896
|
groupId?: string | null;
|
|
776
897
|
/** @default false */
|
|
@@ -811,7 +932,7 @@ interface paths {
|
|
|
811
932
|
[key: string]: unknown;
|
|
812
933
|
};
|
|
813
934
|
/** @enum {string} */
|
|
814
|
-
type: "text" | "textarea" | "richtext" | "number" | "decimal" | "boolean" | "date" | "datetime" | "select" | "multiselect" | "reference" | "media" | "measurement" | "url" | "email" | "json" | "money" | "tags";
|
|
935
|
+
type: "text" | "textarea" | "richtext" | "number" | "decimal" | "boolean" | "date" | "datetime" | "select" | "multiselect" | "reference" | "media" | "measurement" | "url" | "email" | "json" | "money" | "tags" | "file";
|
|
815
936
|
/** Format: uuid */
|
|
816
937
|
groupId: string | null;
|
|
817
938
|
isLocalizable: boolean;
|
|
@@ -1042,10 +1163,140 @@ interface paths {
|
|
|
1042
1163
|
};
|
|
1043
1164
|
put?: never;
|
|
1044
1165
|
post?: never;
|
|
1045
|
-
|
|
1166
|
+
/**
|
|
1167
|
+
* Delete an attribute family
|
|
1168
|
+
* @description Refuses (409) while any product still uses the family — the FK is ON DELETE RESTRICT. Reassign or delete those products first. Attribute attachments (the join rows) cascade away.
|
|
1169
|
+
*/
|
|
1170
|
+
delete: {
|
|
1171
|
+
parameters: {
|
|
1172
|
+
query?: never;
|
|
1173
|
+
header?: never;
|
|
1174
|
+
path: {
|
|
1175
|
+
id: string;
|
|
1176
|
+
};
|
|
1177
|
+
cookie?: never;
|
|
1178
|
+
};
|
|
1179
|
+
requestBody?: never;
|
|
1180
|
+
responses: {
|
|
1181
|
+
/** @description Default Response */
|
|
1182
|
+
204: {
|
|
1183
|
+
headers: {
|
|
1184
|
+
[name: string]: unknown;
|
|
1185
|
+
};
|
|
1186
|
+
content: {
|
|
1187
|
+
"application/json": "null" | null;
|
|
1188
|
+
};
|
|
1189
|
+
};
|
|
1190
|
+
/** @description Default Response */
|
|
1191
|
+
404: {
|
|
1192
|
+
headers: {
|
|
1193
|
+
[name: string]: unknown;
|
|
1194
|
+
};
|
|
1195
|
+
content: {
|
|
1196
|
+
"application/json": {
|
|
1197
|
+
error: {
|
|
1198
|
+
code: string;
|
|
1199
|
+
message: string;
|
|
1200
|
+
details?: unknown;
|
|
1201
|
+
};
|
|
1202
|
+
};
|
|
1203
|
+
};
|
|
1204
|
+
};
|
|
1205
|
+
/** @description Default Response */
|
|
1206
|
+
409: {
|
|
1207
|
+
headers: {
|
|
1208
|
+
[name: string]: unknown;
|
|
1209
|
+
};
|
|
1210
|
+
content: {
|
|
1211
|
+
"application/json": {
|
|
1212
|
+
error: {
|
|
1213
|
+
code: string;
|
|
1214
|
+
message: string;
|
|
1215
|
+
details?: unknown;
|
|
1216
|
+
};
|
|
1217
|
+
};
|
|
1218
|
+
};
|
|
1219
|
+
};
|
|
1220
|
+
};
|
|
1221
|
+
};
|
|
1046
1222
|
options?: never;
|
|
1047
1223
|
head?: never;
|
|
1048
|
-
|
|
1224
|
+
/** Update an attribute family (label, description) */
|
|
1225
|
+
patch: {
|
|
1226
|
+
parameters: {
|
|
1227
|
+
query?: never;
|
|
1228
|
+
header?: never;
|
|
1229
|
+
path: {
|
|
1230
|
+
id: string;
|
|
1231
|
+
};
|
|
1232
|
+
cookie?: never;
|
|
1233
|
+
};
|
|
1234
|
+
requestBody: {
|
|
1235
|
+
content: {
|
|
1236
|
+
"application/json": {
|
|
1237
|
+
label?: {
|
|
1238
|
+
[key: string]: string;
|
|
1239
|
+
};
|
|
1240
|
+
description?: string | null;
|
|
1241
|
+
};
|
|
1242
|
+
};
|
|
1243
|
+
};
|
|
1244
|
+
responses: {
|
|
1245
|
+
/** @description Default Response */
|
|
1246
|
+
200: {
|
|
1247
|
+
headers: {
|
|
1248
|
+
[name: string]: unknown;
|
|
1249
|
+
};
|
|
1250
|
+
content: {
|
|
1251
|
+
"application/json": {
|
|
1252
|
+
/** Format: uuid */
|
|
1253
|
+
id: string;
|
|
1254
|
+
/** Format: uuid */
|
|
1255
|
+
organizationId: string;
|
|
1256
|
+
/** Format: date-time */
|
|
1257
|
+
createdAt: string;
|
|
1258
|
+
/** Format: date-time */
|
|
1259
|
+
updatedAt: string;
|
|
1260
|
+
code: string;
|
|
1261
|
+
label: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
1262
|
+
[key: string]: unknown;
|
|
1263
|
+
};
|
|
1264
|
+
description: string | null;
|
|
1265
|
+
};
|
|
1266
|
+
};
|
|
1267
|
+
};
|
|
1268
|
+
/** @description Default Response */
|
|
1269
|
+
404: {
|
|
1270
|
+
headers: {
|
|
1271
|
+
[name: string]: unknown;
|
|
1272
|
+
};
|
|
1273
|
+
content: {
|
|
1274
|
+
"application/json": {
|
|
1275
|
+
error: {
|
|
1276
|
+
code: string;
|
|
1277
|
+
message: string;
|
|
1278
|
+
details?: unknown;
|
|
1279
|
+
};
|
|
1280
|
+
};
|
|
1281
|
+
};
|
|
1282
|
+
};
|
|
1283
|
+
/** @description Default Response */
|
|
1284
|
+
422: {
|
|
1285
|
+
headers: {
|
|
1286
|
+
[name: string]: unknown;
|
|
1287
|
+
};
|
|
1288
|
+
content: {
|
|
1289
|
+
"application/json": {
|
|
1290
|
+
error: {
|
|
1291
|
+
code: string;
|
|
1292
|
+
message: string;
|
|
1293
|
+
details?: unknown;
|
|
1294
|
+
};
|
|
1295
|
+
};
|
|
1296
|
+
};
|
|
1297
|
+
};
|
|
1298
|
+
};
|
|
1299
|
+
};
|
|
1049
1300
|
trace?: never;
|
|
1050
1301
|
};
|
|
1051
1302
|
"/v1/attribute-families/{id}/attributes": {
|
|
@@ -1217,6 +1468,51 @@ interface paths {
|
|
|
1217
1468
|
* Iterate by reading `hasMore`. Pass `?withTotal=true` to add a `total`
|
|
1218
1469
|
* field (costs one COUNT query). Default `limit` is 50, **max 200**.
|
|
1219
1470
|
* Reconcile after downtime with `?updatedSince=<iso8601>`.
|
|
1471
|
+
*
|
|
1472
|
+
* ### Filtering by category
|
|
1473
|
+
*
|
|
1474
|
+
* `?categoryId=` is **self-only**: it matches products assigned directly to
|
|
1475
|
+
* that category and nothing filed beneath it. Many catalogs assign products
|
|
1476
|
+
* only to leaf categories, so a self-only filter on a parent legitimately
|
|
1477
|
+
* returns zero rows.
|
|
1478
|
+
*
|
|
1479
|
+
* Add `?includeDescendants=true` to match the category **and its entire
|
|
1480
|
+
* subtree**, resolved server-side in a single query:
|
|
1481
|
+
*
|
|
1482
|
+
* ```bash
|
|
1483
|
+
* # Every product anywhere under "Backdrops", paginated normally
|
|
1484
|
+
* curl 'https://api.minipim.com/v1/products?categoryId=8d2a1f3c-...&includeDescendants=true&limit=50'
|
|
1485
|
+
* ```
|
|
1486
|
+
*
|
|
1487
|
+
* Prefer this over fetching the tree and issuing one request per descendant —
|
|
1488
|
+
* it is one round trip, and it paginates as a single result set.
|
|
1489
|
+
*
|
|
1490
|
+
* ### Sorting and filtering by price (or any numeric attribute)
|
|
1491
|
+
*
|
|
1492
|
+
* Price is not a column — it is an attribute, and its **code is per-organization
|
|
1493
|
+
* data**, so there is no `sortBy=price`. Name the attribute instead:
|
|
1494
|
+
*
|
|
1495
|
+
* ```bash
|
|
1496
|
+
* # Cheapest first
|
|
1497
|
+
* curl '.../v1/products?sortBy=attribute&sortAttribute=price&sortDir=asc'
|
|
1498
|
+
*
|
|
1499
|
+
* # Between $10.00 and $50.00 — bounds are INTEGER CENTS for money attributes
|
|
1500
|
+
* curl '.../v1/products?filterAttribute=price&filterMin=1000&filterMax=5000'
|
|
1501
|
+
* ```
|
|
1502
|
+
*
|
|
1503
|
+
* - Works on `money`, `number` and `decimal` attributes. `measurement` is
|
|
1504
|
+
* refused: its values carry a unit, so ordering raw amounts would rank 5 g
|
|
1505
|
+
* above 2 kg.
|
|
1506
|
+
* - For `money`, bounds and ordering use `amount_cents`. **`filterMin=1000`
|
|
1507
|
+
* is $10.00.** No currency conversion happens — mixed-currency catalogs are
|
|
1508
|
+
* compared by number, so scope the query to one currency if that matters.
|
|
1509
|
+
* - The value read is the one at the **default scope** (no locale, no channel).
|
|
1510
|
+
* A product with no default-scope value sorts **last** in both directions and
|
|
1511
|
+
* is excluded by either bound — it has no price, rather than a price of zero.
|
|
1512
|
+
* - Unknown code, or a code of the wrong type, is a **422** naming the problem.
|
|
1513
|
+
* It never silently degrades to `name` ordering.
|
|
1514
|
+
* - `sortAttribute` and `filterAttribute` are independent; set both to the
|
|
1515
|
+
* same code for the usual "cheapest first, within a budget" query.
|
|
1220
1516
|
*/
|
|
1221
1517
|
get: {
|
|
1222
1518
|
parameters: {
|
|
@@ -1225,15 +1521,20 @@ interface paths {
|
|
|
1225
1521
|
q?: string;
|
|
1226
1522
|
familyId?: string;
|
|
1227
1523
|
categoryId?: string;
|
|
1524
|
+
includeDescendants?: boolean | ("true" | "false" | "1" | "0");
|
|
1228
1525
|
brand?: string;
|
|
1229
1526
|
tag?: string | string[];
|
|
1230
1527
|
connectorId?: string;
|
|
1231
1528
|
updatedSince?: string;
|
|
1232
|
-
sortBy?: "name" | "slug" | "status" | "updatedAt" | "createdAt" | "relevance";
|
|
1529
|
+
sortBy?: "name" | "slug" | "status" | "updatedAt" | "createdAt" | "relevance" | "attribute";
|
|
1530
|
+
sortAttribute?: string;
|
|
1531
|
+
filterAttribute?: string;
|
|
1532
|
+
filterMin?: number;
|
|
1533
|
+
filterMax?: number;
|
|
1233
1534
|
sortDir?: "asc" | "desc";
|
|
1234
1535
|
limit?: number;
|
|
1235
1536
|
offset?: number;
|
|
1236
|
-
withTotal?: boolean;
|
|
1537
|
+
withTotal?: boolean | ("true" | "false" | "1" | "0");
|
|
1237
1538
|
locale?: string;
|
|
1238
1539
|
channel?: string;
|
|
1239
1540
|
};
|
|
@@ -1356,7 +1657,7 @@ interface paths {
|
|
|
1356
1657
|
};
|
|
1357
1658
|
};
|
|
1358
1659
|
/** @description Default Response */
|
|
1359
|
-
|
|
1660
|
+
409: {
|
|
1360
1661
|
headers: {
|
|
1361
1662
|
[name: string]: unknown;
|
|
1362
1663
|
};
|
|
@@ -1370,8 +1671,23 @@ interface paths {
|
|
|
1370
1671
|
};
|
|
1371
1672
|
};
|
|
1372
1673
|
};
|
|
1373
|
-
|
|
1374
|
-
|
|
1674
|
+
/** @description Default Response */
|
|
1675
|
+
422: {
|
|
1676
|
+
headers: {
|
|
1677
|
+
[name: string]: unknown;
|
|
1678
|
+
};
|
|
1679
|
+
content: {
|
|
1680
|
+
"application/json": {
|
|
1681
|
+
error: {
|
|
1682
|
+
code: string;
|
|
1683
|
+
message: string;
|
|
1684
|
+
details?: unknown;
|
|
1685
|
+
};
|
|
1686
|
+
};
|
|
1687
|
+
};
|
|
1688
|
+
};
|
|
1689
|
+
};
|
|
1690
|
+
};
|
|
1375
1691
|
delete?: never;
|
|
1376
1692
|
options?: never;
|
|
1377
1693
|
head?: never;
|
|
@@ -1396,11 +1712,16 @@ interface paths {
|
|
|
1396
1712
|
q?: string;
|
|
1397
1713
|
familyId?: string;
|
|
1398
1714
|
categoryId?: string;
|
|
1715
|
+
includeDescendants?: boolean | ("true" | "false" | "1" | "0");
|
|
1399
1716
|
brand?: string;
|
|
1400
1717
|
tag?: string | string[];
|
|
1401
1718
|
connectorId?: string;
|
|
1402
1719
|
updatedSince?: string;
|
|
1403
|
-
sortBy?: "name" | "slug" | "status" | "updatedAt" | "createdAt" | "relevance";
|
|
1720
|
+
sortBy?: "name" | "slug" | "status" | "updatedAt" | "createdAt" | "relevance" | "attribute";
|
|
1721
|
+
sortAttribute?: string;
|
|
1722
|
+
filterAttribute?: string;
|
|
1723
|
+
filterMin?: number;
|
|
1724
|
+
filterMax?: number;
|
|
1404
1725
|
sortDir?: "asc" | "desc";
|
|
1405
1726
|
locale?: string;
|
|
1406
1727
|
channel?: string;
|
|
@@ -1526,6 +1847,13 @@ interface paths {
|
|
|
1526
1847
|
* `(locale, null)` → `(null, channel)` → `(null, null)`. Missing
|
|
1527
1848
|
* attributes are simply absent from the resolved map (no nulls).
|
|
1528
1849
|
*
|
|
1850
|
+
* `modifierCount` and `hasRequiredModifiers` summarize the product's
|
|
1851
|
+
* order-line options (engraving, add-ons, print choices, …). A PDP with
|
|
1852
|
+
* `hasRequiredModifiers: true` must not let a customer check out without
|
|
1853
|
+
* resolving them — fetch the full list from
|
|
1854
|
+
* `GET /v1/products/{id}/modifiers`. Modifiers do NOT create SKUs; see
|
|
1855
|
+
* DEVELOPERS.md → "Sellable optionality" for how they relate to variants.
|
|
1856
|
+
*
|
|
1529
1857
|
* **Example response (with ?locale=en_US&channel=headless-main)**
|
|
1530
1858
|
* ```json
|
|
1531
1859
|
* {
|
|
@@ -1556,6 +1884,8 @@ interface paths {
|
|
|
1556
1884
|
* "role": "hero", "position": 0, "altText": { "en_US": "Front view" }
|
|
1557
1885
|
* }
|
|
1558
1886
|
* ],
|
|
1887
|
+
* "modifierCount": 2,
|
|
1888
|
+
* "hasRequiredModifiers": true,
|
|
1559
1889
|
* "createdAt": "...",
|
|
1560
1890
|
* "updatedAt": "..."
|
|
1561
1891
|
* }
|
|
@@ -1625,6 +1955,8 @@ interface paths {
|
|
|
1625
1955
|
[key: string]: string;
|
|
1626
1956
|
} | null;
|
|
1627
1957
|
}[];
|
|
1958
|
+
modifierCount: number;
|
|
1959
|
+
hasRequiredModifiers: boolean;
|
|
1628
1960
|
resolvedAttributes?: {
|
|
1629
1961
|
[key: string]: unknown;
|
|
1630
1962
|
};
|
|
@@ -1865,6 +2197,107 @@ interface paths {
|
|
|
1865
2197
|
patch?: never;
|
|
1866
2198
|
trace?: never;
|
|
1867
2199
|
};
|
|
2200
|
+
"/v1/products/{id}/duplicate": {
|
|
2201
|
+
parameters: {
|
|
2202
|
+
query?: never;
|
|
2203
|
+
header?: never;
|
|
2204
|
+
path?: never;
|
|
2205
|
+
cookie?: never;
|
|
2206
|
+
};
|
|
2207
|
+
get?: never;
|
|
2208
|
+
put?: never;
|
|
2209
|
+
/**
|
|
2210
|
+
* Duplicate a product
|
|
2211
|
+
* @description Deep-copies a product into a new `draft`: family, attributes, tags, categories, modifiers, media associations, outbound relationships and variants. Identifiers (UPC/GTIN/MPN) are NOT copied — they identify a specific physical product. Slug and variant SKUs are regenerated to stay unique. Emits `product.created`.
|
|
2212
|
+
*/
|
|
2213
|
+
post: {
|
|
2214
|
+
parameters: {
|
|
2215
|
+
query?: never;
|
|
2216
|
+
header?: never;
|
|
2217
|
+
path: {
|
|
2218
|
+
id: string;
|
|
2219
|
+
};
|
|
2220
|
+
cookie?: never;
|
|
2221
|
+
};
|
|
2222
|
+
requestBody: {
|
|
2223
|
+
content: {
|
|
2224
|
+
"application/json": unknown | {
|
|
2225
|
+
name?: string;
|
|
2226
|
+
slug?: string;
|
|
2227
|
+
};
|
|
2228
|
+
};
|
|
2229
|
+
};
|
|
2230
|
+
responses: {
|
|
2231
|
+
/** @description Default Response */
|
|
2232
|
+
201: {
|
|
2233
|
+
headers: {
|
|
2234
|
+
[name: string]: unknown;
|
|
2235
|
+
};
|
|
2236
|
+
content: {
|
|
2237
|
+
"application/json": {
|
|
2238
|
+
/** Format: uuid */
|
|
2239
|
+
id: string;
|
|
2240
|
+
/** Format: uuid */
|
|
2241
|
+
organizationId: string;
|
|
2242
|
+
/** Format: date-time */
|
|
2243
|
+
createdAt: string;
|
|
2244
|
+
/** Format: date-time */
|
|
2245
|
+
updatedAt: string;
|
|
2246
|
+
/** Format: uuid */
|
|
2247
|
+
familyId: string;
|
|
2248
|
+
name: string;
|
|
2249
|
+
slug: string;
|
|
2250
|
+
/** @enum {string} */
|
|
2251
|
+
status: "draft" | "active" | "archived";
|
|
2252
|
+
attributes: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
2253
|
+
[key: string]: unknown;
|
|
2254
|
+
};
|
|
2255
|
+
tags: string[];
|
|
2256
|
+
/** Format: uuid */
|
|
2257
|
+
createdBy: string | null;
|
|
2258
|
+
/** Format: uuid */
|
|
2259
|
+
updatedBy: string | null;
|
|
2260
|
+
};
|
|
2261
|
+
};
|
|
2262
|
+
};
|
|
2263
|
+
/** @description Default Response */
|
|
2264
|
+
404: {
|
|
2265
|
+
headers: {
|
|
2266
|
+
[name: string]: unknown;
|
|
2267
|
+
};
|
|
2268
|
+
content: {
|
|
2269
|
+
"application/json": {
|
|
2270
|
+
error: {
|
|
2271
|
+
code: string;
|
|
2272
|
+
message: string;
|
|
2273
|
+
details?: unknown;
|
|
2274
|
+
};
|
|
2275
|
+
};
|
|
2276
|
+
};
|
|
2277
|
+
};
|
|
2278
|
+
/** @description Default Response */
|
|
2279
|
+
409: {
|
|
2280
|
+
headers: {
|
|
2281
|
+
[name: string]: unknown;
|
|
2282
|
+
};
|
|
2283
|
+
content: {
|
|
2284
|
+
"application/json": {
|
|
2285
|
+
error: {
|
|
2286
|
+
code: string;
|
|
2287
|
+
message: string;
|
|
2288
|
+
details?: unknown;
|
|
2289
|
+
};
|
|
2290
|
+
};
|
|
2291
|
+
};
|
|
2292
|
+
};
|
|
2293
|
+
};
|
|
2294
|
+
};
|
|
2295
|
+
delete?: never;
|
|
2296
|
+
options?: never;
|
|
2297
|
+
head?: never;
|
|
2298
|
+
patch?: never;
|
|
2299
|
+
trace?: never;
|
|
2300
|
+
};
|
|
1868
2301
|
"/v1/products/bulk": {
|
|
1869
2302
|
parameters: {
|
|
1870
2303
|
query?: never;
|
|
@@ -3181,7 +3614,47 @@ interface paths {
|
|
|
3181
3614
|
get?: never;
|
|
3182
3615
|
put?: never;
|
|
3183
3616
|
post?: never;
|
|
3184
|
-
|
|
3617
|
+
/**
|
|
3618
|
+
* Delete a channel (surface)
|
|
3619
|
+
* @description Removes a channel and its per-product publish records (ON DELETE CASCADE). The channel stops appearing as a completeness/readiness surface. Channel-scoped attribute values are stored in the product JSONB (not FKs) and are left untouched — they simply no longer resolve to a live channel. Use this to clear a surface left behind after uninstalling the connector that seeded it (channels are decoupled from connectors by design).
|
|
3620
|
+
*/
|
|
3621
|
+
delete: {
|
|
3622
|
+
parameters: {
|
|
3623
|
+
query?: never;
|
|
3624
|
+
header?: never;
|
|
3625
|
+
path: {
|
|
3626
|
+
id: string;
|
|
3627
|
+
};
|
|
3628
|
+
cookie?: never;
|
|
3629
|
+
};
|
|
3630
|
+
requestBody?: never;
|
|
3631
|
+
responses: {
|
|
3632
|
+
/** @description Default Response */
|
|
3633
|
+
204: {
|
|
3634
|
+
headers: {
|
|
3635
|
+
[name: string]: unknown;
|
|
3636
|
+
};
|
|
3637
|
+
content: {
|
|
3638
|
+
"application/json": "null" | null;
|
|
3639
|
+
};
|
|
3640
|
+
};
|
|
3641
|
+
/** @description Default Response */
|
|
3642
|
+
404: {
|
|
3643
|
+
headers: {
|
|
3644
|
+
[name: string]: unknown;
|
|
3645
|
+
};
|
|
3646
|
+
content: {
|
|
3647
|
+
"application/json": {
|
|
3648
|
+
error: {
|
|
3649
|
+
code: string;
|
|
3650
|
+
message: string;
|
|
3651
|
+
details?: unknown;
|
|
3652
|
+
};
|
|
3653
|
+
};
|
|
3654
|
+
};
|
|
3655
|
+
};
|
|
3656
|
+
};
|
|
3657
|
+
};
|
|
3185
3658
|
options?: never;
|
|
3186
3659
|
head?: never;
|
|
3187
3660
|
/**
|
|
@@ -3377,120 +3850,270 @@ interface paths {
|
|
|
3377
3850
|
patch?: never;
|
|
3378
3851
|
trace?: never;
|
|
3379
3852
|
};
|
|
3380
|
-
"/v1/
|
|
3853
|
+
"/v1/locales/{id}": {
|
|
3381
3854
|
parameters: {
|
|
3382
3855
|
query?: never;
|
|
3383
3856
|
header?: never;
|
|
3384
3857
|
path?: never;
|
|
3385
3858
|
cookie?: never;
|
|
3386
3859
|
};
|
|
3860
|
+
get?: never;
|
|
3861
|
+
put?: never;
|
|
3862
|
+
post?: never;
|
|
3387
3863
|
/**
|
|
3388
|
-
*
|
|
3389
|
-
* @description
|
|
3390
|
-
* `position`. Build the hierarchy client-side by joining on `parentId` —
|
|
3391
|
-
* roots have `parentId: null`. `name` is a localized label map keyed by
|
|
3392
|
-
* locale code.
|
|
3393
|
-
*
|
|
3394
|
-
* **Example response**
|
|
3395
|
-
* ```json
|
|
3396
|
-
* [
|
|
3397
|
-
* {
|
|
3398
|
-
* "id": "8d2a1f3c-...",
|
|
3399
|
-
* "parentId": null,
|
|
3400
|
-
* "name": { "en_US": "Banner Stands" },
|
|
3401
|
-
* "slug": "banner-stands",
|
|
3402
|
-
* "position": 0,
|
|
3403
|
-
* "createdAt": "...",
|
|
3404
|
-
* "updatedAt": "..."
|
|
3405
|
-
* },
|
|
3406
|
-
* {
|
|
3407
|
-
* "id": "9e3b2c4d-...",
|
|
3408
|
-
* "parentId": "8d2a1f3c-...",
|
|
3409
|
-
* "name": { "en_US": "24\" - 36\" Banner Stand Displays" },
|
|
3410
|
-
* "slug": "24-36-banner-stand-displays",
|
|
3411
|
-
* "position": 0,
|
|
3412
|
-
* "createdAt": "...",
|
|
3413
|
-
* "updatedAt": "..."
|
|
3414
|
-
* }
|
|
3415
|
-
* ]
|
|
3416
|
-
* ```
|
|
3417
|
-
*
|
|
3418
|
-
* To get a single category's full ancestor path, walk `parentId` upwards
|
|
3419
|
-
* client-side, or hit `GET /v1/categories/{id}` which returns the same row
|
|
3420
|
-
* shape with the resolved path included in `path`.
|
|
3421
|
-
*
|
|
3422
|
-
* Returns the full tree by default. `?limit=` / `?offset=` are supported
|
|
3423
|
-
* for large taxonomies (ordered by `position`); omit them to get everything.
|
|
3864
|
+
* Delete a locale
|
|
3865
|
+
* @description Refuses to delete the default locale — set another default first. Attribute values scoped to this locale are stored in product JSONB (not FKs) and are left untouched; they simply no longer resolve to a live locale.
|
|
3424
3866
|
*/
|
|
3425
|
-
|
|
3867
|
+
delete: {
|
|
3426
3868
|
parameters: {
|
|
3427
|
-
query?:
|
|
3428
|
-
limit?: number;
|
|
3429
|
-
offset?: number;
|
|
3430
|
-
};
|
|
3869
|
+
query?: never;
|
|
3431
3870
|
header?: never;
|
|
3432
|
-
path
|
|
3871
|
+
path: {
|
|
3872
|
+
id: string;
|
|
3873
|
+
};
|
|
3433
3874
|
cookie?: never;
|
|
3434
3875
|
};
|
|
3435
3876
|
requestBody?: never;
|
|
3436
3877
|
responses: {
|
|
3437
3878
|
/** @description Default Response */
|
|
3438
|
-
|
|
3879
|
+
204: {
|
|
3439
3880
|
headers: {
|
|
3440
3881
|
[name: string]: unknown;
|
|
3441
3882
|
};
|
|
3442
3883
|
content: {
|
|
3443
|
-
"application/json":
|
|
3444
|
-
/** Format: uuid */
|
|
3445
|
-
id: string;
|
|
3446
|
-
/** Format: uuid */
|
|
3447
|
-
organizationId: string;
|
|
3448
|
-
/** Format: date-time */
|
|
3449
|
-
createdAt: string;
|
|
3450
|
-
/** Format: date-time */
|
|
3451
|
-
updatedAt: string;
|
|
3452
|
-
/** Format: uuid */
|
|
3453
|
-
parentId: string | null;
|
|
3454
|
-
name: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
3455
|
-
[key: string]: unknown;
|
|
3456
|
-
};
|
|
3457
|
-
slug: string;
|
|
3458
|
-
position: number;
|
|
3459
|
-
/** Format: uuid */
|
|
3460
|
-
channelId: string | null;
|
|
3461
|
-
}[];
|
|
3462
|
-
};
|
|
3463
|
-
};
|
|
3464
|
-
};
|
|
3465
|
-
};
|
|
3466
|
-
put?: never;
|
|
3467
|
-
/** Create a category */
|
|
3468
|
-
post: {
|
|
3469
|
-
parameters: {
|
|
3470
|
-
query?: never;
|
|
3471
|
-
header?: never;
|
|
3472
|
-
path?: never;
|
|
3473
|
-
cookie?: never;
|
|
3474
|
-
};
|
|
3475
|
-
requestBody: {
|
|
3476
|
-
content: {
|
|
3477
|
-
"application/json": {
|
|
3478
|
-
/** Format: uuid */
|
|
3479
|
-
parentId?: string | null;
|
|
3480
|
-
name: {
|
|
3481
|
-
[key: string]: string;
|
|
3482
|
-
};
|
|
3483
|
-
slug: string;
|
|
3484
|
-
/** @default 0 */
|
|
3485
|
-
position?: number;
|
|
3486
|
-
/** Format: uuid */
|
|
3487
|
-
channelId?: string | null;
|
|
3884
|
+
"application/json": "null" | null;
|
|
3488
3885
|
};
|
|
3489
3886
|
};
|
|
3490
|
-
};
|
|
3491
|
-
responses: {
|
|
3492
3887
|
/** @description Default Response */
|
|
3493
|
-
|
|
3888
|
+
404: {
|
|
3889
|
+
headers: {
|
|
3890
|
+
[name: string]: unknown;
|
|
3891
|
+
};
|
|
3892
|
+
content: {
|
|
3893
|
+
"application/json": {
|
|
3894
|
+
error: {
|
|
3895
|
+
code: string;
|
|
3896
|
+
message: string;
|
|
3897
|
+
details?: unknown;
|
|
3898
|
+
};
|
|
3899
|
+
};
|
|
3900
|
+
};
|
|
3901
|
+
};
|
|
3902
|
+
/** @description Default Response */
|
|
3903
|
+
422: {
|
|
3904
|
+
headers: {
|
|
3905
|
+
[name: string]: unknown;
|
|
3906
|
+
};
|
|
3907
|
+
content: {
|
|
3908
|
+
"application/json": {
|
|
3909
|
+
error: {
|
|
3910
|
+
code: string;
|
|
3911
|
+
message: string;
|
|
3912
|
+
details?: unknown;
|
|
3913
|
+
};
|
|
3914
|
+
};
|
|
3915
|
+
};
|
|
3916
|
+
};
|
|
3917
|
+
};
|
|
3918
|
+
};
|
|
3919
|
+
options?: never;
|
|
3920
|
+
head?: never;
|
|
3921
|
+
/**
|
|
3922
|
+
* Update a locale (label, default)
|
|
3923
|
+
* @description Setting `isDefault: true` makes this the org’s sole default — every other locale is un-defaulted in the same transaction.
|
|
3924
|
+
*/
|
|
3925
|
+
patch: {
|
|
3926
|
+
parameters: {
|
|
3927
|
+
query?: never;
|
|
3928
|
+
header?: never;
|
|
3929
|
+
path: {
|
|
3930
|
+
id: string;
|
|
3931
|
+
};
|
|
3932
|
+
cookie?: never;
|
|
3933
|
+
};
|
|
3934
|
+
requestBody: {
|
|
3935
|
+
content: {
|
|
3936
|
+
"application/json": {
|
|
3937
|
+
label?: string;
|
|
3938
|
+
isDefault?: boolean;
|
|
3939
|
+
};
|
|
3940
|
+
};
|
|
3941
|
+
};
|
|
3942
|
+
responses: {
|
|
3943
|
+
/** @description Default Response */
|
|
3944
|
+
200: {
|
|
3945
|
+
headers: {
|
|
3946
|
+
[name: string]: unknown;
|
|
3947
|
+
};
|
|
3948
|
+
content: {
|
|
3949
|
+
"application/json": {
|
|
3950
|
+
/** Format: uuid */
|
|
3951
|
+
id: string;
|
|
3952
|
+
/** Format: uuid */
|
|
3953
|
+
organizationId: string;
|
|
3954
|
+
/** Format: date-time */
|
|
3955
|
+
createdAt: string;
|
|
3956
|
+
/** Format: date-time */
|
|
3957
|
+
updatedAt: string;
|
|
3958
|
+
code: string;
|
|
3959
|
+
label: string;
|
|
3960
|
+
isDefault: boolean;
|
|
3961
|
+
};
|
|
3962
|
+
};
|
|
3963
|
+
};
|
|
3964
|
+
/** @description Default Response */
|
|
3965
|
+
404: {
|
|
3966
|
+
headers: {
|
|
3967
|
+
[name: string]: unknown;
|
|
3968
|
+
};
|
|
3969
|
+
content: {
|
|
3970
|
+
"application/json": {
|
|
3971
|
+
error: {
|
|
3972
|
+
code: string;
|
|
3973
|
+
message: string;
|
|
3974
|
+
details?: unknown;
|
|
3975
|
+
};
|
|
3976
|
+
};
|
|
3977
|
+
};
|
|
3978
|
+
};
|
|
3979
|
+
/** @description Default Response */
|
|
3980
|
+
422: {
|
|
3981
|
+
headers: {
|
|
3982
|
+
[name: string]: unknown;
|
|
3983
|
+
};
|
|
3984
|
+
content: {
|
|
3985
|
+
"application/json": {
|
|
3986
|
+
error: {
|
|
3987
|
+
code: string;
|
|
3988
|
+
message: string;
|
|
3989
|
+
details?: unknown;
|
|
3990
|
+
};
|
|
3991
|
+
};
|
|
3992
|
+
};
|
|
3993
|
+
};
|
|
3994
|
+
};
|
|
3995
|
+
};
|
|
3996
|
+
trace?: never;
|
|
3997
|
+
};
|
|
3998
|
+
"/v1/categories": {
|
|
3999
|
+
parameters: {
|
|
4000
|
+
query?: never;
|
|
4001
|
+
header?: never;
|
|
4002
|
+
path?: never;
|
|
4003
|
+
cookie?: never;
|
|
4004
|
+
};
|
|
4005
|
+
/**
|
|
4006
|
+
* List categories
|
|
4007
|
+
* @description Returns the full category tree, flat, ordered by
|
|
4008
|
+
* `position`. Build the hierarchy client-side by joining on `parentId` —
|
|
4009
|
+
* roots have `parentId: null`. `name` is a localized label map keyed by
|
|
4010
|
+
* locale code.
|
|
4011
|
+
*
|
|
4012
|
+
* **Example response**
|
|
4013
|
+
* ```json
|
|
4014
|
+
* [
|
|
4015
|
+
* {
|
|
4016
|
+
* "id": "8d2a1f3c-...",
|
|
4017
|
+
* "parentId": null,
|
|
4018
|
+
* "name": { "en_US": "Banner Stands" },
|
|
4019
|
+
* "slug": "banner-stands",
|
|
4020
|
+
* "position": 0,
|
|
4021
|
+
* "createdAt": "...",
|
|
4022
|
+
* "updatedAt": "..."
|
|
4023
|
+
* },
|
|
4024
|
+
* {
|
|
4025
|
+
* "id": "9e3b2c4d-...",
|
|
4026
|
+
* "parentId": "8d2a1f3c-...",
|
|
4027
|
+
* "name": { "en_US": "24\" - 36\" Banner Stand Displays" },
|
|
4028
|
+
* "slug": "24-36-banner-stand-displays",
|
|
4029
|
+
* "position": 0,
|
|
4030
|
+
* "createdAt": "...",
|
|
4031
|
+
* "updatedAt": "..."
|
|
4032
|
+
* }
|
|
4033
|
+
* ]
|
|
4034
|
+
* ```
|
|
4035
|
+
*
|
|
4036
|
+
* To get a single category's full ancestor path, walk `parentId` upwards
|
|
4037
|
+
* client-side — this endpoint returns the whole tree in one call, so no extra
|
|
4038
|
+
* requests are needed. (`GET /v1/categories/{id}` returns the same row shape
|
|
4039
|
+
* for one category; it does **not** resolve an ancestor path.)
|
|
4040
|
+
*
|
|
4041
|
+
* To list the products under a category *including* its subtree, use
|
|
4042
|
+
* `GET /v1/products?categoryId=<id>&includeDescendants=true` rather than
|
|
4043
|
+
* resolving descendants here and issuing one request per id.
|
|
4044
|
+
*
|
|
4045
|
+
* Returns the full tree by default. `?limit=` / `?offset=` are supported
|
|
4046
|
+
* for large taxonomies (ordered by `position`); omit them to get everything.
|
|
4047
|
+
*/
|
|
4048
|
+
get: {
|
|
4049
|
+
parameters: {
|
|
4050
|
+
query?: {
|
|
4051
|
+
limit?: number;
|
|
4052
|
+
offset?: number;
|
|
4053
|
+
};
|
|
4054
|
+
header?: never;
|
|
4055
|
+
path?: never;
|
|
4056
|
+
cookie?: never;
|
|
4057
|
+
};
|
|
4058
|
+
requestBody?: never;
|
|
4059
|
+
responses: {
|
|
4060
|
+
/** @description Default Response */
|
|
4061
|
+
200: {
|
|
4062
|
+
headers: {
|
|
4063
|
+
[name: string]: unknown;
|
|
4064
|
+
};
|
|
4065
|
+
content: {
|
|
4066
|
+
"application/json": {
|
|
4067
|
+
/** Format: uuid */
|
|
4068
|
+
id: string;
|
|
4069
|
+
/** Format: uuid */
|
|
4070
|
+
organizationId: string;
|
|
4071
|
+
/** Format: date-time */
|
|
4072
|
+
createdAt: string;
|
|
4073
|
+
/** Format: date-time */
|
|
4074
|
+
updatedAt: string;
|
|
4075
|
+
/** Format: uuid */
|
|
4076
|
+
parentId: string | null;
|
|
4077
|
+
name: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
4078
|
+
[key: string]: unknown;
|
|
4079
|
+
};
|
|
4080
|
+
slug: string;
|
|
4081
|
+
position: number;
|
|
4082
|
+
/** Format: uuid */
|
|
4083
|
+
channelId: string | null;
|
|
4084
|
+
}[];
|
|
4085
|
+
};
|
|
4086
|
+
};
|
|
4087
|
+
};
|
|
4088
|
+
};
|
|
4089
|
+
put?: never;
|
|
4090
|
+
/** Create a category */
|
|
4091
|
+
post: {
|
|
4092
|
+
parameters: {
|
|
4093
|
+
query?: never;
|
|
4094
|
+
header?: never;
|
|
4095
|
+
path?: never;
|
|
4096
|
+
cookie?: never;
|
|
4097
|
+
};
|
|
4098
|
+
requestBody: {
|
|
4099
|
+
content: {
|
|
4100
|
+
"application/json": {
|
|
4101
|
+
/** Format: uuid */
|
|
4102
|
+
parentId?: string | null;
|
|
4103
|
+
name: {
|
|
4104
|
+
[key: string]: string;
|
|
4105
|
+
};
|
|
4106
|
+
slug: string;
|
|
4107
|
+
/** @default 0 */
|
|
4108
|
+
position?: number;
|
|
4109
|
+
/** Format: uuid */
|
|
4110
|
+
channelId?: string | null;
|
|
4111
|
+
};
|
|
4112
|
+
};
|
|
4113
|
+
};
|
|
4114
|
+
responses: {
|
|
4115
|
+
/** @description Default Response */
|
|
4116
|
+
201: {
|
|
3494
4117
|
headers: {
|
|
3495
4118
|
[name: string]: unknown;
|
|
3496
4119
|
};
|
|
@@ -4846,7 +5469,7 @@ interface paths {
|
|
|
4846
5469
|
};
|
|
4847
5470
|
trace?: never;
|
|
4848
5471
|
};
|
|
4849
|
-
"/v1/media/
|
|
5472
|
+
"/v1/media/associations/reorder": {
|
|
4850
5473
|
parameters: {
|
|
4851
5474
|
query?: never;
|
|
4852
5475
|
header?: never;
|
|
@@ -4854,41 +5477,208 @@ interface paths {
|
|
|
4854
5477
|
cookie?: never;
|
|
4855
5478
|
};
|
|
4856
5479
|
get?: never;
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
5480
|
+
/**
|
|
5481
|
+
* Reorder an entity’s media
|
|
5482
|
+
* @description Sets `position` for every association of the given entity from the order of `orderedIds`. Any `hero` association is pinned to position 0. `orderedIds` must contain exactly the entity’s association ids.
|
|
5483
|
+
*/
|
|
5484
|
+
put: {
|
|
4861
5485
|
parameters: {
|
|
4862
5486
|
query?: never;
|
|
4863
5487
|
header?: never;
|
|
4864
|
-
path
|
|
4865
|
-
id: string;
|
|
4866
|
-
};
|
|
5488
|
+
path?: never;
|
|
4867
5489
|
cookie?: never;
|
|
4868
5490
|
};
|
|
4869
|
-
requestBody
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
"application/json": "null" | null;
|
|
5491
|
+
requestBody: {
|
|
5492
|
+
content: {
|
|
5493
|
+
"application/json": {
|
|
5494
|
+
/** @enum {string} */
|
|
5495
|
+
entityType: "product" | "variant";
|
|
5496
|
+
/** Format: uuid */
|
|
5497
|
+
entityId: string;
|
|
5498
|
+
orderedIds: string[];
|
|
4878
5499
|
};
|
|
4879
5500
|
};
|
|
5501
|
+
};
|
|
5502
|
+
responses: {
|
|
4880
5503
|
/** @description Default Response */
|
|
4881
|
-
|
|
5504
|
+
200: {
|
|
4882
5505
|
headers: {
|
|
4883
5506
|
[name: string]: unknown;
|
|
4884
5507
|
};
|
|
4885
5508
|
content: {
|
|
4886
5509
|
"application/json": {
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
5510
|
+
data: {
|
|
5511
|
+
/** Format: uuid */
|
|
5512
|
+
id: string;
|
|
5513
|
+
/** Format: uuid */
|
|
5514
|
+
organizationId: string;
|
|
5515
|
+
/** Format: date-time */
|
|
5516
|
+
createdAt: string;
|
|
5517
|
+
/** Format: date-time */
|
|
5518
|
+
updatedAt: string;
|
|
5519
|
+
/** Format: uuid */
|
|
5520
|
+
mediaId: string;
|
|
5521
|
+
/** @enum {string} */
|
|
5522
|
+
entityType: "product" | "variant";
|
|
5523
|
+
/** Format: uuid */
|
|
5524
|
+
entityId: string;
|
|
5525
|
+
/** @enum {string} */
|
|
5526
|
+
role: "hero" | "gallery" | "thumbnail" | "technical" | "lifestyle" | "swatch";
|
|
5527
|
+
position: number;
|
|
5528
|
+
altText: ((string | number | boolean | ("null" | null)) | unknown[] | {
|
|
5529
|
+
[key: string]: unknown;
|
|
5530
|
+
}) | null;
|
|
5531
|
+
/** Format: uuid */
|
|
5532
|
+
channelId: string | null;
|
|
5533
|
+
}[];
|
|
5534
|
+
};
|
|
5535
|
+
};
|
|
5536
|
+
};
|
|
5537
|
+
/** @description Default Response */
|
|
5538
|
+
422: {
|
|
5539
|
+
headers: {
|
|
5540
|
+
[name: string]: unknown;
|
|
5541
|
+
};
|
|
5542
|
+
content: {
|
|
5543
|
+
"application/json": {
|
|
5544
|
+
error: {
|
|
5545
|
+
code: string;
|
|
5546
|
+
message: string;
|
|
5547
|
+
details?: unknown;
|
|
5548
|
+
};
|
|
5549
|
+
};
|
|
5550
|
+
};
|
|
5551
|
+
};
|
|
5552
|
+
};
|
|
5553
|
+
};
|
|
5554
|
+
post?: never;
|
|
5555
|
+
delete?: never;
|
|
5556
|
+
options?: never;
|
|
5557
|
+
head?: never;
|
|
5558
|
+
patch?: never;
|
|
5559
|
+
trace?: never;
|
|
5560
|
+
};
|
|
5561
|
+
"/v1/media/associations/{id}/hero": {
|
|
5562
|
+
parameters: {
|
|
5563
|
+
query?: never;
|
|
5564
|
+
header?: never;
|
|
5565
|
+
path?: never;
|
|
5566
|
+
cookie?: never;
|
|
5567
|
+
};
|
|
5568
|
+
get?: never;
|
|
5569
|
+
put?: never;
|
|
5570
|
+
/** Set an association as the hero (single hero, pinned first) */
|
|
5571
|
+
post: {
|
|
5572
|
+
parameters: {
|
|
5573
|
+
query?: never;
|
|
5574
|
+
header?: never;
|
|
5575
|
+
path: {
|
|
5576
|
+
id: string;
|
|
5577
|
+
};
|
|
5578
|
+
cookie?: never;
|
|
5579
|
+
};
|
|
5580
|
+
requestBody?: never;
|
|
5581
|
+
responses: {
|
|
5582
|
+
/** @description Default Response */
|
|
5583
|
+
200: {
|
|
5584
|
+
headers: {
|
|
5585
|
+
[name: string]: unknown;
|
|
5586
|
+
};
|
|
5587
|
+
content: {
|
|
5588
|
+
"application/json": {
|
|
5589
|
+
data: {
|
|
5590
|
+
/** Format: uuid */
|
|
5591
|
+
id: string;
|
|
5592
|
+
/** Format: uuid */
|
|
5593
|
+
organizationId: string;
|
|
5594
|
+
/** Format: date-time */
|
|
5595
|
+
createdAt: string;
|
|
5596
|
+
/** Format: date-time */
|
|
5597
|
+
updatedAt: string;
|
|
5598
|
+
/** Format: uuid */
|
|
5599
|
+
mediaId: string;
|
|
5600
|
+
/** @enum {string} */
|
|
5601
|
+
entityType: "product" | "variant";
|
|
5602
|
+
/** Format: uuid */
|
|
5603
|
+
entityId: string;
|
|
5604
|
+
/** @enum {string} */
|
|
5605
|
+
role: "hero" | "gallery" | "thumbnail" | "technical" | "lifestyle" | "swatch";
|
|
5606
|
+
position: number;
|
|
5607
|
+
altText: ((string | number | boolean | ("null" | null)) | unknown[] | {
|
|
5608
|
+
[key: string]: unknown;
|
|
5609
|
+
}) | null;
|
|
5610
|
+
/** Format: uuid */
|
|
5611
|
+
channelId: string | null;
|
|
5612
|
+
}[];
|
|
5613
|
+
};
|
|
5614
|
+
};
|
|
5615
|
+
};
|
|
5616
|
+
/** @description Default Response */
|
|
5617
|
+
404: {
|
|
5618
|
+
headers: {
|
|
5619
|
+
[name: string]: unknown;
|
|
5620
|
+
};
|
|
5621
|
+
content: {
|
|
5622
|
+
"application/json": {
|
|
5623
|
+
error: {
|
|
5624
|
+
code: string;
|
|
5625
|
+
message: string;
|
|
5626
|
+
details?: unknown;
|
|
5627
|
+
};
|
|
5628
|
+
};
|
|
5629
|
+
};
|
|
5630
|
+
};
|
|
5631
|
+
};
|
|
5632
|
+
};
|
|
5633
|
+
delete?: never;
|
|
5634
|
+
options?: never;
|
|
5635
|
+
head?: never;
|
|
5636
|
+
patch?: never;
|
|
5637
|
+
trace?: never;
|
|
5638
|
+
};
|
|
5639
|
+
"/v1/media/{id}": {
|
|
5640
|
+
parameters: {
|
|
5641
|
+
query?: never;
|
|
5642
|
+
header?: never;
|
|
5643
|
+
path?: never;
|
|
5644
|
+
cookie?: never;
|
|
5645
|
+
};
|
|
5646
|
+
get?: never;
|
|
5647
|
+
put?: never;
|
|
5648
|
+
post?: never;
|
|
5649
|
+
/** Delete media (object + row) */
|
|
5650
|
+
delete: {
|
|
5651
|
+
parameters: {
|
|
5652
|
+
query?: never;
|
|
5653
|
+
header?: never;
|
|
5654
|
+
path: {
|
|
5655
|
+
id: string;
|
|
5656
|
+
};
|
|
5657
|
+
cookie?: never;
|
|
5658
|
+
};
|
|
5659
|
+
requestBody?: never;
|
|
5660
|
+
responses: {
|
|
5661
|
+
/** @description Default Response */
|
|
5662
|
+
204: {
|
|
5663
|
+
headers: {
|
|
5664
|
+
[name: string]: unknown;
|
|
5665
|
+
};
|
|
5666
|
+
content: {
|
|
5667
|
+
"application/json": "null" | null;
|
|
5668
|
+
};
|
|
5669
|
+
};
|
|
5670
|
+
/** @description Default Response */
|
|
5671
|
+
404: {
|
|
5672
|
+
headers: {
|
|
5673
|
+
[name: string]: unknown;
|
|
5674
|
+
};
|
|
5675
|
+
content: {
|
|
5676
|
+
"application/json": {
|
|
5677
|
+
error: {
|
|
5678
|
+
code: string;
|
|
5679
|
+
message: string;
|
|
5680
|
+
details?: unknown;
|
|
5681
|
+
};
|
|
4892
5682
|
};
|
|
4893
5683
|
};
|
|
4894
5684
|
};
|
|
@@ -4937,8 +5727,8 @@ interface paths {
|
|
|
4937
5727
|
updatedAt: string;
|
|
4938
5728
|
};
|
|
4939
5729
|
/** Format: uuid */
|
|
4940
|
-
organizationId: string;
|
|
4941
|
-
organizationName: string;
|
|
5730
|
+
organizationId: string | null;
|
|
5731
|
+
organizationName: string | null;
|
|
4942
5732
|
roles: string[];
|
|
4943
5733
|
source: string;
|
|
4944
5734
|
deployment: {
|
|
@@ -4957,7 +5747,63 @@ interface paths {
|
|
|
4957
5747
|
delete?: never;
|
|
4958
5748
|
options?: never;
|
|
4959
5749
|
head?: never;
|
|
4960
|
-
|
|
5750
|
+
/**
|
|
5751
|
+
* Update the authenticated user's own profile
|
|
5752
|
+
* @description Sets the display name on the MiniPim user row. In hosted (Clerk) mode the IdP can overwrite this on a later sign-in if the session token carries a `name` claim; identity-provided fields win over locally-set ones by design.
|
|
5753
|
+
*/
|
|
5754
|
+
patch: {
|
|
5755
|
+
parameters: {
|
|
5756
|
+
query?: never;
|
|
5757
|
+
header?: never;
|
|
5758
|
+
path?: never;
|
|
5759
|
+
cookie?: never;
|
|
5760
|
+
};
|
|
5761
|
+
requestBody: {
|
|
5762
|
+
content: {
|
|
5763
|
+
"application/json": {
|
|
5764
|
+
name: string;
|
|
5765
|
+
};
|
|
5766
|
+
};
|
|
5767
|
+
};
|
|
5768
|
+
responses: {
|
|
5769
|
+
/** @description Default Response */
|
|
5770
|
+
200: {
|
|
5771
|
+
headers: {
|
|
5772
|
+
[name: string]: unknown;
|
|
5773
|
+
};
|
|
5774
|
+
content: {
|
|
5775
|
+
"application/json": {
|
|
5776
|
+
/** Format: uuid */
|
|
5777
|
+
id: string;
|
|
5778
|
+
externalProvider: string;
|
|
5779
|
+
externalSubject: string;
|
|
5780
|
+
email: string | null;
|
|
5781
|
+
name: string | null;
|
|
5782
|
+
avatarUrl: string | null;
|
|
5783
|
+
/** Format: date-time */
|
|
5784
|
+
createdAt: string;
|
|
5785
|
+
/** Format: date-time */
|
|
5786
|
+
updatedAt: string;
|
|
5787
|
+
};
|
|
5788
|
+
};
|
|
5789
|
+
};
|
|
5790
|
+
/** @description Default Response */
|
|
5791
|
+
403: {
|
|
5792
|
+
headers: {
|
|
5793
|
+
[name: string]: unknown;
|
|
5794
|
+
};
|
|
5795
|
+
content: {
|
|
5796
|
+
"application/json": {
|
|
5797
|
+
error: {
|
|
5798
|
+
code: string;
|
|
5799
|
+
message: string;
|
|
5800
|
+
details?: unknown;
|
|
5801
|
+
};
|
|
5802
|
+
};
|
|
5803
|
+
};
|
|
5804
|
+
};
|
|
5805
|
+
};
|
|
5806
|
+
};
|
|
4961
5807
|
trace?: never;
|
|
4962
5808
|
};
|
|
4963
5809
|
"/v1/me/orgs": {
|
|
@@ -5058,7 +5904,66 @@ interface paths {
|
|
|
5058
5904
|
};
|
|
5059
5905
|
};
|
|
5060
5906
|
put?: never;
|
|
5061
|
-
|
|
5907
|
+
/**
|
|
5908
|
+
* Add a member by email
|
|
5909
|
+
* @description If the email already has an account, the user is added to the org immediately. Otherwise a pending invitation is created and (in hosted mode) an account invite email is sent.
|
|
5910
|
+
*/
|
|
5911
|
+
post: {
|
|
5912
|
+
parameters: {
|
|
5913
|
+
query?: never;
|
|
5914
|
+
header?: never;
|
|
5915
|
+
path?: never;
|
|
5916
|
+
cookie?: never;
|
|
5917
|
+
};
|
|
5918
|
+
requestBody: {
|
|
5919
|
+
content: {
|
|
5920
|
+
"application/json": {
|
|
5921
|
+
/** Format: email */
|
|
5922
|
+
email: string;
|
|
5923
|
+
/**
|
|
5924
|
+
* @default [
|
|
5925
|
+
* "member"
|
|
5926
|
+
* ]
|
|
5927
|
+
*/
|
|
5928
|
+
roles?: string[];
|
|
5929
|
+
};
|
|
5930
|
+
};
|
|
5931
|
+
};
|
|
5932
|
+
responses: {
|
|
5933
|
+
/** @description Default Response */
|
|
5934
|
+
201: {
|
|
5935
|
+
headers: {
|
|
5936
|
+
[name: string]: unknown;
|
|
5937
|
+
};
|
|
5938
|
+
content: {
|
|
5939
|
+
"application/json": {
|
|
5940
|
+
/** @enum {string} */
|
|
5941
|
+
status: "member" | "invited";
|
|
5942
|
+
/** Format: uuid */
|
|
5943
|
+
userId: string | null;
|
|
5944
|
+
/** Format: uuid */
|
|
5945
|
+
invitationId: string | null;
|
|
5946
|
+
link: string | null;
|
|
5947
|
+
};
|
|
5948
|
+
};
|
|
5949
|
+
};
|
|
5950
|
+
/** @description Default Response */
|
|
5951
|
+
403: {
|
|
5952
|
+
headers: {
|
|
5953
|
+
[name: string]: unknown;
|
|
5954
|
+
};
|
|
5955
|
+
content: {
|
|
5956
|
+
"application/json": {
|
|
5957
|
+
error: {
|
|
5958
|
+
code: string;
|
|
5959
|
+
message: string;
|
|
5960
|
+
details?: unknown;
|
|
5961
|
+
};
|
|
5962
|
+
};
|
|
5963
|
+
};
|
|
5964
|
+
};
|
|
5965
|
+
};
|
|
5966
|
+
};
|
|
5062
5967
|
delete?: never;
|
|
5063
5968
|
options?: never;
|
|
5064
5969
|
head?: never;
|
|
@@ -5075,7 +5980,77 @@ interface paths {
|
|
|
5075
5980
|
get?: never;
|
|
5076
5981
|
put?: never;
|
|
5077
5982
|
post?: never;
|
|
5078
|
-
|
|
5983
|
+
/**
|
|
5984
|
+
* Remove a member from the current organization
|
|
5985
|
+
* @description The `:id` is the member's `user_id`. Deletes the membership row only — the user account and their memberships in other organizations are untouched. The last remaining admin cannot be removed (an org must never end up admin-less); demote/remove another admin first, or delete the organization instead.
|
|
5986
|
+
*/
|
|
5987
|
+
delete: {
|
|
5988
|
+
parameters: {
|
|
5989
|
+
query?: never;
|
|
5990
|
+
header?: never;
|
|
5991
|
+
path: {
|
|
5992
|
+
id: string;
|
|
5993
|
+
};
|
|
5994
|
+
cookie?: never;
|
|
5995
|
+
};
|
|
5996
|
+
requestBody?: never;
|
|
5997
|
+
responses: {
|
|
5998
|
+
/** @description Default Response */
|
|
5999
|
+
204: {
|
|
6000
|
+
headers: {
|
|
6001
|
+
[name: string]: unknown;
|
|
6002
|
+
};
|
|
6003
|
+
content: {
|
|
6004
|
+
"application/json": "null" | null;
|
|
6005
|
+
};
|
|
6006
|
+
};
|
|
6007
|
+
/** @description Default Response */
|
|
6008
|
+
403: {
|
|
6009
|
+
headers: {
|
|
6010
|
+
[name: string]: unknown;
|
|
6011
|
+
};
|
|
6012
|
+
content: {
|
|
6013
|
+
"application/json": {
|
|
6014
|
+
error: {
|
|
6015
|
+
code: string;
|
|
6016
|
+
message: string;
|
|
6017
|
+
details?: unknown;
|
|
6018
|
+
};
|
|
6019
|
+
};
|
|
6020
|
+
};
|
|
6021
|
+
};
|
|
6022
|
+
/** @description Default Response */
|
|
6023
|
+
404: {
|
|
6024
|
+
headers: {
|
|
6025
|
+
[name: string]: unknown;
|
|
6026
|
+
};
|
|
6027
|
+
content: {
|
|
6028
|
+
"application/json": {
|
|
6029
|
+
error: {
|
|
6030
|
+
code: string;
|
|
6031
|
+
message: string;
|
|
6032
|
+
details?: unknown;
|
|
6033
|
+
};
|
|
6034
|
+
};
|
|
6035
|
+
};
|
|
6036
|
+
};
|
|
6037
|
+
/** @description Default Response */
|
|
6038
|
+
409: {
|
|
6039
|
+
headers: {
|
|
6040
|
+
[name: string]: unknown;
|
|
6041
|
+
};
|
|
6042
|
+
content: {
|
|
6043
|
+
"application/json": {
|
|
6044
|
+
error: {
|
|
6045
|
+
code: string;
|
|
6046
|
+
message: string;
|
|
6047
|
+
details?: unknown;
|
|
6048
|
+
};
|
|
6049
|
+
};
|
|
6050
|
+
};
|
|
6051
|
+
};
|
|
6052
|
+
};
|
|
6053
|
+
};
|
|
5079
6054
|
options?: never;
|
|
5080
6055
|
head?: never;
|
|
5081
6056
|
/**
|
|
@@ -5146,6 +6121,21 @@ interface paths {
|
|
|
5146
6121
|
};
|
|
5147
6122
|
};
|
|
5148
6123
|
};
|
|
6124
|
+
/** @description Default Response */
|
|
6125
|
+
409: {
|
|
6126
|
+
headers: {
|
|
6127
|
+
[name: string]: unknown;
|
|
6128
|
+
};
|
|
6129
|
+
content: {
|
|
6130
|
+
"application/json": {
|
|
6131
|
+
error: {
|
|
6132
|
+
code: string;
|
|
6133
|
+
message: string;
|
|
6134
|
+
details?: unknown;
|
|
6135
|
+
};
|
|
6136
|
+
};
|
|
6137
|
+
};
|
|
6138
|
+
};
|
|
5149
6139
|
};
|
|
5150
6140
|
};
|
|
5151
6141
|
trace?: never;
|
|
@@ -5349,7 +6339,7 @@ interface paths {
|
|
|
5349
6339
|
put?: never;
|
|
5350
6340
|
/**
|
|
5351
6341
|
* Accept an invitation token
|
|
5352
|
-
* @description Adds the authenticated user to the invite's organization with the invite's roles. Idempotent: re-accepting from the same user is a no-op.
|
|
6342
|
+
* @description Adds the authenticated user to the invite's organization with the invite's roles. An email-targeted invitation can only be accepted by a user whose verified email matches; an email-less (shareable-link) invitation can be accepted by anyone holding the link. Idempotent: re-accepting from the same user is a no-op.
|
|
5353
6343
|
*/
|
|
5354
6344
|
post: {
|
|
5355
6345
|
parameters: {
|
|
@@ -5376,6 +6366,21 @@ interface paths {
|
|
|
5376
6366
|
};
|
|
5377
6367
|
};
|
|
5378
6368
|
/** @description Default Response */
|
|
6369
|
+
403: {
|
|
6370
|
+
headers: {
|
|
6371
|
+
[name: string]: unknown;
|
|
6372
|
+
};
|
|
6373
|
+
content: {
|
|
6374
|
+
"application/json": {
|
|
6375
|
+
error: {
|
|
6376
|
+
code: string;
|
|
6377
|
+
message: string;
|
|
6378
|
+
details?: unknown;
|
|
6379
|
+
};
|
|
6380
|
+
};
|
|
6381
|
+
};
|
|
6382
|
+
};
|
|
6383
|
+
/** @description Default Response */
|
|
5379
6384
|
404: {
|
|
5380
6385
|
headers: {
|
|
5381
6386
|
[name: string]: unknown;
|