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