@naturali/sdk 0.329.0 → 0.330.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +79 -0
- package/dist/index.d.cts +454 -1
- package/dist/index.d.mts +454 -1
- package/dist/index.mjs +79 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -6104,6 +6104,82 @@ var Quotas = class {
|
|
|
6104
6104
|
});
|
|
6105
6105
|
}
|
|
6106
6106
|
};
|
|
6107
|
+
var Repositories = class {
|
|
6108
|
+
/**
|
|
6109
|
+
* List the project's repositories
|
|
6110
|
+
*
|
|
6111
|
+
* The repositories granted to the project, newest first.
|
|
6112
|
+
*/
|
|
6113
|
+
static listRepositories(options) {
|
|
6114
|
+
return (options.client ?? client).get({
|
|
6115
|
+
url: "/v1/projects/{project_id}/repositories",
|
|
6116
|
+
...options
|
|
6117
|
+
});
|
|
6118
|
+
}
|
|
6119
|
+
/**
|
|
6120
|
+
* Grant a repository to the project
|
|
6121
|
+
*
|
|
6122
|
+
* Grant a repository the caller's code-host connection reaches. Only the account holding `connection_id` grants it, and it must be a member of the project. Granting it again answers `200` with the same repository.
|
|
6123
|
+
*
|
|
6124
|
+
*/
|
|
6125
|
+
static grantRepository(options) {
|
|
6126
|
+
return (options.client ?? client).post({
|
|
6127
|
+
url: "/v1/projects/{project_id}/repositories",
|
|
6128
|
+
...options,
|
|
6129
|
+
headers: {
|
|
6130
|
+
"Content-Type": "application/json",
|
|
6131
|
+
...options.headers
|
|
6132
|
+
}
|
|
6133
|
+
});
|
|
6134
|
+
}
|
|
6135
|
+
/**
|
|
6136
|
+
* Revoke a repository from the project
|
|
6137
|
+
*
|
|
6138
|
+
* Only the account holding the repository's connection revokes it. Disconnecting the code host revokes every repository it granted.
|
|
6139
|
+
*
|
|
6140
|
+
*/
|
|
6141
|
+
static revokeRepository(options) {
|
|
6142
|
+
return (options.client ?? client).delete({
|
|
6143
|
+
url: "/v1/projects/{project_id}/repositories/{repository_id}",
|
|
6144
|
+
...options
|
|
6145
|
+
});
|
|
6146
|
+
}
|
|
6147
|
+
/**
|
|
6148
|
+
* Get a repository
|
|
6149
|
+
*
|
|
6150
|
+
* One repository granted to the project.
|
|
6151
|
+
*/
|
|
6152
|
+
static getRepository(options) {
|
|
6153
|
+
return (options.client ?? client).get({
|
|
6154
|
+
url: "/v1/projects/{project_id}/repositories/{repository_id}",
|
|
6155
|
+
...options
|
|
6156
|
+
});
|
|
6157
|
+
}
|
|
6158
|
+
/**
|
|
6159
|
+
* Read a file or directory
|
|
6160
|
+
*
|
|
6161
|
+
* What `path` names at `ref`: a file with its content, or a directory with its entries. Text comes back as `utf-8`, anything else as `base64`. A file above 1 MiB is `400 REPOSITORY_FILE_TOO_LARGE`.
|
|
6162
|
+
*
|
|
6163
|
+
*/
|
|
6164
|
+
static getRepositoryContents(options) {
|
|
6165
|
+
return (options.client ?? client).get({
|
|
6166
|
+
url: "/v1/projects/{project_id}/repositories/{repository_id}/contents",
|
|
6167
|
+
...options
|
|
6168
|
+
});
|
|
6169
|
+
}
|
|
6170
|
+
/**
|
|
6171
|
+
* List every file and directory
|
|
6172
|
+
*
|
|
6173
|
+
* Every entry of the repository at `ref`, recursively. `truncated` is true when the code host cut the list short; read directories one at a time with the contents route then.
|
|
6174
|
+
*
|
|
6175
|
+
*/
|
|
6176
|
+
static getRepositoryTree(options) {
|
|
6177
|
+
return (options.client ?? client).get({
|
|
6178
|
+
url: "/v1/projects/{project_id}/repositories/{repository_id}/tree",
|
|
6179
|
+
...options
|
|
6180
|
+
});
|
|
6181
|
+
}
|
|
6182
|
+
};
|
|
6107
6183
|
var Secrets = class {
|
|
6108
6184
|
/**
|
|
6109
6185
|
* List secrets
|
|
@@ -7541,6 +7617,7 @@ var NaturaliClient = class {
|
|
|
7541
7617
|
playbooks;
|
|
7542
7618
|
policies;
|
|
7543
7619
|
projects;
|
|
7620
|
+
repositories;
|
|
7544
7621
|
secrets;
|
|
7545
7622
|
sessions;
|
|
7546
7623
|
tasks;
|
|
@@ -7604,6 +7681,7 @@ var NaturaliClient = class {
|
|
|
7604
7681
|
this.playbooks = bindResource(Playbooks, this.http);
|
|
7605
7682
|
this.policies = bindResource(Policies, this.http);
|
|
7606
7683
|
this.projects = bindResource(Projects, this.http);
|
|
7684
|
+
this.repositories = bindResource(Repositories, this.http);
|
|
7607
7685
|
this.secrets = bindResource(Secrets, this.http);
|
|
7608
7686
|
this.sessions = bindResource(Sessions, this.http);
|
|
7609
7687
|
this.tasks = bindResource(Tasks, this.http);
|
|
@@ -7661,6 +7739,7 @@ exports.Playbooks = Playbooks;
|
|
|
7661
7739
|
exports.Policies = Policies;
|
|
7662
7740
|
exports.Projects = Projects;
|
|
7663
7741
|
exports.Quotas = Quotas;
|
|
7742
|
+
exports.Repositories = Repositories;
|
|
7664
7743
|
exports.Secrets = Secrets;
|
|
7665
7744
|
exports.Sessions = Sessions;
|
|
7666
7745
|
exports.Tasks = Tasks;
|