@wix/auto_sdk_faq_category 1.0.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/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/faq-category-v2-category-category.context.d.ts +21 -0
- package/build/cjs/src/faq-category-v2-category-category.context.js +26 -0
- package/build/cjs/src/faq-category-v2-category-category.context.js.map +1 -0
- package/build/cjs/src/faq-category-v2-category-category.http.d.ts +24 -0
- package/build/cjs/src/faq-category-v2-category-category.http.js +395 -0
- package/build/cjs/src/faq-category-v2-category-category.http.js.map +1 -0
- package/build/cjs/src/faq-category-v2-category-category.meta.d.ts +27 -0
- package/build/cjs/src/faq-category-v2-category-category.meta.js +161 -0
- package/build/cjs/src/faq-category-v2-category-category.meta.js.map +1 -0
- package/build/cjs/src/faq-category-v2-category-category.public.d.ts +72 -0
- package/build/cjs/src/faq-category-v2-category-category.public.js +98 -0
- package/build/cjs/src/faq-category-v2-category-category.public.js.map +1 -0
- package/build/cjs/src/faq-category-v2-category-category.types.d.ts +302 -0
- package/build/cjs/src/faq-category-v2-category-category.types.js +17 -0
- package/build/cjs/src/faq-category-v2-category-category.types.js.map +1 -0
- package/build/cjs/src/faq-category-v2-category-category.universal.d.ts +587 -0
- package/build/cjs/src/faq-category-v2-category-category.universal.js +332 -0
- package/build/cjs/src/faq-category-v2-category-category.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/faq-category-v2-category-category.context.d.ts +21 -0
- package/build/es/src/faq-category-v2-category-category.context.js +21 -0
- package/build/es/src/faq-category-v2-category-category.context.js.map +1 -0
- package/build/es/src/faq-category-v2-category-category.http.d.ts +24 -0
- package/build/es/src/faq-category-v2-category-category.http.js +385 -0
- package/build/es/src/faq-category-v2-category-category.http.js.map +1 -0
- package/build/es/src/faq-category-v2-category-category.meta.d.ts +27 -0
- package/build/es/src/faq-category-v2-category-category.meta.js +128 -0
- package/build/es/src/faq-category-v2-category-category.meta.js.map +1 -0
- package/build/es/src/faq-category-v2-category-category.public.d.ts +72 -0
- package/build/es/src/faq-category-v2-category-category.public.js +86 -0
- package/build/es/src/faq-category-v2-category-category.public.js.map +1 -0
- package/build/es/src/faq-category-v2-category-category.types.d.ts +302 -0
- package/build/es/src/faq-category-v2-category-category.types.js +14 -0
- package/build/es/src/faq-category-v2-category-category.types.js.map +1 -0
- package/build/es/src/faq-category-v2-category-category.universal.d.ts +587 -0
- package/build/es/src/faq-category-v2-category-category.universal.js +299 -0
- package/build/es/src/faq-category-v2-category-category.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.context.d.ts +21 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.context.js +26 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.context.js.map +1 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.http.d.ts +24 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.http.js +395 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.http.js.map +1 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.meta.d.ts +27 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.meta.js +161 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.meta.js.map +1 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.public.d.ts +72 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.public.js +98 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.public.js.map +1 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.types.d.ts +302 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.types.js +17 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.types.js.map +1 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.universal.d.ts +587 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.universal.js +332 -0
- package/build/internal/cjs/src/faq-category-v2-category-category.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/faq-category-v2-category-category.context.d.ts +21 -0
- package/build/internal/es/src/faq-category-v2-category-category.context.js +21 -0
- package/build/internal/es/src/faq-category-v2-category-category.context.js.map +1 -0
- package/build/internal/es/src/faq-category-v2-category-category.http.d.ts +24 -0
- package/build/internal/es/src/faq-category-v2-category-category.http.js +385 -0
- package/build/internal/es/src/faq-category-v2-category-category.http.js.map +1 -0
- package/build/internal/es/src/faq-category-v2-category-category.meta.d.ts +27 -0
- package/build/internal/es/src/faq-category-v2-category-category.meta.js +128 -0
- package/build/internal/es/src/faq-category-v2-category-category.meta.js.map +1 -0
- package/build/internal/es/src/faq-category-v2-category-category.public.d.ts +72 -0
- package/build/internal/es/src/faq-category-v2-category-category.public.js +86 -0
- package/build/internal/es/src/faq-category-v2-category-category.public.js.map +1 -0
- package/build/internal/es/src/faq-category-v2-category-category.types.d.ts +302 -0
- package/build/internal/es/src/faq-category-v2-category-category.types.js +14 -0
- package/build/internal/es/src/faq-category-v2-category-category.types.js.map +1 -0
- package/build/internal/es/src/faq-category-v2-category-category.universal.d.ts +587 -0
- package/build/internal/es/src/faq-category-v2-category-category.universal.js +299 -0
- package/build/internal/es/src/faq-category-v2-category-category.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Categories are themed groupings of FAQ question entries that a site owner can create to organize their
|
|
3
|
+
* FAQ questions (e.g., Shipping, Returns, etc.).
|
|
4
|
+
*/
|
|
5
|
+
export interface Category {
|
|
6
|
+
/**
|
|
7
|
+
* Category ID.
|
|
8
|
+
* @readonly
|
|
9
|
+
*/
|
|
10
|
+
_id?: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Revision number, which increments by 1 each time the Category is updated.
|
|
13
|
+
* To prevent conflicting changes,
|
|
14
|
+
* the current revision must be passed when updating the Category.
|
|
15
|
+
*
|
|
16
|
+
* Ignored when creating a Category.
|
|
17
|
+
* @readonly
|
|
18
|
+
*/
|
|
19
|
+
revision?: string | null;
|
|
20
|
+
/**
|
|
21
|
+
* Date and time the Category was created.
|
|
22
|
+
* @readonly
|
|
23
|
+
*/
|
|
24
|
+
_createdDate?: Date | null;
|
|
25
|
+
/**
|
|
26
|
+
* Date and time the Category was last updated.
|
|
27
|
+
* @readonly
|
|
28
|
+
*/
|
|
29
|
+
_updatedDate?: Date | null;
|
|
30
|
+
/** Category title. */
|
|
31
|
+
title?: string | null;
|
|
32
|
+
/** Order of category within a site. */
|
|
33
|
+
sortOrder?: number | null;
|
|
34
|
+
/** Data Extensions */
|
|
35
|
+
extendedFields?: ExtendedFields;
|
|
36
|
+
}
|
|
37
|
+
export interface ExtendedFields {
|
|
38
|
+
/**
|
|
39
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
40
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
41
|
+
*
|
|
42
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
43
|
+
*
|
|
44
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
45
|
+
*/
|
|
46
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
47
|
+
}
|
|
48
|
+
export interface CreateCategoryRequest {
|
|
49
|
+
/** Category to be created. */
|
|
50
|
+
category: Category;
|
|
51
|
+
}
|
|
52
|
+
export interface CreateCategoryResponse {
|
|
53
|
+
/** The created Category. */
|
|
54
|
+
category?: Category;
|
|
55
|
+
}
|
|
56
|
+
export interface GetCategoryRequest {
|
|
57
|
+
/** ID of the Category to retrieve. */
|
|
58
|
+
categoryId: string;
|
|
59
|
+
}
|
|
60
|
+
export interface GetCategoryResponse {
|
|
61
|
+
/** The requested Category. */
|
|
62
|
+
category?: Category;
|
|
63
|
+
}
|
|
64
|
+
export interface UpdateCategoryRequest {
|
|
65
|
+
/** Category to be updated, may be partial. */
|
|
66
|
+
category: Category;
|
|
67
|
+
}
|
|
68
|
+
export interface UpdateCategoryResponse {
|
|
69
|
+
/** Updated Category. */
|
|
70
|
+
category?: Category;
|
|
71
|
+
}
|
|
72
|
+
export interface DeleteCategoryRequest {
|
|
73
|
+
/** Id of the Category to delete. */
|
|
74
|
+
categoryId: string;
|
|
75
|
+
}
|
|
76
|
+
export interface DeleteCategoryResponse {
|
|
77
|
+
}
|
|
78
|
+
export interface ListCategoriesRequest {
|
|
79
|
+
/** Request more categories using cursor paging. */
|
|
80
|
+
paging?: CursorPaging;
|
|
81
|
+
}
|
|
82
|
+
export interface CursorPaging {
|
|
83
|
+
/** Maximum number of items to return in the results. */
|
|
84
|
+
limit?: number | null;
|
|
85
|
+
/**
|
|
86
|
+
* Pointer to the next or previous page in the list of results.
|
|
87
|
+
*
|
|
88
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
89
|
+
* Not relevant for the first request.
|
|
90
|
+
*/
|
|
91
|
+
cursor?: string | null;
|
|
92
|
+
}
|
|
93
|
+
export interface ListCategoriesResponse {
|
|
94
|
+
/** List of Categories. */
|
|
95
|
+
categories?: Category[];
|
|
96
|
+
/** Paging metadata */
|
|
97
|
+
pagingMetadata?: PagingMetadataV2;
|
|
98
|
+
}
|
|
99
|
+
export interface PagingMetadataV2 {
|
|
100
|
+
/** Number of items returned in the response. */
|
|
101
|
+
count?: number | null;
|
|
102
|
+
/** Offset that was requested. */
|
|
103
|
+
offset?: number | null;
|
|
104
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
105
|
+
total?: number | null;
|
|
106
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
107
|
+
tooManyToCount?: boolean | null;
|
|
108
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
109
|
+
cursors?: Cursors;
|
|
110
|
+
}
|
|
111
|
+
export interface Cursors {
|
|
112
|
+
/** Cursor string pointing to the next page in the list of results. */
|
|
113
|
+
next?: string | null;
|
|
114
|
+
/** Cursor pointing to the previous page in the list of results. */
|
|
115
|
+
prev?: string | null;
|
|
116
|
+
}
|
|
117
|
+
export interface QueryCategoriesRequest {
|
|
118
|
+
/** WQL expression. */
|
|
119
|
+
query?: CursorQuery;
|
|
120
|
+
}
|
|
121
|
+
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
122
|
+
/**
|
|
123
|
+
* Cursor paging options.
|
|
124
|
+
*
|
|
125
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
126
|
+
*/
|
|
127
|
+
cursorPaging?: CursorPaging;
|
|
128
|
+
/**
|
|
129
|
+
* Filter object.
|
|
130
|
+
*
|
|
131
|
+
* Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
|
|
132
|
+
*/
|
|
133
|
+
filter?: Record<string, any> | null;
|
|
134
|
+
/**
|
|
135
|
+
* Sort object.
|
|
136
|
+
*
|
|
137
|
+
* Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
138
|
+
*/
|
|
139
|
+
sort?: Sorting[];
|
|
140
|
+
}
|
|
141
|
+
/** @oneof */
|
|
142
|
+
export interface CursorQueryPagingMethodOneOf {
|
|
143
|
+
/**
|
|
144
|
+
* Cursor paging options.
|
|
145
|
+
*
|
|
146
|
+
* Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).
|
|
147
|
+
*/
|
|
148
|
+
cursorPaging?: CursorPaging;
|
|
149
|
+
}
|
|
150
|
+
export interface Sorting {
|
|
151
|
+
/** Name of the field to sort by. */
|
|
152
|
+
fieldName?: string;
|
|
153
|
+
/** Sort order. */
|
|
154
|
+
order?: SortOrder;
|
|
155
|
+
}
|
|
156
|
+
export declare enum SortOrder {
|
|
157
|
+
ASC = "ASC",
|
|
158
|
+
DESC = "DESC"
|
|
159
|
+
}
|
|
160
|
+
export interface QueryCategoriesResponse {
|
|
161
|
+
/** List of Categories. */
|
|
162
|
+
categories?: Category[];
|
|
163
|
+
/** Paging metadata */
|
|
164
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
165
|
+
}
|
|
166
|
+
export interface CursorPagingMetadata {
|
|
167
|
+
/** Number of items returned in current page. */
|
|
168
|
+
count?: number | null;
|
|
169
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
170
|
+
cursors?: Cursors;
|
|
171
|
+
/**
|
|
172
|
+
* Whether there are more pages to retrieve following the current page.
|
|
173
|
+
*
|
|
174
|
+
* + `true`: Another page of results can be retrieved.
|
|
175
|
+
* + `false`: This is the last page.
|
|
176
|
+
*/
|
|
177
|
+
hasNext?: boolean | null;
|
|
178
|
+
}
|
|
179
|
+
export interface UpdateExtendedFieldsRequest {
|
|
180
|
+
/** ID of the entity to update. */
|
|
181
|
+
_id: string;
|
|
182
|
+
/** Identifier for the app whose extended fields are being updated. */
|
|
183
|
+
namespace: string;
|
|
184
|
+
/** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
|
|
185
|
+
namespaceData: Record<string, any> | null;
|
|
186
|
+
}
|
|
187
|
+
export interface UpdateExtendedFieldsResponse {
|
|
188
|
+
/** Updated Category. */
|
|
189
|
+
category?: Category;
|
|
190
|
+
}
|
|
191
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
192
|
+
createdEvent?: EntityCreatedEvent;
|
|
193
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
194
|
+
deletedEvent?: EntityDeletedEvent;
|
|
195
|
+
actionEvent?: ActionEvent;
|
|
196
|
+
/**
|
|
197
|
+
* Unique event ID.
|
|
198
|
+
* Allows clients to ignore duplicate webhooks.
|
|
199
|
+
*/
|
|
200
|
+
_id?: string;
|
|
201
|
+
/**
|
|
202
|
+
* Assumes actions are also always typed to an entity_type
|
|
203
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
204
|
+
*/
|
|
205
|
+
entityFqdn?: string;
|
|
206
|
+
/**
|
|
207
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
208
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
209
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
210
|
+
*/
|
|
211
|
+
slug?: string;
|
|
212
|
+
/** ID of the entity associated with the event. */
|
|
213
|
+
entityId?: string;
|
|
214
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
215
|
+
eventTime?: Date | null;
|
|
216
|
+
/**
|
|
217
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
218
|
+
* (for example, GDPR).
|
|
219
|
+
*/
|
|
220
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
221
|
+
/** If present, indicates the action that triggered the event. */
|
|
222
|
+
originatedFrom?: string | null;
|
|
223
|
+
/**
|
|
224
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
225
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
226
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
227
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
228
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
229
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
230
|
+
*/
|
|
231
|
+
entityEventSequence?: string | null;
|
|
232
|
+
}
|
|
233
|
+
/** @oneof */
|
|
234
|
+
export interface DomainEventBodyOneOf {
|
|
235
|
+
createdEvent?: EntityCreatedEvent;
|
|
236
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
237
|
+
deletedEvent?: EntityDeletedEvent;
|
|
238
|
+
actionEvent?: ActionEvent;
|
|
239
|
+
}
|
|
240
|
+
export interface EntityCreatedEvent {
|
|
241
|
+
entity?: string;
|
|
242
|
+
}
|
|
243
|
+
export interface RestoreInfo {
|
|
244
|
+
deletedDate?: Date | null;
|
|
245
|
+
}
|
|
246
|
+
export interface EntityUpdatedEvent {
|
|
247
|
+
/**
|
|
248
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
249
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
250
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
251
|
+
*/
|
|
252
|
+
currentEntity?: string;
|
|
253
|
+
}
|
|
254
|
+
export interface EntityDeletedEvent {
|
|
255
|
+
/** Entity that was deleted */
|
|
256
|
+
deletedEntity?: string | null;
|
|
257
|
+
}
|
|
258
|
+
export interface ActionEvent {
|
|
259
|
+
body?: string;
|
|
260
|
+
}
|
|
261
|
+
export interface MessageEnvelope {
|
|
262
|
+
/** App instance ID. */
|
|
263
|
+
instanceId?: string | null;
|
|
264
|
+
/** Event type. */
|
|
265
|
+
eventType?: string;
|
|
266
|
+
/** The identification type and identity data. */
|
|
267
|
+
identity?: IdentificationData;
|
|
268
|
+
/** Stringify payload. */
|
|
269
|
+
data?: string;
|
|
270
|
+
}
|
|
271
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
272
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
273
|
+
anonymousVisitorId?: string;
|
|
274
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
275
|
+
memberId?: string;
|
|
276
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
277
|
+
wixUserId?: string;
|
|
278
|
+
/** ID of an app. */
|
|
279
|
+
appId?: string;
|
|
280
|
+
/** @readonly */
|
|
281
|
+
identityType?: WebhookIdentityType;
|
|
282
|
+
}
|
|
283
|
+
/** @oneof */
|
|
284
|
+
export interface IdentificationDataIdOneOf {
|
|
285
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
286
|
+
anonymousVisitorId?: string;
|
|
287
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
288
|
+
memberId?: string;
|
|
289
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
290
|
+
wixUserId?: string;
|
|
291
|
+
/** ID of an app. */
|
|
292
|
+
appId?: string;
|
|
293
|
+
}
|
|
294
|
+
export declare enum WebhookIdentityType {
|
|
295
|
+
UNKNOWN = "UNKNOWN",
|
|
296
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
297
|
+
MEMBER = "MEMBER",
|
|
298
|
+
WIX_USER = "WIX_USER",
|
|
299
|
+
APP = "APP"
|
|
300
|
+
}
|
|
301
|
+
export interface BaseEventMetadata {
|
|
302
|
+
/** App instance ID. */
|
|
303
|
+
instanceId?: string | null;
|
|
304
|
+
/** Event type. */
|
|
305
|
+
eventType?: string;
|
|
306
|
+
/** The identification type and identity data. */
|
|
307
|
+
identity?: IdentificationData;
|
|
308
|
+
}
|
|
309
|
+
export interface EventMetadata extends BaseEventMetadata {
|
|
310
|
+
/**
|
|
311
|
+
* Unique event ID.
|
|
312
|
+
* Allows clients to ignore duplicate webhooks.
|
|
313
|
+
*/
|
|
314
|
+
_id?: string;
|
|
315
|
+
/**
|
|
316
|
+
* Assumes actions are also always typed to an entity_type
|
|
317
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
318
|
+
*/
|
|
319
|
+
entityFqdn?: string;
|
|
320
|
+
/**
|
|
321
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
322
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
323
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
324
|
+
*/
|
|
325
|
+
slug?: string;
|
|
326
|
+
/** ID of the entity associated with the event. */
|
|
327
|
+
entityId?: string;
|
|
328
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
329
|
+
eventTime?: Date | null;
|
|
330
|
+
/**
|
|
331
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
332
|
+
* (for example, GDPR).
|
|
333
|
+
*/
|
|
334
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
335
|
+
/** If present, indicates the action that triggered the event. */
|
|
336
|
+
originatedFrom?: string | null;
|
|
337
|
+
/**
|
|
338
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
339
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
340
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
341
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
342
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
343
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
344
|
+
*/
|
|
345
|
+
entityEventSequence?: string | null;
|
|
346
|
+
}
|
|
347
|
+
export interface CategoryCreatedEnvelope {
|
|
348
|
+
entity: Category;
|
|
349
|
+
metadata: EventMetadata;
|
|
350
|
+
}
|
|
351
|
+
/** @permissionScope Manage FAQ
|
|
352
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
353
|
+
* @permissionScope Read FAQ
|
|
354
|
+
* @permissionScopeId SCOPE.DC-LABS.READ-FAQ
|
|
355
|
+
* @permissionId FAQ.READ_CATEGORIES
|
|
356
|
+
* @webhook
|
|
357
|
+
* @eventType wix.faq.category.v2.category_created
|
|
358
|
+
*/
|
|
359
|
+
export declare function onCategoryCreated(handler: (event: CategoryCreatedEnvelope) => void | Promise<void>): void;
|
|
360
|
+
export interface CategoryDeletedEnvelope {
|
|
361
|
+
metadata: EventMetadata;
|
|
362
|
+
}
|
|
363
|
+
/** @permissionScope Manage FAQ
|
|
364
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
365
|
+
* @permissionScope Read FAQ
|
|
366
|
+
* @permissionScopeId SCOPE.DC-LABS.READ-FAQ
|
|
367
|
+
* @permissionId FAQ.READ_CATEGORIES
|
|
368
|
+
* @webhook
|
|
369
|
+
* @eventType wix.faq.category.v2.category_deleted
|
|
370
|
+
*/
|
|
371
|
+
export declare function onCategoryDeleted(handler: (event: CategoryDeletedEnvelope) => void | Promise<void>): void;
|
|
372
|
+
export interface CategoryUpdatedEnvelope {
|
|
373
|
+
entity: Category;
|
|
374
|
+
metadata: EventMetadata;
|
|
375
|
+
}
|
|
376
|
+
/** @permissionScope Manage FAQ
|
|
377
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
378
|
+
* @permissionScope Read FAQ
|
|
379
|
+
* @permissionScopeId SCOPE.DC-LABS.READ-FAQ
|
|
380
|
+
* @permissionId FAQ.READ_CATEGORIES
|
|
381
|
+
* @webhook
|
|
382
|
+
* @eventType wix.faq.category.v2.category_updated
|
|
383
|
+
*/
|
|
384
|
+
export declare function onCategoryUpdated(handler: (event: CategoryUpdatedEnvelope) => void | Promise<void>): void;
|
|
385
|
+
/**
|
|
386
|
+
* Creates a new Category.
|
|
387
|
+
* @param category - Category to be created.
|
|
388
|
+
* @public
|
|
389
|
+
* @requiredField category
|
|
390
|
+
* @requiredField category.title
|
|
391
|
+
* @permissionId FAQ.CREATE_CATEGORY
|
|
392
|
+
* @permissionScope Manage FAQ
|
|
393
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
394
|
+
* @applicableIdentity APP
|
|
395
|
+
* @returns The created Category.
|
|
396
|
+
* @fqn wix.faq.category.v2.CategoryService.CreateCategory
|
|
397
|
+
*/
|
|
398
|
+
export declare function createCategory(category: Category): Promise<Category>;
|
|
399
|
+
/**
|
|
400
|
+
* Retrieves a single Category by id.
|
|
401
|
+
* @param categoryId - ID of the Category to retrieve.
|
|
402
|
+
* @public
|
|
403
|
+
* @requiredField categoryId
|
|
404
|
+
* @permissionId FAQ.READ_CATEGORIES
|
|
405
|
+
* @permissionScope Manage FAQ
|
|
406
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
407
|
+
* @permissionScope Read FAQ
|
|
408
|
+
* @permissionScopeId SCOPE.DC-LABS.READ-FAQ
|
|
409
|
+
* @applicableIdentity APP
|
|
410
|
+
* @applicableIdentity VISITOR
|
|
411
|
+
* @returns The requested Category.
|
|
412
|
+
* @fqn wix.faq.category.v2.CategoryService.GetCategory
|
|
413
|
+
*/
|
|
414
|
+
export declare function getCategory(categoryId: string): Promise<Category>;
|
|
415
|
+
/**
|
|
416
|
+
* Updates a Category.
|
|
417
|
+
*
|
|
418
|
+
* Each time the Category is updated, `revision` increments by 1.
|
|
419
|
+
* The current `revision` must be passed when updating the Category.
|
|
420
|
+
* This ensures you're working with the latest Category and prevents unintended overwrites.
|
|
421
|
+
* @param _id - Category ID.
|
|
422
|
+
* @public
|
|
423
|
+
* @requiredField _id
|
|
424
|
+
* @requiredField category
|
|
425
|
+
* @requiredField category.revision
|
|
426
|
+
* @permissionId FAQ.UPDATE_CATEGORY
|
|
427
|
+
* @permissionScope Manage FAQ
|
|
428
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
429
|
+
* @applicableIdentity APP
|
|
430
|
+
* @returns Updated Category.
|
|
431
|
+
* @fqn wix.faq.category.v2.CategoryService.UpdateCategory
|
|
432
|
+
*/
|
|
433
|
+
export declare function updateCategory(_id: string | null, category: UpdateCategory): Promise<Category>;
|
|
434
|
+
export interface UpdateCategory {
|
|
435
|
+
/**
|
|
436
|
+
* Category ID.
|
|
437
|
+
* @readonly
|
|
438
|
+
*/
|
|
439
|
+
_id?: string | null;
|
|
440
|
+
/**
|
|
441
|
+
* Revision number, which increments by 1 each time the Category is updated.
|
|
442
|
+
* To prevent conflicting changes,
|
|
443
|
+
* the current revision must be passed when updating the Category.
|
|
444
|
+
*
|
|
445
|
+
* Ignored when creating a Category.
|
|
446
|
+
* @readonly
|
|
447
|
+
*/
|
|
448
|
+
revision?: string | null;
|
|
449
|
+
/**
|
|
450
|
+
* Date and time the Category was created.
|
|
451
|
+
* @readonly
|
|
452
|
+
*/
|
|
453
|
+
_createdDate?: Date | null;
|
|
454
|
+
/**
|
|
455
|
+
* Date and time the Category was last updated.
|
|
456
|
+
* @readonly
|
|
457
|
+
*/
|
|
458
|
+
_updatedDate?: Date | null;
|
|
459
|
+
/** Category title. */
|
|
460
|
+
title?: string | null;
|
|
461
|
+
/** Order of category within a site. */
|
|
462
|
+
sortOrder?: number | null;
|
|
463
|
+
/** Data Extensions */
|
|
464
|
+
extendedFields?: ExtendedFields;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Deletes a Category.
|
|
468
|
+
* Deleting a Category permanently removes them from the Category List.
|
|
469
|
+
* @param categoryId - Id of the Category to delete.
|
|
470
|
+
* @public
|
|
471
|
+
* @requiredField categoryId
|
|
472
|
+
* @permissionId FAQ.DELETE_CATEGORY
|
|
473
|
+
* @permissionScope Manage FAQ
|
|
474
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
475
|
+
* @applicableIdentity APP
|
|
476
|
+
* @fqn wix.faq.category.v2.CategoryService.DeleteCategory
|
|
477
|
+
*/
|
|
478
|
+
export declare function deleteCategory(categoryId: string): Promise<void>;
|
|
479
|
+
/**
|
|
480
|
+
* Retrieves categories.
|
|
481
|
+
* @public
|
|
482
|
+
* @permissionId FAQ.READ_CATEGORIES
|
|
483
|
+
* @permissionScope Manage FAQ
|
|
484
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
485
|
+
* @permissionScope Read FAQ
|
|
486
|
+
* @permissionScopeId SCOPE.DC-LABS.READ-FAQ
|
|
487
|
+
* @applicableIdentity APP
|
|
488
|
+
* @applicableIdentity VISITOR
|
|
489
|
+
* @fqn wix.faq.category.v2.CategoryService.ListCategories
|
|
490
|
+
*/
|
|
491
|
+
export declare function listCategories(options?: ListCategoriesOptions): Promise<ListCategoriesResponse>;
|
|
492
|
+
export interface ListCategoriesOptions {
|
|
493
|
+
/** Request more categories using cursor paging. */
|
|
494
|
+
paging?: CursorPaging;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* Retrieves a list of Categories, given the provided [paging, filtering, and sorting].
|
|
498
|
+
* @public
|
|
499
|
+
* @permissionScope Manage FAQ
|
|
500
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
501
|
+
* @permissionScope Read FAQ
|
|
502
|
+
* @permissionScopeId SCOPE.DC-LABS.READ-FAQ
|
|
503
|
+
* @permissionId FAQ.READ_CATEGORIES
|
|
504
|
+
* @applicableIdentity APP
|
|
505
|
+
* @applicableIdentity VISITOR
|
|
506
|
+
* @fqn wix.faq.category.v2.CategoryService.QueryCategories
|
|
507
|
+
*/
|
|
508
|
+
export declare function queryCategories(): CategoriesQueryBuilder;
|
|
509
|
+
interface QueryCursorResult {
|
|
510
|
+
cursors: Cursors;
|
|
511
|
+
hasNext: () => boolean;
|
|
512
|
+
hasPrev: () => boolean;
|
|
513
|
+
length: number;
|
|
514
|
+
pageSize: number;
|
|
515
|
+
}
|
|
516
|
+
export interface CategoriesQueryResult extends QueryCursorResult {
|
|
517
|
+
items: Category[];
|
|
518
|
+
query: CategoriesQueryBuilder;
|
|
519
|
+
next: () => Promise<CategoriesQueryResult>;
|
|
520
|
+
prev: () => Promise<CategoriesQueryResult>;
|
|
521
|
+
}
|
|
522
|
+
export interface CategoriesQueryBuilder {
|
|
523
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
524
|
+
* @param value - Value to compare against.
|
|
525
|
+
*/
|
|
526
|
+
eq: (propertyName: '_id' | 'title' | 'sortOrder', value: any) => CategoriesQueryBuilder;
|
|
527
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
528
|
+
* @param value - Value to compare against.
|
|
529
|
+
*/
|
|
530
|
+
ne: (propertyName: '_id' | 'title' | 'sortOrder', value: any) => CategoriesQueryBuilder;
|
|
531
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
532
|
+
* @param value - Value to compare against.
|
|
533
|
+
*/
|
|
534
|
+
ge: (propertyName: 'sortOrder', value: any) => CategoriesQueryBuilder;
|
|
535
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
536
|
+
* @param value - Value to compare against.
|
|
537
|
+
*/
|
|
538
|
+
gt: (propertyName: 'sortOrder', value: any) => CategoriesQueryBuilder;
|
|
539
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
540
|
+
* @param value - Value to compare against.
|
|
541
|
+
*/
|
|
542
|
+
le: (propertyName: 'sortOrder', value: any) => CategoriesQueryBuilder;
|
|
543
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
544
|
+
* @param value - Value to compare against.
|
|
545
|
+
*/
|
|
546
|
+
lt: (propertyName: 'sortOrder', value: any) => CategoriesQueryBuilder;
|
|
547
|
+
/** @param propertyName - Property whose value is compared with `string`.
|
|
548
|
+
* @param string - String to compare against. Case-insensitive.
|
|
549
|
+
*/
|
|
550
|
+
startsWith: (propertyName: '_id' | 'title', value: string) => CategoriesQueryBuilder;
|
|
551
|
+
/** @param propertyName - Property whose value is compared with `values`.
|
|
552
|
+
* @param values - List of values to compare against.
|
|
553
|
+
*/
|
|
554
|
+
hasSome: (propertyName: '_id' | 'title' | 'sortOrder', value: any[]) => CategoriesQueryBuilder;
|
|
555
|
+
in: (propertyName: '_id' | 'title' | 'sortOrder', value: any) => CategoriesQueryBuilder;
|
|
556
|
+
exists: (propertyName: '_id' | 'title' | 'sortOrder', value: boolean) => CategoriesQueryBuilder;
|
|
557
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
558
|
+
ascending: (...propertyNames: Array<'_id' | 'title' | 'sortOrder'>) => CategoriesQueryBuilder;
|
|
559
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
|
|
560
|
+
descending: (...propertyNames: Array<'_id' | 'title' | 'sortOrder'>) => CategoriesQueryBuilder;
|
|
561
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object. */
|
|
562
|
+
limit: (limit: number) => CategoriesQueryBuilder;
|
|
563
|
+
/** @param cursor - A pointer to specific record */
|
|
564
|
+
skipTo: (cursor: string) => CategoriesQueryBuilder;
|
|
565
|
+
find: () => Promise<CategoriesQueryResult>;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Updates extended fields of a Category without incrementing revision
|
|
569
|
+
* @param _id - ID of the entity to update.
|
|
570
|
+
* @param namespace - Identifier for the app whose extended fields are being updated.
|
|
571
|
+
* @public
|
|
572
|
+
* @requiredField _id
|
|
573
|
+
* @requiredField namespace
|
|
574
|
+
* @requiredField options
|
|
575
|
+
* @requiredField options.namespaceData
|
|
576
|
+
* @permissionId FAQ.UPDATE_CATEGORY
|
|
577
|
+
* @permissionScope Manage FAQ
|
|
578
|
+
* @permissionScopeId SCOPE.DC-LABS.MANAGE-FAQ
|
|
579
|
+
* @applicableIdentity APP
|
|
580
|
+
* @fqn wix.faq.category.v2.CategoryService.UpdateExtendedFields
|
|
581
|
+
*/
|
|
582
|
+
export declare function updateExtendedFields(_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise<UpdateExtendedFieldsResponse>;
|
|
583
|
+
export interface UpdateExtendedFieldsOptions {
|
|
584
|
+
/** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
|
|
585
|
+
namespaceData: Record<string, any> | null;
|
|
586
|
+
}
|
|
587
|
+
export {};
|