gitverse-api-sdk 5.0.0 → 5.1.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/README.md +1 -21
- package/dist/api/actions.d.ts +326 -378
- package/dist/api/actions.js +3 -3
- package/dist/api/actions.js.map +3 -3
- package/dist/api/emails.d.ts +41 -46
- package/dist/api/emails.js +3 -3
- package/dist/api/emails.js.map +3 -3
- package/dist/api/issues.d.ts +264 -391
- package/dist/api/issues.js +3 -3
- package/dist/api/issues.js.map +3 -3
- package/dist/api/organizations.d.ts +68 -7
- package/dist/api/organizations.js +3 -3
- package/dist/api/organizations.js.map +3 -3
- package/dist/api/{branches.d.ts → pages.d.ts} +35 -41
- package/dist/api/pages.js +4 -0
- package/dist/api/pages.js.map +10 -0
- package/dist/api/pulls.d.ts +309 -526
- package/dist/api/pulls.js +3 -3
- package/dist/api/pulls.js.map +3 -3
- package/dist/api/releases.d.ts +183 -244
- package/dist/api/releases.js +3 -3
- package/dist/api/releases.js.map +3 -3
- package/dist/api/repositories.d.ts +859 -395
- package/dist/api/repositories.js +3 -3
- package/dist/api/repositories.js.map +3 -3
- package/dist/api/stars.d.ts +95 -231
- package/dist/api/stars.js +3 -3
- package/dist/api/stars.js.map +3 -3
- package/dist/api/teams.d.ts +96 -122
- package/dist/api/teams.js +3 -3
- package/dist/api/teams.js.map +3 -3
- package/dist/api/users.d.ts +78 -170
- package/dist/api/users.js +3 -3
- package/dist/api/users.js.map +3 -3
- package/dist/client.d.ts +4 -0
- package/dist/client.js +3 -3
- package/dist/client.js.map +1 -1
- package/dist/enums.d.ts +27 -71
- package/dist/enums.js +3 -3
- package/dist/enums.js.map +3 -3
- package/dist/errors.d.ts +12 -10
- package/dist/errors.js +2 -2
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1865 -2422
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/dist/types.d.ts +771 -1689
- package/dist/utils.js +1 -2
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/api/branches.js +0 -4
- package/dist/api/branches.js.map +0 -10
- package/dist/api/collaborators.d.ts +0 -440
- package/dist/api/collaborators.js +0 -4
- package/dist/api/collaborators.js.map +0 -10
- package/dist/api/commits.d.ts +0 -406
- package/dist/api/commits.js +0 -4
- package/dist/api/commits.js.map +0 -10
- package/dist/api/contents.d.ts +0 -389
- package/dist/api/contents.js +0 -4
- package/dist/api/contents.js.map +0 -10
- package/dist/api/forks.d.ts +0 -387
- package/dist/api/forks.js +0 -4
- package/dist/api/forks.js.map +0 -10
- package/dist/api/git.d.ts +0 -277
- package/dist/api/git.js +0 -4
- package/dist/api/git.js.map +0 -10
package/dist/api/issues.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
2
|
-
export{
|
|
1
|
+
class E{client;constructor(k){this.client=k}list(k,A,b,f){let j=new URLSearchParams;if(b?.state!==void 0)j.append("state",b.state);if(b?.q!==void 0)j.append("q",b.q);if(b?.labels!==void 0)j.append("labels",b.labels);if(b?.milestones!==void 0)j.append("milestones",b.milestones);if(b?.created_by!==void 0)j.append("created_by",b.created_by);if(b?.assigned_by!==void 0)j.append("assigned_by",b.assigned_by);if(b?.mentioned_by!==void 0)j.append("mentioned_by",b.mentioned_by);if(b?.type!==void 0)j.append("type",b.type);if(b?.since!==void 0)j.append("since",b.since);if(b?.before!==void 0)j.append("before",b.before);if(b?.page!==void 0)j.append("page",String(b.page));if(b?.per_page!==void 0)j.append("per_page",String(b.per_page));let z=j.toString(),B=`/repos/${k}/${A}/issues${z?`?${z}`:""}`;return this.client.get(B,f)}getComment(k,A,b,f){return this.client.get(`/repos/${k}/${A}/issues/comments/${b}`,f)}get(k,A,b,f){return this.client.get(`/repos/${k}/${A}/issues/${b}`,f)}listComments(k,A,b,f,j){let z=new URLSearchParams;if(f?.since!==void 0)z.append("since",f.since);if(f?.before!==void 0)z.append("before",f.before);let B=z.toString(),D=`/repos/${k}/${A}/issues/${b}/comments${B?`?${B}`:""}`;return this.client.get(D,j)}listLabels(k,A,b,f){return this.client.get(`/repos/${k}/${A}/issues/${b}/labels`,f)}listTimeline(k,A,b,f,j){let z=new URLSearchParams;if(f?.page!==void 0)z.append("page",String(f.page));if(f?.per_page!==void 0)z.append("per_page",String(f.per_page));if(f?.since!==void 0)z.append("since",f.since);if(f?.before!==void 0)z.append("before",f.before);let B=z.toString(),D=`/repos/${k}/${A}/issues/${b}/timeline${B?`?${B}`:""}`;return this.client.get(D,j)}}export{E as IssuesApi};
|
|
2
|
+
export{E as b};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=8F1C6E934EB8377564756E2164756E21
|
package/dist/api/issues.js.map
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/api/issues.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { GitVerseClient } from \"../client\";\nimport type {
|
|
5
|
+
"import type { GitVerseClient } from \"../client\";\nimport type { Comment, Issue, Label, TimelineComment } from \"../types\";\n\n/**\n * API для работы с issues\n */\nexport class IssuesApi {\n private client: GitVerseClient;\n\n /**\n * Создает новый экземпляр API\n * @param client GitVerse клиент\n */\n constructor(client: GitVerseClient) {\n this.client = client;\n }\n\n /**\n * List issues and pull requests\n * @param owner Repository owner\n * @param repo Repository name\n * @param queryParams Параметры запроса\n * @param options Опции запроса\n * @returns Issue[]\n */\n list(\n owner: string,\n repo: string,\n queryParams?: {\n state?: string;\n q?: string;\n labels?: string;\n milestones?: string;\n created_by?: string;\n assigned_by?: string;\n mentioned_by?: string;\n type?: string;\n since?: string;\n before?: string;\n page?: number;\n per_page?: number;\n },\n options?: { signal?: AbortSignal },\n ): Promise<Issue[]> {\n const searchParams = new URLSearchParams();\n if (queryParams?.state !== undefined) searchParams.append(\"state\", queryParams.state);\n if (queryParams?.q !== undefined) searchParams.append(\"q\", queryParams.q);\n if (queryParams?.labels !== undefined) searchParams.append(\"labels\", queryParams.labels);\n if (queryParams?.milestones !== undefined) searchParams.append(\"milestones\", queryParams.milestones);\n if (queryParams?.created_by !== undefined) searchParams.append(\"created_by\", queryParams.created_by);\n if (queryParams?.assigned_by !== undefined) searchParams.append(\"assigned_by\", queryParams.assigned_by);\n if (queryParams?.mentioned_by !== undefined) searchParams.append(\"mentioned_by\", queryParams.mentioned_by);\n if (queryParams?.type !== undefined) searchParams.append(\"type\", queryParams.type);\n if (queryParams?.since !== undefined) searchParams.append(\"since\", queryParams.since);\n if (queryParams?.before !== undefined) searchParams.append(\"before\", queryParams.before);\n if (queryParams?.page !== undefined) searchParams.append(\"page\", String(queryParams.page));\n if (queryParams?.per_page !== undefined) searchParams.append(\"per_page\", String(queryParams.per_page));\n const queryString = searchParams.toString();\n const url = `/repos/${owner}/${repo}/issues${queryString ? `?${queryString}` : \"\"}`;\n return this.client.get<Issue[]>(url, options);\n }\n\n /**\n * Get a specific issue comment\n * @param owner Repository owner\n * @param repo Repository name\n * @param id Comment ID\n * @param options Опции запроса\n * @returns Comment\n */\n getComment(owner: string, repo: string, id: number, options?: { signal?: AbortSignal }): Promise<Comment> {\n return this.client.get<Comment>(`/repos/${owner}/${repo}/issues/comments/${id}`, options);\n }\n\n /**\n * Get issue or pull request\n * @param owner Repository owner\n * @param repo Repository name\n * @param index Issue or pull request index in the repository\n * @param options Опции запроса\n * @returns Issue\n */\n get(owner: string, repo: string, index: number, options?: { signal?: AbortSignal }): Promise<Issue> {\n return this.client.get<Issue>(`/repos/${owner}/${repo}/issues/${index}`, options);\n }\n\n /**\n * List issue comments\n * @param owner Repository owner\n * @param repo Repository name\n * @param index Issue or pull request index in the repository\n * @param queryParams Параметры запроса\n * @param options Опции запроса\n * @returns Comment[]\n */\n listComments(\n owner: string,\n repo: string,\n index: number,\n queryParams?: { since?: string; before?: string },\n options?: { signal?: AbortSignal },\n ): Promise<Comment[]> {\n const searchParams = new URLSearchParams();\n if (queryParams?.since !== undefined) searchParams.append(\"since\", queryParams.since);\n if (queryParams?.before !== undefined) searchParams.append(\"before\", queryParams.before);\n const queryString = searchParams.toString();\n const url = `/repos/${owner}/${repo}/issues/${index}/comments${queryString ? `?${queryString}` : \"\"}`;\n return this.client.get<Comment[]>(url, options);\n }\n\n /**\n * List issue labels\n * @param owner Repository owner\n * @param repo Repository name\n * @param index Issue index in the repository\n * @param options Опции запроса\n * @returns Label[]\n */\n listLabels(owner: string, repo: string, index: number, options?: { signal?: AbortSignal }): Promise<Label[]> {\n return this.client.get<Label[]>(`/repos/${owner}/${repo}/issues/${index}/labels`, options);\n }\n\n /**\n * List issue comments and timeline events\n * @param owner Repository owner\n * @param repo Repository name\n * @param index Issue index in the repository\n * @param queryParams Параметры запроса\n * @param options Опции запроса\n * @returns TimelineComment[]\n */\n listTimeline(\n owner: string,\n repo: string,\n index: number,\n queryParams?: { page?: number; per_page?: number; since?: string; before?: string },\n options?: { signal?: AbortSignal },\n ): Promise<TimelineComment[]> {\n const searchParams = new URLSearchParams();\n if (queryParams?.page !== undefined) searchParams.append(\"page\", String(queryParams.page));\n if (queryParams?.per_page !== undefined) searchParams.append(\"per_page\", String(queryParams.per_page));\n if (queryParams?.since !== undefined) searchParams.append(\"since\", queryParams.since);\n if (queryParams?.before !== undefined) searchParams.append(\"before\", queryParams.before);\n const queryString = searchParams.toString();\n const url = `/repos/${owner}/${repo}/issues/${index}/timeline${queryString ? `?${queryString}` : \"\"}`;\n return this.client.get<TimelineComment[]>(url, options);\n }\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "AAMO,MAAM,CAAU,CACb,OAMR,WAAW,CAAC,EAAwB,CAClC,KAAK,OAAS,EAWhB,IAAI,CACF,EACA,EACA,EAcA,EACkB,CAClB,IAAM,EAAe,IAAI,gBACzB,GAAI,GAAa,QAAU,OAAW,EAAa,OAAO,QAAS,EAAY,KAAK,EACpF,GAAI,GAAa,IAAM,OAAW,EAAa,OAAO,IAAK,EAAY,CAAC,EACxE,GAAI,GAAa,SAAW,OAAW,EAAa,OAAO,SAAU,EAAY,MAAM,EACvF,GAAI,GAAa,aAAe,OAAW,EAAa,OAAO,aAAc,EAAY,UAAU,EACnG,GAAI,GAAa,aAAe,OAAW,EAAa,OAAO,aAAc,EAAY,UAAU,EACnG,GAAI,GAAa,cAAgB,OAAW,EAAa,OAAO,cAAe,EAAY,WAAW,EACtG,GAAI,GAAa,eAAiB,OAAW,EAAa,OAAO,eAAgB,EAAY,YAAY,EACzG,GAAI,GAAa,OAAS,OAAW,EAAa,OAAO,OAAQ,EAAY,IAAI,EACjF,GAAI,GAAa,QAAU,OAAW,EAAa,OAAO,QAAS,EAAY,KAAK,EACpF,GAAI,GAAa,SAAW,OAAW,EAAa,OAAO,SAAU,EAAY,MAAM,EACvF,GAAI,GAAa,OAAS,OAAW,EAAa,OAAO,OAAQ,OAAO,EAAY,IAAI,CAAC,EACzF,GAAI,GAAa,WAAa,OAAW,EAAa,OAAO,WAAY,OAAO,EAAY,QAAQ,CAAC,EACrG,IAAM,EAAc,EAAa,SAAS,EACpC,EAAM,UAAU,KAAS,WAAc,EAAc,IAAI,IAAgB,KAC/E,OAAO,KAAK,OAAO,IAAa,EAAK,CAAO,EAW9C,UAAU,CAAC,EAAe,EAAc,EAAY,EAAsD,CACxG,OAAO,KAAK,OAAO,IAAa,UAAU,KAAS,qBAAwB,IAAM,CAAO,EAW1F,GAAG,CAAC,EAAe,EAAc,EAAe,EAAoD,CAClG,OAAO,KAAK,OAAO,IAAW,UAAU,KAAS,YAAe,IAAS,CAAO,EAYlF,YAAY,CACV,EACA,EACA,EACA,EACA,EACoB,CACpB,IAAM,EAAe,IAAI,gBACzB,GAAI,GAAa,QAAU,OAAW,EAAa,OAAO,QAAS,EAAY,KAAK,EACpF,GAAI,GAAa,SAAW,OAAW,EAAa,OAAO,SAAU,EAAY,MAAM,EACvF,IAAM,EAAc,EAAa,SAAS,EACpC,EAAM,UAAU,KAAS,YAAe,aAAiB,EAAc,IAAI,IAAgB,KACjG,OAAO,KAAK,OAAO,IAAe,EAAK,CAAO,EAWhD,UAAU,CAAC,EAAe,EAAc,EAAe,EAAsD,CAC3G,OAAO,KAAK,OAAO,IAAa,UAAU,KAAS,YAAe,WAAgB,CAAO,EAY3F,YAAY,CACV,EACA,EACA,EACA,EACA,EAC4B,CAC5B,IAAM,EAAe,IAAI,gBACzB,GAAI,GAAa,OAAS,OAAW,EAAa,OAAO,OAAQ,OAAO,EAAY,IAAI,CAAC,EACzF,GAAI,GAAa,WAAa,OAAW,EAAa,OAAO,WAAY,OAAO,EAAY,QAAQ,CAAC,EACrG,GAAI,GAAa,QAAU,OAAW,EAAa,OAAO,QAAS,EAAY,KAAK,EACpF,GAAI,GAAa,SAAW,OAAW,EAAa,OAAO,SAAU,EAAY,MAAM,EACvF,IAAM,EAAc,EAAa,SAAS,EACpC,EAAM,UAAU,KAAS,YAAe,aAAiB,EAAc,IAAI,IAAgB,KACjG,OAAO,KAAK,OAAO,IAAuB,EAAK,CAAO,EAE1D",
|
|
8
|
+
"debugId": "8F1C6E934EB8377564756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* Типы данных для GitVerse API
|
|
3
|
+
* @generated Сгенерировано автоматически из OpenAPI спецификации
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
2
6
|
* Опции для выполнения HTTP-запросов
|
|
3
7
|
*/
|
|
4
8
|
interface RequestOptions {
|
|
@@ -11,6 +15,14 @@ interface RequestOptions {
|
|
|
11
15
|
*/
|
|
12
16
|
signal?: AbortSignal;
|
|
13
17
|
}
|
|
18
|
+
interface Secret {
|
|
19
|
+
created_at?: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
}
|
|
22
|
+
interface SecretList {
|
|
23
|
+
secrets?: Secret[];
|
|
24
|
+
total_count?: number;
|
|
25
|
+
}
|
|
14
26
|
/**
|
|
15
27
|
* Предупреждение об устаревшей версии API
|
|
16
28
|
*/
|
|
@@ -154,16 +166,65 @@ declare class GitVerseClient {
|
|
|
154
166
|
declare class OrganizationsApi {
|
|
155
167
|
private client;
|
|
156
168
|
/**
|
|
157
|
-
* Создает новый экземпляр API
|
|
169
|
+
* Создает новый экземпляр API
|
|
158
170
|
* @param client GitVerse клиент
|
|
159
171
|
*/
|
|
160
172
|
constructor(client: GitVerseClient);
|
|
161
173
|
/**
|
|
162
|
-
*
|
|
163
|
-
* @param org
|
|
164
|
-
* @param
|
|
165
|
-
* @
|
|
166
|
-
|
|
167
|
-
|
|
174
|
+
* Gets a list of organization secrets
|
|
175
|
+
* @param org Organization name
|
|
176
|
+
* @param queryParams Параметры запроса
|
|
177
|
+
* @param options Опции запроса
|
|
178
|
+
* @returns SecretList
|
|
179
|
+
*/
|
|
180
|
+
listOrgSecrets(org: string, queryParams?: {
|
|
181
|
+
per_page?: string
|
|
182
|
+
page?: string
|
|
183
|
+
}, options?: {
|
|
184
|
+
signal?: AbortSignal
|
|
185
|
+
}): Promise<SecretList>;
|
|
186
|
+
/**
|
|
187
|
+
* Gets the metadata of a secret (without value) in an organization
|
|
188
|
+
* @param org Organization name
|
|
189
|
+
* @param secretname Secret name
|
|
190
|
+
* @param options Опции запроса
|
|
191
|
+
* @returns Secret
|
|
192
|
+
*/
|
|
193
|
+
getOrgSecret(org: string, secretname: string, options?: {
|
|
194
|
+
signal?: AbortSignal
|
|
195
|
+
}): Promise<Secret>;
|
|
196
|
+
/**
|
|
197
|
+
* Creates or updates a secret in the organization, without encryption
|
|
198
|
+
* @param org Organization name
|
|
199
|
+
* @param secretname Secret name
|
|
200
|
+
* @param queryParams Параметры запроса
|
|
201
|
+
* @param options Опции запроса
|
|
202
|
+
* @returns Secret
|
|
203
|
+
*/
|
|
204
|
+
createOrUpdateOrgSecret(org: string, secretname: string, queryParams?: {
|
|
205
|
+
encrypted_value: string
|
|
206
|
+
}, options?: {
|
|
207
|
+
signal?: AbortSignal
|
|
208
|
+
}): Promise<Secret>;
|
|
209
|
+
/**
|
|
210
|
+
* Removes a secret from an organization
|
|
211
|
+
* @param org Organization name
|
|
212
|
+
* @param secretname Secret name
|
|
213
|
+
* @param options Опции запроса
|
|
214
|
+
* @returns void
|
|
215
|
+
*/
|
|
216
|
+
deleteOrgSecret(org: string, secretname: string, options?: {
|
|
217
|
+
signal?: AbortSignal
|
|
218
|
+
}): Promise<void>;
|
|
219
|
+
/**
|
|
220
|
+
* Check organization membership for a user
|
|
221
|
+
* @param org The organization name.
|
|
222
|
+
* @param username Username of the member to check.
|
|
223
|
+
* @param options Опции запроса
|
|
224
|
+
* @returns void
|
|
225
|
+
*/
|
|
226
|
+
isMember(org: string, username: string, options?: {
|
|
227
|
+
signal?: AbortSignal
|
|
228
|
+
}): Promise<void>;
|
|
168
229
|
}
|
|
169
230
|
export { OrganizationsApi };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
2
|
-
export{
|
|
1
|
+
class F{client;constructor(w){this.client=w}listOrgSecrets(w,j,x){let A=new URLSearchParams;if(j?.per_page!==void 0)A.append("per_page",j.per_page);if(j?.page!==void 0)A.append("page",j.page);let B=A.toString(),D=`/orgs/${w}/actions/secrets${B?`?${B}`:""}`;return this.client.get(D,x)}getOrgSecret(w,j,x){return this.client.get(`/orgs/${w}/actions/secrets/${j}`,x)}createOrUpdateOrgSecret(w,j,x,A){let B=new URLSearchParams;if(x?.encrypted_value!==void 0)B.append("encrypted_value",x.encrypted_value);let D=B.toString(),E=`/orgs/${w}/actions/secrets/${j}${D?`?${D}`:""}`;return this.client.put(E,A)}deleteOrgSecret(w,j,x){return this.client.delete(`/orgs/${w}/actions/secrets/${j}`,void 0,x)}isMember(w,j,x){return this.client.get(`/orgs/${w}/members/${j}`,x)}}export{F as OrganizationsApi};
|
|
2
|
+
export{F as h};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=1825C7F3AA4A026964756E2164756E21
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/api/organizations.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { GitVerseClient } from \"../client\";\nimport type {
|
|
5
|
+
"import type { GitVerseClient } from \"../client\";\nimport type { Secret, SecretList } from \"../types\";\n\n/**\n * API для работы с организациями\n */\nexport class OrganizationsApi {\n private client: GitVerseClient;\n\n /**\n * Создает новый экземпляр API\n * @param client GitVerse клиент\n */\n constructor(client: GitVerseClient) {\n this.client = client;\n }\n\n /**\n * Gets a list of organization secrets\n * @param org Organization name\n * @param queryParams Параметры запроса\n * @param options Опции запроса\n * @returns SecretList\n */\n listOrgSecrets(\n org: string,\n queryParams?: { per_page?: string; page?: string },\n options?: { signal?: AbortSignal },\n ): Promise<SecretList> {\n const searchParams = new URLSearchParams();\n if (queryParams?.per_page !== undefined) searchParams.append(\"per_page\", queryParams.per_page);\n if (queryParams?.page !== undefined) searchParams.append(\"page\", queryParams.page);\n const queryString = searchParams.toString();\n const url = `/orgs/${org}/actions/secrets${queryString ? `?${queryString}` : \"\"}`;\n return this.client.get<SecretList>(url, options);\n }\n\n /**\n * Gets the metadata of a secret (without value) in an organization\n * @param org Organization name\n * @param secretname Secret name\n * @param options Опции запроса\n * @returns Secret\n */\n getOrgSecret(org: string, secretname: string, options?: { signal?: AbortSignal }): Promise<Secret> {\n return this.client.get<Secret>(`/orgs/${org}/actions/secrets/${secretname}`, options);\n }\n\n /**\n * Creates or updates a secret in the organization, without encryption\n * @param org Organization name\n * @param secretname Secret name\n * @param queryParams Параметры запроса\n * @param options Опции запроса\n * @returns Secret\n */\n createOrUpdateOrgSecret(\n org: string,\n secretname: string,\n queryParams?: { encrypted_value: string },\n options?: { signal?: AbortSignal },\n ): Promise<Secret> {\n const searchParams = new URLSearchParams();\n if (queryParams?.encrypted_value !== undefined) searchParams.append(\"encrypted_value\", queryParams.encrypted_value);\n const queryString = searchParams.toString();\n const url = `/orgs/${org}/actions/secrets/${secretname}${queryString ? `?${queryString}` : \"\"}`;\n return this.client.put<Secret>(url, options);\n }\n\n /**\n * Removes a secret from an organization\n * @param org Organization name\n * @param secretname Secret name\n * @param options Опции запроса\n * @returns void\n */\n deleteOrgSecret(org: string, secretname: string, options?: { signal?: AbortSignal }): Promise<void> {\n return this.client.delete<void>(`/orgs/${org}/actions/secrets/${secretname}`, undefined, options);\n }\n\n /**\n * Check organization membership for a user\n * @param org The organization name.\n * @param username Username of the member to check.\n * @param options Опции запроса\n * @returns void\n */\n isMember(org: string, username: string, options?: { signal?: AbortSignal }): Promise<void> {\n return this.client.get<void>(`/orgs/${org}/members/${username}`, options);\n }\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "AAMO,MAAM,CAAiB,CACpB,OAMR,WAAW,CAAC,EAAwB,CAClC,KAAK,OAAS,
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "AAMO,MAAM,CAAiB,CACpB,OAMR,WAAW,CAAC,EAAwB,CAClC,KAAK,OAAS,EAUhB,cAAc,CACZ,EACA,EACA,EACqB,CACrB,IAAM,EAAe,IAAI,gBACzB,GAAI,GAAa,WAAa,OAAW,EAAa,OAAO,WAAY,EAAY,QAAQ,EAC7F,GAAI,GAAa,OAAS,OAAW,EAAa,OAAO,OAAQ,EAAY,IAAI,EACjF,IAAM,EAAc,EAAa,SAAS,EACpC,EAAM,SAAS,oBAAsB,EAAc,IAAI,IAAgB,KAC7E,OAAO,KAAK,OAAO,IAAgB,EAAK,CAAO,EAUjD,YAAY,CAAC,EAAa,EAAoB,EAAqD,CACjG,OAAO,KAAK,OAAO,IAAY,SAAS,qBAAuB,IAAc,CAAO,EAWtF,uBAAuB,CACrB,EACA,EACA,EACA,EACiB,CACjB,IAAM,EAAe,IAAI,gBACzB,GAAI,GAAa,kBAAoB,OAAW,EAAa,OAAO,kBAAmB,EAAY,eAAe,EAClH,IAAM,EAAc,EAAa,SAAS,EACpC,EAAM,SAAS,qBAAuB,IAAa,EAAc,IAAI,IAAgB,KAC3F,OAAO,KAAK,OAAO,IAAY,EAAK,CAAO,EAU7C,eAAe,CAAC,EAAa,EAAoB,EAAmD,CAClG,OAAO,KAAK,OAAO,OAAa,SAAS,qBAAuB,IAAc,OAAW,CAAO,EAUlG,QAAQ,CAAC,EAAa,EAAkB,EAAmD,CACzF,OAAO,KAAK,OAAO,IAAU,SAAS,aAAe,IAAY,CAAO,EAE5E",
|
|
8
|
+
"debugId": "1825C7F3AA4A026964756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* Типы данных для GitVerse API
|
|
3
|
+
* @generated Сгенерировано автоматически из OpenAPI спецификации
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
2
6
|
* Опции для выполнения HTTP-запросов
|
|
3
7
|
*/
|
|
4
8
|
interface RequestOptions {
|
|
@@ -11,39 +15,16 @@ interface RequestOptions {
|
|
|
11
15
|
*/
|
|
12
16
|
signal?: AbortSignal;
|
|
13
17
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*/
|
|
17
|
-
interface PaginationParams {
|
|
18
|
-
/** Номер страницы (начиная с 1) */
|
|
19
|
-
page?: number;
|
|
20
|
-
/** Количество элементов на странице */
|
|
21
|
-
per_page?: number;
|
|
18
|
+
interface CreatePagesDeploymentParams {
|
|
19
|
+
artifact_id?: number;
|
|
22
20
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/** Поисковый запрос для фильтрации веток по имени */
|
|
28
|
-
q?: string;
|
|
21
|
+
interface PagesDeployment {
|
|
22
|
+
id?: number;
|
|
23
|
+
page_url?: string;
|
|
24
|
+
status_url?: string;
|
|
29
25
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
*/
|
|
33
|
-
interface Branch {
|
|
34
|
-
/** Имя ветки */
|
|
35
|
-
name: string;
|
|
36
|
-
/** SHA-хеш последнего коммита */
|
|
37
|
-
commit: {
|
|
38
|
-
sha: string
|
|
39
|
-
url: string
|
|
40
|
-
/** Дата создания коммита */
|
|
41
|
-
created?: string
|
|
42
|
-
/** Веб-ссылка на коммит */
|
|
43
|
-
html_url?: string
|
|
44
|
-
};
|
|
45
|
-
/** Защищена ли ветка */
|
|
46
|
-
protected?: boolean;
|
|
26
|
+
interface PagesDeploymentStatus {
|
|
27
|
+
status?: string;
|
|
47
28
|
}
|
|
48
29
|
/**
|
|
49
30
|
* Предупреждение об устаревшей версии API
|
|
@@ -183,23 +164,36 @@ declare class GitVerseClient {
|
|
|
183
164
|
uploadFile<T>(path: string, fieldName: string, file: Blob | ArrayBuffer, fileName: string, options?: RequestOptions): Promise<T>;
|
|
184
165
|
}
|
|
185
166
|
/**
|
|
186
|
-
* API для работы с
|
|
167
|
+
* API для работы с GitVerse Pages
|
|
187
168
|
*/
|
|
188
|
-
declare class
|
|
169
|
+
declare class PagesApi {
|
|
189
170
|
private client;
|
|
190
171
|
/**
|
|
191
|
-
* Создает новый экземпляр API
|
|
172
|
+
* Создает новый экземпляр API
|
|
192
173
|
* @param client GitVerse клиент
|
|
193
174
|
*/
|
|
194
175
|
constructor(client: GitVerseClient);
|
|
195
176
|
/**
|
|
196
|
-
*
|
|
197
|
-
* @param owner
|
|
198
|
-
* @param repo
|
|
199
|
-
* @param params
|
|
177
|
+
* Creates a deployment for GitVerse Pages
|
|
178
|
+
* @param owner Owner of the repository (username or organization name)
|
|
179
|
+
* @param repo Name of the repository without the .git extension
|
|
180
|
+
* @param params Configuration parameters for the Pages deployment
|
|
181
|
+
* @param options Опции запроса
|
|
182
|
+
* @returns PagesDeployment
|
|
183
|
+
*/
|
|
184
|
+
createDeployment(owner: string, repo: string, params: CreatePagesDeploymentParams, options?: {
|
|
185
|
+
signal?: AbortSignal
|
|
186
|
+
}): Promise<PagesDeployment>;
|
|
187
|
+
/**
|
|
188
|
+
* Gets the status of a GitVerse Pages deployment
|
|
189
|
+
* @param owner Owner of the repository (username or organization name)
|
|
190
|
+
* @param repo Name of the repository without the .git extension
|
|
191
|
+
* @param pages_deployment_id Unique identifier of the Pages deployment
|
|
200
192
|
* @param options Опции запроса
|
|
201
|
-
* @returns
|
|
193
|
+
* @returns PagesDeploymentStatus
|
|
202
194
|
*/
|
|
203
|
-
|
|
195
|
+
getDeploymentStatus(owner: string, repo: string, pages_deployment_id: string, options?: {
|
|
196
|
+
signal?: AbortSignal
|
|
197
|
+
}): Promise<PagesDeploymentStatus>;
|
|
204
198
|
}
|
|
205
|
-
export {
|
|
199
|
+
export { PagesApi };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
class A{client;constructor(b){this.client=b}createDeployment(b,j,k,v){return this.client.post(`/repos/${b}/${j}/pages/deployments`,k,v)}getDeploymentStatus(b,j,k,v){return this.client.get(`/repos/${b}/${j}/pages/deployments/${k}`,v)}}export{A as PagesApi};
|
|
2
|
+
export{A as w};
|
|
3
|
+
|
|
4
|
+
//# debugId=94290930554E142464756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/api/pages.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import type { GitVerseClient } from \"../client\";\nimport type { CreatePagesDeploymentParams, PagesDeployment, PagesDeploymentStatus } from \"../types\";\n\n/**\n * API для работы с GitVerse Pages\n */\nexport class PagesApi {\n private client: GitVerseClient;\n\n /**\n * Создает новый экземпляр API\n * @param client GitVerse клиент\n */\n constructor(client: GitVerseClient) {\n this.client = client;\n }\n\n /**\n * Creates a deployment for GitVerse Pages\n * @param owner Owner of the repository (username or organization name)\n * @param repo Name of the repository without the .git extension\n * @param params Configuration parameters for the Pages deployment\n * @param options Опции запроса\n * @returns PagesDeployment\n */\n createDeployment(\n owner: string,\n repo: string,\n params: CreatePagesDeploymentParams,\n options?: { signal?: AbortSignal },\n ): Promise<PagesDeployment> {\n return this.client.post<PagesDeployment>(`/repos/${owner}/${repo}/pages/deployments`, params, options);\n }\n\n /**\n * Gets the status of a GitVerse Pages deployment\n * @param owner Owner of the repository (username or organization name)\n * @param repo Name of the repository without the .git extension\n * @param pages_deployment_id Unique identifier of the Pages deployment\n * @param options Опции запроса\n * @returns PagesDeploymentStatus\n */\n getDeploymentStatus(\n owner: string,\n repo: string,\n pages_deployment_id: string,\n options?: { signal?: AbortSignal },\n ): Promise<PagesDeploymentStatus> {\n return this.client.get<PagesDeploymentStatus>(\n `/repos/${owner}/${repo}/pages/deployments/${pages_deployment_id}`,\n options,\n );\n }\n}\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": "AAMO,MAAM,CAAS,CACZ,OAMR,WAAW,CAAC,EAAwB,CAClC,KAAK,OAAS,EAWhB,gBAAgB,CACd,EACA,EACA,EACA,EAC0B,CAC1B,OAAO,KAAK,OAAO,KAAsB,UAAU,KAAS,sBAA0B,EAAQ,CAAO,EAWvG,mBAAmB,CACjB,EACA,EACA,EACA,EACgC,CAChC,OAAO,KAAK,OAAO,IACjB,UAAU,KAAS,uBAA0B,IAC7C,CACF,EAEJ",
|
|
8
|
+
"debugId": "94290930554E142464756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|