@wix/metro 1.0.64

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +24 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +24 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/src/metroinspector-v1-product.http.d.ts +10 -0
  8. package/build/cjs/src/metroinspector-v1-product.http.js +308 -0
  9. package/build/cjs/src/metroinspector-v1-product.http.js.map +1 -0
  10. package/build/cjs/src/metroinspector-v1-product.public.d.ts +13 -0
  11. package/build/cjs/src/metroinspector-v1-product.public.js +45 -0
  12. package/build/cjs/src/metroinspector-v1-product.public.js.map +1 -0
  13. package/build/cjs/src/metroinspector-v1-product.types.d.ts +286 -0
  14. package/build/cjs/src/metroinspector-v1-product.types.js +25 -0
  15. package/build/cjs/src/metroinspector-v1-product.types.js.map +1 -0
  16. package/build/cjs/src/metroinspector-v1-product.universal.d.ts +348 -0
  17. package/build/cjs/src/metroinspector-v1-product.universal.js +446 -0
  18. package/build/cjs/src/metroinspector-v1-product.universal.js.map +1 -0
  19. package/build/es/index.d.ts +1 -0
  20. package/build/es/index.js +2 -0
  21. package/build/es/index.js.map +1 -0
  22. package/build/es/index.typings.d.ts +1 -0
  23. package/build/es/index.typings.js +2 -0
  24. package/build/es/index.typings.js.map +1 -0
  25. package/build/es/src/metroinspector-v1-product.http.d.ts +10 -0
  26. package/build/es/src/metroinspector-v1-product.http.js +299 -0
  27. package/build/es/src/metroinspector-v1-product.http.js.map +1 -0
  28. package/build/es/src/metroinspector-v1-product.public.d.ts +13 -0
  29. package/build/es/src/metroinspector-v1-product.public.js +34 -0
  30. package/build/es/src/metroinspector-v1-product.public.js.map +1 -0
  31. package/build/es/src/metroinspector-v1-product.types.d.ts +286 -0
  32. package/build/es/src/metroinspector-v1-product.types.js +22 -0
  33. package/build/es/src/metroinspector-v1-product.types.js.map +1 -0
  34. package/build/es/src/metroinspector-v1-product.universal.d.ts +348 -0
  35. package/build/es/src/metroinspector-v1-product.universal.js +418 -0
  36. package/build/es/src/metroinspector-v1-product.universal.js.map +1 -0
  37. package/package.json +37 -0
