@appwrite.io/console 3.0.0 → 4.0.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/CHANGELOG.md +5 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +470 -83
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +471 -84
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +470 -83
- package/docs/examples/databases/list-documents.md +2 -1
- package/docs/examples/domains/create-purchase.md +25 -0
- package/docs/examples/domains/create-transfer-in.md +18 -0
- package/docs/examples/domains/create-transfer-out.md +16 -0
- package/docs/examples/domains/get-transfer-status.md +15 -0
- package/docs/examples/health/get-console-pausing.md +16 -0
- package/docs/examples/migrations/create-appwrite-migration.md +2 -2
- package/docs/examples/migrations/create-firebase-migration.md +2 -2
- package/docs/examples/migrations/create-n-host-migration.md +2 -2
- package/docs/examples/migrations/create-supabase-migration.md +2 -2
- package/docs/examples/migrations/get-appwrite-report.md +2 -2
- package/docs/examples/migrations/get-firebase-report.md +2 -2
- package/docs/examples/migrations/get-n-host-report.md +2 -2
- package/docs/examples/migrations/get-supabase-report.md +2 -2
- package/docs/examples/organizations/get-scopes.md +2 -1
- package/docs/examples/projects/update-console-access.md +15 -0
- package/docs/examples/projects/update-status.md +16 -0
- package/docs/examples/sites/create-deployment.md +2 -2
- package/docs/examples/tablesdb/list-rows.md +2 -1
- package/package.json +1 -1
- package/src/channel.ts +19 -15
- package/src/client.ts +7 -2
- package/src/enums/appwrite-migration-resource.ts +21 -0
- package/src/enums/domain-transfer-status-status.ts +10 -0
- package/src/enums/firebase-migration-resource.ts +12 -0
- package/src/enums/{resources.ts → n-host-migration-resource.ts} +1 -1
- package/src/enums/status.ts +3 -0
- package/src/enums/supabase-migration-resource.ts +13 -0
- package/src/index.ts +6 -1
- package/src/models.ts +124 -3
- package/src/query.ts +26 -0
- package/src/services/account.ts +2 -2
- package/src/services/databases.ts +100 -93
- package/src/services/domains.ts +350 -0
- package/src/services/health.ts +61 -0
- package/src/services/messaging.ts +2 -2
- package/src/services/migrations.ts +68 -65
- package/src/services/organizations.ts +14 -6
- package/src/services/projects.ts +120 -0
- package/src/services/sites.ts +13 -16
- package/src/services/tables-db.ts +14 -7
- package/src/services/teams.ts +4 -4
- package/types/channel.d.ts +9 -9
- package/types/enums/appwrite-migration-resource.d.ts +21 -0
- package/types/enums/domain-transfer-status-status.d.ts +10 -0
- package/types/enums/firebase-migration-resource.d.ts +12 -0
- package/types/enums/{resources.d.ts → n-host-migration-resource.d.ts} +1 -1
- package/types/enums/status.d.ts +3 -0
- package/types/enums/supabase-migration-resource.d.ts +13 -0
- package/types/index.d.ts +6 -1
- package/types/models.d.ts +122 -3
- package/types/query.d.ts +22 -0
- package/types/services/databases.d.ts +40 -37
- package/types/services/domains.d.ts +118 -0
- package/types/services/health.d.ts +24 -0
- package/types/services/messaging.d.ts +2 -2
- package/types/services/migrations.d.ts +36 -33
- package/types/services/organizations.d.ts +4 -1
- package/types/services/projects.d.ts +46 -0
- package/types/services/sites.d.ts +4 -4
- package/types/services/tables-db.d.ts +4 -1
- package/types/services/teams.d.ts +4 -4
package/src/services/domains.ts
CHANGED
|
@@ -206,6 +206,153 @@ export class Domains {
|
|
|
206
206
|
);
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
/**
|
|
210
|
+
* Create a domain purchase with registrant information.
|
|
211
|
+
*
|
|
212
|
+
* @param {string} params.domain - Fully qualified domain name to purchase (for example, example.com).
|
|
213
|
+
* @param {string} params.organizationId - Team ID that will own the domain.
|
|
214
|
+
* @param {string} params.firstName - Registrant first name used for domain registration.
|
|
215
|
+
* @param {string} params.lastName - Registrant last name used for domain registration.
|
|
216
|
+
* @param {string} params.email - Registrant email address for registration and notices.
|
|
217
|
+
* @param {string} params.phone - Registrant phone number in E.164 format (for example, +15555551234).
|
|
218
|
+
* @param {string} params.billingAddressId - Billing address ID used for registration contact details.
|
|
219
|
+
* @param {string} params.paymentMethodId - Payment method ID to authorize and capture the purchase.
|
|
220
|
+
* @param {string} params.addressLine3 - Additional address line for the registrant (line 3).
|
|
221
|
+
* @param {string} params.companyName - Company or organization name for the registrant.
|
|
222
|
+
* @param {number} params.periodYears - Registration term in years (1-10).
|
|
223
|
+
* @throws {AppwriteException}
|
|
224
|
+
* @returns {Promise<Models.Domain>}
|
|
225
|
+
*/
|
|
226
|
+
createPurchase(params: { domain: string, organizationId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number }): Promise<Models.Domain>;
|
|
227
|
+
/**
|
|
228
|
+
* Create a domain purchase with registrant information.
|
|
229
|
+
*
|
|
230
|
+
* @param {string} domain - Fully qualified domain name to purchase (for example, example.com).
|
|
231
|
+
* @param {string} organizationId - Team ID that will own the domain.
|
|
232
|
+
* @param {string} firstName - Registrant first name used for domain registration.
|
|
233
|
+
* @param {string} lastName - Registrant last name used for domain registration.
|
|
234
|
+
* @param {string} email - Registrant email address for registration and notices.
|
|
235
|
+
* @param {string} phone - Registrant phone number in E.164 format (for example, +15555551234).
|
|
236
|
+
* @param {string} billingAddressId - Billing address ID used for registration contact details.
|
|
237
|
+
* @param {string} paymentMethodId - Payment method ID to authorize and capture the purchase.
|
|
238
|
+
* @param {string} addressLine3 - Additional address line for the registrant (line 3).
|
|
239
|
+
* @param {string} companyName - Company or organization name for the registrant.
|
|
240
|
+
* @param {number} periodYears - Registration term in years (1-10).
|
|
241
|
+
* @throws {AppwriteException}
|
|
242
|
+
* @returns {Promise<Models.Domain>}
|
|
243
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
244
|
+
*/
|
|
245
|
+
createPurchase(domain: string, organizationId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number): Promise<Models.Domain>;
|
|
246
|
+
createPurchase(
|
|
247
|
+
paramsOrFirst: { domain: string, organizationId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number } | string,
|
|
248
|
+
...rest: [(string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (string)?, (number)?]
|
|
249
|
+
): Promise<Models.Domain> {
|
|
250
|
+
let params: { domain: string, organizationId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number };
|
|
251
|
+
|
|
252
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
253
|
+
params = (paramsOrFirst || {}) as { domain: string, organizationId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number };
|
|
254
|
+
} else {
|
|
255
|
+
params = {
|
|
256
|
+
domain: paramsOrFirst as string,
|
|
257
|
+
organizationId: rest[0] as string,
|
|
258
|
+
firstName: rest[1] as string,
|
|
259
|
+
lastName: rest[2] as string,
|
|
260
|
+
email: rest[3] as string,
|
|
261
|
+
phone: rest[4] as string,
|
|
262
|
+
billingAddressId: rest[5] as string,
|
|
263
|
+
paymentMethodId: rest[6] as string,
|
|
264
|
+
addressLine3: rest[7] as string,
|
|
265
|
+
companyName: rest[8] as string,
|
|
266
|
+
periodYears: rest[9] as number
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
const domain = params.domain;
|
|
271
|
+
const organizationId = params.organizationId;
|
|
272
|
+
const firstName = params.firstName;
|
|
273
|
+
const lastName = params.lastName;
|
|
274
|
+
const email = params.email;
|
|
275
|
+
const phone = params.phone;
|
|
276
|
+
const billingAddressId = params.billingAddressId;
|
|
277
|
+
const paymentMethodId = params.paymentMethodId;
|
|
278
|
+
const addressLine3 = params.addressLine3;
|
|
279
|
+
const companyName = params.companyName;
|
|
280
|
+
const periodYears = params.periodYears;
|
|
281
|
+
|
|
282
|
+
if (typeof domain === 'undefined') {
|
|
283
|
+
throw new AppwriteException('Missing required parameter: "domain"');
|
|
284
|
+
}
|
|
285
|
+
if (typeof organizationId === 'undefined') {
|
|
286
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
287
|
+
}
|
|
288
|
+
if (typeof firstName === 'undefined') {
|
|
289
|
+
throw new AppwriteException('Missing required parameter: "firstName"');
|
|
290
|
+
}
|
|
291
|
+
if (typeof lastName === 'undefined') {
|
|
292
|
+
throw new AppwriteException('Missing required parameter: "lastName"');
|
|
293
|
+
}
|
|
294
|
+
if (typeof email === 'undefined') {
|
|
295
|
+
throw new AppwriteException('Missing required parameter: "email"');
|
|
296
|
+
}
|
|
297
|
+
if (typeof phone === 'undefined') {
|
|
298
|
+
throw new AppwriteException('Missing required parameter: "phone"');
|
|
299
|
+
}
|
|
300
|
+
if (typeof billingAddressId === 'undefined') {
|
|
301
|
+
throw new AppwriteException('Missing required parameter: "billingAddressId"');
|
|
302
|
+
}
|
|
303
|
+
if (typeof paymentMethodId === 'undefined') {
|
|
304
|
+
throw new AppwriteException('Missing required parameter: "paymentMethodId"');
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
const apiPath = '/domains/purchases';
|
|
308
|
+
const payload: Payload = {};
|
|
309
|
+
if (typeof domain !== 'undefined') {
|
|
310
|
+
payload['domain'] = domain;
|
|
311
|
+
}
|
|
312
|
+
if (typeof organizationId !== 'undefined') {
|
|
313
|
+
payload['organizationId'] = organizationId;
|
|
314
|
+
}
|
|
315
|
+
if (typeof firstName !== 'undefined') {
|
|
316
|
+
payload['firstName'] = firstName;
|
|
317
|
+
}
|
|
318
|
+
if (typeof lastName !== 'undefined') {
|
|
319
|
+
payload['lastName'] = lastName;
|
|
320
|
+
}
|
|
321
|
+
if (typeof email !== 'undefined') {
|
|
322
|
+
payload['email'] = email;
|
|
323
|
+
}
|
|
324
|
+
if (typeof phone !== 'undefined') {
|
|
325
|
+
payload['phone'] = phone;
|
|
326
|
+
}
|
|
327
|
+
if (typeof billingAddressId !== 'undefined') {
|
|
328
|
+
payload['billingAddressId'] = billingAddressId;
|
|
329
|
+
}
|
|
330
|
+
if (typeof addressLine3 !== 'undefined') {
|
|
331
|
+
payload['addressLine3'] = addressLine3;
|
|
332
|
+
}
|
|
333
|
+
if (typeof companyName !== 'undefined') {
|
|
334
|
+
payload['companyName'] = companyName;
|
|
335
|
+
}
|
|
336
|
+
if (typeof periodYears !== 'undefined') {
|
|
337
|
+
payload['periodYears'] = periodYears;
|
|
338
|
+
}
|
|
339
|
+
if (typeof paymentMethodId !== 'undefined') {
|
|
340
|
+
payload['paymentMethodId'] = paymentMethodId;
|
|
341
|
+
}
|
|
342
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
343
|
+
|
|
344
|
+
const apiHeaders: { [header: string]: string } = {
|
|
345
|
+
'content-type': 'application/json',
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
return this.client.call(
|
|
349
|
+
'post',
|
|
350
|
+
uri,
|
|
351
|
+
apiHeaders,
|
|
352
|
+
payload
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
|
|
209
356
|
/**
|
|
210
357
|
* List domain suggestions.
|
|
211
358
|
*
|
|
@@ -296,6 +443,158 @@ export class Domains {
|
|
|
296
443
|
);
|
|
297
444
|
}
|
|
298
445
|
|
|
446
|
+
/**
|
|
447
|
+
* Create a domain transfer in with authorization code and registrant information.
|
|
448
|
+
*
|
|
449
|
+
* @param {string} params.domain - Domain name to transfer in.
|
|
450
|
+
* @param {string} params.organizationId - Organization ID that this domain will belong to.
|
|
451
|
+
* @param {string} params.authCode - Authorization code for the domain transfer.
|
|
452
|
+
* @param {string} params.paymentMethodId - Payment method ID to authorize and capture the transfer.
|
|
453
|
+
* @throws {AppwriteException}
|
|
454
|
+
* @returns {Promise<Models.Domain>}
|
|
455
|
+
*/
|
|
456
|
+
createTransferIn(params: { domain: string, organizationId: string, authCode: string, paymentMethodId: string }): Promise<Models.Domain>;
|
|
457
|
+
/**
|
|
458
|
+
* Create a domain transfer in with authorization code and registrant information.
|
|
459
|
+
*
|
|
460
|
+
* @param {string} domain - Domain name to transfer in.
|
|
461
|
+
* @param {string} organizationId - Organization ID that this domain will belong to.
|
|
462
|
+
* @param {string} authCode - Authorization code for the domain transfer.
|
|
463
|
+
* @param {string} paymentMethodId - Payment method ID to authorize and capture the transfer.
|
|
464
|
+
* @throws {AppwriteException}
|
|
465
|
+
* @returns {Promise<Models.Domain>}
|
|
466
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
467
|
+
*/
|
|
468
|
+
createTransferIn(domain: string, organizationId: string, authCode: string, paymentMethodId: string): Promise<Models.Domain>;
|
|
469
|
+
createTransferIn(
|
|
470
|
+
paramsOrFirst: { domain: string, organizationId: string, authCode: string, paymentMethodId: string } | string,
|
|
471
|
+
...rest: [(string)?, (string)?, (string)?]
|
|
472
|
+
): Promise<Models.Domain> {
|
|
473
|
+
let params: { domain: string, organizationId: string, authCode: string, paymentMethodId: string };
|
|
474
|
+
|
|
475
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
476
|
+
params = (paramsOrFirst || {}) as { domain: string, organizationId: string, authCode: string, paymentMethodId: string };
|
|
477
|
+
} else {
|
|
478
|
+
params = {
|
|
479
|
+
domain: paramsOrFirst as string,
|
|
480
|
+
organizationId: rest[0] as string,
|
|
481
|
+
authCode: rest[1] as string,
|
|
482
|
+
paymentMethodId: rest[2] as string
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
const domain = params.domain;
|
|
487
|
+
const organizationId = params.organizationId;
|
|
488
|
+
const authCode = params.authCode;
|
|
489
|
+
const paymentMethodId = params.paymentMethodId;
|
|
490
|
+
|
|
491
|
+
if (typeof domain === 'undefined') {
|
|
492
|
+
throw new AppwriteException('Missing required parameter: "domain"');
|
|
493
|
+
}
|
|
494
|
+
if (typeof organizationId === 'undefined') {
|
|
495
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
496
|
+
}
|
|
497
|
+
if (typeof authCode === 'undefined') {
|
|
498
|
+
throw new AppwriteException('Missing required parameter: "authCode"');
|
|
499
|
+
}
|
|
500
|
+
if (typeof paymentMethodId === 'undefined') {
|
|
501
|
+
throw new AppwriteException('Missing required parameter: "paymentMethodId"');
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
const apiPath = '/domains/transfers/in';
|
|
505
|
+
const payload: Payload = {};
|
|
506
|
+
if (typeof domain !== 'undefined') {
|
|
507
|
+
payload['domain'] = domain;
|
|
508
|
+
}
|
|
509
|
+
if (typeof organizationId !== 'undefined') {
|
|
510
|
+
payload['organizationId'] = organizationId;
|
|
511
|
+
}
|
|
512
|
+
if (typeof authCode !== 'undefined') {
|
|
513
|
+
payload['authCode'] = authCode;
|
|
514
|
+
}
|
|
515
|
+
if (typeof paymentMethodId !== 'undefined') {
|
|
516
|
+
payload['paymentMethodId'] = paymentMethodId;
|
|
517
|
+
}
|
|
518
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
519
|
+
|
|
520
|
+
const apiHeaders: { [header: string]: string } = {
|
|
521
|
+
'content-type': 'application/json',
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
return this.client.call(
|
|
525
|
+
'post',
|
|
526
|
+
uri,
|
|
527
|
+
apiHeaders,
|
|
528
|
+
payload
|
|
529
|
+
);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* Create a domain transfer out and return the authorization code.
|
|
534
|
+
*
|
|
535
|
+
* @param {string} params.domainId - Domain unique ID.
|
|
536
|
+
* @param {string} params.organizationId - Organization ID that this domain belongs to.
|
|
537
|
+
* @throws {AppwriteException}
|
|
538
|
+
* @returns {Promise<Models.DomainTransferOut>}
|
|
539
|
+
*/
|
|
540
|
+
createTransferOut(params: { domainId: string, organizationId: string }): Promise<Models.DomainTransferOut>;
|
|
541
|
+
/**
|
|
542
|
+
* Create a domain transfer out and return the authorization code.
|
|
543
|
+
*
|
|
544
|
+
* @param {string} domainId - Domain unique ID.
|
|
545
|
+
* @param {string} organizationId - Organization ID that this domain belongs to.
|
|
546
|
+
* @throws {AppwriteException}
|
|
547
|
+
* @returns {Promise<Models.DomainTransferOut>}
|
|
548
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
549
|
+
*/
|
|
550
|
+
createTransferOut(domainId: string, organizationId: string): Promise<Models.DomainTransferOut>;
|
|
551
|
+
createTransferOut(
|
|
552
|
+
paramsOrFirst: { domainId: string, organizationId: string } | string,
|
|
553
|
+
...rest: [(string)?]
|
|
554
|
+
): Promise<Models.DomainTransferOut> {
|
|
555
|
+
let params: { domainId: string, organizationId: string };
|
|
556
|
+
|
|
557
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
558
|
+
params = (paramsOrFirst || {}) as { domainId: string, organizationId: string };
|
|
559
|
+
} else {
|
|
560
|
+
params = {
|
|
561
|
+
domainId: paramsOrFirst as string,
|
|
562
|
+
organizationId: rest[0] as string
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
const domainId = params.domainId;
|
|
567
|
+
const organizationId = params.organizationId;
|
|
568
|
+
|
|
569
|
+
if (typeof domainId === 'undefined') {
|
|
570
|
+
throw new AppwriteException('Missing required parameter: "domainId"');
|
|
571
|
+
}
|
|
572
|
+
if (typeof organizationId === 'undefined') {
|
|
573
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
const apiPath = '/domains/transfers/out';
|
|
577
|
+
const payload: Payload = {};
|
|
578
|
+
if (typeof domainId !== 'undefined') {
|
|
579
|
+
payload['domainId'] = domainId;
|
|
580
|
+
}
|
|
581
|
+
if (typeof organizationId !== 'undefined') {
|
|
582
|
+
payload['organizationId'] = organizationId;
|
|
583
|
+
}
|
|
584
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
585
|
+
|
|
586
|
+
const apiHeaders: { [header: string]: string } = {
|
|
587
|
+
'content-type': 'application/json',
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
return this.client.call(
|
|
591
|
+
'post',
|
|
592
|
+
uri,
|
|
593
|
+
apiHeaders,
|
|
594
|
+
payload
|
|
595
|
+
);
|
|
596
|
+
}
|
|
597
|
+
|
|
299
598
|
/**
|
|
300
599
|
* Get a domain by its unique ID.
|
|
301
600
|
*
|
|
@@ -3391,6 +3690,57 @@ export class Domains {
|
|
|
3391
3690
|
);
|
|
3392
3691
|
}
|
|
3393
3692
|
|
|
3693
|
+
/**
|
|
3694
|
+
* Get the transfer status for a domain.
|
|
3695
|
+
*
|
|
3696
|
+
* @param {string} params.domainId - Domain unique ID.
|
|
3697
|
+
* @throws {AppwriteException}
|
|
3698
|
+
* @returns {Promise<Models.DomainTransferStatus>}
|
|
3699
|
+
*/
|
|
3700
|
+
getTransferStatus(params: { domainId: string }): Promise<Models.DomainTransferStatus>;
|
|
3701
|
+
/**
|
|
3702
|
+
* Get the transfer status for a domain.
|
|
3703
|
+
*
|
|
3704
|
+
* @param {string} domainId - Domain unique ID.
|
|
3705
|
+
* @throws {AppwriteException}
|
|
3706
|
+
* @returns {Promise<Models.DomainTransferStatus>}
|
|
3707
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3708
|
+
*/
|
|
3709
|
+
getTransferStatus(domainId: string): Promise<Models.DomainTransferStatus>;
|
|
3710
|
+
getTransferStatus(
|
|
3711
|
+
paramsOrFirst: { domainId: string } | string
|
|
3712
|
+
): Promise<Models.DomainTransferStatus> {
|
|
3713
|
+
let params: { domainId: string };
|
|
3714
|
+
|
|
3715
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3716
|
+
params = (paramsOrFirst || {}) as { domainId: string };
|
|
3717
|
+
} else {
|
|
3718
|
+
params = {
|
|
3719
|
+
domainId: paramsOrFirst as string
|
|
3720
|
+
};
|
|
3721
|
+
}
|
|
3722
|
+
|
|
3723
|
+
const domainId = params.domainId;
|
|
3724
|
+
|
|
3725
|
+
if (typeof domainId === 'undefined') {
|
|
3726
|
+
throw new AppwriteException('Missing required parameter: "domainId"');
|
|
3727
|
+
}
|
|
3728
|
+
|
|
3729
|
+
const apiPath = '/domains/{domainId}/transfers/status'.replace('{domainId}', domainId);
|
|
3730
|
+
const payload: Payload = {};
|
|
3731
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3732
|
+
|
|
3733
|
+
const apiHeaders: { [header: string]: string } = {
|
|
3734
|
+
}
|
|
3735
|
+
|
|
3736
|
+
return this.client.call(
|
|
3737
|
+
'get',
|
|
3738
|
+
uri,
|
|
3739
|
+
apiHeaders,
|
|
3740
|
+
payload
|
|
3741
|
+
);
|
|
3742
|
+
}
|
|
3743
|
+
|
|
3394
3744
|
/**
|
|
3395
3745
|
* Retrieve the DNS zone file for the given domain. This endpoint will return the DNS
|
|
3396
3746
|
* zone file in a standardized format that can be used to configure DNS servers.
|
package/src/services/health.ts
CHANGED
|
@@ -131,6 +131,67 @@ export class Health {
|
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Get console pausing health status. Monitors projects approaching the pause threshold to detect potential issues with console access tracking.
|
|
136
|
+
*
|
|
137
|
+
*
|
|
138
|
+
* @param {number} params.threshold - Percentage threshold of projects approaching pause. When hit (equal or higher), endpoint returns server error. Default value is 10.
|
|
139
|
+
* @param {number} params.inactivityDays - Number of days of inactivity before a project is paused. Should match the plan's projectInactivityDays setting. Default value is 7.
|
|
140
|
+
* @throws {AppwriteException}
|
|
141
|
+
* @returns {Promise<Models.HealthStatus>}
|
|
142
|
+
*/
|
|
143
|
+
getConsolePausing(params?: { threshold?: number, inactivityDays?: number }): Promise<Models.HealthStatus>;
|
|
144
|
+
/**
|
|
145
|
+
* Get console pausing health status. Monitors projects approaching the pause threshold to detect potential issues with console access tracking.
|
|
146
|
+
*
|
|
147
|
+
*
|
|
148
|
+
* @param {number} threshold - Percentage threshold of projects approaching pause. When hit (equal or higher), endpoint returns server error. Default value is 10.
|
|
149
|
+
* @param {number} inactivityDays - Number of days of inactivity before a project is paused. Should match the plan's projectInactivityDays setting. Default value is 7.
|
|
150
|
+
* @throws {AppwriteException}
|
|
151
|
+
* @returns {Promise<Models.HealthStatus>}
|
|
152
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
153
|
+
*/
|
|
154
|
+
getConsolePausing(threshold?: number, inactivityDays?: number): Promise<Models.HealthStatus>;
|
|
155
|
+
getConsolePausing(
|
|
156
|
+
paramsOrFirst?: { threshold?: number, inactivityDays?: number } | number,
|
|
157
|
+
...rest: [(number)?]
|
|
158
|
+
): Promise<Models.HealthStatus> {
|
|
159
|
+
let params: { threshold?: number, inactivityDays?: number };
|
|
160
|
+
|
|
161
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
162
|
+
params = (paramsOrFirst || {}) as { threshold?: number, inactivityDays?: number };
|
|
163
|
+
} else {
|
|
164
|
+
params = {
|
|
165
|
+
threshold: paramsOrFirst as number,
|
|
166
|
+
inactivityDays: rest[0] as number
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const threshold = params.threshold;
|
|
171
|
+
const inactivityDays = params.inactivityDays;
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
const apiPath = '/health/console-pausing';
|
|
175
|
+
const payload: Payload = {};
|
|
176
|
+
if (typeof threshold !== 'undefined') {
|
|
177
|
+
payload['threshold'] = threshold;
|
|
178
|
+
}
|
|
179
|
+
if (typeof inactivityDays !== 'undefined') {
|
|
180
|
+
payload['inactivityDays'] = inactivityDays;
|
|
181
|
+
}
|
|
182
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
183
|
+
|
|
184
|
+
const apiHeaders: { [header: string]: string } = {
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return this.client.call(
|
|
188
|
+
'get',
|
|
189
|
+
uri,
|
|
190
|
+
apiHeaders,
|
|
191
|
+
payload
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
134
195
|
/**
|
|
135
196
|
* Check the Appwrite database servers are up and connection is successful.
|
|
136
197
|
*
|
|
@@ -4929,7 +4929,7 @@ export class Messaging {
|
|
|
4929
4929
|
* Get a list of all subscribers from the current Appwrite project.
|
|
4930
4930
|
*
|
|
4931
4931
|
* @param {string} params.topicId - Topic ID. The topic ID subscribed to.
|
|
4932
|
-
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes:
|
|
4932
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType
|
|
4933
4933
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
4934
4934
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
4935
4935
|
* @throws {AppwriteException}
|
|
@@ -4940,7 +4940,7 @@ export class Messaging {
|
|
|
4940
4940
|
* Get a list of all subscribers from the current Appwrite project.
|
|
4941
4941
|
*
|
|
4942
4942
|
* @param {string} topicId - Topic ID. The topic ID subscribed to.
|
|
4943
|
-
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes:
|
|
4943
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType
|
|
4944
4944
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
4945
4945
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
4946
4946
|
* @throws {AppwriteException}
|