@wix/auto_sdk_git-code-store_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.
@@ -6,10 +6,15 @@ declare function generateGitCodeStoreProjectDownloadUrl$1(httpClient: HttpClient
6
6
  interface GenerateGitCodeStoreProjectDownloadUrlSignature {
7
7
  /**
8
8
  * Generates a temporary URL to download all tracked files at one revision as a ZIP.
9
+ *
9
10
  * Includes hidden directories, binary files and materialized LFS objects; excludes Git history.
10
- * Defaults to main. Supply the returned revision when committing uploaded code unless force is true.
11
+ * Defaults to main. Omit `revisionId` to download the current branch head.
12
+ * Supply the returned revision when committing uploaded code unless force is true.
13
+ * Supports at most 10,000 tracked files, 256 MiB expanded, and a 64 MiB ZIP.
14
+ * Rejects unsafe paths, submodules, special files, and dangling or escaping symlinks.
11
15
  * Requires an authenticated user with read access to the app or its companion site.
12
- * @param - Managed project whose code will be downloaded.
16
+ * @param - ID of the existing AppManagedProject whose code will be downloaded.
17
+ * This identifies the managed project, not its site or a legacy v1 Code Store project.
13
18
  */
14
19
  (managedProjectId: string, options?: GenerateGitCodeStoreProjectDownloadUrlOptions): Promise<NonNullablePaths<GenerateGitCodeStoreProjectDownloadUrlResponse, `downloadUrl` | `revision.author.name` | `revision.author.email` | `branchName`, 2> & {
15
20
  __applicationErrorsType?: GenerateGitCodeStoreProjectDownloadUrlApplicationErrors;
@@ -19,11 +24,14 @@ declare function generateGitCodeStoreProjectUploadUrl$1(httpClient: HttpClient):
19
24
  interface GenerateGitCodeStoreProjectUploadUrlSignature {
20
25
  /**
21
26
  * Generates a temporary, project-scoped URL for uploading a ZIP with HTTP PUT.
22
- * PUT the ZIP with the returned headers, then call CommitGitCodeStoreProjectUpload. No size is required.
27
+ *
28
+ * PUT the ZIP with the returned headers, then call
29
+ * [Commit Git Code Store Project Upload](https://dev.wix.com/docs/api-reference/account-level/git-codestore/commit-git-code-store-project-upload).
23
30
  * The 64 MiB compressed size limit is checked when committing the upload, not by the signed PUT.
24
31
  * Uploading alone never changes the repository. ZIP paths must be relative to its root.
25
32
  * Requires an authenticated user with update access to the app or its companion site.
26
- * @param - Managed project receiving the upload.
33
+ * @param - ID of the existing AppManagedProject receiving the upload.
34
+ * Use the same `managedProjectId` for downloading, uploading, and committing.
27
35
  */
28
36
  (managedProjectId: string): Promise<NonNullablePaths<GenerateGitCodeStoreProjectUploadUrlResponse, `uploadId` | `uploadUrl`, 0>>;
29
37
  }
@@ -31,6 +39,7 @@ declare function commitGitCodeStoreProjectUpload$1(httpClient: HttpClient): Comm
31
39
  interface CommitGitCodeStoreProjectUploadSignature {
32
40
  /**
33
41
  * Commits and pushes a previously uploaded ZIP's contents to an existing branch.
42
+ *
34
43
  * Replaces the complete tracked file tree. Does not publish or deploy the application.
35
44
  * Files omitted from the ZIP are deleted. Creates one child commit and preserves history; never resets the branch history.
36
45
  * Defaults to main. An empty ZIP intentionally removes all files. An unchanged tree creates no commit.
@@ -38,9 +47,12 @@ interface CommitGitCodeStoreProjectUploadSignature {
38
47
  * Force replaces the latest checked-out tree and preserves history; concurrent writes can still conflict.
39
48
  * Accepts at most 64 MiB compressed, 256 MiB expanded, and 10,000 ZIP entries.
40
49
  * Rejects unsafe paths, Git metadata, submodules, and symlinks outside the repository.
41
- * After a timeout, inspect the head before retrying.
50
+ * After a timeout, call [Generate Git Code Store Project Download Url](https://dev.wix.com/docs/api-reference/account-level/git-codestore/generate-git-code-store-project-download-url)
51
+ * for the same branch with `revisionId` omitted.
52
+ * Compare its revision and downloaded tree with your intended changes before retrying.
53
+ * A changed head alone does not prove this request succeeded. Do not use force to recover from a timeout.
42
54
  * Requires an authenticated user with update access to the app or its companion site.
43
- * @param - Managed project to update. Must be the same project that issued upload_id.
55
+ * @param - ID of the existing AppManagedProject to update. Must be the same project that issued `uploadId`.
44
56
  * @param - Identifier returned by GenerateGitCodeStoreProjectUploadUrl.
45
57
  * The ZIP must have been uploaded within the last hour.
46
58
  */
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/codestore-v2-project-projects.universal.ts","../../src/codestore-v2-project-projects.http.ts","../../src/codestore-v2-project-projects.public.ts","../../src/codestore-v2-project-projects.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixCodestoreV2Project from './codestore-v2-project-projects.http.js';\n\n/**\n * Virtual entity representing the codestore v2 project.\n * All persistence lives on wix.appmanagedprojects.v1.AppManagedProject;\n * this entity exists to anchor the v2 service to its own FQDN.\n */\nexport interface Project {\n /**\n * Structural placeholder. The entity is virtual (persistence: NONE);\n * all real state lives on wix.appmanagedprojects.v1.AppManagedProject.\n * @format GUID\n */\n _id?: string;\n}\n\nexport interface GitCodeStoreProjectCreated {\n /**\n * The ID of the managed project for which the git code store project was created.\n * @format GUID\n */\n managedProjectId?: string;\n /** The git code store options of the created project. */\n gitCodeStoreOptions?: GitCodeStoreOptions;\n}\n\n/**\n * GitCodeStoreOptions represents per-project state for a git code store project.\n * Stored on the AppManagedProject entity.\n */\nexport interface GitCodeStoreOptions extends GitCodeStoreOptionsOptionsOneOf {\n s3Options?: GitCodeStoreOptionsS3Options;\n githubOptions?: GitHubOptions;\n /**\n * The git remote URL of the linked project.\n * @maxLength 200\n * @immutable\n */\n gitRemoteUrl?: string;\n gitRemoteType?: GitRemoteTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface GitCodeStoreOptionsOptionsOneOf {\n s3Options?: GitCodeStoreOptionsS3Options;\n githubOptions?: GitHubOptions;\n}\n\nexport enum GitRemoteType {\n S3 = 'S3',\n GITHUB = 'GITHUB',\n}\n\n/** @enumType */\nexport type GitRemoteTypeWithLiterals = GitRemoteType | 'S3' | 'GITHUB';\n\nexport interface GitCodeStoreOptionsS3Options {\n /**\n * S3 access key id.\n * @maxLength 20\n */\n accessKeyId?: string;\n /**\n * S3 secret access key.\n * @maxLength 40\n */\n secretAccessKey?: string;\n}\n\nexport interface GitHubOptions {\n /**\n * GitHub App installation ID for this project.\n * @maxLength 200\n */\n appInstallationId?: string;\n}\n\nexport interface GitCodeStoreProjectTransferred {\n /**\n * The ID of the managed project that was transferred.\n * @format GUID\n */\n managedProjectId?: string;\n /** The updated git code store options after the transfer. */\n gitCodeStoreOptions?: GitCodeStoreOptions;\n}\n\nexport interface GitCodeStoreProjectDeleted {\n /**\n * The ID of the managed project whose git code store project was deleted.\n * @format GUID\n */\n managedProjectId?: string;\n}\n\nexport interface GenerateGitCodeStoreProjectDownloadUrlRequest {\n /**\n * Managed project whose code will be downloaded.\n * @format GUID\n */\n managedProjectId: string;\n /**\n * Existing branch. Defaults to main.\n * @minLength 1\n * @maxLength 250\n */\n branchName?: string | null;\n /**\n * Optional full commit SHA, reachable from the selected branch. Defaults to its head.\n * @minLength 40\n * @maxLength 40\n */\n revisionId?: string | null;\n}\n\nexport interface GenerateGitCodeStoreProjectDownloadUrlResponse {\n /**\n * Signed URL for downloading the complete ZIP with HTTP GET. Valid for 5 minutes.\n * Anyone holding this URL can download the ZIP until it expires; no additional authorization is required.\n * @format WEB_URL\n */\n downloadUrl?: string;\n /** Expiration of the signed URL; credential expiry or revocation can invalidate it earlier. */\n expiresAt?: Date | null;\n /** Revision included in the ZIP. Use its id as the expected head when committing an upload. */\n revision?: Revision;\n /**\n * Resolved branch name.\n * @maxLength 250\n */\n branchName?: string;\n}\n\nexport interface Revision {\n /**\n * Revision identifier\n * @readonly\n * @maxLength 40\n */\n _id?: string | null;\n /**\n * Revision description message\n * @readonly\n * @maxLength 2000\n */\n description?: string | null;\n /**\n * Creation time\n * @readonly\n */\n creationTime?: Date | null;\n /** Author details */\n author?: Author;\n}\n\nexport interface Author {\n /**\n * Author name\n * @readonly\n * @maxLength 100\n */\n name?: string;\n /**\n * Author email\n * @readonly\n * @format EMAIL\n */\n email?: string;\n}\n\nexport interface GenerateGitCodeStoreProjectUploadUrlRequest {\n /**\n * Managed project receiving the upload.\n * @format GUID\n */\n managedProjectId: string;\n}\n\nexport interface GenerateGitCodeStoreProjectUploadUrlResponse {\n /**\n * Project-scoped upload identifier. Pass it to CommitGitCodeStoreProjectUpload after PUT succeeds.\n * @format GUID\n */\n uploadId?: string;\n /**\n * Signed URL accepting HTTP PUT for one staged object. Valid for 5 minutes.\n * Anyone holding this URL can replace the staged object until it expires.\n * @format WEB_URL\n */\n uploadUrl?: string;\n /**\n * Required headers for the PUT, in addition to headers automatically set by the HTTP client.\n * @maxSize 20\n */\n headers?: Record<string, string>;\n /** Expiration of the signed URL; credential expiry or revocation can invalidate it earlier. */\n expiresAt?: Date | null;\n}\n\nexport interface GenerateGitCodeStoreProjectStagedUploadDownloadUrlRequest {\n /**\n * Managed project that issued the upload identifier.\n * @format GUID\n */\n managedProjectId?: string;\n /**\n * Identifier returned by GenerateGitCodeStoreProjectUploadUrl. PUT must have completed.\n * The staged object must be at most 64 MiB and less than one hour old.\n * @format GUID\n */\n uploadId?: string;\n}\n\nexport interface GenerateGitCodeStoreProjectStagedUploadDownloadUrlResponse {\n /**\n * Signed HTTP GET URL for the staged ZIP, valid for at most five minutes.\n * Anyone holding the URL and required headers can download it until expiry.\n * @format WEB_URL\n */\n downloadUrl?: string;\n /**\n * Required GET headers, including If-Match binding the download to the checked object.\n * Do not omit or modify them. No Wix authorization header is needed for the GET.\n * @maxSize 20\n */\n headers?: Record<string, string>;\n /** Capped by the remaining one-hour upload lifetime. Credentials can invalidate it earlier. */\n expiresAt?: Date | null;\n}\n\nexport interface CommitGitCodeStoreProjectUploadRequest {\n /**\n * Managed project to update. Must be the same project that issued upload_id.\n * @format GUID\n */\n managedProjectId: string;\n /**\n * Identifier returned by GenerateGitCodeStoreProjectUploadUrl.\n * The ZIP must have been uploaded within the last hour.\n * @format GUID\n */\n uploadId: string;\n /**\n * Existing branch. Defaults to main.\n * @minLength 1\n * @maxLength 250\n */\n branchName?: string | null;\n /**\n * Full SHA from the download URL response. Required unless force is true; ignored when force is true.\n * Prevents replacing code changed since the download. The handler requires exactly 40 hexadecimal characters\n * when force is false; missing, empty, abbreviated, or non-hexadecimal values are rejected before reading the upload.\n * @maxLength 40\n */\n expectedHeadRevisionId?: string;\n /** Message and author for the replacement commit. */\n commit: GitCodeStoreProjectCommitOptions;\n /**\n * Replace the latest branch tree even if it changed since download. Defaults to false.\n * Preserves history by creating a normal commit; concurrent writes can still cause a conflict.\n */\n force?: boolean;\n}\n\n/** Git commit metadata supplied by the caller when creating a revision. */\nexport interface GitCodeStoreProjectCommitOptions {\n /**\n * Commit message.\n * @minLength 1\n * @maxLength 2000\n */\n message?: string;\n /** Commit author. */\n author?: GitCodeStoreProjectCommitAuthor;\n}\n\n/** Git commit author supplied by the caller when creating a revision. */\nexport interface GitCodeStoreProjectCommitAuthor {\n /**\n * Author name.\n * @minLength 1\n * @maxLength 100\n */\n name?: string;\n /**\n * Author email.\n * @format EMAIL\n */\n email?: string;\n}\n\nexport interface CommitGitCodeStoreProjectUploadResponse {\n /** New revision, or the existing revision when the file tree is unchanged. */\n revision?: Revision;\n /**\n * Resolved branch name.\n * @minLength 1\n * @maxLength 250\n */\n branchName?: string;\n /** Whether a replacement commit was created. */\n changed?: boolean;\n}\n\nexport interface CreateGitCodeStoreProjectRequest {\n /**\n * The ID of the managed project to link the git code store project to.\n * @format GUID\n */\n managedProjectId?: string;\n /** Optional. Per-project overrides. If not supplied, defaults from the GitCodeStoreConfig will be used. */\n gitCodeStoreOptions?: GitCodeStoreOptions;\n /** Initial revision details for the first commit of the new project. */\n initialRevision?: Revision;\n /**\n * List of files (text only) to be created as part of the project's initial revision.\n * @minSize 1\n * @maxSize 200\n */\n files?: FileInfo[];\n /** Type of git remote used for the project being created. */\n gitRemoteType?: GitRemoteTypeWithLiterals;\n}\n\nexport interface FileInfo {\n /**\n * Path of the file.\n * @minLength 1\n * @maxLength 250\n */\n path?: string;\n /**\n * Content of the file.\n * @maxLength 3100000\n */\n content?: string;\n}\n\nexport interface CreateGitCodeStoreProjectResponse {\n /** The created git code store options to be persisted on the AppManagedProject entity. */\n gitCodeStoreOptions?: GitCodeStoreOptions;\n}\n\nexport interface TransferGitCodeStoreProjectRequest {\n /**\n * The ID of the managed project being transferred.\n * @format GUID\n */\n managedProjectId?: string;\n}\n\nexport interface TransferGitCodeStoreProjectResponse {\n /** The updated git code store options after the transfer. */\n gitCodeStoreOptions?: GitCodeStoreOptions;\n}\n\nexport interface DeleteGitCodeStoreProjectRequest {\n /**\n * The ID of the managed project whose git code store project should be deleted.\n * @format GUID\n */\n managedProjectId?: string;\n /** Type of git remote of the project being deleted. */\n gitRemoteType?: GitRemoteTypeWithLiterals;\n}\n\nexport interface DeleteGitCodeStoreProjectResponse {}\n\nexport interface CloneGitCodeStoreProjectRequest {\n /**\n * The ID of the managed project whose repository is the clone source.\n * Its current `GitCodeStoreOptions` (and resolved `GitCodeStoreConfig` for\n * GitHub-backed projects) are looked up by this service.\n * @format GUID\n */\n sourceManagedProjectId?: string;\n /**\n * The ID of the managed project that will own the newly created git code store project.\n * The target must be empty and is initialized as an S3 repository with every source branch.\n * Each branch contains its source head's files in one new parentless commit, without source history.\n * A failed partial clone must be retried with a new empty target.\n * @format GUID\n */\n targetManagedProjectId?: string;\n /**\n * Optional files to create or replace in every target branch's initial commit.\n * Use this to patch files that must reference the target project rather than the source\n * (for example, wix.config.mjs with the target's appId). Paths must follow the\n * same repository-relative contract as wix.codestore.v1.FileInfo.path.\n * @maxSize 20\n */\n overrideFiles?: FileInfo[];\n}\n\nexport interface CloneGitCodeStoreProjectResponse {\n /** The S3 `GitCodeStoreOptions` for the target. Caller persists on AppManagedProject. */\n gitCodeStoreOptions?: GitCodeStoreOptions;\n /**\n * The new commit hash on the source's default branch in the target repository.\n * @maxLength 40\n */\n commitHash?: string | null;\n}\n\nexport interface MigrateGitCodeStoreProjectRequest\n extends MigrateGitCodeStoreProjectRequestTargetOptionsOneOf {\n /** Target S3 options. Required when `target_git_remote_type` is S3. */\n s3Options?: MigrateGitCodeStoreProjectRequestS3Options;\n /** Target GitHub options. Required when `target_git_remote_type` is GITHUB. */\n githubOptions?: MigrateGitCodeStoreProjectRequestGithubOptions;\n /**\n * The ID of the managed project being migrated.\n * @format GUID\n */\n managedProjectId?: string;\n /** Target git remote type of the project (after the migration). */\n targetGitRemoteType?: GitRemoteTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface MigrateGitCodeStoreProjectRequestTargetOptionsOneOf {\n /** Target S3 options. Required when `target_git_remote_type` is S3. */\n s3Options?: MigrateGitCodeStoreProjectRequestS3Options;\n /** Target GitHub options. Required when `target_git_remote_type` is GITHUB. */\n githubOptions?: MigrateGitCodeStoreProjectRequestGithubOptions;\n}\n\nexport interface MigrateGitCodeStoreProjectRequestS3Options {}\n\nexport interface MigrateGitCodeStoreProjectRequestGithubOptions {\n /**\n * GitHub App ID.\n * @format GUID\n */\n githubAppId?: string;\n /**\n * GitHub App Installation ID.\n * @maxLength 200\n */\n appInstallationId?: string;\n /**\n * Remote URL of the GitHub repository.\n * @format WEB_URL\n * @maxLength 200\n */\n gitRemoteUrl?: string;\n}\n\nexport interface MigrateGitCodeStoreProjectResponse {\n /**\n * The updated git code store options after the migration, as persisted on\n * the AppManagedProject's instance_config.git_code_store_options.\n */\n gitCodeStoreOptions?: GitCodeStoreOptions;\n}\n\nexport interface ListGitCodeStoreProjectRevisionsRequest {\n /**\n * The ID of the managed project whose revisions to list.\n * @format GUID\n */\n managedProjectId?: string;\n}\n\nexport interface ListGitCodeStoreProjectRevisionsResponse {\n /** List of revisions, ordered newest to oldest. */\n revisions?: Revision[];\n}\n\nexport interface GetGitCodeStoreProjectCredentialsRequest {\n /**\n * The ID of the managed project to retrieve credentials for.\n * @format GUID\n */\n managedProjectId?: string;\n}\n\nexport interface GetGitCodeStoreProjectCredentialsResponse {\n /** Git credentials for accessing the project's repository. */\n gitCredentials?: GitCredentials;\n}\n\nexport interface GitCredentials extends GitCredentialsOptionsOneOf {\n /** Options for S3 git remote. */\n s3Options?: S3Options;\n /** Options for GitHub git remote. */\n githubOptions?: GithubOptions;\n /**\n * Git-remote url.\n * @maxLength 200\n */\n gitRemoteUrl?: string;\n /** Type of git remote used for the project. */\n gitRemoteType?: GitRemoteTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface GitCredentialsOptionsOneOf {\n /** Options for S3 git remote. */\n s3Options?: S3Options;\n /** Options for GitHub git remote. */\n githubOptions?: GithubOptions;\n}\n\nexport interface S3Options {\n /**\n * S3 access key id.\n * @maxLength 20\n */\n accessKeyId?: string;\n /**\n * S3 secret access key.\n * @maxLength 40\n */\n secretAccessKey?: string;\n /**\n * S3 secret access key.\n * @maxLength 2048\n */\n sessionToken?: string;\n}\n\nexport interface GithubOptions {\n /**\n * GitHub app installation access token.\n * @maxLength 2048\n */\n accessToken?: string;\n /**\n * GitHub repo url, that includes access token and can be used as a remote url\n * in git, without additional auth configuration.\n * @maxLength 2048\n */\n authorizedGitRemoteUrl?: string;\n}\n\nexport interface GetGitCodeStoreProjectFileRequest {\n /**\n * The ID of the managed project to read the file from.\n * @format GUID\n */\n managedProjectId?: string;\n /**\n * Path of the file to read, relative to the repository root.\n * @minLength 1\n * @maxLength 500\n */\n filePath?: string;\n /**\n * Optional. Commit hash to read the file from.\n * If not provided, the latest revision of the main branch is used.\n * @maxLength 40\n */\n commitHash?: string | null;\n}\n\nexport interface GetGitCodeStoreProjectFileResponse {\n /** The requested file with its content. */\n file?: FileInfo;\n /** The revision the file was read from. */\n revision?: Revision;\n}\n\n/** Selects the branch whose current head revision to retrieve. */\nexport interface GetGitCodeStoreProjectHeadRevisionRequest {\n /**\n * The ID of the managed project.\n * @format GUID\n */\n managedProjectId?: string;\n /**\n * Optional. Existing branch to read from. Defaults to the main branch.\n * @maxLength 250\n */\n branchName?: string | null;\n}\n\n/** Current branch head, without file content or revision history. */\nexport interface GetGitCodeStoreProjectHeadRevisionResponse {\n /** The head revision observed when the request was handled. */\n revision?: Revision;\n /**\n * Branch whose head revision was retrieved.\n * @maxLength 250\n */\n branchName?: string;\n}\n\n/** Exact paths to read from a single snapshot. */\nexport interface BulkGetGitCodeStoreProjectFilesRequest {\n /**\n * The ID of the managed project to read files from.\n * @format GUID\n */\n managedProjectId?: string;\n /**\n * Paths of up to 100 files to read, relative to the repository root.\n * The complete serialized response must fit within 4 MiB, including error results and metadata.\n * For larger reads, use smaller batches pinned to the same revision_id.\n * @minSize 1\n * @maxSize 100\n * @minLength 1\n * @maxLength 500\n */\n filePaths?: string[];\n /**\n * Optional. Existing branch to read from.\n * Defaults to the main branch; revision_id selects the snapshot.\n * @maxLength 250\n */\n branchName?: string | null;\n /**\n * Optional. Exact revision to read, allowing multiple batches to use the same snapshot.\n * Must be reachable from branch_name, or main when branch_name is omitted.\n * When omitted, reads the current branch head. Use a full revision.id returned by this API.\n * @minLength 40\n * @maxLength 40\n */\n revisionId?: string | null;\n}\n\n/** Response containing selected file contents and the revision they were read from. */\nexport interface BulkGetGitCodeStoreProjectFilesResponse {\n /**\n * One result per requested path, in the same order as file_paths.\n * @maxSize 100\n */\n results?: BulkGetGitCodeStoreProjectFileResult[];\n /** The exact revision the files were read from, including when revision_id was supplied. */\n revision?: Revision;\n /**\n * Branch the files were read from.\n * @maxLength 250\n */\n branchName?: string;\n}\n\n/** Outcome for one requested repository-relative path. */\nexport interface BulkGetGitCodeStoreProjectFileResult\n extends BulkGetGitCodeStoreProjectFileResultResultOneOf {\n /** Content when the requested path is a readable file. */\n file?: GitCodeStoreProjectFile;\n /** Failure for this path; other paths may succeed in the same response. */\n error?: BulkGetGitCodeStoreProjectFileError;\n /**\n * Requested path, relative to the repository root.\n * @minLength 1\n * @maxLength 500\n */\n path?: string;\n}\n\n/** @oneof */\nexport interface BulkGetGitCodeStoreProjectFileResultResultOneOf {\n /** Content when the requested path is a readable file. */\n file?: GitCodeStoreProjectFile;\n /** Failure for this path; other paths may succeed in the same response. */\n error?: BulkGetGitCodeStoreProjectFileError;\n}\n\n/** A file's repository-relative path and UTF-8 content, shared by reads and PUTs. */\nexport interface GitCodeStoreProjectFile {\n /**\n * Path relative to the repository root.\n * @minLength 1\n * @maxLength 500\n */\n path?: string;\n /**\n * Complete UTF-8 content. Empty content is valid; the service enforces a 1 MiB byte limit.\n * @maxLength 1048576\n */\n content?: string;\n}\n\n/** Failure specific to a requested path. Snapshot and size failures fail the RPC. */\nexport interface BulkGetGitCodeStoreProjectFileError {\n /**\n * Stable code. Missing paths return GIT_PROJECT_FILE_NOT_FOUND.\n * @maxLength 100\n */\n applicationCode?: string;\n /**\n * Human-readable explanation; callers should match application_code.\n * @maxLength 1000\n */\n message?: string;\n}\n\n/** Request to create one commit from selected file puts and deletes. */\nexport interface CommitGitCodeStoreProjectFileChangesRequest {\n /**\n * The ID of the managed project to change.\n * @format GUID\n */\n managedProjectId?: string;\n /**\n * Up to 100 file puts and deletes to apply in one commit, in request order.\n * The complete serialized request must fit within 4 MiB, including metadata.\n * Requests above the gRPC receiver limit may be rejected before API validation.\n * Paths are repository-relative; traversal, .git metadata, and symlink traversal are rejected.\n * @minSize 1\n * @maxSize 100\n */\n fileChanges?: GitCodeStoreProjectFileChange[];\n /**\n * The revision ID the caller expects at the target branch head.\n * @minLength 40\n * @maxLength 40\n */\n expectedHeadRevisionId?: string;\n /**\n * Optional. Existing branch to commit to.\n * If not provided, changes are committed to the main branch.\n * @maxLength 250\n */\n branchName?: string | null;\n /** Commit metadata for the created revision. */\n commit?: GitCodeStoreProjectCommitOptions;\n}\n\n/** One operation in an atomic file-change commit. Select exactly one operation. */\nexport interface GitCodeStoreProjectFileChange\n extends GitCodeStoreProjectFileChangeChangeOneOf {\n /** Creates or replaces a file with its complete content. */\n put?: GitCodeStoreProjectFile;\n /** Deletes an existing file at the given path. */\n delete?: GitCodeStoreProjectFileReference;\n}\n\n/** @oneof */\nexport interface GitCodeStoreProjectFileChangeChangeOneOf {\n /** Creates or replaces a file with its complete content. */\n put?: GitCodeStoreProjectFile;\n /** Deletes an existing file at the given path. */\n delete?: GitCodeStoreProjectFileReference;\n}\n\n/** Identifies the file to delete; no content is needed. */\nexport interface GitCodeStoreProjectFileReference {\n /**\n * Path relative to the repository root.\n * @minLength 1\n * @maxLength 500\n */\n path?: string;\n}\n\n/** Response describing the target branch state after a file changes request. */\nexport interface CommitGitCodeStoreProjectFileChangesResponse {\n /** Whether this request created a commit or left the file tree unchanged. */\n result?: ResultWithLiterals;\n /**\n * The current target branch revision after the call.\n * For NO_CHANGES this is the unchanged branch head.\n */\n revision?: Revision;\n /**\n * Branch the file changes were applied to.\n * @maxLength 250\n */\n branchName?: string;\n}\n\n/** Outcome of the file changes request. */\nexport enum Result {\n /** A new commit was created on the target branch. */\n COMMITTED = 'COMMITTED',\n /** The resulting file tree is unchanged; no commit was created. */\n NO_CHANGES = 'NO_CHANGES',\n}\n\n/** @enumType */\nexport type ResultWithLiterals = Result | 'COMMITTED' | 'NO_CHANGES';\n\nexport interface ListGitCodeStoreProjectFolderContentRequest {\n /**\n * The ID of the managed project whose folder to list.\n * @format GUID\n */\n managedProjectId?: string;\n /**\n * Optional. Folder to list, relative to the repository root (for example `src/components`).\n * Surrounding slashes are ignored, so `/` is equivalent to not providing a folder at all.\n * If not provided, the repository root is listed.\n * @maxLength 500\n */\n folderPath?: string | null;\n /**\n * Optional. Commit hash to list the folder at.\n * If not provided, the latest revision of the main branch is used.\n * @maxLength 40\n */\n commitHash?: string | null;\n /**\n * Optional. How many levels below `folder_path` to include, defaulting to 1 - the\n * folder's own content. Levels are cumulative: `depth` 4 returns everything from\n * level 1 through level 4 inclusive. With `depth` 3 over `a/b/c/d/file.js` and\n * `a/b/foo.js`, the response holds the file `a/b/foo.js` and the folders `a`,\n * `a/b` and `a/b/c`, while `a/b/c/d` and the file below it sit too deep.\n * A tree shallower than `depth` simply yields everything it has.\n * @min 1\n * @max 10\n */\n depth?: number | null;\n}\n\nexport interface ListGitCodeStoreProjectFolderContentResponse {\n /**\n * Files from every level up to `depth` below the requested folder, ordered by path.\n * Symlinks are reported here, since git stores a symlink as a file. More than 500\n * files in total returns TOO_MANY_PROJECT_FILES.\n * @maxSize 500\n */\n files?: FileEntry[];\n /**\n * Folders from every level up to `depth` below the requested folder, ordered by path.\n * The repository's own `.git` metadata is never listed or traversed. More than 500\n * folders in total returns TOO_MANY_PROJECT_FILES.\n * @maxSize 500\n */\n folders?: FolderEntry[];\n /** The revision the folder was listed at. */\n revision?: Revision;\n}\n\n/** A file directly inside the listed folder. */\nexport interface FileEntry {\n /**\n * Name of the file within the listed folder, with no path separators.\n * @minLength 1\n * @maxLength 250\n */\n name?: string;\n /**\n * Full path of the file relative to the repository root. Pass this to\n * GetGitCodeStoreProjectFile to read the file's content.\n * @minLength 1\n * @maxLength 500\n */\n path?: string;\n}\n\n/**\n * A folder directly inside the listed folder. Git tracks no directory of its own,\n * so a folder appears here only because it contains at least one file, at any depth.\n */\nexport interface FolderEntry {\n /**\n * Name of the folder within the listed folder, with no path separators.\n * @minLength 1\n * @maxLength 250\n */\n name?: string;\n /**\n * Full path of the folder relative to the repository root. Pass this back as\n * `folder_path` to list the next level down.\n * @minLength 1\n * @maxLength 500\n */\n path?: string;\n}\n\nexport interface ValidateAndResolveConfigRequest {\n /**\n * The ID of the AppManagedProjectConfig being validated.\n * @format GUID\n */\n managedProjectConfigId?: string;\n /** The GitCodeStoreConfig to validate. */\n gitCodeStoreConfig?: GitCodeStoreConfig;\n}\n\n/**\n * GitCodeStoreConfig represents the kind of code store configuration that\n * projects created under an AppManagedProjectConfig will use.\n */\nexport interface GitCodeStoreConfig\n extends GitCodeStoreConfigGitRemoteOptionsOneOf {\n /** Options for GitHub git remote. */\n githubAppOptions?: GithubAppOptions;\n /** Options for S3 git remote. */\n s3Options?: GitCodeStoreConfigS3Options;\n /**\n * Type of git remote used for projects under this config.\n * @immutable\n */\n gitRemoteType?: GitRemoteTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface GitCodeStoreConfigGitRemoteOptionsOneOf {\n /** Options for GitHub git remote. */\n githubAppOptions?: GithubAppOptions;\n /** Options for S3 git remote. */\n s3Options?: GitCodeStoreConfigS3Options;\n}\n\nexport interface GithubAppOptions {\n /**\n * The GitHub App ID that owns repositories created under this config.\n * @maxLength 200\n * @immutable\n */\n appId?: string;\n}\n\nexport interface GitCodeStoreConfigS3Options {}\n\nexport interface ValidateAndResolveConfigResponse {\n /** The GitCodeStoreConfig after validation, to be stored. */\n gitCodeStoreConfig?: GitCodeStoreConfig;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type GenerateGitCodeStoreProjectDownloadUrlApplicationErrors =\n | {\n code?: 'GIT_BRANCH_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'GIT_COMMIT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_REPOSITORY_ARCHIVE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'REPOSITORY_ARCHIVE_TOO_LARGE';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CommitGitCodeStoreProjectUploadApplicationErrors =\n | {\n code?: 'GIT_HEAD_COMMIT_MISMATCH';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'GIT_BRANCH_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'REPOSITORY_UPLOAD_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_REPOSITORY_ARCHIVE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'REPOSITORY_ARCHIVE_TOO_LARGE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'GIT_PUSH_CONFLICT';\n description?: string;\n data?: Record<string, any>;\n };\n\n/**\n * Generates a temporary URL to download all tracked files at one revision as a ZIP.\n * Includes hidden directories, binary files and materialized LFS objects; excludes Git history.\n * Defaults to main. Supply the returned revision when committing uploaded code unless force is true.\n * Requires an authenticated user with read access to the app or its companion site.\n * @param managedProjectId - Managed project whose code will be downloaded.\n * @public\n * @documentationMaturity preview\n * @requiredField managedProjectId\n * @permissionId codestore:v2:project:generate_git_code_store_project_download_url\n * @fqn wix.codestore.v2.GitCodeStoreManagedProjectManagement.GenerateGitCodeStoreProjectDownloadUrl\n */\nexport async function generateGitCodeStoreProjectDownloadUrl(\n managedProjectId: string,\n options?: GenerateGitCodeStoreProjectDownloadUrlOptions\n): Promise<\n NonNullablePaths<\n GenerateGitCodeStoreProjectDownloadUrlResponse,\n | `downloadUrl`\n | `revision.author.name`\n | `revision.author.email`\n | `branchName`,\n 2\n > & {\n __applicationErrorsType?: GenerateGitCodeStoreProjectDownloadUrlApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n managedProjectId: managedProjectId,\n branchName: options?.branchName,\n revisionId: options?.revisionId,\n });\n\n const reqOpts =\n ambassadorWixCodestoreV2Project.generateGitCodeStoreProjectDownloadUrl(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n managedProjectId: '$[0]',\n branchName: '$[1].branchName',\n revisionId: '$[1].revisionId',\n },\n singleArgumentUnchanged: false,\n },\n ['managedProjectId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateGitCodeStoreProjectDownloadUrlOptions {\n /**\n * Existing branch. Defaults to main.\n * @minLength 1\n * @maxLength 250\n */\n branchName?: string | null;\n /**\n * Optional full commit SHA, reachable from the selected branch. Defaults to its head.\n * @minLength 40\n * @maxLength 40\n */\n revisionId?: string | null;\n}\n\n/**\n * Generates a temporary, project-scoped URL for uploading a ZIP with HTTP PUT.\n * PUT the ZIP with the returned headers, then call CommitGitCodeStoreProjectUpload. No size is required.\n * The 64 MiB compressed size limit is checked when committing the upload, not by the signed PUT.\n * Uploading alone never changes the repository. ZIP paths must be relative to its root.\n * Requires an authenticated user with update access to the app or its companion site.\n * @param managedProjectId - Managed project receiving the upload.\n * @public\n * @documentationMaturity preview\n * @requiredField managedProjectId\n * @permissionId codestore:v2:project:generate_git_code_store_project_upload_url\n * @fqn wix.codestore.v2.GitCodeStoreManagedProjectManagement.GenerateGitCodeStoreProjectUploadUrl\n */\nexport async function generateGitCodeStoreProjectUploadUrl(\n managedProjectId: string\n): Promise<\n NonNullablePaths<\n GenerateGitCodeStoreProjectUploadUrlResponse,\n `uploadId` | `uploadUrl`,\n 0\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n managedProjectId: managedProjectId,\n });\n\n const reqOpts =\n ambassadorWixCodestoreV2Project.generateGitCodeStoreProjectUploadUrl(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { managedProjectId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['managedProjectId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Commits and pushes a previously uploaded ZIP's contents to an existing branch.\n * Replaces the complete tracked file tree. Does not publish or deploy the application.\n * Files omitted from the ZIP are deleted. Creates one child commit and preserves history; never resets the branch history.\n * Defaults to main. An empty ZIP intentionally removes all files. An unchanged tree creates no commit.\n * Unless force is true, a stale expected head fails even for unchanged input.\n * Force replaces the latest checked-out tree and preserves history; concurrent writes can still conflict.\n * Accepts at most 64 MiB compressed, 256 MiB expanded, and 10,000 ZIP entries.\n * Rejects unsafe paths, Git metadata, submodules, and symlinks outside the repository.\n * After a timeout, inspect the head before retrying.\n * Requires an authenticated user with update access to the app or its companion site.\n * @param managedProjectId - Managed project to update. Must be the same project that issued upload_id.\n * @param uploadId - Identifier returned by GenerateGitCodeStoreProjectUploadUrl.\n * The ZIP must have been uploaded within the last hour.\n * @public\n * @documentationMaturity preview\n * @requiredField managedProjectId\n * @requiredField options.commit\n * @requiredField options.commit.author\n * @requiredField options.commit.author.email\n * @requiredField options.commit.author.name\n * @requiredField options.commit.message\n * @requiredField uploadId\n * @permissionId codestore:v2:project:commit_git_code_store_project_upload\n * @fqn wix.codestore.v2.GitCodeStoreManagedProjectManagement.CommitGitCodeStoreProjectUpload\n */\nexport async function commitGitCodeStoreProjectUpload(\n managedProjectId: string,\n uploadId: string,\n options?: NonNullablePaths<\n CommitGitCodeStoreProjectUploadOptions,\n | `commit`\n | `commit.author`\n | `commit.author.email`\n | `commit.author.name`\n | `commit.message`,\n 2\n >\n): Promise<\n NonNullablePaths<\n CommitGitCodeStoreProjectUploadResponse,\n `revision.author.name` | `revision.author.email` | `branchName` | `changed`,\n 2\n > & {\n __applicationErrorsType?: CommitGitCodeStoreProjectUploadApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n managedProjectId: managedProjectId,\n uploadId: uploadId,\n branchName: options?.branchName,\n expectedHeadRevisionId: options?.expectedHeadRevisionId,\n commit: options?.commit,\n force: options?.force,\n });\n\n const reqOpts =\n ambassadorWixCodestoreV2Project.commitGitCodeStoreProjectUpload(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n managedProjectId: '$[0]',\n uploadId: '$[1]',\n branchName: '$[2].branchName',\n expectedHeadRevisionId: '$[2].expectedHeadRevisionId',\n commit: '$[2].commit',\n force: '$[2].force',\n },\n singleArgumentUnchanged: false,\n },\n ['managedProjectId', 'uploadId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CommitGitCodeStoreProjectUploadOptions {\n /**\n * Existing branch. Defaults to main.\n * @minLength 1\n * @maxLength 250\n */\n branchName?: string | null;\n /**\n * Full SHA from the download URL response. Required unless force is true; ignored when force is true.\n * Prevents replacing code changed since the download. The handler requires exactly 40 hexadecimal characters\n * when force is false; missing, empty, abbreviated, or non-hexadecimal values are rejected before reading the upload.\n * @maxLength 40\n */\n expectedHeadRevisionId?: string;\n /** Message and author for the replacement commit. */\n commit: GitCodeStoreProjectCommitOptions;\n /**\n * Replace the latest branch tree even if it changed since download. Defaults to false.\n * Preserves history by creating a normal commit; concurrent writes can still cause a conflict.\n */\n force?: boolean;\n}\n","import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nconst TRANSFORM_PATHS_0 = [\n { path: 'expiresAt' },\n { path: 'revision.creationTime' },\n];\nconst TRANSFORM_PATHS_1 = [{ path: 'expiresAt' }];\nconst TRANSFORM_PATHS_2 = [{ path: 'revision.creationTime' }];\n\nfunction resolveWixCodestoreV2GitCodeStoreManagedProjectManagementUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_api/git-code-store',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/git-code-store',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/git-code-store',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/git-code-store',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/codestore/v2/git-code-store-projects',\n destPath: '/v2/git-code-store-projects',\n },\n ],\n _: [\n {\n srcPath: '/codestore/v2/git-code-store-projects',\n destPath: '/v2/git-code-store-projects',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_git-code-store_projects';\n\n/**\n * Generates a temporary URL to download all tracked files at one revision as a ZIP.\n * Includes hidden directories, binary files and materialized LFS objects; excludes Git history.\n * Defaults to main. Supply the returned revision when committing uploaded code unless force is true.\n * Requires an authenticated user with read access to the app or its companion site.\n */\nexport function generateGitCodeStoreProjectDownloadUrl(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateGitCodeStoreProjectDownloadUrl({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.codestore.v2.project',\n method: 'POST' as any,\n methodFqn:\n 'wix.codestore.v2.GitCodeStoreManagedProjectManagement.GenerateGitCodeStoreProjectDownloadUrl',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCodestoreV2GitCodeStoreManagedProjectManagementUrl({\n protoPath:\n '/v2/git-code-store-projects/{managedProjectId}/generate-download-url',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __generateGitCodeStoreProjectDownloadUrl;\n}\n\n/**\n * Generates a temporary, project-scoped URL for uploading a ZIP with HTTP PUT.\n * PUT the ZIP with the returned headers, then call CommitGitCodeStoreProjectUpload. No size is required.\n * The 64 MiB compressed size limit is checked when committing the upload, not by the signed PUT.\n * Uploading alone never changes the repository. ZIP paths must be relative to its root.\n * Requires an authenticated user with update access to the app or its companion site.\n */\nexport function generateGitCodeStoreProjectUploadUrl(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateGitCodeStoreProjectUploadUrl({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.codestore.v2.project',\n method: 'POST' as any,\n methodFqn:\n 'wix.codestore.v2.GitCodeStoreManagedProjectManagement.GenerateGitCodeStoreProjectUploadUrl',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCodestoreV2GitCodeStoreManagedProjectManagementUrl({\n protoPath:\n '/v2/git-code-store-projects/{managedProjectId}/generate-upload-url',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_1,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __generateGitCodeStoreProjectUploadUrl;\n}\n\n/**\n * Commits and pushes a previously uploaded ZIP's contents to an existing branch.\n * Replaces the complete tracked file tree. Does not publish or deploy the application.\n * Files omitted from the ZIP are deleted. Creates one child commit and preserves history; never resets the branch history.\n * Defaults to main. An empty ZIP intentionally removes all files. An unchanged tree creates no commit.\n * Unless force is true, a stale expected head fails even for unchanged input.\n * Force replaces the latest checked-out tree and preserves history; concurrent writes can still conflict.\n * Accepts at most 64 MiB compressed, 256 MiB expanded, and 10,000 ZIP entries.\n * Rejects unsafe paths, Git metadata, submodules, and symlinks outside the repository.\n * After a timeout, inspect the head before retrying.\n * Requires an authenticated user with update access to the app or its companion site.\n */\nexport function commitGitCodeStoreProjectUpload(\n payload: object\n): RequestOptionsFactory<any> {\n function __commitGitCodeStoreProjectUpload({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.codestore.v2.project',\n method: 'POST' as any,\n methodFqn:\n 'wix.codestore.v2.GitCodeStoreManagedProjectManagement.CommitGitCodeStoreProjectUpload',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCodestoreV2GitCodeStoreManagedProjectManagementUrl({\n protoPath:\n '/v2/git-code-store-projects/{managedProjectId}/commit-upload',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_2,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __commitGitCodeStoreProjectUpload;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CommitGitCodeStoreProjectUploadApplicationErrors,\n CommitGitCodeStoreProjectUploadOptions,\n CommitGitCodeStoreProjectUploadResponse,\n GenerateGitCodeStoreProjectDownloadUrlApplicationErrors,\n GenerateGitCodeStoreProjectDownloadUrlOptions,\n GenerateGitCodeStoreProjectDownloadUrlResponse,\n GenerateGitCodeStoreProjectUploadUrlResponse,\n commitGitCodeStoreProjectUpload as universalCommitGitCodeStoreProjectUpload,\n generateGitCodeStoreProjectDownloadUrl as universalGenerateGitCodeStoreProjectDownloadUrl,\n generateGitCodeStoreProjectUploadUrl as universalGenerateGitCodeStoreProjectUploadUrl,\n} from './codestore-v2-project-projects.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/git-code-store' };\n\nexport function generateGitCodeStoreProjectDownloadUrl(\n httpClient: HttpClient\n): GenerateGitCodeStoreProjectDownloadUrlSignature {\n return (\n managedProjectId: string,\n options?: GenerateGitCodeStoreProjectDownloadUrlOptions\n ) =>\n universalGenerateGitCodeStoreProjectDownloadUrl(\n managedProjectId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateGitCodeStoreProjectDownloadUrlSignature {\n /**\n * Generates a temporary URL to download all tracked files at one revision as a ZIP.\n * Includes hidden directories, binary files and materialized LFS objects; excludes Git history.\n * Defaults to main. Supply the returned revision when committing uploaded code unless force is true.\n * Requires an authenticated user with read access to the app or its companion site.\n * @param - Managed project whose code will be downloaded.\n */\n (\n managedProjectId: string,\n options?: GenerateGitCodeStoreProjectDownloadUrlOptions\n ): Promise<\n NonNullablePaths<\n GenerateGitCodeStoreProjectDownloadUrlResponse,\n | `downloadUrl`\n | `revision.author.name`\n | `revision.author.email`\n | `branchName`,\n 2\n > & {\n __applicationErrorsType?: GenerateGitCodeStoreProjectDownloadUrlApplicationErrors;\n }\n >;\n}\n\nexport function generateGitCodeStoreProjectUploadUrl(\n httpClient: HttpClient\n): GenerateGitCodeStoreProjectUploadUrlSignature {\n return (managedProjectId: string) =>\n universalGenerateGitCodeStoreProjectUploadUrl(\n managedProjectId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateGitCodeStoreProjectUploadUrlSignature {\n /**\n * Generates a temporary, project-scoped URL for uploading a ZIP with HTTP PUT.\n * PUT the ZIP with the returned headers, then call CommitGitCodeStoreProjectUpload. No size is required.\n * The 64 MiB compressed size limit is checked when committing the upload, not by the signed PUT.\n * Uploading alone never changes the repository. ZIP paths must be relative to its root.\n * Requires an authenticated user with update access to the app or its companion site.\n * @param - Managed project receiving the upload.\n */\n (managedProjectId: string): Promise<\n NonNullablePaths<\n GenerateGitCodeStoreProjectUploadUrlResponse,\n `uploadId` | `uploadUrl`,\n 0\n >\n >;\n}\n\nexport function commitGitCodeStoreProjectUpload(\n httpClient: HttpClient\n): CommitGitCodeStoreProjectUploadSignature {\n return (\n managedProjectId: string,\n uploadId: string,\n options?: NonNullablePaths<\n CommitGitCodeStoreProjectUploadOptions,\n | `commit`\n | `commit.author`\n | `commit.author.email`\n | `commit.author.name`\n | `commit.message`,\n 2\n >\n ) =>\n universalCommitGitCodeStoreProjectUpload(\n managedProjectId,\n uploadId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CommitGitCodeStoreProjectUploadSignature {\n /**\n * Commits and pushes a previously uploaded ZIP's contents to an existing branch.\n * Replaces the complete tracked file tree. Does not publish or deploy the application.\n * Files omitted from the ZIP are deleted. Creates one child commit and preserves history; never resets the branch history.\n * Defaults to main. An empty ZIP intentionally removes all files. An unchanged tree creates no commit.\n * Unless force is true, a stale expected head fails even for unchanged input.\n * Force replaces the latest checked-out tree and preserves history; concurrent writes can still conflict.\n * Accepts at most 64 MiB compressed, 256 MiB expanded, and 10,000 ZIP entries.\n * Rejects unsafe paths, Git metadata, submodules, and symlinks outside the repository.\n * After a timeout, inspect the head before retrying.\n * Requires an authenticated user with update access to the app or its companion site.\n * @param - Managed project to update. Must be the same project that issued upload_id.\n * @param - Identifier returned by GenerateGitCodeStoreProjectUploadUrl.\n * The ZIP must have been uploaded within the last hour.\n */\n (\n managedProjectId: string,\n uploadId: string,\n options?: NonNullablePaths<\n CommitGitCodeStoreProjectUploadOptions,\n | `commit`\n | `commit.author`\n | `commit.author.email`\n | `commit.author.name`\n | `commit.message`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n CommitGitCodeStoreProjectUploadResponse,\n | `revision.author.name`\n | `revision.author.email`\n | `branchName`\n | `changed`,\n 2\n > & {\n __applicationErrorsType?: CommitGitCodeStoreProjectUploadApplicationErrors;\n }\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n Author,\n BulkGetGitCodeStoreProjectFileError,\n BulkGetGitCodeStoreProjectFileResult,\n BulkGetGitCodeStoreProjectFileResultResultOneOf,\n BulkGetGitCodeStoreProjectFilesRequest,\n BulkGetGitCodeStoreProjectFilesResponse,\n CloneGitCodeStoreProjectRequest,\n CloneGitCodeStoreProjectResponse,\n CommitGitCodeStoreProjectFileChangesRequest,\n CommitGitCodeStoreProjectFileChangesResponse,\n CommitGitCodeStoreProjectUploadOptions,\n CommitGitCodeStoreProjectUploadRequest,\n CommitGitCodeStoreProjectUploadResponse,\n CreateGitCodeStoreProjectRequest,\n CreateGitCodeStoreProjectResponse,\n DeleteGitCodeStoreProjectRequest,\n DeleteGitCodeStoreProjectResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n FileEntry,\n FileInfo,\n FolderEntry,\n GenerateGitCodeStoreProjectDownloadUrlOptions,\n GenerateGitCodeStoreProjectDownloadUrlRequest,\n GenerateGitCodeStoreProjectDownloadUrlResponse,\n GenerateGitCodeStoreProjectStagedUploadDownloadUrlRequest,\n GenerateGitCodeStoreProjectStagedUploadDownloadUrlResponse,\n GenerateGitCodeStoreProjectUploadUrlRequest,\n GenerateGitCodeStoreProjectUploadUrlResponse,\n GetGitCodeStoreProjectCredentialsRequest,\n GetGitCodeStoreProjectCredentialsResponse,\n GetGitCodeStoreProjectFileRequest,\n GetGitCodeStoreProjectFileResponse,\n GetGitCodeStoreProjectHeadRevisionRequest,\n GetGitCodeStoreProjectHeadRevisionResponse,\n GitCodeStoreConfig,\n GitCodeStoreConfigGitRemoteOptionsOneOf,\n GitCodeStoreConfigS3Options,\n GitCodeStoreOptions,\n GitCodeStoreOptionsOptionsOneOf,\n GitCodeStoreOptionsS3Options,\n GitCodeStoreProjectCommitAuthor,\n GitCodeStoreProjectCommitOptions,\n GitCodeStoreProjectCreated,\n GitCodeStoreProjectDeleted,\n GitCodeStoreProjectFile,\n GitCodeStoreProjectFileChange,\n GitCodeStoreProjectFileChangeChangeOneOf,\n GitCodeStoreProjectFileReference,\n GitCodeStoreProjectTransferred,\n GitCredentials,\n GitCredentialsOptionsOneOf,\n GitHubOptions,\n GitRemoteType,\n GithubAppOptions,\n GithubOptions,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListGitCodeStoreProjectFolderContentRequest,\n ListGitCodeStoreProjectFolderContentResponse,\n ListGitCodeStoreProjectRevisionsRequest,\n ListGitCodeStoreProjectRevisionsResponse,\n MessageEnvelope,\n MigrateGitCodeStoreProjectRequest,\n MigrateGitCodeStoreProjectRequestGithubOptions,\n MigrateGitCodeStoreProjectRequestS3Options,\n MigrateGitCodeStoreProjectRequestTargetOptionsOneOf,\n MigrateGitCodeStoreProjectResponse,\n Project,\n RestoreInfo,\n Result,\n Revision,\n S3Options,\n TransferGitCodeStoreProjectRequest,\n TransferGitCodeStoreProjectResponse,\n ValidateAndResolveConfigRequest,\n ValidateAndResolveConfigResponse,\n WebhookIdentityType,\n} from './codestore-v2-project-projects.universal.js';\n","import {\n generateGitCodeStoreProjectDownloadUrl as publicGenerateGitCodeStoreProjectDownloadUrl,\n generateGitCodeStoreProjectUploadUrl as publicGenerateGitCodeStoreProjectUploadUrl,\n commitGitCodeStoreProjectUpload as publicCommitGitCodeStoreProjectUpload,\n} from './codestore-v2-project-projects.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const generateGitCodeStoreProjectDownloadUrl: MaybeContext<\n BuildRESTFunction<typeof publicGenerateGitCodeStoreProjectDownloadUrl> &\n typeof publicGenerateGitCodeStoreProjectDownloadUrl\n> = /*#__PURE__*/ createRESTModule(\n publicGenerateGitCodeStoreProjectDownloadUrl\n);\nexport const generateGitCodeStoreProjectUploadUrl: MaybeContext<\n BuildRESTFunction<typeof publicGenerateGitCodeStoreProjectUploadUrl> &\n typeof publicGenerateGitCodeStoreProjectUploadUrl\n> = /*#__PURE__*/ createRESTModule(publicGenerateGitCodeStoreProjectUploadUrl);\nexport const commitGitCodeStoreProjectUpload: MaybeContext<\n BuildRESTFunction<typeof publicCommitGitCodeStoreProjectUpload> &\n typeof publicCommitGitCodeStoreProjectUpload\n> = /*#__PURE__*/ createRESTModule(publicCommitGitCodeStoreProjectUpload);\n\nexport {\n GitRemoteType,\n Result,\n WebhookIdentityType,\n} from './codestore-v2-project-projects.universal.js';\nexport {\n Project,\n GitCodeStoreProjectCreated,\n GitCodeStoreOptions,\n GitCodeStoreOptionsOptionsOneOf,\n GitCodeStoreOptionsS3Options,\n GitHubOptions,\n GitCodeStoreProjectTransferred,\n GitCodeStoreProjectDeleted,\n GenerateGitCodeStoreProjectDownloadUrlRequest,\n GenerateGitCodeStoreProjectDownloadUrlResponse,\n Revision,\n Author,\n GenerateGitCodeStoreProjectUploadUrlRequest,\n GenerateGitCodeStoreProjectUploadUrlResponse,\n GenerateGitCodeStoreProjectStagedUploadDownloadUrlRequest,\n GenerateGitCodeStoreProjectStagedUploadDownloadUrlResponse,\n CommitGitCodeStoreProjectUploadRequest,\n GitCodeStoreProjectCommitOptions,\n GitCodeStoreProjectCommitAuthor,\n CommitGitCodeStoreProjectUploadResponse,\n CreateGitCodeStoreProjectRequest,\n FileInfo,\n CreateGitCodeStoreProjectResponse,\n TransferGitCodeStoreProjectRequest,\n TransferGitCodeStoreProjectResponse,\n DeleteGitCodeStoreProjectRequest,\n DeleteGitCodeStoreProjectResponse,\n CloneGitCodeStoreProjectRequest,\n CloneGitCodeStoreProjectResponse,\n MigrateGitCodeStoreProjectRequest,\n MigrateGitCodeStoreProjectRequestTargetOptionsOneOf,\n MigrateGitCodeStoreProjectRequestS3Options,\n MigrateGitCodeStoreProjectRequestGithubOptions,\n MigrateGitCodeStoreProjectResponse,\n ListGitCodeStoreProjectRevisionsRequest,\n ListGitCodeStoreProjectRevisionsResponse,\n GetGitCodeStoreProjectCredentialsRequest,\n GetGitCodeStoreProjectCredentialsResponse,\n GitCredentials,\n GitCredentialsOptionsOneOf,\n S3Options,\n GithubOptions,\n GetGitCodeStoreProjectFileRequest,\n GetGitCodeStoreProjectFileResponse,\n GetGitCodeStoreProjectHeadRevisionRequest,\n GetGitCodeStoreProjectHeadRevisionResponse,\n BulkGetGitCodeStoreProjectFilesRequest,\n BulkGetGitCodeStoreProjectFilesResponse,\n BulkGetGitCodeStoreProjectFileResult,\n BulkGetGitCodeStoreProjectFileResultResultOneOf,\n GitCodeStoreProjectFile,\n BulkGetGitCodeStoreProjectFileError,\n CommitGitCodeStoreProjectFileChangesRequest,\n GitCodeStoreProjectFileChange,\n GitCodeStoreProjectFileChangeChangeOneOf,\n GitCodeStoreProjectFileReference,\n CommitGitCodeStoreProjectFileChangesResponse,\n ListGitCodeStoreProjectFolderContentRequest,\n ListGitCodeStoreProjectFolderContentResponse,\n FileEntry,\n FolderEntry,\n ValidateAndResolveConfigRequest,\n GitCodeStoreConfig,\n GitCodeStoreConfigGitRemoteOptionsOneOf,\n GithubAppOptions,\n GitCodeStoreConfigS3Options,\n ValidateAndResolveConfigResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n GenerateGitCodeStoreProjectDownloadUrlOptions,\n CommitGitCodeStoreProjectUploadOptions,\n} from './codestore-v2-project-projects.universal.js';\nexport {\n GitRemoteTypeWithLiterals,\n ResultWithLiterals,\n WebhookIdentityTypeWithLiterals,\n GenerateGitCodeStoreProjectDownloadUrlApplicationErrors,\n CommitGitCodeStoreProjectUploadApplicationErrors,\n} from './codestore-v2-project-projects.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,YAAY;AAAA,EACpB,EAAE,MAAM,wBAAwB;AAClC;AACA,IAAM,oBAAoB,CAAC,EAAE,MAAM,YAAY,CAAC;AAChD,IAAM,oBAAoB,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAE5D,SAAS,6DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ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IACA,YAAY,SAAS;AAAA,IACrB,wBAAwB,SAAS;AAAA,IACjC,QAAQ,SAAS;AAAA,IACjB,OAAO,SAAS;AAAA,EAClB,CAAC;AAED,QAAM,UAC4B,gCAAgC,OAAO;AAEzE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,kBAAkB;AAAA,UAClB,UAAU;AAAA,UACV,YAAY;AAAA,UACZ,wBAAwB;AAAA,UACxB,QAAQ;AAAA,UACR,OAAO;AAAA,QACT;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,oBAAoB,YAAY,SAAS;AAAA,IAC5C;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;;;AEv1CO,SAASC,wCACd,YACiD;AACjD,SAAO,CACL,kBACA,YAEAA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AA2BO,SAASC,sCACd,YAC+C;AAC/C,SAAO,CAAC,qBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAoBO,SAASC,iCACd,YAC0C;AAC1C,SAAO,CACL,kBACA,UACA,YAUAA;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;ACvGA,SAAS,wBAAwB;AAG1B,IAAMC,0CAGK;AAAA,EAChBA;AACF;AACO,IAAMC,wCAGK,iCAAiBA,qCAA0C;AACtE,IAAMC,mCAGK,iCAAiBA,gCAAqC;","names":["payload","GitRemoteType","Result","WebhookIdentityType","generateGitCodeStoreProjectDownloadUrl","generateGitCodeStoreProjectUploadUrl","commitGitCodeStoreProjectUpload","generateGitCodeStoreProjectDownloadUrl","generateGitCodeStoreProjectUploadUrl","commitGitCodeStoreProjectUpload","generateGitCodeStoreProjectDownloadUrl","generateGitCodeStoreProjectUploadUrl","commitGitCodeStoreProjectUpload"]}
1
+ {"version":3,"sources":["../../src/codestore-v2-project-projects.universal.ts","../../src/codestore-v2-project-projects.http.ts","../../src/codestore-v2-project-projects.public.ts","../../src/codestore-v2-project-projects.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixCodestoreV2Project from './codestore-v2-project-projects.http.js';\n\n/**\n * Virtual entity representing the codestore v2 project.\n * All persistence lives on wix.appmanagedprojects.v1.AppManagedProject;\n * this entity exists to anchor the v2 service to its own FQDN.\n */\nexport interface Project {\n /**\n * Structural placeholder. The entity is virtual (persistence: NONE);\n * all real state lives on wix.appmanagedprojects.v1.AppManagedProject.\n * @format GUID\n */\n _id?: string;\n}\n\nexport interface GitCodeStoreProjectCreated {\n /**\n * The ID of the managed project for which the git code store project was created.\n * @format GUID\n */\n managedProjectId?: string;\n /** The git code store options of the created project. */\n gitCodeStoreOptions?: GitCodeStoreOptions;\n}\n\n/**\n * GitCodeStoreOptions represents per-project state for a git code store project.\n * Stored on the AppManagedProject entity.\n */\nexport interface GitCodeStoreOptions extends GitCodeStoreOptionsOptionsOneOf {\n s3Options?: GitCodeStoreOptionsS3Options;\n githubOptions?: GitHubOptions;\n /**\n * The git remote URL of the linked project.\n * @maxLength 200\n * @immutable\n */\n gitRemoteUrl?: string;\n gitRemoteType?: GitRemoteTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface GitCodeStoreOptionsOptionsOneOf {\n s3Options?: GitCodeStoreOptionsS3Options;\n githubOptions?: GitHubOptions;\n}\n\nexport enum GitRemoteType {\n S3 = 'S3',\n GITHUB = 'GITHUB',\n}\n\n/** @enumType */\nexport type GitRemoteTypeWithLiterals = GitRemoteType | 'S3' | 'GITHUB';\n\nexport interface GitCodeStoreOptionsS3Options {\n /**\n * S3 access key id.\n * @maxLength 20\n */\n accessKeyId?: string;\n /**\n * S3 secret access key.\n * @maxLength 40\n */\n secretAccessKey?: string;\n}\n\nexport interface GitHubOptions {\n /**\n * GitHub App installation ID for this project.\n * @maxLength 200\n */\n appInstallationId?: string;\n}\n\nexport interface GitCodeStoreProjectTransferred {\n /**\n * The ID of the managed project that was transferred.\n * @format GUID\n */\n managedProjectId?: string;\n /** The updated git code store options after the transfer. */\n gitCodeStoreOptions?: GitCodeStoreOptions;\n}\n\nexport interface GitCodeStoreProjectDeleted {\n /**\n * The ID of the managed project whose git code store project was deleted.\n * @format GUID\n */\n managedProjectId?: string;\n}\n\nexport interface GenerateGitCodeStoreProjectDownloadUrlRequest {\n /**\n * ID of the existing AppManagedProject whose code will be downloaded.\n * This identifies the managed project, not its site or a legacy v1 Code Store project.\n * @format GUID\n */\n managedProjectId: string;\n /**\n * Existing branch. Defaults to main.\n * @minLength 1\n * @maxLength 250\n */\n branchName?: string | null;\n /**\n * Optional full commit SHA, reachable from the selected branch. Defaults to its head.\n * @minLength 40\n * @maxLength 40\n */\n revisionId?: string | null;\n}\n\nexport interface GenerateGitCodeStoreProjectDownloadUrlResponse {\n /**\n * Signed URL for downloading the complete ZIP with HTTP GET. Valid for 5 minutes.\n * Anyone holding this URL can download the ZIP until it expires; no additional authorization is required.\n * @format WEB_URL\n */\n downloadUrl?: string;\n /** Expiration of the signed URL; credential expiry or revocation can invalidate it earlier. */\n expiresAt?: Date | null;\n /** Revision included in the ZIP. Use its id as the expected head when committing an upload. */\n revision?: Revision;\n /**\n * Resolved branch name.\n * @maxLength 250\n */\n branchName?: string;\n}\n\nexport interface Revision {\n /**\n * Revision identifier\n * @readonly\n * @maxLength 40\n */\n _id?: string | null;\n /**\n * Revision description message\n * @readonly\n * @maxLength 2000\n */\n description?: string | null;\n /**\n * Creation time\n * @readonly\n */\n creationTime?: Date | null;\n /** Author details */\n author?: Author;\n}\n\nexport interface Author {\n /**\n * Author name\n * @readonly\n * @maxLength 100\n */\n name?: string;\n /**\n * Author email\n * @readonly\n * @format EMAIL\n */\n email?: string;\n}\n\nexport interface GenerateGitCodeStoreProjectUploadUrlRequest {\n /**\n * ID of the existing AppManagedProject receiving the upload.\n * Use the same `managedProjectId` for downloading, uploading, and committing.\n * @format GUID\n */\n managedProjectId: string;\n}\n\nexport interface GenerateGitCodeStoreProjectUploadUrlResponse {\n /**\n * Project-scoped upload identifier. Pass it to CommitGitCodeStoreProjectUpload after PUT succeeds.\n * @format GUID\n */\n uploadId?: string;\n /**\n * Signed URL accepting HTTP PUT for one staged object. Valid for 5 minutes.\n * Anyone holding this URL can replace the staged object until it expires.\n * @format WEB_URL\n */\n uploadUrl?: string;\n /**\n * Required headers for the PUT, in addition to headers automatically set by the HTTP client.\n * @maxSize 20\n */\n headers?: Record<string, string>;\n /** Expiration of the signed URL; credential expiry or revocation can invalidate it earlier. */\n expiresAt?: Date | null;\n}\n\nexport interface GenerateGitCodeStoreProjectStagedUploadDownloadUrlRequest {\n /**\n * Managed project that issued the upload identifier.\n * @format GUID\n */\n managedProjectId?: string;\n /**\n * Identifier returned by GenerateGitCodeStoreProjectUploadUrl. PUT must have completed.\n * The staged object must be at most 64 MiB and less than one hour old.\n * @format GUID\n */\n uploadId?: string;\n}\n\nexport interface GenerateGitCodeStoreProjectStagedUploadDownloadUrlResponse {\n /**\n * Signed HTTP GET URL for the staged ZIP, valid for at most five minutes.\n * Anyone holding the URL and required headers can download it until expiry.\n * @format WEB_URL\n */\n downloadUrl?: string;\n /**\n * Required GET headers, including If-Match binding the download to the checked object.\n * Do not omit or modify them. No Wix authorization header is needed for the GET.\n * @maxSize 20\n */\n headers?: Record<string, string>;\n /** Capped by the remaining one-hour upload lifetime. Credentials can invalidate it earlier. */\n expiresAt?: Date | null;\n}\n\nexport interface CommitGitCodeStoreProjectUploadRequest {\n /**\n * ID of the existing AppManagedProject to update. Must be the same project that issued `uploadId`.\n * @format GUID\n */\n managedProjectId: string;\n /**\n * Identifier returned by GenerateGitCodeStoreProjectUploadUrl.\n * The ZIP must have been uploaded within the last hour.\n * @format GUID\n */\n uploadId: string;\n /**\n * Existing branch. Defaults to main.\n * @minLength 1\n * @maxLength 250\n */\n branchName?: string | null;\n /**\n * Full SHA from the download URL response. Required unless force is true; ignored when force is true.\n * Prevents replacing code changed since the download. The handler requires exactly 40 hexadecimal characters\n * when force is false; missing, empty, abbreviated, or non-hexadecimal values are rejected before reading the upload.\n * @maxLength 40\n */\n expectedHeadRevisionId?: string;\n /** Message and author for the replacement commit. */\n commit: GitCodeStoreProjectCommitOptions;\n /**\n * Replace the latest branch tree even if it changed since download. Defaults to false.\n * Preserves history by creating a normal commit; concurrent writes can still cause a conflict.\n */\n force?: boolean;\n}\n\n/** Git commit metadata supplied by the caller when creating a revision. */\nexport interface GitCodeStoreProjectCommitOptions {\n /**\n * Commit message.\n * @minLength 1\n * @maxLength 2000\n */\n message?: string;\n /** Commit author. */\n author?: GitCodeStoreProjectCommitAuthor;\n}\n\n/** Git commit author supplied by the caller when creating a revision. */\nexport interface GitCodeStoreProjectCommitAuthor {\n /**\n * Author name.\n * @minLength 1\n * @maxLength 100\n */\n name?: string;\n /**\n * Author email.\n * @format EMAIL\n */\n email?: string;\n}\n\nexport interface CommitGitCodeStoreProjectUploadResponse {\n /** New revision, or the existing revision when the file tree is unchanged. */\n revision?: Revision;\n /**\n * Resolved branch name.\n * @minLength 1\n * @maxLength 250\n */\n branchName?: string;\n /** Whether a replacement commit was created. */\n changed?: boolean;\n}\n\nexport interface CreateGitCodeStoreProjectRequest {\n /**\n * The ID of the managed project to link the git code store project to.\n * @format GUID\n */\n managedProjectId?: string;\n /** Optional. Per-project overrides. If not supplied, defaults from the GitCodeStoreConfig will be used. */\n gitCodeStoreOptions?: GitCodeStoreOptions;\n /** Initial revision details for the first commit of the new project. */\n initialRevision?: Revision;\n /**\n * List of files (text only) to be created as part of the project's initial revision.\n * @minSize 1\n * @maxSize 200\n */\n files?: FileInfo[];\n /** Type of git remote used for the project being created. */\n gitRemoteType?: GitRemoteTypeWithLiterals;\n}\n\nexport interface FileInfo {\n /**\n * Path of the file.\n * @minLength 1\n * @maxLength 250\n */\n path?: string;\n /**\n * Content of the file.\n * @maxLength 3100000\n */\n content?: string;\n}\n\nexport interface CreateGitCodeStoreProjectResponse {\n /** The created git code store options to be persisted on the AppManagedProject entity. */\n gitCodeStoreOptions?: GitCodeStoreOptions;\n}\n\nexport interface TransferGitCodeStoreProjectRequest {\n /**\n * The ID of the managed project being transferred.\n * @format GUID\n */\n managedProjectId?: string;\n}\n\nexport interface TransferGitCodeStoreProjectResponse {\n /** The updated git code store options after the transfer. */\n gitCodeStoreOptions?: GitCodeStoreOptions;\n}\n\nexport interface DeleteGitCodeStoreProjectRequest {\n /**\n * The ID of the managed project whose git code store project should be deleted.\n * @format GUID\n */\n managedProjectId?: string;\n /** Type of git remote of the project being deleted. */\n gitRemoteType?: GitRemoteTypeWithLiterals;\n}\n\nexport interface DeleteGitCodeStoreProjectResponse {}\n\nexport interface CloneGitCodeStoreProjectRequest {\n /**\n * The ID of the managed project whose repository is the clone source.\n * Its current `GitCodeStoreOptions` (and resolved `GitCodeStoreConfig` for\n * GitHub-backed projects) are looked up by this service.\n * @format GUID\n */\n sourceManagedProjectId?: string;\n /**\n * The ID of the managed project that will own the newly created git code store project.\n * The target must be empty and is initialized as an S3 repository with every source branch.\n * Each branch contains its source head's files in one new parentless commit, without source history.\n * A failed partial clone must be retried with a new empty target.\n * @format GUID\n */\n targetManagedProjectId?: string;\n /**\n * Optional files to create or replace in every target branch's initial commit.\n * Use this to patch files that must reference the target project rather than the source\n * (for example, wix.config.mjs with the target's appId). Paths must follow the\n * same repository-relative contract as wix.codestore.v1.FileInfo.path.\n * @maxSize 20\n */\n overrideFiles?: FileInfo[];\n}\n\nexport interface CloneGitCodeStoreProjectResponse {\n /** The S3 `GitCodeStoreOptions` for the target. Caller persists on AppManagedProject. */\n gitCodeStoreOptions?: GitCodeStoreOptions;\n /**\n * The new commit hash on the source's default branch in the target repository.\n * @maxLength 40\n */\n commitHash?: string | null;\n}\n\nexport interface MigrateGitCodeStoreProjectRequest\n extends MigrateGitCodeStoreProjectRequestTargetOptionsOneOf {\n /** Target S3 options. Required when `target_git_remote_type` is S3. */\n s3Options?: MigrateGitCodeStoreProjectRequestS3Options;\n /** Target GitHub options. Required when `target_git_remote_type` is GITHUB. */\n githubOptions?: MigrateGitCodeStoreProjectRequestGithubOptions;\n /**\n * The ID of the managed project being migrated.\n * @format GUID\n */\n managedProjectId?: string;\n /** Target git remote type of the project (after the migration). */\n targetGitRemoteType?: GitRemoteTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface MigrateGitCodeStoreProjectRequestTargetOptionsOneOf {\n /** Target S3 options. Required when `target_git_remote_type` is S3. */\n s3Options?: MigrateGitCodeStoreProjectRequestS3Options;\n /** Target GitHub options. Required when `target_git_remote_type` is GITHUB. */\n githubOptions?: MigrateGitCodeStoreProjectRequestGithubOptions;\n}\n\nexport interface MigrateGitCodeStoreProjectRequestS3Options {}\n\nexport interface MigrateGitCodeStoreProjectRequestGithubOptions {\n /**\n * GitHub App ID.\n * @format GUID\n */\n githubAppId?: string;\n /**\n * GitHub App Installation ID.\n * @maxLength 200\n */\n appInstallationId?: string;\n /**\n * Remote URL of the GitHub repository.\n * @format WEB_URL\n * @maxLength 200\n */\n gitRemoteUrl?: string;\n}\n\nexport interface MigrateGitCodeStoreProjectResponse {\n /**\n * The updated git code store options after the migration, as persisted on\n * the AppManagedProject's instance_config.git_code_store_options.\n */\n gitCodeStoreOptions?: GitCodeStoreOptions;\n}\n\nexport interface ListGitCodeStoreProjectRevisionsRequest {\n /**\n * The ID of the managed project whose revisions to list.\n * @format GUID\n */\n managedProjectId?: string;\n}\n\nexport interface ListGitCodeStoreProjectRevisionsResponse {\n /** List of revisions, ordered newest to oldest. */\n revisions?: Revision[];\n}\n\nexport interface GetGitCodeStoreProjectCredentialsRequest {\n /**\n * The ID of the managed project to retrieve credentials for.\n * @format GUID\n */\n managedProjectId?: string;\n}\n\nexport interface GetGitCodeStoreProjectCredentialsResponse {\n /** Git credentials for accessing the project's repository. */\n gitCredentials?: GitCredentials;\n}\n\nexport interface GitCredentials extends GitCredentialsOptionsOneOf {\n /** Options for S3 git remote. */\n s3Options?: S3Options;\n /** Options for GitHub git remote. */\n githubOptions?: GithubOptions;\n /**\n * Git-remote url.\n * @maxLength 200\n */\n gitRemoteUrl?: string;\n /** Type of git remote used for the project. */\n gitRemoteType?: GitRemoteTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface GitCredentialsOptionsOneOf {\n /** Options for S3 git remote. */\n s3Options?: S3Options;\n /** Options for GitHub git remote. */\n githubOptions?: GithubOptions;\n}\n\nexport interface S3Options {\n /**\n * S3 access key id.\n * @maxLength 20\n */\n accessKeyId?: string;\n /**\n * S3 secret access key.\n * @maxLength 40\n */\n secretAccessKey?: string;\n /**\n * S3 secret access key.\n * @maxLength 2048\n */\n sessionToken?: string;\n}\n\nexport interface GithubOptions {\n /**\n * GitHub app installation access token.\n * @maxLength 2048\n */\n accessToken?: string;\n /**\n * GitHub repo url, that includes access token and can be used as a remote url\n * in git, without additional auth configuration.\n * @maxLength 2048\n */\n authorizedGitRemoteUrl?: string;\n}\n\nexport interface GetGitCodeStoreProjectFileRequest {\n /**\n * The ID of the managed project to read the file from.\n * @format GUID\n */\n managedProjectId?: string;\n /**\n * Path of the file to read, relative to the repository root.\n * @minLength 1\n * @maxLength 500\n */\n filePath?: string;\n /**\n * Optional. Commit hash to read the file from.\n * If not provided, the latest revision of the main branch is used.\n * @maxLength 40\n */\n commitHash?: string | null;\n}\n\nexport interface GetGitCodeStoreProjectFileResponse {\n /** The requested file with its content. */\n file?: FileInfo;\n /** The revision the file was read from. */\n revision?: Revision;\n}\n\n/** Selects the branch whose current head revision to retrieve. */\nexport interface GetGitCodeStoreProjectHeadRevisionRequest {\n /**\n * The ID of the managed project.\n * @format GUID\n */\n managedProjectId?: string;\n /**\n * Optional. Existing branch to read from. Defaults to the main branch.\n * @maxLength 250\n */\n branchName?: string | null;\n}\n\n/** Current branch head, without file content or revision history. */\nexport interface GetGitCodeStoreProjectHeadRevisionResponse {\n /** The head revision observed when the request was handled. */\n revision?: Revision;\n /**\n * Branch whose head revision was retrieved.\n * @maxLength 250\n */\n branchName?: string;\n}\n\n/** Exact paths to read from a single snapshot. */\nexport interface BulkGetGitCodeStoreProjectFilesRequest {\n /**\n * The ID of the managed project to read files from.\n * @format GUID\n */\n managedProjectId?: string;\n /**\n * Paths of up to 100 files to read, relative to the repository root.\n * The complete serialized response must fit within 4 MiB, including error results and metadata.\n * For larger reads, use smaller batches pinned to the same revision_id.\n * @minSize 1\n * @maxSize 100\n * @minLength 1\n * @maxLength 500\n */\n filePaths?: string[];\n /**\n * Optional. Existing branch to read from.\n * Defaults to the main branch; revision_id selects the snapshot.\n * @maxLength 250\n */\n branchName?: string | null;\n /**\n * Optional. Exact revision to read, allowing multiple batches to use the same snapshot.\n * Must be reachable from branch_name, or main when branch_name is omitted.\n * When omitted, reads the current branch head. Use a full revision.id returned by this API.\n * @minLength 40\n * @maxLength 40\n */\n revisionId?: string | null;\n}\n\n/** Response containing selected file contents and the revision they were read from. */\nexport interface BulkGetGitCodeStoreProjectFilesResponse {\n /**\n * One result per requested path, in the same order as file_paths.\n * @maxSize 100\n */\n results?: BulkGetGitCodeStoreProjectFileResult[];\n /** The exact revision the files were read from, including when revision_id was supplied. */\n revision?: Revision;\n /**\n * Branch the files were read from.\n * @maxLength 250\n */\n branchName?: string;\n}\n\n/** Outcome for one requested repository-relative path. */\nexport interface BulkGetGitCodeStoreProjectFileResult\n extends BulkGetGitCodeStoreProjectFileResultResultOneOf {\n /** Content when the requested path is a readable file. */\n file?: GitCodeStoreProjectFile;\n /** Failure for this path; other paths may succeed in the same response. */\n error?: BulkGetGitCodeStoreProjectFileError;\n /**\n * Requested path, relative to the repository root.\n * @minLength 1\n * @maxLength 500\n */\n path?: string;\n}\n\n/** @oneof */\nexport interface BulkGetGitCodeStoreProjectFileResultResultOneOf {\n /** Content when the requested path is a readable file. */\n file?: GitCodeStoreProjectFile;\n /** Failure for this path; other paths may succeed in the same response. */\n error?: BulkGetGitCodeStoreProjectFileError;\n}\n\n/** A file's repository-relative path and UTF-8 content, shared by reads and PUTs. */\nexport interface GitCodeStoreProjectFile {\n /**\n * Path relative to the repository root.\n * @minLength 1\n * @maxLength 500\n */\n path?: string;\n /**\n * Complete UTF-8 content. Empty content is valid; the service enforces a 1 MiB byte limit.\n * @maxLength 1048576\n */\n content?: string;\n}\n\n/** Failure specific to a requested path. Snapshot and size failures fail the RPC. */\nexport interface BulkGetGitCodeStoreProjectFileError {\n /**\n * Stable code. Missing paths return GIT_PROJECT_FILE_NOT_FOUND.\n * @maxLength 100\n */\n applicationCode?: string;\n /**\n * Human-readable explanation; callers should match application_code.\n * @maxLength 1000\n */\n message?: string;\n}\n\n/** Request to create one commit from selected file puts and deletes. */\nexport interface CommitGitCodeStoreProjectFileChangesRequest {\n /**\n * The ID of the managed project to change.\n * @format GUID\n */\n managedProjectId?: string;\n /**\n * Up to 100 file puts and deletes to apply in one commit, in request order.\n * The complete serialized request must fit within 4 MiB, including metadata.\n * Requests above the gRPC receiver limit may be rejected before API validation.\n * Paths are repository-relative; traversal, .git metadata, and symlink traversal are rejected.\n * @minSize 1\n * @maxSize 100\n */\n fileChanges?: GitCodeStoreProjectFileChange[];\n /**\n * The revision ID the caller expects at the target branch head.\n * @minLength 40\n * @maxLength 40\n */\n expectedHeadRevisionId?: string;\n /**\n * Optional. Existing branch to commit to.\n * If not provided, changes are committed to the main branch.\n * @maxLength 250\n */\n branchName?: string | null;\n /** Commit metadata for the created revision. */\n commit?: GitCodeStoreProjectCommitOptions;\n}\n\n/** One operation in an atomic file-change commit. Select exactly one operation. */\nexport interface GitCodeStoreProjectFileChange\n extends GitCodeStoreProjectFileChangeChangeOneOf {\n /** Creates or replaces a file with its complete content. */\n put?: GitCodeStoreProjectFile;\n /** Deletes an existing file at the given path. */\n delete?: GitCodeStoreProjectFileReference;\n}\n\n/** @oneof */\nexport interface GitCodeStoreProjectFileChangeChangeOneOf {\n /** Creates or replaces a file with its complete content. */\n put?: GitCodeStoreProjectFile;\n /** Deletes an existing file at the given path. */\n delete?: GitCodeStoreProjectFileReference;\n}\n\n/** Identifies the file to delete; no content is needed. */\nexport interface GitCodeStoreProjectFileReference {\n /**\n * Path relative to the repository root.\n * @minLength 1\n * @maxLength 500\n */\n path?: string;\n}\n\n/** Response describing the target branch state after a file changes request. */\nexport interface CommitGitCodeStoreProjectFileChangesResponse {\n /** Whether this request created a commit or left the file tree unchanged. */\n result?: ResultWithLiterals;\n /**\n * The current target branch revision after the call.\n * For NO_CHANGES this is the unchanged branch head.\n */\n revision?: Revision;\n /**\n * Branch the file changes were applied to.\n * @maxLength 250\n */\n branchName?: string;\n}\n\n/** Outcome of the file changes request. */\nexport enum Result {\n /** A new commit was created on the target branch. */\n COMMITTED = 'COMMITTED',\n /** The resulting file tree is unchanged; no commit was created. */\n NO_CHANGES = 'NO_CHANGES',\n}\n\n/** @enumType */\nexport type ResultWithLiterals = Result | 'COMMITTED' | 'NO_CHANGES';\n\nexport interface ListGitCodeStoreProjectFolderContentRequest {\n /**\n * The ID of the managed project whose folder to list.\n * @format GUID\n */\n managedProjectId?: string;\n /**\n * Optional. Folder to list, relative to the repository root (for example `src/components`).\n * Surrounding slashes are ignored, so `/` is equivalent to not providing a folder at all.\n * If not provided, the repository root is listed.\n * @maxLength 500\n */\n folderPath?: string | null;\n /**\n * Optional. Commit hash to list the folder at.\n * If not provided, the latest revision of the main branch is used.\n * @maxLength 40\n */\n commitHash?: string | null;\n /**\n * Optional. How many levels below `folder_path` to include, defaulting to 1 - the\n * folder's own content. Levels are cumulative: `depth` 4 returns everything from\n * level 1 through level 4 inclusive. With `depth` 3 over `a/b/c/d/file.js` and\n * `a/b/foo.js`, the response holds the file `a/b/foo.js` and the folders `a`,\n * `a/b` and `a/b/c`, while `a/b/c/d` and the file below it sit too deep.\n * A tree shallower than `depth` simply yields everything it has.\n * @min 1\n * @max 10\n */\n depth?: number | null;\n}\n\nexport interface ListGitCodeStoreProjectFolderContentResponse {\n /**\n * Files from every level up to `depth` below the requested folder, ordered by path.\n * Symlinks are reported here, since git stores a symlink as a file. More than 500\n * files in total returns TOO_MANY_PROJECT_FILES.\n * @maxSize 500\n */\n files?: FileEntry[];\n /**\n * Folders from every level up to `depth` below the requested folder, ordered by path.\n * The repository's own `.git` metadata is never listed or traversed. More than 500\n * folders in total returns TOO_MANY_PROJECT_FILES.\n * @maxSize 500\n */\n folders?: FolderEntry[];\n /** The revision the folder was listed at. */\n revision?: Revision;\n}\n\n/** A file directly inside the listed folder. */\nexport interface FileEntry {\n /**\n * Name of the file within the listed folder, with no path separators.\n * @minLength 1\n * @maxLength 250\n */\n name?: string;\n /**\n * Full path of the file relative to the repository root. Pass this to\n * GetGitCodeStoreProjectFile to read the file's content.\n * @minLength 1\n * @maxLength 500\n */\n path?: string;\n}\n\n/**\n * A folder directly inside the listed folder. Git tracks no directory of its own,\n * so a folder appears here only because it contains at least one file, at any depth.\n */\nexport interface FolderEntry {\n /**\n * Name of the folder within the listed folder, with no path separators.\n * @minLength 1\n * @maxLength 250\n */\n name?: string;\n /**\n * Full path of the folder relative to the repository root. Pass this back as\n * `folder_path` to list the next level down.\n * @minLength 1\n * @maxLength 500\n */\n path?: string;\n}\n\nexport interface ValidateAndResolveConfigRequest {\n /**\n * The ID of the AppManagedProjectConfig being validated.\n * @format GUID\n */\n managedProjectConfigId?: string;\n /** The GitCodeStoreConfig to validate. */\n gitCodeStoreConfig?: GitCodeStoreConfig;\n}\n\n/**\n * GitCodeStoreConfig represents the kind of code store configuration that\n * projects created under an AppManagedProjectConfig will use.\n */\nexport interface GitCodeStoreConfig\n extends GitCodeStoreConfigGitRemoteOptionsOneOf {\n /** Options for GitHub git remote. */\n githubAppOptions?: GithubAppOptions;\n /** Options for S3 git remote. */\n s3Options?: GitCodeStoreConfigS3Options;\n /**\n * Type of git remote used for projects under this config.\n * @immutable\n */\n gitRemoteType?: GitRemoteTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface GitCodeStoreConfigGitRemoteOptionsOneOf {\n /** Options for GitHub git remote. */\n githubAppOptions?: GithubAppOptions;\n /** Options for S3 git remote. */\n s3Options?: GitCodeStoreConfigS3Options;\n}\n\nexport interface GithubAppOptions {\n /**\n * The GitHub App ID that owns repositories created under this config.\n * @maxLength 200\n * @immutable\n */\n appId?: string;\n}\n\nexport interface GitCodeStoreConfigS3Options {}\n\nexport interface ValidateAndResolveConfigResponse {\n /** The GitCodeStoreConfig after validation, to be stored. */\n gitCodeStoreConfig?: GitCodeStoreConfig;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type GenerateGitCodeStoreProjectDownloadUrlApplicationErrors =\n | {\n code?: 'GIT_BRANCH_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'GIT_COMMIT_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_REPOSITORY_ARCHIVE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'REPOSITORY_ARCHIVE_TOO_LARGE';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type CommitGitCodeStoreProjectUploadApplicationErrors =\n | {\n code?: 'GIT_HEAD_COMMIT_MISMATCH';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'GIT_BRANCH_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'REPOSITORY_UPLOAD_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_REPOSITORY_ARCHIVE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'REPOSITORY_ARCHIVE_TOO_LARGE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'GIT_PUSH_CONFLICT';\n description?: string;\n data?: Record<string, any>;\n };\n\n/**\n * Generates a temporary URL to download all tracked files at one revision as a ZIP.\n *\n * Includes hidden directories, binary files and materialized LFS objects; excludes Git history.\n * Defaults to main. Omit `revisionId` to download the current branch head.\n * Supply the returned revision when committing uploaded code unless force is true.\n * Supports at most 10,000 tracked files, 256 MiB expanded, and a 64 MiB ZIP.\n * Rejects unsafe paths, submodules, special files, and dangling or escaping symlinks.\n * Requires an authenticated user with read access to the app or its companion site.\n * @param managedProjectId - ID of the existing AppManagedProject whose code will be downloaded.\n * This identifies the managed project, not its site or a legacy v1 Code Store project.\n * @public\n * @documentationMaturity preview\n * @requiredField managedProjectId\n * @permissionId codestore:v2:project:generate_git_code_store_project_download_url\n * @fqn wix.codestore.v2.GitCodeStoreManagedProjectManagement.GenerateGitCodeStoreProjectDownloadUrl\n */\nexport async function generateGitCodeStoreProjectDownloadUrl(\n managedProjectId: string,\n options?: GenerateGitCodeStoreProjectDownloadUrlOptions\n): Promise<\n NonNullablePaths<\n GenerateGitCodeStoreProjectDownloadUrlResponse,\n | `downloadUrl`\n | `revision.author.name`\n | `revision.author.email`\n | `branchName`,\n 2\n > & {\n __applicationErrorsType?: GenerateGitCodeStoreProjectDownloadUrlApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n managedProjectId: managedProjectId,\n branchName: options?.branchName,\n revisionId: options?.revisionId,\n });\n\n const reqOpts =\n ambassadorWixCodestoreV2Project.generateGitCodeStoreProjectDownloadUrl(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n managedProjectId: '$[0]',\n branchName: '$[1].branchName',\n revisionId: '$[1].revisionId',\n },\n singleArgumentUnchanged: false,\n },\n ['managedProjectId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GenerateGitCodeStoreProjectDownloadUrlOptions {\n /**\n * Existing branch. Defaults to main.\n * @minLength 1\n * @maxLength 250\n */\n branchName?: string | null;\n /**\n * Optional full commit SHA, reachable from the selected branch. Defaults to its head.\n * @minLength 40\n * @maxLength 40\n */\n revisionId?: string | null;\n}\n\n/**\n * Generates a temporary, project-scoped URL for uploading a ZIP with HTTP PUT.\n *\n * PUT the ZIP with the returned headers, then call\n * [Commit Git Code Store Project Upload](https://dev.wix.com/docs/api-reference/account-level/git-codestore/commit-git-code-store-project-upload).\n * The 64 MiB compressed size limit is checked when committing the upload, not by the signed PUT.\n * Uploading alone never changes the repository. ZIP paths must be relative to its root.\n * Requires an authenticated user with update access to the app or its companion site.\n * @param managedProjectId - ID of the existing AppManagedProject receiving the upload.\n * Use the same `managedProjectId` for downloading, uploading, and committing.\n * @public\n * @documentationMaturity preview\n * @requiredField managedProjectId\n * @permissionId codestore:v2:project:generate_git_code_store_project_upload_url\n * @fqn wix.codestore.v2.GitCodeStoreManagedProjectManagement.GenerateGitCodeStoreProjectUploadUrl\n */\nexport async function generateGitCodeStoreProjectUploadUrl(\n managedProjectId: string\n): Promise<\n NonNullablePaths<\n GenerateGitCodeStoreProjectUploadUrlResponse,\n `uploadId` | `uploadUrl`,\n 0\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n managedProjectId: managedProjectId,\n });\n\n const reqOpts =\n ambassadorWixCodestoreV2Project.generateGitCodeStoreProjectUploadUrl(\n payload\n );\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { managedProjectId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['managedProjectId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Commits and pushes a previously uploaded ZIP's contents to an existing branch.\n *\n * Replaces the complete tracked file tree. Does not publish or deploy the application.\n * Files omitted from the ZIP are deleted. Creates one child commit and preserves history; never resets the branch history.\n * Defaults to main. An empty ZIP intentionally removes all files. An unchanged tree creates no commit.\n * Unless force is true, a stale expected head fails even for unchanged input.\n * Force replaces the latest checked-out tree and preserves history; concurrent writes can still conflict.\n * Accepts at most 64 MiB compressed, 256 MiB expanded, and 10,000 ZIP entries.\n * Rejects unsafe paths, Git metadata, submodules, and symlinks outside the repository.\n * After a timeout, call [Generate Git Code Store Project Download Url](https://dev.wix.com/docs/api-reference/account-level/git-codestore/generate-git-code-store-project-download-url)\n * for the same branch with `revisionId` omitted.\n * Compare its revision and downloaded tree with your intended changes before retrying.\n * A changed head alone does not prove this request succeeded. Do not use force to recover from a timeout.\n * Requires an authenticated user with update access to the app or its companion site.\n * @param managedProjectId - ID of the existing AppManagedProject to update. Must be the same project that issued `uploadId`.\n * @param uploadId - Identifier returned by GenerateGitCodeStoreProjectUploadUrl.\n * The ZIP must have been uploaded within the last hour.\n * @public\n * @documentationMaturity preview\n * @requiredField managedProjectId\n * @requiredField options.commit\n * @requiredField options.commit.author\n * @requiredField options.commit.author.email\n * @requiredField options.commit.author.name\n * @requiredField options.commit.message\n * @requiredField uploadId\n * @permissionId codestore:v2:project:commit_git_code_store_project_upload\n * @fqn wix.codestore.v2.GitCodeStoreManagedProjectManagement.CommitGitCodeStoreProjectUpload\n */\nexport async function commitGitCodeStoreProjectUpload(\n managedProjectId: string,\n uploadId: string,\n options?: NonNullablePaths<\n CommitGitCodeStoreProjectUploadOptions,\n | `commit`\n | `commit.author`\n | `commit.author.email`\n | `commit.author.name`\n | `commit.message`,\n 2\n >\n): Promise<\n NonNullablePaths<\n CommitGitCodeStoreProjectUploadResponse,\n `revision.author.name` | `revision.author.email` | `branchName` | `changed`,\n 2\n > & {\n __applicationErrorsType?: CommitGitCodeStoreProjectUploadApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n managedProjectId: managedProjectId,\n uploadId: uploadId,\n branchName: options?.branchName,\n expectedHeadRevisionId: options?.expectedHeadRevisionId,\n commit: options?.commit,\n force: options?.force,\n });\n\n const reqOpts =\n ambassadorWixCodestoreV2Project.commitGitCodeStoreProjectUpload(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n managedProjectId: '$[0]',\n uploadId: '$[1]',\n branchName: '$[2].branchName',\n expectedHeadRevisionId: '$[2].expectedHeadRevisionId',\n commit: '$[2].commit',\n force: '$[2].force',\n },\n singleArgumentUnchanged: false,\n },\n ['managedProjectId', 'uploadId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CommitGitCodeStoreProjectUploadOptions {\n /**\n * Existing branch. Defaults to main.\n * @minLength 1\n * @maxLength 250\n */\n branchName?: string | null;\n /**\n * Full SHA from the download URL response. Required unless force is true; ignored when force is true.\n * Prevents replacing code changed since the download. The handler requires exactly 40 hexadecimal characters\n * when force is false; missing, empty, abbreviated, or non-hexadecimal values are rejected before reading the upload.\n * @maxLength 40\n */\n expectedHeadRevisionId?: string;\n /** Message and author for the replacement commit. */\n commit: GitCodeStoreProjectCommitOptions;\n /**\n * Replace the latest branch tree even if it changed since download. Defaults to false.\n * Preserves history by creating a normal commit; concurrent writes can still cause a conflict.\n */\n force?: boolean;\n}\n","import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nconst TRANSFORM_PATHS_0 = [\n { path: 'expiresAt' },\n { path: 'revision.creationTime' },\n];\nconst TRANSFORM_PATHS_1 = [{ path: 'expiresAt' }];\nconst TRANSFORM_PATHS_2 = [{ path: 'revision.creationTime' }];\n\nfunction resolveWixCodestoreV2GitCodeStoreManagedProjectManagementUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'bo._base_domain_': [\n {\n srcPath: '/_api/git-code-store',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/git-code-store',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/git-code-store',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/git-code-store',\n destPath: '',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/codestore/v2/git-code-store-projects',\n destPath: '/v2/git-code-store-projects',\n },\n ],\n _: [\n {\n srcPath: '/codestore/v2/git-code-store-projects',\n destPath: '/v2/git-code-store-projects',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_git-code-store_projects';\n\n/**\n * Generates a temporary URL to download all tracked files at one revision as a ZIP.\n *\n * Includes hidden directories, binary files and materialized LFS objects; excludes Git history.\n * Defaults to main. Omit `revisionId` to download the current branch head.\n * Supply the returned revision when committing uploaded code unless force is true.\n * Supports at most 10,000 tracked files, 256 MiB expanded, and a 64 MiB ZIP.\n * Rejects unsafe paths, submodules, special files, and dangling or escaping symlinks.\n * Requires an authenticated user with read access to the app or its companion site.\n */\nexport function generateGitCodeStoreProjectDownloadUrl(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateGitCodeStoreProjectDownloadUrl({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.codestore.v2.project',\n method: 'POST' as any,\n methodFqn:\n 'wix.codestore.v2.GitCodeStoreManagedProjectManagement.GenerateGitCodeStoreProjectDownloadUrl',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCodestoreV2GitCodeStoreManagedProjectManagementUrl({\n protoPath:\n '/v2/git-code-store-projects/{managedProjectId}/generate-download-url',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_0,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __generateGitCodeStoreProjectDownloadUrl;\n}\n\n/**\n * Generates a temporary, project-scoped URL for uploading a ZIP with HTTP PUT.\n *\n * PUT the ZIP with the returned headers, then call\n * [Commit Git Code Store Project Upload](https://dev.wix.com/docs/api-reference/account-level/git-codestore/commit-git-code-store-project-upload).\n * The 64 MiB compressed size limit is checked when committing the upload, not by the signed PUT.\n * Uploading alone never changes the repository. ZIP paths must be relative to its root.\n * Requires an authenticated user with update access to the app or its companion site.\n */\nexport function generateGitCodeStoreProjectUploadUrl(\n payload: object\n): RequestOptionsFactory<any> {\n function __generateGitCodeStoreProjectUploadUrl({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.codestore.v2.project',\n method: 'POST' as any,\n methodFqn:\n 'wix.codestore.v2.GitCodeStoreManagedProjectManagement.GenerateGitCodeStoreProjectUploadUrl',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCodestoreV2GitCodeStoreManagedProjectManagementUrl({\n protoPath:\n '/v2/git-code-store-projects/{managedProjectId}/generate-upload-url',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_1,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __generateGitCodeStoreProjectUploadUrl;\n}\n\n/**\n * Commits and pushes a previously uploaded ZIP's contents to an existing branch.\n *\n * Replaces the complete tracked file tree. Does not publish or deploy the application.\n * Files omitted from the ZIP are deleted. Creates one child commit and preserves history; never resets the branch history.\n * Defaults to main. An empty ZIP intentionally removes all files. An unchanged tree creates no commit.\n * Unless force is true, a stale expected head fails even for unchanged input.\n * Force replaces the latest checked-out tree and preserves history; concurrent writes can still conflict.\n * Accepts at most 64 MiB compressed, 256 MiB expanded, and 10,000 ZIP entries.\n * Rejects unsafe paths, Git metadata, submodules, and symlinks outside the repository.\n * After a timeout, call [Generate Git Code Store Project Download Url](https://dev.wix.com/docs/api-reference/account-level/git-codestore/generate-git-code-store-project-download-url)\n * for the same branch with `revisionId` omitted.\n * Compare its revision and downloaded tree with your intended changes before retrying.\n * A changed head alone does not prove this request succeeded. Do not use force to recover from a timeout.\n * Requires an authenticated user with update access to the app or its companion site.\n */\nexport function commitGitCodeStoreProjectUpload(\n payload: object\n): RequestOptionsFactory<any> {\n function __commitGitCodeStoreProjectUpload({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.codestore.v2.project',\n method: 'POST' as any,\n methodFqn:\n 'wix.codestore.v2.GitCodeStoreManagedProjectManagement.CommitGitCodeStoreProjectUpload',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCodestoreV2GitCodeStoreManagedProjectManagementUrl({\n protoPath:\n '/v2/git-code-store-projects/{managedProjectId}/commit-upload',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_2,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __commitGitCodeStoreProjectUpload;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n CommitGitCodeStoreProjectUploadApplicationErrors,\n CommitGitCodeStoreProjectUploadOptions,\n CommitGitCodeStoreProjectUploadResponse,\n GenerateGitCodeStoreProjectDownloadUrlApplicationErrors,\n GenerateGitCodeStoreProjectDownloadUrlOptions,\n GenerateGitCodeStoreProjectDownloadUrlResponse,\n GenerateGitCodeStoreProjectUploadUrlResponse,\n commitGitCodeStoreProjectUpload as universalCommitGitCodeStoreProjectUpload,\n generateGitCodeStoreProjectDownloadUrl as universalGenerateGitCodeStoreProjectDownloadUrl,\n generateGitCodeStoreProjectUploadUrl as universalGenerateGitCodeStoreProjectUploadUrl,\n} from './codestore-v2-project-projects.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/git-code-store' };\n\nexport function generateGitCodeStoreProjectDownloadUrl(\n httpClient: HttpClient\n): GenerateGitCodeStoreProjectDownloadUrlSignature {\n return (\n managedProjectId: string,\n options?: GenerateGitCodeStoreProjectDownloadUrlOptions\n ) =>\n universalGenerateGitCodeStoreProjectDownloadUrl(\n managedProjectId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateGitCodeStoreProjectDownloadUrlSignature {\n /**\n * Generates a temporary URL to download all tracked files at one revision as a ZIP.\n *\n * Includes hidden directories, binary files and materialized LFS objects; excludes Git history.\n * Defaults to main. Omit `revisionId` to download the current branch head.\n * Supply the returned revision when committing uploaded code unless force is true.\n * Supports at most 10,000 tracked files, 256 MiB expanded, and a 64 MiB ZIP.\n * Rejects unsafe paths, submodules, special files, and dangling or escaping symlinks.\n * Requires an authenticated user with read access to the app or its companion site.\n * @param - ID of the existing AppManagedProject whose code will be downloaded.\n * This identifies the managed project, not its site or a legacy v1 Code Store project.\n */\n (\n managedProjectId: string,\n options?: GenerateGitCodeStoreProjectDownloadUrlOptions\n ): Promise<\n NonNullablePaths<\n GenerateGitCodeStoreProjectDownloadUrlResponse,\n | `downloadUrl`\n | `revision.author.name`\n | `revision.author.email`\n | `branchName`,\n 2\n > & {\n __applicationErrorsType?: GenerateGitCodeStoreProjectDownloadUrlApplicationErrors;\n }\n >;\n}\n\nexport function generateGitCodeStoreProjectUploadUrl(\n httpClient: HttpClient\n): GenerateGitCodeStoreProjectUploadUrlSignature {\n return (managedProjectId: string) =>\n universalGenerateGitCodeStoreProjectUploadUrl(\n managedProjectId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GenerateGitCodeStoreProjectUploadUrlSignature {\n /**\n * Generates a temporary, project-scoped URL for uploading a ZIP with HTTP PUT.\n *\n * PUT the ZIP with the returned headers, then call\n * [Commit Git Code Store Project Upload](https://dev.wix.com/docs/api-reference/account-level/git-codestore/commit-git-code-store-project-upload).\n * The 64 MiB compressed size limit is checked when committing the upload, not by the signed PUT.\n * Uploading alone never changes the repository. ZIP paths must be relative to its root.\n * Requires an authenticated user with update access to the app or its companion site.\n * @param - ID of the existing AppManagedProject receiving the upload.\n * Use the same `managedProjectId` for downloading, uploading, and committing.\n */\n (managedProjectId: string): Promise<\n NonNullablePaths<\n GenerateGitCodeStoreProjectUploadUrlResponse,\n `uploadId` | `uploadUrl`,\n 0\n >\n >;\n}\n\nexport function commitGitCodeStoreProjectUpload(\n httpClient: HttpClient\n): CommitGitCodeStoreProjectUploadSignature {\n return (\n managedProjectId: string,\n uploadId: string,\n options?: NonNullablePaths<\n CommitGitCodeStoreProjectUploadOptions,\n | `commit`\n | `commit.author`\n | `commit.author.email`\n | `commit.author.name`\n | `commit.message`,\n 2\n >\n ) =>\n universalCommitGitCodeStoreProjectUpload(\n managedProjectId,\n uploadId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CommitGitCodeStoreProjectUploadSignature {\n /**\n * Commits and pushes a previously uploaded ZIP's contents to an existing branch.\n *\n * Replaces the complete tracked file tree. Does not publish or deploy the application.\n * Files omitted from the ZIP are deleted. Creates one child commit and preserves history; never resets the branch history.\n * Defaults to main. An empty ZIP intentionally removes all files. An unchanged tree creates no commit.\n * Unless force is true, a stale expected head fails even for unchanged input.\n * Force replaces the latest checked-out tree and preserves history; concurrent writes can still conflict.\n * Accepts at most 64 MiB compressed, 256 MiB expanded, and 10,000 ZIP entries.\n * Rejects unsafe paths, Git metadata, submodules, and symlinks outside the repository.\n * After a timeout, call [Generate Git Code Store Project Download Url](https://dev.wix.com/docs/api-reference/account-level/git-codestore/generate-git-code-store-project-download-url)\n * for the same branch with `revisionId` omitted.\n * Compare its revision and downloaded tree with your intended changes before retrying.\n * A changed head alone does not prove this request succeeded. Do not use force to recover from a timeout.\n * Requires an authenticated user with update access to the app or its companion site.\n * @param - ID of the existing AppManagedProject to update. Must be the same project that issued `uploadId`.\n * @param - Identifier returned by GenerateGitCodeStoreProjectUploadUrl.\n * The ZIP must have been uploaded within the last hour.\n */\n (\n managedProjectId: string,\n uploadId: string,\n options?: NonNullablePaths<\n CommitGitCodeStoreProjectUploadOptions,\n | `commit`\n | `commit.author`\n | `commit.author.email`\n | `commit.author.name`\n | `commit.message`,\n 2\n >\n ): Promise<\n NonNullablePaths<\n CommitGitCodeStoreProjectUploadResponse,\n | `revision.author.name`\n | `revision.author.email`\n | `branchName`\n | `changed`,\n 2\n > & {\n __applicationErrorsType?: CommitGitCodeStoreProjectUploadApplicationErrors;\n }\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n Author,\n BulkGetGitCodeStoreProjectFileError,\n BulkGetGitCodeStoreProjectFileResult,\n BulkGetGitCodeStoreProjectFileResultResultOneOf,\n BulkGetGitCodeStoreProjectFilesRequest,\n BulkGetGitCodeStoreProjectFilesResponse,\n CloneGitCodeStoreProjectRequest,\n CloneGitCodeStoreProjectResponse,\n CommitGitCodeStoreProjectFileChangesRequest,\n CommitGitCodeStoreProjectFileChangesResponse,\n CommitGitCodeStoreProjectUploadOptions,\n CommitGitCodeStoreProjectUploadRequest,\n CommitGitCodeStoreProjectUploadResponse,\n CreateGitCodeStoreProjectRequest,\n CreateGitCodeStoreProjectResponse,\n DeleteGitCodeStoreProjectRequest,\n DeleteGitCodeStoreProjectResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n FileEntry,\n FileInfo,\n FolderEntry,\n GenerateGitCodeStoreProjectDownloadUrlOptions,\n GenerateGitCodeStoreProjectDownloadUrlRequest,\n GenerateGitCodeStoreProjectDownloadUrlResponse,\n GenerateGitCodeStoreProjectStagedUploadDownloadUrlRequest,\n GenerateGitCodeStoreProjectStagedUploadDownloadUrlResponse,\n GenerateGitCodeStoreProjectUploadUrlRequest,\n GenerateGitCodeStoreProjectUploadUrlResponse,\n GetGitCodeStoreProjectCredentialsRequest,\n GetGitCodeStoreProjectCredentialsResponse,\n GetGitCodeStoreProjectFileRequest,\n GetGitCodeStoreProjectFileResponse,\n GetGitCodeStoreProjectHeadRevisionRequest,\n GetGitCodeStoreProjectHeadRevisionResponse,\n GitCodeStoreConfig,\n GitCodeStoreConfigGitRemoteOptionsOneOf,\n GitCodeStoreConfigS3Options,\n GitCodeStoreOptions,\n GitCodeStoreOptionsOptionsOneOf,\n GitCodeStoreOptionsS3Options,\n GitCodeStoreProjectCommitAuthor,\n GitCodeStoreProjectCommitOptions,\n GitCodeStoreProjectCreated,\n GitCodeStoreProjectDeleted,\n GitCodeStoreProjectFile,\n GitCodeStoreProjectFileChange,\n GitCodeStoreProjectFileChangeChangeOneOf,\n GitCodeStoreProjectFileReference,\n GitCodeStoreProjectTransferred,\n GitCredentials,\n GitCredentialsOptionsOneOf,\n GitHubOptions,\n GitRemoteType,\n GithubAppOptions,\n GithubOptions,\n IdentificationData,\n IdentificationDataIdOneOf,\n ListGitCodeStoreProjectFolderContentRequest,\n ListGitCodeStoreProjectFolderContentResponse,\n ListGitCodeStoreProjectRevisionsRequest,\n ListGitCodeStoreProjectRevisionsResponse,\n MessageEnvelope,\n MigrateGitCodeStoreProjectRequest,\n MigrateGitCodeStoreProjectRequestGithubOptions,\n MigrateGitCodeStoreProjectRequestS3Options,\n MigrateGitCodeStoreProjectRequestTargetOptionsOneOf,\n MigrateGitCodeStoreProjectResponse,\n Project,\n RestoreInfo,\n Result,\n Revision,\n S3Options,\n TransferGitCodeStoreProjectRequest,\n TransferGitCodeStoreProjectResponse,\n ValidateAndResolveConfigRequest,\n ValidateAndResolveConfigResponse,\n WebhookIdentityType,\n} from './codestore-v2-project-projects.universal.js';\n","import {\n generateGitCodeStoreProjectDownloadUrl as publicGenerateGitCodeStoreProjectDownloadUrl,\n generateGitCodeStoreProjectUploadUrl as publicGenerateGitCodeStoreProjectUploadUrl,\n commitGitCodeStoreProjectUpload as publicCommitGitCodeStoreProjectUpload,\n} from './codestore-v2-project-projects.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const generateGitCodeStoreProjectDownloadUrl: MaybeContext<\n BuildRESTFunction<typeof publicGenerateGitCodeStoreProjectDownloadUrl> &\n typeof publicGenerateGitCodeStoreProjectDownloadUrl\n> = /*#__PURE__*/ createRESTModule(\n publicGenerateGitCodeStoreProjectDownloadUrl\n);\nexport const generateGitCodeStoreProjectUploadUrl: MaybeContext<\n BuildRESTFunction<typeof publicGenerateGitCodeStoreProjectUploadUrl> &\n typeof publicGenerateGitCodeStoreProjectUploadUrl\n> = /*#__PURE__*/ createRESTModule(publicGenerateGitCodeStoreProjectUploadUrl);\nexport const commitGitCodeStoreProjectUpload: MaybeContext<\n BuildRESTFunction<typeof publicCommitGitCodeStoreProjectUpload> &\n typeof publicCommitGitCodeStoreProjectUpload\n> = /*#__PURE__*/ createRESTModule(publicCommitGitCodeStoreProjectUpload);\n\nexport {\n GitRemoteType,\n Result,\n WebhookIdentityType,\n} from './codestore-v2-project-projects.universal.js';\nexport {\n Project,\n GitCodeStoreProjectCreated,\n GitCodeStoreOptions,\n GitCodeStoreOptionsOptionsOneOf,\n GitCodeStoreOptionsS3Options,\n GitHubOptions,\n GitCodeStoreProjectTransferred,\n GitCodeStoreProjectDeleted,\n GenerateGitCodeStoreProjectDownloadUrlRequest,\n GenerateGitCodeStoreProjectDownloadUrlResponse,\n Revision,\n Author,\n GenerateGitCodeStoreProjectUploadUrlRequest,\n GenerateGitCodeStoreProjectUploadUrlResponse,\n GenerateGitCodeStoreProjectStagedUploadDownloadUrlRequest,\n GenerateGitCodeStoreProjectStagedUploadDownloadUrlResponse,\n CommitGitCodeStoreProjectUploadRequest,\n GitCodeStoreProjectCommitOptions,\n GitCodeStoreProjectCommitAuthor,\n CommitGitCodeStoreProjectUploadResponse,\n CreateGitCodeStoreProjectRequest,\n FileInfo,\n CreateGitCodeStoreProjectResponse,\n TransferGitCodeStoreProjectRequest,\n TransferGitCodeStoreProjectResponse,\n DeleteGitCodeStoreProjectRequest,\n DeleteGitCodeStoreProjectResponse,\n CloneGitCodeStoreProjectRequest,\n CloneGitCodeStoreProjectResponse,\n MigrateGitCodeStoreProjectRequest,\n MigrateGitCodeStoreProjectRequestTargetOptionsOneOf,\n MigrateGitCodeStoreProjectRequestS3Options,\n MigrateGitCodeStoreProjectRequestGithubOptions,\n MigrateGitCodeStoreProjectResponse,\n ListGitCodeStoreProjectRevisionsRequest,\n ListGitCodeStoreProjectRevisionsResponse,\n GetGitCodeStoreProjectCredentialsRequest,\n GetGitCodeStoreProjectCredentialsResponse,\n GitCredentials,\n GitCredentialsOptionsOneOf,\n S3Options,\n GithubOptions,\n GetGitCodeStoreProjectFileRequest,\n GetGitCodeStoreProjectFileResponse,\n GetGitCodeStoreProjectHeadRevisionRequest,\n GetGitCodeStoreProjectHeadRevisionResponse,\n BulkGetGitCodeStoreProjectFilesRequest,\n BulkGetGitCodeStoreProjectFilesResponse,\n BulkGetGitCodeStoreProjectFileResult,\n BulkGetGitCodeStoreProjectFileResultResultOneOf,\n GitCodeStoreProjectFile,\n BulkGetGitCodeStoreProjectFileError,\n CommitGitCodeStoreProjectFileChangesRequest,\n GitCodeStoreProjectFileChange,\n GitCodeStoreProjectFileChangeChangeOneOf,\n GitCodeStoreProjectFileReference,\n CommitGitCodeStoreProjectFileChangesResponse,\n ListGitCodeStoreProjectFolderContentRequest,\n ListGitCodeStoreProjectFolderContentResponse,\n FileEntry,\n FolderEntry,\n ValidateAndResolveConfigRequest,\n GitCodeStoreConfig,\n GitCodeStoreConfigGitRemoteOptionsOneOf,\n GithubAppOptions,\n GitCodeStoreConfigS3Options,\n ValidateAndResolveConfigResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n GenerateGitCodeStoreProjectDownloadUrlOptions,\n CommitGitCodeStoreProjectUploadOptions,\n} from './codestore-v2-project-projects.universal.js';\nexport {\n GitRemoteTypeWithLiterals,\n ResultWithLiterals,\n WebhookIdentityTypeWithLiterals,\n GenerateGitCodeStoreProjectDownloadUrlApplicationErrors,\n CommitGitCodeStoreProjectUploadApplicationErrors,\n} from './codestore-v2-project-projects.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,YAAY;AAAA,EACpB,EAAE,MAAM,wBAAwB;AAClC;AACA,IAAM,oBAAoB,CAAC,EAAE,MAAM,YAAY,CAAC;AAChD,IAAM,oBAA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AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC/GA,SAAS,wBAAwB;AAG1B,IAAMC,0CAGK;AAAA,EAChBA;AACF;AACO,IAAMC,wCAGK,iCAAiBA,qCAA0C;AACtE,IAAMC,mCAGK,iCAAiBA,gCAAqC;","names":["payload","GitRemoteType","Result","WebhookIdentityType","generateGitCodeStoreProjectDownloadUrl","generateGitCodeStoreProjectUploadUrl","commitGitCodeStoreProjectUpload","generateGitCodeStoreProjectDownloadUrl","generateGitCodeStoreProjectUploadUrl","commitGitCodeStoreProjectUpload","generateGitCodeStoreProjectDownloadUrl","generateGitCodeStoreProjectUploadUrl","commitGitCodeStoreProjectUpload"]}
@@ -85,7 +85,8 @@ interface GitCodeStoreProjectDeleted {
85
85
  }
86
86
  interface GenerateGitCodeStoreProjectDownloadUrlRequest {
87
87
  /**
88
- * Managed project whose code will be downloaded.
88
+ * ID of the existing AppManagedProject whose code will be downloaded.
89
+ * This identifies the managed project, not its site or a legacy v1 Code Store project.
89
90
  * @format GUID
90
91
  */
91
92
  managedProjectId: string;
@@ -156,7 +157,8 @@ interface Author {
156
157
  }
157
158
  interface GenerateGitCodeStoreProjectUploadUrlRequest {
158
159
  /**
159
- * Managed project receiving the upload.
160
+ * ID of the existing AppManagedProject receiving the upload.
161
+ * Use the same `managedProjectId` for downloading, uploading, and committing.
160
162
  * @format GUID
161
163
  */
162
164
  managedProjectId: string;
@@ -212,7 +214,7 @@ interface GenerateGitCodeStoreProjectStagedUploadDownloadUrlResponse {
212
214
  }
213
215
  interface CommitGitCodeStoreProjectUploadRequest {
214
216
  /**
215
- * Managed project to update. Must be the same project that issued upload_id.
217
+ * ID of the existing AppManagedProject to update. Must be the same project that issued `uploadId`.
216
218
  * @format GUID
217
219
  */
218
220
  managedProjectId: string;
@@ -1039,10 +1041,15 @@ type CommitGitCodeStoreProjectUploadApplicationErrors = {
1039
1041
  };
1040
1042
  /**
1041
1043
  * Generates a temporary URL to download all tracked files at one revision as a ZIP.
1044
+ *
1042
1045
  * Includes hidden directories, binary files and materialized LFS objects; excludes Git history.
1043
- * Defaults to main. Supply the returned revision when committing uploaded code unless force is true.
1046
+ * Defaults to main. Omit `revisionId` to download the current branch head.
1047
+ * Supply the returned revision when committing uploaded code unless force is true.
1048
+ * Supports at most 10,000 tracked files, 256 MiB expanded, and a 64 MiB ZIP.
1049
+ * Rejects unsafe paths, submodules, special files, and dangling or escaping symlinks.
1044
1050
  * Requires an authenticated user with read access to the app or its companion site.
1045
- * @param managedProjectId - Managed project whose code will be downloaded.
1051
+ * @param managedProjectId - ID of the existing AppManagedProject whose code will be downloaded.
1052
+ * This identifies the managed project, not its site or a legacy v1 Code Store project.
1046
1053
  * @public
1047
1054
  * @documentationMaturity preview
1048
1055
  * @requiredField managedProjectId
@@ -1068,11 +1075,14 @@ interface GenerateGitCodeStoreProjectDownloadUrlOptions {
1068
1075
  }
1069
1076
  /**
1070
1077
  * Generates a temporary, project-scoped URL for uploading a ZIP with HTTP PUT.
1071
- * PUT the ZIP with the returned headers, then call CommitGitCodeStoreProjectUpload. No size is required.
1078
+ *
1079
+ * PUT the ZIP with the returned headers, then call
1080
+ * [Commit Git Code Store Project Upload](https://dev.wix.com/docs/api-reference/account-level/git-codestore/commit-git-code-store-project-upload).
1072
1081
  * The 64 MiB compressed size limit is checked when committing the upload, not by the signed PUT.
1073
1082
  * Uploading alone never changes the repository. ZIP paths must be relative to its root.
1074
1083
  * Requires an authenticated user with update access to the app or its companion site.
1075
- * @param managedProjectId - Managed project receiving the upload.
1084
+ * @param managedProjectId - ID of the existing AppManagedProject receiving the upload.
1085
+ * Use the same `managedProjectId` for downloading, uploading, and committing.
1076
1086
  * @public
1077
1087
  * @documentationMaturity preview
1078
1088
  * @requiredField managedProjectId
@@ -1082,6 +1092,7 @@ interface GenerateGitCodeStoreProjectDownloadUrlOptions {
1082
1092
  declare function generateGitCodeStoreProjectUploadUrl(managedProjectId: string): Promise<NonNullablePaths<GenerateGitCodeStoreProjectUploadUrlResponse, `uploadId` | `uploadUrl`, 0>>;
1083
1093
  /**
1084
1094
  * Commits and pushes a previously uploaded ZIP's contents to an existing branch.
1095
+ *
1085
1096
  * Replaces the complete tracked file tree. Does not publish or deploy the application.
1086
1097
  * Files omitted from the ZIP are deleted. Creates one child commit and preserves history; never resets the branch history.
1087
1098
  * Defaults to main. An empty ZIP intentionally removes all files. An unchanged tree creates no commit.
@@ -1089,9 +1100,12 @@ declare function generateGitCodeStoreProjectUploadUrl(managedProjectId: string):
1089
1100
  * Force replaces the latest checked-out tree and preserves history; concurrent writes can still conflict.
1090
1101
  * Accepts at most 64 MiB compressed, 256 MiB expanded, and 10,000 ZIP entries.
1091
1102
  * Rejects unsafe paths, Git metadata, submodules, and symlinks outside the repository.
1092
- * After a timeout, inspect the head before retrying.
1103
+ * After a timeout, call [Generate Git Code Store Project Download Url](https://dev.wix.com/docs/api-reference/account-level/git-codestore/generate-git-code-store-project-download-url)
1104
+ * for the same branch with `revisionId` omitted.
1105
+ * Compare its revision and downloaded tree with your intended changes before retrying.
1106
+ * A changed head alone does not prove this request succeeded. Do not use force to recover from a timeout.
1093
1107
  * Requires an authenticated user with update access to the app or its companion site.
1094
- * @param managedProjectId - Managed project to update. Must be the same project that issued upload_id.
1108
+ * @param managedProjectId - ID of the existing AppManagedProject to update. Must be the same project that issued `uploadId`.
1095
1109
  * @param uploadId - Identifier returned by GenerateGitCodeStoreProjectUploadUrl.
1096
1110
  * The ZIP must have been uploaded within the last hour.
1097
1111
  * @public