@appwrite.io/console 18.3.0-rc.1 → 18.3.0-rc.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.
package/dist/iife/sdk.js CHANGED
@@ -4467,7 +4467,7 @@
4467
4467
  'x-sdk-name': 'Console',
4468
4468
  'x-sdk-platform': 'console',
4469
4469
  'x-sdk-language': 'web',
4470
- 'x-sdk-version': '18.3.0-rc.1',
4470
+ 'x-sdk-version': '18.3.0-rc.2',
4471
4471
  'X-Appwrite-Response-Format': '2.3.0',
4472
4472
  };
4473
4473
  this.realtime = {
@@ -6638,6 +6638,196 @@
6638
6638
  };
6639
6639
  return this.client.call('patch', uri, apiHeaders, apiPayload);
6640
6640
  }
6641
+ listPasskeys(paramsOrFirst, ...rest) {
6642
+ let params;
6643
+ if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
6644
+ (paramsOrFirst &&
6645
+ typeof paramsOrFirst === 'object' &&
6646
+ !Array.isArray(paramsOrFirst))) {
6647
+ params = (paramsOrFirst || {});
6648
+ }
6649
+ else {
6650
+ params = {
6651
+ queries: paramsOrFirst,
6652
+ total: rest[0],
6653
+ };
6654
+ }
6655
+ const queries = params.queries;
6656
+ const total = params.total;
6657
+ const apiPath = '/account/passkeys';
6658
+ const apiPayload = {};
6659
+ if (typeof queries !== 'undefined') {
6660
+ apiPayload['queries'] = queries;
6661
+ }
6662
+ if (typeof total !== 'undefined') {
6663
+ apiPayload['total'] = total;
6664
+ }
6665
+ const uri = new URL(this.client.config.endpoint + apiPath);
6666
+ const apiHeaders = {
6667
+ 'X-Appwrite-Project': this.client.config.project,
6668
+ accept: 'application/json',
6669
+ };
6670
+ return this.client.call('get', uri, apiHeaders, apiPayload);
6671
+ }
6672
+ createPasskey(paramsOrFirst, ...rest) {
6673
+ let params;
6674
+ if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
6675
+ (paramsOrFirst &&
6676
+ typeof paramsOrFirst === 'object' &&
6677
+ !Array.isArray(paramsOrFirst))) {
6678
+ params = (paramsOrFirst || {});
6679
+ }
6680
+ else {
6681
+ params = {
6682
+ passkeyId: paramsOrFirst,
6683
+ name: rest[0],
6684
+ };
6685
+ }
6686
+ const passkeyId = params.passkeyId;
6687
+ const name = params.name;
6688
+ const apiPath = '/account/passkeys';
6689
+ const apiPayload = {};
6690
+ if (typeof passkeyId !== 'undefined') {
6691
+ apiPayload['passkeyId'] = passkeyId;
6692
+ }
6693
+ if (typeof name !== 'undefined') {
6694
+ apiPayload['name'] = name;
6695
+ }
6696
+ const uri = new URL(this.client.config.endpoint + apiPath);
6697
+ const apiHeaders = {
6698
+ 'X-Appwrite-Project': this.client.config.project,
6699
+ 'content-type': 'application/json',
6700
+ accept: 'application/json',
6701
+ };
6702
+ return this.client.call('post', uri, apiHeaders, apiPayload);
6703
+ }
6704
+ getPasskey(paramsOrFirst) {
6705
+ let params;
6706
+ if (paramsOrFirst &&
6707
+ typeof paramsOrFirst === 'object' &&
6708
+ !Array.isArray(paramsOrFirst)) {
6709
+ params = (paramsOrFirst || {});
6710
+ }
6711
+ else {
6712
+ params = {
6713
+ passkeyId: paramsOrFirst,
6714
+ };
6715
+ }
6716
+ const passkeyId = params.passkeyId;
6717
+ if (typeof passkeyId === 'undefined' || passkeyId === '') {
6718
+ throw new AppwriteException('Missing required parameter: "passkeyId"');
6719
+ }
6720
+ const apiPath = '/account/passkeys/{passkeyId}'.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
6721
+ const apiPayload = {};
6722
+ const uri = new URL(this.client.config.endpoint + apiPath);
6723
+ const apiHeaders = {
6724
+ 'X-Appwrite-Project': this.client.config.project,
6725
+ accept: 'application/json',
6726
+ };
6727
+ return this.client.call('get', uri, apiHeaders, apiPayload);
6728
+ }
6729
+ updatePasskey(paramsOrFirst, ...rest) {
6730
+ let params;
6731
+ if (paramsOrFirst &&
6732
+ typeof paramsOrFirst === 'object' &&
6733
+ !Array.isArray(paramsOrFirst)) {
6734
+ params = (paramsOrFirst || {});
6735
+ }
6736
+ else {
6737
+ params = {
6738
+ passkeyId: paramsOrFirst,
6739
+ name: rest[0],
6740
+ };
6741
+ }
6742
+ const passkeyId = params.passkeyId;
6743
+ const name = params.name;
6744
+ if (typeof passkeyId === 'undefined' || passkeyId === '') {
6745
+ throw new AppwriteException('Missing required parameter: "passkeyId"');
6746
+ }
6747
+ if (typeof name === 'undefined') {
6748
+ throw new AppwriteException('Missing required parameter: "name"');
6749
+ }
6750
+ const apiPath = '/account/passkeys/{passkeyId}'.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
6751
+ const apiPayload = {};
6752
+ if (typeof name !== 'undefined') {
6753
+ apiPayload['name'] = name;
6754
+ }
6755
+ const uri = new URL(this.client.config.endpoint + apiPath);
6756
+ const apiHeaders = {
6757
+ 'X-Appwrite-Project': this.client.config.project,
6758
+ 'content-type': 'application/json',
6759
+ accept: 'application/json',
6760
+ };
6761
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
6762
+ }
6763
+ deletePasskey(paramsOrFirst) {
6764
+ let params;
6765
+ if (paramsOrFirst &&
6766
+ typeof paramsOrFirst === 'object' &&
6767
+ !Array.isArray(paramsOrFirst)) {
6768
+ params = (paramsOrFirst || {});
6769
+ }
6770
+ else {
6771
+ params = {
6772
+ passkeyId: paramsOrFirst,
6773
+ };
6774
+ }
6775
+ const passkeyId = params.passkeyId;
6776
+ if (typeof passkeyId === 'undefined' || passkeyId === '') {
6777
+ throw new AppwriteException('Missing required parameter: "passkeyId"');
6778
+ }
6779
+ const apiPath = '/account/passkeys/{passkeyId}'.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
6780
+ const apiPayload = {};
6781
+ const uri = new URL(this.client.config.endpoint + apiPath);
6782
+ const apiHeaders = {
6783
+ 'X-Appwrite-Project': this.client.config.project,
6784
+ 'content-type': 'application/json',
6785
+ accept: 'application/json',
6786
+ };
6787
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
6788
+ }
6789
+ updatePasskeyVerification(paramsOrFirst, ...rest) {
6790
+ let params;
6791
+ if (paramsOrFirst &&
6792
+ typeof paramsOrFirst === 'object' &&
6793
+ !Array.isArray(paramsOrFirst)) {
6794
+ params = (paramsOrFirst || {});
6795
+ }
6796
+ else {
6797
+ params = {
6798
+ passkeyId: paramsOrFirst,
6799
+ challengeId: rest[0],
6800
+ credential: rest[1],
6801
+ };
6802
+ }
6803
+ const passkeyId = params.passkeyId;
6804
+ const challengeId = params.challengeId;
6805
+ const credential = params.credential;
6806
+ if (typeof passkeyId === 'undefined' || passkeyId === '') {
6807
+ throw new AppwriteException('Missing required parameter: "passkeyId"');
6808
+ }
6809
+ if (typeof challengeId === 'undefined') {
6810
+ throw new AppwriteException('Missing required parameter: "challengeId"');
6811
+ }
6812
+ if (typeof credential === 'undefined') {
6813
+ throw new AppwriteException('Missing required parameter: "credential"');
6814
+ }
6815
+ const apiPath = '/account/passkeys/{passkeyId}/verification'.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
6816
+ const apiPayload = {};
6817
+ if (typeof challengeId !== 'undefined') {
6818
+ apiPayload['challengeId'] = challengeId;
6819
+ }
6820
+ if (typeof credential !== 'undefined') {
6821
+ apiPayload['credential'] = credential;
6822
+ }
6823
+ const uri = new URL(this.client.config.endpoint + apiPath);
6824
+ const apiHeaders = {
6825
+ 'X-Appwrite-Project': this.client.config.project,
6826
+ 'content-type': 'application/json',
6827
+ accept: 'application/json',
6828
+ };
6829
+ return this.client.call('put', uri, apiHeaders, apiPayload);
6830
+ }
6641
6831
  updatePassword(paramsOrFirst, ...rest) {
6642
6832
  let params;
6643
6833
  if (paramsOrFirst &&
@@ -7801,6 +7991,60 @@
7801
7991
  return uri.toString();
7802
7992
  }
7803
7993
  }
