@wix/auto_sdk_comments_votes 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 +60 -0
- package/build/cjs/index.js +529 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +898 -0
- package/build/cjs/index.typings.js +413 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +610 -0
- package/build/cjs/meta.js +304 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +60 -0
- package/build/es/index.mjs +494 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +898 -0
- package/build/es/index.typings.mjs +380 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +610 -0
- package/build/es/meta.mjs +270 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +60 -0
- package/build/internal/cjs/index.typings.d.ts +938 -0
- package/build/internal/cjs/meta.d.ts +678 -0
- package/build/internal/es/index.d.mts +60 -0
- package/build/internal/es/index.typings.d.mts +938 -0
- package/build/internal/es/meta.d.mts +678 -0
- package/meta/package.json +3 -0
- package/package.json +54 -0
|
@@ -0,0 +1,678 @@
|
|
|
1
|
+
import { UpvoteRequest as UpvoteRequest$1, UpvoteResponse as UpvoteResponse$1, DownvoteRequest as DownvoteRequest$1, DownvoteResponse as DownvoteResponse$1, RemoveVoteRequest as RemoveVoteRequest$1, RemoveVoteResponse as RemoveVoteResponse$1, QueryVotesRequest as QueryVotesRequest$1, QueryVotesResponse as QueryVotesResponse$1 } from './index.typings.mjs';
|
|
2
|
+
import '@wix/sdk-types';
|
|
3
|
+
|
|
4
|
+
/** An upvote or downvote cast by one identity on a resource in an app context. */
|
|
5
|
+
interface Vote {
|
|
6
|
+
/**
|
|
7
|
+
* Vote resource ID
|
|
8
|
+
* @maxLength 128
|
|
9
|
+
*/
|
|
10
|
+
resourceId?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Resource fully qualified domain name
|
|
13
|
+
* @maxLength 300
|
|
14
|
+
*/
|
|
15
|
+
resourceFqdn?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Vote ID
|
|
18
|
+
* @format GUID
|
|
19
|
+
* @readonly
|
|
20
|
+
*/
|
|
21
|
+
voteId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Type of vote
|
|
24
|
+
* @readonly
|
|
25
|
+
*/
|
|
26
|
+
type?: TypeWithLiterals;
|
|
27
|
+
/**
|
|
28
|
+
* Vote author
|
|
29
|
+
* @readonly
|
|
30
|
+
*/
|
|
31
|
+
createdBy?: SocialIdentity;
|
|
32
|
+
/**
|
|
33
|
+
* Vote created date
|
|
34
|
+
* @readonly
|
|
35
|
+
*/
|
|
36
|
+
createdDate?: Date | null;
|
|
37
|
+
/**
|
|
38
|
+
* Vote updated date
|
|
39
|
+
* @readonly
|
|
40
|
+
*/
|
|
41
|
+
updatedDate?: Date | null;
|
|
42
|
+
/** Vote context, defining where the vote belongs to */
|
|
43
|
+
context?: VoteContext;
|
|
44
|
+
/**
|
|
45
|
+
* Vote revision
|
|
46
|
+
* @readonly
|
|
47
|
+
*/
|
|
48
|
+
revision?: string;
|
|
49
|
+
}
|
|
50
|
+
/** Type of vote */
|
|
51
|
+
declare enum Type {
|
|
52
|
+
UNKNOWN = "UNKNOWN",
|
|
53
|
+
UPVOTE = "UPVOTE",
|
|
54
|
+
DOWNVOTE = "DOWNVOTE"
|
|
55
|
+
}
|
|
56
|
+
/** @enumType */
|
|
57
|
+
type TypeWithLiterals = Type | 'UNKNOWN' | 'UPVOTE' | 'DOWNVOTE';
|
|
58
|
+
interface SocialIdentity {
|
|
59
|
+
/** @format GUID */
|
|
60
|
+
identityId?: string;
|
|
61
|
+
identityType?: IdentityTypeWithLiterals;
|
|
62
|
+
}
|
|
63
|
+
declare enum IdentityType {
|
|
64
|
+
ANONYMOUS = "ANONYMOUS",
|
|
65
|
+
MEMBER = "MEMBER",
|
|
66
|
+
USER = "USER",
|
|
67
|
+
SERVICE = "SERVICE",
|
|
68
|
+
/** indicates everyone who is a member of a group */
|
|
69
|
+
MEMBER_GROUP = "MEMBER_GROUP"
|
|
70
|
+
}
|
|
71
|
+
/** @enumType */
|
|
72
|
+
type IdentityTypeWithLiterals = IdentityType | 'ANONYMOUS' | 'MEMBER' | 'USER' | 'SERVICE' | 'MEMBER_GROUP';
|
|
73
|
+
interface VoteContext {
|
|
74
|
+
/**
|
|
75
|
+
* Context ID
|
|
76
|
+
* @maxLength 128
|
|
77
|
+
*/
|
|
78
|
+
contextId?: string;
|
|
79
|
+
/** Context type */
|
|
80
|
+
contextType?: string | null;
|
|
81
|
+
/**
|
|
82
|
+
* Vote app ID
|
|
83
|
+
* @format GUID
|
|
84
|
+
* @readonly
|
|
85
|
+
*/
|
|
86
|
+
appDefId?: string;
|
|
87
|
+
/**
|
|
88
|
+
* MetaSite ID
|
|
89
|
+
* @format GUID
|
|
90
|
+
* @readonly
|
|
91
|
+
*/
|
|
92
|
+
metaSiteId?: string;
|
|
93
|
+
}
|
|
94
|
+
interface UpvoteRequest {
|
|
95
|
+
/**
|
|
96
|
+
* context token to be passed
|
|
97
|
+
* @deprecated
|
|
98
|
+
* @replacedBy context_data
|
|
99
|
+
*/
|
|
100
|
+
contextToken?: string;
|
|
101
|
+
/**
|
|
102
|
+
* resource identifier for vote be cast on
|
|
103
|
+
* @maxLength 128
|
|
104
|
+
*/
|
|
105
|
+
resourceId: string;
|
|
106
|
+
/**
|
|
107
|
+
* resource name
|
|
108
|
+
* @maxLength 300
|
|
109
|
+
*/
|
|
110
|
+
resourceFqdn: string;
|
|
111
|
+
/** context data */
|
|
112
|
+
contextData?: ContextData;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Identifies the app and context containing the resource.
|
|
116
|
+
* When provided, contextData takes precedence over the deprecated contextToken.
|
|
117
|
+
*/
|
|
118
|
+
interface ContextData {
|
|
119
|
+
/**
|
|
120
|
+
* ID of the app that owns the context.
|
|
121
|
+
* @format GUID
|
|
122
|
+
*/
|
|
123
|
+
appDefId?: string;
|
|
124
|
+
/**
|
|
125
|
+
* ID of the context containing the resource.
|
|
126
|
+
* @maxLength 128
|
|
127
|
+
*/
|
|
128
|
+
contextId?: string;
|
|
129
|
+
/** Optional type used by the app to resolve its context. */
|
|
130
|
+
contextType?: string | null;
|
|
131
|
+
}
|
|
132
|
+
interface UpvoteResponse {
|
|
133
|
+
/** created vote */
|
|
134
|
+
vote?: Vote;
|
|
135
|
+
}
|
|
136
|
+
interface ContextResourceVoteChange {
|
|
137
|
+
/**
|
|
138
|
+
* Resource ID
|
|
139
|
+
* @maxLength 128
|
|
140
|
+
*/
|
|
141
|
+
resourceId?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Resource fully qualified domain name
|
|
144
|
+
* @maxLength 300
|
|
145
|
+
*/
|
|
146
|
+
resourceFqdn?: string;
|
|
147
|
+
/** Score of votes */
|
|
148
|
+
score?: number;
|
|
149
|
+
/** Upvote count */
|
|
150
|
+
upvoteCount?: number;
|
|
151
|
+
/** Downvote count */
|
|
152
|
+
downvoteCount?: number;
|
|
153
|
+
/** Vote context */
|
|
154
|
+
context?: VoteContext;
|
|
155
|
+
}
|
|
156
|
+
interface VoteCast {
|
|
157
|
+
/** Vote */
|
|
158
|
+
vote?: Vote;
|
|
159
|
+
}
|
|
160
|
+
interface DownvoteRequest {
|
|
161
|
+
/**
|
|
162
|
+
* context token to be passed
|
|
163
|
+
* @deprecated
|
|
164
|
+
* @replacedBy context_data
|
|
165
|
+
*/
|
|
166
|
+
contextToken?: string;
|
|
167
|
+
/**
|
|
168
|
+
* resource identifier for vote be cast on
|
|
169
|
+
* @maxLength 128
|
|
170
|
+
*/
|
|
171
|
+
resourceId: string;
|
|
172
|
+
/**
|
|
173
|
+
* resource name
|
|
174
|
+
* @maxLength 300
|
|
175
|
+
*/
|
|
176
|
+
resourceFqdn: string;
|
|
177
|
+
/** context data */
|
|
178
|
+
contextData?: ContextData;
|
|
179
|
+
}
|
|
180
|
+
interface DownvoteResponse {
|
|
181
|
+
/** created vote */
|
|
182
|
+
vote?: Vote;
|
|
183
|
+
}
|
|
184
|
+
interface UpdateVoteRequest {
|
|
185
|
+
/** vote to be updated, may be partial and include only VoteId and the field to change */
|
|
186
|
+
vote?: Vote;
|
|
187
|
+
/**
|
|
188
|
+
* explicit list of fields to update
|
|
189
|
+
* @internal
|
|
190
|
+
*/
|
|
191
|
+
fieldMask?: string[];
|
|
192
|
+
}
|
|
193
|
+
interface UpdateVoteResponse {
|
|
194
|
+
/** updated vote */
|
|
195
|
+
vote?: Vote;
|
|
196
|
+
}
|
|
197
|
+
interface RemoveVoteRequest {
|
|
198
|
+
/**
|
|
199
|
+
* context token to be passed
|
|
200
|
+
* @deprecated
|
|
201
|
+
* @replacedBy context_data
|
|
202
|
+
*/
|
|
203
|
+
contextToken?: string;
|
|
204
|
+
/** id of the vote which will be deleted */
|
|
205
|
+
voteId: string;
|
|
206
|
+
/** context data */
|
|
207
|
+
contextData?: ContextData;
|
|
208
|
+
}
|
|
209
|
+
interface RemoveVoteResponse {
|
|
210
|
+
/** removed vote */
|
|
211
|
+
vote?: Vote;
|
|
212
|
+
}
|
|
213
|
+
interface VoteDeleted {
|
|
214
|
+
/** Vote */
|
|
215
|
+
vote?: Vote;
|
|
216
|
+
}
|
|
217
|
+
interface QueryVotesRequest {
|
|
218
|
+
/**
|
|
219
|
+
* context token to be passed
|
|
220
|
+
* @deprecated
|
|
221
|
+
* @replacedBy context_data
|
|
222
|
+
*/
|
|
223
|
+
contextToken?: string;
|
|
224
|
+
/** query request. Filter supports only "resourceId" field. Fields and Fieldset are not supported */
|
|
225
|
+
query?: QueryV2;
|
|
226
|
+
/** context data */
|
|
227
|
+
contextData?: ContextData;
|
|
228
|
+
}
|
|
229
|
+
interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
230
|
+
/** Paging options to limit and offset the number of items. */
|
|
231
|
+
paging?: Paging;
|
|
232
|
+
/** 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`. */
|
|
233
|
+
cursorPaging?: CursorPaging;
|
|
234
|
+
/**
|
|
235
|
+
* Filter object.
|
|
236
|
+
*
|
|
237
|
+
* Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters).
|
|
238
|
+
*/
|
|
239
|
+
filter?: Record<string, any> | null;
|
|
240
|
+
/**
|
|
241
|
+
* Sort object.
|
|
242
|
+
*
|
|
243
|
+
* Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting).
|
|
244
|
+
*/
|
|
245
|
+
sort?: Sorting[];
|
|
246
|
+
/** 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. */
|
|
247
|
+
fields?: string[];
|
|
248
|
+
/** 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. */
|
|
249
|
+
fieldsets?: string[];
|
|
250
|
+
}
|
|
251
|
+
/** @oneof */
|
|
252
|
+
interface QueryV2PagingMethodOneOf {
|
|
253
|
+
/** Paging options to limit and offset the number of items. */
|
|
254
|
+
paging?: Paging;
|
|
255
|
+
/** 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`. */
|
|
256
|
+
cursorPaging?: CursorPaging;
|
|
257
|
+
}
|
|
258
|
+
interface Sorting {
|
|
259
|
+
/**
|
|
260
|
+
* Name of the field to sort by.
|
|
261
|
+
* @maxLength 512
|
|
262
|
+
*/
|
|
263
|
+
fieldName?: string;
|
|
264
|
+
/** Sort order. */
|
|
265
|
+
order?: SortOrderWithLiterals;
|
|
266
|
+
/**
|
|
267
|
+
* When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
|
|
268
|
+
* a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
|
|
269
|
+
*
|
|
270
|
+
* If multiple filters are provided, they are combined with AND operator.
|
|
271
|
+
*
|
|
272
|
+
* Example:
|
|
273
|
+
* Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
|
|
274
|
+
* and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
|
|
275
|
+
* { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
|
|
276
|
+
* @internal
|
|
277
|
+
* @maxSize 10
|
|
278
|
+
*/
|
|
279
|
+
selectItemsBy?: Record<string, any>[] | null;
|
|
280
|
+
/**
|
|
281
|
+
* Origin point for geo-distance sorting on a GEO field
|
|
282
|
+
* results are ordered by distance from this point (ASC = nearest first, DESC = farthest first).
|
|
283
|
+
*/
|
|
284
|
+
origin?: AddressLocation;
|
|
285
|
+
}
|
|
286
|
+
declare enum SortOrder {
|
|
287
|
+
ASC = "ASC",
|
|
288
|
+
DESC = "DESC"
|
|
289
|
+
}
|
|
290
|
+
/** @enumType */
|
|
291
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
292
|
+
interface AddressLocation {
|
|
293
|
+
/** Address latitude. */
|
|
294
|
+
latitude?: number | null;
|
|
295
|
+
/** Address longitude. */
|
|
296
|
+
longitude?: number | null;
|
|
297
|
+
}
|
|
298
|
+
interface Paging {
|
|
299
|
+
/** Number of items to load. */
|
|
300
|
+
limit?: number | null;
|
|
301
|
+
/** Number of items to skip in the current sort order. */
|
|
302
|
+
offset?: number | null;
|
|
303
|
+
}
|
|
304
|
+
interface CursorPaging {
|
|
305
|
+
/**
|
|
306
|
+
* Maximum number of items to return in the results.
|
|
307
|
+
* @max 100
|
|
308
|
+
*/
|
|
309
|
+
limit?: number | null;
|
|
310
|
+
/**
|
|
311
|
+
* Pointer to the next or previous page in the list of results.
|
|
312
|
+
*
|
|
313
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
314
|
+
* Not relevant for the first request.
|
|
315
|
+
* @maxLength 16000
|
|
316
|
+
*/
|
|
317
|
+
cursor?: string | null;
|
|
318
|
+
}
|
|
319
|
+
interface QueryVotesResponse {
|
|
320
|
+
/** matching votes */
|
|
321
|
+
votes?: Vote[];
|
|
322
|
+
/** paging metadata. Only contains cursors */
|
|
323
|
+
paging?: PagingMetadataV2;
|
|
324
|
+
}
|
|
325
|
+
interface PagingMetadataV2 {
|
|
326
|
+
/** Number of items returned in the response. */
|
|
327
|
+
count?: number | null;
|
|
328
|
+
/** Offset that was requested. */
|
|
329
|
+
offset?: number | null;
|
|
330
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
331
|
+
total?: number | null;
|
|
332
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
333
|
+
tooManyToCount?: boolean | null;
|
|
334
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
335
|
+
cursors?: Cursors;
|
|
336
|
+
/**
|
|
337
|
+
* Indicates if there are more results after the current page.
|
|
338
|
+
* If `true`, another page of results can be retrieved.
|
|
339
|
+
* If `false`, this is the last page.
|
|
340
|
+
* @internal
|
|
341
|
+
*/
|
|
342
|
+
hasNext?: boolean | null;
|
|
343
|
+
}
|
|
344
|
+
interface Cursors {
|
|
345
|
+
/**
|
|
346
|
+
* Cursor string pointing to the next page in the list of results.
|
|
347
|
+
* @maxLength 16000
|
|
348
|
+
*/
|
|
349
|
+
next?: string | null;
|
|
350
|
+
/**
|
|
351
|
+
* Cursor pointing to the previous page in the list of results.
|
|
352
|
+
* @maxLength 16000
|
|
353
|
+
*/
|
|
354
|
+
prev?: string | null;
|
|
355
|
+
}
|
|
356
|
+
interface GetResourceVoteSummaryRequest {
|
|
357
|
+
/** appDef ID */
|
|
358
|
+
appDefId?: string;
|
|
359
|
+
/** context ID */
|
|
360
|
+
contextId?: string;
|
|
361
|
+
/** resource ID */
|
|
362
|
+
resourceId?: string;
|
|
363
|
+
}
|
|
364
|
+
interface GetResourceVoteSummaryResponse {
|
|
365
|
+
/** Resource vote summary */
|
|
366
|
+
summary?: ResourceVoteSummary;
|
|
367
|
+
}
|
|
368
|
+
interface ResourceVoteSummary {
|
|
369
|
+
/** vote context */
|
|
370
|
+
context?: VoteContext;
|
|
371
|
+
/** resource ID */
|
|
372
|
+
resourceId?: string;
|
|
373
|
+
/** vote score */
|
|
374
|
+
score?: number;
|
|
375
|
+
/** upvote count */
|
|
376
|
+
upvoteCount?: number;
|
|
377
|
+
/** downvote count */
|
|
378
|
+
downvoteCount?: number;
|
|
379
|
+
}
|
|
380
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
381
|
+
createdEvent?: EntityCreatedEvent;
|
|
382
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
383
|
+
deletedEvent?: EntityDeletedEvent;
|
|
384
|
+
actionEvent?: ActionEvent;
|
|
385
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
386
|
+
id?: string;
|
|
387
|
+
/**
|
|
388
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
389
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
390
|
+
*/
|
|
391
|
+
entityFqdn?: string;
|
|
392
|
+
/**
|
|
393
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
394
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
395
|
+
*/
|
|
396
|
+
slug?: string;
|
|
397
|
+
/** ID of the entity associated with the event. */
|
|
398
|
+
entityId?: string;
|
|
399
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
400
|
+
eventTime?: Date | null;
|
|
401
|
+
/**
|
|
402
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
403
|
+
* (for example, GDPR).
|
|
404
|
+
*/
|
|
405
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
406
|
+
/** If present, indicates the action that triggered the event. */
|
|
407
|
+
originatedFrom?: string | null;
|
|
408
|
+
/**
|
|
409
|
+
* A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.
|
|
410
|
+
* You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
|
|
411
|
+
*/
|
|
412
|
+
entityEventSequence?: string | null;
|
|
413
|
+
}
|
|
414
|
+
/** @oneof */
|
|
415
|
+
interface DomainEventBodyOneOf {
|
|
416
|
+
createdEvent?: EntityCreatedEvent;
|
|
417
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
418
|
+
deletedEvent?: EntityDeletedEvent;
|
|
419
|
+
actionEvent?: ActionEvent;
|
|
420
|
+
}
|
|
421
|
+
interface EntityCreatedEvent {
|
|
422
|
+
entityAsJson?: string;
|
|
423
|
+
/**
|
|
424
|
+
* Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity
|
|
425
|
+
* @internal
|
|
426
|
+
*/
|
|
427
|
+
triggeredByUndelete?: boolean | null;
|
|
428
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
429
|
+
restoreInfo?: RestoreInfo;
|
|
430
|
+
/**
|
|
431
|
+
* Optional domain-specific metadata defined by the API owner, encoded as JSON.
|
|
432
|
+
* @internal
|
|
433
|
+
*/
|
|
434
|
+
additionalMetadataAsJson?: string | null;
|
|
435
|
+
}
|
|
436
|
+
interface RestoreInfo {
|
|
437
|
+
deletedDate?: Date | null;
|
|
438
|
+
}
|
|
439
|
+
interface EntityUpdatedEvent {
|
|
440
|
+
/**
|
|
441
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
442
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
443
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
444
|
+
*/
|
|
445
|
+
currentEntityAsJson?: string;
|
|
446
|
+
/**
|
|
447
|
+
* This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard
|
|
448
|
+
* wont populate it / have any reference to it in the API.
|
|
449
|
+
* The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,
|
|
450
|
+
* the developer should send only the new (current) entity.
|
|
451
|
+
* An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big
|
|
452
|
+
* Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.
|
|
453
|
+
* @internal
|
|
454
|
+
* @deprecated
|
|
455
|
+
*/
|
|
456
|
+
previousEntityAsJson?: string | null;
|
|
457
|
+
/**
|
|
458
|
+
* Map of fully qualified field paths to their previous values for fields that changed.
|
|
459
|
+
* For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)
|
|
460
|
+
* @internal
|
|
461
|
+
*/
|
|
462
|
+
modifiedFields?: Record<string, any>;
|
|
463
|
+
/**
|
|
464
|
+
* Optional domain-specific metadata defined by the API owner, encoded as JSON.
|
|
465
|
+
* @internal
|
|
466
|
+
*/
|
|
467
|
+
additionalMetadataAsJson?: string | null;
|
|
468
|
+
}
|
|
469
|
+
interface EntityDeletedEvent {
|
|
470
|
+
/**
|
|
471
|
+
* Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled
|
|
472
|
+
* @internal
|
|
473
|
+
*/
|
|
474
|
+
movedToTrash?: boolean | null;
|
|
475
|
+
/** Entity that was deleted. */
|
|
476
|
+
deletedEntityAsJson?: string | null;
|
|
477
|
+
/**
|
|
478
|
+
* Optional domain-specific metadata defined by the API owner, encoded as JSON.
|
|
479
|
+
* @internal
|
|
480
|
+
*/
|
|
481
|
+
additionalMetadataAsJson?: string | null;
|
|
482
|
+
}
|
|
483
|
+
interface ActionEvent {
|
|
484
|
+
bodyAsJson?: string;
|
|
485
|
+
}
|
|
486
|
+
interface Empty {
|
|
487
|
+
}
|
|
488
|
+
interface ImportVoteRequest {
|
|
489
|
+
/** metaSite ID */
|
|
490
|
+
metaSiteId?: string;
|
|
491
|
+
/** vote to import */
|
|
492
|
+
vote?: ImportVote;
|
|
493
|
+
}
|
|
494
|
+
interface ImportVote {
|
|
495
|
+
/**
|
|
496
|
+
* Resource ID
|
|
497
|
+
* @maxLength 128
|
|
498
|
+
*/
|
|
499
|
+
resourceId?: string;
|
|
500
|
+
/**
|
|
501
|
+
* Resource fully qualified domain name
|
|
502
|
+
* @maxLength 300
|
|
503
|
+
*/
|
|
504
|
+
resourceFqdn?: string;
|
|
505
|
+
/**
|
|
506
|
+
* Vote ID
|
|
507
|
+
* @format GUID
|
|
508
|
+
*/
|
|
509
|
+
voteId?: string;
|
|
510
|
+
/** Type of vote */
|
|
511
|
+
type?: TypeWithLiterals;
|
|
512
|
+
/** Vote author */
|
|
513
|
+
createdBy?: SocialIdentity;
|
|
514
|
+
/** Vote creation date */
|
|
515
|
+
createdDate?: Date | null;
|
|
516
|
+
/** Vote update date */
|
|
517
|
+
updatedDate?: Date | null;
|
|
518
|
+
/** Vote context */
|
|
519
|
+
context?: VoteContext;
|
|
520
|
+
}
|
|
521
|
+
interface MessageEnvelope {
|
|
522
|
+
/**
|
|
523
|
+
* App instance ID.
|
|
524
|
+
* @format GUID
|
|
525
|
+
*/
|
|
526
|
+
instanceId?: string | null;
|
|
527
|
+
/**
|
|
528
|
+
* Event type.
|
|
529
|
+
* @maxLength 150
|
|
530
|
+
*/
|
|
531
|
+
eventType?: string;
|
|
532
|
+
/** The identification type and identity data. */
|
|
533
|
+
identity?: IdentificationData;
|
|
534
|
+
/** Stringify payload. */
|
|
535
|
+
data?: string;
|
|
536
|
+
/** Details related to the account */
|
|
537
|
+
accountInfo?: AccountInfo;
|
|
538
|
+
}
|
|
539
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
540
|
+
/**
|
|
541
|
+
* ID of a site visitor that has not logged in to the site.
|
|
542
|
+
* @format GUID
|
|
543
|
+
*/
|
|
544
|
+
anonymousVisitorId?: string;
|
|
545
|
+
/**
|
|
546
|
+
* ID of a site visitor that has logged in to the site.
|
|
547
|
+
* @format GUID
|
|
548
|
+
*/
|
|
549
|
+
memberId?: string;
|
|
550
|
+
/**
|
|
551
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
552
|
+
* @format GUID
|
|
553
|
+
*/
|
|
554
|
+
wixUserId?: string;
|
|
555
|
+
/**
|
|
556
|
+
* ID of an app.
|
|
557
|
+
* @format GUID
|
|
558
|
+
*/
|
|
559
|
+
appId?: string;
|
|
560
|
+
/** @readonly */
|
|
561
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
562
|
+
}
|
|
563
|
+
/** @oneof */
|
|
564
|
+
interface IdentificationDataIdOneOf {
|
|
565
|
+
/**
|
|
566
|
+
* ID of a site visitor that has not logged in to the site.
|
|
567
|
+
* @format GUID
|
|
568
|
+
*/
|
|
569
|
+
anonymousVisitorId?: string;
|
|
570
|
+
/**
|
|
571
|
+
* ID of a site visitor that has logged in to the site.
|
|
572
|
+
* @format GUID
|
|
573
|
+
*/
|
|
574
|
+
memberId?: string;
|
|
575
|
+
/**
|
|
576
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
577
|
+
* @format GUID
|
|
578
|
+
*/
|
|
579
|
+
wixUserId?: string;
|
|
580
|
+
/**
|
|
581
|
+
* ID of an app.
|
|
582
|
+
* @format GUID
|
|
583
|
+
*/
|
|
584
|
+
appId?: string;
|
|
585
|
+
}
|
|
586
|
+
declare enum WebhookIdentityType {
|
|
587
|
+
UNKNOWN = "UNKNOWN",
|
|
588
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
589
|
+
MEMBER = "MEMBER",
|
|
590
|
+
WIX_USER = "WIX_USER",
|
|
591
|
+
APP = "APP"
|
|
592
|
+
}
|
|
593
|
+
/** @enumType */
|
|
594
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
595
|
+
interface AccountInfo {
|
|
596
|
+
/**
|
|
597
|
+
* ID of the Wix account associated with the event.
|
|
598
|
+
* @format GUID
|
|
599
|
+
*/
|
|
600
|
+
accountId?: string | null;
|
|
601
|
+
/**
|
|
602
|
+
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
603
|
+
* @format GUID
|
|
604
|
+
*/
|
|
605
|
+
parentAccountId?: string | null;
|
|
606
|
+
/**
|
|
607
|
+
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
608
|
+
* @format GUID
|
|
609
|
+
*/
|
|
610
|
+
siteId?: string | null;
|
|
611
|
+
}
|
|
612
|
+
/** @docsIgnore */
|
|
613
|
+
type UpvoteApplicationErrors = {
|
|
614
|
+
code?: 'MISSING_METASITE_CONTEXT';
|
|
615
|
+
description?: string;
|
|
616
|
+
data?: Record<string, any>;
|
|
617
|
+
} | {
|
|
618
|
+
code?: 'PERMISSION_DENIED';
|
|
619
|
+
description?: string;
|
|
620
|
+
data?: Record<string, any>;
|
|
621
|
+
};
|
|
622
|
+
/** @docsIgnore */
|
|
623
|
+
type DownvoteApplicationErrors = {
|
|
624
|
+
code?: 'MISSING_METASITE_CONTEXT';
|
|
625
|
+
description?: string;
|
|
626
|
+
data?: Record<string, any>;
|
|
627
|
+
} | {
|
|
628
|
+
code?: 'PERMISSION_DENIED';
|
|
629
|
+
description?: string;
|
|
630
|
+
data?: Record<string, any>;
|
|
631
|
+
};
|
|
632
|
+
/** @docsIgnore */
|
|
633
|
+
type RemoveVoteApplicationErrors = {
|
|
634
|
+
code?: 'MISSING_METASITE_CONTEXT';
|
|
635
|
+
description?: string;
|
|
636
|
+
data?: Record<string, any>;
|
|
637
|
+
} | {
|
|
638
|
+
code?: 'PERMISSION_DENIED';
|
|
639
|
+
description?: string;
|
|
640
|
+
data?: Record<string, any>;
|
|
641
|
+
} | {
|
|
642
|
+
code?: 'VOTE_NOT_FOUND';
|
|
643
|
+
description?: string;
|
|
644
|
+
data?: Record<string, any>;
|
|
645
|
+
};
|
|
646
|
+
/** @docsIgnore */
|
|
647
|
+
type QueryVotesApplicationErrors = {
|
|
648
|
+
code?: 'MISSING_METASITE_CONTEXT';
|
|
649
|
+
description?: string;
|
|
650
|
+
data?: Record<string, any>;
|
|
651
|
+
} | {
|
|
652
|
+
code?: 'PERMISSION_DENIED';
|
|
653
|
+
description?: string;
|
|
654
|
+
data?: Record<string, any>;
|
|
655
|
+
} | {
|
|
656
|
+
code?: 'UNSUPPORTED_FILTER_FIELDS';
|
|
657
|
+
description?: string;
|
|
658
|
+
data?: Record<string, any>;
|
|
659
|
+
};
|
|
660
|
+
|
|
661
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
662
|
+
getUrl: (context: any) => string;
|
|
663
|
+
httpMethod: K;
|
|
664
|
+
path: string;
|
|
665
|
+
pathParams: M;
|
|
666
|
+
__requestType: T;
|
|
667
|
+
__originalRequestType: S;
|
|
668
|
+
__responseType: Q;
|
|
669
|
+
__originalResponseType: R;
|
|
670
|
+
};
|
|
671
|
+
declare function upvote(): __PublicMethodMetaInfo<'POST', {}, UpvoteRequest$1, UpvoteRequest, UpvoteResponse$1, UpvoteResponse>;
|
|
672
|
+
declare function downvote(): __PublicMethodMetaInfo<'POST', {}, DownvoteRequest$1, DownvoteRequest, DownvoteResponse$1, DownvoteResponse>;
|
|
673
|
+
declare function removeVote(): __PublicMethodMetaInfo<'DELETE', {
|
|
674
|
+
voteId: string;
|
|
675
|
+
}, RemoveVoteRequest$1, RemoveVoteRequest, RemoveVoteResponse$1, RemoveVoteResponse>;
|
|
676
|
+
declare function queryVotes(): __PublicMethodMetaInfo<'POST', {}, QueryVotesRequest$1, QueryVotesRequest, QueryVotesResponse$1, QueryVotesResponse>;
|
|
677
|
+
|
|
678
|
+
export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type AddressLocation as AddressLocationOriginal, type ContextData as ContextDataOriginal, type ContextResourceVoteChange as ContextResourceVoteChangeOriginal, type CursorPaging as CursorPagingOriginal, type Cursors as CursorsOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type DownvoteApplicationErrors as DownvoteApplicationErrorsOriginal, type DownvoteRequest as DownvoteRequestOriginal, type DownvoteResponse as DownvoteResponseOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GetResourceVoteSummaryRequest as GetResourceVoteSummaryRequestOriginal, type GetResourceVoteSummaryResponse as GetResourceVoteSummaryResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, IdentityType as IdentityTypeOriginal, type IdentityTypeWithLiterals as IdentityTypeWithLiteralsOriginal, type ImportVote as ImportVoteOriginal, type ImportVoteRequest as ImportVoteRequestOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type PagingMetadataV2 as PagingMetadataV2Original, type Paging as PagingOriginal, type QueryV2 as QueryV2Original, type QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOfOriginal, type QueryVotesApplicationErrors as QueryVotesApplicationErrorsOriginal, type QueryVotesRequest as QueryVotesRequestOriginal, type QueryVotesResponse as QueryVotesResponseOriginal, type RemoveVoteApplicationErrors as RemoveVoteApplicationErrorsOriginal, type RemoveVoteRequest as RemoveVoteRequestOriginal, type RemoveVoteResponse as RemoveVoteResponseOriginal, type ResourceVoteSummary as ResourceVoteSummaryOriginal, type RestoreInfo as RestoreInfoOriginal, type SocialIdentity as SocialIdentityOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, Type as TypeOriginal, type TypeWithLiterals as TypeWithLiteralsOriginal, type UpdateVoteRequest as UpdateVoteRequestOriginal, type UpdateVoteResponse as UpdateVoteResponseOriginal, type UpvoteApplicationErrors as UpvoteApplicationErrorsOriginal, type UpvoteRequest as UpvoteRequestOriginal, type UpvoteResponse as UpvoteResponseOriginal, type VoteCast as VoteCastOriginal, type VoteContext as VoteContextOriginal, type VoteDeleted as VoteDeletedOriginal, type Vote as VoteOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, downvote, queryVotes, removeVote, upvote };
|