@wix/ditto-codegen-public 1.0.161 → 1.0.163

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 (66) hide show
  1. package/dist/docs-output/api-docs/bookings-bookings-onBookingCanceled-doc.txt +169 -0
  2. package/dist/docs-output/api-docs/bookings-bookings-onBookingCreated-doc.txt +154 -0
  3. package/dist/docs-output/api-docs/crm-contacts-onContactCreated-doc.txt +87 -171
  4. package/dist/docs-output/api-docs/crm-contacts-onContactDeleted-doc.txt +58 -0
  5. package/dist/docs-output/api-docs/crm-contacts-onContactUpdated-doc.txt +99 -0
  6. package/dist/docs-output/api-docs/data-items-get-doc.txt +95 -54
  7. package/dist/docs-output/api-docs/data-items-insert-doc.txt +235 -43
  8. package/dist/docs-output/api-docs/data-items-onDataItemCreated-doc.txt +61 -0
  9. package/dist/docs-output/api-docs/data-items-onDataItemDeleted-doc.txt +58 -0
  10. package/dist/docs-output/api-docs/data-items-onDataItemUpdated-doc.txt +61 -0
  11. package/dist/docs-output/api-docs/data-items-query-doc.txt +507 -302
  12. package/dist/docs-output/api-docs/data-items-remove-doc.txt +120 -40
  13. package/dist/docs-output/api-docs/data-items-update-doc.txt +425 -46
  14. package/dist/docs-output/api-docs/ecom-cart-addToCart-doc.txt +488 -0
  15. package/dist/docs-output/api-docs/ecom-cart-createCart-doc.txt +518 -0
  16. package/dist/docs-output/api-docs/ecom-cart-createCheckout-doc.txt +155 -0
  17. package/dist/docs-output/api-docs/ecom-cart-deleteCart-doc.txt +92 -0
  18. package/dist/docs-output/api-docs/ecom-cart-getCart-doc.txt +376 -0
  19. package/dist/docs-output/api-docs/ecom-cart-onCartCreated-doc.txt +89 -80
  20. package/dist/docs-output/api-docs/ecom-cart-onCartUpdated-doc.txt +91 -81
  21. package/dist/docs-output/api-docs/ecom-cart-removeLineItemsFromCart-doc.txt +321 -0
  22. package/dist/docs-output/api-docs/ecom-cart-updateCart-doc.txt +539 -0
  23. package/dist/docs-output/api-docs/ecom-checkout-addToCheckout-doc.txt +1005 -0
  24. package/dist/docs-output/api-docs/ecom-checkout-createCheckout-doc.txt +1641 -0
  25. package/dist/docs-output/api-docs/ecom-checkout-getCheckout-doc.txt +1027 -0
  26. package/dist/docs-output/api-docs/ecom-checkout-onCheckoutCompleted-doc.txt +151 -0
  27. package/dist/docs-output/api-docs/ecom-checkout-onCheckoutCreated-doc.txt +150 -0
  28. package/dist/docs-output/api-docs/ecom-checkout-onCheckoutUpdated-doc.txt +150 -0
  29. package/dist/docs-output/api-docs/ecom-checkout-removeLineItemsFromCheckout-doc.txt +879 -0
  30. package/dist/docs-output/api-docs/ecom-checkout-updateCheckout-doc.txt +1011 -0
  31. package/dist/docs-output/api-docs/ecom-currentCart-getCurrentCart-doc.txt +368 -322
  32. package/dist/docs-output/api-docs/ecom-currentCart-updateCurrentCart-doc.txt +506 -321
  33. package/dist/docs-output/api-docs/ecom-orders-bulkUpdateOrders-doc.txt +1040 -0
  34. package/dist/docs-output/api-docs/ecom-orders-cancelOrder-doc.txt +608 -0
  35. package/dist/docs-output/api-docs/ecom-orders-getOrder-doc.txt +926 -0
  36. package/dist/docs-output/api-docs/ecom-orders-onOrderCreated-doc.txt +245 -0
  37. package/dist/docs-output/api-docs/ecom-orders-onOrderUpdated-doc.txt +244 -0
  38. package/dist/docs-output/api-docs/ecom-orders-searchOrders-doc.txt +670 -0
  39. package/dist/docs-output/api-docs/ecom-orders-updateOrder-doc.txt +818 -0
  40. package/dist/docs-output/api-docs/search-wixSiteSearch-search-doc.txt +162 -0
  41. package/dist/docs-output/api-docs/stores-collections-addProductsToCollection-doc.txt +86 -0
  42. package/dist/docs-output/api-docs/stores-collections-createCollection-doc.txt +108 -0
  43. package/dist/docs-output/api-docs/stores-collections-getCollection-doc.txt +102 -0
  44. package/dist/docs-output/api-docs/stores-collections-queryCollections-doc.txt +209 -0
  45. package/dist/docs-output/api-docs/stores-collections-removeProductsFromCollection-doc.txt +86 -0
  46. package/dist/docs-output/api-docs/stores-collections-updateCollection-doc.txt +110 -0
  47. package/dist/docs-output/api-docs/stores-inventory-queryInventory-doc.txt +98 -0
  48. package/dist/docs-output/api-docs/stores-inventory-updateInventoryVariants-doc.txt +249 -0
  49. package/dist/docs-output/api-docs/stores-inventoryItemsV3-queryInventoryItems-doc.txt +236 -0
  50. package/dist/docs-output/api-docs/stores-inventoryItemsV3-updateInventoryItem-doc.txt +139 -0
  51. package/dist/docs-output/api-docs/stores-productsV3-createProduct-doc.txt +1697 -0
  52. package/dist/docs-output/api-docs/stores-productsV3-deleteProduct-doc.txt +73 -0
  53. package/dist/docs-output/api-docs/stores-productsV3-getProduct-doc.txt +933 -0
  54. package/dist/docs-output/api-docs/stores-productsV3-onProductCreated-doc.txt +794 -0
  55. package/dist/docs-output/api-docs/stores-productsV3-onProductDeleted-doc.txt +794 -0
  56. package/dist/docs-output/api-docs/stores-productsV3-onProductUpdated-doc.txt +794 -0
  57. package/dist/docs-output/api-docs/stores-productsV3-queryProducts-doc.txt +1051 -0
  58. package/dist/docs-output/api-docs/stores-productsV3-searchProducts-doc.txt +1144 -0
  59. package/dist/docs-output/api-docs/stores-productsV3-updateProduct-doc.txt +1730 -1600
  60. package/dist/docs-output/api-docs/stores-readOnlyVariantsV3-queryVariants-doc.txt +290 -0
  61. package/dist/docs-output/api-docs/stores-readOnlyVariantsV3-searchVariants-doc.txt +353 -0
  62. package/dist/out.js +929 -79
  63. package/package.json +2 -2
  64. package/dist/docs-output/api-docs/data-items-onDataItemCreated.txt +0 -103
  65. package/dist/docs-output/api-docs/stores-product-onProductCreated-doc.txt +0 -118
  66. package/dist/docs-output/api-docs/stores-productV3-onProductCreated-doc.txt +0 -184