7994
+ /**
7995
+ * Start signing in with a passkey. No email or user ID is needed: pass the returned `publicKey` options to `navigator.credentials.get()` and the user picks one of their passkeys. Then call [Update passkey token](/docs/references/cloud/client-web/account#updatePasskeyToken) with the credential to receive a token, and exchange it with [Create session](/docs/references/cloud/client-web/account#createSession). The challenge expires after 5 minutes.
7996
+ *
7997
+ * @throws {AppwriteException}
7998
+ * @returns {Promise<Models.PasskeyChallenge>}
7999
+ */
8000
+ createPasskeyToken() {
8001
+ const apiPath = '/account/tokens/passkey';
8002
+ const apiPayload = {};
8003
+ const uri = new URL(this.client.config.endpoint + apiPath);
8004
+ const apiHeaders = {
8005
+ 'X-Appwrite-Project': this.client.config.project,
8006
+ 'content-type': 'application/json',
8007
+ accept: 'application/json',
8008
+ };
8009
+ return this.client.call('post', uri, apiHeaders, apiPayload);
8010
+ }
8011
+ updatePasskeyToken(paramsOrFirst, ...rest) {
8012
+ let params;
8013
+ if (paramsOrFirst &&
8014
+ typeof paramsOrFirst === 'object' &&
8015
+ !Array.isArray(paramsOrFirst)) {
8016
+ params = (paramsOrFirst || {});
8017
+ }
8018
+ else {
8019
+ params = {
8020
+ challengeId: paramsOrFirst,
8021
+ credential: rest[0],
8022
+ };
8023
+ }
8024
+ const challengeId = params.challengeId;
8025
+ const credential = params.credential;
8026
+ if (typeof challengeId === 'undefined') {
8027
+ throw new AppwriteException('Missing required parameter: "challengeId"');
8028
+ }
8029
+ if (typeof credential === 'undefined') {
8030
+ throw new AppwriteException('Missing required parameter: "credential"');
8031
+ }
8032
+ const apiPath = '/account/tokens/passkey';
8033
+ const apiPayload = {};
8034
+ if (typeof challengeId !== 'undefined') {
8035
+ apiPayload['challengeId'] = challengeId;
8036
+ }
8037
+ if (typeof credential !== 'undefined') {
8038
+ apiPayload['credential'] = credential;
8039
+ }
8040
+ const uri = new URL(this.client.config.endpoint + apiPath);
8041
+ const apiHeaders = {
8042
+ 'X-Appwrite-Project': this.client.config.project,
8043
+ 'content-type': 'application/json',
8044
+ accept: 'application/json',
8045
+ };
8046
+ return this.client.call('put', uri, apiHeaders, apiPayload);
8047
+ }
7804
8048
  createPhoneToken(paramsOrFirst, ...rest) {
7805
8049
  let params;
7806
8050
  if (paramsOrFirst &&
@@ -8147,6 +8391,135 @@
8147
8391
  }
8148
8392
  }
8149
8393
 
8394
+ class Admin {
8395
+ constructor(client) {
8396
+ this.client = client;
8397
+ }
8398
+ /**
8399
+ * Delete everything cached from the platform database in the region serving the request.
8400
+ *
8401
+ * @throws {AppwriteException}
8402
+ * @returns {Promise<{}>}
8403
+ */
8404
+ deletePlatformCache() {
8405
+ const apiPath = '/admin/cache/platform';
8406
+ const apiPayload = {};
8407
+ const uri = new URL(this.client.config.endpoint + apiPath);
8408
+ const apiHeaders = {
8409
+ 'X-Appwrite-Project': this.client.config.project,
8410
+ 'content-type': 'application/json',
8411
+ accept: 'application/json',
8412
+ };
8413
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
8414
+ }
8415
+ deletePlatformResourceCache(paramsOrFirst, ...rest) {
8416
+ let params;
8417
+ if (paramsOrFirst &&
8418
+ typeof paramsOrFirst === 'object' &&
8419
+ !Array.isArray(paramsOrFirst) &&
8420
+ ('resourceType' in paramsOrFirst || 'resourceId' in paramsOrFirst)) {
8421
+ params = (paramsOrFirst || {});
8422
+ }
8423
+ else {
8424
+ params = {
8425
+ resourceType: paramsOrFirst,
8426
+ resourceId: rest[0],
8427
+ };
8428
+ }
8429
+ const resourceType = params.resourceType;
8430
+ const resourceId = params.resourceId;
8431
+ if (typeof resourceType === 'undefined') {
8432
+ throw new AppwriteException('Missing required parameter: "resourceType"');
8433
+ }
8434
+ const apiPath = '/admin/cache/platform/resources';
8435
+ const apiPayload = {};
8436
+ if (typeof resourceType !== 'undefined') {
8437
+ apiPayload['resourceType'] = resourceType;
8438
+ }
8439
+ if (typeof resourceId !== 'undefined') {
8440
+ apiPayload['resourceId'] = resourceId;
8441
+ }
8442
+ const uri = new URL(this.client.config.endpoint + apiPath);
8443
+ const apiHeaders = {
8444
+ 'X-Appwrite-Project': this.client.config.project,
8445
+ 'content-type': 'application/json',
8446
+ accept: 'application/json',
8447
+ };
8448
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
8449
+ }
8450
+ deleteProjectCache(paramsOrFirst) {
8451
+ let params;
8452
+ if (paramsOrFirst &&
8453
+ typeof paramsOrFirst === 'object' &&
8454
+ !Array.isArray(paramsOrFirst)) {
8455
+ params = (paramsOrFirst || {});
8456
+ }
8457
+ else {
8458
+ params = {
8459
+ projectId: paramsOrFirst,
8460
+ };
8461
+ }
8462
+ const projectId = params.projectId;
8463
+ if (typeof projectId === 'undefined') {
8464
+ throw new AppwriteException('Missing required parameter: "projectId"');
8465
+ }
8466
+ const apiPath = '/admin/cache/project';
8467
+ const apiPayload = {};
8468
+ if (typeof projectId !== 'undefined') {
8469
+ apiPayload['projectId'] = projectId;
8470
+ }
8471
+ const uri = new URL(this.client.config.endpoint + apiPath);
8472
+ const apiHeaders = {
8473
+ 'X-Appwrite-Project': this.client.config.project,
8474
+ 'content-type': 'application/json',
8475
+ accept: 'application/json',
8476
+ };
8477
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
8478
+ }
8479
+ deleteProjectResourceCache(paramsOrFirst, ...rest) {
8480
+ let params;
8481
+ if (paramsOrFirst &&
8482
+ typeof paramsOrFirst === 'object' &&
8483
+ !Array.isArray(paramsOrFirst)) {
8484
+ params = (paramsOrFirst || {});
8485
+ }
8486
+ else {
8487
+ params = {
8488
+ projectId: paramsOrFirst,
8489
+ resourceType: rest[0],
8490
+ resourceId: rest[1],
8491
+ };
8492
+ }
8493
+ const projectId = params.projectId;
8494
+ const resourceType = params.resourceType;
8495
+ const resourceId = params.resourceId;
8496
+ if (typeof projectId === 'undefined') {
8497
+ throw new AppwriteException('Missing required parameter: "projectId"');
8498
+ }
8499
+ if (typeof resourceType === 'undefined') {
8500
+ throw new AppwriteException('Missing required parameter: "resourceType"');
8501
+ }
8502
+ const apiPath = '/admin/cache/project/resources';
8503
+ const apiPayload = {};
8504
+ if (typeof projectId !== 'undefined') {
8505
+ apiPayload['projectId'] = projectId;
8506
+ }
8507
+ if (typeof resourceType !== 'undefined') {
8508
+ apiPayload['resourceType'] = resourceType;
8509
+ }
8510
+ if (typeof resourceId !== 'undefined') {
8511
+ apiPayload['resourceId'] = resourceId;
8512
+ }
8513
+ const uri = new URL(this.client.config.endpoint + apiPath);
8514
+ const apiHeaders = {
8515
+ 'X-Appwrite-Project': this.client.config.project,
8516
+ 'content-type': 'application/json',
8517
+ accept: 'application/json',
8518
+ };
8519
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
8520
+ }
8521
+ }
8522
+
8150
8523
  class Affiliates {
8151
8524
  constructor(client) {
8152
8525
  this.client = client;
@@ -35911,6 +36284,38 @@
35911
36284
  };
35912
36285
  return this.client.call('patch', uri, apiHeaders, apiPayload);
35913
36286
  }
36287
+ updatePasskeyPolicy(paramsOrFirst, ...rest) {
36288
+ let params;
36289
+ if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
36290
+ (paramsOrFirst &&
36291
+ typeof paramsOrFirst === 'object' &&
36292
+ !Array.isArray(paramsOrFirst))) {
36293
+ params = (paramsOrFirst || {});
36294
+ }
36295
+ else {
36296
+ params = {
36297
+ rpId: paramsOrFirst,
36298
+ origins: rest[0],
36299
+ };
36300
+ }
36301
+ const rpId = params.rpId;
36302
+ const origins = params.origins;
36303
+ const apiPath = '/project/policies/passkey';
36304
+ const apiPayload = {};
36305
+ if (typeof rpId !== 'undefined') {
36306
+ apiPayload['rpId'] = rpId;
36307
+ }
36308
+ if (typeof origins !== 'undefined') {
36309
+ apiPayload['origins'] = origins;
36310
+ }
36311
+ const uri = new URL(this.client.config.endpoint + apiPath);
36312
+ const apiHeaders = {
36313
+ 'X-Appwrite-Project': this.client.config.project,
36314
+ 'content-type': 'application/json',
36315
+ accept: 'application/json',
36316
+ };
36317
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
36318
+ }
35914
36319
  updatePasswordDictionaryPolicy(paramsOrFirst) {
35915
36320
  let params;
35916
36321
  if (paramsOrFirst &&
@@ -45872,6 +46277,106 @@
45872
46277
  };
45873
46278
  return this.client.call('patch', uri, apiHeaders, apiPayload);
45874
46279
  }
