@asstio-dev/storefront 0.9.2 → 0.11.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 +76 -3
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/schema.d.ts +265 -1
- package/dist/seo/breadcrumb.d.ts +9 -0
- package/dist/seo/breadcrumb.js +18 -0
- package/dist/seo/head.d.ts +10 -0
- package/dist/seo/head.js +101 -0
- package/dist/seo/locales.d.ts +26 -0
- package/dist/seo/locales.js +95 -0
- package/dist/seo/product.d.ts +6 -0
- package/dist/seo/product.js +128 -0
- package/dist/seo/serialize.d.ts +6 -0
- package/dist/seo/serialize.js +8 -0
- package/dist/seo/shared.d.ts +38 -0
- package/dist/seo/shared.js +106 -0
- package/dist/seo/types.d.ts +100 -0
- package/dist/seo/types.js +7 -0
- package/package.json +6 -2
- package/src/schema.d.ts +265 -1
package/src/schema.d.ts
CHANGED
|
@@ -4,6 +4,40 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export interface paths {
|
|
7
|
+
"/v1/brands": {
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: never;
|
|
10
|
+
header?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
cookie?: never;
|
|
13
|
+
};
|
|
14
|
+
/** Brands with a page on this market (some product of the brand is sold here), by name. Empty when the site has no brand facet or the market no brand URL pattern. productCount counts product families with a variant of the brand sold here. */
|
|
15
|
+
get: operations["ListBrands"];
|
|
16
|
+
put?: never;
|
|
17
|
+
post?: never;
|
|
18
|
+
delete?: never;
|
|
19
|
+
options?: never;
|
|
20
|
+
head?: never;
|
|
21
|
+
patch?: never;
|
|
22
|
+
trace?: never;
|
|
23
|
+
};
|
|
24
|
+
"/v1/brands/{slugOrId}": {
|
|
25
|
+
parameters: {
|
|
26
|
+
query?: never;
|
|
27
|
+
header?: never;
|
|
28
|
+
path?: never;
|
|
29
|
+
cookie?: never;
|
|
30
|
+
};
|
|
31
|
+
/** A brand page's data by current slug, historical slug or id: name, description, logo, website, the brand's default responsible parties and the facet link for its listing. redirectTo is set for a historical slug. */
|
|
32
|
+
get: operations["GetBrand"];
|
|
33
|
+
put?: never;
|
|
34
|
+
post?: never;
|
|
35
|
+
delete?: never;
|
|
36
|
+
options?: never;
|
|
37
|
+
head?: never;
|
|
38
|
+
patch?: never;
|
|
39
|
+
trace?: never;
|
|
40
|
+
};
|
|
7
41
|
"/v1/cart": {
|
|
8
42
|
parameters: {
|
|
9
43
|
query?: never;
|
|
@@ -325,7 +359,7 @@ export interface paths {
|
|
|
325
359
|
path?: never;
|
|
326
360
|
cookie?: never;
|
|
327
361
|
};
|
|
328
|
-
/** Ids, slugs, URLs and lastmod for sitemap.xml and selective revalidation. type=product|collection, ?since= is inclusive. */
|
|
362
|
+
/** Ids, slugs, URLs and lastmod for sitemap.xml and selective revalidation. type=product|collection|brand, ?since= is inclusive. */
|
|
329
363
|
get: operations["GetSitemap"];
|
|
330
364
|
put?: never;
|
|
331
365
|
post?: never;
|
|
@@ -368,9 +402,50 @@ export interface components {
|
|
|
368
402
|
valueKeys: string[] | null;
|
|
369
403
|
values: string[] | null;
|
|
370
404
|
};
|
|
405
|
+
BrandDetailDto: {
|
|
406
|
+
alternateUrls: {
|
|
407
|
+
[key: string]: string;
|
|
408
|
+
};
|
|
409
|
+
description: null | components["schemas"]["DescriptionDto"];
|
|
410
|
+
facet: null | components["schemas"]["FacetLinkDto"];
|
|
411
|
+
id: string;
|
|
412
|
+
logo: null | components["schemas"]["MediaDescriptorDto"];
|
|
413
|
+
name: string;
|
|
414
|
+
/** Format: int64 */
|
|
415
|
+
productCount: number | string;
|
|
416
|
+
redirectTo: null | string;
|
|
417
|
+
responsible: components["schemas"]["ResponsibleDto"];
|
|
418
|
+
slug: string;
|
|
419
|
+
/** Format: date-time */
|
|
420
|
+
updatedAt: string;
|
|
421
|
+
url: string;
|
|
422
|
+
websiteUrl: null | string;
|
|
423
|
+
};
|
|
371
424
|
BrandDto: {
|
|
372
425
|
facet: null | components["schemas"]["FacetLinkDto"];
|
|
426
|
+
id?: null | string;
|
|
373
427
|
label: string;
|
|
428
|
+
logo?: null | components["schemas"]["MediaDescriptorDto"];
|
|
429
|
+
slug?: null | string;
|
|
430
|
+
url?: null | string;
|
|
431
|
+
};
|
|
432
|
+
BrandListItemDto: {
|
|
433
|
+
id: string;
|
|
434
|
+
logo: null | components["schemas"]["MediaDescriptorDto"];
|
|
435
|
+
name: string;
|
|
436
|
+
/** Format: int64 */
|
|
437
|
+
productCount: number | string;
|
|
438
|
+
slug: string;
|
|
439
|
+
url: string;
|
|
440
|
+
};
|
|
441
|
+
BrandPageDto: {
|
|
442
|
+
items: components["schemas"]["BrandListItemDto"][];
|
|
443
|
+
/** Format: int32 */
|
|
444
|
+
page: number | string;
|
|
445
|
+
/** Format: int32 */
|
|
446
|
+
pageSize: number | string;
|
|
447
|
+
/** Format: int64 */
|
|
448
|
+
total: number | string;
|
|
374
449
|
};
|
|
375
450
|
BundleComponentDto: {
|
|
376
451
|
product: components["schemas"]["ProductCardDto"];
|
|
@@ -731,6 +806,18 @@ export interface components {
|
|
|
731
806
|
gross: string;
|
|
732
807
|
vat: components["schemas"]["VatAmountDto"][];
|
|
733
808
|
};
|
|
809
|
+
PartyDto: {
|
|
810
|
+
city: null | string;
|
|
811
|
+
countryCode: string;
|
|
812
|
+
email: null | string;
|
|
813
|
+
legalName: string;
|
|
814
|
+
name: string;
|
|
815
|
+
phone: null | string;
|
|
816
|
+
postalCode: null | string;
|
|
817
|
+
region: null | string;
|
|
818
|
+
street: null | string;
|
|
819
|
+
url: null | string;
|
|
820
|
+
};
|
|
734
821
|
PriceDto: {
|
|
735
822
|
amount: string;
|
|
736
823
|
compareAt: null | string;
|
|
@@ -773,6 +860,7 @@ export interface components {
|
|
|
773
860
|
options: components["schemas"]["OptionDto"][];
|
|
774
861
|
redirectTo: null | string;
|
|
775
862
|
related: components["schemas"]["RelatedGroupDto"][];
|
|
863
|
+
responsible: components["schemas"]["ResponsibleDto"];
|
|
776
864
|
seo: components["schemas"]["SeoDto"];
|
|
777
865
|
shortDescription: null | string;
|
|
778
866
|
sku: string;
|
|
@@ -802,6 +890,11 @@ export interface components {
|
|
|
802
890
|
label: string;
|
|
803
891
|
products: components["schemas"]["ProductCardDto"][];
|
|
804
892
|
};
|
|
893
|
+
ResponsibleDto: {
|
|
894
|
+
euResponsiblePerson: null | components["schemas"]["PartyDto"];
|
|
895
|
+
importer: null | components["schemas"]["PartyDto"];
|
|
896
|
+
manufacturer: null | components["schemas"]["PartyDto"];
|
|
897
|
+
};
|
|
805
898
|
SeoDto: {
|
|
806
899
|
description: null | string;
|
|
807
900
|
title: string;
|
|
@@ -909,12 +1002,14 @@ export interface components {
|
|
|
909
1002
|
product: string;
|
|
910
1003
|
};
|
|
911
1004
|
VariantDto: {
|
|
1005
|
+
brand: null | components["schemas"]["BrandDto"];
|
|
912
1006
|
hasOwnImages: boolean;
|
|
913
1007
|
id: string;
|
|
914
1008
|
image: null | components["schemas"]["MediaDescriptorDto"];
|
|
915
1009
|
images: components["schemas"]["MediaDescriptorDto"][];
|
|
916
1010
|
inStock: boolean;
|
|
917
1011
|
price: null | components["schemas"]["PriceDto"];
|
|
1012
|
+
responsible: components["schemas"]["ResponsibleDto"];
|
|
918
1013
|
selectedOptions: {
|
|
919
1014
|
[key: string]: string;
|
|
920
1015
|
};
|
|
@@ -958,6 +1053,175 @@ export interface components {
|
|
|
958
1053
|
}
|
|
959
1054
|
export type $defs = Record<string, never>;
|
|
960
1055
|
export interface operations {
|
|
1056
|
+
ListBrands: {
|
|
1057
|
+
parameters: {
|
|
1058
|
+
query?: {
|
|
1059
|
+
/** @description 1-based page. page × pageSize must not exceed 10000 (default pageSize 100, max 1000). */
|
|
1060
|
+
page?: number;
|
|
1061
|
+
/** @description Items per page, 1–1000. Out of range is a 400 with code INVALID_PAGE. */
|
|
1062
|
+
pageSize?: number;
|
|
1063
|
+
};
|
|
1064
|
+
header: {
|
|
1065
|
+
/** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
|
|
1066
|
+
"X-Site-Key": string;
|
|
1067
|
+
/** @description Market code (e.g. "se"). Omit for the site's default market. */
|
|
1068
|
+
"X-Market"?: string;
|
|
1069
|
+
/** @description BCP-47 language tag. Omit to use the market's language. */
|
|
1070
|
+
"Accept-Language"?: string;
|
|
1071
|
+
};
|
|
1072
|
+
path?: never;
|
|
1073
|
+
cookie?: never;
|
|
1074
|
+
};
|
|
1075
|
+
requestBody?: never;
|
|
1076
|
+
responses: {
|
|
1077
|
+
/** @description OK */
|
|
1078
|
+
200: {
|
|
1079
|
+
headers: {
|
|
1080
|
+
[name: string]: unknown;
|
|
1081
|
+
};
|
|
1082
|
+
content: {
|
|
1083
|
+
"application/json": components["schemas"]["BrandPageDto"];
|
|
1084
|
+
};
|
|
1085
|
+
};
|
|
1086
|
+
/** @description problem+json. MARKET_UNKNOWN (no such market on this site) or INVALID_PAGE. */
|
|
1087
|
+
400: {
|
|
1088
|
+
headers: {
|
|
1089
|
+
[name: string]: unknown;
|
|
1090
|
+
};
|
|
1091
|
+
content: {
|
|
1092
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1093
|
+
};
|
|
1094
|
+
};
|
|
1095
|
+
/** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID. */
|
|
1096
|
+
401: {
|
|
1097
|
+
headers: {
|
|
1098
|
+
[name: string]: unknown;
|
|
1099
|
+
};
|
|
1100
|
+
content: {
|
|
1101
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1102
|
+
};
|
|
1103
|
+
};
|
|
1104
|
+
/** @description problem+json. SECRET_KEY_FROM_BROWSER: a secret key was sent from a browser. */
|
|
1105
|
+
403: {
|
|
1106
|
+
headers: {
|
|
1107
|
+
[name: string]: unknown;
|
|
1108
|
+
};
|
|
1109
|
+
content: {
|
|
1110
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1111
|
+
};
|
|
1112
|
+
};
|
|
1113
|
+
/** @description problem+json. SITE_INACTIVE, or NOT_FOUND for an unrouted path. */
|
|
1114
|
+
404: {
|
|
1115
|
+
headers: {
|
|
1116
|
+
[name: string]: unknown;
|
|
1117
|
+
};
|
|
1118
|
+
content: {
|
|
1119
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1120
|
+
};
|
|
1121
|
+
};
|
|
1122
|
+
/** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
|
|
1123
|
+
429: {
|
|
1124
|
+
headers: {
|
|
1125
|
+
[name: string]: unknown;
|
|
1126
|
+
};
|
|
1127
|
+
content: {
|
|
1128
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1129
|
+
};
|
|
1130
|
+
};
|
|
1131
|
+
/** @description problem+json. SITE_REGISTRY_WARMING or INDEX_UNAVAILABLE — retry, the request was not wrong. */
|
|
1132
|
+
503: {
|
|
1133
|
+
headers: {
|
|
1134
|
+
[name: string]: unknown;
|
|
1135
|
+
};
|
|
1136
|
+
content: {
|
|
1137
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1138
|
+
};
|
|
1139
|
+
};
|
|
1140
|
+
};
|
|
1141
|
+
};
|
|
1142
|
+
GetBrand: {
|
|
1143
|
+
parameters: {
|
|
1144
|
+
query?: never;
|
|
1145
|
+
header: {
|
|
1146
|
+
/** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
|
|
1147
|
+
"X-Site-Key": string;
|
|
1148
|
+
/** @description Market code (e.g. "se"). Omit for the site's default market. */
|
|
1149
|
+
"X-Market"?: string;
|
|
1150
|
+
/** @description BCP-47 language tag. Omit to use the market's language. */
|
|
1151
|
+
"Accept-Language"?: string;
|
|
1152
|
+
};
|
|
1153
|
+
path: {
|
|
1154
|
+
slugOrId: string;
|
|
1155
|
+
};
|
|
1156
|
+
cookie?: never;
|
|
1157
|
+
};
|
|
1158
|
+
requestBody?: never;
|
|
1159
|
+
responses: {
|
|
1160
|
+
/** @description OK */
|
|
1161
|
+
200: {
|
|
1162
|
+
headers: {
|
|
1163
|
+
[name: string]: unknown;
|
|
1164
|
+
};
|
|
1165
|
+
content: {
|
|
1166
|
+
"application/json": components["schemas"]["BrandDetailDto"];
|
|
1167
|
+
};
|
|
1168
|
+
};
|
|
1169
|
+
/** @description problem+json. MARKET_UNKNOWN (no such market on this site) or INVALID_PAGE. */
|
|
1170
|
+
400: {
|
|
1171
|
+
headers: {
|
|
1172
|
+
[name: string]: unknown;
|
|
1173
|
+
};
|
|
1174
|
+
content: {
|
|
1175
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1176
|
+
};
|
|
1177
|
+
};
|
|
1178
|
+
/** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID. */
|
|
1179
|
+
401: {
|
|
1180
|
+
headers: {
|
|
1181
|
+
[name: string]: unknown;
|
|
1182
|
+
};
|
|
1183
|
+
content: {
|
|
1184
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1185
|
+
};
|
|
1186
|
+
};
|
|
1187
|
+
/** @description problem+json. SECRET_KEY_FROM_BROWSER: a secret key was sent from a browser. */
|
|
1188
|
+
403: {
|
|
1189
|
+
headers: {
|
|
1190
|
+
[name: string]: unknown;
|
|
1191
|
+
};
|
|
1192
|
+
content: {
|
|
1193
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1194
|
+
};
|
|
1195
|
+
};
|
|
1196
|
+
/** @description problem+json. BRAND_NOT_FOUND, or SITE_INACTIVE when the site itself is not live. */
|
|
1197
|
+
404: {
|
|
1198
|
+
headers: {
|
|
1199
|
+
[name: string]: unknown;
|
|
1200
|
+
};
|
|
1201
|
+
content: {
|
|
1202
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1203
|
+
};
|
|
1204
|
+
};
|
|
1205
|
+
/** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
|
|
1206
|
+
429: {
|
|
1207
|
+
headers: {
|
|
1208
|
+
[name: string]: unknown;
|
|
1209
|
+
};
|
|
1210
|
+
content: {
|
|
1211
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1212
|
+
};
|
|
1213
|
+
};
|
|
1214
|
+
/** @description problem+json. SITE_REGISTRY_WARMING or INDEX_UNAVAILABLE — retry, the request was not wrong. */
|
|
1215
|
+
503: {
|
|
1216
|
+
headers: {
|
|
1217
|
+
[name: string]: unknown;
|
|
1218
|
+
};
|
|
1219
|
+
content: {
|
|
1220
|
+
"application/problem+json": components["schemas"]["StorefrontProblem"];
|
|
1221
|
+
};
|
|
1222
|
+
};
|
|
1223
|
+
};
|
|
1224
|
+
};
|
|
961
1225
|
GetCart: {
|
|
962
1226
|
parameters: {
|
|
963
1227
|
query?: never;
|