@minipim/sdk 0.5.0 → 0.7.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 +43 -1
- package/dist/index.cjs +1 -3
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +1 -3
- package/dist/openapi.d.cts +940 -77
- package/dist/openapi.d.ts +940 -77
- package/package.json +1 -1
package/dist/openapi.d.ts
CHANGED
|
@@ -166,6 +166,7 @@ interface paths {
|
|
|
166
166
|
default_locale?: string;
|
|
167
167
|
default_channel?: string;
|
|
168
168
|
default_currency?: string;
|
|
169
|
+
content_pages_enabled?: boolean;
|
|
169
170
|
};
|
|
170
171
|
initialAdmin?: {
|
|
171
172
|
/** Format: email */
|
|
@@ -258,7 +259,10 @@ interface paths {
|
|
|
258
259
|
path?: never;
|
|
259
260
|
cookie?: never;
|
|
260
261
|
};
|
|
261
|
-
/**
|
|
262
|
+
/**
|
|
263
|
+
* Get the current tenant organization
|
|
264
|
+
* @description Includes `features`, the resolved state of optional features for this org. `entitled` is the plan-level answer; `enabled` is the org’s own preference. A feature is usable only when both are true.
|
|
265
|
+
*/
|
|
262
266
|
get: {
|
|
263
267
|
parameters: {
|
|
264
268
|
query?: never;
|
|
@@ -286,6 +290,12 @@ interface paths {
|
|
|
286
290
|
createdAt: string;
|
|
287
291
|
/** Format: date-time */
|
|
288
292
|
updatedAt: string;
|
|
293
|
+
features: {
|
|
294
|
+
content_pages: {
|
|
295
|
+
entitled: boolean;
|
|
296
|
+
enabled: boolean;
|
|
297
|
+
};
|
|
298
|
+
};
|
|
289
299
|
};
|
|
290
300
|
};
|
|
291
301
|
};
|
|
@@ -328,6 +338,7 @@ interface paths {
|
|
|
328
338
|
default_locale?: string;
|
|
329
339
|
default_channel?: string;
|
|
330
340
|
default_currency?: string;
|
|
341
|
+
content_pages_enabled?: boolean;
|
|
331
342
|
};
|
|
332
343
|
};
|
|
333
344
|
};
|
|
@@ -602,10 +613,15 @@ interface paths {
|
|
|
602
613
|
path?: never;
|
|
603
614
|
cookie?: never;
|
|
604
615
|
};
|
|
605
|
-
/**
|
|
616
|
+
/**
|
|
617
|
+
* List attributes
|
|
618
|
+
* @description Defaults to product attributes. Pass `entityKind=content` for content-page fields.
|
|
619
|
+
*/
|
|
606
620
|
get: {
|
|
607
621
|
parameters: {
|
|
608
|
-
query?:
|
|
622
|
+
query?: {
|
|
623
|
+
entityKind?: "product" | "content";
|
|
624
|
+
};
|
|
609
625
|
header?: never;
|
|
610
626
|
path?: never;
|
|
611
627
|
cookie?: never;
|
|
@@ -628,6 +644,8 @@ interface paths {
|
|
|
628
644
|
/** Format: date-time */
|
|
629
645
|
updatedAt: string;
|
|
630
646
|
code: string;
|
|
647
|
+
/** @enum {string} */
|
|
648
|
+
entityKind: "product" | "content";
|
|
631
649
|
label: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
632
650
|
[key: string]: unknown;
|
|
633
651
|
};
|
|
@@ -669,6 +687,11 @@ interface paths {
|
|
|
669
687
|
content: {
|
|
670
688
|
"application/json": {
|
|
671
689
|
code: string;
|
|
690
|
+
/**
|
|
691
|
+
* @default product
|
|
692
|
+
* @enum {string}
|
|
693
|
+
*/
|
|
694
|
+
entityKind?: "product" | "content";
|
|
672
695
|
label: {
|
|
673
696
|
[key: string]: string;
|
|
674
697
|
};
|
|
@@ -710,6 +733,8 @@ interface paths {
|
|
|
710
733
|
/** Format: date-time */
|
|
711
734
|
updatedAt: string;
|
|
712
735
|
code: string;
|
|
736
|
+
/** @enum {string} */
|
|
737
|
+
entityKind: "product" | "content";
|
|
713
738
|
label: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
714
739
|
[key: string]: unknown;
|
|
715
740
|
};
|
|
@@ -791,6 +816,8 @@ interface paths {
|
|
|
791
816
|
/** Format: date-time */
|
|
792
817
|
updatedAt: string;
|
|
793
818
|
code: string;
|
|
819
|
+
/** @enum {string} */
|
|
820
|
+
entityKind: "product" | "content";
|
|
794
821
|
label: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
795
822
|
[key: string]: unknown;
|
|
796
823
|
};
|
|
@@ -928,6 +955,8 @@ interface paths {
|
|
|
928
955
|
/** Format: date-time */
|
|
929
956
|
updatedAt: string;
|
|
930
957
|
code: string;
|
|
958
|
+
/** @enum {string} */
|
|
959
|
+
entityKind: "product" | "content";
|
|
931
960
|
label: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
932
961
|
[key: string]: unknown;
|
|
933
962
|
};
|
|
@@ -992,10 +1021,15 @@ interface paths {
|
|
|
992
1021
|
path?: never;
|
|
993
1022
|
cookie?: never;
|
|
994
1023
|
};
|
|
995
|
-
/**
|
|
1024
|
+
/**
|
|
1025
|
+
* List attribute families
|
|
1026
|
+
* @description Defaults to product families. Pass `entityKind=content` for content-page types.
|
|
1027
|
+
*/
|
|
996
1028
|
get: {
|
|
997
1029
|
parameters: {
|
|
998
|
-
query?:
|
|
1030
|
+
query?: {
|
|
1031
|
+
entityKind?: "product" | "content";
|
|
1032
|
+
};
|
|
999
1033
|
header?: never;
|
|
1000
1034
|
path?: never;
|
|
1001
1035
|
cookie?: never;
|
|
@@ -1018,6 +1052,8 @@ interface paths {
|
|
|
1018
1052
|
/** Format: date-time */
|
|
1019
1053
|
updatedAt: string;
|
|
1020
1054
|
code: string;
|
|
1055
|
+
/** @enum {string} */
|
|
1056
|
+
entityKind: "product" | "content";
|
|
1021
1057
|
label: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
1022
1058
|
[key: string]: unknown;
|
|
1023
1059
|
};
|
|
@@ -1040,6 +1076,11 @@ interface paths {
|
|
|
1040
1076
|
content: {
|
|
1041
1077
|
"application/json": {
|
|
1042
1078
|
code: string;
|
|
1079
|
+
/**
|
|
1080
|
+
* @default product
|
|
1081
|
+
* @enum {string}
|
|
1082
|
+
*/
|
|
1083
|
+
entityKind?: "product" | "content";
|
|
1043
1084
|
label: {
|
|
1044
1085
|
[key: string]: string;
|
|
1045
1086
|
};
|
|
@@ -1064,6 +1105,8 @@ interface paths {
|
|
|
1064
1105
|
/** Format: date-time */
|
|
1065
1106
|
updatedAt: string;
|
|
1066
1107
|
code: string;
|
|
1108
|
+
/** @enum {string} */
|
|
1109
|
+
entityKind: "product" | "content";
|
|
1067
1110
|
label: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
1068
1111
|
[key: string]: unknown;
|
|
1069
1112
|
};
|
|
@@ -1129,6 +1172,8 @@ interface paths {
|
|
|
1129
1172
|
/** Format: date-time */
|
|
1130
1173
|
updatedAt: string;
|
|
1131
1174
|
code: string;
|
|
1175
|
+
/** @enum {string} */
|
|
1176
|
+
entityKind: "product" | "content";
|
|
1132
1177
|
label: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
1133
1178
|
[key: string]: unknown;
|
|
1134
1179
|
};
|
|
@@ -1258,6 +1303,8 @@ interface paths {
|
|
|
1258
1303
|
/** Format: date-time */
|
|
1259
1304
|
updatedAt: string;
|
|
1260
1305
|
code: string;
|
|
1306
|
+
/** @enum {string} */
|
|
1307
|
+
entityKind: "product" | "content";
|
|
1261
1308
|
label: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
1262
1309
|
[key: string]: unknown;
|
|
1263
1310
|
};
|
|
@@ -1523,6 +1570,7 @@ interface paths {
|
|
|
1523
1570
|
categoryId?: string;
|
|
1524
1571
|
includeDescendants?: boolean | ("true" | "false" | "1" | "0");
|
|
1525
1572
|
brand?: string;
|
|
1573
|
+
/** @description Repeatable — `?tag=a&tag=b` matches records carrying ALL listed tags. Values are canonicalized exactly as writes are, so `?tag=Buying%20Guide` matches the stored `buying-guide`; you never have to pre-slugify a filter. Backed by the GIN index on `tags`. */
|
|
1526
1574
|
tag?: string | string[];
|
|
1527
1575
|
connectorId?: string;
|
|
1528
1576
|
updatedSince?: string;
|
|
@@ -1569,6 +1617,7 @@ interface paths {
|
|
|
1569
1617
|
attributes: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
1570
1618
|
[key: string]: unknown;
|
|
1571
1619
|
};
|
|
1620
|
+
/** @description Tags in canonical form. These are normalized on write (lower-cased, slugified, deduplicated, truncated), so this array will not necessarily match what was submitted — see the `tags` field on the create/update request body for the exact rules. Filter with `?tag=` using either form. */
|
|
1572
1621
|
tags: string[];
|
|
1573
1622
|
/** Format: uuid */
|
|
1574
1623
|
createdBy: string | null;
|
|
@@ -1579,7 +1628,7 @@ interface paths {
|
|
|
1579
1628
|
}[];
|
|
1580
1629
|
limit: number;
|
|
1581
1630
|
offset: number;
|
|
1582
|
-
hasMore
|
|
1631
|
+
hasMore: boolean;
|
|
1583
1632
|
total?: number;
|
|
1584
1633
|
};
|
|
1585
1634
|
};
|
|
@@ -1618,7 +1667,10 @@ interface paths {
|
|
|
1618
1667
|
value?: unknown;
|
|
1619
1668
|
}[];
|
|
1620
1669
|
};
|
|
1621
|
-
/**
|
|
1670
|
+
/**
|
|
1671
|
+
* @description Free-form tags, canonicalized on write and echoed back in canonical form — the response will NOT match your input verbatim. Each tag is lower-cased, stripped of diacritics, has every run of non-alphanumerics replaced with `-`, is trimmed of leading/trailing `-`, and is then truncated to 60 characters. So `"Buying Guide"` is stored and filtered as `buying-guide`. Tags that normalize to nothing (`""`, `"!!"`) are dropped, and duplicates are removed keeping first-occurrence order, so the array you get back may be SHORTER than the one you sent. Note the asymmetry with `maxLength`: an item may be up to 80 characters on input but is truncated to 60 once canonicalized, which can collapse two long tags into one.
|
|
1672
|
+
* @default []
|
|
1673
|
+
*/
|
|
1622
1674
|
tags?: string[];
|
|
1623
1675
|
};
|
|
1624
1676
|
};
|
|
@@ -1648,6 +1700,7 @@ interface paths {
|
|
|
1648
1700
|
attributes: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
1649
1701
|
[key: string]: unknown;
|
|
1650
1702
|
};
|
|
1703
|
+
/** @description Tags in canonical form. These are normalized on write (lower-cased, slugified, deduplicated, truncated), so this array will not necessarily match what was submitted — see the `tags` field on the create/update request body for the exact rules. Filter with `?tag=` using either form. */
|
|
1651
1704
|
tags: string[];
|
|
1652
1705
|
/** Format: uuid */
|
|
1653
1706
|
createdBy: string | null;
|
|
@@ -1714,6 +1767,7 @@ interface paths {
|
|
|
1714
1767
|
categoryId?: string;
|
|
1715
1768
|
includeDescendants?: boolean | ("true" | "false" | "1" | "0");
|
|
1716
1769
|
brand?: string;
|
|
1770
|
+
/** @description Repeatable — `?tag=a&tag=b` matches records carrying ALL listed tags. Values are canonicalized exactly as writes are, so `?tag=Buying%20Guide` matches the stored `buying-guide`; you never have to pre-slugify a filter. Backed by the GIN index on `tags`. */
|
|
1717
1771
|
tag?: string | string[];
|
|
1718
1772
|
connectorId?: string;
|
|
1719
1773
|
updatedSince?: string;
|
|
@@ -1933,6 +1987,7 @@ interface paths {
|
|
|
1933
1987
|
attributes: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
1934
1988
|
[key: string]: unknown;
|
|
1935
1989
|
};
|
|
1990
|
+
/** @description Tags in canonical form. These are normalized on write (lower-cased, slugified, deduplicated, truncated), so this array will not necessarily match what was submitted — see the `tags` field on the create/update request body for the exact rules. Filter with `?tag=` using either form. */
|
|
1936
1991
|
tags: string[];
|
|
1937
1992
|
/** Format: uuid */
|
|
1938
1993
|
createdBy: string | null;
|
|
@@ -2056,6 +2111,7 @@ interface paths {
|
|
|
2056
2111
|
value?: unknown;
|
|
2057
2112
|
}[];
|
|
2058
2113
|
};
|
|
2114
|
+
/** @description Replaces the full tag list when present. Free-form tags, canonicalized on write and echoed back in canonical form — the response will NOT match your input verbatim. Each tag is lower-cased, stripped of diacritics, has every run of non-alphanumerics replaced with `-`, is trimmed of leading/trailing `-`, and is then truncated to 60 characters. So `"Buying Guide"` is stored and filtered as `buying-guide`. Tags that normalize to nothing (`""`, `"!!"`) are dropped, and duplicates are removed keeping first-occurrence order, so the array you get back may be SHORTER than the one you sent. Note the asymmetry with `maxLength`: an item may be up to 80 characters on input but is truncated to 60 once canonicalized, which can collapse two long tags into one. */
|
|
2059
2115
|
tags?: string[];
|
|
2060
2116
|
};
|
|
2061
2117
|
};
|
|
@@ -2085,6 +2141,7 @@ interface paths {
|
|
|
2085
2141
|
attributes: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
2086
2142
|
[key: string]: unknown;
|
|
2087
2143
|
};
|
|
2144
|
+
/** @description Tags in canonical form. These are normalized on write (lower-cased, slugified, deduplicated, truncated), so this array will not necessarily match what was submitted — see the `tags` field on the create/update request body for the exact rules. Filter with `?tag=` using either form. */
|
|
2088
2145
|
tags: string[];
|
|
2089
2146
|
/** Format: uuid */
|
|
2090
2147
|
createdBy: string | null;
|
|
@@ -2252,6 +2309,7 @@ interface paths {
|
|
|
2252
2309
|
attributes: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
2253
2310
|
[key: string]: unknown;
|
|
2254
2311
|
};
|
|
2312
|
+
/** @description Tags in canonical form. These are normalized on write (lower-cased, slugified, deduplicated, truncated), so this array will not necessarily match what was submitted — see the `tags` field on the create/update request body for the exact rules. Filter with `?tag=` using either form. */
|
|
2255
2313
|
tags: string[];
|
|
2256
2314
|
/** Format: uuid */
|
|
2257
2315
|
createdBy: string | null;
|
|
@@ -2658,6 +2716,7 @@ interface paths {
|
|
|
2658
2716
|
productIds: string[];
|
|
2659
2717
|
/** @enum {string} */
|
|
2660
2718
|
mode: "add" | "remove" | "replace";
|
|
2719
|
+
/** @description Free-form tags, canonicalized on write and echoed back in canonical form — the response will NOT match your input verbatim. Each tag is lower-cased, stripped of diacritics, has every run of non-alphanumerics replaced with `-`, is trimmed of leading/trailing `-`, and is then truncated to 60 characters. So `"Buying Guide"` is stored and filtered as `buying-guide`. Tags that normalize to nothing (`""`, `"!!"`) are dropped, and duplicates are removed keeping first-occurrence order, so the array you get back may be SHORTER than the one you sent. Note the asymmetry with `maxLength`: an item may be up to 80 characters on input but is truncated to 60 once canonicalized, which can collapse two long tags into one. */
|
|
2661
2720
|
tags: string[];
|
|
2662
2721
|
};
|
|
2663
2722
|
};
|
|
@@ -3303,16 +3362,677 @@ interface paths {
|
|
|
3303
3362
|
/** Format: date-time */
|
|
3304
3363
|
updatedAt: string;
|
|
3305
3364
|
/** Format: uuid */
|
|
3306
|
-
variantId: string;
|
|
3365
|
+
variantId: string;
|
|
3366
|
+
/** @enum {string} */
|
|
3367
|
+
type: "sku" | "upc" | "gtin8" | "gtin12" | "gtin13" | "gtin14" | "ean" | "mpn" | "asin" | "isbn" | "custom";
|
|
3368
|
+
customLabel: string | null;
|
|
3369
|
+
value: string;
|
|
3370
|
+
}[];
|
|
3371
|
+
};
|
|
3372
|
+
};
|
|
3373
|
+
/** @description Default Response */
|
|
3374
|
+
422: {
|
|
3375
|
+
headers: {
|
|
3376
|
+
[name: string]: unknown;
|
|
3377
|
+
};
|
|
3378
|
+
content: {
|
|
3379
|
+
"application/json": {
|
|
3380
|
+
error: {
|
|
3381
|
+
code: string;
|
|
3382
|
+
message: string;
|
|
3383
|
+
details?: unknown;
|
|
3384
|
+
};
|
|
3385
|
+
};
|
|
3386
|
+
};
|
|
3387
|
+
};
|
|
3388
|
+
};
|
|
3389
|
+
};
|
|
3390
|
+
/**
|
|
3391
|
+
* Attach an identifier (SKU/UPC/GTIN/etc.) to a variant
|
|
3392
|
+
* @description GTIN-typed values are validated by check digit and length on write.
|
|
3393
|
+
*/
|
|
3394
|
+
post: {
|
|
3395
|
+
parameters: {
|
|
3396
|
+
query?: never;
|
|
3397
|
+
header?: never;
|
|
3398
|
+
path: {
|
|
3399
|
+
variantId: string;
|
|
3400
|
+
};
|
|
3401
|
+
cookie?: never;
|
|
3402
|
+
};
|
|
3403
|
+
requestBody: {
|
|
3404
|
+
content: {
|
|
3405
|
+
"application/json": {
|
|
3406
|
+
/** @enum {string} */
|
|
3407
|
+
type: "sku" | "upc" | "gtin8" | "gtin12" | "gtin13" | "gtin14" | "ean" | "mpn" | "asin" | "isbn" | "custom";
|
|
3408
|
+
customLabel?: string;
|
|
3409
|
+
value: string;
|
|
3410
|
+
};
|
|
3411
|
+
};
|
|
3412
|
+
};
|
|
3413
|
+
responses: {
|
|
3414
|
+
/** @description Default Response */
|
|
3415
|
+
201: {
|
|
3416
|
+
headers: {
|
|
3417
|
+
[name: string]: unknown;
|
|
3418
|
+
};
|
|
3419
|
+
content: {
|
|
3420
|
+
"application/json": {
|
|
3421
|
+
/** Format: uuid */
|
|
3422
|
+
id: string;
|
|
3423
|
+
/** Format: uuid */
|
|
3424
|
+
organizationId: string;
|
|
3425
|
+
/** Format: date-time */
|
|
3426
|
+
createdAt: string;
|
|
3427
|
+
/** Format: date-time */
|
|
3428
|
+
updatedAt: string;
|
|
3429
|
+
/** Format: uuid */
|
|
3430
|
+
variantId: string;
|
|
3431
|
+
/** @enum {string} */
|
|
3432
|
+
type: "sku" | "upc" | "gtin8" | "gtin12" | "gtin13" | "gtin14" | "ean" | "mpn" | "asin" | "isbn" | "custom";
|
|
3433
|
+
customLabel: string | null;
|
|
3434
|
+
value: string;
|
|
3435
|
+
};
|
|
3436
|
+
};
|
|
3437
|
+
};
|
|
3438
|
+
/** @description Default Response */
|
|
3439
|
+
422: {
|
|
3440
|
+
headers: {
|
|
3441
|
+
[name: string]: unknown;
|
|
3442
|
+
};
|
|
3443
|
+
content: {
|
|
3444
|
+
"application/json": {
|
|
3445
|
+
error: {
|
|
3446
|
+
code: string;
|
|
3447
|
+
message: string;
|
|
3448
|
+
details?: unknown;
|
|
3449
|
+
};
|
|
3450
|
+
};
|
|
3451
|
+
};
|
|
3452
|
+
};
|
|
3453
|
+
};
|
|
3454
|
+
};
|
|
3455
|
+
delete?: never;
|
|
3456
|
+
options?: never;
|
|
3457
|
+
head?: never;
|
|
3458
|
+
patch?: never;
|
|
3459
|
+
trace?: never;
|
|
3460
|
+
};
|
|
3461
|
+
"/v1/identifiers/{id}": {
|
|
3462
|
+
parameters: {
|
|
3463
|
+
query?: never;
|
|
3464
|
+
header?: never;
|
|
3465
|
+
path?: never;
|
|
3466
|
+
cookie?: never;
|
|
3467
|
+
};
|
|
3468
|
+
get?: never;
|
|
3469
|
+
put?: never;
|
|
3470
|
+
post?: never;
|
|
3471
|
+
/** Detach an identifier */
|
|
3472
|
+
delete: {
|
|
3473
|
+
parameters: {
|
|
3474
|
+
query?: never;
|
|
3475
|
+
header?: never;
|
|
3476
|
+
path: {
|
|
3477
|
+
id: string;
|
|
3478
|
+
};
|
|
3479
|
+
cookie?: never;
|
|
3480
|
+
};
|
|
3481
|
+
requestBody?: never;
|
|
3482
|
+
responses: {
|
|
3483
|
+
/** @description Default Response */
|
|
3484
|
+
204: {
|
|
3485
|
+
headers: {
|
|
3486
|
+
[name: string]: unknown;
|
|
3487
|
+
};
|
|
3488
|
+
content: {
|
|
3489
|
+
"application/json": "null" | null;
|
|
3490
|
+
};
|
|
3491
|
+
};
|
|
3492
|
+
/** @description Default Response */
|
|
3493
|
+
404: {
|
|
3494
|
+
headers: {
|
|
3495
|
+
[name: string]: unknown;
|
|
3496
|
+
};
|
|
3497
|
+
content: {
|
|
3498
|
+
"application/json": {
|
|
3499
|
+
error: {
|
|
3500
|
+
code: string;
|
|
3501
|
+
message: string;
|
|
3502
|
+
details?: unknown;
|
|
3503
|
+
};
|
|
3504
|
+
};
|
|
3505
|
+
};
|
|
3506
|
+
};
|
|
3507
|
+
};
|
|
3508
|
+
};
|
|
3509
|
+
options?: never;
|
|
3510
|
+
head?: never;
|
|
3511
|
+
patch?: never;
|
|
3512
|
+
trace?: never;
|
|
3513
|
+
};
|
|
3514
|
+
"/v1/content": {
|
|
3515
|
+
parameters: {
|
|
3516
|
+
query?: never;
|
|
3517
|
+
header?: never;
|
|
3518
|
+
path?: never;
|
|
3519
|
+
cookie?: never;
|
|
3520
|
+
};
|
|
3521
|
+
/**
|
|
3522
|
+
* List content pages
|
|
3523
|
+
* @description Filters and pagination mirror `GET /v1/products`. `tag` is repeatable and matches pages carrying ALL listed tags.
|
|
3524
|
+
*/
|
|
3525
|
+
get: {
|
|
3526
|
+
parameters: {
|
|
3527
|
+
query?: {
|
|
3528
|
+
status?: "draft" | "active" | "archived";
|
|
3529
|
+
q?: string;
|
|
3530
|
+
familyId?: string;
|
|
3531
|
+
categoryId?: string;
|
|
3532
|
+
channelId?: string;
|
|
3533
|
+
/** @description Repeatable — `?tag=a&tag=b` matches records carrying ALL listed tags. Values are canonicalized exactly as writes are, so `?tag=Buying%20Guide` matches the stored `buying-guide`; you never have to pre-slugify a filter. */
|
|
3534
|
+
tag?: string | string[];
|
|
3535
|
+
updatedSince?: string;
|
|
3536
|
+
limit?: number;
|
|
3537
|
+
offset?: number;
|
|
3538
|
+
};
|
|
3539
|
+
header?: never;
|
|
3540
|
+
path?: never;
|
|
3541
|
+
cookie?: never;
|
|
3542
|
+
};
|
|
3543
|
+
requestBody?: never;
|
|
3544
|
+
responses: {
|
|
3545
|
+
/** @description Default Response */
|
|
3546
|
+
200: {
|
|
3547
|
+
headers: {
|
|
3548
|
+
[name: string]: unknown;
|
|
3549
|
+
};
|
|
3550
|
+
content: {
|
|
3551
|
+
"application/json": {
|
|
3552
|
+
data: {
|
|
3553
|
+
/** Format: uuid */
|
|
3554
|
+
id: string;
|
|
3555
|
+
/** Format: uuid */
|
|
3556
|
+
organizationId: string;
|
|
3557
|
+
/** Format: date-time */
|
|
3558
|
+
createdAt: string;
|
|
3559
|
+
/** Format: date-time */
|
|
3560
|
+
updatedAt: string;
|
|
3561
|
+
/** Format: uuid */
|
|
3562
|
+
familyId: string;
|
|
3563
|
+
title: string;
|
|
3564
|
+
slug: string;
|
|
3565
|
+
/** @enum {string} */
|
|
3566
|
+
status: "draft" | "active" | "archived";
|
|
3567
|
+
/** Format: date-time */
|
|
3568
|
+
publishedAt: string | null;
|
|
3569
|
+
/** Format: uuid */
|
|
3570
|
+
channelId: string | null;
|
|
3571
|
+
attributes: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
3572
|
+
[key: string]: unknown;
|
|
3573
|
+
};
|
|
3574
|
+
/** @description Tags in canonical form. These are normalized on write (lower-cased, slugified, deduplicated, truncated), so this array will not necessarily match what was submitted — see the `tags` field on the create/update request body for the exact rules. Filter with `?tag=` using either form. */
|
|
3575
|
+
tags: string[];
|
|
3576
|
+
/** Format: uuid */
|
|
3577
|
+
createdBy: string | null;
|
|
3578
|
+
/** Format: uuid */
|
|
3579
|
+
updatedBy: string | null;
|
|
3580
|
+
}[];
|
|
3581
|
+
limit: number;
|
|
3582
|
+
offset: number;
|
|
3583
|
+
hasMore: boolean;
|
|
3584
|
+
};
|
|
3585
|
+
};
|
|
3586
|
+
};
|
|
3587
|
+
/** @description Default Response */
|
|
3588
|
+
403: {
|
|
3589
|
+
headers: {
|
|
3590
|
+
[name: string]: unknown;
|
|
3591
|
+
};
|
|
3592
|
+
content: {
|
|
3593
|
+
"application/json": {
|
|
3594
|
+
error: {
|
|
3595
|
+
code: string;
|
|
3596
|
+
message: string;
|
|
3597
|
+
details?: unknown;
|
|
3598
|
+
};
|
|
3599
|
+
};
|
|
3600
|
+
};
|
|
3601
|
+
};
|
|
3602
|
+
};
|
|
3603
|
+
};
|
|
3604
|
+
put?: never;
|
|
3605
|
+
/**
|
|
3606
|
+
* Create a content page
|
|
3607
|
+
* @description Validates `attributes` against the family at write time, exactly as products do — an undeclared attribute code is a 422. Required attributes are enforced only for `active` pages, so a draft may be saved incomplete. Emits `content_page.created`.
|
|
3608
|
+
*/
|
|
3609
|
+
post: {
|
|
3610
|
+
parameters: {
|
|
3611
|
+
query?: never;
|
|
3612
|
+
header?: never;
|
|
3613
|
+
path?: never;
|
|
3614
|
+
cookie?: never;
|
|
3615
|
+
};
|
|
3616
|
+
requestBody: {
|
|
3617
|
+
content: {
|
|
3618
|
+
"application/json": {
|
|
3619
|
+
/** Format: uuid */
|
|
3620
|
+
familyId: string;
|
|
3621
|
+
title: string;
|
|
3622
|
+
slug?: string;
|
|
3623
|
+
/**
|
|
3624
|
+
* @default draft
|
|
3625
|
+
* @enum {string}
|
|
3626
|
+
*/
|
|
3627
|
+
status?: "draft" | "active" | "archived";
|
|
3628
|
+
/** Format: date-time */
|
|
3629
|
+
publishedAt?: string;
|
|
3630
|
+
/** Format: uuid */
|
|
3631
|
+
channelId?: string | null;
|
|
3632
|
+
/** @default {} */
|
|
3633
|
+
attributes?: {
|
|
3634
|
+
[key: string]: {
|
|
3635
|
+
locale: string | null;
|
|
3636
|
+
channel: string | null;
|
|
3637
|
+
value?: unknown;
|
|
3638
|
+
}[];
|
|
3639
|
+
};
|
|
3640
|
+
/**
|
|
3641
|
+
* @description Free-form tags, canonicalized on write and echoed back in canonical form — the response will NOT match your input verbatim. Each tag is lower-cased, stripped of diacritics, has every run of non-alphanumerics replaced with `-`, is trimmed of leading/trailing `-`, and is then truncated to 60 characters. So `"Buying Guide"` is stored and filtered as `buying-guide`. Tags that normalize to nothing (`""`, `"!!"`) are dropped, and duplicates are removed keeping first-occurrence order, so the array you get back may be SHORTER than the one you sent. Note the asymmetry with `maxLength`: an item may be up to 80 characters on input but is truncated to 60 once canonicalized, which can collapse two long tags into one.
|
|
3642
|
+
* @default []
|
|
3643
|
+
*/
|
|
3644
|
+
tags?: string[];
|
|
3645
|
+
};
|
|
3646
|
+
};
|
|
3647
|
+
};
|
|
3648
|
+
responses: {
|
|
3649
|
+
/** @description Default Response */
|
|
3650
|
+
201: {
|
|
3651
|
+
headers: {
|
|
3652
|
+
[name: string]: unknown;
|
|
3653
|
+
};
|
|
3654
|
+
content: {
|
|
3655
|
+
"application/json": {
|
|
3656
|
+
/** Format: uuid */
|
|
3657
|
+
id: string;
|
|
3658
|
+
/** Format: uuid */
|
|
3659
|
+
organizationId: string;
|
|
3660
|
+
/** Format: date-time */
|
|
3661
|
+
createdAt: string;
|
|
3662
|
+
/** Format: date-time */
|
|
3663
|
+
updatedAt: string;
|
|
3664
|
+
/** Format: uuid */
|
|
3665
|
+
familyId: string;
|
|
3666
|
+
title: string;
|
|
3667
|
+
slug: string;
|
|
3668
|
+
/** @enum {string} */
|
|
3669
|
+
status: "draft" | "active" | "archived";
|
|
3670
|
+
/** Format: date-time */
|
|
3671
|
+
publishedAt: string | null;
|
|
3672
|
+
/** Format: uuid */
|
|
3673
|
+
channelId: string | null;
|
|
3674
|
+
attributes: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
3675
|
+
[key: string]: unknown;
|
|
3676
|
+
};
|
|
3677
|
+
/** @description Tags in canonical form. These are normalized on write (lower-cased, slugified, deduplicated, truncated), so this array will not necessarily match what was submitted — see the `tags` field on the create/update request body for the exact rules. Filter with `?tag=` using either form. */
|
|
3678
|
+
tags: string[];
|
|
3679
|
+
/** Format: uuid */
|
|
3680
|
+
createdBy: string | null;
|
|
3681
|
+
/** Format: uuid */
|
|
3682
|
+
updatedBy: string | null;
|
|
3683
|
+
};
|
|
3684
|
+
};
|
|
3685
|
+
};
|
|
3686
|
+
/** @description Default Response */
|
|
3687
|
+
403: {
|
|
3688
|
+
headers: {
|
|
3689
|
+
[name: string]: unknown;
|
|
3690
|
+
};
|
|
3691
|
+
content: {
|
|
3692
|
+
"application/json": {
|
|
3693
|
+
error: {
|
|
3694
|
+
code: string;
|
|
3695
|
+
message: string;
|
|
3696
|
+
details?: unknown;
|
|
3697
|
+
};
|
|
3698
|
+
};
|
|
3699
|
+
};
|
|
3700
|
+
};
|
|
3701
|
+
/** @description Default Response */
|
|
3702
|
+
404: {
|
|
3703
|
+
headers: {
|
|
3704
|
+
[name: string]: unknown;
|
|
3705
|
+
};
|
|
3706
|
+
content: {
|
|
3707
|
+
"application/json": {
|
|
3708
|
+
error: {
|
|
3709
|
+
code: string;
|
|
3710
|
+
message: string;
|
|
3711
|
+
details?: unknown;
|
|
3712
|
+
};
|
|
3713
|
+
};
|
|
3714
|
+
};
|
|
3715
|
+
};
|
|
3716
|
+
/** @description Default Response */
|
|
3717
|
+
409: {
|
|
3718
|
+
headers: {
|
|
3719
|
+
[name: string]: unknown;
|
|
3720
|
+
};
|
|
3721
|
+
content: {
|
|
3722
|
+
"application/json": {
|
|
3723
|
+
error: {
|
|
3724
|
+
code: string;
|
|
3725
|
+
message: string;
|
|
3726
|
+
details?: unknown;
|
|
3727
|
+
};
|
|
3728
|
+
};
|
|
3729
|
+
};
|
|
3730
|
+
};
|
|
3731
|
+
/** @description Default Response */
|
|
3732
|
+
422: {
|
|
3733
|
+
headers: {
|
|
3734
|
+
[name: string]: unknown;
|
|
3735
|
+
};
|
|
3736
|
+
content: {
|
|
3737
|
+
"application/json": {
|
|
3738
|
+
error: {
|
|
3739
|
+
code: string;
|
|
3740
|
+
message: string;
|
|
3741
|
+
details?: unknown;
|
|
3742
|
+
};
|
|
3743
|
+
};
|
|
3744
|
+
};
|
|
3745
|
+
};
|
|
3746
|
+
};
|
|
3747
|
+
};
|
|
3748
|
+
delete?: never;
|
|
3749
|
+
options?: never;
|
|
3750
|
+
head?: never;
|
|
3751
|
+
patch?: never;
|
|
3752
|
+
trace?: never;
|
|
3753
|
+
};
|
|
3754
|
+
"/v1/content/tags": {
|
|
3755
|
+
parameters: {
|
|
3756
|
+
query?: never;
|
|
3757
|
+
header?: never;
|
|
3758
|
+
path?: never;
|
|
3759
|
+
cookie?: never;
|
|
3760
|
+
};
|
|
3761
|
+
/**
|
|
3762
|
+
* List all content-page tags in use, with counts
|
|
3763
|
+
* @description Every distinct tag currently on at least one content page, ordered by usage. Powers tag autocomplete in the editor, which is what keeps a vocabulary from drifting into `guide` / `guides` / `Guides`. Filter pages by tag with `GET /v1/content?tag=<tag>` (repeatable; multiple tags AND together).
|
|
3764
|
+
*/
|
|
3765
|
+
get: {
|
|
3766
|
+
parameters: {
|
|
3767
|
+
query?: never;
|
|
3768
|
+
header?: never;
|
|
3769
|
+
path?: never;
|
|
3770
|
+
cookie?: never;
|
|
3771
|
+
};
|
|
3772
|
+
requestBody?: never;
|
|
3773
|
+
responses: {
|
|
3774
|
+
/** @description Default Response */
|
|
3775
|
+
200: {
|
|
3776
|
+
headers: {
|
|
3777
|
+
[name: string]: unknown;
|
|
3778
|
+
};
|
|
3779
|
+
content: {
|
|
3780
|
+
"application/json": {
|
|
3781
|
+
value: string;
|
|
3782
|
+
count: number;
|
|
3783
|
+
}[];
|
|
3784
|
+
};
|
|
3785
|
+
};
|
|
3786
|
+
/** @description Default Response */
|
|
3787
|
+
403: {
|
|
3788
|
+
headers: {
|
|
3789
|
+
[name: string]: unknown;
|
|
3790
|
+
};
|
|
3791
|
+
content: {
|
|
3792
|
+
"application/json": {
|
|
3793
|
+
error: {
|
|
3794
|
+
code: string;
|
|
3795
|
+
message: string;
|
|
3796
|
+
details?: unknown;
|
|
3797
|
+
};
|
|
3798
|
+
};
|
|
3799
|
+
};
|
|
3800
|
+
};
|
|
3801
|
+
};
|
|
3802
|
+
};
|
|
3803
|
+
put?: never;
|
|
3804
|
+
post?: never;
|
|
3805
|
+
delete?: never;
|
|
3806
|
+
options?: never;
|
|
3807
|
+
head?: never;
|
|
3808
|
+
patch?: never;
|
|
3809
|
+
trace?: never;
|
|
3810
|
+
};
|
|
3811
|
+
"/v1/content/{id}": {
|
|
3812
|
+
parameters: {
|
|
3813
|
+
query?: never;
|
|
3814
|
+
header?: never;
|
|
3815
|
+
path?: never;
|
|
3816
|
+
cookie?: never;
|
|
3817
|
+
};
|
|
3818
|
+
/** Get a content page */
|
|
3819
|
+
get: {
|
|
3820
|
+
parameters: {
|
|
3821
|
+
query?: never;
|
|
3822
|
+
header?: never;
|
|
3823
|
+
path: {
|
|
3824
|
+
id: string;
|
|
3825
|
+
};
|
|
3826
|
+
cookie?: never;
|
|
3827
|
+
};
|
|
3828
|
+
requestBody?: never;
|
|
3829
|
+
responses: {
|
|
3830
|
+
/** @description Default Response */
|
|
3831
|
+
200: {
|
|
3832
|
+
headers: {
|
|
3833
|
+
[name: string]: unknown;
|
|
3834
|
+
};
|
|
3835
|
+
content: {
|
|
3836
|
+
"application/json": {
|
|
3837
|
+
/** Format: uuid */
|
|
3838
|
+
id: string;
|
|
3839
|
+
/** Format: uuid */
|
|
3840
|
+
organizationId: string;
|
|
3841
|
+
/** Format: date-time */
|
|
3842
|
+
createdAt: string;
|
|
3843
|
+
/** Format: date-time */
|
|
3844
|
+
updatedAt: string;
|
|
3845
|
+
/** Format: uuid */
|
|
3846
|
+
familyId: string;
|
|
3847
|
+
title: string;
|
|
3848
|
+
slug: string;
|
|
3849
|
+
/** @enum {string} */
|
|
3850
|
+
status: "draft" | "active" | "archived";
|
|
3851
|
+
/** Format: date-time */
|
|
3852
|
+
publishedAt: string | null;
|
|
3853
|
+
/** Format: uuid */
|
|
3854
|
+
channelId: string | null;
|
|
3855
|
+
attributes: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
3856
|
+
[key: string]: unknown;
|
|
3857
|
+
};
|
|
3858
|
+
/** @description Tags in canonical form. These are normalized on write (lower-cased, slugified, deduplicated, truncated), so this array will not necessarily match what was submitted — see the `tags` field on the create/update request body for the exact rules. Filter with `?tag=` using either form. */
|
|
3859
|
+
tags: string[];
|
|
3860
|
+
/** Format: uuid */
|
|
3861
|
+
createdBy: string | null;
|
|
3862
|
+
/** Format: uuid */
|
|
3863
|
+
updatedBy: string | null;
|
|
3864
|
+
categoryIds: string[];
|
|
3865
|
+
};
|
|
3866
|
+
};
|
|
3867
|
+
};
|
|
3868
|
+
/** @description Default Response */
|
|
3869
|
+
403: {
|
|
3870
|
+
headers: {
|
|
3871
|
+
[name: string]: unknown;
|
|
3872
|
+
};
|
|
3873
|
+
content: {
|
|
3874
|
+
"application/json": {
|
|
3875
|
+
error: {
|
|
3876
|
+
code: string;
|
|
3877
|
+
message: string;
|
|
3878
|
+
details?: unknown;
|
|
3879
|
+
};
|
|
3880
|
+
};
|
|
3881
|
+
};
|
|
3882
|
+
};
|
|
3883
|
+
/** @description Default Response */
|
|
3884
|
+
404: {
|
|
3885
|
+
headers: {
|
|
3886
|
+
[name: string]: unknown;
|
|
3887
|
+
};
|
|
3888
|
+
content: {
|
|
3889
|
+
"application/json": {
|
|
3890
|
+
error: {
|
|
3891
|
+
code: string;
|
|
3892
|
+
message: string;
|
|
3893
|
+
details?: unknown;
|
|
3894
|
+
};
|
|
3895
|
+
};
|
|
3896
|
+
};
|
|
3897
|
+
};
|
|
3898
|
+
};
|
|
3899
|
+
};
|
|
3900
|
+
put?: never;
|
|
3901
|
+
post?: never;
|
|
3902
|
+
/**
|
|
3903
|
+
* Delete a content page
|
|
3904
|
+
* @description Emits `content_page.deleted`.
|
|
3905
|
+
*/
|
|
3906
|
+
delete: {
|
|
3907
|
+
parameters: {
|
|
3908
|
+
query?: never;
|
|
3909
|
+
header?: never;
|
|
3910
|
+
path: {
|
|
3911
|
+
id: string;
|
|
3912
|
+
};
|
|
3913
|
+
cookie?: never;
|
|
3914
|
+
};
|
|
3915
|
+
requestBody?: never;
|
|
3916
|
+
responses: {
|
|
3917
|
+
/** @description Default Response */
|
|
3918
|
+
204: {
|
|
3919
|
+
headers: {
|
|
3920
|
+
[name: string]: unknown;
|
|
3921
|
+
};
|
|
3922
|
+
content: {
|
|
3923
|
+
"application/json": "null" | null;
|
|
3924
|
+
};
|
|
3925
|
+
};
|
|
3926
|
+
/** @description Default Response */
|
|
3927
|
+
403: {
|
|
3928
|
+
headers: {
|
|
3929
|
+
[name: string]: unknown;
|
|
3930
|
+
};
|
|
3931
|
+
content: {
|
|
3932
|
+
"application/json": {
|
|
3933
|
+
error: {
|
|
3934
|
+
code: string;
|
|
3935
|
+
message: string;
|
|
3936
|
+
details?: unknown;
|
|
3937
|
+
};
|
|
3938
|
+
};
|
|
3939
|
+
};
|
|
3940
|
+
};
|
|
3941
|
+
/** @description Default Response */
|
|
3942
|
+
404: {
|
|
3943
|
+
headers: {
|
|
3944
|
+
[name: string]: unknown;
|
|
3945
|
+
};
|
|
3946
|
+
content: {
|
|
3947
|
+
"application/json": {
|
|
3948
|
+
error: {
|
|
3949
|
+
code: string;
|
|
3950
|
+
message: string;
|
|
3951
|
+
details?: unknown;
|
|
3952
|
+
};
|
|
3953
|
+
};
|
|
3954
|
+
};
|
|
3955
|
+
};
|
|
3956
|
+
};
|
|
3957
|
+
};
|
|
3958
|
+
options?: never;
|
|
3959
|
+
head?: never;
|
|
3960
|
+
/**
|
|
3961
|
+
* Update a content page
|
|
3962
|
+
* @description `attributes` is merged per code, not replaced wholesale. Stamps `publishedAt` on the first transition to `active` unless the caller supplies one. Emits `content_page.updated` carrying `previous_status`.
|
|
3963
|
+
*/
|
|
3964
|
+
patch: {
|
|
3965
|
+
parameters: {
|
|
3966
|
+
query?: never;
|
|
3967
|
+
header?: never;
|
|
3968
|
+
path: {
|
|
3969
|
+
id: string;
|
|
3970
|
+
};
|
|
3971
|
+
cookie?: never;
|
|
3972
|
+
};
|
|
3973
|
+
requestBody: {
|
|
3974
|
+
content: {
|
|
3975
|
+
"application/json": {
|
|
3976
|
+
title?: string;
|
|
3977
|
+
slug?: string;
|
|
3978
|
+
/** @enum {string} */
|
|
3979
|
+
status?: "draft" | "active" | "archived";
|
|
3980
|
+
/** Format: date-time */
|
|
3981
|
+
publishedAt?: string | null;
|
|
3982
|
+
/** Format: uuid */
|
|
3983
|
+
channelId?: string | null;
|
|
3984
|
+
attributes?: {
|
|
3985
|
+
[key: string]: {
|
|
3986
|
+
locale: string | null;
|
|
3987
|
+
channel: string | null;
|
|
3988
|
+
value?: unknown;
|
|
3989
|
+
}[];
|
|
3990
|
+
};
|
|
3991
|
+
/** @description Replaces the full tag list when present. Free-form tags, canonicalized on write and echoed back in canonical form — the response will NOT match your input verbatim. Each tag is lower-cased, stripped of diacritics, has every run of non-alphanumerics replaced with `-`, is trimmed of leading/trailing `-`, and is then truncated to 60 characters. So `"Buying Guide"` is stored and filtered as `buying-guide`. Tags that normalize to nothing (`""`, `"!!"`) are dropped, and duplicates are removed keeping first-occurrence order, so the array you get back may be SHORTER than the one you sent. Note the asymmetry with `maxLength`: an item may be up to 80 characters on input but is truncated to 60 once canonicalized, which can collapse two long tags into one. */
|
|
3992
|
+
tags?: string[];
|
|
3993
|
+
};
|
|
3994
|
+
};
|
|
3995
|
+
};
|
|
3996
|
+
responses: {
|
|
3997
|
+
/** @description Default Response */
|
|
3998
|
+
200: {
|
|
3999
|
+
headers: {
|
|
4000
|
+
[name: string]: unknown;
|
|
4001
|
+
};
|
|
4002
|
+
content: {
|
|
4003
|
+
"application/json": {
|
|
4004
|
+
/** Format: uuid */
|
|
4005
|
+
id: string;
|
|
4006
|
+
/** Format: uuid */
|
|
4007
|
+
organizationId: string;
|
|
4008
|
+
/** Format: date-time */
|
|
4009
|
+
createdAt: string;
|
|
4010
|
+
/** Format: date-time */
|
|
4011
|
+
updatedAt: string;
|
|
4012
|
+
/** Format: uuid */
|
|
4013
|
+
familyId: string;
|
|
4014
|
+
title: string;
|
|
4015
|
+
slug: string;
|
|
3307
4016
|
/** @enum {string} */
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
4017
|
+
status: "draft" | "active" | "archived";
|
|
4018
|
+
/** Format: date-time */
|
|
4019
|
+
publishedAt: string | null;
|
|
4020
|
+
/** Format: uuid */
|
|
4021
|
+
channelId: string | null;
|
|
4022
|
+
attributes: (string | number | boolean | ("null" | null)) | unknown[] | {
|
|
4023
|
+
[key: string]: unknown;
|
|
4024
|
+
};
|
|
4025
|
+
/** @description Tags in canonical form. These are normalized on write (lower-cased, slugified, deduplicated, truncated), so this array will not necessarily match what was submitted — see the `tags` field on the create/update request body for the exact rules. Filter with `?tag=` using either form. */
|
|
4026
|
+
tags: string[];
|
|
4027
|
+
/** Format: uuid */
|
|
4028
|
+
createdBy: string | null;
|
|
4029
|
+
/** Format: uuid */
|
|
4030
|
+
updatedBy: string | null;
|
|
4031
|
+
};
|
|
3312
4032
|
};
|
|
3313
4033
|
};
|
|
3314
4034
|
/** @description Default Response */
|
|
3315
|
-
|
|
4035
|
+
403: {
|
|
3316
4036
|
headers: {
|
|
3317
4037
|
[name: string]: unknown;
|
|
3318
4038
|
};
|
|
@@ -3326,53 +4046,33 @@ interface paths {
|
|
|
3326
4046
|
};
|
|
3327
4047
|
};
|
|
3328
4048
|
};
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
cookie?: never;
|
|
3343
|
-
};
|
|
3344
|
-
requestBody: {
|
|
3345
|
-
content: {
|
|
3346
|
-
"application/json": {
|
|
3347
|
-
/** @enum {string} */
|
|
3348
|
-
type: "sku" | "upc" | "gtin8" | "gtin12" | "gtin13" | "gtin14" | "ean" | "mpn" | "asin" | "isbn" | "custom";
|
|
3349
|
-
customLabel?: string;
|
|
3350
|
-
value: string;
|
|
4049
|
+
/** @description Default Response */
|
|
4050
|
+
404: {
|
|
4051
|
+
headers: {
|
|
4052
|
+
[name: string]: unknown;
|
|
4053
|
+
};
|
|
4054
|
+
content: {
|
|
4055
|
+
"application/json": {
|
|
4056
|
+
error: {
|
|
4057
|
+
code: string;
|
|
4058
|
+
message: string;
|
|
4059
|
+
details?: unknown;
|
|
4060
|
+
};
|
|
4061
|
+
};
|
|
3351
4062
|
};
|
|
3352
4063
|
};
|
|
3353
|
-
};
|
|
3354
|
-
responses: {
|
|
3355
4064
|
/** @description Default Response */
|
|
3356
|
-
|
|
4065
|
+
409: {
|
|
3357
4066
|
headers: {
|
|
3358
4067
|
[name: string]: unknown;
|
|
3359
4068
|
};
|
|
3360
4069
|
content: {
|
|
3361
4070
|
"application/json": {
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
createdAt: string;
|
|
3368
|
-
/** Format: date-time */
|
|
3369
|
-
updatedAt: string;
|
|
3370
|
-
/** Format: uuid */
|
|
3371
|
-
variantId: string;
|
|
3372
|
-
/** @enum {string} */
|
|
3373
|
-
type: "sku" | "upc" | "gtin8" | "gtin12" | "gtin13" | "gtin14" | "ean" | "mpn" | "asin" | "isbn" | "custom";
|
|
3374
|
-
customLabel: string | null;
|
|
3375
|
-
value: string;
|
|
4071
|
+
error: {
|
|
4072
|
+
code: string;
|
|
4073
|
+
message: string;
|
|
4074
|
+
details?: unknown;
|
|
4075
|
+
};
|
|
3376
4076
|
};
|
|
3377
4077
|
};
|
|
3378
4078
|
};
|
|
@@ -3393,13 +4093,9 @@ interface paths {
|
|
|
3393
4093
|
};
|
|
3394
4094
|
};
|
|
3395
4095
|
};
|
|
3396
|
-
delete?: never;
|
|
3397
|
-
options?: never;
|
|
3398
|
-
head?: never;
|
|
3399
|
-
patch?: never;
|
|
3400
4096
|
trace?: never;
|
|
3401
4097
|
};
|
|
3402
|
-
"/v1/
|
|
4098
|
+
"/v1/content/{id}/categories": {
|
|
3403
4099
|
parameters: {
|
|
3404
4100
|
query?: never;
|
|
3405
4101
|
header?: never;
|
|
@@ -3407,10 +4103,11 @@ interface paths {
|
|
|
3407
4103
|
cookie?: never;
|
|
3408
4104
|
};
|
|
3409
4105
|
get?: never;
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
4106
|
+
/**
|
|
4107
|
+
* Replace a content page’s categories
|
|
4108
|
+
* @description Replaces the full set — pass an empty array to clear. Uses the same `categories` table products do, so a category means one thing across the whole org.
|
|
4109
|
+
*/
|
|
4110
|
+
put: {
|
|
3414
4111
|
parameters: {
|
|
3415
4112
|
query?: never;
|
|
3416
4113
|
header?: never;
|
|
@@ -3419,15 +4116,44 @@ interface paths {
|
|
|
3419
4116
|
};
|
|
3420
4117
|
cookie?: never;
|
|
3421
4118
|
};
|
|
3422
|
-
requestBody
|
|
4119
|
+
requestBody: {
|
|
4120
|
+
content: {
|
|
4121
|
+
"application/json": {
|
|
4122
|
+
categoryIds: string[];
|
|
4123
|
+
};
|
|
4124
|
+
};
|
|
4125
|
+
};
|
|
3423
4126
|
responses: {
|
|
3424
4127
|
/** @description Default Response */
|
|
3425
|
-
|
|
4128
|
+
200: {
|
|
3426
4129
|
headers: {
|
|
3427
4130
|
[name: string]: unknown;
|
|
3428
4131
|
};
|
|
3429
4132
|
content: {
|
|
3430
|
-
"application/json":
|
|
4133
|
+
"application/json": {
|
|
4134
|
+
data: {
|
|
4135
|
+
/** Format: uuid */
|
|
4136
|
+
contentPageId: string;
|
|
4137
|
+
/** Format: uuid */
|
|
4138
|
+
categoryId: string;
|
|
4139
|
+
position: number;
|
|
4140
|
+
}[];
|
|
4141
|
+
};
|
|
4142
|
+
};
|
|
4143
|
+
};
|
|
4144
|
+
/** @description Default Response */
|
|
4145
|
+
403: {
|
|
4146
|
+
headers: {
|
|
4147
|
+
[name: string]: unknown;
|
|
4148
|
+
};
|
|
4149
|
+
content: {
|
|
4150
|
+
"application/json": {
|
|
4151
|
+
error: {
|
|
4152
|
+
code: string;
|
|
4153
|
+
message: string;
|
|
4154
|
+
details?: unknown;
|
|
4155
|
+
};
|
|
4156
|
+
};
|
|
3431
4157
|
};
|
|
3432
4158
|
};
|
|
3433
4159
|
/** @description Default Response */
|
|
@@ -3447,6 +4173,8 @@ interface paths {
|
|
|
3447
4173
|
};
|
|
3448
4174
|
};
|
|
3449
4175
|
};
|
|
4176
|
+
post?: never;
|
|
4177
|
+
delete?: never;
|
|
3450
4178
|
options?: never;
|
|
3451
4179
|
head?: never;
|
|
3452
4180
|
patch?: never;
|
|
@@ -4992,7 +5720,110 @@ interface paths {
|
|
|
4992
5720
|
/** Format: uuid */
|
|
4993
5721
|
mediaId: string;
|
|
4994
5722
|
/** @enum {string} */
|
|
4995
|
-
entityType: "product" | "variant";
|
|
5723
|
+
entityType: "product" | "variant" | "content_page";
|
|
5724
|
+
/** Format: uuid */
|
|
5725
|
+
entityId: string;
|
|
5726
|
+
/** @enum {string} */
|
|
5727
|
+
role: "hero" | "gallery" | "thumbnail" | "technical" | "lifestyle" | "swatch";
|
|
5728
|
+
position: number;
|
|
5729
|
+
altText: ((string | number | boolean | ("null" | null)) | unknown[] | {
|
|
5730
|
+
[key: string]: unknown;
|
|
5731
|
+
}) | null;
|
|
5732
|
+
/** Format: uuid */
|
|
5733
|
+
channelId: string | null;
|
|
5734
|
+
};
|
|
5735
|
+
url: string | null;
|
|
5736
|
+
}[];
|
|
5737
|
+
};
|
|
5738
|
+
};
|
|
5739
|
+
};
|
|
5740
|
+
/** @description Default Response */
|
|
5741
|
+
404: {
|
|
5742
|
+
headers: {
|
|
5743
|
+
[name: string]: unknown;
|
|
5744
|
+
};
|
|
5745
|
+
content: {
|
|
5746
|
+
"application/json": {
|
|
5747
|
+
error: {
|
|
5748
|
+
code: string;
|
|
5749
|
+
message: string;
|
|
5750
|
+
details?: unknown;
|
|
5751
|
+
};
|
|
5752
|
+
};
|
|
5753
|
+
};
|
|
5754
|
+
};
|
|
5755
|
+
};
|
|
5756
|
+
};
|
|
5757
|
+
put?: never;
|
|
5758
|
+
post?: never;
|
|
5759
|
+
delete?: never;
|
|
5760
|
+
options?: never;
|
|
5761
|
+
head?: never;
|
|
5762
|
+
patch?: never;
|
|
5763
|
+
trace?: never;
|
|
5764
|
+
};
|
|
5765
|
+
"/v1/content/{id}/media": {
|
|
5766
|
+
parameters: {
|
|
5767
|
+
query?: never;
|
|
5768
|
+
header?: never;
|
|
5769
|
+
path?: never;
|
|
5770
|
+
cookie?: never;
|
|
5771
|
+
};
|
|
5772
|
+
/**
|
|
5773
|
+
* List media attached to a content page
|
|
5774
|
+
* @description Same shape as the product/variant galleries. Lives here rather than under /v1/content so it sits with its siblings and reuses the same URL resolution; associations are tenant-scoped by RLS regardless.
|
|
5775
|
+
*/
|
|
5776
|
+
get: {
|
|
5777
|
+
parameters: {
|
|
5778
|
+
query?: never;
|
|
5779
|
+
header?: never;
|
|
5780
|
+
path: {
|
|
5781
|
+
id: string;
|
|
5782
|
+
};
|
|
5783
|
+
cookie?: never;
|
|
5784
|
+
};
|
|
5785
|
+
requestBody?: never;
|
|
5786
|
+
responses: {
|
|
5787
|
+
/** @description Default Response */
|
|
5788
|
+
200: {
|
|
5789
|
+
headers: {
|
|
5790
|
+
[name: string]: unknown;
|
|
5791
|
+
};
|
|
5792
|
+
content: {
|
|
5793
|
+
"application/json": {
|
|
5794
|
+
data: {
|
|
5795
|
+
/** Format: uuid */
|
|
5796
|
+
id: string;
|
|
5797
|
+
/** Format: uuid */
|
|
5798
|
+
organizationId: string;
|
|
5799
|
+
/** Format: date-time */
|
|
5800
|
+
createdAt: string;
|
|
5801
|
+
/** Format: date-time */
|
|
5802
|
+
updatedAt: string;
|
|
5803
|
+
/** @enum {string} */
|
|
5804
|
+
type: "image" | "video" | "document" | "model_3d";
|
|
5805
|
+
storageKey: string;
|
|
5806
|
+
filename: string;
|
|
5807
|
+
mimeType: string;
|
|
5808
|
+
sizeBytes: number;
|
|
5809
|
+
width: number | null;
|
|
5810
|
+
height: number | null;
|
|
5811
|
+
metadata: ((string | number | boolean | ("null" | null)) | unknown[] | {
|
|
5812
|
+
[key: string]: unknown;
|
|
5813
|
+
}) | null;
|
|
5814
|
+
association: {
|
|
5815
|
+
/** Format: uuid */
|
|
5816
|
+
id: string;
|
|
5817
|
+
/** Format: uuid */
|
|
5818
|
+
organizationId: string;
|
|
5819
|
+
/** Format: date-time */
|
|
5820
|
+
createdAt: string;
|
|
5821
|
+
/** Format: date-time */
|
|
5822
|
+
updatedAt: string;
|
|
5823
|
+
/** Format: uuid */
|
|
5824
|
+
mediaId: string;
|
|
5825
|
+
/** @enum {string} */
|
|
5826
|
+
entityType: "product" | "variant" | "content_page";
|
|
4996
5827
|
/** Format: uuid */
|
|
4997
5828
|
entityId: string;
|
|
4998
5829
|
/** @enum {string} */
|
|
@@ -5092,7 +5923,7 @@ interface paths {
|
|
|
5092
5923
|
/** Format: uuid */
|
|
5093
5924
|
mediaId: string;
|
|
5094
5925
|
/** @enum {string} */
|
|
5095
|
-
entityType: "product" | "variant";
|
|
5926
|
+
entityType: "product" | "variant" | "content_page";
|
|
5096
5927
|
/** Format: uuid */
|
|
5097
5928
|
entityId: string;
|
|
5098
5929
|
/** @enum {string} */
|
|
@@ -5154,7 +5985,40 @@ interface paths {
|
|
|
5154
5985
|
path?: never;
|
|
5155
5986
|
cookie?: never;
|
|
5156
5987
|
};
|
|
5157
|
-
requestBody
|
|
5988
|
+
requestBody: {
|
|
5989
|
+
content: {
|
|
5990
|
+
"multipart/form-data": {
|
|
5991
|
+
/**
|
|
5992
|
+
* Format: binary
|
|
5993
|
+
* @description The file to upload. Images, video and PDF are accepted; see the 400 response for the rejected-mime and blocked-extension cases.
|
|
5994
|
+
*/
|
|
5995
|
+
file: string;
|
|
5996
|
+
/**
|
|
5997
|
+
* @description Attach the upload in the same transaction. Requires `entityId`; supplying only one of the pair uploads the file WITHOUT associating it.
|
|
5998
|
+
* @enum {string}
|
|
5999
|
+
*/
|
|
6000
|
+
entityType?: "product" | "variant" | "content_page";
|
|
6001
|
+
/**
|
|
6002
|
+
* Format: uuid
|
|
6003
|
+
* @description The id of the entity named by `entityType`.
|
|
6004
|
+
*/
|
|
6005
|
+
entityId?: string;
|
|
6006
|
+
/**
|
|
6007
|
+
* @description Association role. Ignored unless `entityType`+`entityId` are present.
|
|
6008
|
+
* @default gallery
|
|
6009
|
+
* @enum {string}
|
|
6010
|
+
*/
|
|
6011
|
+
role?: "hero" | "gallery" | "thumbnail" | "technical" | "lifestyle" | "swatch";
|
|
6012
|
+
/**
|
|
6013
|
+
* @description Sort position within the entity’s gallery.
|
|
6014
|
+
* @default 0
|
|
6015
|
+
*/
|
|
6016
|
+
position?: number;
|
|
6017
|
+
/** @description A JSON OBJECT keyed by locale, sent as a STRING — e.g. `{"en_US":"Blue widget on white"}`. Unparseable JSON is ignored rather than rejected, so malformed alt text costs you the alt text, not the upload. */
|
|
6018
|
+
altText?: string;
|
|
6019
|
+
};
|
|
6020
|
+
};
|
|
6021
|
+
};
|
|
5158
6022
|
responses: {
|
|
5159
6023
|
/** @description Default Response */
|
|
5160
6024
|
201: {
|
|
@@ -5194,7 +6058,7 @@ interface paths {
|
|
|
5194
6058
|
/** Format: uuid */
|
|
5195
6059
|
mediaId: string;
|
|
5196
6060
|
/** @enum {string} */
|
|
5197
|
-
entityType: "product" | "variant";
|
|
6061
|
+
entityType: "product" | "variant" | "content_page";
|
|
5198
6062
|
/** Format: uuid */
|
|
5199
6063
|
entityId: string;
|
|
5200
6064
|
/** @enum {string} */
|
|
@@ -5271,7 +6135,7 @@ interface paths {
|
|
|
5271
6135
|
/** Format: uuid */
|
|
5272
6136
|
mediaId: string;
|
|
5273
6137
|
/** @enum {string} */
|
|
5274
|
-
entityType: "product" | "variant";
|
|
6138
|
+
entityType: "product" | "variant" | "content_page";
|
|
5275
6139
|
/** Format: uuid */
|
|
5276
6140
|
entityId: string;
|
|
5277
6141
|
/**
|
|
@@ -5308,7 +6172,7 @@ interface paths {
|
|
|
5308
6172
|
/** Format: uuid */
|
|
5309
6173
|
mediaId: string;
|
|
5310
6174
|
/** @enum {string} */
|
|
5311
|
-
entityType: "product" | "variant";
|
|
6175
|
+
entityType: "product" | "variant" | "content_page";
|
|
5312
6176
|
/** Format: uuid */
|
|
5313
6177
|
entityId: string;
|
|
5314
6178
|
/** @enum {string} */
|
|
@@ -5436,7 +6300,7 @@ interface paths {
|
|
|
5436
6300
|
/** Format: uuid */
|
|
5437
6301
|
mediaId: string;
|
|
5438
6302
|
/** @enum {string} */
|
|
5439
|
-
entityType: "product" | "variant";
|
|
6303
|
+
entityType: "product" | "variant" | "content_page";
|
|
5440
6304
|
/** Format: uuid */
|
|
5441
6305
|
entityId: string;
|
|
5442
6306
|
/** @enum {string} */
|
|
@@ -5492,7 +6356,7 @@ interface paths {
|
|
|
5492
6356
|
content: {
|
|
5493
6357
|
"application/json": {
|
|
5494
6358
|
/** @enum {string} */
|
|
5495
|
-
entityType: "product" | "variant";
|
|
6359
|
+
entityType: "product" | "variant" | "content_page";
|
|
5496
6360
|
/** Format: uuid */
|
|
5497
6361
|
entityId: string;
|
|
5498
6362
|
orderedIds: string[];
|
|
@@ -5519,7 +6383,7 @@ interface paths {
|
|
|
5519
6383
|
/** Format: uuid */
|
|
5520
6384
|
mediaId: string;
|
|
5521
6385
|
/** @enum {string} */
|
|
5522
|
-
entityType: "product" | "variant";
|
|
6386
|
+
entityType: "product" | "variant" | "content_page";
|
|
5523
6387
|
/** Format: uuid */
|
|
5524
6388
|
entityId: string;
|
|
5525
6389
|
/** @enum {string} */
|
|
@@ -5598,7 +6462,7 @@ interface paths {
|
|
|
5598
6462
|
/** Format: uuid */
|
|
5599
6463
|
mediaId: string;
|
|
5600
6464
|
/** @enum {string} */
|
|
5601
|
-
entityType: "product" | "variant";
|
|
6465
|
+
entityType: "product" | "variant" | "content_page";
|
|
5602
6466
|
/** Format: uuid */
|
|
5603
6467
|
entityId: string;
|
|
5604
6468
|
/** @enum {string} */
|
|
@@ -6712,7 +7576,7 @@ interface paths {
|
|
|
6712
7576
|
availability: "oss" | "hosted";
|
|
6713
7577
|
capabilities: {
|
|
6714
7578
|
/** @enum {string} */
|
|
6715
|
-
entity: "product" | "variant" | "media" | "category";
|
|
7579
|
+
entity: "product" | "variant" | "media" | "category" | "content_page";
|
|
6716
7580
|
/** @enum {string} */
|
|
6717
7581
|
direction: "push" | "pull" | "bidirectional";
|
|
6718
7582
|
}[];
|
|
@@ -8178,8 +9042,7 @@ interface paths {
|
|
|
8178
9042
|
}[];
|
|
8179
9043
|
limit: number;
|
|
8180
9044
|
offset: number;
|
|
8181
|
-
hasMore
|
|
8182
|
-
total?: number;
|
|
9045
|
+
hasMore: boolean;
|
|
8183
9046
|
};
|
|
8184
9047
|
};
|
|
8185
9048
|
};
|