46280
+ listPasskeys(paramsOrFirst, ...rest) {
46281
+ let params;
46282
+ if (paramsOrFirst &&
46283
+ typeof paramsOrFirst === 'object' &&
46284
+ !Array.isArray(paramsOrFirst)) {
46285
+ params = (paramsOrFirst || {});
46286
+ }
46287
+ else {
46288
+ params = {
46289
+ userId: paramsOrFirst,
46290
+ queries: rest[0],
46291
+ total: rest[1],
46292
+ };
46293
+ }
46294
+ const userId = params.userId;
46295
+ const queries = params.queries;
46296
+ const total = params.total;
46297
+ if (typeof userId === 'undefined' || userId === '') {
46298
+ throw new AppwriteException('Missing required parameter: "userId"');
46299
+ }
46300
+ const apiPath = '/users/{userId}/passkeys'.replace('{userId}', encodeURIComponent(String(userId)));
46301
+ const apiPayload = {};
46302
+ if (typeof queries !== 'undefined') {
46303
+ apiPayload['queries'] = queries;
46304
+ }
46305
+ if (typeof total !== 'undefined') {
46306
+ apiPayload['total'] = total;
46307
+ }
46308
+ const uri = new URL(this.client.config.endpoint + apiPath);
46309
+ const apiHeaders = {
46310
+ 'X-Appwrite-Project': this.client.config.project,
46311
+ accept: 'application/json',
46312
+ };
46313
+ return this.client.call('get', uri, apiHeaders, apiPayload);
46314
+ }
46315
+ getPasskey(paramsOrFirst, ...rest) {
46316
+ let params;
46317
+ if (paramsOrFirst &&
46318
+ typeof paramsOrFirst === 'object' &&
46319
+ !Array.isArray(paramsOrFirst)) {
46320
+ params = (paramsOrFirst || {});
46321
+ }
46322
+ else {
46323
+ params = {
46324
+ userId: paramsOrFirst,
46325
+ passkeyId: rest[0],
46326
+ };
46327
+ }
46328
+ const userId = params.userId;
46329
+ const passkeyId = params.passkeyId;
46330
+ if (typeof userId === 'undefined' || userId === '') {
46331
+ throw new AppwriteException('Missing required parameter: "userId"');
46332
+ }
46333
+ if (typeof passkeyId === 'undefined' || passkeyId === '') {
46334
+ throw new AppwriteException('Missing required parameter: "passkeyId"');
46335
+ }
46336
+ const apiPath = '/users/{userId}/passkeys/{passkeyId}'
46337
+ .replace('{userId}', encodeURIComponent(String(userId)))
46338
+ .replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
46339
+ const apiPayload = {};
46340
+ const uri = new URL(this.client.config.endpoint + apiPath);
46341
+ const apiHeaders = {
46342
+ 'X-Appwrite-Project': this.client.config.project,
46343
+ accept: 'application/json',
46344
+ };
46345
+ return this.client.call('get', uri, apiHeaders, apiPayload);
46346
+ }
46347
+ deletePasskey(paramsOrFirst, ...rest) {
46348
+ let params;
46349
+ if (paramsOrFirst &&
46350
+ typeof paramsOrFirst === 'object' &&
46351
+ !Array.isArray(paramsOrFirst)) {
46352
+ params = (paramsOrFirst || {});
46353
+ }
46354
+ else {
46355
+ params = {
46356
+ userId: paramsOrFirst,
46357
+ passkeyId: rest[0],
46358
+ };
46359
+ }
46360
+ const userId = params.userId;
46361
+ const passkeyId = params.passkeyId;
46362
+ if (typeof userId === 'undefined' || userId === '') {
46363
+ throw new AppwriteException('Missing required parameter: "userId"');
46364
+ }
46365
+ if (typeof passkeyId === 'undefined' || passkeyId === '') {
46366
+ throw new AppwriteException('Missing required parameter: "passkeyId"');
46367
+ }
46368
+ const apiPath = '/users/{userId}/passkeys/{passkeyId}'
46369
+ .replace('{userId}', encodeURIComponent(String(userId)))
46370
+ .replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
46371
+ const apiPayload = {};
46372
+ const uri = new URL(this.client.config.endpoint + apiPath);
46373
+ const apiHeaders = {
46374
+ 'X-Appwrite-Project': this.client.config.project,
46375
+ 'content-type': 'application/json',
46376
+ accept: 'application/json',
46377
+ };
46378
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
46379
+ }
45875
46380
  updatePassword(paramsOrFirst, ...rest) {
45876
46381
  let params;
45877
46382
  if (paramsOrFirst &&
@@ -48378,6 +48883,1136 @@
48378
48883
  }
48379
48884
  }
48380
48885
 
