@wix/auto_sdk_comments_ratings 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 +50 -0
- package/build/cjs/index.js +366 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +521 -0
- package/build/cjs/index.typings.js +284 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +382 -0
- package/build/cjs/meta.js +244 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +50 -0
- package/build/es/index.mjs +336 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +521 -0
- package/build/es/index.typings.mjs +256 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +382 -0
- package/build/es/meta.mjs +213 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +50 -0
- package/build/internal/cjs/index.js +366 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +521 -0
- package/build/internal/cjs/index.typings.js +284 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +382 -0
- package/build/internal/cjs/meta.js +244 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/es/index.d.mts +50 -0
- package/build/internal/es/index.mjs +336 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +521 -0
- package/build/internal/es/index.typings.mjs +256 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +382 -0
- package/build/internal/es/meta.mjs +213 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +54 -0
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
import { V1CreateRatingRequest as V1CreateRatingRequest$1, V1CreateRatingResponse as V1CreateRatingResponse$1, RemoveMyRatingRequest as RemoveMyRatingRequest$1, RemoveMyRatingResponse as RemoveMyRatingResponse$1, V1GetMyRatingRequest as V1GetMyRatingRequest$1, V1GetMyRatingResponse as V1GetMyRatingResponse$1, GetResourceSummaryRequest as GetResourceSummaryRequest$1, GetResourceSummaryResponse as GetResourceSummaryResponse$1 } from './index.typings.js';
|
|
2
|
+
import '@wix/sdk-types';
|
|
3
|
+
|
|
4
|
+
interface V1CommentResourceRating extends V1CommentResourceRatingOwnerOneOf {
|
|
5
|
+
/**
|
|
6
|
+
* Visitor Id
|
|
7
|
+
* @readonly
|
|
8
|
+
*/
|
|
9
|
+
visitorId?: string | null;
|
|
10
|
+
/**
|
|
11
|
+
* Member Id
|
|
12
|
+
* @readonly
|
|
13
|
+
*/
|
|
14
|
+
memberId?: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* @readonly
|
|
17
|
+
* @format GUID
|
|
18
|
+
*/
|
|
19
|
+
id?: string | null;
|
|
20
|
+
/** Rating Context */
|
|
21
|
+
ratingContext?: RatingContext;
|
|
22
|
+
/** Resource Id */
|
|
23
|
+
resourceId?: string | null;
|
|
24
|
+
/**
|
|
25
|
+
* Rating Value
|
|
26
|
+
* @min 1
|
|
27
|
+
* @max 5
|
|
28
|
+
*/
|
|
29
|
+
rating?: number | null;
|
|
30
|
+
/** Published comments count */
|
|
31
|
+
publishedCommentCount?: number;
|
|
32
|
+
}
|
|
33
|
+
/** @oneof */
|
|
34
|
+
interface V1CommentResourceRatingOwnerOneOf {
|
|
35
|
+
/**
|
|
36
|
+
* Visitor Id
|
|
37
|
+
* @readonly
|
|
38
|
+
*/
|
|
39
|
+
visitorId?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Member Id
|
|
42
|
+
* @readonly
|
|
43
|
+
*/
|
|
44
|
+
memberId?: string | null;
|
|
45
|
+
}
|
|
46
|
+
interface RatingContext {
|
|
47
|
+
/**
|
|
48
|
+
* Context Application Definition Id
|
|
49
|
+
* @format GUID
|
|
50
|
+
*/
|
|
51
|
+
appDefId?: string | null;
|
|
52
|
+
/** Context Id */
|
|
53
|
+
contextId?: string | null;
|
|
54
|
+
/** Context Type */
|
|
55
|
+
contextType?: string | null;
|
|
56
|
+
}
|
|
57
|
+
interface CommentResourceRatingChanged {
|
|
58
|
+
/** Resource rating */
|
|
59
|
+
resourceRating?: V1CommentResourceRating;
|
|
60
|
+
}
|
|
61
|
+
interface CommentResourceRatingDeleted {
|
|
62
|
+
/** resource rating */
|
|
63
|
+
resourceRating?: V1CommentResourceRating;
|
|
64
|
+
}
|
|
65
|
+
interface V1CreateRatingRequest {
|
|
66
|
+
/** Resource rating to be created or updated */
|
|
67
|
+
resourceRating?: V1CommentResourceRating;
|
|
68
|
+
}
|
|
69
|
+
interface V1CreateRatingResponse {
|
|
70
|
+
/** Created/Updated resource rating */
|
|
71
|
+
resourceRating?: V1CommentResourceRating;
|
|
72
|
+
}
|
|
73
|
+
interface RemoveMyRatingRequest {
|
|
74
|
+
/** Rating context */
|
|
75
|
+
ratingContext?: RatingContext;
|
|
76
|
+
/** Resource Id */
|
|
77
|
+
resourceId: string | null;
|
|
78
|
+
}
|
|
79
|
+
interface RemoveMyRatingResponse {
|
|
80
|
+
}
|
|
81
|
+
interface V1GetMyRatingRequest {
|
|
82
|
+
/** Rating context */
|
|
83
|
+
ratingContext?: RatingContext;
|
|
84
|
+
/** Resource Id */
|
|
85
|
+
resourceId: string | null;
|
|
86
|
+
}
|
|
87
|
+
interface V1GetMyRatingResponse {
|
|
88
|
+
/** Current member/visitor resource rating */
|
|
89
|
+
resourceRating?: V1CommentResourceRating;
|
|
90
|
+
}
|
|
91
|
+
interface GetResourceSummaryRequest {
|
|
92
|
+
/** Rating context */
|
|
93
|
+
ratingContext?: RatingContext;
|
|
94
|
+
/** Resource Id */
|
|
95
|
+
resourceId: string | null;
|
|
96
|
+
}
|
|
97
|
+
interface GetResourceSummaryResponse {
|
|
98
|
+
/** Average rating score */
|
|
99
|
+
average?: number;
|
|
100
|
+
/** Total amount of ratings */
|
|
101
|
+
total?: number;
|
|
102
|
+
/** Breakdown of how many of each rating is there */
|
|
103
|
+
breakdown?: Record<number, number>;
|
|
104
|
+
}
|
|
105
|
+
interface MoveRatingRequest {
|
|
106
|
+
/** Context for the comment that is being moved */
|
|
107
|
+
moveContext?: MoveContext;
|
|
108
|
+
/** New resourceId to which the comment is being moved to */
|
|
109
|
+
newResourceId?: string;
|
|
110
|
+
/** New contextId to which the comment is being moved to */
|
|
111
|
+
newContextId?: string;
|
|
112
|
+
}
|
|
113
|
+
interface MoveContext {
|
|
114
|
+
/**
|
|
115
|
+
* Comment ID
|
|
116
|
+
* @format GUID
|
|
117
|
+
*/
|
|
118
|
+
commentId?: string;
|
|
119
|
+
/**
|
|
120
|
+
* MetaSite ID
|
|
121
|
+
* @format GUID
|
|
122
|
+
*/
|
|
123
|
+
metaSiteId?: string;
|
|
124
|
+
/**
|
|
125
|
+
* App ID
|
|
126
|
+
* @format GUID
|
|
127
|
+
*/
|
|
128
|
+
appDefId?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Context ID
|
|
131
|
+
* @maxLength 300
|
|
132
|
+
*/
|
|
133
|
+
contextId?: string;
|
|
134
|
+
/**
|
|
135
|
+
* Context type
|
|
136
|
+
* @maxLength 300
|
|
137
|
+
*/
|
|
138
|
+
contextType?: string;
|
|
139
|
+
/**
|
|
140
|
+
* Resource ID
|
|
141
|
+
* @maxLength 128
|
|
142
|
+
*/
|
|
143
|
+
resourceId?: string;
|
|
144
|
+
/** Member ID */
|
|
145
|
+
memberId?: string | null;
|
|
146
|
+
/** Visitor ID */
|
|
147
|
+
visitorId?: string | null;
|
|
148
|
+
}
|
|
149
|
+
interface MoveRatingResponse {
|
|
150
|
+
/** Moved resource rating */
|
|
151
|
+
resourceRating?: V1CommentResourceRating;
|
|
152
|
+
}
|
|
153
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
154
|
+
createdEvent?: EntityCreatedEvent;
|
|
155
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
156
|
+
deletedEvent?: EntityDeletedEvent;
|
|
157
|
+
actionEvent?: ActionEvent;
|
|
158
|
+
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
159
|
+
id?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
|
|
162
|
+
* For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
|
|
163
|
+
*/
|
|
164
|
+
entityFqdn?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Event action name, placed at the top level to make it easier for users to dispatch messages.
|
|
167
|
+
* For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
|
|
168
|
+
*/
|
|
169
|
+
slug?: string;
|
|
170
|
+
/** ID of the entity associated with the event. */
|
|
171
|
+
entityId?: string;
|
|
172
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
|
|
173
|
+
eventTime?: Date | null;
|
|
174
|
+
/**
|
|
175
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
176
|
+
* (for example, GDPR).
|
|
177
|
+
*/
|
|
178
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
179
|
+
/** If present, indicates the action that triggered the event. */
|
|
180
|
+
originatedFrom?: string | null;
|
|
181
|
+
/**
|
|
182
|
+
* 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.
|
|
183
|
+
* 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.
|
|
184
|
+
*/
|
|
185
|
+
entityEventSequence?: string | null;
|
|
186
|
+
}
|
|
187
|
+
/** @oneof */
|
|
188
|
+
interface DomainEventBodyOneOf {
|
|
189
|
+
createdEvent?: EntityCreatedEvent;
|
|
190
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
191
|
+
deletedEvent?: EntityDeletedEvent;
|
|
192
|
+
actionEvent?: ActionEvent;
|
|
193
|
+
}
|
|
194
|
+
interface EntityCreatedEvent {
|
|
195
|
+
entityAsJson?: string;
|
|
196
|
+
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
197
|
+
restoreInfo?: RestoreInfo;
|
|
198
|
+
}
|
|
199
|
+
interface RestoreInfo {
|
|
200
|
+
deletedDate?: Date | null;
|
|
201
|
+
}
|
|
202
|
+
interface EntityUpdatedEvent {
|
|
203
|
+
/**
|
|
204
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
205
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
206
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
207
|
+
*/
|
|
208
|
+
currentEntityAsJson?: string;
|
|
209
|
+
}
|
|
210
|
+
interface EntityDeletedEvent {
|
|
211
|
+
/** Entity that was deleted. */
|
|
212
|
+
deletedEntityAsJson?: string | null;
|
|
213
|
+
}
|
|
214
|
+
interface ActionEvent {
|
|
215
|
+
bodyAsJson?: string;
|
|
216
|
+
}
|
|
217
|
+
interface Empty {
|
|
218
|
+
}
|
|
219
|
+
interface MessageEnvelope {
|
|
220
|
+
/**
|
|
221
|
+
* App instance ID.
|
|
222
|
+
* @format GUID
|
|
223
|
+
*/
|
|
224
|
+
instanceId?: string | null;
|
|
225
|
+
/**
|
|
226
|
+
* Event type.
|
|
227
|
+
* @maxLength 150
|
|
228
|
+
*/
|
|
229
|
+
eventType?: string;
|
|
230
|
+
/** The identification type and identity data. */
|
|
231
|
+
identity?: IdentificationData;
|
|
232
|
+
/** Stringify payload. */
|
|
233
|
+
data?: string;
|
|
234
|
+
/** Details related to the account */
|
|
235
|
+
accountInfo?: AccountInfo;
|
|
236
|
+
}
|
|
237
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
238
|
+
/**
|
|
239
|
+
* ID of a site visitor that has not logged in to the site.
|
|
240
|
+
* @format GUID
|
|
241
|
+
*/
|
|
242
|
+
anonymousVisitorId?: string;
|
|
243
|
+
/**
|
|
244
|
+
* ID of a site visitor that has logged in to the site.
|
|
245
|
+
* @format GUID
|
|
246
|
+
*/
|
|
247
|
+
memberId?: string;
|
|
248
|
+
/**
|
|
249
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
250
|
+
* @format GUID
|
|
251
|
+
*/
|
|
252
|
+
wixUserId?: string;
|
|
253
|
+
/**
|
|
254
|
+
* ID of an app.
|
|
255
|
+
* @format GUID
|
|
256
|
+
*/
|
|
257
|
+
appId?: string;
|
|
258
|
+
/** @readonly */
|
|
259
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
260
|
+
}
|
|
261
|
+
/** @oneof */
|
|
262
|
+
interface IdentificationDataIdOneOf {
|
|
263
|
+
/**
|
|
264
|
+
* ID of a site visitor that has not logged in to the site.
|
|
265
|
+
* @format GUID
|
|
266
|
+
*/
|
|
267
|
+
anonymousVisitorId?: string;
|
|
268
|
+
/**
|
|
269
|
+
* ID of a site visitor that has logged in to the site.
|
|
270
|
+
* @format GUID
|
|
271
|
+
*/
|
|
272
|
+
memberId?: string;
|
|
273
|
+
/**
|
|
274
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
275
|
+
* @format GUID
|
|
276
|
+
*/
|
|
277
|
+
wixUserId?: string;
|
|
278
|
+
/**
|
|
279
|
+
* ID of an app.
|
|
280
|
+
* @format GUID
|
|
281
|
+
*/
|
|
282
|
+
appId?: string;
|
|
283
|
+
}
|
|
284
|
+
declare enum WebhookIdentityType {
|
|
285
|
+
UNKNOWN = "UNKNOWN",
|
|
286
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
287
|
+
MEMBER = "MEMBER",
|
|
288
|
+
WIX_USER = "WIX_USER",
|
|
289
|
+
APP = "APP"
|
|
290
|
+
}
|
|
291
|
+
/** @enumType */
|
|
292
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
293
|
+
interface AccountInfo {
|
|
294
|
+
/**
|
|
295
|
+
* ID of the Wix account associated with the event.
|
|
296
|
+
* @format GUID
|
|
297
|
+
*/
|
|
298
|
+
accountId?: string | null;
|
|
299
|
+
/**
|
|
300
|
+
* ID of the parent Wix account. Only included when accountId belongs to a child account.
|
|
301
|
+
* @format GUID
|
|
302
|
+
*/
|
|
303
|
+
parentAccountId?: string | null;
|
|
304
|
+
/**
|
|
305
|
+
* ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
|
|
306
|
+
* @format GUID
|
|
307
|
+
*/
|
|
308
|
+
siteId?: string | null;
|
|
309
|
+
}
|
|
310
|
+
interface CommentResourceRating extends CommentResourceRatingOwnerOneOf {
|
|
311
|
+
visitorId?: string | null;
|
|
312
|
+
memberId?: string | null;
|
|
313
|
+
/**
|
|
314
|
+
* @readonly
|
|
315
|
+
* @format GUID
|
|
316
|
+
*/
|
|
317
|
+
id?: string | null;
|
|
318
|
+
/** @format GUID */
|
|
319
|
+
appDefId?: string | null;
|
|
320
|
+
resourceId?: string | null;
|
|
321
|
+
/**
|
|
322
|
+
* @min 1
|
|
323
|
+
* @max 5
|
|
324
|
+
*/
|
|
325
|
+
rating?: number | null;
|
|
326
|
+
}
|
|
327
|
+
/** @oneof */
|
|
328
|
+
interface CommentResourceRatingOwnerOneOf {
|
|
329
|
+
visitorId?: string | null;
|
|
330
|
+
memberId?: string | null;
|
|
331
|
+
}
|
|
332
|
+
interface CreateRatingRequest {
|
|
333
|
+
resourceRating?: CommentResourceRating;
|
|
334
|
+
}
|
|
335
|
+
interface CreateRatingResponse {
|
|
336
|
+
resourceRating?: CommentResourceRating;
|
|
337
|
+
}
|
|
338
|
+
interface GetMyRatingRequest {
|
|
339
|
+
/** @format GUID */
|
|
340
|
+
appDefId?: string | null;
|
|
341
|
+
resourceId?: string | null;
|
|
342
|
+
}
|
|
343
|
+
interface GetMyRatingResponse {
|
|
344
|
+
resourceRating?: CommentResourceRating;
|
|
345
|
+
}
|
|
346
|
+
/** @docsIgnore */
|
|
347
|
+
type RemoveMyRatingApplicationErrors = {
|
|
348
|
+
code?: 'RATING_NOT_FOUND';
|
|
349
|
+
description?: string;
|
|
350
|
+
data?: Record<string, any>;
|
|
351
|
+
};
|
|
352
|
+
/** @docsIgnore */
|
|
353
|
+
type GetMyRatingApplicationErrors = {
|
|
354
|
+
code?: 'RATING_NOT_FOUND';
|
|
355
|
+
description?: string;
|
|
356
|
+
data?: Record<string, any>;
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
360
|
+
getUrl: (context: any) => string;
|
|
361
|
+
httpMethod: K;
|
|
362
|
+
path: string;
|
|
363
|
+
pathParams: M;
|
|
364
|
+
__requestType: T;
|
|
365
|
+
__originalRequestType: S;
|
|
366
|
+
__responseType: Q;
|
|
367
|
+
__originalResponseType: R;
|
|
368
|
+
};
|
|
369
|
+
declare function createRating(): __PublicMethodMetaInfo<'POST', {
|
|
370
|
+
resourceRatingResourceId: string;
|
|
371
|
+
}, V1CreateRatingRequest$1, V1CreateRatingRequest, V1CreateRatingResponse$1, V1CreateRatingResponse>;
|
|
372
|
+
declare function removeMyRating(): __PublicMethodMetaInfo<'DELETE', {
|
|
373
|
+
resourceId: string;
|
|
374
|
+
}, RemoveMyRatingRequest$1, RemoveMyRatingRequest, RemoveMyRatingResponse$1, RemoveMyRatingResponse>;
|
|
375
|
+
declare function getMyRating(): __PublicMethodMetaInfo<'GET', {
|
|
376
|
+
resourceId: string;
|
|
377
|
+
}, V1GetMyRatingRequest$1, V1GetMyRatingRequest, V1GetMyRatingResponse$1, V1GetMyRatingResponse>;
|
|
378
|
+
declare function getResourceSummary(): __PublicMethodMetaInfo<'GET', {
|
|
379
|
+
resourceId: string;
|
|
380
|
+
}, GetResourceSummaryRequest$1, GetResourceSummaryRequest, GetResourceSummaryResponse$1, GetResourceSummaryResponse>;
|
|
381
|
+
|
|
382
|
+
export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type CommentResourceRatingChanged as CommentResourceRatingChangedOriginal, type CommentResourceRatingDeleted as CommentResourceRatingDeletedOriginal, type CommentResourceRating as CommentResourceRatingOriginal, type CommentResourceRatingOwnerOneOf as CommentResourceRatingOwnerOneOfOriginal, type CreateRatingRequest as CreateRatingRequestOriginal, type CreateRatingResponse as CreateRatingResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type Empty as EmptyOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GetMyRatingApplicationErrors as GetMyRatingApplicationErrorsOriginal, type GetMyRatingRequest as GetMyRatingRequestOriginal, type GetMyRatingResponse as GetMyRatingResponseOriginal, type GetResourceSummaryRequest as GetResourceSummaryRequestOriginal, type GetResourceSummaryResponse as GetResourceSummaryResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MoveContext as MoveContextOriginal, type MoveRatingRequest as MoveRatingRequestOriginal, type MoveRatingResponse as MoveRatingResponseOriginal, type RatingContext as RatingContextOriginal, type RemoveMyRatingApplicationErrors as RemoveMyRatingApplicationErrorsOriginal, type RemoveMyRatingRequest as RemoveMyRatingRequestOriginal, type RemoveMyRatingResponse as RemoveMyRatingResponseOriginal, type RestoreInfo as RestoreInfoOriginal, type V1CommentResourceRating as V1CommentResourceRatingOriginal, type V1CommentResourceRatingOwnerOneOf as V1CommentResourceRatingOwnerOneOfOriginal, type V1CreateRatingRequest as V1CreateRatingRequestOriginal, type V1CreateRatingResponse as V1CreateRatingResponseOriginal, type V1GetMyRatingRequest as V1GetMyRatingRequestOriginal, type V1GetMyRatingResponse as V1GetMyRatingResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, createRating, getMyRating, getResourceSummary, removeMyRating };
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// meta.ts
|
|
21
|
+
var meta_exports = {};
|
|
22
|
+
__export(meta_exports, {
|
|
23
|
+
WebhookIdentityTypeOriginal: () => WebhookIdentityType,
|
|
24
|
+
createRating: () => createRating2,
|
|
25
|
+
getMyRating: () => getMyRating2,
|
|
26
|
+
getResourceSummary: () => getResourceSummary2,
|
|
27
|
+
removeMyRating: () => removeMyRating2
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(meta_exports);
|
|
30
|
+
|
|
31
|
+
// src/comments-resource-v1-rating-ratings.http.ts
|
|
32
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
33
|
+
var import_float = require("@wix/sdk-runtime/transformations/float");
|
|
34
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
35
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
36
|
+
function resolveWixCommentsRatingsV1CommentsRatingsUrl(opts) {
|
|
37
|
+
const domainToMappings = {
|
|
38
|
+
_: [
|
|
39
|
+
{
|
|
40
|
+
srcPath: "/_api/comments-ratings",
|
|
41
|
+
destPath: ""
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"*.dev.wix-code.com": [
|
|
45
|
+
{
|
|
46
|
+
srcPath: "/_api/comments-ratings",
|
|
47
|
+
destPath: ""
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"dev._base_domain_": [
|
|
51
|
+
{
|
|
52
|
+
srcPath: "/_api/comments-ratings",
|
|
53
|
+
destPath: ""
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
};
|
|
57
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
58
|
+
}
|
|
59
|
+
var PACKAGE_NAME = "@wix/auto_sdk_comments_ratings";
|
|
60
|
+
function createRating(payload) {
|
|
61
|
+
function __createRating({ host }) {
|
|
62
|
+
const metadata = {
|
|
63
|
+
entityFqdn: "wix.comments.resource.v1.rating",
|
|
64
|
+
method: "POST",
|
|
65
|
+
methodFqn: "wix.comments.ratings.v1.CommentsRatings.CreateRating",
|
|
66
|
+
packageName: PACKAGE_NAME,
|
|
67
|
+
migrationOptions: {
|
|
68
|
+
optInTransformResponse: true
|
|
69
|
+
},
|
|
70
|
+
url: resolveWixCommentsRatingsV1CommentsRatingsUrl({
|
|
71
|
+
protoPath: "/v1/comment/resource/{resourceRating.resourceId}/rating",
|
|
72
|
+
data: payload,
|
|
73
|
+
host
|
|
74
|
+
}),
|
|
75
|
+
data: payload
|
|
76
|
+
};
|
|
77
|
+
return metadata;
|
|
78
|
+
}
|
|
79
|
+
return __createRating;
|
|
80
|
+
}
|
|
81
|
+
function removeMyRating(payload) {
|
|
82
|
+
function __removeMyRating({ host }) {
|
|
83
|
+
const metadata = {
|
|
84
|
+
entityFqdn: "wix.comments.resource.v1.rating",
|
|
85
|
+
method: "DELETE",
|
|
86
|
+
methodFqn: "wix.comments.ratings.v1.CommentsRatings.RemoveMyRating",
|
|
87
|
+
packageName: PACKAGE_NAME,
|
|
88
|
+
migrationOptions: {
|
|
89
|
+
optInTransformResponse: true
|
|
90
|
+
},
|
|
91
|
+
url: resolveWixCommentsRatingsV1CommentsRatingsUrl({
|
|
92
|
+
protoPath: "/v1/comment/resource/{resourceId}/rating/my",
|
|
93
|
+
data: payload,
|
|
94
|
+
host
|
|
95
|
+
}),
|
|
96
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
97
|
+
};
|
|
98
|
+
return metadata;
|
|
99
|
+
}
|
|
100
|
+
return __removeMyRating;
|
|
101
|
+
}
|
|
102
|
+
function getMyRating(payload) {
|
|
103
|
+
function __getMyRating({ host }) {
|
|
104
|
+
const metadata = {
|
|
105
|
+
entityFqdn: "wix.comments.resource.v1.rating",
|
|
106
|
+
method: "GET",
|
|
107
|
+
methodFqn: "wix.comments.ratings.v1.CommentsRatings.GetMyRating",
|
|
108
|
+
packageName: PACKAGE_NAME,
|
|
109
|
+
migrationOptions: {
|
|
110
|
+
optInTransformResponse: true
|
|
111
|
+
},
|
|
112
|
+
url: resolveWixCommentsRatingsV1CommentsRatingsUrl({
|
|
113
|
+
protoPath: "/v1/comment/resource/{resourceId}/rating/my",
|
|
114
|
+
data: payload,
|
|
115
|
+
host
|
|
116
|
+
}),
|
|
117
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
118
|
+
};
|
|
119
|
+
return metadata;
|
|
120
|
+
}
|
|
121
|
+
return __getMyRating;
|
|
122
|
+
}
|
|
123
|
+
function getResourceSummary(payload) {
|
|
124
|
+
function __getResourceSummary({ host }) {
|
|
125
|
+
const metadata = {
|
|
126
|
+
entityFqdn: "wix.comments.resource.v1.rating",
|
|
127
|
+
method: "GET",
|
|
128
|
+
methodFqn: "wix.comments.ratings.v1.CommentsRatings.GetResourceSummary",
|
|
129
|
+
packageName: PACKAGE_NAME,
|
|
130
|
+
migrationOptions: {
|
|
131
|
+
optInTransformResponse: true
|
|
132
|
+
},
|
|
133
|
+
url: resolveWixCommentsRatingsV1CommentsRatingsUrl({
|
|
134
|
+
protoPath: "/v1/comment/resource/{resourceId}/summary",
|
|
135
|
+
data: payload,
|
|
136
|
+
host
|
|
137
|
+
}),
|
|
138
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
139
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
140
|
+
{
|
|
141
|
+
transformFn: import_float.transformRESTFloatToSDKFloat,
|
|
142
|
+
paths: [{ path: "average" }]
|
|
143
|
+
}
|
|
144
|
+
])
|
|
145
|
+
};
|
|
146
|
+
return metadata;
|
|
147
|
+
}
|
|
148
|
+
return __getResourceSummary;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// src/comments-resource-v1-rating-ratings.types.ts
|
|
152
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
153
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
154
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
155
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
156
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
157
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
158
|
+
return WebhookIdentityType2;
|
|
159
|
+
})(WebhookIdentityType || {});
|
|
160
|
+
|
|
161
|
+
// src/comments-resource-v1-rating-ratings.meta.ts
|
|
162
|
+
function createRating2() {
|
|
163
|
+
const payload = {
|
|
164
|
+
resourceRating: { resourceId: ":resourceRatingResourceId" }
|
|
165
|
+
};
|
|
166
|
+
const getRequestOptions = createRating(payload);
|
|
167
|
+
const getUrl = (context) => {
|
|
168
|
+
const { url } = getRequestOptions(context);
|
|
169
|
+
return url;
|
|
170
|
+
};
|
|
171
|
+
return {
|
|
172
|
+
getUrl,
|
|
173
|
+
httpMethod: "POST",
|
|
174
|
+
path: "/v1/comment/resource/{resourceRating.resourceId}/rating",
|
|
175
|
+
pathParams: { resourceRatingResourceId: "resourceRatingResourceId" },
|
|
176
|
+
__requestType: null,
|
|
177
|
+
__originalRequestType: null,
|
|
178
|
+
__responseType: null,
|
|
179
|
+
__originalResponseType: null
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
function removeMyRating2() {
|
|
183
|
+
const payload = { resourceId: ":resourceId" };
|
|
184
|
+
const getRequestOptions = removeMyRating(payload);
|
|
185
|
+
const getUrl = (context) => {
|
|
186
|
+
const { url } = getRequestOptions(context);
|
|
187
|
+
return url;
|
|
188
|
+
};
|
|
189
|
+
return {
|
|
190
|
+
getUrl,
|
|
191
|
+
httpMethod: "DELETE",
|
|
192
|
+
path: "/v1/comment/resource/{resourceId}/rating/my",
|
|
193
|
+
pathParams: { resourceId: "resourceId" },
|
|
194
|
+
__requestType: null,
|
|
195
|
+
__originalRequestType: null,
|
|
196
|
+
__responseType: null,
|
|
197
|
+
__originalResponseType: null
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
function getMyRating2() {
|
|
201
|
+
const payload = { resourceId: ":resourceId" };
|
|
202
|
+
const getRequestOptions = getMyRating(payload);
|
|
203
|
+
const getUrl = (context) => {
|
|
204
|
+
const { url } = getRequestOptions(context);
|
|
205
|
+
return url;
|
|
206
|
+
};
|
|
207
|
+
return {
|
|
208
|
+
getUrl,
|
|
209
|
+
httpMethod: "GET",
|
|
210
|
+
path: "/v1/comment/resource/{resourceId}/rating/my",
|
|
211
|
+
pathParams: { resourceId: "resourceId" },
|
|
212
|
+
__requestType: null,
|
|
213
|
+
__originalRequestType: null,
|
|
214
|
+
__responseType: null,
|
|
215
|
+
__originalResponseType: null
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
function getResourceSummary2() {
|
|
219
|
+
const payload = { resourceId: ":resourceId" };
|
|
220
|
+
const getRequestOptions = getResourceSummary(payload);
|
|
221
|
+
const getUrl = (context) => {
|
|
222
|
+
const { url } = getRequestOptions(context);
|
|
223
|
+
return url;
|
|
224
|
+
};
|
|
225
|
+
return {
|
|
226
|
+
getUrl,
|
|
227
|
+
httpMethod: "GET",
|
|
228
|
+
path: "/v1/comment/resource/{resourceId}/summary",
|
|
229
|
+
pathParams: { resourceId: "resourceId" },
|
|
230
|
+
__requestType: null,
|
|
231
|
+
__originalRequestType: null,
|
|
232
|
+
__responseType: null,
|
|
233
|
+
__originalResponseType: null
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
237
|
+
0 && (module.exports = {
|
|
238
|
+
WebhookIdentityTypeOriginal,
|
|
239
|
+
createRating,
|
|
240
|
+
getMyRating,
|
|
241
|
+
getResourceSummary,
|
|
242
|
+
removeMyRating
|
|
243
|
+
});
|
|
244
|
+
//# sourceMappingURL=meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../meta.ts","../../../src/comments-resource-v1-rating-ratings.http.ts","../../../src/comments-resource-v1-rating-ratings.types.ts","../../../src/comments-resource-v1-rating-ratings.meta.ts"],"sourcesContent":["export * from './src/comments-resource-v1-rating-ratings.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCommentsRatingsV1CommentsRatingsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/comments-ratings',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/comments-ratings',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/comments-ratings',\n destPath: '',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_comments_ratings';\n\n/** Creates resource rating, if member/visitor has already created an rating it will be updated with provided value */\nexport function createRating(payload: object): RequestOptionsFactory<any> {\n function __createRating({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.comments.resource.v1.rating',\n method: 'POST' as any,\n methodFqn: 'wix.comments.ratings.v1.CommentsRatings.CreateRating',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCommentsRatingsV1CommentsRatingsUrl({\n protoPath: '/v1/comment/resource/{resourceRating.resourceId}/rating',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __createRating;\n}\n\n/** Removes rating for current caller */\nexport function removeMyRating(payload: object): RequestOptionsFactory<any> {\n function __removeMyRating({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.comments.resource.v1.rating',\n method: 'DELETE' as any,\n methodFqn: 'wix.comments.ratings.v1.CommentsRatings.RemoveMyRating',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCommentsRatingsV1CommentsRatingsUrl({\n protoPath: '/v1/comment/resource/{resourceId}/rating/my',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __removeMyRating;\n}\n\n/** Returns rating for current caller */\nexport function getMyRating(payload: object): RequestOptionsFactory<any> {\n function __getMyRating({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.comments.resource.v1.rating',\n method: 'GET' as any,\n methodFqn: 'wix.comments.ratings.v1.CommentsRatings.GetMyRating',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCommentsRatingsV1CommentsRatingsUrl({\n protoPath: '/v1/comment/resource/{resourceId}/rating/my',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __getMyRating;\n}\n\nexport function getResourceSummary(\n payload: object\n): RequestOptionsFactory<any> {\n function __getResourceSummary({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.comments.resource.v1.rating',\n method: 'GET' as any,\n methodFqn: 'wix.comments.ratings.v1.CommentsRatings.GetResourceSummary',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCommentsRatingsV1CommentsRatingsUrl({\n protoPath: '/v1/comment/resource/{resourceId}/summary',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [{ path: 'average' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getResourceSummary;\n}\n","export interface V1CommentResourceRating\n extends V1CommentResourceRatingOwnerOneOf {\n /**\n * Visitor Id\n * @readonly\n */\n visitorId?: string | null;\n /**\n * Member Id\n * @readonly\n */\n memberId?: string | null;\n /**\n * @readonly\n * @format GUID\n */\n id?: string | null;\n /** Rating Context */\n ratingContext?: RatingContext;\n /** Resource Id */\n resourceId?: string | null;\n /**\n * Rating Value\n * @min 1\n * @max 5\n */\n rating?: number | null;\n /** Published comments count */\n publishedCommentCount?: number;\n}\n\n/** @oneof */\nexport interface V1CommentResourceRatingOwnerOneOf {\n /**\n * Visitor Id\n * @readonly\n */\n visitorId?: string | null;\n /**\n * Member Id\n * @readonly\n */\n memberId?: string | null;\n}\n\nexport interface RatingContext {\n /**\n * Context Application Definition Id\n * @format GUID\n */\n appDefId?: string | null;\n /** Context Id */\n contextId?: string | null;\n /** Context Type */\n contextType?: string | null;\n}\n\nexport interface CommentResourceRatingChanged {\n /** Resource rating */\n resourceRating?: V1CommentResourceRating;\n}\n\nexport interface CommentResourceRatingDeleted {\n /** resource rating */\n resourceRating?: V1CommentResourceRating;\n}\n\nexport interface V1CreateRatingRequest {\n /** Resource rating to be created or updated */\n resourceRating?: V1CommentResourceRating;\n}\n\nexport interface V1CreateRatingResponse {\n /** Created/Updated resource rating */\n resourceRating?: V1CommentResourceRating;\n}\n\nexport interface RemoveMyRatingRequest {\n /** Rating context */\n ratingContext?: RatingContext;\n /** Resource Id */\n resourceId: string | null;\n}\n\nexport interface RemoveMyRatingResponse {}\n\nexport interface V1GetMyRatingRequest {\n /** Rating context */\n ratingContext?: RatingContext;\n /** Resource Id */\n resourceId: string | null;\n}\n\nexport interface V1GetMyRatingResponse {\n /** Current member/visitor resource rating */\n resourceRating?: V1CommentResourceRating;\n}\n\nexport interface GetResourceSummaryRequest {\n /** Rating context */\n ratingContext?: RatingContext;\n /** Resource Id */\n resourceId: string | null;\n}\n\nexport interface GetResourceSummaryResponse {\n /** Average rating score */\n average?: number;\n /** Total amount of ratings */\n total?: number;\n /** Breakdown of how many of each rating is there */\n breakdown?: Record<number, number>;\n}\n\nexport interface MoveRatingRequest {\n /** Context for the comment that is being moved */\n moveContext?: MoveContext;\n /** New resourceId to which the comment is being moved to */\n newResourceId?: string;\n /** New contextId to which the comment is being moved to */\n newContextId?: string;\n}\n\nexport interface MoveContext {\n /**\n * Comment ID\n * @format GUID\n */\n commentId?: string;\n /**\n * MetaSite ID\n * @format GUID\n */\n metaSiteId?: string;\n /**\n * App ID\n * @format GUID\n */\n appDefId?: string;\n /**\n * Context ID\n * @maxLength 300\n */\n contextId?: string;\n /**\n * Context type\n * @maxLength 300\n */\n contextType?: string;\n /**\n * Resource ID\n * @maxLength 128\n */\n resourceId?: string;\n /** Member ID */\n memberId?: string | null;\n /** Visitor ID */\n visitorId?: string | null;\n}\n\nexport interface MoveRatingResponse {\n /** Moved resource rating */\n resourceRating?: V1CommentResourceRating;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * 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.\n * 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.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entityAsJson?: string;\n /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */\n restoreInfo?: RestoreInfo;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntityAsJson?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntityAsJson?: string | null;\n}\n\nexport interface ActionEvent {\n bodyAsJson?: string;\n}\n\nexport interface Empty {}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface CommentResourceRating extends CommentResourceRatingOwnerOneOf {\n visitorId?: string | null;\n memberId?: string | null;\n /**\n * @readonly\n * @format GUID\n */\n id?: string | null;\n /** @format GUID */\n appDefId?: string | null;\n resourceId?: string | null;\n /**\n * @min 1\n * @max 5\n */\n rating?: number | null;\n}\n\n/** @oneof */\nexport interface CommentResourceRatingOwnerOneOf {\n visitorId?: string | null;\n memberId?: string | null;\n}\n\nexport interface CreateRatingRequest {\n resourceRating?: CommentResourceRating;\n}\n\nexport interface CreateRatingResponse {\n resourceRating?: CommentResourceRating;\n}\n\nexport interface GetMyRatingRequest {\n /** @format GUID */\n appDefId?: string | null;\n resourceId?: string | null;\n}\n\nexport interface GetMyRatingResponse {\n resourceRating?: CommentResourceRating;\n}\n\n/** @docsIgnore */\nexport type RemoveMyRatingApplicationErrors = {\n code?: 'RATING_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type GetMyRatingApplicationErrors = {\n code?: 'RATING_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n};\n","import * as ambassadorWixCommentsResourceV1Rating from './comments-resource-v1-rating-ratings.http.js';\nimport * as ambassadorWixCommentsResourceV1RatingTypes from './comments-resource-v1-rating-ratings.types.js';\nimport * as ambassadorWixCommentsResourceV1RatingUniversalTypes from './comments-resource-v1-rating-ratings.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function createRating(): __PublicMethodMetaInfo<\n 'POST',\n { resourceRatingResourceId: string },\n ambassadorWixCommentsResourceV1RatingUniversalTypes.V1CreateRatingRequest,\n ambassadorWixCommentsResourceV1RatingTypes.V1CreateRatingRequest,\n ambassadorWixCommentsResourceV1RatingUniversalTypes.V1CreateRatingResponse,\n ambassadorWixCommentsResourceV1RatingTypes.V1CreateRatingResponse\n> {\n const payload = {\n resourceRating: { resourceId: ':resourceRatingResourceId' },\n } as any;\n\n const getRequestOptions =\n ambassadorWixCommentsResourceV1Rating.createRating(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/comment/resource/{resourceRating.resourceId}/rating',\n pathParams: { resourceRatingResourceId: 'resourceRatingResourceId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function removeMyRating(): __PublicMethodMetaInfo<\n 'DELETE',\n { resourceId: string },\n ambassadorWixCommentsResourceV1RatingUniversalTypes.RemoveMyRatingRequest,\n ambassadorWixCommentsResourceV1RatingTypes.RemoveMyRatingRequest,\n ambassadorWixCommentsResourceV1RatingUniversalTypes.RemoveMyRatingResponse,\n ambassadorWixCommentsResourceV1RatingTypes.RemoveMyRatingResponse\n> {\n const payload = { resourceId: ':resourceId' } as any;\n\n const getRequestOptions =\n ambassadorWixCommentsResourceV1Rating.removeMyRating(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'DELETE',\n path: '/v1/comment/resource/{resourceId}/rating/my',\n pathParams: { resourceId: 'resourceId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getMyRating(): __PublicMethodMetaInfo<\n 'GET',\n { resourceId: string },\n ambassadorWixCommentsResourceV1RatingUniversalTypes.V1GetMyRatingRequest,\n ambassadorWixCommentsResourceV1RatingTypes.V1GetMyRatingRequest,\n ambassadorWixCommentsResourceV1RatingUniversalTypes.V1GetMyRatingResponse,\n ambassadorWixCommentsResourceV1RatingTypes.V1GetMyRatingResponse\n> {\n const payload = { resourceId: ':resourceId' } as any;\n\n const getRequestOptions =\n ambassadorWixCommentsResourceV1Rating.getMyRating(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/comment/resource/{resourceId}/rating/my',\n pathParams: { resourceId: 'resourceId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getResourceSummary(): __PublicMethodMetaInfo<\n 'GET',\n { resourceId: string },\n ambassadorWixCommentsResourceV1RatingUniversalTypes.GetResourceSummaryRequest,\n ambassadorWixCommentsResourceV1RatingTypes.GetResourceSummaryRequest,\n ambassadorWixCommentsResourceV1RatingUniversalTypes.GetResourceSummaryResponse,\n ambassadorWixCommentsResourceV1RatingTypes.GetResourceSummaryResponse\n> {\n const payload = { resourceId: ':resourceId' } as any;\n\n const getRequestOptions =\n ambassadorWixCommentsResourceV1Rating.getResourceSummary(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/comment/resource/{resourceId}/summary',\n pathParams: { resourceId: 'resourceId' },\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport {\n V1CommentResourceRating as V1CommentResourceRatingOriginal,\n V1CommentResourceRatingOwnerOneOf as V1CommentResourceRatingOwnerOneOfOriginal,\n RatingContext as RatingContextOriginal,\n CommentResourceRatingChanged as CommentResourceRatingChangedOriginal,\n CommentResourceRatingDeleted as CommentResourceRatingDeletedOriginal,\n V1CreateRatingRequest as V1CreateRatingRequestOriginal,\n V1CreateRatingResponse as V1CreateRatingResponseOriginal,\n RemoveMyRatingRequest as RemoveMyRatingRequestOriginal,\n RemoveMyRatingResponse as RemoveMyRatingResponseOriginal,\n V1GetMyRatingRequest as V1GetMyRatingRequestOriginal,\n V1GetMyRatingResponse as V1GetMyRatingResponseOriginal,\n GetResourceSummaryRequest as GetResourceSummaryRequestOriginal,\n GetResourceSummaryResponse as GetResourceSummaryResponseOriginal,\n MoveRatingRequest as MoveRatingRequestOriginal,\n MoveContext as MoveContextOriginal,\n MoveRatingResponse as MoveRatingResponseOriginal,\n DomainEvent as DomainEventOriginal,\n DomainEventBodyOneOf as DomainEventBodyOneOfOriginal,\n EntityCreatedEvent as EntityCreatedEventOriginal,\n RestoreInfo as RestoreInfoOriginal,\n EntityUpdatedEvent as EntityUpdatedEventOriginal,\n EntityDeletedEvent as EntityDeletedEventOriginal,\n ActionEvent as ActionEventOriginal,\n Empty as EmptyOriginal,\n MessageEnvelope as MessageEnvelopeOriginal,\n IdentificationData as IdentificationDataOriginal,\n IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal,\n WebhookIdentityType as WebhookIdentityTypeOriginal,\n WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal,\n AccountInfo as AccountInfoOriginal,\n CommentResourceRating as CommentResourceRatingOriginal,\n CommentResourceRatingOwnerOneOf as CommentResourceRatingOwnerOneOfOriginal,\n CreateRatingRequest as CreateRatingRequestOriginal,\n CreateRatingResponse as CreateRatingResponseOriginal,\n GetMyRatingRequest as GetMyRatingRequestOriginal,\n GetMyRatingResponse as GetMyRatingResponseOriginal,\n RemoveMyRatingApplicationErrors as RemoveMyRatingApplicationErrorsOriginal,\n GetMyRatingApplicationErrors as GetMyRatingApplicationErrorsOriginal,\n} from './comments-resource-v1-rating-ratings.types.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,sBAAAA;AAAA,EAAA,mBAAAC;AA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ACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,EAAE,YAAY,aAAa;AAAA,IACvC,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["createRating","getMyRating","getResourceSummary","removeMyRating","import_rest_modules","payload","WebhookIdentityType","createRating","removeMyRating","getMyRating","getResourceSummary"]}
|