@wix/auto_sdk_containers_projects 1.0.0 → 1.0.2
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 +71 -2
- package/build/cjs/index.js +79 -32
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +71 -32
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +69 -3
- package/build/cjs/meta.js +60 -30
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +71 -2
- package/build/es/index.mjs +78 -32
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +70 -32
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +69 -3
- package/build/es/meta.mjs +59 -30
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +16 -4
- package/build/internal/cjs/index.typings.d.ts +83 -4
- package/build/internal/cjs/meta.d.ts +69 -3
- package/build/internal/es/index.d.mts +16 -4
- package/build/internal/es/index.typings.d.mts +83 -4
- package/build/internal/es/meta.d.mts +69 -3
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -147,10 +147,15 @@ interface CreateAgentSessionResponse {
|
|
|
147
147
|
}
|
|
148
148
|
interface RefreshAgentSiteTokenRequest {
|
|
149
149
|
/**
|
|
150
|
-
*
|
|
150
|
+
* Exact project/job tuple whose initiating user's site token should be re-minted.
|
|
151
151
|
* @format GUID
|
|
152
152
|
*/
|
|
153
153
|
projectId?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Job whose persisted initiating user and MetaSite provenance must be revalidated.
|
|
156
|
+
* @format GUID
|
|
157
|
+
*/
|
|
158
|
+
jobId?: string;
|
|
154
159
|
}
|
|
155
160
|
interface RefreshAgentSiteTokenResponse {
|
|
156
161
|
/**
|
|
@@ -163,6 +168,28 @@ interface RefreshAgentSiteTokenResponse {
|
|
|
163
168
|
accessToken?: string;
|
|
164
169
|
/** Seconds until the returned token expires, as reported by oauth2-ng. */
|
|
165
170
|
expiresIn?: string;
|
|
171
|
+
/** Version of the job-bound authorization response contract. */
|
|
172
|
+
authorizationVersion?: number;
|
|
173
|
+
/**
|
|
174
|
+
* The project authorized by this refresh.
|
|
175
|
+
* @format GUID
|
|
176
|
+
*/
|
|
177
|
+
projectId?: string;
|
|
178
|
+
/**
|
|
179
|
+
* The job authorized by this refresh.
|
|
180
|
+
* @format GUID
|
|
181
|
+
*/
|
|
182
|
+
jobId?: string;
|
|
183
|
+
/**
|
|
184
|
+
* Trusted MetaSite captured when the job was created.
|
|
185
|
+
* @format GUID
|
|
186
|
+
*/
|
|
187
|
+
metaSiteId?: string;
|
|
188
|
+
/**
|
|
189
|
+
* Trusted dashboard USER captured when the job was created.
|
|
190
|
+
* @format GUID
|
|
191
|
+
*/
|
|
192
|
+
initiatingUserId?: string;
|
|
166
193
|
}
|
|
167
194
|
interface DomainEvent extends DomainEventBodyOneOf {
|
|
168
195
|
createdEvent?: EntityCreatedEvent;
|
|
@@ -492,6 +519,12 @@ interface SaveProjectDesignRequest {
|
|
|
492
519
|
* @maxLength 4096
|
|
493
520
|
*/
|
|
494
521
|
himalayaControlToken: string;
|
|
522
|
+
/**
|
|
523
|
+
* Client assertion of the canonical app returned by authenticated Himalaya lookup. Catalyst
|
|
524
|
+
* resolves and validates the same value; it is never used as an unchecked write target.
|
|
525
|
+
* @maxLength 200
|
|
526
|
+
*/
|
|
527
|
+
canonicalApp?: string;
|
|
495
528
|
}
|
|
496
529
|
interface SaveProjectDesignResponse {
|
|
497
530
|
/**
|
|
@@ -518,6 +551,36 @@ interface ListProjectsResponse {
|
|
|
518
551
|
/** Paging metadata for cursor-based pagination. */
|
|
519
552
|
pagingMetadata?: CursorPagingMetadata;
|
|
520
553
|
}
|
|
554
|
+
interface GetHimalayaAuthorizationRequest {
|
|
555
|
+
/**
|
|
556
|
+
* Site-tenanted Containers project being authorized.
|
|
557
|
+
* @format GUID
|
|
558
|
+
*/
|
|
559
|
+
projectId: string;
|
|
560
|
+
}
|
|
561
|
+
interface GetHimalayaAuthorizationResponse {
|
|
562
|
+
/** Version of the authorization capability contract. */
|
|
563
|
+
authorizationVersion?: number;
|
|
564
|
+
/**
|
|
565
|
+
* Trusted MetaSite selected from request identity context.
|
|
566
|
+
* @format GUID
|
|
567
|
+
*/
|
|
568
|
+
metaSiteId?: string;
|
|
569
|
+
/**
|
|
570
|
+
* Site-tenanted Containers project authorized by the lookup.
|
|
571
|
+
* @format GUID
|
|
572
|
+
*/
|
|
573
|
+
projectId?: string;
|
|
574
|
+
/**
|
|
575
|
+
* Verified canonical Himalaya app slug.
|
|
576
|
+
* @maxLength 200
|
|
577
|
+
*/
|
|
578
|
+
canonicalApp?: string;
|
|
579
|
+
/** Whether a fresh worker launch is currently authorized. */
|
|
580
|
+
workerLaunch?: boolean;
|
|
581
|
+
/** Whether a fresh design save is currently authorized. */
|
|
582
|
+
saveDesign?: boolean;
|
|
583
|
+
}
|
|
521
584
|
interface UpdateProject {
|
|
522
585
|
/**
|
|
523
586
|
* Project ID.
|
|
@@ -607,10 +670,16 @@ interface SaveProjectDesignOptions {
|
|
|
607
670
|
* @maxLength 4096
|
|
608
671
|
*/
|
|
609
672
|
himalayaControlToken: string;
|
|
673
|
+
/**
|
|
674
|
+
* Client assertion of the canonical app returned by authenticated Himalaya lookup. Catalyst
|
|
675
|
+
* resolves and validates the same value; it is never used as an unchecked write target.
|
|
676
|
+
* @maxLength 200
|
|
677
|
+
*/
|
|
678
|
+
canonicalApp?: string;
|
|
610
679
|
}
|
|
611
680
|
interface ListProjectsOptions {
|
|
612
681
|
/** Cursor paging options. */
|
|
613
682
|
paging?: CursorPaging;
|
|
614
683
|
}
|
|
615
684
|
|
|
616
|
-
export { type AccountInfo, type ActionEvent, type CreateAgentSessionRequest, type CreateAgentSessionResponse, type CreateProjectRequest, type CreateProjectResponse, type CursorPaging, type CursorPagingMetadata, type Cursors, type DeleteProjectRequest, type DeleteProjectResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type GetProjectRequest, type GetProjectResponse, type IdentificationData, type IdentificationDataIdOneOf, type ListProjectsForCurrentUserRequest, type ListProjectsForCurrentUserResponse, type ListProjectsOptions, type ListProjectsRequest, type ListProjectsResponse, type MessageEnvelope, Platform, type PlatformWithLiterals, type Project, type ProjectPlanReady, type ProjectResumeRequested, type ProjectStartRequested, ProjectStatus, type ProjectStatusWithLiterals, type RefreshAgentSiteTokenRequest, type RefreshAgentSiteTokenResponse, type RegenerateProjectIconRequest, type RegenerateProjectIconResponse, type RegenerateProjectNameRequest, type RegenerateProjectNameResponse, type RestoreInfo, type ResumeProjectRequest, type ResumeProjectResponse, SandboxStatus, type SandboxStatusWithLiterals, type SaveProjectDesignOptions, type SaveProjectDesignRequest, type SaveProjectDesignResponse, type StartProjectRequest, type StartProjectResponse, type UpdateProject, type UpdateProjectRequest, type UpdateProjectResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals };
|
|
685
|
+
export { type AccountInfo, type ActionEvent, type CreateAgentSessionRequest, type CreateAgentSessionResponse, type CreateProjectRequest, type CreateProjectResponse, type CursorPaging, type CursorPagingMetadata, type Cursors, type DeleteProjectRequest, type DeleteProjectResponse, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type GetHimalayaAuthorizationRequest, type GetHimalayaAuthorizationResponse, type GetProjectRequest, type GetProjectResponse, type IdentificationData, type IdentificationDataIdOneOf, type ListProjectsForCurrentUserRequest, type ListProjectsForCurrentUserResponse, type ListProjectsOptions, type ListProjectsRequest, type ListProjectsResponse, type MessageEnvelope, Platform, type PlatformWithLiterals, type Project, type ProjectPlanReady, type ProjectResumeRequested, type ProjectStartRequested, ProjectStatus, type ProjectStatusWithLiterals, type RefreshAgentSiteTokenRequest, type RefreshAgentSiteTokenResponse, type RegenerateProjectIconRequest, type RegenerateProjectIconResponse, type RegenerateProjectNameRequest, type RegenerateProjectNameResponse, type RestoreInfo, type ResumeProjectRequest, type ResumeProjectResponse, SandboxStatus, type SandboxStatusWithLiterals, type SaveProjectDesignOptions, type SaveProjectDesignRequest, type SaveProjectDesignResponse, type StartProjectRequest, type StartProjectResponse, type UpdateProject, type UpdateProjectRequest, type UpdateProjectResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals };
|
package/build/cjs/index.js
CHANGED
|
@@ -26,6 +26,7 @@ __export(index_exports, {
|
|
|
26
26
|
WebhookIdentityType: () => WebhookIdentityType,
|
|
27
27
|
createProject: () => createProject4,
|
|
28
28
|
deleteProject: () => deleteProject4,
|
|
29
|
+
getHimalayaAuthorization: () => getHimalayaAuthorization4,
|
|
29
30
|
getProject: () => getProject4,
|
|
30
31
|
listProjects: () => listProjects4,
|
|
31
32
|
regenerateProjectIcon: () => regenerateProjectIcon4,
|
|
@@ -47,6 +48,16 @@ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
|
47
48
|
var import_field_mask = require("@wix/sdk-runtime/transformations/field-mask");
|
|
48
49
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
49
50
|
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
51
|
+
var TRANSFORM_PATHS_0 = [
|
|
52
|
+
{ path: "project.createdDate" },
|
|
53
|
+
{ path: "project.updatedDate" }
|
|
54
|
+
];
|
|
55
|
+
var TRANSFORM_PATHS_1 = [{ path: "fieldMask" }];
|
|
56
|
+
var TRANSFORM_PATHS_2 = [{ path: "previewTokenExpiresAt" }];
|
|
57
|
+
var TRANSFORM_PATHS_3 = [
|
|
58
|
+
{ path: "projects.createdDate" },
|
|
59
|
+
{ path: "projects.updatedDate" }
|
|
60
|
+
];
|
|
50
61
|
function resolveWixContainersProjectsV1ContainersProjectsUrl(opts) {
|
|
51
62
|
const domainToMappings = {
|
|
52
63
|
"manage._base_domain_": [
|
|
@@ -64,10 +75,7 @@ function createProject(payload) {
|
|
|
64
75
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
65
76
|
{
|
|
66
77
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
67
|
-
paths:
|
|
68
|
-
{ path: "project.createdDate" },
|
|
69
|
-
{ path: "project.updatedDate" }
|
|
70
|
-
]
|
|
78
|
+
paths: TRANSFORM_PATHS_0
|
|
71
79
|
}
|
|
72
80
|
]);
|
|
73
81
|
const metadata = {
|
|
@@ -87,10 +95,7 @@ function createProject(payload) {
|
|
|
87
95
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
88
96
|
{
|
|
89
97
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
90
|
-
paths:
|
|
91
|
-
{ path: "project.createdDate" },
|
|
92
|
-
{ path: "project.updatedDate" }
|
|
93
|
-
]
|
|
98
|
+
paths: TRANSFORM_PATHS_0
|
|
94
99
|
}
|
|
95
100
|
])
|
|
96
101
|
};
|
|
@@ -117,10 +122,7 @@ function getProject(payload) {
|
|
|
117
122
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
118
123
|
{
|
|
119
124
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
120
|
-
paths:
|
|
121
|
-
{ path: "project.createdDate" },
|
|
122
|
-
{ path: "project.updatedDate" }
|
|
123
|
-
]
|
|
125
|
+
paths: TRANSFORM_PATHS_0
|
|
124
126
|
}
|
|
125
127
|
])
|
|
126
128
|
};
|
|
@@ -133,14 +135,11 @@ function updateProject(payload) {
|
|
|
133
135
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
134
136
|
{
|
|
135
137
|
transformFn: import_field_mask.transformSDKFieldMaskToRESTFieldMask,
|
|
136
|
-
paths:
|
|
138
|
+
paths: TRANSFORM_PATHS_1
|
|
137
139
|
},
|
|
138
140
|
{
|
|
139
141
|
transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
|
|
140
|
-
paths:
|
|
141
|
-
{ path: "project.createdDate" },
|
|
142
|
-
{ path: "project.updatedDate" }
|
|
143
|
-
]
|
|
142
|
+
paths: TRANSFORM_PATHS_0
|
|
144
143
|
}
|
|
145
144
|
]);
|
|
146
145
|
const metadata = {
|
|
@@ -160,10 +159,7 @@ function updateProject(payload) {
|
|
|
160
159
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
161
160
|
{
|
|
162
161
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
163
|
-
paths:
|
|
164
|
-
{ path: "project.createdDate" },
|
|
165
|
-
{ path: "project.updatedDate" }
|
|
166
|
-
]
|
|
162
|
+
paths: TRANSFORM_PATHS_0
|
|
167
163
|
}
|
|
168
164
|
])
|
|
169
165
|
};
|
|
@@ -211,10 +207,7 @@ function resumeProject(payload) {
|
|
|
211
207
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
212
208
|
{
|
|
213
209
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
214
|
-
paths:
|
|
215
|
-
{ path: "project.createdDate" },
|
|
216
|
-
{ path: "project.updatedDate" }
|
|
217
|
-
]
|
|
210
|
+
paths: TRANSFORM_PATHS_0
|
|
218
211
|
}
|
|
219
212
|
])
|
|
220
213
|
};
|
|
@@ -283,7 +276,7 @@ function saveProjectDesign(payload) {
|
|
|
283
276
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
284
277
|
{
|
|
285
278
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
286
|
-
paths:
|
|
279
|
+
paths: TRANSFORM_PATHS_2
|
|
287
280
|
}
|
|
288
281
|
])
|
|
289
282
|
};
|
|
@@ -310,10 +303,7 @@ function listProjects(payload) {
|
|
|
310
303
|
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
311
304
|
{
|
|
312
305
|
transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
|
|
313
|
-
paths:
|
|
314
|
-
{ path: "projects.createdDate" },
|
|
315
|
-
{ path: "projects.updatedDate" }
|
|
316
|
-
]
|
|
306
|
+
paths: TRANSFORM_PATHS_3
|
|
317
307
|
}
|
|
318
308
|
])
|
|
319
309
|
};
|
|
@@ -321,6 +311,27 @@ function listProjects(payload) {
|
|
|
321
311
|
}
|
|
322
312
|
return __listProjects;
|
|
323
313
|
}
|
|
314
|
+
function getHimalayaAuthorization(payload) {
|
|
315
|
+
function __getHimalayaAuthorization({ host }) {
|
|
316
|
+
const metadata = {
|
|
317
|
+
entityFqdn: "wix.containers.projects.v1.project",
|
|
318
|
+
method: "GET",
|
|
319
|
+
methodFqn: "wix.containers.projects.v1.ContainersProjects.GetHimalayaAuthorization",
|
|
320
|
+
packageName: PACKAGE_NAME,
|
|
321
|
+
migrationOptions: {
|
|
322
|
+
optInTransformResponse: true
|
|
323
|
+
},
|
|
324
|
+
url: resolveWixContainersProjectsV1ContainersProjectsUrl({
|
|
325
|
+
protoPath: "/v1/projects/{projectId}/himalaya-authorization",
|
|
326
|
+
data: payload,
|
|
327
|
+
host
|
|
328
|
+
}),
|
|
329
|
+
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
330
|
+
};
|
|
331
|
+
return metadata;
|
|
332
|
+
}
|
|
333
|
+
return __getHimalayaAuthorization;
|
|
334
|
+
}
|
|
324
335
|
|
|
325
336
|
// src/containers-projects-v1-project-projects.universal.ts
|
|
326
337
|
var ProjectStatus = /* @__PURE__ */ ((ProjectStatus2) => {
|
|
@@ -528,7 +539,8 @@ async function saveProjectDesign2(projectId, baseReleaseId, options) {
|
|
|
528
539
|
projectId,
|
|
529
540
|
baseReleaseId,
|
|
530
541
|
tokensJson: options?.tokensJson,
|
|
531
|
-
himalayaControlToken: options?.himalayaControlToken
|
|
542
|
+
himalayaControlToken: options?.himalayaControlToken,
|
|
543
|
+
canonicalApp: options?.canonicalApp
|
|
532
544
|
});
|
|
533
545
|
const reqOpts = saveProjectDesign(payload);
|
|
534
546
|
sideEffects?.onSiteCall?.();
|
|
@@ -545,7 +557,8 @@ async function saveProjectDesign2(projectId, baseReleaseId, options) {
|
|
|
545
557
|
projectId: "$[0]",
|
|
546
558
|
baseReleaseId: "$[1]",
|
|
547
559
|
tokensJson: "$[2].tokensJson",
|
|
548
|
-
himalayaControlToken: "$[2].himalayaControlToken"
|
|
560
|
+
himalayaControlToken: "$[2].himalayaControlToken",
|
|
561
|
+
canonicalApp: "$[2].canonicalApp"
|
|
549
562
|
},
|
|
550
563
|
singleArgumentUnchanged: false
|
|
551
564
|
},
|
|
@@ -580,6 +593,31 @@ async function listProjects2(options) {
|
|
|
580
593
|
throw transformedError;
|
|
581
594
|
}
|
|
582
595
|
}
|
|
596
|
+
async function getHimalayaAuthorization2(projectId) {
|
|
597
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
598
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
599
|
+
projectId
|
|
600
|
+
});
|
|
601
|
+
const reqOpts = getHimalayaAuthorization(payload);
|
|
602
|
+
sideEffects?.onSiteCall?.();
|
|
603
|
+
try {
|
|
604
|
+
const result = await httpClient.request(reqOpts);
|
|
605
|
+
sideEffects?.onSuccess?.(result);
|
|
606
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
607
|
+
} catch (err) {
|
|
608
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
609
|
+
err,
|
|
610
|
+
{
|
|
611
|
+
spreadPathsToArguments: {},
|
|
612
|
+
explicitPathsToArguments: { projectId: "$[0]" },
|
|
613
|
+
singleArgumentUnchanged: false
|
|
614
|
+
},
|
|
615
|
+
["projectId"]
|
|
616
|
+
);
|
|
617
|
+
sideEffects?.onError?.(err);
|
|
618
|
+
throw transformedError;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
583
621
|
|
|
584
622
|
// src/containers-projects-v1-project-projects.public.ts
|
|
585
623
|
function createProject3(httpClient) {
|
|
@@ -650,6 +688,13 @@ function listProjects3(httpClient) {
|
|
|
650
688
|
{ httpClient }
|
|
651
689
|
);
|
|
652
690
|
}
|
|
691
|
+
function getHimalayaAuthorization3(httpClient) {
|
|
692
|
+
return (projectId) => getHimalayaAuthorization2(
|
|
693
|
+
projectId,
|
|
694
|
+
// @ts-ignore
|
|
695
|
+
{ httpClient }
|
|
696
|
+
);
|
|
697
|
+
}
|
|
653
698
|
|
|
654
699
|
// src/containers-projects-v1-project-projects.context.ts
|
|
655
700
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
@@ -662,6 +707,7 @@ var regenerateProjectName4 = /* @__PURE__ */ (0, import_rest_modules3.createREST
|
|
|
662
707
|
var regenerateProjectIcon4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(regenerateProjectIcon3);
|
|
663
708
|
var saveProjectDesign4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(saveProjectDesign3);
|
|
664
709
|
var listProjects4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listProjects3);
|
|
710
|
+
var getHimalayaAuthorization4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getHimalayaAuthorization3);
|
|
665
711
|
// Annotate the CommonJS export names for ESM import in node:
|
|
666
712
|
0 && (module.exports = {
|
|
667
713
|
Platform,
|
|
@@ -670,6 +716,7 @@ var listProjects4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(l
|
|
|
670
716
|
WebhookIdentityType,
|
|
671
717
|
createProject,
|
|
672
718
|
deleteProject,
|
|
719
|
+
getHimalayaAuthorization,
|
|
673
720
|
getProject,
|
|
674
721
|
listProjects,
|
|
675
722
|
regenerateProjectIcon,
|