48886
+ class Videos {
48887
+ constructor(client) {
48888
+ this.client = client;
48889
+ }
48890
+ list(paramsOrFirst, ...rest) {
48891
+ let params;
48892
+ if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
48893
+ (paramsOrFirst &&
48894
+ typeof paramsOrFirst === 'object' &&
48895
+ !Array.isArray(paramsOrFirst))) {
48896
+ params = (paramsOrFirst || {});
48897
+ }
48898
+ else {
48899
+ params = {
48900
+ queries: paramsOrFirst,
48901
+ search: rest[0],
48902
+ total: rest[1],
48903
+ };
48904
+ }
48905
+ const queries = params.queries;
48906
+ const search = params.search;
48907
+ const total = params.total;
48908
+ const apiPath = '/videos';
48909
+ const apiPayload = {};
48910
+ if (typeof queries !== 'undefined') {
48911
+ apiPayload['queries'] = queries;
48912
+ }
48913
+ if (typeof search !== 'undefined') {
48914
+ apiPayload['search'] = search;
48915
+ }
48916
+ if (typeof total !== 'undefined') {
48917
+ apiPayload['total'] = total;
48918
+ }
48919
+ const uri = new URL(this.client.config.endpoint + apiPath);
48920
+ const apiHeaders = {
48921
+ 'X-Appwrite-Project': this.client.config.project,
48922
+ accept: 'application/json',
48923
+ };
48924
+ return this.client.call('get', uri, apiHeaders, apiPayload);
48925
+ }
48926
+ create(paramsOrFirst, ...rest) {
48927
+ let params;
48928
+ if (paramsOrFirst &&
48929
+ typeof paramsOrFirst === 'object' &&
48930
+ !Array.isArray(paramsOrFirst)) {
48931
+ params = (paramsOrFirst || {});
48932
+ }
48933
+ else {
48934
+ params = {
48935
+ bucketId: paramsOrFirst,
48936
+ fileId: rest[0],
48937
+ name: rest[1],
48938
+ };
48939
+ }
48940
+ const bucketId = params.bucketId;
48941
+ const fileId = params.fileId;
48942
+ const name = params.name;
48943
+ if (typeof bucketId === 'undefined') {
48944
+ throw new AppwriteException('Missing required parameter: "bucketId"');
48945
+ }
48946
+ if (typeof fileId === 'undefined') {
48947
+ throw new AppwriteException('Missing required parameter: "fileId"');
48948
+ }
48949
+ const apiPath = '/videos';
48950
+ const apiPayload = {};
48951
+ if (typeof bucketId !== 'undefined') {
48952
+ apiPayload['bucketId'] = bucketId;
48953
+ }
48954
+ if (typeof fileId !== 'undefined') {
48955
+ apiPayload['fileId'] = fileId;
48956
+ }
48957
+ if (typeof name !== 'undefined') {
48958
+ apiPayload['name'] = name;
48959
+ }
48960
+ const uri = new URL(this.client.config.endpoint + apiPath);
48961
+ const apiHeaders = {
48962
+ 'X-Appwrite-Project': this.client.config.project,
48963
+ 'content-type': 'application/json',
48964
+ accept: 'application/json',
48965
+ };
48966
+ return this.client.call('post', uri, apiHeaders, apiPayload);
48967
+ }
48968
+ listProfiles(paramsOrFirst) {
48969
+ let params;
48970
+ if (typeof paramsOrFirst === 'undefined' ||
48971
+ (paramsOrFirst &&
48972
+ typeof paramsOrFirst === 'object' &&
48973
+ !Array.isArray(paramsOrFirst))) {
48974
+ params = (paramsOrFirst || {});
48975
+ }
48976
+ else {
48977
+ params = {
48978
+ search: paramsOrFirst,
48979
+ };
48980
+ }
48981
+ const search = params.search;
48982
+ const apiPath = '/videos/profiles';
48983
+ const apiPayload = {};
48984
+ if (typeof search !== 'undefined') {
48985
+ apiPayload['search'] = search;
48986
+ }
48987
+ const uri = new URL(this.client.config.endpoint + apiPath);
48988
+ const apiHeaders = {
48989
+ 'X-Appwrite-Project': this.client.config.project,
48990
+ accept: 'application/json',
48991
+ };
48992
+ return this.client.call('get', uri, apiHeaders, apiPayload);
48993
+ }
48994
+ createProfile(paramsOrFirst, ...rest) {
48995
+ let params;
48996
+ if (paramsOrFirst &&
48997
+ typeof paramsOrFirst === 'object' &&
48998
+ !Array.isArray(paramsOrFirst)) {
48999
+ params = (paramsOrFirst || {});
49000
+ }
49001
+ else {
49002
+ params = {
49003
+ name: paramsOrFirst,
49004
+ videoBitRate: rest[0],
49005
+ audioBitRate: rest[1],
49006
+ width: rest[2],
49007
+ height: rest[3],
49008
+ };
49009
+ }
49010
+ const name = params.name;
49011
+ const videoBitRate = params.videoBitRate;
49012
+ const audioBitRate = params.audioBitRate;
49013
+ const width = params.width;
49014
+ const height = params.height;
49015
+ if (typeof name === 'undefined') {
49016
+ throw new AppwriteException('Missing required parameter: "name"');
49017
+ }
49018
+ if (typeof videoBitRate === 'undefined') {
49019
+ throw new AppwriteException('Missing required parameter: "videoBitRate"');
49020
+ }
49021
+ if (typeof audioBitRate === 'undefined') {
49022
+ throw new AppwriteException('Missing required parameter: "audioBitRate"');
49023
+ }
49024
+ if (typeof width === 'undefined') {
49025
+ throw new AppwriteException('Missing required parameter: "width"');
49026
+ }
49027
+ if (typeof height === 'undefined') {
49028
+ throw new AppwriteException('Missing required parameter: "height"');
49029
+ }
49030
+ const apiPath = '/videos/profiles';
49031
+ const apiPayload = {};
49032
+ if (typeof name !== 'undefined') {
49033
+ apiPayload['name'] = name;
49034
+ }
49035
+ if (typeof videoBitRate !== 'undefined') {
49036
+ apiPayload['videoBitRate'] = videoBitRate;
49037
+ }
49038
+ if (typeof audioBitRate !== 'undefined') {
49039
+ apiPayload['audioBitRate'] = audioBitRate;
49040
+ }
49041
+ if (typeof width !== 'undefined') {
49042
+ apiPayload['width'] = width;
49043
+ }
49044
+ if (typeof height !== 'undefined') {
49045
+ apiPayload['height'] = height;
49046
+ }
49047
+ const uri = new URL(this.client.config.endpoint + apiPath);
49048
+ const apiHeaders = {
49049
+ 'X-Appwrite-Project': this.client.config.project,
49050
+ 'content-type': 'application/json',
49051
+ accept: 'application/json',
49052
+ };
49053
+ return this.client.call('post', uri, apiHeaders, apiPayload);
49054
+ }
49055
+ getProfile(paramsOrFirst) {
49056
+ let params;
49057
+ if (paramsOrFirst &&
49058
+ typeof paramsOrFirst === 'object' &&
49059
+ !Array.isArray(paramsOrFirst)) {
49060
+ params = (paramsOrFirst || {});
49061
+ }
49062
+ else {
49063
+ params = {
49064
+ profileId: paramsOrFirst,
49065
+ };
49066
+ }
49067
+ const profileId = params.profileId;
49068
+ if (typeof profileId === 'undefined' || profileId === '') {
49069
+ throw new AppwriteException('Missing required parameter: "profileId"');
49070
+ }
49071
+ const apiPath = '/videos/profiles/{profileId}'.replace('{profileId}', encodeURIComponent(String(profileId)));
49072
+ const apiPayload = {};
49073
+ const uri = new URL(this.client.config.endpoint + apiPath);
49074
+ const apiHeaders = {
49075
+ 'X-Appwrite-Project': this.client.config.project,
49076
+ accept: 'application/json',
49077
+ };
49078
+ return this.client.call('get', uri, apiHeaders, apiPayload);
49079
+ }
49080
+ updateProfile(paramsOrFirst, ...rest) {
49081
+ let params;
49082
+ if (paramsOrFirst &&
49083
+ typeof paramsOrFirst === 'object' &&
49084
+ !Array.isArray(paramsOrFirst)) {
49085
+ params = (paramsOrFirst || {});
49086
+ }
49087
+ else {
49088
+ params = {
49089
+ profileId: paramsOrFirst,
49090
+ name: rest[0],
49091
+ videoBitRate: rest[1],
49092
+ audioBitRate: rest[2],
49093
+ width: rest[3],
49094
+ height: rest[4],
49095
+ };
49096
+ }
49097
+ const profileId = params.profileId;
49098
+ const name = params.name;
49099
+ const videoBitRate = params.videoBitRate;
49100
+ const audioBitRate = params.audioBitRate;
49101
+ const width = params.width;
49102
+ const height = params.height;
49103
+ if (typeof profileId === 'undefined' || profileId === '') {
49104
+ throw new AppwriteException('Missing required parameter: "profileId"');
49105
+ }
49106
+ if (typeof name === 'undefined') {
49107
+ throw new AppwriteException('Missing required parameter: "name"');
49108
+ }
49109
+ if (typeof videoBitRate === 'undefined') {
49110
+ throw new AppwriteException('Missing required parameter: "videoBitRate"');
49111
+ }
49112
+ if (typeof audioBitRate === 'undefined') {
49113
+ throw new AppwriteException('Missing required parameter: "audioBitRate"');
49114
+ }
49115
+ if (typeof width === 'undefined') {
49116
+ throw new AppwriteException('Missing required parameter: "width"');
49117
+ }
49118
+ if (typeof height === 'undefined') {
49119
+ throw new AppwriteException('Missing required parameter: "height"');
49120
+ }
49121
+ const apiPath = '/videos/profiles/{profileId}'.replace('{profileId}', encodeURIComponent(String(profileId)));
49122
+ const apiPayload = {};
49123
+ if (typeof name !== 'undefined') {
49124
+ apiPayload['name'] = name;
49125
+ }
49126
+ if (typeof videoBitRate !== 'undefined') {
49127
+ apiPayload['videoBitRate'] = videoBitRate;
49128
+ }
49129
+ if (typeof audioBitRate !== 'undefined') {
49130
+ apiPayload['audioBitRate'] = audioBitRate;
49131
+ }
49132
+ if (typeof width !== 'undefined') {
49133
+ apiPayload['width'] = width;
49134
+ }
49135
+ if (typeof height !== 'undefined') {
49136
+ apiPayload['height'] = height;
49137
+ }
49138
+ const uri = new URL(this.client.config.endpoint + apiPath);
49139
+ const apiHeaders = {
49140
+ 'X-Appwrite-Project': this.client.config.project,
49141
+ 'content-type': 'application/json',
49142
+ accept: 'application/json',
49143
+ };
49144
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
49145
+ }
49146
+ deleteProfile(paramsOrFirst) {
49147
+ let params;
49148
+ if (paramsOrFirst &&
49149
+ typeof paramsOrFirst === 'object' &&
49150
+ !Array.isArray(paramsOrFirst)) {
49151
+ params = (paramsOrFirst || {});
49152
+ }
49153
+ else {
49154
+ params = {
49155
+ profileId: paramsOrFirst,
49156
+ };
49157
+ }
49158
+ const profileId = params.profileId;
49159
+ if (typeof profileId === 'undefined' || profileId === '') {
49160
+ throw new AppwriteException('Missing required parameter: "profileId"');
49161
+ }
49162
+ const apiPath = '/videos/profiles/{profileId}'.replace('{profileId}', encodeURIComponent(String(profileId)));
49163
+ const apiPayload = {};
49164
+ const uri = new URL(this.client.config.endpoint + apiPath);
49165
+ const apiHeaders = {
49166
+ 'X-Appwrite-Project': this.client.config.project,
49167
+ 'content-type': 'application/json',
49168
+ accept: 'application/json',
49169
+ };
49170
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
49171
+ }
49172
+ get(paramsOrFirst) {
49173
+ let params;
49174
+ if (paramsOrFirst &&
49175
+ typeof paramsOrFirst === 'object' &&
49176
+ !Array.isArray(paramsOrFirst)) {
49177
+ params = (paramsOrFirst || {});
49178
+ }
49179
+ else {
49180
+ params = {
49181
+ videoId: paramsOrFirst,
49182
+ };
49183
+ }
49184
+ const videoId = params.videoId;
49185
+ if (typeof videoId === 'undefined' || videoId === '') {
49186
+ throw new AppwriteException('Missing required parameter: "videoId"');
49187
+ }
49188
+ const apiPath = '/videos/{videoId}'.replace('{videoId}', encodeURIComponent(String(videoId)));
49189
+ const apiPayload = {};
49190
+ const uri = new URL(this.client.config.endpoint + apiPath);
49191
+ const apiHeaders = {
49192
+ 'X-Appwrite-Project': this.client.config.project,
49193
+ accept: 'application/json',
49194
+ };
49195
+ return this.client.call('get', uri, apiHeaders, apiPayload);
49196
+ }
49197
+ update(paramsOrFirst, ...rest) {
49198
+ let params;
49199
+ if (paramsOrFirst &&
49200
+ typeof paramsOrFirst === 'object' &&
49201
+ !Array.isArray(paramsOrFirst)) {
49202
+ params = (paramsOrFirst || {});
49203
+ }
49204
+ else {
49205
+ params = {
49206
+ videoId: paramsOrFirst,
49207
+ name: rest[0],
49208
+ };
49209
+ }
49210
+ const videoId = params.videoId;
49211
+ const name = params.name;
49212
+ if (typeof videoId === 'undefined' || videoId === '') {
49213
+ throw new AppwriteException('Missing required parameter: "videoId"');
49214
+ }
49215
+ if (typeof name === 'undefined') {
49216
+ throw new AppwriteException('Missing required parameter: "name"');
49217
+ }
49218
+ const apiPath = '/videos/{videoId}'.replace('{videoId}', encodeURIComponent(String(videoId)));
49219
+ const apiPayload = {};
49220
+ if (typeof name !== 'undefined') {
49221
+ apiPayload['name'] = name;
49222
+ }
49223
+ const uri = new URL(this.client.config.endpoint + apiPath);
49224
+ const apiHeaders = {
49225
+ 'X-Appwrite-Project': this.client.config.project,
49226
+ 'content-type': 'application/json',
49227
+ accept: 'application/json',
49228
+ };
49229
+ return this.client.call('put', uri, apiHeaders, apiPayload);
49230
+ }
49231
+ delete(paramsOrFirst) {
49232
+ let params;
49233
+ if (paramsOrFirst &&
49234
+ typeof paramsOrFirst === 'object' &&
49235
+ !Array.isArray(paramsOrFirst)) {
49236
+ params = (paramsOrFirst || {});
49237
+ }
49238
+ else {
49239
+ params = {
49240
+ videoId: paramsOrFirst,
49241
+ };
49242
+ }
49243
+ const videoId = params.videoId;
49244
+ if (typeof videoId === 'undefined' || videoId === '') {
49245
+ throw new AppwriteException('Missing required parameter: "videoId"');
49246
+ }
49247
+ const apiPath = '/videos/{videoId}'.replace('{videoId}', encodeURIComponent(String(videoId)));
49248
+ const apiPayload = {};
49249
+ const uri = new URL(this.client.config.endpoint + apiPath);
49250
+ const apiHeaders = {
49251
+ 'X-Appwrite-Project': this.client.config.project,
49252
+ 'content-type': 'application/json',
49253
+ accept: 'application/json',
49254
+ };
49255
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
49256
+ }
49257
+ getCmafHlsManifest(paramsOrFirst) {
49258
+ let params;
49259
+ if (paramsOrFirst &&
49260
+ typeof paramsOrFirst === 'object' &&
49261
+ !Array.isArray(paramsOrFirst)) {
49262
+ params = (paramsOrFirst || {});
49263
+ }
49264
+ else {
49265
+ params = {
49266
+ videoId: paramsOrFirst,
49267
+ };
49268
+ }
49269
+ const videoId = params.videoId;
49270
+ if (typeof videoId === 'undefined' || videoId === '') {
49271
+ throw new AppwriteException('Missing required parameter: "videoId"');
49272
+ }
49273
+ const apiPath = '/videos/{videoId}/outputs/cmaf/master.m3u8'.replace('{videoId}', encodeURIComponent(String(videoId)));
49274
+ const apiPayload = {};
49275
+ const uri = new URL(this.client.config.endpoint + apiPath);
49276
+ apiPayload['project'] = this.client.config.project;
49277
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
49278
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
49279
+ uri.searchParams.append(key, value);
49280
+ }
49281
+ return uri.toString();
49282
+ }
49283
+ getCmafDashManifest(paramsOrFirst) {
49284
+ let params;
49285
+ if (paramsOrFirst &&
49286
+ typeof paramsOrFirst === 'object' &&
49287
+ !Array.isArray(paramsOrFirst)) {
49288
+ params = (paramsOrFirst || {});
49289
+ }
49290
+ else {
49291
+ params = {
49292
+ videoId: paramsOrFirst,
49293
+ };
49294
+ }
49295
+ const videoId = params.videoId;
49296
+ if (typeof videoId === 'undefined' || videoId === '') {
49297
+ throw new AppwriteException('Missing required parameter: "videoId"');
49298
+ }
49299
+ const apiPath = '/videos/{videoId}/outputs/cmaf/master.mpd'.replace('{videoId}', encodeURIComponent(String(videoId)));
49300
+ const apiPayload = {};
49301
+ const uri = new URL(this.client.config.endpoint + apiPath);
49302
+ apiPayload['project'] = this.client.config.project;
49303
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
49304
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
49305
+ uri.searchParams.append(key, value);
49306
+ }
49307
+ return uri.toString();
49308
+ }
49309
+ getCmafStreamManifest(paramsOrFirst, ...rest) {
49310
+ let params;
49311
+ if (paramsOrFirst &&
49312
+ typeof paramsOrFirst === 'object' &&
49313
+ !Array.isArray(paramsOrFirst)) {
49314
+ params = (paramsOrFirst || {});
49315
+ }
49316
+ else {
49317
+ params = {
49318
+ videoId: paramsOrFirst,
49319
+ renditionId: rest[0],
49320
+ streamId: rest[1],
49321
+ };
49322
+ }
49323
+ const videoId = params.videoId;
49324
+ const renditionId = params.renditionId;
49325
+ const streamId = params.streamId;
49326
+ if (typeof videoId === 'undefined' || videoId === '') {
49327
+ throw new AppwriteException('Missing required parameter: "videoId"');
49328
+ }
49329
+ if (typeof renditionId === 'undefined' || renditionId === '') {
49330
+ throw new AppwriteException('Missing required parameter: "renditionId"');
49331
+ }
49332
+ if (typeof streamId === 'undefined') {
49333
+ throw new AppwriteException('Missing required parameter: "streamId"');
49334
+ }
49335
+ const apiPath = '/videos/{videoId}/outputs/cmaf/renditions/{renditionId}/streams/{streamId}/playlist.m3u8'
49336
+ .replace('{videoId}', encodeURIComponent(String(videoId)))
49337
+ .replace('{renditionId}', encodeURIComponent(String(renditionId)))
49338
+ .replace('{streamId}', encodeURIComponent(String(streamId)));
49339
+ const apiPayload = {};
49340
+ const uri = new URL(this.client.config.endpoint + apiPath);
49341
+ apiPayload['project'] = this.client.config.project;
49342
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
49343
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
49344
+ uri.searchParams.append(key, value);
49345
+ }
49346
+ return uri.toString();
49347
+ }
49348
+ getDashManifest(paramsOrFirst) {
49349
+ let params;
49350
+ if (paramsOrFirst &&
49351
+ typeof paramsOrFirst === 'object' &&
49352
+ !Array.isArray(paramsOrFirst)) {
49353
+ params = (paramsOrFirst || {});
49354
+ }
49355
+ else {
49356
+ params = {
49357
+ videoId: paramsOrFirst,
49358
+ };
49359
+ }
49360
+ const videoId = params.videoId;
49361
+ if (typeof videoId === 'undefined' || videoId === '') {
49362
+ throw new AppwriteException('Missing required parameter: "videoId"');
49363
+ }
49364
+ const apiPath = '/videos/{videoId}/outputs/dash/master.mpd'.replace('{videoId}', encodeURIComponent(String(videoId)));
49365
+ const apiPayload = {};
49366
+ const uri = new URL(this.client.config.endpoint + apiPath);
49367
+ apiPayload['project'] = this.client.config.project;
49368
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
49369
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
49370
+ uri.searchParams.append(key, value);
49371
+ }
49372
+ return uri.toString();
49373
+ }
49374
+ getHlsManifest(paramsOrFirst) {
49375
+ let params;
49376
+ if (paramsOrFirst &&
49377
+ typeof paramsOrFirst === 'object' &&
49378
+ !Array.isArray(paramsOrFirst)) {
49379
+ params = (paramsOrFirst || {});
49380
+ }
49381
+ else {
49382
+ params = {
49383
+ videoId: paramsOrFirst,
49384
+ };
49385
+ }
49386
+ const videoId = params.videoId;
49387
+ if (typeof videoId === 'undefined' || videoId === '') {
49388
+ throw new AppwriteException('Missing required parameter: "videoId"');
49389
+ }
49390
+ const apiPath = '/videos/{videoId}/outputs/hls/master.m3u8'.replace('{videoId}', encodeURIComponent(String(videoId)));
49391
+ const apiPayload = {};
49392
+ const uri = new URL(this.client.config.endpoint + apiPath);
49393
+ apiPayload['project'] = this.client.config.project;
49394
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
49395
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
49396
+ uri.searchParams.append(key, value);
49397
+ }
49398
+ return uri.toString();
49399
+ }
49400
+ getStreamManifest(paramsOrFirst, ...rest) {
49401
+ let params;
49402
+ if (paramsOrFirst &&
49403
+ typeof paramsOrFirst === 'object' &&
49404
+ !Array.isArray(paramsOrFirst)) {
49405
+ params = (paramsOrFirst || {});
49406
+ }
49407
+ else {
49408
+ params = {
49409
+ videoId: paramsOrFirst,
49410
+ renditionId: rest[0],
49411
+ streamId: rest[1],
49412
+ };
49413
+ }
49414
+ const videoId = params.videoId;
49415
+ const renditionId = params.renditionId;
49416
+ const streamId = params.streamId;
49417
+ if (typeof videoId === 'undefined' || videoId === '') {
49418
+ throw new AppwriteException('Missing required parameter: "videoId"');
49419
+ }
49420
+ if (typeof renditionId === 'undefined' || renditionId === '') {
49421
+ throw new AppwriteException('Missing required parameter: "renditionId"');
49422
+ }
49423
+ if (typeof streamId === 'undefined') {
49424
+ throw new AppwriteException('Missing required parameter: "streamId"');
49425
+ }
49426
+ const apiPath = '/videos/{videoId}/outputs/hls/renditions/{renditionId}/streams/{streamId}/playlist.m3u8'
49427
+ .replace('{videoId}', encodeURIComponent(String(videoId)))
49428
+ .replace('{renditionId}', encodeURIComponent(String(renditionId)))
49429
+ .replace('{streamId}', encodeURIComponent(String(streamId)));
49430
+ const apiPayload = {};
49431
+ const uri = new URL(this.client.config.endpoint + apiPath);
49432
+ apiPayload['project'] = this.client.config.project;
49433
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
49434
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
49435
+ uri.searchParams.append(key, value);
49436
+ }
49437
+ return uri.toString();
49438
+ }
49439
+ getSegment(paramsOrFirst, ...rest) {
49440
+ let params;
49441
+ if (paramsOrFirst &&
49442
+ typeof paramsOrFirst === 'object' &&
49443
+ !Array.isArray(paramsOrFirst)) {
49444
+ params = (paramsOrFirst || {});
49445
+ }
49446
+ else {
49447
+ params = {
49448
+ videoId: paramsOrFirst,
49449
+ output: rest[0],
49450
+ renditionId: rest[1],
49451
+ segmentId: rest[2],
49452
+ };
49453
+ }
49454
+ const videoId = params.videoId;
49455
+ const output = params.output;
49456
+ const renditionId = params.renditionId;
49457
+ const segmentId = params.segmentId;
49458
+ if (typeof videoId === 'undefined' || videoId === '') {
49459
+ throw new AppwriteException('Missing required parameter: "videoId"');
49460
+ }
49461
+ if (typeof output === 'undefined') {
49462
+ throw new AppwriteException('Missing required parameter: "output"');
49463
+ }
49464
+ if (typeof renditionId === 'undefined' || renditionId === '') {
49465
+ throw new AppwriteException('Missing required parameter: "renditionId"');
49466
+ }
49467
+ if (typeof segmentId === 'undefined' || segmentId === '') {
49468
+ throw new AppwriteException('Missing required parameter: "segmentId"');
49469
+ }
49470
+ const apiPath = '/videos/{videoId}/outputs/{output}/renditions/{renditionId}/segments/{segmentId}'
49471
+ .replace('{videoId}', encodeURIComponent(String(videoId)))
49472
+ .replace('{output}', encodeURIComponent(String(output)))
49473
+ .replace('{renditionId}', encodeURIComponent(String(renditionId)))
49474
+ .replace('{segmentId}', encodeURIComponent(String(segmentId)));
49475
+ const apiPayload = {};
49476
+ const uri = new URL(this.client.config.endpoint + apiPath);
49477
+ apiPayload['project'] = this.client.config.project;
49478
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
49479
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
49480
+ uri.searchParams.append(key, value);
49481
+ }
49482
+ return uri.toString();
49483
+ }
49484
+ getSubtitleManifest(paramsOrFirst, ...rest) {
49485
+ let params;
49486
+ if (paramsOrFirst &&
49487
+ typeof paramsOrFirst === 'object' &&
49488
+ !Array.isArray(paramsOrFirst)) {
49489
+ params = (paramsOrFirst || {});
49490
+ }
49491
+ else {
49492
+ params = {
49493
+ videoId: paramsOrFirst,
49494
+ output: rest[0],
49495
+ subtitleId: rest[1],
49496
+ };
49497
+ }
49498
+ const videoId = params.videoId;
49499
+ const output = params.output;
49500
+ const subtitleId = params.subtitleId;
49501
+ if (typeof videoId === 'undefined' || videoId === '') {
49502
+ throw new AppwriteException('Missing required parameter: "videoId"');
49503
+ }
49504
+ if (typeof output === 'undefined') {
49505
+ throw new AppwriteException('Missing required parameter: "output"');
49506
+ }
49507
+ if (typeof subtitleId === 'undefined' || subtitleId === '') {
49508
+ throw new AppwriteException('Missing required parameter: "subtitleId"');
49509
+ }
49510
+ const apiPath = '/videos/{videoId}/outputs/{output}/subtitles/{subtitleId}/manifest'
49511
+ .replace('{videoId}', encodeURIComponent(String(videoId)))
49512
+ .replace('{output}', encodeURIComponent(String(output)))
49513
+ .replace('{subtitleId}', encodeURIComponent(String(subtitleId)));
49514
+ const apiPayload = {};
49515
+ const uri = new URL(this.client.config.endpoint + apiPath);
49516
+ apiPayload['project'] = this.client.config.project;
49517
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
49518
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
49519
+ uri.searchParams.append(key, value);
49520
+ }
49521
+ return uri.toString();
49522
+ }
49523
+ getSubtitleSegment(paramsOrFirst, ...rest) {
49524
+ let params;
49525
+ if (paramsOrFirst &&
49526
+ typeof paramsOrFirst === 'object' &&
49527
+ !Array.isArray(paramsOrFirst)) {
49528
+ params = (paramsOrFirst || {});
49529
+ }
49530
+ else {
49531
+ params = {
49532
+ videoId: paramsOrFirst,
49533
+ output: rest[0],
49534
+ subtitleId: rest[1],
49535
+ segmentId: rest[2],
49536
+ };
49537
+ }
49538
+ const videoId = params.videoId;
49539
+ const output = params.output;
49540
+ const subtitleId = params.subtitleId;
49541
+ const segmentId = params.segmentId;
49542
+ if (typeof videoId === 'undefined' || videoId === '') {
49543
+ throw new AppwriteException('Missing required parameter: "videoId"');
49544
+ }
49545
+ if (typeof output === 'undefined') {
49546
+ throw new AppwriteException('Missing required parameter: "output"');
49547
+ }
49548
+ if (typeof subtitleId === 'undefined' || subtitleId === '') {
49549
+ throw new AppwriteException('Missing required parameter: "subtitleId"');
49550
+ }
49551
+ if (typeof segmentId === 'undefined' || segmentId === '') {
49552
+ throw new AppwriteException('Missing required parameter: "segmentId"');
49553
+ }
49554
+ const apiPath = '/videos/{videoId}/outputs/{output}/subtitles/{subtitleId}/segments/{segmentId}'
49555
+ .replace('{videoId}', encodeURIComponent(String(videoId)))
49556
+ .replace('{output}', encodeURIComponent(String(output)))
49557
+ .replace('{subtitleId}', encodeURIComponent(String(subtitleId)))
49558
+ .replace('{segmentId}', encodeURIComponent(String(segmentId)));
49559
+ const apiPayload = {};
49560
+ const uri = new URL(this.client.config.endpoint + apiPath);
49561
+ apiPayload['project'] = this.client.config.project;
49562
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
49563
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
49564
+ uri.searchParams.append(key, value);
49565
+ }
49566
+ return uri.toString();
49567
+ }
49568
+ getPreview(paramsOrFirst, ...rest) {
49569
+ let params;
49570
+ if (paramsOrFirst &&
49571
+ typeof paramsOrFirst === 'object' &&
49572
+ !Array.isArray(paramsOrFirst)) {
49573
+ params = (paramsOrFirst || {});
49574
+ }
49575
+ else {
49576
+ params = {
49577
+ videoId: paramsOrFirst,
49578
+ previewId: rest[0],
49579
+ width: rest[1],
49580
+ height: rest[2],
49581
+ output: rest[3],
49582
+ };
49583
+ }
49584
+ const videoId = params.videoId;
49585
+ const previewId = params.previewId;
49586
+ const width = params.width;
49587
+ const height = params.height;
49588
+ const output = params.output;
49589
+ if (typeof videoId === 'undefined' || videoId === '') {
49590
+ throw new AppwriteException('Missing required parameter: "videoId"');
49591
+ }
49592
+ if (typeof previewId === 'undefined' || previewId === '') {
49593
+ throw new AppwriteException('Missing required parameter: "previewId"');
49594
+ }
49595
+ const apiPath = '/videos/{videoId}/previews/{previewId}'
49596
+ .replace('{videoId}', encodeURIComponent(String(videoId)))
49597
+ .replace('{previewId}', encodeURIComponent(String(previewId)));
49598
+ const apiPayload = {};
49599
+ if (typeof width !== 'undefined') {
49600
+ apiPayload['width'] = width;
49601
+ }
49602
+ if (typeof height !== 'undefined') {
49603
+ apiPayload['height'] = height;
49604
+ }
49605
+ if (typeof output !== 'undefined') {
49606
+ apiPayload['output'] = output;
49607
+ }
49608
+ const uri = new URL(this.client.config.endpoint + apiPath);
49609
+ apiPayload['project'] = this.client.config.project;
49610
+ apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
49611
+ for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
49612
+ uri.searchParams.append(key, value);
49613
+ }
49614
+ return uri.toString();
49615
+ }
49616
+ listRenditions(paramsOrFirst, ...rest) {
49617
+ let params;
49618
+ if (paramsOrFirst &&
49619
+ typeof paramsOrFirst === 'object' &&
49620
+ !Array.isArray(paramsOrFirst)) {
49621
+ params = (paramsOrFirst || {});
49622
+ }
49623
+ else {
49624
+ params = {
49625
+ videoId: paramsOrFirst,
49626
+ output: rest[0],
49627
+ status: rest[1],
49628
+ };
49629
+ }
49630
+ const videoId = params.videoId;
49631
+ const output = params.output;
49632
+ const status = params.status;
49633
+ if (typeof videoId === 'undefined' || videoId === '') {
49634
+ throw new AppwriteException('Missing required parameter: "videoId"');
49635
+ }
49636
+ const apiPath = '/videos/{videoId}/renditions'.replace('{videoId}', encodeURIComponent(String(videoId)));
49637
+ const apiPayload = {};
49638
+ if (typeof output !== 'undefined') {
49639
+ apiPayload['output'] = output;
49640
+ }
49641
+ if (typeof status !== 'undefined') {
49642
+ apiPayload['status'] = status;
49643
+ }
49644
+ const uri = new URL(this.client.config.endpoint + apiPath);
49645
+ const apiHeaders = {
49646
+ 'X-Appwrite-Project': this.client.config.project,
49647
+ accept: 'application/json',
49648
+ };
49649
+ return this.client.call('get', uri, apiHeaders, apiPayload);
49650
+ }
49651
+ createRendition(paramsOrFirst, ...rest) {
49652
+ let params;
49653
+ if (paramsOrFirst &&
49654
+ typeof paramsOrFirst === 'object' &&
49655
+ !Array.isArray(paramsOrFirst)) {
49656
+ params = (paramsOrFirst || {});
49657
+ }
49658
+ else {
49659
+ params = {
49660
+ videoId: paramsOrFirst,
49661
+ profileId: rest[0],
49662
+ output: rest[1],
49663
+ };
49664
+ }
49665
+ const videoId = params.videoId;
49666
+ const profileId = params.profileId;
49667
+ const output = params.output;
49668
+ if (typeof videoId === 'undefined' || videoId === '') {
49669
+ throw new AppwriteException('Missing required parameter: "videoId"');
49670
+ }
49671
+ if (typeof profileId === 'undefined') {
49672
+ throw new AppwriteException('Missing required parameter: "profileId"');
49673
+ }
49674
+ if (typeof output === 'undefined') {
49675
+ throw new AppwriteException('Missing required parameter: "output"');
49676
+ }
49677
+ const apiPath = '/videos/{videoId}/renditions'.replace('{videoId}', encodeURIComponent(String(videoId)));
49678
+ const apiPayload = {};
49679
+ if (typeof profileId !== 'undefined') {
49680
+ apiPayload['profileId'] = profileId;
49681
+ }
49682
+ if (typeof output !== 'undefined') {
49683
+ apiPayload['output'] = output;
49684
+ }
49685
+ const uri = new URL(this.client.config.endpoint + apiPath);
49686
+ const apiHeaders = {
49687
+ 'X-Appwrite-Project': this.client.config.project,
49688
+ 'content-type': 'application/json',
49689
+ accept: 'application/json',
49690
+ };
49691
+ return this.client.call('post', uri, apiHeaders, apiPayload);
49692
+ }
49693
+ getRendition(paramsOrFirst, ...rest) {
49694
+ let params;
49695
+ if (paramsOrFirst &&
49696
+ typeof paramsOrFirst === 'object' &&
49697
+ !Array.isArray(paramsOrFirst)) {
49698
+ params = (paramsOrFirst || {});
49699
+ }
49700
+ else {
49701
+ params = {
49702
+ videoId: paramsOrFirst,
49703
+ renditionId: rest[0],
49704
+ };
49705
+ }
49706
+ const videoId = params.videoId;
49707
+ const renditionId = params.renditionId;
49708
+ if (typeof videoId === 'undefined' || videoId === '') {
49709
+ throw new AppwriteException('Missing required parameter: "videoId"');
49710
+ }
49711
+ if (typeof renditionId === 'undefined' || renditionId === '') {
49712
+ throw new AppwriteException('Missing required parameter: "renditionId"');
49713
+ }
49714
+ const apiPath = '/videos/{videoId}/renditions/{renditionId}'
49715
+ .replace('{videoId}', encodeURIComponent(String(videoId)))
49716
+ .replace('{renditionId}', encodeURIComponent(String(renditionId)));
49717
+ const apiPayload = {};
49718
+ const uri = new URL(this.client.config.endpoint + apiPath);
49719
+ const apiHeaders = {
49720
+ 'X-Appwrite-Project': this.client.config.project,
49721
+ accept: 'application/json',
49722
+ };
49723
+ return this.client.call('get', uri, apiHeaders, apiPayload);
49724
+ }
49725
+ deleteRendition(paramsOrFirst, ...rest) {
49726
+ let params;
49727
+ if (paramsOrFirst &&
49728
+ typeof paramsOrFirst === 'object' &&
49729
+ !Array.isArray(paramsOrFirst)) {
49730
+ params = (paramsOrFirst || {});
49731
+ }
49732
+ else {
49733
+ params = {
49734
+ videoId: paramsOrFirst,
49735
+ renditionId: rest[0],
49736
+ };
49737
+ }
49738
+ const videoId = params.videoId;
49739
+ const renditionId = params.renditionId;
49740
+ if (typeof videoId === 'undefined' || videoId === '') {
49741
+ throw new AppwriteException('Missing required parameter: "videoId"');
49742
+ }
49743
+ if (typeof renditionId === 'undefined' || renditionId === '') {
49744
+ throw new AppwriteException('Missing required parameter: "renditionId"');
49745
+ }
49746
+ const apiPath = '/videos/{videoId}/renditions/{renditionId}'
49747
+ .replace('{videoId}', encodeURIComponent(String(videoId)))
49748
+ .replace('{renditionId}', encodeURIComponent(String(renditionId)));
49749
+ const apiPayload = {};
49750
+ const uri = new URL(this.client.config.endpoint + apiPath);
49751
+ const apiHeaders = {
49752
+ 'X-Appwrite-Project': this.client.config.project,
49753
+ 'content-type': 'application/json',
49754
+ accept: 'application/json',
49755
+ };
49756
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
49757
+ }
49758
+ createSource(paramsOrFirst) {
49759
+ let params;
49760
+ if (paramsOrFirst &&
49761
+ typeof paramsOrFirst === 'object' &&
49762
+ !Array.isArray(paramsOrFirst)) {
49763
+ params = (paramsOrFirst || {});
49764
+ }
49765
+ else {
49766
+ params = {
49767
+ videoId: paramsOrFirst,
49768
+ };
49769
+ }
49770
+ const videoId = params.videoId;
49771
+ if (typeof videoId === 'undefined' || videoId === '') {
49772
+ throw new AppwriteException('Missing required parameter: "videoId"');
49773
+ }
49774
+ const apiPath = '/videos/{videoId}/source'.replace('{videoId}', encodeURIComponent(String(videoId)));
49775
+ const apiPayload = {};
49776
+ const uri = new URL(this.client.config.endpoint + apiPath);
49777
+ const apiHeaders = {
49778
+ 'X-Appwrite-Project': this.client.config.project,
49779
+ 'content-type': 'application/json',
49780
+ accept: 'application/json',
49781
+ };
49782
+ return this.client.call('post', uri, apiHeaders, apiPayload);
49783
+ }
49784
+ listSubtitles(paramsOrFirst) {
49785
+ let params;
49786
+ if (paramsOrFirst &&
49787
+ typeof paramsOrFirst === 'object' &&
49788
+ !Array.isArray(paramsOrFirst)) {
49789
+ params = (paramsOrFirst || {});
49790
+ }
49791
+ else {
49792
+ params = {
49793
+ videoId: paramsOrFirst,
49794
+ };
49795
+ }
49796
+ const videoId = params.videoId;
49797
+ if (typeof videoId === 'undefined' || videoId === '') {
49798
+ throw new AppwriteException('Missing required parameter: "videoId"');
49799
+ }
49800
+ const apiPath = '/videos/{videoId}/subtitles'.replace('{videoId}', encodeURIComponent(String(videoId)));
49801
+ const apiPayload = {};
49802
+ const uri = new URL(this.client.config.endpoint + apiPath);
49803
+ const apiHeaders = {
49804
+ 'X-Appwrite-Project': this.client.config.project,
49805
+ accept: 'application/json',
49806
+ };
49807
+ return this.client.call('get', uri, apiHeaders, apiPayload);
49808
+ }
49809
+ createSubtitle(paramsOrFirst, ...rest) {
49810
+ let params;
49811
+ if (paramsOrFirst &&
49812
+ typeof paramsOrFirst === 'object' &&
49813
+ !Array.isArray(paramsOrFirst)) {
49814
+ params = (paramsOrFirst || {});
49815
+ }
49816
+ else {
49817
+ params = {
49818
+ videoId: paramsOrFirst,
49819
+ bucketId: rest[0],
49820
+ fileId: rest[1],
49821
+ name: rest[2],
49822
+ code: rest[3],
49823
+ xdefault: rest[4],
49824
+ };
49825
+ }
49826
+ const videoId = params.videoId;
49827
+ const bucketId = params.bucketId;
49828
+ const fileId = params.fileId;
49829
+ const name = params.name;
49830
+ const code = params.code;
49831
+ const xdefault = params.xdefault;
49832
+ if (typeof videoId === 'undefined' || videoId === '') {
49833
+ throw new AppwriteException('Missing required parameter: "videoId"');
49834
+ }
49835
+ if (typeof bucketId === 'undefined') {
49836
+ throw new AppwriteException('Missing required parameter: "bucketId"');
49837
+ }
49838
+ if (typeof fileId === 'undefined') {
49839
+ throw new AppwriteException('Missing required parameter: "fileId"');
49840
+ }
49841
+ if (typeof name === 'undefined') {
49842
+ throw new AppwriteException('Missing required parameter: "name"');
49843
+ }
49844
+ if (typeof code === 'undefined') {
49845
+ throw new AppwriteException('Missing required parameter: "code"');
49846
+ }
49847
+ const apiPath = '/videos/{videoId}/subtitles'.replace('{videoId}', encodeURIComponent(String(videoId)));
49848
+ const apiPayload = {};
49849
+ if (typeof bucketId !== 'undefined') {
49850
+ apiPayload['bucketId'] = bucketId;
49851
+ }
49852
+ if (typeof fileId !== 'undefined') {
49853
+ apiPayload['fileId'] = fileId;
49854
+ }
49855
+ if (typeof name !== 'undefined') {
49856
+ apiPayload['name'] = name;
49857
+ }
49858
+ if (typeof code !== 'undefined') {
49859
+ apiPayload['code'] = code;
49860
+ }
49861
+ if (typeof xdefault !== 'undefined') {
49862
+ apiPayload['default'] = xdefault;
49863
+ }
49864
+ const uri = new URL(this.client.config.endpoint + apiPath);
49865
+ const apiHeaders = {
49866
+ 'X-Appwrite-Project': this.client.config.project,
49867
+ 'content-type': 'application/json',
49868
+ accept: 'application/json',
49869
+ };
49870
+ return this.client.call('post', uri, apiHeaders, apiPayload);
49871
+ }
49872
+ updateSubtitle(paramsOrFirst, ...rest) {
49873
+ let params;
49874
+ if (paramsOrFirst &&
49875
+ typeof paramsOrFirst === 'object' &&
49876
+ !Array.isArray(paramsOrFirst)) {
49877
+ params = (paramsOrFirst || {});
49878
+ }
49879
+ else {
49880
+ params = {
49881
+ videoId: paramsOrFirst,
49882
+ subtitleId: rest[0],
49883
+ bucketId: rest[1],
49884
+ fileId: rest[2],
49885
+ name: rest[3],
49886
+ code: rest[4],
49887
+ xdefault: rest[5],
49888
+ };
49889
+ }
49890
+ const videoId = params.videoId;
49891
+ const subtitleId = params.subtitleId;
49892
+ const bucketId = params.bucketId;
49893
+ const fileId = params.fileId;
49894
+ const name = params.name;
49895
+ const code = params.code;
49896
+ const xdefault = params.xdefault;
49897
+ if (typeof videoId === 'undefined' || videoId === '') {
49898
+ throw new AppwriteException('Missing required parameter: "videoId"');
49899
+ }
49900
+ if (typeof subtitleId === 'undefined' || subtitleId === '') {
49901
+ throw new AppwriteException('Missing required parameter: "subtitleId"');
49902
+ }
49903
+ const apiPath = '/videos/{videoId}/subtitles/{subtitleId}'
49904
+ .replace('{videoId}', encodeURIComponent(String(videoId)))
49905
+ .replace('{subtitleId}', encodeURIComponent(String(subtitleId)));
49906
+ const apiPayload = {};
49907
+ if (typeof bucketId !== 'undefined') {
49908
+ apiPayload['bucketId'] = bucketId;
49909
+ }
49910
+ if (typeof fileId !== 'undefined') {
49911
+ apiPayload['fileId'] = fileId;
49912
+ }
49913
+ if (typeof name !== 'undefined') {
49914
+ apiPayload['name'] = name;
49915
+ }
49916
+ if (typeof code !== 'undefined') {
49917
+ apiPayload['code'] = code;
49918
+ }
49919
+ if (typeof xdefault !== 'undefined') {
49920
+ apiPayload['default'] = xdefault;
49921
+ }
49922
+ const uri = new URL(this.client.config.endpoint + apiPath);
49923
+ const apiHeaders = {
49924
+ 'X-Appwrite-Project': this.client.config.project,
49925
+ 'content-type': 'application/json',
49926
+ accept: 'application/json',
49927
+ };
49928
+ return this.client.call('patch', uri, apiHeaders, apiPayload);
49929
+ }
49930
+ deleteSubtitle(paramsOrFirst, ...rest) {
49931
+ let params;
49932
+ if (paramsOrFirst &&
49933
+ typeof paramsOrFirst === 'object' &&
49934
+ !Array.isArray(paramsOrFirst)) {
49935
+ params = (paramsOrFirst || {});
49936
+ }
49937
+ else {
49938
+ params = {
49939
+ videoId: paramsOrFirst,
49940
+ subtitleId: rest[0],
49941
+ };
49942
+ }
49943
+ const videoId = params.videoId;
49944
+ const subtitleId = params.subtitleId;
49945
+ if (typeof videoId === 'undefined' || videoId === '') {
49946
+ throw new AppwriteException('Missing required parameter: "videoId"');
49947
+ }
49948
+ if (typeof subtitleId === 'undefined' || subtitleId === '') {
49949
+ throw new AppwriteException('Missing required parameter: "subtitleId"');
49950
+ }
49951
+ const apiPath = '/videos/{videoId}/subtitles/{subtitleId}'
49952
+ .replace('{videoId}', encodeURIComponent(String(videoId)))
49953
+ .replace('{subtitleId}', encodeURIComponent(String(subtitleId)));
49954
+ const apiPayload = {};
49955
+ const uri = new URL(this.client.config.endpoint + apiPath);
49956
+ const apiHeaders = {
49957
+ 'X-Appwrite-Project': this.client.config.project,
49958
+ 'content-type': 'application/json',
49959
+ accept: 'application/json',
49960
+ };
49961
+ return this.client.call('delete', uri, apiHeaders, apiPayload);
49962
+ }
49963
+ getTimeline(paramsOrFirst) {
49964
+ let params;
49965
+ if (paramsOrFirst &&
49966
+ typeof paramsOrFirst === 'object' &&
49967
+ !Array.isArray(paramsOrFirst)) {
49968
+ params = (paramsOrFirst || {});
49969
+ }
49970
+ else {
49971
+ params = {
49972
+ videoId: paramsOrFirst,
49973
+ };
49974
+ }
49975
+ const videoId = params.videoId;
49976
+ if (typeof videoId === 'undefined' || videoId === '') {
49977
+ throw new AppwriteException('Missing required parameter: "videoId"');
49978
+ }
49979
+ const apiPath = '/videos/{videoId}/timeline'.replace('{videoId}', encodeURIComponent(String(videoId)));
49980
+ const apiPayload = {};
49981
+ const uri = new URL(this.client.config.endpoint + apiPath);
49982
+ const apiHeaders = {
49983
+ 'X-Appwrite-Project': this.client.config.project,
49984
+ accept: 'text/plain',
49985
+ };
49986
+ return this.client.call('get', uri, apiHeaders, apiPayload, 'text');
49987
+ }
49988
+ createTimeline(paramsOrFirst) {
49989
+ let params;
49990
+ if (paramsOrFirst &&
49991
+ typeof paramsOrFirst === 'object' &&
49992
+ !Array.isArray(paramsOrFirst)) {
49993
+ params = (paramsOrFirst || {});
49994
+ }
49995
+ else {
49996
+ params = {
49997
+ videoId: paramsOrFirst,
49998
+ };
49999
+ }
50000
+ const videoId = params.videoId;
50001
+ if (typeof videoId === 'undefined' || videoId === '') {
50002
+ throw new AppwriteException('Missing required parameter: "videoId"');
50003
+ }
50004
+ const apiPath = '/videos/{videoId}/timeline'.replace('{videoId}', encodeURIComponent(String(videoId)));
50005
+ const apiPayload = {};
50006
+ const uri = new URL(this.client.config.endpoint + apiPath);
50007
+ const apiHeaders = {
50008
+ 'X-Appwrite-Project': this.client.config.project,
50009
+ 'content-type': 'application/json',
50010
+ accept: 'application/json',
50011
+ };
50012
+ return this.client.call('post', uri, apiHeaders, apiPayload);
50013
+ }
50014
+ }
50015
+
48381
50016
  class Waf {
48382
50017
  constructor(client) {
48383
50018
  this.client = client;
@@ -52281,6 +53916,34 @@
52281
53916
  OAuthProvider["Zoom"] = "zoom";
52282
53917
  })(exports.OAuthProvider || (exports.OAuthProvider = {}));
