@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.
@@ -0,0 +1,129 @@
1
+ import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
+ import { Project, UpdateProject, ResumeProjectResponse, RegenerateProjectNameResponse, RegenerateProjectIconResponse, SaveProjectDesignOptions, SaveProjectDesignResponse, ListProjectsOptions, ListProjectsResponse } from './index.typings.mjs';
3
+ export { AccountInfo, ActionEvent, CreateAgentSessionRequest, CreateAgentSessionResponse, CreateProjectRequest, CreateProjectResponse, CursorPaging, CursorPagingMetadata, Cursors, DeleteProjectRequest, DeleteProjectResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, GetProjectRequest, GetProjectResponse, IdentificationData, IdentificationDataIdOneOf, ListProjectsForCurrentUserRequest, ListProjectsForCurrentUserResponse, ListProjectsRequest, MessageEnvelope, Platform, PlatformWithLiterals, ProjectPlanReady, ProjectResumeRequested, ProjectStartRequested, ProjectStatus, ProjectStatusWithLiterals, RefreshAgentSiteTokenRequest, RefreshAgentSiteTokenResponse, RegenerateProjectIconRequest, RegenerateProjectNameRequest, RestoreInfo, ResumeProjectRequest, SandboxStatus, SandboxStatusWithLiterals, SaveProjectDesignRequest, StartProjectRequest, StartProjectResponse, UpdateProjectRequest, UpdateProjectResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.mjs';
4
+
5
+ /** @internal */
6
+ declare function createProject$1(httpClient: HttpClient): CreateProjectSignature;
7
+ interface CreateProjectSignature {
8
+ /**
9
+ * Creates a new Project from a template.
10
+ * Looks up the template to find its backing source code, creates a dev-center app,
11
+ * registers an AppProject, clones the template's git repository into a new
12
+ * code-store project, and persists the Project.
13
+ * @param - Project to be created.
14
+ * @returns The created Project.
15
+ */
16
+ (project: NonNullablePaths<Project, `platform` | `templateId`, 0>): Promise<NonNullablePaths<Project, `name` | `status` | `sandboxStatus` | `metaSiteIds` | `platform`, 0>>;
17
+ }
18
+ /** @internal */
19
+ declare function getProject$1(httpClient: HttpClient): GetProjectSignature;
20
+ interface GetProjectSignature {
21
+ /**
22
+ * Retrieves a Project by ID.
23
+ * @param - ID of the Project to retrieve.
24
+ * @returns The requested Project.
25
+ */
26
+ (projectId: string): Promise<NonNullablePaths<Project, `name` | `status` | `sandboxStatus` | `metaSiteIds` | `platform`, 0>>;
27
+ }
28
+ /** @internal */
29
+ declare function updateProject$1(httpClient: HttpClient): UpdateProjectSignature;
30
+ interface UpdateProjectSignature {
31
+ /**
32
+ * Updates an existing Project.
33
+ * @param - Project ID.
34
+ * @returns Updated Project.
35
+ */
36
+ (_id: string, project: NonNullablePaths<UpdateProject, `revision`, 0>): Promise<NonNullablePaths<Project, `name` | `status` | `sandboxStatus` | `metaSiteIds` | `platform`, 0>>;
37
+ }
38
+ /** @internal */
39
+ declare function deleteProject$1(httpClient: HttpClient): DeleteProjectSignature;
40
+ interface DeleteProjectSignature {
41
+ /**
42
+ * Deletes a Project.
43
+ * @param - Id of the Project to delete.
44
+ */
45
+ (projectId: string): Promise<void>;
46
+ }
47
+ /** @internal */
48
+ declare function resumeProject$1(httpClient: HttpClient): ResumeProjectSignature;
49
+ interface ResumeProjectSignature {
50
+ /**
51
+ * Requests Project resume by starting or reusing its configured remote machine asynchronously.
52
+ * @param - ID of the Project to resume.
53
+ */
54
+ (projectId: string): Promise<NonNullablePaths<ResumeProjectResponse, `project.name` | `project.status` | `project.sandboxStatus` | `project.metaSiteIds` | `project.platform`, 1>>;
55
+ }
56
+ /** @internal */
57
+ declare function regenerateProjectName$1(httpClient: HttpClient): RegenerateProjectNameSignature;
58
+ interface RegenerateProjectNameSignature {
59
+ /**
60
+ * Generates a candidate display name for a Project from a user instruction, via the published
61
+ * "Regenerate app name" Prompt Hub prompt. The current name and the project's description are
62
+ * resolved server-side; the caller supplies only the instruction. Does not persist the result —
63
+ * the caller saves an accepted name with UpdateProject.
64
+ * @param - ID of the Project to generate a new name for.
65
+ * @param - The user's free-text renaming instruction, passed to the name-generation prompt.
66
+ */
67
+ (projectId: string, prompt: string): Promise<NonNullablePaths<RegenerateProjectNameResponse, `name`, 0>>;
68
+ }
69
+ /** @internal */
70
+ declare function regenerateProjectIcon$1(httpClient: HttpClient): RegenerateProjectIconSignature;
71
+ interface RegenerateProjectIconSignature {
72
+ /**
73
+ * Generates a candidate icon for a Project from a user instruction. The current project name,
74
+ * icon, app description, and brand colors are resolved server-side. Does not persist the result —
75
+ * the caller saves an accepted icon with UpdateProject.
76
+ * @param - ID of the Project to generate a new icon for.
77
+ * @param - The user's free-text icon instruction, passed to the icon-generation prompt.
78
+ */
79
+ (projectId: string, prompt: string): Promise<NonNullablePaths<RegenerateProjectIconResponse, `iconUrl`, 0>>;
80
+ }
81
+ /** @internal */
82
+ declare function saveProjectDesign$1(httpClient: HttpClient): SaveProjectDesignSignature;
83
+ interface SaveProjectDesignSignature {
84
+ /**
85
+ * Persists a complete design-token document as a new Himalaya draft release, branched from the
86
+ * release the client currently has displayed.
87
+ *
88
+ * Synchronous: the Himalaya write completes before this call returns. Never touches the project's
89
+ * sandbox, runs a build, or activates the app — the saved release stays a draft, so what the live
90
+ * app serves is unaffected. Persists nothing on our side: this creates no entity and posts no
91
+ * chat checkpoint.
92
+ * @param - Project whose design is being saved. The caller must own it.
93
+ * @param - The Himalaya release ID currently displayed by the client. The saved draft branches from
94
+ * exactly this release, even when a newer release exists for the app.
95
+ */
96
+ (projectId: string, baseReleaseId: string, options: NonNullablePaths<SaveProjectDesignOptions, `himalayaControlToken` | `tokensJson`, 0>): Promise<NonNullablePaths<SaveProjectDesignResponse, `himalayaReleaseId` | `previewToken`, 0>>;
97
+ }
98
+ /** @internal */
99
+ declare function listProjects$1(httpClient: HttpClient): ListProjectsSignature;
100
+ interface ListProjectsSignature {
101
+ /**
102
+ * Lists the Projects of the current site — the MetaSite in the call scope — regardless of who owns
103
+ * them. Anyone with access to the site sees the site's projects; other sites in the same account are
104
+ * separate tenants and never appear here. The dashboard uses this; ListProjectsForCurrentUser stays
105
+ * owner-scoped for callers that still depend on it.
106
+ */
107
+ (options?: ListProjectsOptions): Promise<NonNullablePaths<ListProjectsResponse, `projects` | `projects.${number}.name` | `projects.${number}.status` | `projects.${number}.sandboxStatus` | `projects.${number}.platform`, 2>>;
108
+ }
109
+
110
+ /** @internal */
111
+ declare const createProject: MaybeContext<BuildRESTFunction<typeof createProject$1> & typeof createProject$1>;
112
+ /** @internal */
113
+ declare const getProject: MaybeContext<BuildRESTFunction<typeof getProject$1> & typeof getProject$1>;
114
+ /** @internal */
115
+ declare const updateProject: MaybeContext<BuildRESTFunction<typeof updateProject$1> & typeof updateProject$1>;
116
+ /** @internal */
117
+ declare const deleteProject: MaybeContext<BuildRESTFunction<typeof deleteProject$1> & typeof deleteProject$1>;
118
+ /** @internal */
119
+ declare const resumeProject: MaybeContext<BuildRESTFunction<typeof resumeProject$1> & typeof resumeProject$1>;
120
+ /** @internal */
121
+ declare const regenerateProjectName: MaybeContext<BuildRESTFunction<typeof regenerateProjectName$1> & typeof regenerateProjectName$1>;
122
+ /** @internal */
123
+ declare const regenerateProjectIcon: MaybeContext<BuildRESTFunction<typeof regenerateProjectIcon$1> & typeof regenerateProjectIcon$1>;
124
+ /** @internal */
125
+ declare const saveProjectDesign: MaybeContext<BuildRESTFunction<typeof saveProjectDesign$1> & typeof saveProjectDesign$1>;
126
+ /** @internal */
127
+ declare const listProjects: MaybeContext<BuildRESTFunction<typeof listProjects$1> & typeof listProjects$1>;
128
+
129
+ export { ListProjectsOptions, ListProjectsResponse, Project, RegenerateProjectIconResponse, RegenerateProjectNameResponse, ResumeProjectResponse, SaveProjectDesignOptions, SaveProjectDesignResponse, UpdateProject, createProject, deleteProject, getProject, listProjects, regenerateProjectIcon, regenerateProjectName, resumeProject, saveProjectDesign, updateProject };