@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.
Files changed (39) hide show
  1. package/build/cjs/index.d.ts +50 -0
  2. package/build/cjs/index.js +366 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +521 -0
  5. package/build/cjs/index.typings.js +284 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +382 -0
  8. package/build/cjs/meta.js +244 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/es/index.d.mts +50 -0
  11. package/build/es/index.mjs +336 -0
  12. package/build/es/index.mjs.map +1 -0
  13. package/build/es/index.typings.d.mts +521 -0
  14. package/build/es/index.typings.mjs +256 -0
  15. package/build/es/index.typings.mjs.map +1 -0
  16. package/build/es/meta.d.mts +382 -0
  17. package/build/es/meta.mjs +213 -0
  18. package/build/es/meta.mjs.map +1 -0
  19. package/build/es/package.json +3 -0
  20. package/build/internal/cjs/index.d.ts +50 -0
  21. package/build/internal/cjs/index.js +366 -0
  22. package/build/internal/cjs/index.js.map +1 -0
  23. package/build/internal/cjs/index.typings.d.ts +521 -0
  24. package/build/internal/cjs/index.typings.js +284 -0
  25. package/build/internal/cjs/index.typings.js.map +1 -0
  26. package/build/internal/cjs/meta.d.ts +382 -0
  27. package/build/internal/cjs/meta.js +244 -0
  28. package/build/internal/cjs/meta.js.map +1 -0
  29. package/build/internal/es/index.d.mts +50 -0
  30. package/build/internal/es/index.mjs +336 -0
  31. package/build/internal/es/index.mjs.map +1 -0
  32. package/build/internal/es/index.typings.d.mts +521 -0
  33. package/build/internal/es/index.typings.mjs +256 -0
  34. package/build/internal/es/index.typings.mjs.map +1 -0
  35. package/build/internal/es/meta.d.mts +382 -0
  36. package/build/internal/es/meta.mjs +213 -0
  37. package/build/internal/es/meta.mjs.map +1 -0
  38. package/meta/package.json +3 -0
  39. package/package.json +54 -0