52283
53918
 
53919
+ exports.PlatformResourceType = void 0;
53920
+ (function (PlatformResourceType) {
53921
+ PlatformResourceType["Projects"] = "projects";
53922
+ PlatformResourceType["Organizations"] = "organizations";
53923
+ PlatformResourceType["Users"] = "users";
53924
+ PlatformResourceType["Memberships"] = "memberships";
53925
+ PlatformResourceType["Rules"] = "rules";
53926
+ PlatformResourceType["Keys"] = "keys";
53927
+ PlatformResourceType["Platforms"] = "platforms";
53928
+ PlatformResourceType["Webhooks"] = "webhooks";
53929
+ PlatformResourceType["Certificates"] = "certificates";
53930
+ })(exports.PlatformResourceType || (exports.PlatformResourceType = {}));
53931
+
53932
+ exports.ProjectResourceType = void 0;
53933
+ (function (ProjectResourceType) {
53934
+ ProjectResourceType["Users"] = "users";
53935
+ ProjectResourceType["Teams"] = "teams";
53936
+ ProjectResourceType["Memberships"] = "memberships";
53937
+ ProjectResourceType["Databases"] = "databases";
53938
+ ProjectResourceType["Buckets"] = "buckets";
53939
+ ProjectResourceType["Functions"] = "functions";
53940
+ ProjectResourceType["Sites"] = "sites";
53941
+ ProjectResourceType["Deployments"] = "deployments";
53942
+ ProjectResourceType["Topics"] = "topics";
53943
+ ProjectResourceType["Providers"] = "providers";
53944
+ ProjectResourceType["Messages"] = "messages";
53945
+ })(exports.ProjectResourceType || (exports.ProjectResourceType = {}));
53946
+
52284
53947
  exports.AnalyticsInterval = void 0;