@@ -0,0 +1,348 @@
1
+ export declare const __debug: {
2
+ verboseLogging: {
3
+ on: () => boolean;
4
+ off: () => boolean;
5
+ };
6
+ };
7
+ /** Physical address */
8
+ export interface Address extends AddressStreetOneOf {
9
+ /** Street name and number. */
10
+ streetAddress?: StreetAddress;
11
+ /** Main address line, usually street and number as free text. */
12
+ addressLine1?: string | null;
13
+ /** Country code. */
14
+ country?: string | null;
15
+ /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
16
+ subdivision?: string | null;
17
+ /** City name. */
18
+ city?: string | null;
19
+ /** Zip/postal code. */
20
+ postalCode?: string | null;
21
+ /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
22
+ addressLine2?: string | null;
23
+ }
24
+ /** @oneof */
25
+ export interface AddressStreetOneOf {
26
+ /** Street name and number. */
27
+ streetAddress?: StreetAddress;
28
+ /** Main address line, usually street and number as free text. */
29
+ addressLine?: string | null;
30
+ }
31
+ export interface StreetAddress {
32
+ /** Street number. */
33
+ number?: string;
34
+ /** Street name. */
35
+ name?: string;
36
+ }
37
+ export interface AddressLocation {
38
+ /** Address latitude. */
39
+ latitude?: number | null;
40
+ /** Address longitude. */
41
+ longitude?: number | null;
42
+ }
43
+ export interface Subdivision {
44
+ /** Short subdivision code. */
45
+ code?: string;
46
+ /** Subdivision full name. */
47
+ name?: string;
48
+ }
49
+ export declare enum SubdivisionType {
50
+ UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE",
51
+ /** State */
52
+ ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1",
53
+ /** County */
54
+ ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2",
55
+ /** City/town */
56
+ ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3",
57
+ /** Neighborhood/quarter */
58
+ ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4",
59
+ /** Street/block */
60
+ ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5",
61
+ /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */
62
+ COUNTRY = "COUNTRY"
63
+ }
64
+ export interface VideoResolution {
65
+ /** Video URL. */
66
+ url?: string;
67
+ /** Video height. */
68
+ height?: number;
69
+ /** Video width. */
70
+ width?: number;
71
+ /** Video format for example, mp4, hls. */
72
+ format?: string;
73
+ }
74
+ export interface PageLink {
75
+ /** The page id we want from the site */
76
+ pageId?: string;
77
+ /** Where this link should open, supports _self and _blank or any name the user chooses. _self means same page, _blank means new page. */
78
+ target?: string | null;
79
+ }
80
+ export interface Variant {
81
+ name?: string;
82
+ value?: string;
83
+ image?: string;
84
+ }
85
+ export interface MyAddress {
86
+ country?: string | null;
87
+ subdivision?: string | null;
88
+ city?: string | null;
89
+ postalCode?: string | null;
90
+ streetAddress?: StreetAddress;
91
+ }
92
+ export interface CreateProductRequest {
93
+ product?: Product;
94
+ }
95
+ export interface CreateProductResponse {
96
+ product?: Product;
97
+ }
98
+ export interface DeleteProductRequest {
99
+ productId: string;
100
+ }
101
+ export interface DeleteProductResponse {
102
+ }
103
+ export interface UpdateProductRequest {
104
+ productId: string;
105
+ product?: Product;
106
+ /** Explicit list of fields to update. */
107
+ mask?: string[];
108
+ }
109
+ export interface UpdateProductResponse {
110
+ product?: Product;
111
+ }
112
+ export interface GetProductRequest {
113
+ productId: string;
114
+ }
115
+ export interface GetProductResponse {
116
+ product?: Product;
117
+ }
118
+ export interface GetProductsStartWithRequest {
119
+ title: string;
120
+ addressLine2?: string | null;
121
+ }
122
+ export interface GetProductsStartWithResponse {
123
+ products?: Product[];
124
+ }
125
+ export interface QueryProductsRequest {
126
+ query?: QueryV2;
127
+ /** Whether variants should be included in the response. */
128
+ includeVariants?: boolean;
129
+ /** Whether hidden products should be included in the response. Requires permissions to manage products. */
130
+ includeHiddenProducts?: boolean;
131
+ /** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
132
+ includeMerchantSpecificData?: boolean;
133
+ }
134
+ export interface QueryV2 extends QueryV2PagingMethodOneOf {
135
+ /** Paging options to limit and skip the number of items. */
136
+ paging?: Paging;
137
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
138
+ cursorPaging?: CursorPaging;
139
+ /**
140
+ * Filter object in the following format:
141
+ * `"filter" : {
142
+ * "fieldName1": "value1",
143
+ * "fieldName2":{"$operator":"value2"}
144
+ * }`
145
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
146
+ */
147
+ filter?: Record<string, any> | null;
148
+ /**
149
+ * Sort object in the following format:
150
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
151
+ */
152
+ sort?: Sorting[];
153
+ /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
154
+ fields?: string[];
155
+ /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
156
+ fieldsets?: string[];
157
+ }
158
+ /** @oneof */
159
+ export interface QueryV2PagingMethodOneOf {
160
+ /** Paging options to limit and skip the number of items. */
161
+ paging?: Paging;
162
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
163
+ cursorPaging?: CursorPaging;
164
+ }
165
+ export interface Sorting {
166
+ /** Name of the field to sort by. */
167
+ fieldName?: string;
168
+ /** Sort order. */
169
+ order?: SortOrder;
170
+ }
171
+ export declare enum SortOrder {
172
+ ASC = "ASC",
173
+ DESC = "DESC"
174
+ }
175
+ export interface Paging {
176
+ /** Number of items to load. */
177
+ limit?: number | null;
178
+ /** Number of items to skip in the current sort order. */
179
+ offset?: number | null;
180
+ }
181
+ export interface CursorPaging {
182
+ /** Number of items to load. */
183
+ limit?: number | null;
184
+ /**
185
+ * Pointer to the next or previous page in the list of results.
186
+ *
187
+ * You can get the relevant cursor token
188
+ * from the `pagingMetadata` object in the previous call's response.
189
+ * Not relevant for the first request.
190
+ */
191
+ cursor?: string | null;
192
+ }
193
+ export interface QueryProductsResponse {
194
+ products?: Product[];
195
+ metadata?: PagingMetadataV2;
196
+ }
197
+ export interface PagingMetadataV2 {
198
+ /** Number of items returned in the response. */
199
+ count?: number | null;
200
+ /** Offset that was requested. */
201
+ offset?: number | null;
202
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
203
+ total?: number | null;
204
+ /** Flag that indicates the server failed to calculate the `total` field. */
205
+ tooManyToCount?: boolean | null;
206
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
207
+ cursors?: Cursors;
208
+ }
209
+ export interface Cursors {
210
+ /** Cursor pointing to next page in the list of results. */
211
+ next?: string | null;
212
+ /** Cursor pointing to previous page in the list of results. */
213
+ prev?: string | null;
214
+ }
215
+ export declare type Product = {
216
+ _id: string;
217
+ name: string | null;
218
+ collectionId: string;
219
+ _createdDate: Date;
220
+ modifiedDate: Date;
221
+ image: string;
222
+ address: Address;
223
+ document: string;
224
+ video: string;
225
+ pageLink: PageLink;
226
+ audio: string;
227
+ color: string | null;
228
+ localDate: string | null;
229
+ localTime: string | null;
230
+ localDateTime: string | null;
231
+ variants: Variant[];
232
+ mainVariant: Variant;
233
+ customAddress: MyAddress;
234
+ guid: string;
235
+ };
236
+ /**
237
+ * Creating a product
238
+ * @public
239
+ * @documentationMaturity preview
240
+ * @requiredField options.product.title
241
+ */
242
+ export declare function createProduct(options?: CreateProductOptions): Promise<Product>;
243
+ export interface CreateProductOptions {
244
+ product?: Product;
245
+ }
246
+ /** @public
247
+ * @documentationMaturity preview
248
+ * @requiredField productId
249
+ */
250
+ export declare function deleteProduct(productId: string): Promise<void>;
251
+ /** @public
252
+ * @documentationMaturity preview
253
+ * @requiredField options.product._id
254
+ * @requiredField productId
255
+ */
256
+ export declare function updateProduct(productId: string, options?: UpdateProductOptions): Promise<Product>;
257
+ export interface UpdateProductOptions {
258
+ product?: Product;
259
+ /** Explicit list of fields to update. */
260
+ mask?: string[];
261
+ }
262
+ /**
263
+ * override description
264
+ * @public
265
+ * @documentationMaturity preview
266
+ * @requiredField productId
267
+ * @param arg1 - ## new override param 1
268
+ * @returns ## override return
269
+ */
270
+ export declare function getProduct(productId: string): Promise<Product>;
271
+ /** @public
272
+ * @documentationMaturity preview
273
+ * @requiredField title
274
+ */
275
+ export declare function getProductsStartWith(title: string, options?: GetProductsStartWithOptions): Promise<GetProductsStartWithResponse>;
276
+ export interface GetProductsStartWithOptions {
277
+ addressLine2?: string | null;
278
+ }
279
+ /** @public
280
+ * @documentationMaturity preview
281
+ */
282
+ export declare function queryProducts(options?: QueryProductsOptions): ProductsQueryBuilder;
283
+ export interface QueryProductsOptions {
284
+ /** Whether variants should be included in the response. */
285
+ includeVariants?: boolean | undefined;
286
+ /** Whether hidden products should be included in the response. Requires permissions to manage products. */
287
+ includeHiddenProducts?: boolean | undefined;
288
+ /** Whether merchant specific data should be included in the response. Requires permissions to manage products. */
289
+ includeMerchantSpecificData?: boolean | undefined;
290
+ }
291
+ interface QueryCursorResult {
292
+ cursors: Cursors;
293
+ hasNext: () => boolean;
294
+ hasPrev: () => boolean;
295
+ length: number;
296
+ pageSize: number;
297
+ }
298
+ export interface ProductsQueryResult extends QueryCursorResult {
299
+ items: Product[];
300
+ query: ProductsQueryBuilder;
301
+ next: () => Promise<ProductsQueryResult>;
302
+ prev: () => Promise<ProductsQueryResult>;
303
+ }
304
+ export interface ProductsQueryBuilder {
305
+ /** @param propertyName - Property whose value is compared with `value`.
306
+ * @param value - Value to compare against.
307
+ * @documentationMaturity preview
308
+ */
309
+ eq: (propertyName: 'title' | 'collectionId' | 'guid', value: any) => ProductsQueryBuilder;
310
+ /** @param propertyName - Property whose value is compared with `value`.
311
+ * @param value - Value to compare against.
312
+ * @documentationMaturity preview
313
+ */
314
+ ne: (propertyName: 'title' | 'guid', value: any) => ProductsQueryBuilder;
315
+ /** @param propertyName - Property whose value is compared with `string`.
316
+ * @param string - String to compare against. Case-insensitive.
317
+ * @documentationMaturity preview
318
+ */
319
+ startsWith: (propertyName: 'title' | 'guid', value: string) => ProductsQueryBuilder;
320
+ /** @param propertyName - Property whose value is compared with `values`.
321
+ * @param values - List of values to compare against.
322
+ * @documentationMaturity preview
323
+ */
324
+ hasSome: (propertyName: 'title' | 'guid', value: any[]) => ProductsQueryBuilder;
325
+ /** @documentationMaturity preview */
326
+ in: (propertyName: 'title' | 'guid', value: any) => ProductsQueryBuilder;
327
+ /** @documentationMaturity preview */
328
+ exists: (propertyName: 'title' | 'guid', value: boolean) => ProductsQueryBuilder;
329
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
330
+ * @documentationMaturity preview
331
+ */
332
+ ascending: (...propertyNames: Array<'title' | 'collectionId' | 'guid'>) => ProductsQueryBuilder;
333
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
334
+ * @documentationMaturity preview
335
+ */
336
+ descending: (...propertyNames: Array<'title' | 'collectionId' | 'guid'>) => ProductsQueryBuilder;
337
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
338
+ * @documentationMaturity preview
339
+ */
340
+ limit: (limit: number) => ProductsQueryBuilder;
341
+ /** @param cursor - A pointer to specific record
342
+ * @documentationMaturity preview
343
+ */
344
+ skipTo: (cursor: string) => ProductsQueryBuilder;
345
+ /** @documentationMaturity preview */
346
+ find: () => Promise<ProductsQueryResult>;
347
+ }
348
+ export {};