@wix/auto_sdk_containers_projects 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 +616 -0
- package/build/cjs/index.js +681 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +599 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +560 -0
- package/build/cjs/meta.js +527 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +616 -0
- package/build/es/index.mjs +645 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +1 -0
- package/build/es/index.typings.mjs +563 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +560 -0
- package/build/es/meta.mjs +488 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +129 -0
- package/build/internal/cjs/index.typings.d.ts +745 -0
- package/build/internal/cjs/meta.d.ts +608 -0
- package/build/internal/es/index.d.mts +129 -0
- package/build/internal/es/index.typings.d.mts +745 -0
- package/build/internal/es/meta.d.mts +608 -0
- package/meta/package.json +3 -0
- package/package.json +54 -0
|
@@ -0,0 +1,599 @@
|
|
|
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
|
+
Platform: () => Platform,
|
|
24
|
+
ProjectStatus: () => ProjectStatus,
|
|
25
|
+
SandboxStatus: () => SandboxStatus,
|
|
26
|
+
WebhookIdentityType: () => WebhookIdentityType,
|
|
27
|
+
createProject: () => createProject2,
|
|
28
|
+
deleteProject: () => deleteProject2,
|
|
29
|
+
getProject: () => getProject2,
|
|
30
|
+
listProjects: () => listProjects2,
|
|
31
|
+
regenerateProjectIcon: () => regenerateProjectIcon2,
|
|
32
|
+
regenerateProjectName: () => regenerateProjectName2,
|
|
33
|
+
resumeProject: () => resumeProject2,
|
|
34
|
+
saveProjectDesign: () => saveProjectDesign2,
|
|
35
|
+
updateProject: () => updateProject2
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(index_typings_exports);
|
|
38
|
+
|
|
39
|
+
// src/containers-projects-v1-project-projects.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/containers-projects-v1-project-projects.http.ts
|
|
44
|
+
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
45
|
+
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
46
|
+
var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
47
|
+
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
48
|
+
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
49
|
+
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
50
|
+
function resolveWixContainersProjectsV1ContainersProjectsUrl(opts) {
|
|
51
|
+
const domainToMappings = {
|
|
52
|
+
"manage._base_domain_": [
|
|
53
|
+
{
|
|
54
|
+
srcPath: "/_api/containers-projects",
|
|
55
|
+
destPath: ""
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
};
|
|
59
|
+
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
60
|
+
}
|
|
61
|
+
var PACKAGE_NAME = "@wix/auto_sdk_containers_projects";
|
|
62
|
+
function createProject(payload) {
|
|
63
|
+
function __createProject({ host }) {
|
|
64
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
65
|
+
{
|
|
66
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
67
|
+
paths: [
|
|
68
|
+
{ path: "project.createdDate" },
|
|
69
|
+
{ path: "project.updatedDate" }
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
]);
|
|
73
|
+
const metadata = {
|
|
74
|
+
entityFqdn: "wix.containers.projects.v1.project",
|
|
75
|
+
method: "POST",
|
|
76
|
+
methodFqn: "wix.containers.projects.v1.ContainersProjects.CreateProject",
|
|
77
|
+
packageName: PACKAGE_NAME,
|
|
78
|
+
migrationOptions: {
|
|
79
|
+
optInTransformResponse: true
|
|
80
|
+
},
|
|
81
|
+
url: resolveWixContainersProjectsV1ContainersProjectsUrl({
|
|
82
|
+
protoPath: "/v1/projects",
|
|
83
|
+
data: serializedData,
|
|
84
|
+
host
|
|
85
|
+
}),
|
|
86
|
+
data: serializedData,
|
|
87
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
88
|
+
{
|
|
89
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
90
|
+
paths: [
|
|
91
|
+
{ path: "project.createdDate" },
|
|
92
|
+
{ path: "project.updatedDate" }
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
])
|
|
96
|
+
};
|
|
97
|
+
return metadata;
|
|
98
|
+
}
|
|
99
|
+
return __createProject;
|
|
100
|
+
}
|
|
101
|
+
function getProject(payload) {
|
|
102
|
+
function __getProject({ host }) {
|
|
103
|
+
const metadata = {
|
|
104
|
+
entityFqdn: "wix.containers.projects.v1.project",
|
|
105
|
+
method: "GET",
|
|
106
|
+
methodFqn: "wix.containers.projects.v1.ContainersProjects.GetProject",
|
|
107
|
+
packageName: PACKAGE_NAME,
|
|
108
|
+
migrationOptions: {
|
|
109
|
+
optInTransformResponse: true
|
|
110
|
+
},
|
|
111
|
+
url: resolveWixContainersProjectsV1ContainersProjectsUrl({
|
|
112
|
+
protoPath: "/v1/projects/{projectId}",
|
|
113
|
+
data: payload,
|
|
114
|
+
host
|
|
115
|
+
}),
|
|
116
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
117
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
118
|
+
{
|
|
119
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
120
|
+
paths: [
|
|
121
|
+
{ path: "project.createdDate" },
|
|
122
|
+
{ path: "project.updatedDate" }
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
])
|
|
126
|
+
};
|
|
127
|
+
return metadata;
|
|
128
|
+
}
|
|
129
|
+
return __getProject;
|
|
130
|
+
}
|
|
131
|
+
function updateProject(payload) {
|
|
132
|
+
function __updateProject({ host }) {
|
|
133
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
134
|
+
{
|
|
135
|
+
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
136
|
+
paths: [{ path: "fieldMask" }]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
140
|
+
paths: [
|
|
141
|
+
{ path: "project.createdDate" },
|
|
142
|
+
{ path: "project.updatedDate" }
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
]);
|
|
146
|
+
const metadata = {
|
|
147
|
+
entityFqdn: "wix.containers.projects.v1.project",
|
|
148
|
+
method: "PATCH",
|
|
149
|
+
methodFqn: "wix.containers.projects.v1.ContainersProjects.UpdateProject",
|
|
150
|
+
packageName: PACKAGE_NAME,
|
|
151
|
+
migrationOptions: {
|
|
152
|
+
optInTransformResponse: true
|
|
153
|
+
},
|
|
154
|
+
url: resolveWixContainersProjectsV1ContainersProjectsUrl({
|
|
155
|
+
protoPath: "/v1/projects/{project.id}",
|
|
156
|
+
data: serializedData,
|
|
157
|
+
host
|
|
158
|
+
}),
|
|
159
|
+
data: serializedData,
|
|
160
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
161
|
+
{
|
|
162
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
163
|
+
paths: [
|
|
164
|
+
{ path: "project.createdDate" },
|
|
165
|
+
{ path: "project.updatedDate" }
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
])
|
|
169
|
+
};
|
|
170
|
+
return metadata;
|
|
171
|
+
}
|
|
172
|
+
return __updateProject;
|
|
173
|
+
}
|
|
174
|
+
function deleteProject(payload) {
|
|
175
|
+
function __deleteProject({ host }) {
|
|
176
|
+
const metadata = {
|
|
177
|
+
entityFqdn: "wix.containers.projects.v1.project",
|
|
178
|
+
method: "DELETE",
|
|
179
|
+
methodFqn: "wix.containers.projects.v1.ContainersProjects.DeleteProject",
|
|
180
|
+
packageName: PACKAGE_NAME,
|
|
181
|
+
migrationOptions: {
|
|
182
|
+
optInTransformResponse: true
|
|
183
|
+
},
|
|
184
|
+
url: resolveWixContainersProjectsV1ContainersProjectsUrl({
|
|
185
|
+
protoPath: "/v1/projects/{projectId}",
|
|
186
|
+
data: payload,
|
|
187
|
+
host
|
|
188
|
+
}),
|
|
189
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
190
|
+
};
|
|
191
|
+
return metadata;
|
|
192
|
+
}
|
|
193
|
+
return __deleteProject;
|
|
194
|
+
}
|
|
195
|
+
function resumeProject(payload) {
|
|
196
|
+
function __resumeProject({ host }) {
|
|
197
|
+
const metadata = {
|
|
198
|
+
entityFqdn: "wix.containers.projects.v1.project",
|
|
199
|
+
method: "POST",
|
|
200
|
+
methodFqn: "wix.containers.projects.v1.ContainersProjects.ResumeProject",
|
|
201
|
+
packageName: PACKAGE_NAME,
|
|
202
|
+
migrationOptions: {
|
|
203
|
+
optInTransformResponse: true
|
|
204
|
+
},
|
|
205
|
+
url: resolveWixContainersProjectsV1ContainersProjectsUrl({
|
|
206
|
+
protoPath: "/v1/projects/{projectId}/resume",
|
|
207
|
+
data: payload,
|
|
208
|
+
host
|
|
209
|
+
}),
|
|
210
|
+
data: payload,
|
|
211
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
212
|
+
{
|
|
213
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
214
|
+
paths: [
|
|
215
|
+
{ path: "project.createdDate" },
|
|
216
|
+
{ path: "project.updatedDate" }
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
])
|
|
220
|
+
};
|
|
221
|
+
return metadata;
|
|
222
|
+
}
|
|
223
|
+
return __resumeProject;
|
|
224
|
+
}
|
|
225
|
+
function regenerateProjectName(payload) {
|
|
226
|
+
function __regenerateProjectName({ host }) {
|
|
227
|
+
const metadata = {
|
|
228
|
+
entityFqdn: "wix.containers.projects.v1.project",
|
|
229
|
+
method: "POST",
|
|
230
|
+
methodFqn: "wix.containers.projects.v1.ContainersProjects.RegenerateProjectName",
|
|
231
|
+
packageName: PACKAGE_NAME,
|
|
232
|
+
migrationOptions: {
|
|
233
|
+
optInTransformResponse: true
|
|
234
|
+
},
|
|
235
|
+
url: resolveWixContainersProjectsV1ContainersProjectsUrl({
|
|
236
|
+
protoPath: "/v1/projects/{projectId}/regenerate-name",
|
|
237
|
+
data: payload,
|
|
238
|
+
host
|
|
239
|
+
}),
|
|
240
|
+
data: payload
|
|
241
|
+
};
|
|
242
|
+
return metadata;
|
|
243
|
+
}
|
|
244
|
+
return __regenerateProjectName;
|
|
245
|
+
}
|
|
246
|
+
function regenerateProjectIcon(payload) {
|
|
247
|
+
function __regenerateProjectIcon({ host }) {
|
|
248
|
+
const metadata = {
|
|
249
|
+
entityFqdn: "wix.containers.projects.v1.project",
|
|
250
|
+
method: "POST",
|
|
251
|
+
methodFqn: "wix.containers.projects.v1.ContainersProjects.RegenerateProjectIcon",
|
|
252
|
+
packageName: PACKAGE_NAME,
|
|
253
|
+
migrationOptions: {
|
|
254
|
+
optInTransformResponse: true
|
|
255
|
+
},
|
|
256
|
+
url: resolveWixContainersProjectsV1ContainersProjectsUrl({
|
|
257
|
+
protoPath: "/v1/projects/{projectId}/regenerate-icon",
|
|
258
|
+
data: payload,
|
|
259
|
+
host
|
|
260
|
+
}),
|
|
261
|
+
data: payload
|
|
262
|
+
};
|
|
263
|
+
return metadata;
|
|
264
|
+
}
|
|
265
|
+
return __regenerateProjectIcon;
|
|
266
|
+
}
|
|
267
|
+
function saveProjectDesign(payload) {
|
|
268
|
+
function __saveProjectDesign({ host }) {
|
|
269
|
+
const metadata = {
|
|
270
|
+
entityFqdn: "wix.containers.projects.v1.project",
|
|
271
|
+
method: "POST",
|
|
272
|
+
methodFqn: "wix.containers.projects.v1.ContainersProjects.SaveProjectDesign",
|
|
273
|
+
packageName: PACKAGE_NAME,
|
|
274
|
+
migrationOptions: {
|
|
275
|
+
optInTransformResponse: true
|
|
276
|
+
},
|
|
277
|
+
url: resolveWixContainersProjectsV1ContainersProjectsUrl({
|
|
278
|
+
protoPath: "/v1/projects/{projectId}/save-design",
|
|
279
|
+
data: payload,
|
|
280
|
+
host
|
|
281
|
+
}),
|
|
282
|
+
data: payload,
|
|
283
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
284
|
+
{
|
|
285
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
286
|
+
paths: [{ path: "previewTokenExpiresAt" }]
|
|
287
|
+
}
|
|
288
|
+
])
|
|
289
|
+
};
|
|
290
|
+
return metadata;
|
|
291
|
+
}
|
|
292
|
+
return __saveProjectDesign;
|
|
293
|
+
}
|
|
294
|
+
function listProjects(payload) {
|
|
295
|
+
function __listProjects({ host }) {
|
|
296
|
+
const metadata = {
|
|
297
|
+
entityFqdn: "wix.containers.projects.v1.project",
|
|
298
|
+
method: "GET",
|
|
299
|
+
methodFqn: "wix.containers.projects.v1.ContainersProjects.ListProjects",
|
|
300
|
+
packageName: PACKAGE_NAME,
|
|
301
|
+
migrationOptions: {
|
|
302
|
+
optInTransformResponse: true
|
|
303
|
+
},
|
|
304
|
+
url: resolveWixContainersProjectsV1ContainersProjectsUrl({
|
|
305
|
+
protoPath: "/v1/projects",
|
|
306
|
+
data: payload,
|
|
307
|
+
host
|
|
308
|
+
}),
|
|
309
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
310
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
311
|
+
{
|
|
312
|
+
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
313
|
+
paths: [
|
|
314
|
+
{ path: "projects.createdDate" },
|
|
315
|
+
{ path: "projects.updatedDate" }
|
|
316
|
+
]
|
|
317
|
+
}
|
|
318
|
+
])
|
|
319
|
+
};
|
|
320
|
+
return metadata;
|
|
321
|
+
}
|
|
322
|
+
return __listProjects;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// src/containers-projects-v1-project-projects.universal.ts
|
|
326
|
+
var ProjectStatus = /* @__PURE__ */ ((ProjectStatus2) => {
|
|
327
|
+
ProjectStatus2["PLANNING"] = "PLANNING";
|
|
328
|
+
ProjectStatus2["BUILDING"] = "BUILDING";
|
|
329
|
+
ProjectStatus2["PLAN_READY"] = "PLAN_READY";
|
|
330
|
+
return ProjectStatus2;
|
|
331
|
+
})(ProjectStatus || {});
|
|
332
|
+
var SandboxStatus = /* @__PURE__ */ ((SandboxStatus2) => {
|
|
333
|
+
SandboxStatus2["NONE"] = "NONE";
|
|
334
|
+
SandboxStatus2["CREATING"] = "CREATING";
|
|
335
|
+
return SandboxStatus2;
|
|
336
|
+
})(SandboxStatus || {});
|
|
337
|
+
var Platform = /* @__PURE__ */ ((Platform2) => {
|
|
338
|
+
Platform2["IOS"] = "IOS";
|
|
339
|
+
Platform2["ANDROID"] = "ANDROID";
|
|
340
|
+
Platform2["HIMALAYA_MOBILE"] = "HIMALAYA_MOBILE";
|
|
341
|
+
return Platform2;
|
|
342
|
+
})(Platform || {});
|
|
343
|
+
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
344
|
+
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
345
|
+
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
346
|
+
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
347
|
+
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
348
|
+
WebhookIdentityType2["APP"] = "APP";
|
|
349
|
+
return WebhookIdentityType2;
|
|
350
|
+
})(WebhookIdentityType || {});
|
|
351
|
+
async function createProject2(project) {
|
|
352
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
353
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ project });
|
|
354
|
+
const reqOpts = createProject(payload);
|
|
355
|
+
sideEffects?.onSiteCall?.();
|
|
356
|
+
try {
|
|
357
|
+
const result = await httpClient.request(reqOpts);
|
|
358
|
+
sideEffects?.onSuccess?.(result);
|
|
359
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.project;
|
|
360
|
+
} catch (err) {
|
|
361
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
362
|
+
err,
|
|
363
|
+
{
|
|
364
|
+
spreadPathsToArguments: {},
|
|
365
|
+
explicitPathsToArguments: { project: "$[0]" },
|
|
366
|
+
singleArgumentUnchanged: false
|
|
367
|
+
},
|
|
368
|
+
["project"]
|
|
369
|
+
);
|
|
370
|
+
sideEffects?.onError?.(err);
|
|
371
|
+
throw transformedError;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
async function getProject2(projectId) {
|
|
375
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
376
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
377
|
+
projectId
|
|
378
|
+
});
|
|
379
|
+
const reqOpts = getProject(payload);
|
|
380
|
+
sideEffects?.onSiteCall?.();
|
|
381
|
+
try {
|
|
382
|
+
const result = await httpClient.request(reqOpts);
|
|
383
|
+
sideEffects?.onSuccess?.(result);
|
|
384
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.project;
|
|
385
|
+
} catch (err) {
|
|
386
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
387
|
+
err,
|
|
388
|
+
{
|
|
389
|
+
spreadPathsToArguments: {},
|
|
390
|
+
explicitPathsToArguments: { projectId: "$[0]" },
|
|
391
|
+
singleArgumentUnchanged: false
|
|
392
|
+
},
|
|
393
|
+
["projectId"]
|
|
394
|
+
);
|
|
395
|
+
sideEffects?.onError?.(err);
|
|
396
|
+
throw transformedError;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
async function updateProject2(_id, project) {
|
|
400
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
401
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
402
|
+
project: { ...project, id: _id }
|
|
403
|
+
});
|
|
404
|
+
const reqOpts = updateProject(payload);
|
|
405
|
+
sideEffects?.onSiteCall?.();
|
|
406
|
+
try {
|
|
407
|
+
const result = await httpClient.request(reqOpts);
|
|
408
|
+
sideEffects?.onSuccess?.(result);
|
|
409
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data)?.project;
|
|
410
|
+
} catch (err) {
|
|
411
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
412
|
+
err,
|
|
413
|
+
{
|
|
414
|
+
spreadPathsToArguments: { project: "$[1]" },
|
|
415
|
+
explicitPathsToArguments: { "project.id": "$[0]" },
|
|
416
|
+
singleArgumentUnchanged: false
|
|
417
|
+
},
|
|
418
|
+
["_id", "project"]
|
|
419
|
+
);
|
|
420
|
+
sideEffects?.onError?.(err);
|
|
421
|
+
throw transformedError;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
async function deleteProject2(projectId) {
|
|
425
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
426
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
427
|
+
projectId
|
|
428
|
+
});
|
|
429
|
+
const reqOpts = deleteProject(payload);
|
|
430
|
+
sideEffects?.onSiteCall?.();
|
|
431
|
+
try {
|
|
432
|
+
const result = await httpClient.request(reqOpts);
|
|
433
|
+
sideEffects?.onSuccess?.(result);
|
|
434
|
+
} catch (err) {
|
|
435
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
436
|
+
err,
|
|
437
|
+
{
|
|
438
|
+
spreadPathsToArguments: {},
|
|
439
|
+
explicitPathsToArguments: { projectId: "$[0]" },
|
|
440
|
+
singleArgumentUnchanged: false
|
|
441
|
+
},
|
|
442
|
+
["projectId"]
|
|
443
|
+
);
|
|
444
|
+
sideEffects?.onError?.(err);
|
|
445
|
+
throw transformedError;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
async function resumeProject2(projectId) {
|
|
449
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
450
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
451
|
+
projectId
|
|
452
|
+
});
|
|
453
|
+
const reqOpts = resumeProject(payload);
|
|
454
|
+
sideEffects?.onSiteCall?.();
|
|
455
|
+
try {
|
|
456
|
+
const result = await httpClient.request(reqOpts);
|
|
457
|
+
sideEffects?.onSuccess?.(result);
|
|
458
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
459
|
+
} catch (err) {
|
|
460
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
461
|
+
err,
|
|
462
|
+
{
|
|
463
|
+
spreadPathsToArguments: {},
|
|
464
|
+
explicitPathsToArguments: { projectId: "$[0]" },
|
|
465
|
+
singleArgumentUnchanged: false
|
|
466
|
+
},
|
|
467
|
+
["projectId"]
|
|
468
|
+
);
|
|
469
|
+
sideEffects?.onError?.(err);
|
|
470
|
+
throw transformedError;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
async function regenerateProjectName2(projectId, prompt) {
|
|
474
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
475
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
476
|
+
projectId,
|
|
477
|
+
prompt
|
|
478
|
+
});
|
|
479
|
+
const reqOpts = regenerateProjectName(payload);
|
|
480
|
+
sideEffects?.onSiteCall?.();
|
|
481
|
+
try {
|
|
482
|
+
const result = await httpClient.request(reqOpts);
|
|
483
|
+
sideEffects?.onSuccess?.(result);
|
|
484
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
485
|
+
} catch (err) {
|
|
486
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
487
|
+
err,
|
|
488
|
+
{
|
|
489
|
+
spreadPathsToArguments: {},
|
|
490
|
+
explicitPathsToArguments: { projectId: "$[0]", prompt: "$[1]" },
|
|
491
|
+
singleArgumentUnchanged: false
|
|
492
|
+
},
|
|
493
|
+
["projectId", "prompt"]
|
|
494
|
+
);
|
|
495
|
+
sideEffects?.onError?.(err);
|
|
496
|
+
throw transformedError;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
async function regenerateProjectIcon2(projectId, prompt) {
|
|
500
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
501
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
502
|
+
projectId,
|
|
503
|
+
prompt
|
|
504
|
+
});
|
|
505
|
+
const reqOpts = regenerateProjectIcon(payload);
|
|
506
|
+
sideEffects?.onSiteCall?.();
|
|
507
|
+
try {
|
|
508
|
+
const result = await httpClient.request(reqOpts);
|
|
509
|
+
sideEffects?.onSuccess?.(result);
|
|
510
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
511
|
+
} catch (err) {
|
|
512
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
513
|
+
err,
|
|
514
|
+
{
|
|
515
|
+
spreadPathsToArguments: {},
|
|
516
|
+
explicitPathsToArguments: { projectId: "$[0]", prompt: "$[1]" },
|
|
517
|
+
singleArgumentUnchanged: false
|
|
518
|
+
},
|
|
519
|
+
["projectId", "prompt"]
|
|
520
|
+
);
|
|
521
|
+
sideEffects?.onError?.(err);
|
|
522
|
+
throw transformedError;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
async function saveProjectDesign2(projectId, baseReleaseId, options) {
|
|
526
|
+
const { httpClient, sideEffects } = arguments[3];
|
|
527
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
528
|
+
projectId,
|
|
529
|
+
baseReleaseId,
|
|
530
|
+
tokensJson: options?.tokensJson,
|
|
531
|
+
himalayaControlToken: options?.himalayaControlToken
|
|
532
|
+
});
|
|
533
|
+
const reqOpts = saveProjectDesign(payload);
|
|
534
|
+
sideEffects?.onSiteCall?.();
|
|
535
|
+
try {
|
|
536
|
+
const result = await httpClient.request(reqOpts);
|
|
537
|
+
sideEffects?.onSuccess?.(result);
|
|
538
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
539
|
+
} catch (err) {
|
|
540
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
541
|
+
err,
|
|
542
|
+
{
|
|
543
|
+
spreadPathsToArguments: {},
|
|
544
|
+
explicitPathsToArguments: {
|
|
545
|
+
projectId: "$[0]",
|
|
546
|
+
baseReleaseId: "$[1]",
|
|
547
|
+
tokensJson: "$[2].tokensJson",
|
|
548
|
+
himalayaControlToken: "$[2].himalayaControlToken"
|
|
549
|
+
},
|
|
550
|
+
singleArgumentUnchanged: false
|
|
551
|
+
},
|
|
552
|
+
["projectId", "baseReleaseId", "options"]
|
|
553
|
+
);
|
|
554
|
+
sideEffects?.onError?.(err);
|
|
555
|
+
throw transformedError;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
async function listProjects2(options) {
|
|
559
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
560
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
561
|
+
paging: options?.paging
|
|
562
|
+
});
|
|
563
|
+
const reqOpts = listProjects(payload);
|
|
564
|
+
sideEffects?.onSiteCall?.();
|
|
565
|
+
try {
|
|
566
|
+
const result = await httpClient.request(reqOpts);
|
|
567
|
+
sideEffects?.onSuccess?.(result);
|
|
568
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
569
|
+
} catch (err) {
|
|
570
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
571
|
+
err,
|
|
572
|
+
{
|
|
573
|
+
spreadPathsToArguments: {},
|
|
574
|
+
explicitPathsToArguments: { paging: "$[0].paging" },
|
|
575
|
+
singleArgumentUnchanged: false
|
|
576
|
+
},
|
|
577
|
+
["options"]
|
|
578
|
+
);
|
|
579
|
+
sideEffects?.onError?.(err);
|
|
580
|
+
throw transformedError;
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
584
|
+
0 && (module.exports = {
|
|
585
|
+
Platform,
|
|
586
|
+
ProjectStatus,
|
|
587
|
+
SandboxStatus,
|
|
588
|
+
WebhookIdentityType,
|
|
589
|
+
createProject,
|
|
590
|
+
deleteProject,
|
|
591
|
+
getProject,
|
|
592
|
+
listProjects,
|
|
593
|
+
regenerateProjectIcon,
|
|
594
|
+
regenerateProjectName,
|
|
595
|
+
resumeProject,
|
|
596
|
+
saveProjectDesign,
|
|
597
|
+
updateProject
|
|
598
|
+
});
|
|
599
|
+
//# sourceMappingURL=index.typings.js.map
|