52285
53948
  (function (AnalyticsInterval) {
52286
53949
  AnalyticsInterval["OneHour"] = "1h";
@@ -53130,6 +54793,13 @@
53130
54793
  QuerySuggestionResource["ResourceTokens"] = "resourcetokens";
53131
54794
  QuerySuggestionResource["Transactions"] = "transactions";
53132
54795
  QuerySuggestionResource["TransactionLogs"] = "transactionlogs";
54796
+ QuerySuggestionResource["Videos"] = "videos";
54797
+ QuerySuggestionResource["VideosPreviews"] = "videos_previews";
54798
+ QuerySuggestionResource["VideosRenditions"] = "videos_renditions";
54799
+ QuerySuggestionResource["VideosRenditionsSegments"] = "videos_renditions_segments";
54800
+ QuerySuggestionResource["VideosProfiles"] = "videos_profiles";
54801
+ QuerySuggestionResource["VideosSubtitles"] = "videos_subtitles";
54802
+ QuerySuggestionResource["VideosSubtitlesSegments"] = "videos_subtitles_segments";
53133
54803
  QuerySuggestionResource["AnalyticsProperties"] = "analyticsproperties";
53134
54804
  QuerySuggestionResource["DedicatedDatabases"] = "dedicateddatabases";
53135
54805
  QuerySuggestionResource["DedicatedDatabaseConfigs"] = "dedicateddatabaseconfigs";
@@ -53553,6 +55223,8 @@
53553
55223
  ProjectKeyScopes["ReportsWrite"] = "reports.write";
53554
55224
  ProjectKeyScopes["PresencesRead"] = "presences.read";
53555
55225
  ProjectKeyScopes["PresencesWrite"] = "presences.write";
55226
+ ProjectKeyScopes["VideosRead"] = "videos.read";
55227
+ ProjectKeyScopes["VideosWrite"] = "videos.write";
53556
55228
  ProjectKeyScopes["DedicatedDatabasesExecute"] = "dedicatedDatabases.execute";
53557
55229
  ProjectKeyScopes["BackupsPoliciesRead"] = "backups.policies.read";
53558
55230
  ProjectKeyScopes["BackupsPoliciesWrite"] = "backups.policies.write";
@@ -53822,6 +55494,7 @@
53822
55494
  ProjectAuthMethodId["Invites"] = "invites";
53823
55495
  ProjectAuthMethodId["Jwt"] = "jwt";
53824
55496
  ProjectAuthMethodId["Phone"] = "phone";
55497
+ ProjectAuthMethodId["Passkey"] = "passkey";
53825
55498
  })(exports.ProjectAuthMethodId || (exports.ProjectAuthMethodId = {}));
