@whizzes/wbsc 0.0.1-early-dev-8 → 0.0.1-early-dev-10
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
CHANGED
@@ -1 +1 @@
|
|
1
|
-
#
|
1
|
+
# wbsc
|
package/package.json
CHANGED
package/src/types/index.ts
CHANGED
@@ -21,6 +21,7 @@ export type Scalars = {
|
|
21
21
|
Email: { input: any; output: any; }
|
22
22
|
JsonSchema: { input: any; output: any; }
|
23
23
|
JsonString: { input: any; output: any; }
|
24
|
+
NaiveDate: { input: any; output: any; }
|
24
25
|
Slug: { input: any; output: any; }
|
25
26
|
UUID: { input: any; output: any; }
|
26
27
|
Upload: { input: any; output: any; }
|
@@ -40,6 +41,61 @@ export enum ActorTypeKind {
|
|
40
41
|
Storefront = 'STOREFRONT'
|
41
42
|
}
|
42
43
|
|
44
|
+
/** Platform API Token */
|
45
|
+
export type ApiToken = {
|
46
|
+
__typename?: 'ApiToken';
|
47
|
+
channelCode: Scalars['ChannelCode']['output'];
|
48
|
+
createdAt: Scalars['DateTime']['output'];
|
49
|
+
expiresOn: Scalars['DateTime']['output'];
|
50
|
+
id: Scalars['UUID']['output'];
|
51
|
+
name: Scalars['String']['output'];
|
52
|
+
scopes: Array<Scope>;
|
53
|
+
token?: Maybe<Scalars['String']['output']>;
|
54
|
+
updatedAt: Scalars['DateTime']['output'];
|
55
|
+
};
|
56
|
+
|
57
|
+
export type ApiTokenConnection = {
|
58
|
+
__typename?: 'ApiTokenConnection';
|
59
|
+
/** A list of edges. */
|
60
|
+
edges: Array<ApiTokenEdge>;
|
61
|
+
/** A list of nodes. */
|
62
|
+
nodes: Array<ApiToken>;
|
63
|
+
/** Information to aid in pagination. */
|
64
|
+
pageInfo: PageInfo;
|
65
|
+
totalCount: Scalars['Int']['output'];
|
66
|
+
totalPages: Scalars['Int']['output'];
|
67
|
+
};
|
68
|
+
|
69
|
+
export type ApiTokenCreate = {
|
70
|
+
__typename?: 'ApiTokenCreate';
|
71
|
+
apiToken?: Maybe<ApiToken>;
|
72
|
+
error?: Maybe<ApiTokenError>;
|
73
|
+
};
|
74
|
+
|
75
|
+
export type ApiTokenCreateInput = {
|
76
|
+
expiresOn: Scalars['NaiveDate']['input'];
|
77
|
+
name: Scalars['String']['input'];
|
78
|
+
};
|
79
|
+
|
80
|
+
/** An edge in a connection. */
|
81
|
+
export type ApiTokenEdge = {
|
82
|
+
__typename?: 'ApiTokenEdge';
|
83
|
+
/** A cursor for use in pagination */
|
84
|
+
cursor: Scalars['String']['output'];
|
85
|
+
/** The item at the end of the edge */
|
86
|
+
node: ApiToken;
|
87
|
+
};
|
88
|
+
|
89
|
+
export type ApiTokenError = {
|
90
|
+
__typename?: 'ApiTokenError';
|
91
|
+
code: ApiTokenErrorCode;
|
92
|
+
message: Scalars['String']['output'];
|
93
|
+
};
|
94
|
+
|
95
|
+
export enum ApiTokenErrorCode {
|
96
|
+
Unknown = 'UNKNOWN'
|
97
|
+
}
|
98
|
+
|
43
99
|
export type AuthError = {
|
44
100
|
__typename?: 'AuthError';
|
45
101
|
code: AuthErrorCode;
|
@@ -57,10 +113,13 @@ export type Category = {
|
|
57
113
|
__typename?: 'Category';
|
58
114
|
channelCode: Scalars['ChannelCode']['output'];
|
59
115
|
createdAt: Scalars['DateTime']['output'];
|
116
|
+
description: Scalars['JsonString']['output'];
|
60
117
|
id: Scalars['UUID']['output'];
|
61
118
|
isActive: Scalars['Boolean']['output'];
|
62
119
|
name: Scalars['String']['output'];
|
63
120
|
path: Array<Scalars['CategoryLabel']['output']>;
|
121
|
+
/** String representation of the category path. */
|
122
|
+
pathString: Scalars['String']['output'];
|
64
123
|
position: Scalars['Int']['output'];
|
65
124
|
updatedAt: Scalars['DateTime']['output'];
|
66
125
|
};
|
@@ -84,6 +143,7 @@ export type CategoryCreate = {
|
|
84
143
|
};
|
85
144
|
|
86
145
|
export type CategoryCreateInput = {
|
146
|
+
description?: InputMaybe<Scalars['JsonString']['input']>;
|
87
147
|
isActive: Scalars['Boolean']['input'];
|
88
148
|
name: Scalars['String']['input'];
|
89
149
|
path: Array<Scalars['CategoryLabel']['input']>;
|
@@ -114,6 +174,46 @@ export enum CategoryErrorCode {
|
|
114
174
|
DatabaseError = 'DATABASE_ERROR'
|
115
175
|
}
|
116
176
|
|
177
|
+
/** Platform Channel */
|
178
|
+
export type Channel = {
|
179
|
+
__typename?: 'Channel';
|
180
|
+
channelCode: Scalars['ChannelCode']['output'];
|
181
|
+
country: Country;
|
182
|
+
createdAt: Scalars['DateTime']['output'];
|
183
|
+
currencies: Array<ChannelCurrency>;
|
184
|
+
name: Scalars['String']['output'];
|
185
|
+
updatedAt: Scalars['DateTime']['output'];
|
186
|
+
};
|
187
|
+
|
188
|
+
export type ChannelConnection = {
|
189
|
+
__typename?: 'ChannelConnection';
|
190
|
+
/** A list of edges. */
|
191
|
+
edges: Array<ChannelEdge>;
|
192
|
+
/** A list of nodes. */
|
193
|
+
nodes: Array<Channel>;
|
194
|
+
/** Information to aid in pagination. */
|
195
|
+
pageInfo: PageInfo;
|
196
|
+
totalCount: Scalars['Int']['output'];
|
197
|
+
totalPages: Scalars['Int']['output'];
|
198
|
+
};
|
199
|
+
|
200
|
+
/** Platform Channel */
|
201
|
+
export type ChannelCurrency = {
|
202
|
+
__typename?: 'ChannelCurrency';
|
203
|
+
channelCode: Scalars['ChannelCode']['output'];
|
204
|
+
currencyCode: Iso4217;
|
205
|
+
isDefault: Scalars['Boolean']['output'];
|
206
|
+
};
|
207
|
+
|
208
|
+
/** An edge in a connection. */
|
209
|
+
export type ChannelEdge = {
|
210
|
+
__typename?: 'ChannelEdge';
|
211
|
+
/** A cursor for use in pagination */
|
212
|
+
cursor: Scalars['String']['output'];
|
213
|
+
/** The item at the end of the edge */
|
214
|
+
node: Channel;
|
215
|
+
};
|
216
|
+
|
117
217
|
/** A user's Channel Role */
|
118
218
|
export type ChannelRole = {
|
119
219
|
__typename?: 'ChannelRole';
|
@@ -132,10 +232,55 @@ export enum CmsErrorCode {
|
|
132
232
|
EntryCollectionMismatch = 'ENTRY_COLLECTION_MISMATCH',
|
133
233
|
EntryValidationError = 'ENTRY_VALIDATION_ERROR',
|
134
234
|
FieldAlreadyExists = 'FIELD_ALREADY_EXISTS',
|
235
|
+
ImageUploadError = 'IMAGE_UPLOAD_ERROR',
|
135
236
|
SerdeError = 'SERDE_ERROR',
|
136
237
|
Unknown = 'UNKNOWN'
|
137
238
|
}
|
138
239
|
|
240
|
+
/** CMS Image */
|
241
|
+
export type ContentImage = {
|
242
|
+
__typename?: 'ContentImage';
|
243
|
+
channelCode: Scalars['ChannelCode']['output'];
|
244
|
+
createdAt: Scalars['DateTime']['output'];
|
245
|
+
image: Image;
|
246
|
+
imageId: Scalars['UUID']['output'];
|
247
|
+
slug: Scalars['Slug']['output'];
|
248
|
+
updatedAt: Scalars['DateTime']['output'];
|
249
|
+
};
|
250
|
+
|
251
|
+
export type ContentImageConnection = {
|
252
|
+
__typename?: 'ContentImageConnection';
|
253
|
+
/** A list of edges. */
|
254
|
+
edges: Array<ContentImageEdge>;
|
255
|
+
/** A list of nodes. */
|
256
|
+
nodes: Array<ContentImage>;
|
257
|
+
/** Information to aid in pagination. */
|
258
|
+
pageInfo: PageInfo;
|
259
|
+
totalCount: Scalars['Int']['output'];
|
260
|
+
totalPages: Scalars['Int']['output'];
|
261
|
+
};
|
262
|
+
|
263
|
+
/** An edge in a connection. */
|
264
|
+
export type ContentImageEdge = {
|
265
|
+
__typename?: 'ContentImageEdge';
|
266
|
+
/** A cursor for use in pagination */
|
267
|
+
cursor: Scalars['String']['output'];
|
268
|
+
/** The item at the end of the edge */
|
269
|
+
node: ContentImage;
|
270
|
+
};
|
271
|
+
|
272
|
+
export type ContentImageUpload = {
|
273
|
+
__typename?: 'ContentImageUpload';
|
274
|
+
error?: Maybe<CmsError>;
|
275
|
+
image?: Maybe<ContentImage>;
|
276
|
+
};
|
277
|
+
|
278
|
+
export type ContentImageUploadInput = {
|
279
|
+
alt?: InputMaybe<Scalars['String']['input']>;
|
280
|
+
file: Scalars['Upload']['input'];
|
281
|
+
slug: Scalars['Slug']['input'];
|
282
|
+
};
|
283
|
+
|
139
284
|
/** CMS Content-Type */
|
140
285
|
export type ContentType = {
|
141
286
|
__typename?: 'ContentType';
|
@@ -180,6 +325,32 @@ export type ContentTypeEdge = {
|
|
180
325
|
node: ContentType;
|
181
326
|
};
|
182
327
|
|
328
|
+
export type ContentTypeUpdate = {
|
329
|
+
__typename?: 'ContentTypeUpdate';
|
330
|
+
contentType?: Maybe<ContentType>;
|
331
|
+
error?: Maybe<CmsError>;
|
332
|
+
};
|
333
|
+
|
334
|
+
export type ContentTypeUpdateInput = {
|
335
|
+
schema: Scalars['JsonSchema']['input'];
|
336
|
+
};
|
337
|
+
|
338
|
+
export enum Country {
|
339
|
+
Arg = 'ARG',
|
340
|
+
Bol = 'BOL',
|
341
|
+
Bra = 'BRA',
|
342
|
+
Chl = 'CHL',
|
343
|
+
Col = 'COL',
|
344
|
+
Ecu = 'ECU',
|
345
|
+
Guy = 'GUY',
|
346
|
+
Per = 'PER',
|
347
|
+
Pry = 'PRY',
|
348
|
+
Sur = 'SUR',
|
349
|
+
Ury = 'URY',
|
350
|
+
Usa = 'USA',
|
351
|
+
Ven = 'VEN'
|
352
|
+
}
|
353
|
+
|
183
354
|
/** Platform Customer belonging to a Channel. */
|
184
355
|
export type Customer = {
|
185
356
|
__typename?: 'Customer';
|
@@ -260,6 +431,7 @@ export type EntryCollection = {
|
|
260
431
|
contentTypeSlug: Scalars['Slug']['output'];
|
261
432
|
createdAt: Scalars['DateTime']['output'];
|
262
433
|
description?: Maybe<Scalars['String']['output']>;
|
434
|
+
entries: Array<Entry>;
|
263
435
|
name: Scalars['String']['output'];
|
264
436
|
slug: Scalars['Slug']['output'];
|
265
437
|
updatedAt: Scalars['DateTime']['output'];
|
@@ -334,6 +506,7 @@ export type EntryEdge = {
|
|
334
506
|
/** Platform Image */
|
335
507
|
export type Image = {
|
336
508
|
__typename?: 'Image';
|
509
|
+
alt?: Maybe<Scalars['String']['output']>;
|
337
510
|
channelCode: Scalars['ChannelCode']['output'];
|
338
511
|
createdAt: Scalars['DateTime']['output'];
|
339
512
|
height: Scalars['Int']['output'];
|
@@ -417,12 +590,17 @@ export enum MimeType {
|
|
417
590
|
|
418
591
|
export type Mutation = {
|
419
592
|
__typename?: 'Mutation';
|
593
|
+
apiTokenCreate: ApiTokenCreate;
|
420
594
|
/** Creates a Category */
|
421
595
|
categoryCreate: CategoryCreate;
|
422
596
|
/** Deletes a Category */
|
423
597
|
categoryDelete: CategoryDelete;
|
598
|
+
/** Uploads an image to a CMS Resource */
|
599
|
+
contentImageUpload: ContentImageUpload;
|
424
600
|
/** Creates a CMS Content-Type */
|
425
601
|
contentTypeCreate: ContentTypeCreate;
|
602
|
+
/** Updates a CMS Content-Type */
|
603
|
+
contentTypeUpdate: ContentTypeUpdate;
|
426
604
|
/** Creates a Customer */
|
427
605
|
customerCreate: CustomerCreate;
|
428
606
|
/** Creates a CMS Entry Collection */
|
@@ -460,6 +638,12 @@ export type Mutation = {
|
|
460
638
|
};
|
461
639
|
|
462
640
|
|
641
|
+
export type MutationApiTokenCreateArgs = {
|
642
|
+
channelCode: Scalars['ChannelCode']['input'];
|
643
|
+
input: ApiTokenCreateInput;
|
644
|
+
};
|
645
|
+
|
646
|
+
|
463
647
|
export type MutationCategoryCreateArgs = {
|
464
648
|
channel: Scalars['ChannelCode']['input'];
|
465
649
|
input: CategoryCreateInput;
|
@@ -472,12 +656,25 @@ export type MutationCategoryDeleteArgs = {
|
|
472
656
|
};
|
473
657
|
|
474
658
|
|
659
|
+
export type MutationContentImageUploadArgs = {
|
660
|
+
channel: Scalars['ChannelCode']['input'];
|
661
|
+
input: ContentImageUploadInput;
|
662
|
+
};
|
663
|
+
|
664
|
+
|
475
665
|
export type MutationContentTypeCreateArgs = {
|
476
666
|
channel: Scalars['ChannelCode']['input'];
|
477
667
|
input: ContentTypeCreateInput;
|
478
668
|
};
|
479
669
|
|
480
670
|
|
671
|
+
export type MutationContentTypeUpdateArgs = {
|
672
|
+
channel: Scalars['ChannelCode']['input'];
|
673
|
+
input: ContentTypeUpdateInput;
|
674
|
+
slug: Scalars['Slug']['input'];
|
675
|
+
};
|
676
|
+
|
677
|
+
|
481
678
|
export type MutationCustomerCreateArgs = {
|
482
679
|
channel: Scalars['ChannelCode']['input'];
|
483
680
|
input: CustomerCreateInput;
|
@@ -768,6 +965,7 @@ export type ProductCreate = {
|
|
768
965
|
|
769
966
|
export type ProductCreateInput = {
|
770
967
|
name: Scalars['String']['input'];
|
968
|
+
requiresShipping?: InputMaybe<Scalars['Boolean']['input']>;
|
771
969
|
};
|
772
970
|
|
773
971
|
/** An edge in a connection. */
|
@@ -805,8 +1003,14 @@ export type ProductUpdateInput = {
|
|
805
1003
|
|
806
1004
|
export type Query = {
|
807
1005
|
__typename?: 'Query';
|
1006
|
+
/** Retrieves API Tokens */
|
1007
|
+
apiTokens: ApiTokenConnection;
|
808
1008
|
/** Retrieves Categories */
|
809
1009
|
categories: CategoryConnection;
|
1010
|
+
/** Retrieves Channels for current user */
|
1011
|
+
channels: ChannelConnection;
|
1012
|
+
/** Retrieves CMS Content Images */
|
1013
|
+
contentImages: ContentImageConnection;
|
810
1014
|
/** Retrieves CMS Content Types */
|
811
1015
|
contentTypes: ContentTypeConnection;
|
812
1016
|
/** Retrieves Customers */
|
@@ -825,6 +1029,15 @@ export type Query = {
|
|
825
1029
|
};
|
826
1030
|
|
827
1031
|
|
1032
|
+
export type QueryApiTokensArgs = {
|
1033
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
1034
|
+
before?: InputMaybe<Scalars['String']['input']>;
|
1035
|
+
channelCode: Scalars['ChannelCode']['input'];
|
1036
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
1037
|
+
last?: InputMaybe<Scalars['Int']['input']>;
|
1038
|
+
};
|
1039
|
+
|
1040
|
+
|
828
1041
|
export type QueryCategoriesArgs = {
|
829
1042
|
after?: InputMaybe<Scalars['String']['input']>;
|
830
1043
|
before?: InputMaybe<Scalars['String']['input']>;
|
@@ -834,6 +1047,23 @@ export type QueryCategoriesArgs = {
|
|
834
1047
|
};
|
835
1048
|
|
836
1049
|
|
1050
|
+
export type QueryChannelsArgs = {
|
1051
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
1052
|
+
before?: InputMaybe<Scalars['String']['input']>;
|
1053
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
1054
|
+
last?: InputMaybe<Scalars['Int']['input']>;
|
1055
|
+
};
|
1056
|
+
|
1057
|
+
|
1058
|
+
export type QueryContentImagesArgs = {
|
1059
|
+
after?: InputMaybe<Scalars['String']['input']>;
|
1060
|
+
before?: InputMaybe<Scalars['String']['input']>;
|
1061
|
+
channelCode: Scalars['ChannelCode']['input'];
|
1062
|
+
first?: InputMaybe<Scalars['Int']['input']>;
|
1063
|
+
last?: InputMaybe<Scalars['Int']['input']>;
|
1064
|
+
};
|
1065
|
+
|
1066
|
+
|
837
1067
|
export type QueryContentTypesArgs = {
|
838
1068
|
after?: InputMaybe<Scalars['String']['input']>;
|
839
1069
|
before?: InputMaybe<Scalars['String']['input']>;
|
@@ -906,9 +1136,15 @@ export enum Role {
|
|
906
1136
|
Staff = 'STAFF'
|
907
1137
|
}
|
908
1138
|
|
1139
|
+
export enum Scope {
|
1140
|
+
Global = 'GLOBAL'
|
1141
|
+
}
|
1142
|
+
|
909
1143
|
export enum UseCase {
|
910
1144
|
/** Profile Picture for a user instance */
|
911
1145
|
Avatar = 'AVATAR',
|
1146
|
+
/** Image associated to a CMS resource */
|
1147
|
+
Cms = 'CMS',
|
912
1148
|
/** Logo associated to a brand */
|
913
1149
|
Logo = 'LOGO',
|
914
1150
|
/** Image associated to a product variant */
|
@@ -998,9 +1234,9 @@ export type ProductsListQueryVariables = Exact<{
|
|
998
1234
|
}>;
|
999
1235
|
|
1000
1236
|
|
1001
|
-
export type ProductsListQuery = { __typename?: 'Query', products: { __typename?: 'ProductConnection', edges: Array<{ __typename?: 'ProductEdge', node: { __typename?: 'Product', channelCode: any, id: any, name: string, slug: any, description: any, metadata?: any | null, defaultVariantId: any, position: number, defaultVariant: { __typename?: 'Variant', id: any, channelCode: any, sku?: string | null, productId: any, requiresShipping: boolean, images: Array<{ __typename?: 'Image', id: any, channelCode: any, height: number, width: number, url: string, thumbnailUrl?: string | null, size: number, mimeType: MimeType, useCase: UseCase, createdAt: any, updatedAt: any }>, prices: Array<{ __typename?: 'Price', variantId: any, channelCode: any, currency: Iso4217, price: any }> }, categories: Array<{ __typename?: 'Category', id: any, name: string, path: Array<any>, position: number, isActive: boolean, createdAt: any, updatedAt: any }> } }> } };
|
1237
|
+
export type ProductsListQuery = { __typename?: 'Query', products: { __typename?: 'ProductConnection', edges: Array<{ __typename?: 'ProductEdge', node: { __typename?: 'Product', channelCode: any, id: any, name: string, slug: any, description: any, metadata?: any | null, defaultVariantId: any, position: number, defaultVariant: { __typename?: 'Variant', id: any, channelCode: any, sku?: string | null, productId: any, requiresShipping: boolean, images: Array<{ __typename?: 'Image', id: any, channelCode: any, height: number, width: number, url: string, thumbnailUrl?: string | null, size: number, mimeType: MimeType, useCase: UseCase, createdAt: any, updatedAt: any }>, prices: Array<{ __typename?: 'Price', variantId: any, channelCode: any, currency: Iso4217, price: any }> }, categories: Array<{ __typename?: 'Category', id: any, name: string, path: Array<any>, position: number, pathString: string, isActive: boolean, createdAt: any, updatedAt: any }> } }> } };
|
1002
1238
|
|
1003
|
-
export type ProductsListFieldsFragment = { __typename?: 'Product', channelCode: any, id: any, name: string, slug: any, description: any, metadata?: any | null, defaultVariantId: any, position: number, defaultVariant: { __typename?: 'Variant', id: any, channelCode: any, sku?: string | null, productId: any, requiresShipping: boolean, images: Array<{ __typename?: 'Image', id: any, channelCode: any, height: number, width: number, url: string, thumbnailUrl?: string | null, size: number, mimeType: MimeType, useCase: UseCase, createdAt: any, updatedAt: any }>, prices: Array<{ __typename?: 'Price', variantId: any, channelCode: any, currency: Iso4217, price: any }> }, categories: Array<{ __typename?: 'Category', id: any, name: string, path: Array<any>, position: number, isActive: boolean, createdAt: any, updatedAt: any }> };
|
1239
|
+
export type ProductsListFieldsFragment = { __typename?: 'Product', channelCode: any, id: any, name: string, slug: any, description: any, metadata?: any | null, defaultVariantId: any, position: number, defaultVariant: { __typename?: 'Variant', id: any, channelCode: any, sku?: string | null, productId: any, requiresShipping: boolean, images: Array<{ __typename?: 'Image', id: any, channelCode: any, height: number, width: number, url: string, thumbnailUrl?: string | null, size: number, mimeType: MimeType, useCase: UseCase, createdAt: any, updatedAt: any }>, prices: Array<{ __typename?: 'Price', variantId: any, channelCode: any, currency: Iso4217, price: any }> }, categories: Array<{ __typename?: 'Category', id: any, name: string, path: Array<any>, position: number, pathString: string, isActive: boolean, createdAt: any, updatedAt: any }> };
|
1004
1240
|
|
1005
1241
|
export const ProductsListFieldsFragmentDoc = gql`
|
1006
1242
|
fragment ProductsListFields on Product {
|
@@ -1043,6 +1279,7 @@ export const ProductsListFieldsFragmentDoc = gql`
|
|
1043
1279
|
name
|
1044
1280
|
path
|
1045
1281
|
position
|
1282
|
+
pathString
|
1046
1283
|
isActive
|
1047
1284
|
createdAt
|
1048
1285
|
updatedAt
|