@wix/auto_sdk_containers_projects 1.0.5 → 1.0.7

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.
@@ -6,21 +6,20 @@ export { AccountInfo, ActionEvent, CreateAgentSessionRequest, CreateAgentSession
6
6
  declare function createProject$1(httpClient: HttpClient): CreateProjectSignature;
7
7
  interface CreateProjectSignature {
8
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.
9
+ * Creates a project from a template.
10
+ *
11
+ * The project is created with `PLANNING` status.
12
+ * @param - Project to create.
13
+ * @returns Created project.
15
14
  */
16
15
  (project: NonNullablePaths<Project, `platform` | `templateId`, 0>): Promise<NonNullablePaths<Project, `name` | `status` | `sandboxStatus` | `metaSiteIds` | `platform`, 0>>;
17
16
  }
18
17
  declare function getProject$1(httpClient: HttpClient): GetProjectSignature;
19
18
  interface GetProjectSignature {
20
19
  /**
21
- * Retrieves a Project by ID.
22
- * @param - ID of the Project to retrieve.
23
- * @returns The requested Project.
20
+ * Retrieves a project.
21
+ * @param - ID of the project to retrieve.
22
+ * @returns Retrieved project.
24
23
  */
25
24
  (projectId: string): Promise<NonNullablePaths<Project, `name` | `status` | `sandboxStatus` | `metaSiteIds` | `platform`, 0>>;
26
25
  }
@@ -28,9 +27,13 @@ interface GetProjectSignature {
28
27
  declare function updateProject$1(httpClient: HttpClient): UpdateProjectSignature;
29
28
  interface UpdateProjectSignature {
30
29
  /**
31
- * Updates an existing Project.
30
+ * Updates a project.
31
+ *
32
+ * Each time the project is updated, `revision` increments by 1. The current `revision` must be
33
+ * passed when updating the project. This ensures you're working with the latest project and
34
+ * prevents unintended overwrites.
32
35
  * @param - Project ID.
33
- * @returns Updated Project.
36
+ * @returns Updated project.
34
37
  */
35
38
  (_id: string, project: NonNullablePaths<UpdateProject, `revision`, 0>): Promise<NonNullablePaths<Project, `name` | `status` | `sandboxStatus` | `metaSiteIds` | `platform`, 0>>;
36
39
  }
@@ -38,16 +41,24 @@ interface UpdateProjectSignature {
38
41
  declare function deleteProject$1(httpClient: HttpClient): DeleteProjectSignature;
39
42
  interface DeleteProjectSignature {
40
43
  /**
41
- * Deletes a Project.
42
- * @param - Id of the Project to delete.
44
+ * Deletes a project.
45
+ * @param - ID of the project to delete.
43
46
  */
44
47
  (projectId: string): Promise<void>;
45
48
  }
46
49
  declare function resumeProject$1(httpClient: HttpClient): ResumeProjectSignature;
47
50
  interface ResumeProjectSignature {
48
51
  /**
49
- * Requests Project resume by starting or reusing its configured remote machine asynchronously.
50
- * @param - ID of the Project to resume.
52
+ * Resumes work on a project by starting its remote development environment, or by reusing an
53
+ * environment that's already running.
54
+ *
55
+ * Call this method when a user returns to a project with `BUILDING` status, before they send new
56
+ * requests to the coding agent. The environment starts in the background, and the method returns
57
+ * the project without waiting for it. The API doesn't report when the environment is ready. The
58
+ * coding agent picks up new work as soon as it is.
59
+ *
60
+ * The project's `status` must be `BUILDING`.
61
+ * @param - ID of the project to resume.
51
62
  */
52
63
  (projectId: string): Promise<NonNullablePaths<ResumeProjectResponse, `project.name` | `project.status` | `project.sandboxStatus` | `project.metaSiteIds` | `project.platform`, 1>>;
53
64
  }
@@ -55,12 +66,11 @@ interface ResumeProjectSignature {
55
66
  declare function regenerateProjectName$1(httpClient: HttpClient): RegenerateProjectNameSignature;
56
67
  interface RegenerateProjectNameSignature {
57
68
  /**
58
- * Generates a candidate display name for a Project from a user instruction, via the published
59
- * "Regenerate app name" Prompt Hub prompt. The current name and the project's description are
60
- * resolved server-side; the caller supplies only the instruction. Does not persist the result —
61
- * the caller saves an accepted name with UpdateProject.
62
- * @param - ID of the Project to generate a new name for.
63
- * @param - The user's free-text renaming instruction, passed to the name-generation prompt.
69
+ * Generates a suggested name for a project, based on the user's instruction.
70
+ *
71
+ * The suggested name isn't saved. To save it, call Update Project.
72
+ * @param - ID of the project to generate a name for.
73
+ * @param - User's instruction for the new name. For example, `Make it shorter and more playful`.
64
74
  */
65
75
  (projectId: string, prompt: string): Promise<NonNullablePaths<RegenerateProjectNameResponse, `name`, 0>>;
66
76
  }
@@ -68,46 +78,58 @@ interface RegenerateProjectNameSignature {
68
78
  declare function regenerateProjectIcon$1(httpClient: HttpClient): RegenerateProjectIconSignature;
69
79
  interface RegenerateProjectIconSignature {
70
80
  /**
71
- * Generates a candidate icon for a Project from a user instruction. The current project name,
72
- * icon, app description, and brand colors are resolved server-side. Does not persist the result —
73
- * the caller saves an accepted icon with UpdateProject.
74
- * @param - ID of the Project to generate a new icon for.
75
- * @param - The user's free-text icon instruction, passed to the icon-generation prompt.
81
+ * Generates a suggested icon for a project, based on the user's instruction.
82
+ *
83
+ * The icon is based on the project's current name, icon, description, and brand colors. The
84
+ * suggested icon isn't saved. To save it, call Update Project.
85
+ * @param - ID of the project to generate an icon for.
86
+ * @param - User's instruction for the new icon. For example, `Use a minimal coffee cup`.
76
87
  */
77
88
  (projectId: string, prompt: string): Promise<NonNullablePaths<RegenerateProjectIconResponse, `iconUrl`, 0>>;
78
89
  }
79
90
  declare function saveProjectDesign$1(httpClient: HttpClient): SaveProjectDesignSignature;
80
91
  interface SaveProjectDesignSignature {
81
92
  /**
82
- * Persists a complete design-token document as a new Himalaya draft release, branched from the
83
- * release the client currently has displayed.
84
- *
85
- * Synchronous: the Himalaya write completes before this call returns. Never touches the project's
86
- * sandbox, runs a build, or activates the app — the saved release stays a draft, so what the live
87
- * app serves is unaffected. Persists no entity of its own. When `conversation_id` is supplied it
88
- * posts a CHECKPOINT message for the saved release into that conversation (best-effort — a chat
89
- * failure never fails the save); omit it to skip the checkpoint.
90
- * @param - Project whose design is being saved. The caller must own it.
91
- * @param - The Himalaya release ID currently displayed by the client. The saved draft branches from
92
- * exactly this release, even when a newer release exists for the app.
93
+ * Saves a project's design as a new draft release.
94
+ *
95
+ * Specify the complete design-token document in `tokensJson`, and the release that the user is
96
+ * currently viewing in `baseReleaseId`. The new draft release branches from `baseReleaseId`, even
97
+ * if a newer release exists. Saving a design doesn't change the project's live app.
98
+ *
99
+ * The response includes the ID of the new release and a short-lived token for previewing it. After
100
+ * the save, the project's `headReleaseId` is set to the new release.
101
+ *
102
+ * To record the saved version in a conversation, specify the conversation's ID in `conversationId`.
103
+ * A `CHECKPOINT` message is then added to the conversation. If the checkpoint can't be added, the
104
+ * design is still saved.
105
+ *
106
+ * For projects whose `platform` is `HIMALAYA_MOBILE`, call
107
+ * [Get Himalaya Authorization](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/get-himalaya-authorization)
108
+ * first, and specify the returned `canonicalApp`.
109
+ * @param - ID of the project whose design to save.
110
+ * @param - ID of the release that the user is currently viewing.
111
+ *
112
+ * The new draft release branches from this release, even if a newer release exists.
93
113
  */
94
114
  (projectId: string, baseReleaseId: string, options?: NonNullablePaths<SaveProjectDesignOptions, `himalayaControlToken` | `tokensJson`, 0>): Promise<NonNullablePaths<SaveProjectDesignResponse, `himalayaReleaseId` | `previewToken`, 0>>;
95
115
  }
96
116
  declare function restoreRelease$1(httpClient: HttpClient): RestoreReleaseSignature;
97
117
  interface RestoreReleaseSignature {
98
118
  /**
99
- * Restores an earlier version by pointing the project's editable head at `release_id`: the client
100
- * then previews that release and the next edit (design save or AI edit) branches from it. Pure
101
- * project state — sets `head_release_id` and nothing in Himalaya: it does NOT activate the release,
102
- * so the live app end-users run is untouched (a later publish/build is what carries head live).
103
- *
104
- * `release_id` is a Himalaya release id the caller already holds from the project's own release
105
- * ledger, scoped to this project's app; the server stores it as head without re-reading Himalaya.
106
- * When `conversation_id` is supplied, a CHECKPOINT message for the restored release is posted into
107
- * it (best-effort — a chat failure never fails the restore); omit it to skip the checkpoint.
108
- * @param - Project whose head is being moved. The caller must own it.
109
- * @param - The Himalaya release to make the project's editable head. Not a GUID — a Himalaya release id
110
- * (e.g. `rel-<hash>` / `<sha>-<hash>`), taken from the project's own release ledger.
119
+ * Restores an earlier version of a project.
120
+ *
121
+ * Sets the project's `headReleaseId` to the release specified in `releaseId`. Your app then
122
+ * previews that release, and the next design save or edit by the coding agent branches from it.
123
+ * Restoring a release doesn't change the project's live app.
124
+ *
125
+ * Only the project's owner can restore a release.
126
+ *
127
+ * To confirm that the release belongs to the project before it's restored, specify
128
+ * `himalayaControlToken`. To record the restored version in a conversation, specify the
129
+ * conversation's ID in `conversationId`. A `CHECKPOINT` message is then added to the conversation.
130
+ * If the checkpoint can't be added, the release is still restored.
131
+ * @param - ID of the project to restore a release for.
132
+ * @param - ID of the release to restore. For example, `rel-4f9c2a1b7d3e`.
111
133
  */
112
134
  (projectId: string, releaseId: string, options?: RestoreReleaseOptions): Promise<NonNullablePaths<RestoreReleaseResponse, `project.name` | `project.status` | `project.sandboxStatus` | `project.metaSiteIds` | `project.platform`, 1>>;
113
135
  }
@@ -115,19 +137,24 @@ interface RestoreReleaseSignature {
115
137
  declare function listProjects$1(httpClient: HttpClient): ListProjectsSignature;
116
138
  interface ListProjectsSignature {
117
139
  /**
118
- * Lists the Projects of the current site — the MetaSite in the call scope — regardless of who owns
119
- * them. Anyone with access to the site sees the site's projects; other sites in the same account are
120
- * separate tenants and never appear here. The dashboard uses this; ListProjectsForCurrentUser stays
121
- * owner-scoped for callers that still depend on it.
140
+ * Retrieves the projects of the current site, regardless of who created them.
141
+ *
142
+ * Projects of other sites in the same account aren't included.
122
143
  */
123
144
  (options?: ListProjectsOptions): Promise<NonNullablePaths<ListProjectsResponse, `projects` | `projects.${number}.name` | `projects.${number}.status` | `projects.${number}.sandboxStatus` | `projects.${number}.platform`, 2>>;
124
145
  }
125
146
  declare function getHimalayaAuthorization$1(httpClient: HttpClient): GetHimalayaAuthorizationSignature;
126
147
  interface GetHimalayaAuthorizationSignature {
127
148
  /**
128
- * Repeats authenticated Himalaya authorization for the current collaborator. This response is
129
- * a capability check only; every worker/design mutation performs a fresh check.
130
- * @param - Site-tenanted Containers project being authorized.
149
+ * Checks whether the current user can work on a project's app.
150
+ *
151
+ * Supported for projects whose `platform` is `HIMALAYA_MOBILE`. The response returns the canonical
152
+ * slug of the project's app in `canonicalApp`. Specify this value when you call
153
+ * [Save Project Design](https://dev.wix.com/docs/api-reference/mobile/containers-app/containers-projects/project-v1/save-project-design).
154
+ *
155
+ * The response is a check only and doesn't grant access. Each later change to the project is
156
+ * authorized again.
157
+ * @param - ID of the project to check.
131
158
  */
132
159
  (projectId: string): Promise<NonNullablePaths<GetHimalayaAuthorizationResponse, `authorizationVersion` | `metaSiteId` | `projectId` | `canonicalApp` | `workerLaunch` | `saveDesign`, 0>>;
133
160
  }