53826
55499
 
53827
55500
  exports.ProjectOAuth2Auth0Prompt = void 0;
@@ -53963,6 +55636,7 @@
53963
55636
  ProjectPolicyId["Denydisposableemail"] = "deny-disposable-email";
53964
55637
  ProjectPolicyId["Denyfreeemail"] = "deny-free-email";
53965
55638
  ProjectPolicyId["Denycorporateemail"] = "deny-corporate-email";
55639
+ ProjectPolicyId["Passkey"] = "passkey";
53966
55640
  })(exports.ProjectPolicyId || (exports.ProjectPolicyId = {}));
53967
55641
 
53968
55642
  exports.ProjectProtocolId = void 0;
@@ -54425,6 +56099,24 @@
54425
56099
  VectorsDBIndexType["Unique"] = "unique";
54426
56100
  })(exports.VectorsDBIndexType || (exports.VectorsDBIndexType = {}));
54427
56101
 
56102
+ exports.VideoOutput = void 0;
56103
+ (function (VideoOutput) {
56104
+ VideoOutput["Hls"] = "hls";
56105
+ VideoOutput["Dash"] = "dash";
56106
+ VideoOutput["Cmaf"] = "cmaf";
56107
+ })(exports.VideoOutput || (exports.VideoOutput = {}));
56108
+
56109
+ exports.VideoRenditionStatus = void 0;
56110
+ (function (VideoRenditionStatus) {
56111
+ VideoRenditionStatus["Pending"] = "pending";
56112
+ VideoRenditionStatus["Started"] = "started";
56113
+ VideoRenditionStatus["Ended"] = "ended";
56114
+ VideoRenditionStatus["Uploading"] = "uploading";
56115
+ VideoRenditionStatus["Ready"] = "ready";
56116
+ VideoRenditionStatus["Error"] = "error";
56117
+ VideoRenditionStatus["Aborted"] = "aborted";
56118
+ })(exports.VideoRenditionStatus || (exports.VideoRenditionStatus = {}));
56119
+
54428
56120
  exports.DatabaseType = void 0;
54429
56121
  (function (DatabaseType) {
54430
56122
  DatabaseType["Legacy"] = "legacy";
@@ -56683,6 +58375,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
56683
58375
 
56684
58376
  exports.Account = Account;
56685
58377
  exports.Activities = Activities;
58378
+ exports.Admin = Admin;
56686
58379
  exports.Advisor = Advisor;
56687
58380
  exports.Affiliates = Affiliates;
56688
58381
  exports.Analytics = Analytics;
@@ -56735,6 +58428,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
56735
58428
  exports.Users = Users;
56736
58429
  exports.Vcs = Vcs;
56737
58430
  exports.VectorsDB = VectorsDB;
58431
+ exports.Videos = Videos;
56738
58432
  exports.Waf = Waf;
56739
58433
  exports.Webhooks = Webhooks;
56740
58434