@@ -0,0 +1,162 @@
1
+ <search_wixSiteSearch_search>
2
+ <description>
3
+ # Method name:
4
+
5
+ search.wixSiteSearch.search(search: Search, options: SearchOptions)
6
+
7
+ # Method Link:
8
+
9
+ https://dev.wix.com/docs/sdk/backend-modules/search/wix-site-search/search
10
+
11
+ # Method Description:
12
+
13
+ Retrieves a list of site documents that match the provided search query and optionally performs aggregations on the data queried.
14
+
15
+ The `search()` API supports the document types listed in the [Introduction](https://dev.wix.com/docs/sdk/backend-modules/search/wix-site-search/introduction), each with its own schema. These schemas define the fields available for filtering, sorting, and free-text searching.
16
+
17
+ To learn more about working with the search query, see [API Query Language](https://dev.wix.com/docs/sdk/articles/working-with-the-sdk/api-query-language).
18
+
19
+ # Method Permissions:
20
+
21
+ - SEARCH.SITE_DOCUMENT_READ
22
+
23
+ # Method Permissions Scopes IDs:
24
+
25
+ undefined
26
+
27
+
28
+
29
+ # Method Code Examples:
30
+
31
+ ## search
32
+
33
+ ```javascript
34
+ import { wixSiteSearch } from '@wix/search';
35
+
36
+ async function search(search, options) {
37
+ const response = await wixSiteSearch.search(search, options);
38
+ };
39
+ ```
40
+
41
+ ## search (with elevated permissions)
42
+
43
+ ```javascript
44
+ import { wixSiteSearch } from '@wix/search';
45
+ import { auth } from '@wix/essentials';
46
+
47
+ async function mySearchMethod(search, options) {
48
+ const elevatedSearch = auth.elevate(wixSiteSearch.search);
49
+ const response = await elevatedSearch(search, options);
50
+ }
51
+ ```
52
+
53
+
54
+
55
+ ## default
56
+
57
+ ```javascript
58
+ try {
59
+ const result = await wixSiteSearch.search({
60
+ search: {
61
+ search: {
62
+ expression: "latest events"
63
+ }
64
+ }
65
+ }, "EVENTS");
66
+ return result;
67
+ } catch (error) {
68
+ console.error(error);
69
+ throw error;
70
+ }
71
+ ```
72
+ </description>
73
+ <type_definition>
74
+ ```
75
+ Method: search.wixSiteSearch.search(search, options)
76
+ Description: Retrieves a list of site documents that match the provided search query and optionally performs aggregations on the data queried. The `search()` API supports the document types listed in the [Introduction](https://dev.wix.com/docs/sdk/backend-modules/search/wix-site-search/introduction), each with its own schema. These schemas define the fields available for filtering, sorting, and free-text searching. To learn more about working with the search query, see [API Query Language](https://dev.wix.com/docs/sdk/articles/working-with-the-sdk/api-query-language).
77
+ Method parameters:
78
+ param name: search | type: Search | description: Search query and aggregation information. | required: true
79
+ - name: aggregations | type: Array<Aggregation> | description: A search method for grouping data into various categories (facets) and providing summaries for each category. For example, use aggregations to categorize search results by specific price ranges, brand names, or ratings.
80
+ - name: fieldPath | type: string | description: Field to aggregate by.
81
+ - name: name | type: string | description: Aggregation name displayed in the return.
82
+ - name: type | type: AggregationType | description: Type of aggregation to perform.
83
+ enum:
84
+ NESTED: Multi-level aggregation, where each next aggregation is nested within previous one.
85
+ SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg.
86
+ UNKNOWN_AGGREGATION_TYPE, VALUE: An aggregation where result buckets are dynamically built - one per unique value.
87
+ - ONE-OF:
88
+ - name: nested | type: NestedAggregation | description: Pass if `type` is `NESTED`. A nested aggregation is applied to the results of another aggregation. Rather than aggregating directly on the primary dataset, first group data using one aggregation and then apply another aggregation within each group. This allows for more complex analyses that summarize data at different levels of detail or hierarchy. For example, to get the number of products that are in stock and out of stock for each price listed, first perform a value aggregation on the field containing the price, and a second value aggregation on the field indicating whether a product is in stock. You can nest up to a maximum of 3 aggregations. Each aggregation can be either value-based or scalar, allowing flexibility in how the data is grouped and analyzed.
89
+ - name: nestedAggregations | type: Array<NestedAggregationItem> | description: List of aggregations, where each aggregation is nested within previous one.
90
+ - name: fieldPath | type: string | description: Field to aggregate by.
91
+ - name: name | type: string | description: Aggregation name displayed in the return.
92
+ - name: type | type: NestedAggregationType | description: Type of aggregation to perform.
93
+ enum:
94
+ SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg.
95
+ UNKNOWN_AGGREGATION_TYPE: Unknown aggregation type.
96
+ VALUE: An aggregation where result buckets are dynamically built - one per unique value.
97
+ - ONE-OF:
98
+ - name: scalar | type: ScalarAggregation | description: Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the total, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store.
99
+ - name: type | type: ScalarType | description: Type of scalar aggregation.
100
+ enum:
101
+ MAX: Maximum value.
102
+ MIN: Minimum value.
103
+ UNKNOWN_SCALAR_TYPE: Unknown scalar type.
104
+ - name: value | type: ValueAggregation | description: Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store.
105
+ - name: limit | type: number | description: Maximum number of aggregation results to return. Min: `1` Max: `250` Default: `10`
106
+ - name: scalar | type: ScalarAggregation | description: Pass if `type` is `SCALAR`. A scalar aggregation calculates a single numerical value from a dataset, such as the total, minimum, or maximum value, summarizing the dataset into one key metric. For example, use a scalar aggregation to get the minimum price listed in a store.
107
+ - name: value | type: ValueAggregation | description: Pass if `type` is `VALUE`. A value aggregation calculates metrics such as count for specific fields within a dataset, providing insights into the overall distribution and key statistics of those values. For example, use a value aggregation to get the number of products (count) for each price listed in the store.
108
+ - name: filter | type: Record<string, any> | description: Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"} }` Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
109
+ - name: search | type: SearchDetails | description: Search information.
110
+ - name: expression | type: string | description: Search term or expression.
111
+ - name: fields | type: Array<string> | description: Fields to search in. If the array is empty, all fields are searched.
112
+ - name: fuzzy | type: boolean | description: Whether to allow the search function to automatically correct typos or minor mistakes in the search expression. The search function uses an algorithm to find results that are close to the text provided.
113
+ - name: sort | type: Array<Sorting> | description: Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
114
+ - name: fieldName | type: string | description: Name of the field to sort by.
115
+ - name: order | type: SortOrder | description: Sort order.
116
+ enum: ASC, DESC
117
+ - ONE-OF:
118
+ - name: paging | type: Paging | description: Paging options to limit and skip the number of items.
119
+ - name: limit | type: number | description: Number of items to load.
120
+ - name: offset | type: number | description: Number of items to skip in the current sort order.
121
+ param name: options | type: SearchOptions | description: none
122
+ - name: documentType | type: DocumentType | description: Document type to search in. | required: true
123
+ enum: BLOG_POSTS, BOOKING_SERVICES, EVENTS, FORUM_CONTENT, ONLINE_PROGRAMS, PROGALLERY_ITEM, STORES_PRODUCTS, UNSPECIFIED
124
+ - name: language | type: string | description: Language to search in.
125
+ Return type: PROMISE<SearchResponse>
126
+ - name: aggregationData | type: AggregationData | description: Aggregated data.
127
+ - name: aggregationData.results | type: Array<AggregationResults> | description: List of the aggregated data results.
128
+ - name: aggregationData.results[].fieldPath | type: string | description: Field the data was aggregated by.
129
+ - name: aggregationData.results[].name | type: string | description: Aggregation name defined in the request.
130
+ - name: aggregationData.results[].type | type: AggregationType | description: Type of aggregation that was performed.
131
+ enum:
132
+ NESTED: Multi-level aggregation, where each next aggregation is nested within previous one.
133
+ SCALAR: A single-value metric aggregation - e.g. min, max, sum, avg.
134
+ UNKNOWN_AGGREGATION_TYPE, VALUE: An aggregation where result buckets are dynamically built - one per unique value.
135
+ - ONE-OF:
136
+ - name: aggregationData.results[].nested | type: NestedResults | description: Nested aggregation results.
137
+ - name: aggregationData.results[].nested.results | type: Array<Results> | description: List of nested aggregation results.
138
+ - name: aggregationData.results[].nested.results[].results | type: Record<string, NestedResultValue> | description: Aggregation results.
139
+ - name: aggregationData.results[].scalar | type: AggregationResultsScalarResult | description: Scalar aggregation results.
140
+ - name: aggregationData.results[].scalar.type | type: ScalarType | description: Type of scalar aggregation.
141
+ enum:
142
+ MAX: Maximum value.
143
+ MIN: Minimum value.
144
+ UNKNOWN_SCALAR_TYPE: Unknown scalar type.
145
+ - name: aggregationData.results[].scalar.value | type: number | description: Value of the scalar aggregation. For example, the minimum, maximum, or total value for the specified field.
146
+ - name: aggregationData.results[].values | type: ValueResults | description: Value aggregation results.
147
+ - name: aggregationData.results[].values.results | type: Array<ValueAggregationResult> | description: List of value aggregation results.
148
+ - name: aggregationData.results[].values.results[].count | type: number | description: Number of documents containing the specified value in the specified field.
149
+ - name: aggregationData.results[].values.results[].value | type: string | description: Value contained in the field specified in `fieldPath` for this aggregation in the request.
150
+ - name: siteDocumentItems | type: Array<SiteDocument> | description: Documents matching the search query.
151
+ - name: siteDocumentItems[]._id | type: string | description: Result GUID.
152
+ - name: siteDocumentItems[].data | type: Record<string, any> | description: The document payload.
153
+ - ONE-OF:
154
+ - name: pagingOffsetMetadata | type: PagingMetadata | description: Paging metadata.
155
+ - name: pagingOffsetMetadata.count | type: number | description: Number of items returned in the response.
156
+ - name: pagingOffsetMetadata.offset | type: number | description: Offset that was requested.
157
+ - name: pagingOffsetMetadata.tooManyToCount | type: boolean | description: Whether the server failed to calculate the `total` field.
158
+ - name: pagingOffsetMetadata.total | type: number | description: Total number of items that match the query.
159
+
160
+ ```
161
+ </type_definition>
162
+ </search_wixSiteSearch_search>
@@ -0,0 +1,86 @@
1
+ <stores_collections_addProductsToCollection>
2
+ <description>
3
+ # Method name:
4
+
5
+ stores.products.addProductsToCollection(_id: string, productIds: Array<string>)
6
+
7
+ # Method Link:
8
+
9
+ https://dev.wix.com/docs/sdk/backend-modules/stores/products/add-products-to-collection
10
+
11
+ # Method Description:
12
+
13
+ Adds products to a specified collection.
14
+
15
+ # Method Permissions:
16
+
17
+ - WIX_STORES.MODIFY_PRODUCTS
18
+
19
+ # Method Permissions Scopes IDs:
20
+
21
+ undefined
22
+
23
+
24
+
25
+ # Method Code Examples:
26
+
27
+ ## Add products to a product collection
28
+
29
+ ```javascript
30
+ /**************************************
31
+ * Backend code - products.web.js/ts *
32
+ **************************************/
33
+
34
+ import { Permissions, webMethod } from '@wix/web-methods';
35
+ import { products } from '@wix/stores';
36
+
37
+ export const addProductsToCollection = webMethod(Permissions.Anyone, (_id, productIds) => {
38
+ return products.addProductsToCollection(_id, productIds);
39
+ });
40
+
41
+ /*************
42
+ * Page code *
43
+ *************/
44
+
45
+ import { addProductsToCollection } from 'backend/products.web';
46
+
47
+ // ...
48
+
49
+ const _id = ... // get collection ID
50
+ const productIds = ["id1", "id2", "id3"];
51
+
52
+ addProductsToCollection(_id, productIds)
53
+ .then(() => {
54
+ // products added to the collection
55
+ })
56
+ .catch((error) => {
57
+ // products not added to the collection
58
+ });
59
+ ```
60
+
61
+
62
+
63
+ ## default
64
+
65
+ ```javascript
66
+ try {
67
+ const result = await products.addProductsToCollection("42631916-bdfe-487b-81a6-cbf9210c04f6", ["7bb38a7a-70b7-9cf3-fc80-584205694465", "a668ef33-f5b8-6569-d04c-1d123be68441"]);
68
+ return result;
69
+ } catch (error) {
70
+ console.error(error);
71
+ throw error;
72
+ }
73
+ ```
74
+ </description>
75
+ <type_definition>
76
+ ```
77
+ Method: stores.products.addProductsToCollection(_id, productIds)
78
+ Description: Adds products to a specified collection.
79
+ Method parameters:
80
+ param name: _id | type: string | description: Collection GUID. | required: true
81
+ param name: productIds | type: Array<string> | description: IDs of the products to add to the collection, separated by commas. | required: true
82
+ Return type: PROMISE<void>
83
+
84
+ ```
85
+ </type_definition>
86
+ </stores_collections_addProductsToCollection>
@@ -0,0 +1,108 @@
1
+ <stores_collections_createCollection>
2
+ <description>
3
+ # Method name:
4
+
5
+ stores.products.createCollection(collection: Collection)
6
+
7
+ # Method Link:
8
+
9
+ https://dev.wix.com/docs/sdk/backend-modules/stores/products/create-collection
10
+
11
+ # Method Description:
12
+
13
+ Creates a new collection.
14
+
15
+ # Method Permissions:
16
+
17
+ - WIX_STORES.MODIFY_PRODUCTS
18
+
19
+ # Method Permissions Scopes IDs:
20
+
21
+ undefined
22
+
23
+
24
+
25
+ # Method Code Examples:
26
+
27
+ ## createCollection
28
+
29
+ ```javascript
30
+ import { products } from '@wix/stores';
31
+
32
+ async function createCollection(collection) {
33
+ const response = await products.createCollection(collection);
34
+ };
35
+ ```
36
+
37
+ ## createCollection (with elevated permissions)
38
+
39
+ ```javascript
40
+ import { products } from '@wix/stores';
41
+ import { auth } from '@wix/essentials';
42
+
43
+ async function myCreateCollectionMethod(collection) {
44
+ const elevatedCreateCollection = auth.elevate(products.createCollection);
45
+ const response = await elevatedCreateCollection(collection);
46
+ }
47
+ ```
48
+
49
+
50
+
51
+ ## default
52
+
53
+ ```javascript
54
+ try {
55
+ const collection = { name: "New Cool Collection" };
56
+ const result = await products.createCollection(collection);
57
+ return result;
58
+ } catch (error) {
59
+ console.error(error);
60
+ throw error;
61
+ }
62
+ ```
63
+ </description>
64
+ <type_definition>
65
+ ```
66
+ Method: stores.products.createCollection(collection)
67
+ Description: Creates a new collection.
68
+ Method parameters:
69
+ param name: collection | type: Collection | description: Collection info. | required: true
70
+ - name: description | type: string | description: Collection description.
71
+ - name: name | type: string | description: Collection name. | required: true
72
+ - name: slug | type: string | description: Collection slug.
73
+ - name: visible | type: boolean | description: Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`.
74
+ Return type: PROMISE<CreateCollectionResponse>
75
+ - name: collection | type: Collection | description: Collection.
76
+ - name: collection._id | type: string | description: Collection GUID (generated automatically by the catalog).
77
+ - name: collection.description | type: string | description: Collection description.
78
+ - name: collection.media | type: Media | description: Media items (images, videos etc) associated with this collection. Read only.
79
+ - name: collection.media.items | type: Array<MediaItem> | description: Media (images, videos etc) associated with this product.
80
+ - name: collection.media.items[]._id | type: string | description: Media GUID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`).
81
+ - name: collection.media.items[].mediaType | type: MediaItemType | description: Media item type (image, video, etc.).
82
+ enum:
83
+ audio: Audio media type.
84
+ document: Document media type.
85
+ image: Image media type.
86
+ unspecified_media_item_type, video: Video media type.
87
+ zip: Zip media type.
88
+ - name: collection.media.items[].thumbnail | type: MediaItemUrlAndSize | description: Media item thumbnail details.
89
+ - name: collection.media.items[].thumbnail.altText | type: string | description: Alt text. This text will be shown in case the image is not available.
90
+ - name: collection.media.items[].thumbnail.format | type: string | description: Media format (mp4, png, etc.).
91
+ - name: collection.media.items[].thumbnail.height | type: number | description: Media item height.
92
+ - name: collection.media.items[].thumbnail.url | type: string | description: Media item URL.
93
+ - name: collection.media.items[].thumbnail.width | type: number | description: Media item width.
94
+ - name: collection.media.items[].title | type: string | description: Media item title.
95
+ - ONE-OF:
96
+ - name: collection.media.items[].image | type: MediaItemUrlAndSize | description: Image data (URL, size).
97
+ - name: collection.media.items[].video | type: MediaItemVideo | description: Video data (URL, size).
98
+ - name: collection.media.items[].video.files | type: Array<MediaItemUrlAndSize> | description: Data (URL, size) about each resolution for which this video is available.
99
+ - name: collection.media.items[].video.stillFrameMediaId | type: string | description: GUID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`.
100
+ - name: collection.media.mainMedia | type: MediaItem | description: Primary media (image, video etc) associated with this product.
101
+ - name: collection.name | type: string | description: Collection name. | required: true
102
+ - name: collection.numberOfProducts | type: number | description: Number of products in the collection. Read only.
103
+ - name: collection.slug | type: string | description: Collection slug.
104
+ - name: collection.visible | type: boolean | description: Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`.
105
+
106
+ ```
107
+ </type_definition>
108
+ </stores_collections_createCollection>
@@ -0,0 +1,102 @@
1
+ <stores_collections_getCollection>
2
+ <description>
3
+ # Method name:
4
+
5
+ stores.collections.getCollection(_id: string)
6
+
7
+ # Method Link:
8
+
9
+ https://dev.wix.com/docs/sdk/backend-modules/stores/collections/get-collection
10
+
11
+ # Method Description:
12
+
13
+ Retrieves a collection with the provided ID.
14
+
15
+ # Method Permissions:
16
+
17
+
18
+
19
+ # Method Permissions Scopes IDs:
20
+
21
+ undefined
22
+
23
+
24
+
25
+ # Method Code Examples:
26
+
27
+ ## getCollection
28
+
29
+ ```javascript
30
+ import { collections } from '@wix/stores';
31
+
32
+ async function getCollection(id) {
33
+ const response = await collections.getCollection(id);
34
+ };
35
+ ```
36
+
37
+ ## getCollection (with elevated permissions)
38
+
39
+ ```javascript
40
+ import { collections } from '@wix/stores';
41
+ import { auth } from '@wix/essentials';
42
+
43
+ async function myGetCollectionMethod(id) {
44
+ const elevatedGetCollection = auth.elevate(collections.getCollection);
45
+ const response = await elevatedGetCollection(id);
46
+ }
47
+ ```
48
+
49
+
50
+
51
+ ## default
52
+
53
+ ```javascript
54
+ try {
55
+ const result = await collections.getCollection("00000000-000000-000000-000000000001");
56
+ return result;
57
+ } catch (error) {
58
+ console.error(error);
59
+ throw error;
60
+ }
61
+ ```
62
+ </description>
63
+ <type_definition>
64
+ ```
65
+ Method: stores.collections.getCollection(_id)
66
+ Description: Retrieves a collection with the provided GUID.
67
+ Method parameters:
68
+ param name: _id | type: string | description: Requested collection GUID. | required: true
69
+ Return type: PROMISE<Collection>
70
+ - name: _id | type: string | description: Collection GUID (generated automatically by the catalog).
71
+ - name: description | type: string | description: Collection description.
72
+ - name: media | type: Media | description: Media items (images, videos etc) associated with this collection. Read only.
73
+ - name: media.items | type: Array<MediaItem> | description: Media (images, videos etc) associated with this product.
74
+ - name: media.items[]._id | type: string | description: Media GUID (for example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`).
75
+ - name: media.items[].mediaType | type: MediaItemType | description: Media item type (image, video, etc.).
76
+ enum:
77
+ audio: Audio media type.
78
+ document: Document media type.
79
+ image: Image media type.
80
+ unspecified_media_item_type, video: Video media type.
81
+ zip: Zip media type.
82
+ - name: media.items[].thumbnail | type: MediaItemUrlAndSize | description: Media item thumbnail details.
83
+ - name: media.items[].thumbnail.altText | type: string | description: Alt text. This text will be shown in case the image is not available.
84
+ - name: media.items[].thumbnail.format | type: string | description: Media format (mp4, png, etc.).
85
+ - name: media.items[].thumbnail.height | type: number | description: Media item height.
86
+ - name: media.items[].thumbnail.url | type: string | description: Media item URL.
87
+ - name: media.items[].thumbnail.width | type: number | description: Media item width.
88
+ - name: media.items[].title | type: string | description: Media item title.
89
+ - ONE-OF:
90
+ - name: media.items[].image | type: MediaItemUrlAndSize | description: Image data (URL, size).
91
+ - name: media.items[].video | type: MediaItemVideo | description: Video data (URL, size).
92
+ - name: media.items[].video.files | type: Array<MediaItemUrlAndSize> | description: Data (URL, size) about each resolution for which this video is available.
93
+ - name: media.items[].video.stillFrameMediaId | type: string | description: GUID of an image taken from the video. Used primarily for Wix Search indexing. For example, `"nsplsh_306d666a123a4a74306459~mv2_d_4517_2992_s_4_2.jpg"`.
94
+ - name: media.mainMedia | type: MediaItem | description: Primary media (image, video etc) associated with this product.
95
+ - name: name | type: string | description: Collection name.
96
+ - name: numberOfProducts | type: number | description: Number of products in the collection. Read only.
97
+ - name: slug | type: string | description: Collection slug.
98
+ - name: visible | type: boolean | description: Collection visibility. Only impacts dynamic pages, no impact on static pages. Default: `true`.
99
+
100
+ ```
101
+ </type_definition>
102
+ </stores_collections_getCollection>