@@ -0,0 +1,50 @@
1
+ import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
2
+ import { CreateRatingOptions, V1CreateRatingResponse, RemoveMyRatingOptions, RemoveMyRatingApplicationErrors, GetMyRatingOptions, V1GetMyRatingResponse, GetMyRatingApplicationErrors, GetResourceSummaryOptions, GetResourceSummaryResponse, RatingCommentResourceRatingChangedEnvelope, RatingCommentResourceRatingDeletedEnvelope } from './index.typings.js';
3
+ export { AccountInfo, AccountInfoMetadata, ActionEvent, BaseEventMetadata, CommentResourceRating, CommentResourceRatingChanged, CommentResourceRatingDeleted, CommentResourceRatingOwnerOneOf, CreateRatingRequest, CreateRatingResponse, DomainEvent, DomainEventBodyOneOf, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, GetMyRatingRequest, GetMyRatingResponse, GetResourceSummaryRequest, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, MoveContext, MoveRatingRequest, MoveRatingResponse, RatingContext, RemoveMyRatingRequest, RemoveMyRatingResponse, RestoreInfo, V1CommentResourceRating, V1CommentResourceRatingOwnerOneOf, V1CreateRatingRequest, V1GetMyRatingRequest, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
4
+
5
+ declare function createRating$1(httpClient: HttpClient): CreateRatingSignature;
6
+ interface CreateRatingSignature {
7
+ /**
8
+ * Creates resource rating, if member/visitor has already created an rating it will be updated with provided value
9
+ * @param - Resource Id
10
+ */
11
+ (resourceId: string, options?: NonNullablePaths<CreateRatingOptions, `resourceRating.rating` | `resourceRating.ratingContext.appDefId` | `resourceRating.ratingContext.contextId`, 4>): Promise<NonNullablePaths<V1CreateRatingResponse, `resourceRating.publishedCommentCount`, 3>>;
12
+ }
13
+ declare function removeMyRating$1(httpClient: HttpClient): RemoveMyRatingSignature;
14
+ interface RemoveMyRatingSignature {
15
+ /**
16
+ * Removes rating for current caller
17
+ * @param - Resource Id
18
+ */
19
+ (resourceId: string, options?: NonNullablePaths<RemoveMyRatingOptions, `ratingContext.appDefId` | `ratingContext.contextId`, 3>): Promise<void & {
20
+ __applicationErrorsType?: RemoveMyRatingApplicationErrors;
21
+ }>;
22
+ }
23
+ declare function getMyRating$1(httpClient: HttpClient): GetMyRatingSignature;
24
+ interface GetMyRatingSignature {
25
+ /**
26
+ * Returns rating for current caller
27
+ * @param - Resource Id
28
+ */
29
+ (resourceId: string, options?: NonNullablePaths<GetMyRatingOptions, `ratingContext.appDefId` | `ratingContext.contextId`, 3>): Promise<NonNullablePaths<V1GetMyRatingResponse, `resourceRating.publishedCommentCount`, 3> & {
30
+ __applicationErrorsType?: GetMyRatingApplicationErrors;
31
+ }>;
32
+ }
33
+ declare function getResourceSummary$1(httpClient: HttpClient): GetResourceSummarySignature;
34
+ interface GetResourceSummarySignature {
35
+ /** @param - Resource Id */
36
+ (resourceId: string, options?: NonNullablePaths<GetResourceSummaryOptions, `ratingContext.appDefId` | `ratingContext.contextId`, 3>): Promise<NonNullablePaths<GetResourceSummaryResponse, `average` | `total`, 2>>;
37
+ }
38
+ declare const onRatingCommentResourceRatingChanged$1: EventDefinition<RatingCommentResourceRatingChangedEnvelope, "wix.comments.resource.v1.rating_comment_resource_rating_changed">;
39
+ declare const onRatingCommentResourceRatingDeleted$1: EventDefinition<RatingCommentResourceRatingDeletedEnvelope, "wix.comments.resource.v1.rating_comment_resource_rating_deleted">;
40
+
41
+ declare const createRating: MaybeContext<BuildRESTFunction<typeof createRating$1> & typeof createRating$1>;
42
+ declare const removeMyRating: MaybeContext<BuildRESTFunction<typeof removeMyRating$1> & typeof removeMyRating$1>;
43
+ declare const getMyRating: MaybeContext<BuildRESTFunction<typeof getMyRating$1> & typeof getMyRating$1>;
44
+ declare const getResourceSummary: MaybeContext<BuildRESTFunction<typeof getResourceSummary$1> & typeof getResourceSummary$1>;
45
+ /** */
46
+ declare const onRatingCommentResourceRatingChanged: BuildEventDefinition<typeof onRatingCommentResourceRatingChanged$1> & typeof onRatingCommentResourceRatingChanged$1;
47
+ /** */
48
+ declare const onRatingCommentResourceRatingDeleted: BuildEventDefinition<typeof onRatingCommentResourceRatingDeleted$1> & typeof onRatingCommentResourceRatingDeleted$1;
49
+
50
+ export { CreateRatingOptions, GetMyRatingApplicationErrors, GetMyRatingOptions, GetResourceSummaryOptions, GetResourceSummaryResponse, RatingCommentResourceRatingChangedEnvelope, RatingCommentResourceRatingDeletedEnvelope, RemoveMyRatingApplicationErrors, RemoveMyRatingOptions, V1CreateRatingResponse, V1GetMyRatingResponse, createRating, getMyRating, getResourceSummary, onRatingCommentResourceRatingChanged, onRatingCommentResourceRatingDeleted, removeMyRating };
@@ -0,0 +1,366 @@
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
+ // index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ WebhookIdentityType: () => WebhookIdentityType,
24
+ createRating: () => createRating4,
25
+ getMyRating: () => getMyRating4,
26
+ getResourceSummary: () => getResourceSummary4,
27
+ onRatingCommentResourceRatingChanged: () => onRatingCommentResourceRatingChanged2,
28
+ onRatingCommentResourceRatingDeleted: () => onRatingCommentResourceRatingDeleted2,
29
+ removeMyRating: () => removeMyRating4
30
+ });
31
+ module.exports = __toCommonJS(index_exports);
32
+
33
+ // src/comments-resource-v1-rating-ratings.public.ts
34
+ var import_rename_all_nested_keys2 = require("@wix/sdk-runtime/rename-all-nested-keys");
35
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
36
+ var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
37
+ var import_sdk_types = require("@wix/sdk-types");
38
+
39
+ // src/comments-resource-v1-rating-ratings.universal.ts
40
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
41
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
42
+
43
+ // src/comments-resource-v1-rating-ratings.http.ts
44
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
45
+ var import_float = require("@wix/sdk-runtime/transformations/float");
46
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
47
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
48
+ function resolveWixCommentsRatingsV1CommentsRatingsUrl(opts) {
49
+ const domainToMappings = {
50
+ _: [
51
+ {
52
+ srcPath: "/_api/comments-ratings",
53
+ destPath: ""
54
+ }
55
+ ],
56
+ "*.dev.wix-code.com": [
57
+ {
58
+ srcPath: "/_api/comments-ratings",
59
+ destPath: ""
60
+ }
61
+ ],
62
+ "dev._base_domain_": [
63
+ {
64
+ srcPath: "/_api/comments-ratings",
65
+ destPath: ""
66
+ }
67
+ ]
68
+ };
69
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
70
+ }
71
+ var PACKAGE_NAME = "@wix/auto_sdk_comments_ratings";
72
+ function createRating(payload) {
73
+ function __createRating({ host }) {
74
+ const metadata = {
75
+ entityFqdn: "wix.comments.resource.v1.rating",
76
+ method: "POST",
77
+ methodFqn: "wix.comments.ratings.v1.CommentsRatings.CreateRating",
78
+ packageName: PACKAGE_NAME,
79
+ migrationOptions: {
80
+ optInTransformResponse: true
81
+ },
82
+ url: resolveWixCommentsRatingsV1CommentsRatingsUrl({
83
+ protoPath: "/v1/comment/resource/{resourceRating.resourceId}/rating",
84
+ data: payload,
85
+ host
86
+ }),
87
+ data: payload
88
+ };
89
+ return metadata;
90
+ }
91
+ return __createRating;
92
+ }
93
+ function removeMyRating(payload) {
94
+ function __removeMyRating({ host }) {
95
+ const metadata = {
96
+ entityFqdn: "wix.comments.resource.v1.rating",
97
+ method: "DELETE",
98
+ methodFqn: "wix.comments.ratings.v1.CommentsRatings.RemoveMyRating",
99
+ packageName: PACKAGE_NAME,
100
+ migrationOptions: {
101
+ optInTransformResponse: true
102
+ },
103
+ url: resolveWixCommentsRatingsV1CommentsRatingsUrl({
104
+ protoPath: "/v1/comment/resource/{resourceId}/rating/my",
105
+ data: payload,
106
+ host
107
+ }),
108
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
109
+ };
110
+ return metadata;
111
+ }
112
+ return __removeMyRating;
113
+ }
114
+ function getMyRating(payload) {
115
+ function __getMyRating({ host }) {
116
+ const metadata = {
117
+ entityFqdn: "wix.comments.resource.v1.rating",
118
+ method: "GET",
119
+ methodFqn: "wix.comments.ratings.v1.CommentsRatings.GetMyRating",
120
+ packageName: PACKAGE_NAME,
121
+ migrationOptions: {
122
+ optInTransformResponse: true
123
+ },
124
+ url: resolveWixCommentsRatingsV1CommentsRatingsUrl({
125
+ protoPath: "/v1/comment/resource/{resourceId}/rating/my",
126
+ data: payload,
127
+ host
128
+ }),
129
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
130
+ };
131
+ return metadata;
132
+ }
133
+ return __getMyRating;
134
+ }
135
+ function getResourceSummary(payload) {
136
+ function __getResourceSummary({ host }) {
137
+ const metadata = {
138
+ entityFqdn: "wix.comments.resource.v1.rating",
139
+ method: "GET",
140
+ methodFqn: "wix.comments.ratings.v1.CommentsRatings.GetResourceSummary",
141
+ packageName: PACKAGE_NAME,
142
+ migrationOptions: {
143
+ optInTransformResponse: true
144
+ },
145
+ url: resolveWixCommentsRatingsV1CommentsRatingsUrl({
146
+ protoPath: "/v1/comment/resource/{resourceId}/summary",
147
+ data: payload,
148
+ host
149
+ }),
150
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
151
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
152
+ {
153
+ transformFn: import_float.transformRESTFloatToSDKFloat,
154
+ paths: [{ path: "average" }]
155
+ }
156
+ ])
157
+ };
158
+ return metadata;
159
+ }
160
+ return __getResourceSummary;
161
+ }
162
+
163
+ // src/comments-resource-v1-rating-ratings.universal.ts
164
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
165
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
166
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
167
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
168
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
169
+ WebhookIdentityType2["APP"] = "APP";
170
+ return WebhookIdentityType2;
171
+ })(WebhookIdentityType || {});
172
+ async function createRating2(resourceId, options) {
173
+ const { httpClient, sideEffects } = arguments[2];
174
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
175
+ resourceRating: { ...options?.resourceRating, resourceId }
176
+ });
177
+ const reqOpts = createRating(payload);
178
+ sideEffects?.onSiteCall?.();
179
+ try {
180
+ const result = await httpClient.request(reqOpts);
181
+ sideEffects?.onSuccess?.(result);
182
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
183
+ } catch (err) {
184
+ const transformedError = (0, import_transform_error.transformError)(
185
+ err,
186
+ {
187
+ spreadPathsToArguments: { resourceRating: "$[1].resourceRating" },
188
+ explicitPathsToArguments: { "resourceRating.resourceId": "$[0]" },
189
+ singleArgumentUnchanged: false
190
+ },
191
+ ["resourceId", "options"]
192
+ );
193
+ sideEffects?.onError?.(err);
194
+ throw transformedError;
195
+ }
196
+ }
197
+ async function removeMyRating2(resourceId, options) {
198
+ const { httpClient, sideEffects } = arguments[2];
199
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
200
+ resourceId,
201
+ ratingContext: options?.ratingContext
202
+ });
203
+ const reqOpts = removeMyRating(payload);
204
+ sideEffects?.onSiteCall?.();
205
+ try {
206
+ const result = await httpClient.request(reqOpts);
207
+ sideEffects?.onSuccess?.(result);
208
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
209
+ } catch (err) {
210
+ const transformedError = (0, import_transform_error.transformError)(
211
+ err,
212
+ {
213
+ spreadPathsToArguments: {},
214
+ explicitPathsToArguments: {
215
+ resourceId: "$[0]",
216
+ ratingContext: "$[1].ratingContext"
217
+ },
218
+ singleArgumentUnchanged: false
219
+ },
220
+ ["resourceId", "options"]
221
+ );
222
+ sideEffects?.onError?.(err);
223
+ throw transformedError;
224
+ }
225
+ }
226
+ async function getMyRating2(resourceId, options) {
227
+ const { httpClient, sideEffects } = arguments[2];
228
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
229
+ resourceId,
230
+ ratingContext: options?.ratingContext
231
+ });
232
+ const reqOpts = getMyRating(payload);
233
+ sideEffects?.onSiteCall?.();
234
+ try {
235
+ const result = await httpClient.request(reqOpts);
236
+ sideEffects?.onSuccess?.(result);
237
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
238
+ } catch (err) {
239
+ const transformedError = (0, import_transform_error.transformError)(
240
+ err,
241
+ {
242
+ spreadPathsToArguments: {},
243
+ explicitPathsToArguments: {
244
+ resourceId: "$[0]",
245
+ ratingContext: "$[1].ratingContext"
246
+ },
247
+ singleArgumentUnchanged: false
248
+ },
249
+ ["resourceId", "options"]
250
+ );
251
+ sideEffects?.onError?.(err);
252
+ throw transformedError;
253
+ }
254
+ }
255
+ async function getResourceSummary2(resourceId, options) {
256
+ const { httpClient, sideEffects } = arguments[2];
257
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
258
+ resourceId,
259
+ ratingContext: options?.ratingContext
260
+ });
261
+ const reqOpts = getResourceSummary(payload);
262
+ sideEffects?.onSiteCall?.();
263
+ try {
264
+ const result = await httpClient.request(reqOpts);
265
+ sideEffects?.onSuccess?.(result);
266
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
267
+ } catch (err) {
268
+ const transformedError = (0, import_transform_error.transformError)(
269
+ err,
270
+ {
271
+ spreadPathsToArguments: {},
272
+ explicitPathsToArguments: {
273
+ resourceId: "$[0]",
274
+ ratingContext: "$[1].ratingContext"
275
+ },
276
+ singleArgumentUnchanged: false
277
+ },
278
+ ["resourceId", "options"]
279
+ );
280
+ sideEffects?.onError?.(err);
281
+ throw transformedError;
282
+ }
283
+ }
284
+
285
+ // src/comments-resource-v1-rating-ratings.public.ts
286
+ function createRating3(httpClient) {
287
+ return (resourceId, options) => createRating2(
288
+ resourceId,
289
+ options,
290
+ // @ts-ignore
291
+ { httpClient }
292
+ );
293
+ }
294
+ function removeMyRating3(httpClient) {
295
+ return (resourceId, options) => removeMyRating2(
296
+ resourceId,
297
+ options,
298
+ // @ts-ignore
299
+ { httpClient }
300
+ );
301
+ }
302
+ function getMyRating3(httpClient) {
303
+ return (resourceId, options) => getMyRating2(
304
+ resourceId,
305
+ options,
306
+ // @ts-ignore
307
+ { httpClient }
308
+ );
309
+ }
310
+ function getResourceSummary3(httpClient) {
311
+ return (resourceId, options) => getResourceSummary2(
312
+ resourceId,
313
+ options,
314
+ // @ts-ignore
315
+ { httpClient }
316
+ );
317
+ }
318
+ var onRatingCommentResourceRatingChanged = (0, import_sdk_types.EventDefinition)(
319
+ "wix.comments.resource.v1.rating_comment_resource_rating_changed",
320
+ true,
321
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
322
+ (0, import_transform_paths2.transformPaths)(event, [
323
+ {
324
+ transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
325
+ paths: [{ path: "metadata.eventTime" }]
326
+ }
327
+ ])
328
+ )
329
+ )();
330
+ var onRatingCommentResourceRatingDeleted = (0, import_sdk_types.EventDefinition)(
331
+ "wix.comments.resource.v1.rating_comment_resource_rating_deleted",
332
+ true,
333
+ (event) => (0, import_rename_all_nested_keys2.renameKeysFromRESTResponseToSDKResponse)(
334
+ (0, import_transform_paths2.transformPaths)(event, [
335
+ {
336
+ transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
337
+ paths: [{ path: "metadata.eventTime" }]
338
+ }
339
+ ])
340
+ )
341
+ )();
342
+
343
+ // src/comments-resource-v1-rating-ratings.context.ts
344
+ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
345
+ var import_event_definition_modules = require("@wix/sdk-runtime/event-definition-modules");
346
+ var createRating4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(createRating3);
347
+ var removeMyRating4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(removeMyRating3);
348
+ var getMyRating4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getMyRating3);
349
+ var getResourceSummary4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getResourceSummary3);
350
+ var onRatingCommentResourceRatingChanged2 = (0, import_event_definition_modules.createEventModule)(
351
+ onRatingCommentResourceRatingChanged
352
+ );
353
+ var onRatingCommentResourceRatingDeleted2 = (0, import_event_definition_modules.createEventModule)(
354
+ onRatingCommentResourceRatingDeleted
355
+ );
356
+ // Annotate the CommonJS export names for ESM import in node:
357
+ 0 && (module.exports = {
358
+ WebhookIdentityType,
359
+ createRating,
360
+ getMyRating,
361
+ getResourceSummary,
362
+ onRatingCommentResourceRatingChanged,
363
+ onRatingCommentResourceRatingDeleted,
364
+ removeMyRating
365
+ });
366
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../index.ts","../../../src/comments-resource-v1-rating-ratings.public.ts","../../../src/comments-resource-v1-rating-ratings.universal.ts","../../../src/comments-resource-v1-rating-ratings.http.ts","../../../src/comments-resource-v1-rating-ratings.context.ts"],"sourcesContent":["export * from './src/comments-resource-v1-rating-ratings.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CreateRatingOptions,\n GetMyRatingApplicationErrors,\n GetMyRatingOptions,\n GetResourceSummaryOptions,\n GetResourceSummaryResponse,\n RatingCommentResourceRatingChangedEnvelope,\n RatingCommentResourceRatingDeletedEnvelope,\n RemoveMyRatingApplicationErrors,\n RemoveMyRatingOptions,\n V1CreateRatingResponse,\n V1GetMyRatingResponse,\n createRating as universalCreateRating,\n getMyRating as universalGetMyRating,\n getResourceSummary as universalGetResourceSummary,\n removeMyRating as universalRemoveMyRating,\n} from './comments-resource-v1-rating-ratings.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/comments' };\n\nexport function createRating(httpClient: HttpClient): CreateRatingSignature {\n return (\n resourceId: string,\n options?: NonNullablePaths<\n CreateRatingOptions,\n | `resourceRating.rating`\n | `resourceRating.ratingContext.appDefId`\n | `resourceRating.ratingContext.contextId`,\n 4\n >\n ) =>\n universalCreateRating(\n resourceId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateRatingSignature {\n /**\n * Creates resource rating, if member/visitor has already created an rating it will be updated with provided value\n * @param - Resource Id\n */\n (\n resourceId: string,\n options?: NonNullablePaths<\n CreateRatingOptions,\n | `resourceRating.rating`\n | `resourceRating.ratingContext.appDefId`\n | `resourceRating.ratingContext.contextId`,\n 4\n >\n ): Promise<\n NonNullablePaths<\n V1CreateRatingResponse,\n `resourceRating.publishedCommentCount`,\n 3\n >\n >;\n}\n\nexport function removeMyRating(\n httpClient: HttpClient\n): RemoveMyRatingSignature {\n return (\n resourceId: string,\n options?: NonNullablePaths<\n RemoveMyRatingOptions,\n `ratingContext.appDefId` | `ratingContext.contextId`,\n 3\n >\n ) =>\n universalRemoveMyRating(\n resourceId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RemoveMyRatingSignature {\n /**\n * Removes rating for current caller\n * @param - Resource Id\n */\n (\n resourceId: string,\n options?: NonNullablePaths<\n RemoveMyRatingOptions,\n `ratingContext.appDefId` | `ratingContext.contextId`,\n 3\n >\n ): Promise<\n void & {\n __applicationErrorsType?: RemoveMyRatingApplicationErrors;\n }\n >;\n}\n\nexport function getMyRating(httpClient: HttpClient): GetMyRatingSignature {\n return (\n resourceId: string,\n options?: NonNullablePaths<\n GetMyRatingOptions,\n `ratingContext.appDefId` | `ratingContext.contextId`,\n 3\n >\n ) =>\n universalGetMyRating(\n resourceId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetMyRatingSignature {\n /**\n * Returns rating for current caller\n * @param - Resource Id\n */\n (\n resourceId: string,\n options?: NonNullablePaths<\n GetMyRatingOptions,\n `ratingContext.appDefId` | `ratingContext.contextId`,\n 3\n >\n ): Promise<\n NonNullablePaths<\n V1GetMyRatingResponse,\n `resourceRating.publishedCommentCount`,\n 3\n > & {\n __applicationErrorsType?: GetMyRatingApplicationErrors;\n }\n >;\n}\n\nexport function getResourceSummary(\n httpClient: HttpClient\n): GetResourceSummarySignature {\n return (\n resourceId: string,\n options?: NonNullablePaths<\n GetResourceSummaryOptions,\n `ratingContext.appDefId` | `ratingContext.contextId`,\n 3\n >\n ) =>\n universalGetResourceSummary(\n resourceId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetResourceSummarySignature {\n /** @param - Resource Id */\n (\n resourceId: string,\n options?: NonNullablePaths<\n GetResourceSummaryOptions,\n `ratingContext.appDefId` | `ratingContext.contextId`,\n 3\n >\n ): Promise<\n NonNullablePaths<GetResourceSummaryResponse, `average` | `total`, 2>\n >;\n}\n\nexport const onRatingCommentResourceRatingChanged = EventDefinition(\n 'wix.comments.resource.v1.rating_comment_resource_rating_changed',\n true,\n (event: RatingCommentResourceRatingChangedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<RatingCommentResourceRatingChangedEnvelope>();\nexport const onRatingCommentResourceRatingDeleted = EventDefinition(\n 'wix.comments.resource.v1.rating_comment_resource_rating_deleted',\n true,\n (event: RatingCommentResourceRatingDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<RatingCommentResourceRatingDeletedEnvelope>();\n\nexport {\n AccountInfo,\n AccountInfoMetadata,\n ActionEvent,\n BaseEventMetadata,\n CommentResourceRating,\n CommentResourceRatingChanged,\n CommentResourceRatingDeleted,\n CommentResourceRatingOwnerOneOf,\n CreateRatingOptions,\n CreateRatingRequest,\n CreateRatingResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n GetMyRatingOptions,\n GetMyRatingRequest,\n GetMyRatingResponse,\n GetResourceSummaryOptions,\n GetResourceSummaryRequest,\n GetResourceSummaryResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n MessageEnvelope,\n MoveContext,\n MoveRatingRequest,\n MoveRatingResponse,\n RatingCommentResourceRatingChangedEnvelope,\n RatingCommentResourceRatingDeletedEnvelope,\n RatingContext,\n RemoveMyRatingOptions,\n RemoveMyRatingRequest,\n RemoveMyRatingResponse,\n RestoreInfo,\n V1CommentResourceRating,\n V1CommentResourceRatingOwnerOneOf,\n V1CreateRatingRequest,\n V1CreateRatingResponse,\n V1GetMyRatingRequest,\n V1GetMyRatingResponse,\n WebhookIdentityType,\n} from './comments-resource-v1-rating-ratings.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixCommentsResourceV1Rating from './comments-resource-v1-rating-ratings.http.js';\n\nexport 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 entity?: string;\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 currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: 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\nexport interface BaseEventMetadata {\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 /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\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 accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface RatingCommentResourceRatingChangedEnvelope {\n data: CommentResourceRatingChanged;\n metadata: EventMetadata;\n}\n\n/** @webhook\n * @eventType wix.comments.resource.v1.rating_comment_resource_rating_changed\n * @serviceIdentifier wix.comments.ratings.v1.CommentsRatings\n * @slug comment_resource_rating_changed\n * @documentationMaturity preview\n */\nexport declare function onRatingCommentResourceRatingChanged(\n handler: (\n event: RatingCommentResourceRatingChangedEnvelope\n ) => void | Promise<void>\n): void;\n\nexport interface RatingCommentResourceRatingDeletedEnvelope {\n data: CommentResourceRatingDeleted;\n metadata: EventMetadata;\n}\n\n/** @webhook\n * @eventType wix.comments.resource.v1.rating_comment_resource_rating_deleted\n * @serviceIdentifier wix.comments.ratings.v1.CommentsRatings\n * @slug comment_resource_rating_deleted\n * @documentationMaturity preview\n */\nexport declare function onRatingCommentResourceRatingDeleted(\n handler: (\n event: RatingCommentResourceRatingDeletedEnvelope\n ) => void | Promise<void>\n): void;\n\n/**\n * Creates resource rating, if member/visitor has already created an rating it will be updated with provided value\n * @param resourceId - Resource Id\n * @public\n * @documentationMaturity preview\n * @requiredField options.resourceRating.rating\n * @requiredField options.resourceRating.ratingContext.appDefId\n * @requiredField options.resourceRating.ratingContext.contextId\n * @requiredField resourceId\n * @fqn wix.comments.ratings.v1.CommentsRatings.CreateRating\n */\nexport async function createRating(\n resourceId: string,\n options?: NonNullablePaths<\n CreateRatingOptions,\n | `resourceRating.rating`\n | `resourceRating.ratingContext.appDefId`\n | `resourceRating.ratingContext.contextId`,\n 4\n >\n): Promise<\n NonNullablePaths<\n V1CreateRatingResponse,\n `resourceRating.publishedCommentCount`,\n 3\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n resourceRating: { ...options?.resourceRating, resourceId: resourceId },\n });\n\n const reqOpts = ambassadorWixCommentsResourceV1Rating.createRating(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { resourceRating: '$[1].resourceRating' },\n explicitPathsToArguments: { 'resourceRating.resourceId': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['resourceId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateRatingOptions {\n resourceRating?: {\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 /**\n * Rating Value\n * @min 1\n * @max 5\n */\n rating?: number | null;\n /** Published comments count */\n publishedCommentCount?: number;\n };\n}\n\n/**\n * Removes rating for current caller\n * @param resourceId - Resource Id\n * @public\n * @documentationMaturity preview\n * @requiredField options.ratingContext.appDefId\n * @requiredField options.ratingContext.contextId\n * @requiredField resourceId\n * @fqn wix.comments.ratings.v1.CommentsRatings.RemoveMyRating\n */\nexport async function removeMyRating(\n resourceId: string,\n options?: NonNullablePaths<\n RemoveMyRatingOptions,\n `ratingContext.appDefId` | `ratingContext.contextId`,\n 3\n >\n): Promise<\n void & {\n __applicationErrorsType?: RemoveMyRatingApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n resourceId: resourceId,\n ratingContext: options?.ratingContext,\n });\n\n const reqOpts = ambassadorWixCommentsResourceV1Rating.removeMyRating(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n resourceId: '$[0]',\n ratingContext: '$[1].ratingContext',\n },\n singleArgumentUnchanged: false,\n },\n ['resourceId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface RemoveMyRatingOptions {\n /** Rating context */\n ratingContext?: RatingContext;\n}\n\n/**\n * Returns rating for current caller\n * @param resourceId - Resource Id\n * @public\n * @documentationMaturity preview\n * @requiredField options.ratingContext.appDefId\n * @requiredField options.ratingContext.contextId\n * @requiredField resourceId\n * @fqn wix.comments.ratings.v1.CommentsRatings.GetMyRating\n */\nexport async function getMyRating(\n resourceId: string,\n options?: NonNullablePaths<\n GetMyRatingOptions,\n `ratingContext.appDefId` | `ratingContext.contextId`,\n 3\n >\n): Promise<\n NonNullablePaths<\n V1GetMyRatingResponse,\n `resourceRating.publishedCommentCount`,\n 3\n > & {\n __applicationErrorsType?: GetMyRatingApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n resourceId: resourceId,\n ratingContext: options?.ratingContext,\n });\n\n const reqOpts = ambassadorWixCommentsResourceV1Rating.getMyRating(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n resourceId: '$[0]',\n ratingContext: '$[1].ratingContext',\n },\n singleArgumentUnchanged: false,\n },\n ['resourceId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetMyRatingOptions {\n /** Rating context */\n ratingContext?: RatingContext;\n}\n\n/** @param resourceId - Resource Id\n * @public\n * @documentationMaturity preview\n * @requiredField options.ratingContext.appDefId\n * @requiredField options.ratingContext.contextId\n * @requiredField resourceId\n * @fqn wix.comments.ratings.v1.CommentsRatings.GetResourceSummary\n */\nexport async function getResourceSummary(\n resourceId: string,\n options?: NonNullablePaths<\n GetResourceSummaryOptions,\n `ratingContext.appDefId` | `ratingContext.contextId`,\n 3\n >\n): Promise<\n NonNullablePaths<GetResourceSummaryResponse, `average` | `total`, 2>\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n resourceId: resourceId,\n ratingContext: options?.ratingContext,\n });\n\n const reqOpts =\n ambassadorWixCommentsResourceV1Rating.getResourceSummary(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n resourceId: '$[0]',\n ratingContext: '$[1].ratingContext',\n },\n singleArgumentUnchanged: false,\n },\n ['resourceId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetResourceSummaryOptions {\n /** Rating context */\n ratingContext?: RatingContext;\n}\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","import {\n createRating as publicCreateRating,\n removeMyRating as publicRemoveMyRating,\n getMyRating as publicGetMyRating,\n getResourceSummary as publicGetResourceSummary,\n} from './comments-resource-v1-rating-ratings.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onRatingCommentResourceRatingChanged as publicOnRatingCommentResourceRatingChanged } from './comments-resource-v1-rating-ratings.public.js';\nimport { onRatingCommentResourceRatingDeleted as publicOnRatingCommentResourceRatingDeleted } from './comments-resource-v1-rating-ratings.public.js';\n\nexport const createRating: MaybeContext<\n BuildRESTFunction<typeof publicCreateRating> & typeof publicCreateRating\n> = /*#__PURE__*/ createRESTModule(publicCreateRating);\nexport const removeMyRating: MaybeContext<\n BuildRESTFunction<typeof publicRemoveMyRating> & typeof publicRemoveMyRating\n> = /*#__PURE__*/ createRESTModule(publicRemoveMyRating);\nexport const getMyRating: MaybeContext<\n BuildRESTFunction<typeof publicGetMyRating> & typeof publicGetMyRating\n> = /*#__PURE__*/ createRESTModule(publicGetMyRating);\nexport const getResourceSummary: MaybeContext<\n BuildRESTFunction<typeof publicGetResourceSummary> &\n typeof publicGetResourceSummary\n> = /*#__PURE__*/ createRESTModule(publicGetResourceSummary);\n/** */\nexport const onRatingCommentResourceRatingChanged: BuildEventDefinition<\n typeof publicOnRatingCommentResourceRatingChanged\n> &\n typeof publicOnRatingCommentResourceRatingChanged = createEventModule(\n publicOnRatingCommentResourceRatingChanged\n);\n/** */\nexport const onRatingCommentResourceRatingDeleted: BuildEventDefinition<\n typeof publicOnRatingCommentResourceRatingDeleted\n> &\n typeof publicOnRatingCommentResourceRatingDeleted = createEventModule(\n publicOnRatingCommentResourceRatingDeleted\n);\n\nexport { WebhookIdentityType } from './comments-resource-v1-rating-ratings.universal.js';\nexport {\n V1CommentResourceRating,\n V1CommentResourceRatingOwnerOneOf,\n RatingContext,\n CommentResourceRatingChanged,\n CommentResourceRatingDeleted,\n V1CreateRatingRequest,\n V1CreateRatingResponse,\n RemoveMyRatingRequest,\n RemoveMyRatingResponse,\n V1GetMyRatingRequest,\n V1GetMyRatingResponse,\n GetResourceSummaryRequest,\n GetResourceSummaryResponse,\n MoveRatingRequest,\n MoveContext,\n MoveRatingResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n Empty,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n CommentResourceRating,\n CommentResourceRatingOwnerOneOf,\n CreateRatingRequest,\n CreateRatingResponse,\n GetMyRatingRequest,\n GetMyRatingResponse,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\n RatingCommentResourceRatingChangedEnvelope,\n RatingCommentResourceRatingDeletedEnvelope,\n CreateRatingOptions,\n RemoveMyRatingOptions,\n GetMyRatingOptions,\n GetResourceSummaryOptions,\n} from './comments-resource-v1-rating-ratings.universal.js';\nexport {\n WebhookIdentityTypeWithLiterals,\n RemoveMyRatingApplicationErrors,\n GetMyRatingApplicationErrors,\n} from './comments-resource-v1-rating-ratings.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,sBAAAA;AAAA,EAAA,mBAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,4CAAAC;AAAA,EAAA,4CAAAC;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,uBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAGd,SAAS,aAAa,SAA6C;AACxE,WAAS,eAAe,EAAE,KAAK,GAAQ;AACrC,UAAM,WAAW;AAAA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CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA8C;AACvC,IAAM,2CAAuC;AAAA,EAClD;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,wCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA8C;;;AGpM9C,IAAAC,uBAAiC;AACjC,sCAAkC;AAS3B,IAAMC,gBAEK,2DAAiBA,aAAkB;AAC9C,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,sBAGK,2DAAiBA,mBAAwB;AAEpD,IAAMC,4CAGyC;AAAA,EACpD;AACF;AAEO,IAAMC,4CAGyC;AAAA,EACpD;AACF;","names":["createRating","getMyRating","getResourceSummary","onRatingCommentResourceRatingChanged","onRatingCommentResourceRatingDeleted","removeMyRating","import_rename_all_nested_keys","import_transform_paths","import_rest_modules","payload","WebhookIdentityType","createRating","sdkTransformError","removeMyRating","getMyRating","getResourceSummary","createRating","removeMyRating","getMyRating","getResourceSummary","import_rest_modules","createRating","removeMyRating","getMyRating","getResourceSummary","onRatingCommentResourceRatingChanged","onRatingCommentResourceRatingDeleted"]}