@appwrite.io/console 0.1.1 → 0.3.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/.github/workflows/publish.yml +18 -0
- package/README.md +2 -2
- package/dist/cjs/sdk.js +2417 -630
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +2413 -631
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +2417 -630
- package/docs/examples/account/create-anonymous-session.md +1 -1
- package/docs/examples/account/create-email-session.md +1 -1
- package/docs/examples/account/create-j-w-t.md +1 -1
- package/docs/examples/account/create-magic-u-r-l-session.md +1 -1
- package/docs/examples/account/create-o-auth2session.md +1 -1
- package/docs/examples/account/create-phone-session.md +1 -1
- package/docs/examples/account/create-phone-verification.md +1 -1
- package/docs/examples/account/create-recovery.md +1 -1
- package/docs/examples/account/create-verification.md +1 -1
- package/docs/examples/account/create-with-invite-code.md +18 -0
- package/docs/examples/account/create.md +1 -1
- package/docs/examples/account/delete-identity.md +18 -0
- package/docs/examples/account/delete-session.md +1 -1
- package/docs/examples/account/delete-sessions.md +1 -1
- package/docs/examples/account/get-prefs.md +1 -1
- package/docs/examples/account/get-session.md +1 -1
- package/docs/examples/account/get.md +1 -1
- package/docs/examples/account/list-identities.md +18 -0
- package/docs/examples/account/list-logs.md +1 -1
- package/docs/examples/account/list-sessions.md +1 -1
- package/docs/examples/account/update-email.md +1 -1
- package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
- package/docs/examples/account/update-name.md +1 -1
- package/docs/examples/account/update-password.md +1 -1
- package/docs/examples/account/update-phone-session.md +1 -1
- package/docs/examples/account/update-phone-verification.md +1 -1
- package/docs/examples/account/update-phone.md +1 -1
- package/docs/examples/account/update-prefs.md +1 -1
- package/docs/examples/account/update-recovery.md +1 -1
- package/docs/examples/account/update-session.md +1 -1
- package/docs/examples/account/update-status.md +1 -1
- package/docs/examples/account/update-verification.md +1 -1
- package/docs/examples/assistant/chat.md +18 -0
- package/docs/examples/avatars/get-browser.md +1 -1
- package/docs/examples/avatars/get-credit-card.md +1 -1
- package/docs/examples/avatars/get-favicon.md +1 -1
- package/docs/examples/avatars/get-flag.md +1 -1
- package/docs/examples/avatars/get-image.md +1 -1
- package/docs/examples/avatars/get-initials.md +1 -1
- package/docs/examples/avatars/get-q-r.md +1 -1
- package/docs/examples/console/variables.md +1 -1
- package/docs/examples/databases/create-boolean-attribute.md +1 -1
- package/docs/examples/databases/create-collection.md +1 -1
- package/docs/examples/databases/create-datetime-attribute.md +1 -1
- package/docs/examples/databases/create-document.md +1 -1
- package/docs/examples/databases/create-email-attribute.md +1 -1
- package/docs/examples/databases/create-enum-attribute.md +1 -1
- package/docs/examples/databases/create-float-attribute.md +1 -1
- package/docs/examples/databases/create-index.md +1 -1
- package/docs/examples/databases/create-integer-attribute.md +1 -1
- package/docs/examples/databases/create-ip-attribute.md +1 -1
- package/docs/examples/databases/create-relationship-attribute.md +1 -1
- package/docs/examples/databases/create-string-attribute.md +1 -1
- package/docs/examples/databases/create-url-attribute.md +1 -1
- package/docs/examples/databases/create.md +1 -1
- package/docs/examples/databases/delete-attribute.md +1 -1
- package/docs/examples/databases/delete-collection.md +1 -1
- package/docs/examples/databases/delete-document.md +1 -1
- package/docs/examples/databases/delete-index.md +1 -1
- package/docs/examples/databases/delete.md +1 -1
- package/docs/examples/databases/get-attribute.md +1 -1
- package/docs/examples/databases/get-collection-usage.md +1 -1
- package/docs/examples/databases/get-collection.md +1 -1
- package/docs/examples/databases/get-database-usage.md +1 -1
- package/docs/examples/databases/get-document.md +1 -1
- package/docs/examples/databases/get-index.md +1 -1
- package/docs/examples/databases/get-usage.md +1 -1
- package/docs/examples/databases/get.md +1 -1
- package/docs/examples/databases/list-attributes.md +1 -1
- package/docs/examples/databases/list-collection-logs.md +1 -1
- package/docs/examples/databases/list-collections.md +1 -1
- package/docs/examples/databases/list-document-logs.md +1 -1
- package/docs/examples/databases/list-documents.md +1 -1
- package/docs/examples/databases/list-indexes.md +1 -1
- package/docs/examples/databases/list-logs.md +1 -1
- package/docs/examples/databases/list.md +1 -1
- package/docs/examples/databases/update-boolean-attribute.md +1 -1
- package/docs/examples/databases/update-collection.md +1 -1
- package/docs/examples/databases/update-datetime-attribute.md +1 -1
- package/docs/examples/databases/update-document.md +1 -1
- package/docs/examples/databases/update-email-attribute.md +1 -1
- package/docs/examples/databases/update-enum-attribute.md +1 -1
- package/docs/examples/databases/update-float-attribute.md +1 -1
- package/docs/examples/databases/update-integer-attribute.md +1 -1
- package/docs/examples/databases/update-ip-attribute.md +1 -1
- package/docs/examples/databases/update-relationship-attribute.md +1 -1
- package/docs/examples/databases/update-string-attribute.md +1 -1
- package/docs/examples/databases/update-url-attribute.md +1 -1
- package/docs/examples/databases/update.md +1 -1
- package/docs/examples/functions/create-build.md +1 -1
- package/docs/examples/functions/create-deployment.md +2 -2
- package/docs/examples/functions/create-execution.md +1 -1
- package/docs/examples/functions/create-variable.md +1 -1
- package/docs/examples/functions/create.md +1 -1
- package/docs/examples/functions/delete-deployment.md +1 -1
- package/docs/examples/functions/delete-variable.md +1 -1
- package/docs/examples/functions/delete.md +1 -1
- package/docs/examples/functions/download-deployment.md +14 -0
- package/docs/examples/functions/get-deployment.md +1 -1
- package/docs/examples/functions/get-execution.md +1 -1
- package/docs/examples/functions/get-function-usage.md +1 -1
- package/docs/examples/functions/get-usage.md +1 -1
- package/docs/examples/functions/get-variable.md +1 -1
- package/docs/examples/functions/get.md +1 -1
- package/docs/examples/functions/list-deployments.md +1 -1
- package/docs/examples/functions/list-executions.md +1 -1
- package/docs/examples/functions/list-runtimes.md +1 -1
- package/docs/examples/functions/list-variables.md +1 -1
- package/docs/examples/functions/list.md +1 -1
- package/docs/examples/functions/update-deployment.md +1 -1
- package/docs/examples/functions/update-variable.md +1 -1
- package/docs/examples/functions/update.md +2 -2
- package/docs/examples/graphql/mutation.md +1 -1
- package/docs/examples/graphql/query.md +1 -1
- package/docs/examples/health/get-antivirus.md +1 -1
- package/docs/examples/health/get-cache.md +1 -1
- package/docs/examples/health/get-d-b.md +1 -1
- package/docs/examples/health/get-pub-sub.md +18 -0
- package/docs/examples/health/get-queue-certificates.md +1 -1
- package/docs/examples/health/get-queue-functions.md +1 -1
- package/docs/examples/health/get-queue-logs.md +1 -1
- package/docs/examples/health/get-queue-webhooks.md +1 -1
- package/docs/examples/health/get-queue.md +18 -0
- package/docs/examples/health/get-storage-local.md +1 -1
- package/docs/examples/health/get-time.md +1 -1
- package/docs/examples/health/get.md +1 -1
- package/docs/examples/locale/get.md +1 -1
- package/docs/examples/locale/list-codes.md +18 -0
- package/docs/examples/locale/list-continents.md +1 -1
- package/docs/examples/locale/list-countries-e-u.md +1 -1
- package/docs/examples/locale/list-countries-phones.md +1 -1
- package/docs/examples/locale/list-countries.md +1 -1
- package/docs/examples/locale/list-currencies.md +1 -1
- package/docs/examples/locale/list-languages.md +1 -1
- package/docs/examples/migrations/create-appwrite-migration.md +18 -0
- package/docs/examples/migrations/create-firebase-migration.md +18 -0
- package/docs/examples/migrations/create-firebase-o-auth-migration.md +18 -0
- package/docs/examples/migrations/create-n-host-migration.md +18 -0
- package/docs/examples/migrations/create-supabase-migration.md +18 -0
- package/docs/examples/migrations/delete-firebase-auth.md +18 -0
- package/docs/examples/migrations/delete.md +18 -0
- package/docs/examples/migrations/get-appwrite-report.md +18 -0
- package/docs/examples/migrations/get-firebase-report-o-auth.md +18 -0
- package/docs/examples/migrations/get-firebase-report.md +18 -0
- package/docs/examples/migrations/get-n-host-report.md +18 -0
- package/docs/examples/migrations/get-supabase-report.md +18 -0
- package/docs/examples/migrations/get.md +18 -0
- package/docs/examples/migrations/list-firebase-projects.md +18 -0
- package/docs/examples/migrations/list.md +18 -0
- package/docs/examples/migrations/retry.md +18 -0
- package/docs/examples/project/create-variable.md +18 -0
- package/docs/examples/project/delete-variable.md +18 -0
- package/docs/examples/project/get-usage.md +18 -0
- package/docs/examples/project/get-variable.md +18 -0
- package/docs/examples/project/list-variables.md +18 -0
- package/docs/examples/project/update-variable.md +18 -0
- package/docs/examples/projects/create-key.md +1 -1
- package/docs/examples/projects/create-platform.md +1 -1
- package/docs/examples/projects/create-webhook.md +1 -1
- package/docs/examples/projects/create.md +2 -2
- package/docs/examples/projects/delete-email-template.md +18 -0
- package/docs/examples/projects/delete-key.md +1 -1
- package/docs/examples/projects/delete-platform.md +1 -1
- package/docs/examples/projects/delete-sms-template.md +18 -0
- package/docs/examples/projects/delete-webhook.md +1 -1
- package/docs/examples/projects/delete.md +2 -2
- package/docs/examples/projects/get-email-template.md +18 -0
- package/docs/examples/projects/get-key.md +1 -1
- package/docs/examples/projects/get-platform.md +1 -1
- package/docs/examples/projects/get-sms-template.md +18 -0
- package/docs/examples/projects/get-usage.md +1 -1
- package/docs/examples/projects/get-webhook.md +1 -1
- package/docs/examples/projects/get.md +1 -1
- package/docs/examples/projects/list-keys.md +1 -1
- package/docs/examples/projects/list-platforms.md +1 -1
- package/docs/examples/projects/list-webhooks.md +1 -1
- package/docs/examples/projects/list.md +1 -1
- package/docs/examples/projects/update-auth-duration.md +1 -1
- package/docs/examples/projects/update-auth-limit.md +1 -1
- package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
- package/docs/examples/projects/update-auth-password-history.md +1 -1
- package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
- package/docs/examples/projects/update-auth-status.md +1 -1
- package/docs/examples/projects/update-email-template.md +18 -0
- package/docs/examples/projects/update-key.md +1 -1
- package/docs/examples/projects/update-o-auth2.md +1 -1
- package/docs/examples/projects/{delete-domain.md → update-personal-data-check.md} +2 -2
- package/docs/examples/projects/update-platform.md +1 -1
- package/docs/examples/projects/{create-domain.md → update-service-status-all.md} +2 -2
- package/docs/examples/projects/update-service-status.md +1 -1
- package/docs/examples/projects/update-sms-template.md +18 -0
- package/docs/examples/projects/{get-domain.md → update-smtp-configuration.md} +2 -2
- package/docs/examples/projects/{list-domains.md → update-team.md} +2 -2
- package/docs/examples/projects/update-webhook-signature.md +1 -1
- package/docs/examples/projects/update-webhook.md +1 -1
- package/docs/examples/projects/update.md +1 -1
- package/docs/examples/proxy/create-rule.md +18 -0
- package/docs/examples/proxy/delete-rule.md +18 -0
- package/docs/examples/proxy/get-rule.md +18 -0
- package/docs/examples/proxy/list-rules.md +18 -0
- package/docs/examples/proxy/update-rule-verification.md +18 -0
- package/docs/examples/storage/create-bucket.md +1 -1
- package/docs/examples/storage/create-file.md +1 -1
- package/docs/examples/storage/delete-bucket.md +1 -1
- package/docs/examples/storage/delete-file.md +1 -1
- package/docs/examples/storage/get-bucket-usage.md +1 -1
- package/docs/examples/storage/get-bucket.md +1 -1
- package/docs/examples/storage/get-file-download.md +1 -1
- package/docs/examples/storage/get-file-preview.md +1 -1
- package/docs/examples/storage/get-file-view.md +1 -1
- package/docs/examples/storage/get-file.md +1 -1
- package/docs/examples/storage/get-usage.md +1 -1
- package/docs/examples/storage/list-buckets.md +1 -1
- package/docs/examples/storage/list-files.md +1 -1
- package/docs/examples/storage/update-bucket.md +1 -1
- package/docs/examples/storage/update-file.md +1 -1
- package/docs/examples/teams/create-membership.md +1 -1
- package/docs/examples/teams/create.md +1 -1
- package/docs/examples/teams/delete-membership.md +1 -1
- package/docs/examples/teams/delete.md +1 -1
- package/docs/examples/teams/get-membership.md +1 -1
- package/docs/examples/teams/get-prefs.md +1 -1
- package/docs/examples/teams/get.md +1 -1
- package/docs/examples/teams/list-logs.md +1 -1
- package/docs/examples/teams/list-memberships.md +1 -1
- package/docs/examples/teams/list.md +1 -1
- package/docs/examples/teams/update-membership-status.md +1 -1
- package/docs/examples/teams/{update-membership-roles.md → update-membership.md} +2 -2
- package/docs/examples/teams/update-name.md +1 -1
- package/docs/examples/teams/update-prefs.md +1 -1
- package/docs/examples/users/create-argon2user.md +1 -1
- package/docs/examples/users/create-bcrypt-user.md +1 -1
- package/docs/examples/users/create-m-d5user.md +1 -1
- package/docs/examples/users/create-p-h-pass-user.md +1 -1
- package/docs/examples/users/create-s-h-a-user.md +1 -1
- package/docs/examples/users/create-scrypt-modified-user.md +1 -1
- package/docs/examples/users/create-scrypt-user.md +1 -1
- package/docs/examples/users/create.md +1 -1
- package/docs/examples/users/delete-identity.md +18 -0
- package/docs/examples/users/delete-session.md +1 -1
- package/docs/examples/users/delete-sessions.md +1 -1
- package/docs/examples/users/delete.md +1 -1
- package/docs/examples/users/get-prefs.md +1 -1
- package/docs/examples/users/get-usage.md +1 -1
- package/docs/examples/users/get.md +1 -1
- package/docs/examples/users/list-identities.md +18 -0
- package/docs/examples/users/list-logs.md +1 -1
- package/docs/examples/users/list-memberships.md +1 -1
- package/docs/examples/users/list-sessions.md +1 -1
- package/docs/examples/users/list.md +1 -1
- package/docs/examples/users/update-email-verification.md +1 -1
- package/docs/examples/users/update-email.md +1 -1
- package/docs/examples/users/update-labels.md +18 -0
- package/docs/examples/users/update-name.md +1 -1
- package/docs/examples/users/update-password.md +1 -1
- package/docs/examples/users/update-phone-verification.md +1 -1
- package/docs/examples/users/update-phone.md +1 -1
- package/docs/examples/users/update-prefs.md +1 -1
- package/docs/examples/users/update-status.md +1 -1
- package/docs/examples/vcs/create-repository-detection.md +18 -0
- package/docs/examples/vcs/create-repository.md +18 -0
- package/docs/examples/vcs/delete-installation.md +18 -0
- package/docs/examples/vcs/get-installation.md +18 -0
- package/docs/examples/vcs/get-repository.md +18 -0
- package/docs/examples/vcs/list-installations.md +18 -0
- package/docs/examples/vcs/list-repositories.md +18 -0
- package/docs/examples/vcs/list-repository-branches.md +18 -0
- package/docs/examples/vcs/update-external-deployments.md +18 -0
- package/package.json +1 -1
- package/src/client.ts +2 -2
- package/src/index.ts +5 -0
- package/src/models.ts +750 -78
- package/src/services/account.ts +1102 -995
- package/src/services/assistant.ts +38 -0
- package/src/services/avatars.ts +337 -337
- package/src/services/console.ts +16 -16
- package/src/services/databases.ts +2170 -2140
- package/src/services/functions.ts +808 -652
- package/src/services/graphql.ts +47 -47
- package/src/services/health.ts +226 -189
- package/src/services/locale.ts +156 -137
- package/src/services/migrations.ts +707 -0
- package/src/services/project.ts +174 -0
- package/src/services/projects.ts +1538 -1283
- package/src/services/proxy.ts +150 -0
- package/src/services/storage.ts +576 -571
- package/src/services/teams.ts +502 -501
- package/src/services/users.ts +1094 -1006
- package/src/services/vcs.ts +272 -0
- package/types/index.d.ts +5 -0
- package/types/models.d.ts +750 -78
- package/types/services/account.d.ts +80 -40
- package/types/services/assistant.d.ts +14 -0
- package/types/services/avatars.d.ts +7 -7
- package/types/services/console.d.ts +1 -1
- package/types/services/databases.d.ts +60 -54
- package/types/services/functions.d.ts +66 -31
- package/types/services/graphql.d.ts +2 -2
- package/types/services/health.d.ts +31 -12
- package/types/services/locale.d.ts +17 -7
- package/types/services/migrations.d.ts +185 -0
- package/types/services/project.d.ts +70 -0
- package/types/services/projects.d.ts +150 -80
- package/types/services/proxy.d.ts +59 -0
- package/types/services/storage.d.ts +17 -16
- package/types/services/teams.d.ts +17 -16
- package/types/services/users.d.ts +63 -26
- package/types/services/vcs.d.ts +97 -0
- package/.travis.yml +0 -32
- package/docs/examples/projects/update-domain-verification.md +0 -18
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { Service } from '../service';
|
|
2
|
+
import { AppwriteException, Client } from '../client';
|
|
3
|
+
import type { Models } from '../models';
|
|
4
|
+
import type { UploadProgress, Payload } from '../client';
|
|
5
|
+
|
|
6
|
+
export class Vcs extends Service {
|
|
7
|
+
|
|
8
|
+
constructor(client: Client)
|
|
9
|
+
{
|
|
10
|
+
super(client);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* List Repositories
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* @param {string} installationId
|
|
18
|
+
* @param {string} search
|
|
19
|
+
* @throws {AppwriteException}
|
|
20
|
+
* @returns {Promise}
|
|
21
|
+
*/
|
|
22
|
+
async listRepositories(installationId: string, search?: string): Promise<Models.ProviderRepositoryList> {
|
|
23
|
+
if (typeof installationId === 'undefined') {
|
|
24
|
+
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let path = '/vcs/github/installations/{installationId}/providerRepositories'.replace('{installationId}', installationId);
|
|
28
|
+
let payload: Payload = {};
|
|
29
|
+
|
|
30
|
+
if (typeof search !== 'undefined') {
|
|
31
|
+
payload['search'] = search;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const uri = new URL(this.client.config.endpoint + path);
|
|
35
|
+
return await this.client.call('get', uri, {
|
|
36
|
+
'content-type': 'application/json',
|
|
37
|
+
}, payload);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Create repository
|
|
42
|
+
*
|
|
43
|
+
*
|
|
44
|
+
* @param {string} installationId
|
|
45
|
+
* @param {string} name
|
|
46
|
+
* @param {boolean} xprivate
|
|
47
|
+
* @throws {AppwriteException}
|
|
48
|
+
* @returns {Promise}
|
|
49
|
+
*/
|
|
50
|
+
async createRepository(installationId: string, name: string, xprivate: boolean): Promise<Models.ProviderRepository> {
|
|
51
|
+
if (typeof installationId === 'undefined') {
|
|
52
|
+
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (typeof name === 'undefined') {
|
|
56
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (typeof xprivate === 'undefined') {
|
|
60
|
+
throw new AppwriteException('Missing required parameter: "xprivate"');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
let path = '/vcs/github/installations/{installationId}/providerRepositories'.replace('{installationId}', installationId);
|
|
64
|
+
let payload: Payload = {};
|
|
65
|
+
|
|
66
|
+
if (typeof name !== 'undefined') {
|
|
67
|
+
payload['name'] = name;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (typeof xprivate !== 'undefined') {
|
|
71
|
+
payload['private'] = xprivate;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const uri = new URL(this.client.config.endpoint + path);
|
|
75
|
+
return await this.client.call('post', uri, {
|
|
76
|
+
'content-type': 'application/json',
|
|
77
|
+
}, payload);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Get repository
|
|
82
|
+
*
|
|
83
|
+
*
|
|
84
|
+
* @param {string} installationId
|
|
85
|
+
* @param {string} providerRepositoryId
|
|
86
|
+
* @throws {AppwriteException}
|
|
87
|
+
* @returns {Promise}
|
|
88
|
+
*/
|
|
89
|
+
async getRepository(installationId: string, providerRepositoryId: string): Promise<Models.ProviderRepository> {
|
|
90
|
+
if (typeof installationId === 'undefined') {
|
|
91
|
+
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
if (typeof providerRepositoryId === 'undefined') {
|
|
95
|
+
throw new AppwriteException('Missing required parameter: "providerRepositoryId"');
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
let path = '/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}'.replace('{installationId}', installationId).replace('{providerRepositoryId}', providerRepositoryId);
|
|
99
|
+
let payload: Payload = {};
|
|
100
|
+
|
|
101
|
+
const uri = new URL(this.client.config.endpoint + path);
|
|
102
|
+
return await this.client.call('get', uri, {
|
|
103
|
+
'content-type': 'application/json',
|
|
104
|
+
}, payload);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* List Repository Branches
|
|
109
|
+
*
|
|
110
|
+
*
|
|
111
|
+
* @param {string} installationId
|
|
112
|
+
* @param {string} providerRepositoryId
|
|
113
|
+
* @throws {AppwriteException}
|
|
114
|
+
* @returns {Promise}
|
|
115
|
+
*/
|
|
116
|
+
async listRepositoryBranches(installationId: string, providerRepositoryId: string): Promise<Models.BranchList> {
|
|
117
|
+
if (typeof installationId === 'undefined') {
|
|
118
|
+
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (typeof providerRepositoryId === 'undefined') {
|
|
122
|
+
throw new AppwriteException('Missing required parameter: "providerRepositoryId"');
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
let path = '/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}/branches'.replace('{installationId}', installationId).replace('{providerRepositoryId}', providerRepositoryId);
|
|
126
|
+
let payload: Payload = {};
|
|
127
|
+
|
|
128
|
+
const uri = new URL(this.client.config.endpoint + path);
|
|
129
|
+
return await this.client.call('get', uri, {
|
|
130
|
+
'content-type': 'application/json',
|
|
131
|
+
}, payload);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Detect runtime settings from source code
|
|
136
|
+
*
|
|
137
|
+
*
|
|
138
|
+
* @param {string} installationId
|
|
139
|
+
* @param {string} providerRepositoryId
|
|
140
|
+
* @param {string} providerRootDirectory
|
|
141
|
+
* @throws {AppwriteException}
|
|
142
|
+
* @returns {Promise}
|
|
143
|
+
*/
|
|
144
|
+
async createRepositoryDetection(installationId: string, providerRepositoryId: string, providerRootDirectory?: string): Promise<Models.Detection> {
|
|
145
|
+
if (typeof installationId === 'undefined') {
|
|
146
|
+
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (typeof providerRepositoryId === 'undefined') {
|
|
150
|
+
throw new AppwriteException('Missing required parameter: "providerRepositoryId"');
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
let path = '/vcs/github/installations/{installationId}/providerRepositories/{providerRepositoryId}/detection'.replace('{installationId}', installationId).replace('{providerRepositoryId}', providerRepositoryId);
|
|
154
|
+
let payload: Payload = {};
|
|
155
|
+
|
|
156
|
+
if (typeof providerRootDirectory !== 'undefined') {
|
|
157
|
+
payload['providerRootDirectory'] = providerRootDirectory;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const uri = new URL(this.client.config.endpoint + path);
|
|
161
|
+
return await this.client.call('post', uri, {
|
|
162
|
+
'content-type': 'application/json',
|
|
163
|
+
}, payload);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Authorize external deployment
|
|
168
|
+
*
|
|
169
|
+
*
|
|
170
|
+
* @param {string} installationId
|
|
171
|
+
* @param {string} repositoryId
|
|
172
|
+
* @param {string} providerPullRequestId
|
|
173
|
+
* @throws {AppwriteException}
|
|
174
|
+
* @returns {Promise}
|
|
175
|
+
*/
|
|
176
|
+
async updateExternalDeployments(installationId: string, repositoryId: string, providerPullRequestId: string): Promise<{}> {
|
|
177
|
+
if (typeof installationId === 'undefined') {
|
|
178
|
+
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (typeof repositoryId === 'undefined') {
|
|
182
|
+
throw new AppwriteException('Missing required parameter: "repositoryId"');
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (typeof providerPullRequestId === 'undefined') {
|
|
186
|
+
throw new AppwriteException('Missing required parameter: "providerPullRequestId"');
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
let path = '/vcs/github/installations/{installationId}/repositories/{repositoryId}'.replace('{installationId}', installationId).replace('{repositoryId}', repositoryId);
|
|
190
|
+
let payload: Payload = {};
|
|
191
|
+
|
|
192
|
+
if (typeof providerPullRequestId !== 'undefined') {
|
|
193
|
+
payload['providerPullRequestId'] = providerPullRequestId;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const uri = new URL(this.client.config.endpoint + path);
|
|
197
|
+
return await this.client.call('patch', uri, {
|
|
198
|
+
'content-type': 'application/json',
|
|
199
|
+
}, payload);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* List installations
|
|
204
|
+
*
|
|
205
|
+
*
|
|
206
|
+
* @param {string[]} queries
|
|
207
|
+
* @param {string} search
|
|
208
|
+
* @throws {AppwriteException}
|
|
209
|
+
* @returns {Promise}
|
|
210
|
+
*/
|
|
211
|
+
async listInstallations(queries?: string[], search?: string): Promise<Models.InstallationList> {
|
|
212
|
+
let path = '/vcs/installations';
|
|
213
|
+
let payload: Payload = {};
|
|
214
|
+
|
|
215
|
+
if (typeof queries !== 'undefined') {
|
|
216
|
+
payload['queries'] = queries;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if (typeof search !== 'undefined') {
|
|
220
|
+
payload['search'] = search;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
const uri = new URL(this.client.config.endpoint + path);
|
|
224
|
+
return await this.client.call('get', uri, {
|
|
225
|
+
'content-type': 'application/json',
|
|
226
|
+
}, payload);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Get installation
|
|
231
|
+
*
|
|
232
|
+
*
|
|
233
|
+
* @param {string} installationId
|
|
234
|
+
* @throws {AppwriteException}
|
|
235
|
+
* @returns {Promise}
|
|
236
|
+
*/
|
|
237
|
+
async getInstallation(installationId: string): Promise<Models.Installation> {
|
|
238
|
+
if (typeof installationId === 'undefined') {
|
|
239
|
+
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
let path = '/vcs/installations/{installationId}'.replace('{installationId}', installationId);
|
|
243
|
+
let payload: Payload = {};
|
|
244
|
+
|
|
245
|
+
const uri = new URL(this.client.config.endpoint + path);
|
|
246
|
+
return await this.client.call('get', uri, {
|
|
247
|
+
'content-type': 'application/json',
|
|
248
|
+
}, payload);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Delete Installation
|
|
253
|
+
*
|
|
254
|
+
*
|
|
255
|
+
* @param {string} installationId
|
|
256
|
+
* @throws {AppwriteException}
|
|
257
|
+
* @returns {Promise}
|
|
258
|
+
*/
|
|
259
|
+
async deleteInstallation(installationId: string): Promise<{}> {
|
|
260
|
+
if (typeof installationId === 'undefined') {
|
|
261
|
+
throw new AppwriteException('Missing required parameter: "installationId"');
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
let path = '/vcs/installations/{installationId}'.replace('{installationId}', installationId);
|
|
265
|
+
let payload: Payload = {};
|
|
266
|
+
|
|
267
|
+
const uri = new URL(this.client.config.endpoint + path);
|
|
268
|
+
return await this.client.call('delete', uri, {
|
|
269
|
+
'content-type': 'application/json',
|
|
270
|
+
}, payload);
|
|
271
|
+
}
|
|
272
|
+
};
|
package/types/index.d.ts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
export { Client, Query, AppwriteException } from './client';
|
|
2
2
|
export { Account } from './services/account';
|
|
3
3
|
export { Avatars } from './services/avatars';
|
|
4
|
+
export { Assistant } from './services/assistant';
|
|
4
5
|
export { Console } from './services/console';
|
|
5
6
|
export { Databases } from './services/databases';
|
|
6
7
|
export { Functions } from './services/functions';
|
|
7
8
|
export { Graphql } from './services/graphql';
|
|
8
9
|
export { Health } from './services/health';
|
|
9
10
|
export { Locale } from './services/locale';
|
|
11
|
+
export { Migrations } from './services/migrations';
|
|
12
|
+
export { Project } from './services/project';
|
|
10
13
|
export { Projects } from './services/projects';
|
|
14
|
+
export { Proxy } from './services/proxy';
|
|
11
15
|
export { Storage } from './services/storage';
|
|
12
16
|
export { Teams } from './services/teams';
|
|
13
17
|
export { Users } from './services/users';
|
|
18
|
+
export { Vcs } from './services/vcs';
|
|
14
19
|
export type { Models, Payload, RealtimeResponseEvent, UploadProgress } from './client';
|
|
15
20
|
export type { QueryTypes, QueryTypesList } from './query';
|
|
16
21
|
export { Permission } from './permission';
|