@wix/auto_sdk_feedback_comments 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 +547 -0
- package/build/cjs/index.js +637 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +569 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +553 -0
- package/build/cjs/meta.js +495 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +547 -0
- package/build/es/index.mjs +604 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +1 -0
- package/build/es/index.typings.mjs +536 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +553 -0
- package/build/es/meta.mjs +459 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +116 -0
- package/build/internal/cjs/index.typings.d.ts +677 -0
- package/build/internal/cjs/meta.d.ts +607 -0
- package/build/internal/es/index.d.mts +116 -0
- package/build/internal/es/index.typings.d.mts +677 -0
- package/build/internal/es/meta.d.mts +607 -0
- package/meta/package.json +3 -0
- package/package.json +54 -0
|
@@ -0,0 +1,604 @@
|
|
|
1
|
+
// src/partners-feedback-v1-comment-comments.universal.ts
|
|
2
|
+
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
3
|
+
import {
|
|
4
|
+
renameKeysFromSDKRequestToRESTRequest,
|
|
5
|
+
renameKeysFromRESTResponseToSDKResponse
|
|
6
|
+
} from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
7
|
+
|
|
8
|
+
// src/partners-feedback-v1-comment-comments.http.ts
|
|
9
|
+
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
10
|
+
import { transformRESTFloatToSDKFloat } from "@wix/sdk-runtime/transformations/float";
|
|
11
|
+
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
12
|
+
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
13
|
+
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
14
|
+
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
15
|
+
function resolveWixPartnersFeedbackV1CommentsUrl(opts) {
|
|
16
|
+
const domainToMappings = {
|
|
17
|
+
"api._api_base_domain_": [
|
|
18
|
+
{
|
|
19
|
+
srcPath: "/feedback-comments",
|
|
20
|
+
destPath: ""
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
};
|
|
24
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
25
|
+
}
|
|
26
|
+
var PACKAGE_NAME = "@wix/auto_sdk_feedback_comments";
|
|
27
|
+
function getComment(payload) {
|
|
28
|
+
function __getComment({ host }) {
|
|
29
|
+
const metadata = {
|
|
30
|
+
entityFqdn: "wix.partners.feedback.v1.comment",
|
|
31
|
+
method: "GET",
|
|
32
|
+
methodFqn: "wix.partners.feedback.v1.Comments.GetComment",
|
|
33
|
+
packageName: PACKAGE_NAME,
|
|
34
|
+
migrationOptions: {
|
|
35
|
+
optInTransformResponse: true
|
|
36
|
+
},
|
|
37
|
+
url: resolveWixPartnersFeedbackV1CommentsUrl({
|
|
38
|
+
protoPath: "/v1/comments/{commentId}",
|
|
39
|
+
data: payload,
|
|
40
|
+
host
|
|
41
|
+
}),
|
|
42
|
+
params: toURLSearchParams(payload),
|
|
43
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
44
|
+
{
|
|
45
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
46
|
+
paths: [
|
|
47
|
+
{ path: "comment.createdDate" },
|
|
48
|
+
{ path: "comment.updatedDate" },
|
|
49
|
+
{ path: "comment.replies.createdDate" }
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
54
|
+
paths: [
|
|
55
|
+
{ path: "comment.commentLocation.x" },
|
|
56
|
+
{ path: "comment.commentLocation.y" },
|
|
57
|
+
{ path: "comment.commentLocation.position.offsetXPct" },
|
|
58
|
+
{ path: "comment.commentLocation.position.offsetYPct" }
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
])
|
|
62
|
+
};
|
|
63
|
+
return metadata;
|
|
64
|
+
}
|
|
65
|
+
return __getComment;
|
|
66
|
+
}
|
|
67
|
+
function queryComments(payload) {
|
|
68
|
+
function __queryComments({ host }) {
|
|
69
|
+
const metadata = {
|
|
70
|
+
entityFqdn: "wix.partners.feedback.v1.comment",
|
|
71
|
+
method: "GET",
|
|
72
|
+
methodFqn: "wix.partners.feedback.v1.Comments.QueryComments",
|
|
73
|
+
packageName: PACKAGE_NAME,
|
|
74
|
+
migrationOptions: {
|
|
75
|
+
optInTransformResponse: true
|
|
76
|
+
},
|
|
77
|
+
url: resolveWixPartnersFeedbackV1CommentsUrl({
|
|
78
|
+
protoPath: "/v1/comments/query",
|
|
79
|
+
data: payload,
|
|
80
|
+
host
|
|
81
|
+
}),
|
|
82
|
+
params: toURLSearchParams(payload, true),
|
|
83
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
84
|
+
{
|
|
85
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
86
|
+
paths: [
|
|
87
|
+
{ path: "comments.createdDate" },
|
|
88
|
+
{ path: "comments.updatedDate" },
|
|
89
|
+
{ path: "comments.replies.createdDate" }
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
94
|
+
paths: [
|
|
95
|
+
{ path: "comments.commentLocation.x" },
|
|
96
|
+
{ path: "comments.commentLocation.y" },
|
|
97
|
+
{ path: "comments.commentLocation.position.offsetXPct" },
|
|
98
|
+
{ path: "comments.commentLocation.position.offsetYPct" }
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
]),
|
|
102
|
+
fallback: [
|
|
103
|
+
{
|
|
104
|
+
method: "POST",
|
|
105
|
+
url: resolveWixPartnersFeedbackV1CommentsUrl({
|
|
106
|
+
protoPath: "/v1/comments/query",
|
|
107
|
+
data: payload,
|
|
108
|
+
host
|
|
109
|
+
}),
|
|
110
|
+
data: payload
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
};
|
|
114
|
+
return metadata;
|
|
115
|
+
}
|
|
116
|
+
return __queryComments;
|
|
117
|
+
}
|
|
118
|
+
function updateCommentStatus(payload) {
|
|
119
|
+
function __updateCommentStatus({ host }) {
|
|
120
|
+
const metadata = {
|
|
121
|
+
entityFqdn: "wix.partners.feedback.v1.comment",
|
|
122
|
+
method: "POST",
|
|
123
|
+
methodFqn: "wix.partners.feedback.v1.Comments.UpdateCommentStatus",
|
|
124
|
+
packageName: PACKAGE_NAME,
|
|
125
|
+
migrationOptions: {
|
|
126
|
+
optInTransformResponse: true
|
|
127
|
+
},
|
|
128
|
+
url: resolveWixPartnersFeedbackV1CommentsUrl({
|
|
129
|
+
protoPath: "/v1/comments/{commentId}/update-status",
|
|
130
|
+
data: payload,
|
|
131
|
+
host
|
|
132
|
+
}),
|
|
133
|
+
data: payload,
|
|
134
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
135
|
+
{
|
|
136
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
137
|
+
paths: [
|
|
138
|
+
{ path: "comment.createdDate" },
|
|
139
|
+
{ path: "comment.updatedDate" },
|
|
140
|
+
{ path: "comment.replies.createdDate" }
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
145
|
+
paths: [
|
|
146
|
+
{ path: "comment.commentLocation.x" },
|
|
147
|
+
{ path: "comment.commentLocation.y" },
|
|
148
|
+
{ path: "comment.commentLocation.position.offsetXPct" },
|
|
149
|
+
{ path: "comment.commentLocation.position.offsetYPct" }
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
])
|
|
153
|
+
};
|
|
154
|
+
return metadata;
|
|
155
|
+
}
|
|
156
|
+
return __updateCommentStatus;
|
|
157
|
+
}
|
|
158
|
+
function deleteComment(payload) {
|
|
159
|
+
function __deleteComment({ host }) {
|
|
160
|
+
const metadata = {
|
|
161
|
+
entityFqdn: "wix.partners.feedback.v1.comment",
|
|
162
|
+
method: "DELETE",
|
|
163
|
+
methodFqn: "wix.partners.feedback.v1.Comments.DeleteComment",
|
|
164
|
+
packageName: PACKAGE_NAME,
|
|
165
|
+
migrationOptions: {
|
|
166
|
+
optInTransformResponse: true
|
|
167
|
+
},
|
|
168
|
+
url: resolveWixPartnersFeedbackV1CommentsUrl({
|
|
169
|
+
protoPath: "/v1/comments/{commentId}",
|
|
170
|
+
data: payload,
|
|
171
|
+
host
|
|
172
|
+
}),
|
|
173
|
+
params: toURLSearchParams(payload)
|
|
174
|
+
};
|
|
175
|
+
return metadata;
|
|
176
|
+
}
|
|
177
|
+
return __deleteComment;
|
|
178
|
+
}
|
|
179
|
+
function createCommentReply(payload) {
|
|
180
|
+
function __createCommentReply({ host }) {
|
|
181
|
+
const serializedData = transformPaths(payload, [
|
|
182
|
+
{
|
|
183
|
+
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
184
|
+
paths: [{ path: "reply.createdDate" }]
|
|
185
|
+
}
|
|
186
|
+
]);
|
|
187
|
+
const metadata = {
|
|
188
|
+
entityFqdn: "wix.partners.feedback.v1.comment",
|
|
189
|
+
method: "POST",
|
|
190
|
+
methodFqn: "wix.partners.feedback.v1.Comments.CreateCommentReply",
|
|
191
|
+
packageName: PACKAGE_NAME,
|
|
192
|
+
migrationOptions: {
|
|
193
|
+
optInTransformResponse: true
|
|
194
|
+
},
|
|
195
|
+
url: resolveWixPartnersFeedbackV1CommentsUrl({
|
|
196
|
+
protoPath: "/v1/comments/{commentId}/replies",
|
|
197
|
+
data: serializedData,
|
|
198
|
+
host
|
|
199
|
+
}),
|
|
200
|
+
data: serializedData,
|
|
201
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
202
|
+
{
|
|
203
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
204
|
+
paths: [
|
|
205
|
+
{ path: "comment.createdDate" },
|
|
206
|
+
{ path: "comment.updatedDate" },
|
|
207
|
+
{ path: "comment.replies.createdDate" }
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
212
|
+
paths: [
|
|
213
|
+
{ path: "comment.commentLocation.x" },
|
|
214
|
+
{ path: "comment.commentLocation.y" },
|
|
215
|
+
{ path: "comment.commentLocation.position.offsetXPct" },
|
|
216
|
+
{ path: "comment.commentLocation.position.offsetYPct" }
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
])
|
|
220
|
+
};
|
|
221
|
+
return metadata;
|
|
222
|
+
}
|
|
223
|
+
return __createCommentReply;
|
|
224
|
+
}
|
|
225
|
+
function updateCommentReply(payload) {
|
|
226
|
+
function __updateCommentReply({ host }) {
|
|
227
|
+
const metadata = {
|
|
228
|
+
entityFqdn: "wix.partners.feedback.v1.comment",
|
|
229
|
+
method: "PATCH",
|
|
230
|
+
methodFqn: "wix.partners.feedback.v1.Comments.UpdateCommentReply",
|
|
231
|
+
packageName: PACKAGE_NAME,
|
|
232
|
+
migrationOptions: {
|
|
233
|
+
optInTransformResponse: true
|
|
234
|
+
},
|
|
235
|
+
url: resolveWixPartnersFeedbackV1CommentsUrl({
|
|
236
|
+
protoPath: "/v1/comments/{commentId}/replies/{replyIndex}",
|
|
237
|
+
data: payload,
|
|
238
|
+
host
|
|
239
|
+
}),
|
|
240
|
+
data: payload,
|
|
241
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
242
|
+
{
|
|
243
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
244
|
+
paths: [
|
|
245
|
+
{ path: "comment.createdDate" },
|
|
246
|
+
{ path: "comment.updatedDate" },
|
|
247
|
+
{ path: "comment.replies.createdDate" }
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
252
|
+
paths: [
|
|
253
|
+
{ path: "comment.commentLocation.x" },
|
|
254
|
+
{ path: "comment.commentLocation.y" },
|
|
255
|
+
{ path: "comment.commentLocation.position.offsetXPct" },
|
|
256
|
+
{ path: "comment.commentLocation.position.offsetYPct" }
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
])
|
|
260
|
+
};
|
|
261
|
+
return metadata;
|
|
262
|
+
}
|
|
263
|
+
return __updateCommentReply;
|
|
264
|
+
}
|
|
265
|
+
function deleteCommentReply(payload) {
|
|
266
|
+
function __deleteCommentReply({ host }) {
|
|
267
|
+
const metadata = {
|
|
268
|
+
entityFqdn: "wix.partners.feedback.v1.comment",
|
|
269
|
+
method: "DELETE",
|
|
270
|
+
methodFqn: "wix.partners.feedback.v1.Comments.DeleteCommentReply",
|
|
271
|
+
packageName: PACKAGE_NAME,
|
|
272
|
+
migrationOptions: {
|
|
273
|
+
optInTransformResponse: true
|
|
274
|
+
},
|
|
275
|
+
url: resolveWixPartnersFeedbackV1CommentsUrl({
|
|
276
|
+
protoPath: "/v1/comments/{commentId}/replies/{replyIndex}",
|
|
277
|
+
data: payload,
|
|
278
|
+
host
|
|
279
|
+
}),
|
|
280
|
+
params: toURLSearchParams(payload),
|
|
281
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
282
|
+
{
|
|
283
|
+
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
284
|
+
paths: [
|
|
285
|
+
{ path: "comment.createdDate" },
|
|
286
|
+
{ path: "comment.updatedDate" },
|
|
287
|
+
{ path: "comment.replies.createdDate" }
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
292
|
+
paths: [
|
|
293
|
+
{ path: "comment.commentLocation.x" },
|
|
294
|
+
{ path: "comment.commentLocation.y" },
|
|
295
|
+
{ path: "comment.commentLocation.position.offsetXPct" },
|
|
296
|
+
{ path: "comment.commentLocation.position.offsetYPct" }
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
])
|
|
300
|
+
};
|
|
301
|
+
return metadata;
|
|
302
|
+
}
|
|
303
|
+
return __deleteCommentReply;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// src/partners-feedback-v1-comment-comments.universal.ts
|
|
307
|
+
var Status = /* @__PURE__ */ ((Status2) => {
|
|
308
|
+
Status2["NEW"] = "NEW";
|
|
309
|
+
Status2["OPEN"] = "OPEN";
|
|
310
|
+
Status2["RESOLVED"] = "RESOLVED";
|
|
311
|
+
return Status2;
|
|
312
|
+
})(Status || {});
|
|
313
|
+
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
314
|
+
SortOrder2["ASC"] = "ASC";
|
|
315
|
+
SortOrder2["DESC"] = "DESC";
|
|
316
|
+
return SortOrder2;
|
|
317
|
+
})(SortOrder || {});
|
|
318
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
319
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
320
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
321
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
322
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
323
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
324
|
+
return WebhookIdentityType2;
|
|
325
|
+
})(WebhookIdentityType || {});
|
|
326
|
+
async function getComment2(commentId) {
|
|
327
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
328
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
329
|
+
commentId
|
|
330
|
+
});
|
|
331
|
+
const reqOpts = getComment(payload);
|
|
332
|
+
sideEffects?.onSiteCall?.();
|
|
333
|
+
try {
|
|
334
|
+
const result = await httpClient.request(reqOpts);
|
|
335
|
+
sideEffects?.onSuccess?.(result);
|
|
336
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data)?.comment;
|
|
337
|
+
} catch (err) {
|
|
338
|
+
const transformedError = sdkTransformError(
|
|
339
|
+
err,
|
|
340
|
+
{
|
|
341
|
+
spreadPathsToArguments: {},
|
|
342
|
+
explicitPathsToArguments: { commentId: "$[0]" },
|
|
343
|
+
singleArgumentUnchanged: false
|
|
344
|
+
},
|
|
345
|
+
["commentId"]
|
|
346
|
+
);
|
|
347
|
+
sideEffects?.onError?.(err);
|
|
348
|
+
throw transformedError;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
async function queryComments2(query) {
|
|
352
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
353
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({ query });
|
|
354
|
+
const reqOpts = queryComments(payload);
|
|
355
|
+
sideEffects?.onSiteCall?.();
|
|
356
|
+
try {
|
|
357
|
+
const result = await httpClient.request(reqOpts);
|
|
358
|
+
sideEffects?.onSuccess?.(result);
|
|
359
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
360
|
+
} catch (err) {
|
|
361
|
+
const transformedError = sdkTransformError(
|
|
362
|
+
err,
|
|
363
|
+
{
|
|
364
|
+
spreadPathsToArguments: {},
|
|
365
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
366
|
+
singleArgumentUnchanged: false
|
|
367
|
+
},
|
|
368
|
+
["query"]
|
|
369
|
+
);
|
|
370
|
+
sideEffects?.onError?.(err);
|
|
371
|
+
throw transformedError;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
async function updateCommentStatus2(commentId, status, options) {
|
|
375
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
376
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
377
|
+
commentId,
|
|
378
|
+
status,
|
|
379
|
+
revision: options?.revision
|
|
380
|
+
});
|
|
381
|
+
const reqOpts = updateCommentStatus(payload);
|
|
382
|
+
sideEffects?.onSiteCall?.();
|
|
383
|
+
try {
|
|
384
|
+
const result = await httpClient.request(reqOpts);
|
|
385
|
+
sideEffects?.onSuccess?.(result);
|
|
386
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
387
|
+
} catch (err) {
|
|
388
|
+
const transformedError = sdkTransformError(
|
|
389
|
+
err,
|
|
390
|
+
{
|
|
391
|
+
spreadPathsToArguments: {},
|
|
392
|
+
explicitPathsToArguments: {
|
|
393
|
+
commentId: "$[0]",
|
|
394
|
+
status: "$[1]",
|
|
395
|
+
revision: "$[2].revision"
|
|
396
|
+
},
|
|
397
|
+
singleArgumentUnchanged: false
|
|
398
|
+
},
|
|
399
|
+
["commentId", "status", "options"]
|
|
400
|
+
);
|
|
401
|
+
sideEffects?.onError?.(err);
|
|
402
|
+
throw transformedError;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
async function deleteComment2(commentId) {
|
|
406
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
407
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
408
|
+
commentId
|
|
409
|
+
});
|
|
410
|
+
const reqOpts = deleteComment(payload);
|
|
411
|
+
sideEffects?.onSiteCall?.();
|
|
412
|
+
try {
|
|
413
|
+
const result = await httpClient.request(reqOpts);
|
|
414
|
+
sideEffects?.onSuccess?.(result);
|
|
415
|
+
} catch (err) {
|
|
416
|
+
const transformedError = sdkTransformError(
|
|
417
|
+
err,
|
|
418
|
+
{
|
|
419
|
+
spreadPathsToArguments: {},
|
|
420
|
+
explicitPathsToArguments: { commentId: "$[0]" },
|
|
421
|
+
singleArgumentUnchanged: false
|
|
422
|
+
},
|
|
423
|
+
["commentId"]
|
|
424
|
+
);
|
|
425
|
+
sideEffects?.onError?.(err);
|
|
426
|
+
throw transformedError;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
async function createCommentReply2(commentId, reply, options) {
|
|
430
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
431
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
432
|
+
commentId,
|
|
433
|
+
reply,
|
|
434
|
+
revision: options?.revision
|
|
435
|
+
});
|
|
436
|
+
const reqOpts = createCommentReply(payload);
|
|
437
|
+
sideEffects?.onSiteCall?.();
|
|
438
|
+
try {
|
|
439
|
+
const result = await httpClient.request(reqOpts);
|
|
440
|
+
sideEffects?.onSuccess?.(result);
|
|
441
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
442
|
+
} catch (err) {
|
|
443
|
+
const transformedError = sdkTransformError(
|
|
444
|
+
err,
|
|
445
|
+
{
|
|
446
|
+
spreadPathsToArguments: {},
|
|
447
|
+
explicitPathsToArguments: {
|
|
448
|
+
commentId: "$[0]",
|
|
449
|
+
reply: "$[1]",
|
|
450
|
+
revision: "$[2].revision"
|
|
451
|
+
},
|
|
452
|
+
singleArgumentUnchanged: false
|
|
453
|
+
},
|
|
454
|
+
["commentId", "reply", "options"]
|
|
455
|
+
);
|
|
456
|
+
sideEffects?.onError?.(err);
|
|
457
|
+
throw transformedError;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
async function updateCommentReply2(identifiers, message, options) {
|
|
461
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
462
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
463
|
+
commentId: identifiers?.commentId,
|
|
464
|
+
replyIndex: identifiers?.replyIndex,
|
|
465
|
+
message,
|
|
466
|
+
revision: options?.revision
|
|
467
|
+
});
|
|
468
|
+
const reqOpts = updateCommentReply(payload);
|
|
469
|
+
sideEffects?.onSiteCall?.();
|
|
470
|
+
try {
|
|
471
|
+
const result = await httpClient.request(reqOpts);
|
|
472
|
+
sideEffects?.onSuccess?.(result);
|
|
473
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
474
|
+
} catch (err) {
|
|
475
|
+
const transformedError = sdkTransformError(
|
|
476
|
+
err,
|
|
477
|
+
{
|
|
478
|
+
spreadPathsToArguments: {},
|
|
479
|
+
explicitPathsToArguments: {
|
|
480
|
+
commentId: "$[0].commentId",
|
|
481
|
+
replyIndex: "$[0].replyIndex",
|
|
482
|
+
message: "$[1]",
|
|
483
|
+
revision: "$[2].revision"
|
|
484
|
+
},
|
|
485
|
+
singleArgumentUnchanged: false
|
|
486
|
+
},
|
|
487
|
+
["identifiers", "message", "options"]
|
|
488
|
+
);
|
|
489
|
+
sideEffects?.onError?.(err);
|
|
490
|
+
throw transformedError;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
async function deleteCommentReply2(identifiers, revision) {
|
|
494
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
495
|
+
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
496
|
+
commentId: identifiers?.commentId,
|
|
497
|
+
replyIndex: identifiers?.replyIndex,
|
|
498
|
+
revision
|
|
499
|
+
});
|
|
500
|
+
const reqOpts = deleteCommentReply(payload);
|
|
501
|
+
sideEffects?.onSiteCall?.();
|
|
502
|
+
try {
|
|
503
|
+
const result = await httpClient.request(reqOpts);
|
|
504
|
+
sideEffects?.onSuccess?.(result);
|
|
505
|
+
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
506
|
+
} catch (err) {
|
|
507
|
+
const transformedError = sdkTransformError(
|
|
508
|
+
err,
|
|
509
|
+
{
|
|
510
|
+
spreadPathsToArguments: {},
|
|
511
|
+
explicitPathsToArguments: {
|
|
512
|
+
commentId: "$[0].commentId",
|
|
513
|
+
replyIndex: "$[0].replyIndex",
|
|
514
|
+
revision: "$[1]"
|
|
515
|
+
},
|
|
516
|
+
singleArgumentUnchanged: false
|
|
517
|
+
},
|
|
518
|
+
["identifiers", "revision"]
|
|
519
|
+
);
|
|
520
|
+
sideEffects?.onError?.(err);
|
|
521
|
+
throw transformedError;
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
// src/partners-feedback-v1-comment-comments.public.ts
|
|
526
|
+
function getComment3(httpClient) {
|
|
527
|
+
return (commentId) => getComment2(
|
|
528
|
+
commentId,
|
|
529
|
+
// @ts-ignore
|
|
530
|
+
{ httpClient }
|
|
531
|
+
);
|
|
532
|
+
}
|
|
533
|
+
function queryComments3(httpClient) {
|
|
534
|
+
return (query) => queryComments2(
|
|
535
|
+
query,
|
|
536
|
+
// @ts-ignore
|
|
537
|
+
{ httpClient }
|
|
538
|
+
);
|
|
539
|
+
}
|
|
540
|
+
function updateCommentStatus3(httpClient) {
|
|
541
|
+
return (commentId, status, options) => updateCommentStatus2(
|
|
542
|
+
commentId,
|
|
543
|
+
status,
|
|
544
|
+
options,
|
|
545
|
+
// @ts-ignore
|
|
546
|
+
{ httpClient }
|
|
547
|
+
);
|
|
548
|
+
}
|
|
549
|
+
function deleteComment3(httpClient) {
|
|
550
|
+
return (commentId) => deleteComment2(
|
|
551
|
+
commentId,
|
|
552
|
+
// @ts-ignore
|
|
553
|
+
{ httpClient }
|
|
554
|
+
);
|
|
555
|
+
}
|
|
556
|
+
function createCommentReply3(httpClient) {
|
|
557
|
+
return (commentId, reply, options) => createCommentReply2(
|
|
558
|
+
commentId,
|
|
559
|
+
reply,
|
|
560
|
+
options,
|
|
561
|
+
// @ts-ignore
|
|
562
|
+
{ httpClient }
|
|
563
|
+
);
|
|
564
|
+
}
|
|
565
|
+
function updateCommentReply3(httpClient) {
|
|
566
|
+
return (identifiers, message, options) => updateCommentReply2(
|
|
567
|
+
identifiers,
|
|
568
|
+
message,
|
|
569
|
+
options,
|
|
570
|
+
// @ts-ignore
|
|
571
|
+
{ httpClient }
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
function deleteCommentReply3(httpClient) {
|
|
575
|
+
return (identifiers, revision) => deleteCommentReply2(
|
|
576
|
+
identifiers,
|
|
577
|
+
revision,
|
|
578
|
+
// @ts-ignore
|
|
579
|
+
{ httpClient }
|
|
580
|
+
);
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
// src/partners-feedback-v1-comment-comments.context.ts
|
|
584
|
+
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
585
|
+
var getComment4 = /* @__PURE__ */ createRESTModule(getComment3);
|
|
586
|
+
var queryComments4 = /* @__PURE__ */ createRESTModule(queryComments3);
|
|
587
|
+
var updateCommentStatus4 = /* @__PURE__ */ createRESTModule(updateCommentStatus3);
|
|
588
|
+
var deleteComment4 = /* @__PURE__ */ createRESTModule(deleteComment3);
|
|
589
|
+
var createCommentReply4 = /* @__PURE__ */ createRESTModule(createCommentReply3);
|
|
590
|
+
var updateCommentReply4 = /* @__PURE__ */ createRESTModule(updateCommentReply3);
|
|
591
|
+
var deleteCommentReply4 = /* @__PURE__ */ createRESTModule(deleteCommentReply3);
|
|
592
|
+
export {
|
|
593
|
+
SortOrder,
|
|
594
|
+
Status,
|
|
595
|
+
WebhookIdentityType,
|
|
596
|
+
createCommentReply4 as createCommentReply,
|
|
597
|
+
deleteComment4 as deleteComment,
|
|
598
|
+
deleteCommentReply4 as deleteCommentReply,
|
|
599
|
+
getComment4 as getComment,
|
|
600
|
+
queryComments4 as queryComments,
|
|
601
|
+
updateCommentReply4 as updateCommentReply,
|
|
602
|
+
updateCommentStatus4 as updateCommentStatus
|
|
603
|
+
};
|
|
604
|
+
//# sourceMappingURL=index.mjs.map
|