@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/README.md +1 -1
- package/dist/cjs/sdk.js +1695 -1
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1694 -2
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +1695 -1
- package/package.json +1 -1
- package/types/enums/platform-resource-type.d.ts +11 -0
- package/types/enums/project-auth-method-id.d.ts +2 -1
- package/types/enums/project-key-scopes.d.ts +2 -0
- package/types/enums/project-policy-id.d.ts +2 -1
- package/types/enums/project-resource-type.d.ts +13 -0
- package/types/enums/query-suggestion-resource.d.ts +7 -0
- package/types/enums/video-output.d.ts +5 -0
- package/types/enums/video-rendition-status.d.ts +9 -0
- package/types/index.d.ts +6 -0
- package/types/models.d.ts +450 -42
- package/types/services/account.d.ts +158 -0
- package/types/services/admin.d.ts +80 -0
- package/types/services/project.d.ts +30 -8
- package/types/services/users.d.ts +69 -0
- package/types/services/videos.d.ts +860 -0
package/dist/esm/sdk.js
CHANGED
|
@@ -667,7 +667,7 @@ class Client {
|
|
|
667
667
|
'x-sdk-name': 'Console',
|
|
668
668
|
'x-sdk-platform': 'console',
|
|
669
669
|
'x-sdk-language': 'web',
|
|
670
|
-
'x-sdk-version': '18.3.0-rc.
|
|
670
|
+
'x-sdk-version': '18.3.0-rc.2',
|
|
671
671
|
'X-Appwrite-Response-Format': '2.3.0',
|
|
672
672
|
};
|
|
673
673
|
this.realtime = {
|
|
@@ -2838,6 +2838,196 @@ class Account {
|
|
|
2838
2838
|
};
|
|
2839
2839
|
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
2840
2840
|
}
|
|
2841
|
+
listPasskeys(paramsOrFirst, ...rest) {
|
|
2842
|
+
let params;
|
|
2843
|
+
if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
|
|
2844
|
+
(paramsOrFirst &&
|
|
2845
|
+
typeof paramsOrFirst === 'object' &&
|
|
2846
|
+
!Array.isArray(paramsOrFirst))) {
|
|
2847
|
+
params = (paramsOrFirst || {});
|
|
2848
|
+
}
|
|
2849
|
+
else {
|
|
2850
|
+
params = {
|
|
2851
|
+
queries: paramsOrFirst,
|
|
2852
|
+
total: rest[0],
|
|
2853
|
+
};
|
|
2854
|
+
}
|
|
2855
|
+
const queries = params.queries;
|
|
2856
|
+
const total = params.total;
|
|
2857
|
+
const apiPath = '/account/passkeys';
|
|
2858
|
+
const apiPayload = {};
|
|
2859
|
+
if (typeof queries !== 'undefined') {
|
|
2860
|
+
apiPayload['queries'] = queries;
|
|
2861
|
+
}
|
|
2862
|
+
if (typeof total !== 'undefined') {
|
|
2863
|
+
apiPayload['total'] = total;
|
|
2864
|
+
}
|
|
2865
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2866
|
+
const apiHeaders = {
|
|
2867
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
2868
|
+
accept: 'application/json',
|
|
2869
|
+
};
|
|
2870
|
+
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
2871
|
+
}
|
|
2872
|
+
createPasskey(paramsOrFirst, ...rest) {
|
|
2873
|
+
let params;
|
|
2874
|
+
if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
|
|
2875
|
+
(paramsOrFirst &&
|
|
2876
|
+
typeof paramsOrFirst === 'object' &&
|
|
2877
|
+
!Array.isArray(paramsOrFirst))) {
|
|
2878
|
+
params = (paramsOrFirst || {});
|
|
2879
|
+
}
|
|
2880
|
+
else {
|
|
2881
|
+
params = {
|
|
2882
|
+
passkeyId: paramsOrFirst,
|
|
2883
|
+
name: rest[0],
|
|
2884
|
+
};
|
|
2885
|
+
}
|
|
2886
|
+
const passkeyId = params.passkeyId;
|
|
2887
|
+
const name = params.name;
|
|
2888
|
+
const apiPath = '/account/passkeys';
|
|
2889
|
+
const apiPayload = {};
|
|
2890
|
+
if (typeof passkeyId !== 'undefined') {
|
|
2891
|
+
apiPayload['passkeyId'] = passkeyId;
|
|
2892
|
+
}
|
|
2893
|
+
if (typeof name !== 'undefined') {
|
|
2894
|
+
apiPayload['name'] = name;
|
|
2895
|
+
}
|
|
2896
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2897
|
+
const apiHeaders = {
|
|
2898
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
2899
|
+
'content-type': 'application/json',
|
|
2900
|
+
accept: 'application/json',
|
|
2901
|
+
};
|
|
2902
|
+
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
2903
|
+
}
|
|
2904
|
+
getPasskey(paramsOrFirst) {
|
|
2905
|
+
let params;
|
|
2906
|
+
if (paramsOrFirst &&
|
|
2907
|
+
typeof paramsOrFirst === 'object' &&
|
|
2908
|
+
!Array.isArray(paramsOrFirst)) {
|
|
2909
|
+
params = (paramsOrFirst || {});
|
|
2910
|
+
}
|
|
2911
|
+
else {
|
|
2912
|
+
params = {
|
|
2913
|
+
passkeyId: paramsOrFirst,
|
|
2914
|
+
};
|
|
2915
|
+
}
|
|
2916
|
+
const passkeyId = params.passkeyId;
|
|
2917
|
+
if (typeof passkeyId === 'undefined' || passkeyId === '') {
|
|
2918
|
+
throw new AppwriteException('Missing required parameter: "passkeyId"');
|
|
2919
|
+
}
|
|
2920
|
+
const apiPath = '/account/passkeys/{passkeyId}'.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
|
|
2921
|
+
const apiPayload = {};
|
|
2922
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2923
|
+
const apiHeaders = {
|
|
2924
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
2925
|
+
accept: 'application/json',
|
|
2926
|
+
};
|
|
2927
|
+
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
2928
|
+
}
|
|
2929
|
+
updatePasskey(paramsOrFirst, ...rest) {
|
|
2930
|
+
let params;
|
|
2931
|
+
if (paramsOrFirst &&
|
|
2932
|
+
typeof paramsOrFirst === 'object' &&
|
|
2933
|
+
!Array.isArray(paramsOrFirst)) {
|
|
2934
|
+
params = (paramsOrFirst || {});
|
|
2935
|
+
}
|
|
2936
|
+
else {
|
|
2937
|
+
params = {
|
|
2938
|
+
passkeyId: paramsOrFirst,
|
|
2939
|
+
name: rest[0],
|
|
2940
|
+
};
|
|
2941
|
+
}
|
|
2942
|
+
const passkeyId = params.passkeyId;
|
|
2943
|
+
const name = params.name;
|
|
2944
|
+
if (typeof passkeyId === 'undefined' || passkeyId === '') {
|
|
2945
|
+
throw new AppwriteException('Missing required parameter: "passkeyId"');
|
|
2946
|
+
}
|
|
2947
|
+
if (typeof name === 'undefined') {
|
|
2948
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
2949
|
+
}
|
|
2950
|
+
const apiPath = '/account/passkeys/{passkeyId}'.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
|
|
2951
|
+
const apiPayload = {};
|
|
2952
|
+
if (typeof name !== 'undefined') {
|
|
2953
|
+
apiPayload['name'] = name;
|
|
2954
|
+
}
|
|
2955
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2956
|
+
const apiHeaders = {
|
|
2957
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
2958
|
+
'content-type': 'application/json',
|
|
2959
|
+
accept: 'application/json',
|
|
2960
|
+
};
|
|
2961
|
+
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
2962
|
+
}
|
|
2963
|
+
deletePasskey(paramsOrFirst) {
|
|
2964
|
+
let params;
|
|
2965
|
+
if (paramsOrFirst &&
|
|
2966
|
+
typeof paramsOrFirst === 'object' &&
|
|
2967
|
+
!Array.isArray(paramsOrFirst)) {
|
|
2968
|
+
params = (paramsOrFirst || {});
|
|
2969
|
+
}
|
|
2970
|
+
else {
|
|
2971
|
+
params = {
|
|
2972
|
+
passkeyId: paramsOrFirst,
|
|
2973
|
+
};
|
|
2974
|
+
}
|
|
2975
|
+
const passkeyId = params.passkeyId;
|
|
2976
|
+
if (typeof passkeyId === 'undefined' || passkeyId === '') {
|
|
2977
|
+
throw new AppwriteException('Missing required parameter: "passkeyId"');
|
|
2978
|
+
}
|
|
2979
|
+
const apiPath = '/account/passkeys/{passkeyId}'.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
|
|
2980
|
+
const apiPayload = {};
|
|
2981
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2982
|
+
const apiHeaders = {
|
|
2983
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
2984
|
+
'content-type': 'application/json',
|
|
2985
|
+
accept: 'application/json',
|
|
2986
|
+
};
|
|
2987
|
+
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
2988
|
+
}
|
|
2989
|
+
updatePasskeyVerification(paramsOrFirst, ...rest) {
|
|
2990
|
+
let params;
|
|
2991
|
+
if (paramsOrFirst &&
|
|
2992
|
+
typeof paramsOrFirst === 'object' &&
|
|
2993
|
+
!Array.isArray(paramsOrFirst)) {
|
|
2994
|
+
params = (paramsOrFirst || {});
|
|
2995
|
+
}
|
|
2996
|
+
else {
|
|
2997
|
+
params = {
|
|
2998
|
+
passkeyId: paramsOrFirst,
|
|
2999
|
+
challengeId: rest[0],
|
|
3000
|
+
credential: rest[1],
|
|
3001
|
+
};
|
|
3002
|
+
}
|
|
3003
|
+
const passkeyId = params.passkeyId;
|
|
3004
|
+
const challengeId = params.challengeId;
|
|
3005
|
+
const credential = params.credential;
|
|
3006
|
+
if (typeof passkeyId === 'undefined' || passkeyId === '') {
|
|
3007
|
+
throw new AppwriteException('Missing required parameter: "passkeyId"');
|
|
3008
|
+
}
|
|
3009
|
+
if (typeof challengeId === 'undefined') {
|
|
3010
|
+
throw new AppwriteException('Missing required parameter: "challengeId"');
|
|
3011
|
+
}
|
|
3012
|
+
if (typeof credential === 'undefined') {
|
|
3013
|
+
throw new AppwriteException('Missing required parameter: "credential"');
|
|
3014
|
+
}
|
|
3015
|
+
const apiPath = '/account/passkeys/{passkeyId}/verification'.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
|
|
3016
|
+
const apiPayload = {};
|
|
3017
|
+
if (typeof challengeId !== 'undefined') {
|
|
3018
|
+
apiPayload['challengeId'] = challengeId;
|
|
3019
|
+
}
|
|
3020
|
+
if (typeof credential !== 'undefined') {
|
|
3021
|
+
apiPayload['credential'] = credential;
|
|
3022
|
+
}
|
|
3023
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3024
|
+
const apiHeaders = {
|
|
3025
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
3026
|
+
'content-type': 'application/json',
|
|
3027
|
+
accept: 'application/json',
|
|
3028
|
+
};
|
|
3029
|
+
return this.client.call('put', uri, apiHeaders, apiPayload);
|
|
3030
|
+
}
|
|
2841
3031
|
updatePassword(paramsOrFirst, ...rest) {
|
|
2842
3032
|
let params;
|
|
2843
3033
|
if (paramsOrFirst &&
|
|
@@ -4001,6 +4191,60 @@ class Account {
|
|
|
4001
4191
|
return uri.toString();
|
|
4002
4192
|
}
|
|
4003
4193
|
}
|
|
4194
|
+
/**
|
|
4195
|
+
* 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.
|
|
4196
|
+
*
|
|
4197
|
+
* @throws {AppwriteException}
|
|
4198
|
+
* @returns {Promise<Models.PasskeyChallenge>}
|
|
4199
|
+
*/
|
|
4200
|
+
createPasskeyToken() {
|
|
4201
|
+
const apiPath = '/account/tokens/passkey';
|
|
4202
|
+
const apiPayload = {};
|
|
4203
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4204
|
+
const apiHeaders = {
|
|
4205
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
4206
|
+
'content-type': 'application/json',
|
|
4207
|
+
accept: 'application/json',
|
|
4208
|
+
};
|
|
4209
|
+
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
4210
|
+
}
|
|
4211
|
+
updatePasskeyToken(paramsOrFirst, ...rest) {
|
|
4212
|
+
let params;
|
|
4213
|
+
if (paramsOrFirst &&
|
|
4214
|
+
typeof paramsOrFirst === 'object' &&
|
|
4215
|
+
!Array.isArray(paramsOrFirst)) {
|
|
4216
|
+
params = (paramsOrFirst || {});
|
|
4217
|
+
}
|
|
4218
|
+
else {
|
|
4219
|
+
params = {
|
|
4220
|
+
challengeId: paramsOrFirst,
|
|
4221
|
+
credential: rest[0],
|
|
4222
|
+
};
|
|
4223
|
+
}
|
|
4224
|
+
const challengeId = params.challengeId;
|
|
4225
|
+
const credential = params.credential;
|
|
4226
|
+
if (typeof challengeId === 'undefined') {
|
|
4227
|
+
throw new AppwriteException('Missing required parameter: "challengeId"');
|
|
4228
|
+
}
|
|
4229
|
+
if (typeof credential === 'undefined') {
|
|
4230
|
+
throw new AppwriteException('Missing required parameter: "credential"');
|
|
4231
|
+
}
|
|
4232
|
+
const apiPath = '/account/tokens/passkey';
|
|
4233
|
+
const apiPayload = {};
|
|
4234
|
+
if (typeof challengeId !== 'undefined') {
|
|
4235
|
+
apiPayload['challengeId'] = challengeId;
|
|
4236
|
+
}
|
|
4237
|
+
if (typeof credential !== 'undefined') {
|
|
4238
|
+
apiPayload['credential'] = credential;
|
|
4239
|
+
}
|
|
4240
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4241
|
+
const apiHeaders = {
|
|
4242
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
4243
|
+
'content-type': 'application/json',
|
|
4244
|
+
accept: 'application/json',
|
|
4245
|
+
};
|
|
4246
|
+
return this.client.call('put', uri, apiHeaders, apiPayload);
|
|
4247
|
+
}
|
|
4004
4248
|
createPhoneToken(paramsOrFirst, ...rest) {
|
|
4005
4249
|
let params;
|
|
4006
4250
|
if (paramsOrFirst &&
|
|
@@ -4347,6 +4591,135 @@ class Activities {
|
|
|
4347
4591
|
}
|
|
4348
4592
|
}
|
|
4349
4593
|
|
|
4594
|
+
class Admin {
|
|
4595
|
+
constructor(client) {
|
|
4596
|
+
this.client = client;
|
|
4597
|
+
}
|
|
4598
|
+
/**
|
|
4599
|
+
* Delete everything cached from the platform database in the region serving the request.
|
|
4600
|
+
*
|
|
4601
|
+
* @throws {AppwriteException}
|
|
4602
|
+
* @returns {Promise<{}>}
|
|
4603
|
+
*/
|
|
4604
|
+
deletePlatformCache() {
|
|
4605
|
+
const apiPath = '/admin/cache/platform';
|
|
4606
|
+
const apiPayload = {};
|
|
4607
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4608
|
+
const apiHeaders = {
|
|
4609
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
4610
|
+
'content-type': 'application/json',
|
|
4611
|
+
accept: 'application/json',
|
|
4612
|
+
};
|
|
4613
|
+
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
4614
|
+
}
|
|
4615
|
+
deletePlatformResourceCache(paramsOrFirst, ...rest) {
|
|
4616
|
+
let params;
|
|
4617
|
+
if (paramsOrFirst &&
|
|
4618
|
+
typeof paramsOrFirst === 'object' &&
|
|
4619
|
+
!Array.isArray(paramsOrFirst) &&
|
|
4620
|
+
('resourceType' in paramsOrFirst || 'resourceId' in paramsOrFirst)) {
|
|
4621
|
+
params = (paramsOrFirst || {});
|
|
4622
|
+
}
|
|
4623
|
+
else {
|
|
4624
|
+
params = {
|
|
4625
|
+
resourceType: paramsOrFirst,
|
|
4626
|
+
resourceId: rest[0],
|
|
4627
|
+
};
|
|
4628
|
+
}
|
|
4629
|
+
const resourceType = params.resourceType;
|
|
4630
|
+
const resourceId = params.resourceId;
|
|
4631
|
+
if (typeof resourceType === 'undefined') {
|
|
4632
|
+
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
4633
|
+
}
|
|
4634
|
+
const apiPath = '/admin/cache/platform/resources';
|
|
4635
|
+
const apiPayload = {};
|
|
4636
|
+
if (typeof resourceType !== 'undefined') {
|
|
4637
|
+
apiPayload['resourceType'] = resourceType;
|
|
4638
|
+
}
|
|
4639
|
+
if (typeof resourceId !== 'undefined') {
|
|
4640
|
+
apiPayload['resourceId'] = resourceId;
|
|
4641
|
+
}
|
|
4642
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4643
|
+
const apiHeaders = {
|
|
4644
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
4645
|
+
'content-type': 'application/json',
|
|
4646
|
+
accept: 'application/json',
|
|
4647
|
+
};
|
|
4648
|
+
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
4649
|
+
}
|
|
4650
|
+
deleteProjectCache(paramsOrFirst) {
|
|
4651
|
+
let params;
|
|
4652
|
+
if (paramsOrFirst &&
|
|
4653
|
+
typeof paramsOrFirst === 'object' &&
|
|
4654
|
+
!Array.isArray(paramsOrFirst)) {
|
|
4655
|
+
params = (paramsOrFirst || {});
|
|
4656
|
+
}
|
|
4657
|
+
else {
|
|
4658
|
+
params = {
|
|
4659
|
+
projectId: paramsOrFirst,
|
|
4660
|
+
};
|
|
4661
|
+
}
|
|
4662
|
+
const projectId = params.projectId;
|
|
4663
|
+
if (typeof projectId === 'undefined') {
|
|
4664
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
4665
|
+
}
|
|
4666
|
+
const apiPath = '/admin/cache/project';
|
|
4667
|
+
const apiPayload = {};
|
|
4668
|
+
if (typeof projectId !== 'undefined') {
|
|
4669
|
+
apiPayload['projectId'] = projectId;
|
|
4670
|
+
}
|
|
4671
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4672
|
+
const apiHeaders = {
|
|
4673
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
4674
|
+
'content-type': 'application/json',
|
|
4675
|
+
accept: 'application/json',
|
|
4676
|
+
};
|
|
4677
|
+
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
4678
|
+
}
|
|
4679
|
+
deleteProjectResourceCache(paramsOrFirst, ...rest) {
|
|
4680
|
+
let params;
|
|
4681
|
+
if (paramsOrFirst &&
|
|
4682
|
+
typeof paramsOrFirst === 'object' &&
|
|
4683
|
+
!Array.isArray(paramsOrFirst)) {
|
|
4684
|
+
params = (paramsOrFirst || {});
|
|
4685
|
+
}
|
|
4686
|
+
else {
|
|
4687
|
+
params = {
|
|
4688
|
+
projectId: paramsOrFirst,
|
|
4689
|
+
resourceType: rest[0],
|
|
4690
|
+
resourceId: rest[1],
|
|
4691
|
+
};
|
|
4692
|
+
}
|
|
4693
|
+
const projectId = params.projectId;
|
|
4694
|
+
const resourceType = params.resourceType;
|
|
4695
|
+
const resourceId = params.resourceId;
|
|
4696
|
+
if (typeof projectId === 'undefined') {
|
|
4697
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
4698
|
+
}
|
|
4699
|
+
if (typeof resourceType === 'undefined') {
|
|
4700
|
+
throw new AppwriteException('Missing required parameter: "resourceType"');
|
|
4701
|
+
}
|
|
4702
|
+
const apiPath = '/admin/cache/project/resources';
|
|
4703
|
+
const apiPayload = {};
|
|
4704
|
+
if (typeof projectId !== 'undefined') {
|
|
4705
|
+
apiPayload['projectId'] = projectId;
|
|
4706
|
+
}
|
|
4707
|
+
if (typeof resourceType !== 'undefined') {
|
|
4708
|
+
apiPayload['resourceType'] = resourceType;
|
|
4709
|
+
}
|
|
4710
|
+
if (typeof resourceId !== 'undefined') {
|
|
4711
|
+
apiPayload['resourceId'] = resourceId;
|
|
4712
|
+
}
|
|
4713
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4714
|
+
const apiHeaders = {
|
|
4715
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
4716
|
+
'content-type': 'application/json',
|
|
4717
|
+
accept: 'application/json',
|
|
4718
|
+
};
|
|
4719
|
+
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
4720
|
+
}
|
|
4721
|
+
}
|
|
4722
|
+
|
|
4350
4723
|
class Affiliates {
|
|
4351
4724
|
constructor(client) {
|
|
4352
4725
|
this.client = client;
|
|
@@ -32111,6 +32484,38 @@ class Project {
|
|
|
32111
32484
|
};
|
|
32112
32485
|
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
32113
32486
|
}
|
|
32487
|
+
updatePasskeyPolicy(paramsOrFirst, ...rest) {
|
|
32488
|
+
let params;
|
|
32489
|
+
if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
|
|
32490
|
+
(paramsOrFirst &&
|
|
32491
|
+
typeof paramsOrFirst === 'object' &&
|
|
32492
|
+
!Array.isArray(paramsOrFirst))) {
|
|
32493
|
+
params = (paramsOrFirst || {});
|
|
32494
|
+
}
|
|
32495
|
+
else {
|
|
32496
|
+
params = {
|
|
32497
|
+
rpId: paramsOrFirst,
|
|
32498
|
+
origins: rest[0],
|
|
32499
|
+
};
|
|
32500
|
+
}
|
|
32501
|
+
const rpId = params.rpId;
|
|
32502
|
+
const origins = params.origins;
|
|
32503
|
+
const apiPath = '/project/policies/passkey';
|
|
32504
|
+
const apiPayload = {};
|
|
32505
|
+
if (typeof rpId !== 'undefined') {
|
|
32506
|
+
apiPayload['rpId'] = rpId;
|
|
32507
|
+
}
|
|
32508
|
+
if (typeof origins !== 'undefined') {
|
|
32509
|
+
apiPayload['origins'] = origins;
|
|
32510
|
+
}
|
|
32511
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
32512
|
+
const apiHeaders = {
|
|
32513
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
32514
|
+
'content-type': 'application/json',
|
|
32515
|
+
accept: 'application/json',
|
|
32516
|
+
};
|
|
32517
|
+
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
32518
|
+
}
|
|
32114
32519
|
updatePasswordDictionaryPolicy(paramsOrFirst) {
|
|
32115
32520
|
let params;
|
|
32116
32521
|
if (paramsOrFirst &&
|
|
@@ -42072,6 +42477,106 @@ class Users {
|
|
|
42072
42477
|
};
|
|
42073
42478
|
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
42074
42479
|
}
|
|
42480
|
+
listPasskeys(paramsOrFirst, ...rest) {
|
|
42481
|
+
let params;
|
|
42482
|
+
if (paramsOrFirst &&
|
|
42483
|
+
typeof paramsOrFirst === 'object' &&
|
|
42484
|
+
!Array.isArray(paramsOrFirst)) {
|
|
42485
|
+
params = (paramsOrFirst || {});
|
|
42486
|
+
}
|
|
42487
|
+
else {
|
|
42488
|
+
params = {
|
|
42489
|
+
userId: paramsOrFirst,
|
|
42490
|
+
queries: rest[0],
|
|
42491
|
+
total: rest[1],
|
|
42492
|
+
};
|
|
42493
|
+
}
|
|
42494
|
+
const userId = params.userId;
|
|
42495
|
+
const queries = params.queries;
|
|
42496
|
+
const total = params.total;
|
|
42497
|
+
if (typeof userId === 'undefined' || userId === '') {
|
|
42498
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
42499
|
+
}
|
|
42500
|
+
const apiPath = '/users/{userId}/passkeys'.replace('{userId}', encodeURIComponent(String(userId)));
|
|
42501
|
+
const apiPayload = {};
|
|
42502
|
+
if (typeof queries !== 'undefined') {
|
|
42503
|
+
apiPayload['queries'] = queries;
|
|
42504
|
+
}
|
|
42505
|
+
if (typeof total !== 'undefined') {
|
|
42506
|
+
apiPayload['total'] = total;
|
|
42507
|
+
}
|
|
42508
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
42509
|
+
const apiHeaders = {
|
|
42510
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
42511
|
+
accept: 'application/json',
|
|
42512
|
+
};
|
|
42513
|
+
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
42514
|
+
}
|
|
42515
|
+
getPasskey(paramsOrFirst, ...rest) {
|
|
42516
|
+
let params;
|
|
42517
|
+
if (paramsOrFirst &&
|
|
42518
|
+
typeof paramsOrFirst === 'object' &&
|
|
42519
|
+
!Array.isArray(paramsOrFirst)) {
|
|
42520
|
+
params = (paramsOrFirst || {});
|
|
42521
|
+
}
|
|
42522
|
+
else {
|
|
42523
|
+
params = {
|
|
42524
|
+
userId: paramsOrFirst,
|
|
42525
|
+
passkeyId: rest[0],
|
|
42526
|
+
};
|
|
42527
|
+
}
|
|
42528
|
+
const userId = params.userId;
|
|
42529
|
+
const passkeyId = params.passkeyId;
|
|
42530
|
+
if (typeof userId === 'undefined' || userId === '') {
|
|
42531
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
42532
|
+
}
|
|
42533
|
+
if (typeof passkeyId === 'undefined' || passkeyId === '') {
|
|
42534
|
+
throw new AppwriteException('Missing required parameter: "passkeyId"');
|
|
42535
|
+
}
|
|
42536
|
+
const apiPath = '/users/{userId}/passkeys/{passkeyId}'
|
|
42537
|
+
.replace('{userId}', encodeURIComponent(String(userId)))
|
|
42538
|
+
.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
|
|
42539
|
+
const apiPayload = {};
|
|
42540
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
42541
|
+
const apiHeaders = {
|
|
42542
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
42543
|
+
accept: 'application/json',
|
|
42544
|
+
};
|
|
42545
|
+
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
42546
|
+
}
|
|
42547
|
+
deletePasskey(paramsOrFirst, ...rest) {
|
|
42548
|
+
let params;
|
|
42549
|
+
if (paramsOrFirst &&
|
|
42550
|
+
typeof paramsOrFirst === 'object' &&
|
|
42551
|
+
!Array.isArray(paramsOrFirst)) {
|
|
42552
|
+
params = (paramsOrFirst || {});
|
|
42553
|
+
}
|
|
42554
|
+
else {
|
|
42555
|
+
params = {
|
|
42556
|
+
userId: paramsOrFirst,
|
|
42557
|
+
passkeyId: rest[0],
|
|
42558
|
+
};
|
|
42559
|
+
}
|
|
42560
|
+
const userId = params.userId;
|
|
42561
|
+
const passkeyId = params.passkeyId;
|
|
42562
|
+
if (typeof userId === 'undefined' || userId === '') {
|
|
42563
|
+
throw new AppwriteException('Missing required parameter: "userId"');
|
|
42564
|
+
}
|
|
42565
|
+
if (typeof passkeyId === 'undefined' || passkeyId === '') {
|
|
42566
|
+
throw new AppwriteException('Missing required parameter: "passkeyId"');
|
|
42567
|
+
}
|
|
42568
|
+
const apiPath = '/users/{userId}/passkeys/{passkeyId}'
|
|
42569
|
+
.replace('{userId}', encodeURIComponent(String(userId)))
|
|
42570
|
+
.replace('{passkeyId}', encodeURIComponent(String(passkeyId)));
|
|
42571
|
+
const apiPayload = {};
|
|
42572
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
42573
|
+
const apiHeaders = {
|
|
42574
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
42575
|
+
'content-type': 'application/json',
|
|
42576
|
+
accept: 'application/json',
|
|
42577
|
+
};
|
|
42578
|
+
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
42579
|
+
}
|
|
42075
42580
|
updatePassword(paramsOrFirst, ...rest) {
|
|
42076
42581
|
let params;
|
|
42077
42582
|
if (paramsOrFirst &&
|
|
@@ -44578,6 +45083,1136 @@ class VectorsDB {
|
|
|
44578
45083
|
}
|
|
44579
45084
|
}
|
|
44580
45085
|
|
|
45086
|
+
class Videos {
|
|
45087
|
+
constructor(client) {
|
|
45088
|
+
this.client = client;
|
|
45089
|
+
}
|
|
45090
|
+
list(paramsOrFirst, ...rest) {
|
|
45091
|
+
let params;
|
|
45092
|
+
if ((typeof paramsOrFirst === 'undefined' && rest.length === 0) ||
|
|
45093
|
+
(paramsOrFirst &&
|
|
45094
|
+
typeof paramsOrFirst === 'object' &&
|
|
45095
|
+
!Array.isArray(paramsOrFirst))) {
|
|
45096
|
+
params = (paramsOrFirst || {});
|
|
45097
|
+
}
|
|
45098
|
+
else {
|
|
45099
|
+
params = {
|
|
45100
|
+
queries: paramsOrFirst,
|
|
45101
|
+
search: rest[0],
|
|
45102
|
+
total: rest[1],
|
|
45103
|
+
};
|
|
45104
|
+
}
|
|
45105
|
+
const queries = params.queries;
|
|
45106
|
+
const search = params.search;
|
|
45107
|
+
const total = params.total;
|
|
45108
|
+
const apiPath = '/videos';
|
|
45109
|
+
const apiPayload = {};
|
|
45110
|
+
if (typeof queries !== 'undefined') {
|
|
45111
|
+
apiPayload['queries'] = queries;
|
|
45112
|
+
}
|
|
45113
|
+
if (typeof search !== 'undefined') {
|
|
45114
|
+
apiPayload['search'] = search;
|
|
45115
|
+
}
|
|
45116
|
+
if (typeof total !== 'undefined') {
|
|
45117
|
+
apiPayload['total'] = total;
|
|
45118
|
+
}
|
|
45119
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45120
|
+
const apiHeaders = {
|
|
45121
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
45122
|
+
accept: 'application/json',
|
|
45123
|
+
};
|
|
45124
|
+
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
45125
|
+
}
|
|
45126
|
+
create(paramsOrFirst, ...rest) {
|
|
45127
|
+
let params;
|
|
45128
|
+
if (paramsOrFirst &&
|
|
45129
|
+
typeof paramsOrFirst === 'object' &&
|
|
45130
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45131
|
+
params = (paramsOrFirst || {});
|
|
45132
|
+
}
|
|
45133
|
+
else {
|
|
45134
|
+
params = {
|
|
45135
|
+
bucketId: paramsOrFirst,
|
|
45136
|
+
fileId: rest[0],
|
|
45137
|
+
name: rest[1],
|
|
45138
|
+
};
|
|
45139
|
+
}
|
|
45140
|
+
const bucketId = params.bucketId;
|
|
45141
|
+
const fileId = params.fileId;
|
|
45142
|
+
const name = params.name;
|
|
45143
|
+
if (typeof bucketId === 'undefined') {
|
|
45144
|
+
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
45145
|
+
}
|
|
45146
|
+
if (typeof fileId === 'undefined') {
|
|
45147
|
+
throw new AppwriteException('Missing required parameter: "fileId"');
|
|
45148
|
+
}
|
|
45149
|
+
const apiPath = '/videos';
|
|
45150
|
+
const apiPayload = {};
|
|
45151
|
+
if (typeof bucketId !== 'undefined') {
|
|
45152
|
+
apiPayload['bucketId'] = bucketId;
|
|
45153
|
+
}
|
|
45154
|
+
if (typeof fileId !== 'undefined') {
|
|
45155
|
+
apiPayload['fileId'] = fileId;
|
|
45156
|
+
}
|
|
45157
|
+
if (typeof name !== 'undefined') {
|
|
45158
|
+
apiPayload['name'] = name;
|
|
45159
|
+
}
|
|
45160
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45161
|
+
const apiHeaders = {
|
|
45162
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
45163
|
+
'content-type': 'application/json',
|
|
45164
|
+
accept: 'application/json',
|
|
45165
|
+
};
|
|
45166
|
+
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
45167
|
+
}
|
|
45168
|
+
listProfiles(paramsOrFirst) {
|
|
45169
|
+
let params;
|
|
45170
|
+
if (typeof paramsOrFirst === 'undefined' ||
|
|
45171
|
+
(paramsOrFirst &&
|
|
45172
|
+
typeof paramsOrFirst === 'object' &&
|
|
45173
|
+
!Array.isArray(paramsOrFirst))) {
|
|
45174
|
+
params = (paramsOrFirst || {});
|
|
45175
|
+
}
|
|
45176
|
+
else {
|
|
45177
|
+
params = {
|
|
45178
|
+
search: paramsOrFirst,
|
|
45179
|
+
};
|
|
45180
|
+
}
|
|
45181
|
+
const search = params.search;
|
|
45182
|
+
const apiPath = '/videos/profiles';
|
|
45183
|
+
const apiPayload = {};
|
|
45184
|
+
if (typeof search !== 'undefined') {
|
|
45185
|
+
apiPayload['search'] = search;
|
|
45186
|
+
}
|
|
45187
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45188
|
+
const apiHeaders = {
|
|
45189
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
45190
|
+
accept: 'application/json',
|
|
45191
|
+
};
|
|
45192
|
+
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
45193
|
+
}
|
|
45194
|
+
createProfile(paramsOrFirst, ...rest) {
|
|
45195
|
+
let params;
|
|
45196
|
+
if (paramsOrFirst &&
|
|
45197
|
+
typeof paramsOrFirst === 'object' &&
|
|
45198
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45199
|
+
params = (paramsOrFirst || {});
|
|
45200
|
+
}
|
|
45201
|
+
else {
|
|
45202
|
+
params = {
|
|
45203
|
+
name: paramsOrFirst,
|
|
45204
|
+
videoBitRate: rest[0],
|
|
45205
|
+
audioBitRate: rest[1],
|
|
45206
|
+
width: rest[2],
|
|
45207
|
+
height: rest[3],
|
|
45208
|
+
};
|
|
45209
|
+
}
|
|
45210
|
+
const name = params.name;
|
|
45211
|
+
const videoBitRate = params.videoBitRate;
|
|
45212
|
+
const audioBitRate = params.audioBitRate;
|
|
45213
|
+
const width = params.width;
|
|
45214
|
+
const height = params.height;
|
|
45215
|
+
if (typeof name === 'undefined') {
|
|
45216
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
45217
|
+
}
|
|
45218
|
+
if (typeof videoBitRate === 'undefined') {
|
|
45219
|
+
throw new AppwriteException('Missing required parameter: "videoBitRate"');
|
|
45220
|
+
}
|
|
45221
|
+
if (typeof audioBitRate === 'undefined') {
|
|
45222
|
+
throw new AppwriteException('Missing required parameter: "audioBitRate"');
|
|
45223
|
+
}
|
|
45224
|
+
if (typeof width === 'undefined') {
|
|
45225
|
+
throw new AppwriteException('Missing required parameter: "width"');
|
|
45226
|
+
}
|
|
45227
|
+
if (typeof height === 'undefined') {
|
|
45228
|
+
throw new AppwriteException('Missing required parameter: "height"');
|
|
45229
|
+
}
|
|
45230
|
+
const apiPath = '/videos/profiles';
|
|
45231
|
+
const apiPayload = {};
|
|
45232
|
+
if (typeof name !== 'undefined') {
|
|
45233
|
+
apiPayload['name'] = name;
|
|
45234
|
+
}
|
|
45235
|
+
if (typeof videoBitRate !== 'undefined') {
|
|
45236
|
+
apiPayload['videoBitRate'] = videoBitRate;
|
|
45237
|
+
}
|
|
45238
|
+
if (typeof audioBitRate !== 'undefined') {
|
|
45239
|
+
apiPayload['audioBitRate'] = audioBitRate;
|
|
45240
|
+
}
|
|
45241
|
+
if (typeof width !== 'undefined') {
|
|
45242
|
+
apiPayload['width'] = width;
|
|
45243
|
+
}
|
|
45244
|
+
if (typeof height !== 'undefined') {
|
|
45245
|
+
apiPayload['height'] = height;
|
|
45246
|
+
}
|
|
45247
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45248
|
+
const apiHeaders = {
|
|
45249
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
45250
|
+
'content-type': 'application/json',
|
|
45251
|
+
accept: 'application/json',
|
|
45252
|
+
};
|
|
45253
|
+
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
45254
|
+
}
|
|
45255
|
+
getProfile(paramsOrFirst) {
|
|
45256
|
+
let params;
|
|
45257
|
+
if (paramsOrFirst &&
|
|
45258
|
+
typeof paramsOrFirst === 'object' &&
|
|
45259
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45260
|
+
params = (paramsOrFirst || {});
|
|
45261
|
+
}
|
|
45262
|
+
else {
|
|
45263
|
+
params = {
|
|
45264
|
+
profileId: paramsOrFirst,
|
|
45265
|
+
};
|
|
45266
|
+
}
|
|
45267
|
+
const profileId = params.profileId;
|
|
45268
|
+
if (typeof profileId === 'undefined' || profileId === '') {
|
|
45269
|
+
throw new AppwriteException('Missing required parameter: "profileId"');
|
|
45270
|
+
}
|
|
45271
|
+
const apiPath = '/videos/profiles/{profileId}'.replace('{profileId}', encodeURIComponent(String(profileId)));
|
|
45272
|
+
const apiPayload = {};
|
|
45273
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45274
|
+
const apiHeaders = {
|
|
45275
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
45276
|
+
accept: 'application/json',
|
|
45277
|
+
};
|
|
45278
|
+
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
45279
|
+
}
|
|
45280
|
+
updateProfile(paramsOrFirst, ...rest) {
|
|
45281
|
+
let params;
|
|
45282
|
+
if (paramsOrFirst &&
|
|
45283
|
+
typeof paramsOrFirst === 'object' &&
|
|
45284
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45285
|
+
params = (paramsOrFirst || {});
|
|
45286
|
+
}
|
|
45287
|
+
else {
|
|
45288
|
+
params = {
|
|
45289
|
+
profileId: paramsOrFirst,
|
|
45290
|
+
name: rest[0],
|
|
45291
|
+
videoBitRate: rest[1],
|
|
45292
|
+
audioBitRate: rest[2],
|
|
45293
|
+
width: rest[3],
|
|
45294
|
+
height: rest[4],
|
|
45295
|
+
};
|
|
45296
|
+
}
|
|
45297
|
+
const profileId = params.profileId;
|
|
45298
|
+
const name = params.name;
|
|
45299
|
+
const videoBitRate = params.videoBitRate;
|
|
45300
|
+
const audioBitRate = params.audioBitRate;
|
|
45301
|
+
const width = params.width;
|
|
45302
|
+
const height = params.height;
|
|
45303
|
+
if (typeof profileId === 'undefined' || profileId === '') {
|
|
45304
|
+
throw new AppwriteException('Missing required parameter: "profileId"');
|
|
45305
|
+
}
|
|
45306
|
+
if (typeof name === 'undefined') {
|
|
45307
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
45308
|
+
}
|
|
45309
|
+
if (typeof videoBitRate === 'undefined') {
|
|
45310
|
+
throw new AppwriteException('Missing required parameter: "videoBitRate"');
|
|
45311
|
+
}
|
|
45312
|
+
if (typeof audioBitRate === 'undefined') {
|
|
45313
|
+
throw new AppwriteException('Missing required parameter: "audioBitRate"');
|
|
45314
|
+
}
|
|
45315
|
+
if (typeof width === 'undefined') {
|
|
45316
|
+
throw new AppwriteException('Missing required parameter: "width"');
|
|
45317
|
+
}
|
|
45318
|
+
if (typeof height === 'undefined') {
|
|
45319
|
+
throw new AppwriteException('Missing required parameter: "height"');
|
|
45320
|
+
}
|
|
45321
|
+
const apiPath = '/videos/profiles/{profileId}'.replace('{profileId}', encodeURIComponent(String(profileId)));
|
|
45322
|
+
const apiPayload = {};
|
|
45323
|
+
if (typeof name !== 'undefined') {
|
|
45324
|
+
apiPayload['name'] = name;
|
|
45325
|
+
}
|
|
45326
|
+
if (typeof videoBitRate !== 'undefined') {
|
|
45327
|
+
apiPayload['videoBitRate'] = videoBitRate;
|
|
45328
|
+
}
|
|
45329
|
+
if (typeof audioBitRate !== 'undefined') {
|
|
45330
|
+
apiPayload['audioBitRate'] = audioBitRate;
|
|
45331
|
+
}
|
|
45332
|
+
if (typeof width !== 'undefined') {
|
|
45333
|
+
apiPayload['width'] = width;
|
|
45334
|
+
}
|
|
45335
|
+
if (typeof height !== 'undefined') {
|
|
45336
|
+
apiPayload['height'] = height;
|
|
45337
|
+
}
|
|
45338
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45339
|
+
const apiHeaders = {
|
|
45340
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
45341
|
+
'content-type': 'application/json',
|
|
45342
|
+
accept: 'application/json',
|
|
45343
|
+
};
|
|
45344
|
+
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
45345
|
+
}
|
|
45346
|
+
deleteProfile(paramsOrFirst) {
|
|
45347
|
+
let params;
|
|
45348
|
+
if (paramsOrFirst &&
|
|
45349
|
+
typeof paramsOrFirst === 'object' &&
|
|
45350
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45351
|
+
params = (paramsOrFirst || {});
|
|
45352
|
+
}
|
|
45353
|
+
else {
|
|
45354
|
+
params = {
|
|
45355
|
+
profileId: paramsOrFirst,
|
|
45356
|
+
};
|
|
45357
|
+
}
|
|
45358
|
+
const profileId = params.profileId;
|
|
45359
|
+
if (typeof profileId === 'undefined' || profileId === '') {
|
|
45360
|
+
throw new AppwriteException('Missing required parameter: "profileId"');
|
|
45361
|
+
}
|
|
45362
|
+
const apiPath = '/videos/profiles/{profileId}'.replace('{profileId}', encodeURIComponent(String(profileId)));
|
|
45363
|
+
const apiPayload = {};
|
|
45364
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45365
|
+
const apiHeaders = {
|
|
45366
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
45367
|
+
'content-type': 'application/json',
|
|
45368
|
+
accept: 'application/json',
|
|
45369
|
+
};
|
|
45370
|
+
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
45371
|
+
}
|
|
45372
|
+
get(paramsOrFirst) {
|
|
45373
|
+
let params;
|
|
45374
|
+
if (paramsOrFirst &&
|
|
45375
|
+
typeof paramsOrFirst === 'object' &&
|
|
45376
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45377
|
+
params = (paramsOrFirst || {});
|
|
45378
|
+
}
|
|
45379
|
+
else {
|
|
45380
|
+
params = {
|
|
45381
|
+
videoId: paramsOrFirst,
|
|
45382
|
+
};
|
|
45383
|
+
}
|
|
45384
|
+
const videoId = params.videoId;
|
|
45385
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45386
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45387
|
+
}
|
|
45388
|
+
const apiPath = '/videos/{videoId}'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45389
|
+
const apiPayload = {};
|
|
45390
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45391
|
+
const apiHeaders = {
|
|
45392
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
45393
|
+
accept: 'application/json',
|
|
45394
|
+
};
|
|
45395
|
+
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
45396
|
+
}
|
|
45397
|
+
update(paramsOrFirst, ...rest) {
|
|
45398
|
+
let params;
|
|
45399
|
+
if (paramsOrFirst &&
|
|
45400
|
+
typeof paramsOrFirst === 'object' &&
|
|
45401
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45402
|
+
params = (paramsOrFirst || {});
|
|
45403
|
+
}
|
|
45404
|
+
else {
|
|
45405
|
+
params = {
|
|
45406
|
+
videoId: paramsOrFirst,
|
|
45407
|
+
name: rest[0],
|
|
45408
|
+
};
|
|
45409
|
+
}
|
|
45410
|
+
const videoId = params.videoId;
|
|
45411
|
+
const name = params.name;
|
|
45412
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45413
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45414
|
+
}
|
|
45415
|
+
if (typeof name === 'undefined') {
|
|
45416
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
45417
|
+
}
|
|
45418
|
+
const apiPath = '/videos/{videoId}'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45419
|
+
const apiPayload = {};
|
|
45420
|
+
if (typeof name !== 'undefined') {
|
|
45421
|
+
apiPayload['name'] = name;
|
|
45422
|
+
}
|
|
45423
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45424
|
+
const apiHeaders = {
|
|
45425
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
45426
|
+
'content-type': 'application/json',
|
|
45427
|
+
accept: 'application/json',
|
|
45428
|
+
};
|
|
45429
|
+
return this.client.call('put', uri, apiHeaders, apiPayload);
|
|
45430
|
+
}
|
|
45431
|
+
delete(paramsOrFirst) {
|
|
45432
|
+
let params;
|
|
45433
|
+
if (paramsOrFirst &&
|
|
45434
|
+
typeof paramsOrFirst === 'object' &&
|
|
45435
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45436
|
+
params = (paramsOrFirst || {});
|
|
45437
|
+
}
|
|
45438
|
+
else {
|
|
45439
|
+
params = {
|
|
45440
|
+
videoId: paramsOrFirst,
|
|
45441
|
+
};
|
|
45442
|
+
}
|
|
45443
|
+
const videoId = params.videoId;
|
|
45444
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45445
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45446
|
+
}
|
|
45447
|
+
const apiPath = '/videos/{videoId}'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45448
|
+
const apiPayload = {};
|
|
45449
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45450
|
+
const apiHeaders = {
|
|
45451
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
45452
|
+
'content-type': 'application/json',
|
|
45453
|
+
accept: 'application/json',
|
|
45454
|
+
};
|
|
45455
|
+
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
45456
|
+
}
|
|
45457
|
+
getCmafHlsManifest(paramsOrFirst) {
|
|
45458
|
+
let params;
|
|
45459
|
+
if (paramsOrFirst &&
|
|
45460
|
+
typeof paramsOrFirst === 'object' &&
|
|
45461
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45462
|
+
params = (paramsOrFirst || {});
|
|
45463
|
+
}
|
|
45464
|
+
else {
|
|
45465
|
+
params = {
|
|
45466
|
+
videoId: paramsOrFirst,
|
|
45467
|
+
};
|
|
45468
|
+
}
|
|
45469
|
+
const videoId = params.videoId;
|
|
45470
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45471
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45472
|
+
}
|
|
45473
|
+
const apiPath = '/videos/{videoId}/outputs/cmaf/master.m3u8'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45474
|
+
const apiPayload = {};
|
|
45475
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45476
|
+
apiPayload['project'] = this.client.config.project;
|
|
45477
|
+
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45478
|
+
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45479
|
+
uri.searchParams.append(key, value);
|
|
45480
|
+
}
|
|
45481
|
+
return uri.toString();
|
|
45482
|
+
}
|
|
45483
|
+
getCmafDashManifest(paramsOrFirst) {
|
|
45484
|
+
let params;
|
|
45485
|
+
if (paramsOrFirst &&
|
|
45486
|
+
typeof paramsOrFirst === 'object' &&
|
|
45487
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45488
|
+
params = (paramsOrFirst || {});
|
|
45489
|
+
}
|
|
45490
|
+
else {
|
|
45491
|
+
params = {
|
|
45492
|
+
videoId: paramsOrFirst,
|
|
45493
|
+
};
|
|
45494
|
+
}
|
|
45495
|
+
const videoId = params.videoId;
|
|
45496
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45497
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45498
|
+
}
|
|
45499
|
+
const apiPath = '/videos/{videoId}/outputs/cmaf/master.mpd'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45500
|
+
const apiPayload = {};
|
|
45501
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45502
|
+
apiPayload['project'] = this.client.config.project;
|
|
45503
|
+
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45504
|
+
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45505
|
+
uri.searchParams.append(key, value);
|
|
45506
|
+
}
|
|
45507
|
+
return uri.toString();
|
|
45508
|
+
}
|
|
45509
|
+
getCmafStreamManifest(paramsOrFirst, ...rest) {
|
|
45510
|
+
let params;
|
|
45511
|
+
if (paramsOrFirst &&
|
|
45512
|
+
typeof paramsOrFirst === 'object' &&
|
|
45513
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45514
|
+
params = (paramsOrFirst || {});
|
|
45515
|
+
}
|
|
45516
|
+
else {
|
|
45517
|
+
params = {
|
|
45518
|
+
videoId: paramsOrFirst,
|
|
45519
|
+
renditionId: rest[0],
|
|
45520
|
+
streamId: rest[1],
|
|
45521
|
+
};
|
|
45522
|
+
}
|
|
45523
|
+
const videoId = params.videoId;
|
|
45524
|
+
const renditionId = params.renditionId;
|
|
45525
|
+
const streamId = params.streamId;
|
|
45526
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45527
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45528
|
+
}
|
|
45529
|
+
if (typeof renditionId === 'undefined' || renditionId === '') {
|
|
45530
|
+
throw new AppwriteException('Missing required parameter: "renditionId"');
|
|
45531
|
+
}
|
|
45532
|
+
if (typeof streamId === 'undefined') {
|
|
45533
|
+
throw new AppwriteException('Missing required parameter: "streamId"');
|
|
45534
|
+
}
|
|
45535
|
+
const apiPath = '/videos/{videoId}/outputs/cmaf/renditions/{renditionId}/streams/{streamId}/playlist.m3u8'
|
|
45536
|
+
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45537
|
+
.replace('{renditionId}', encodeURIComponent(String(renditionId)))
|
|
45538
|
+
.replace('{streamId}', encodeURIComponent(String(streamId)));
|
|
45539
|
+
const apiPayload = {};
|
|
45540
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45541
|
+
apiPayload['project'] = this.client.config.project;
|
|
45542
|
+
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45543
|
+
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45544
|
+
uri.searchParams.append(key, value);
|
|
45545
|
+
}
|
|
45546
|
+
return uri.toString();
|
|
45547
|
+
}
|
|
45548
|
+
getDashManifest(paramsOrFirst) {
|
|
45549
|
+
let params;
|
|
45550
|
+
if (paramsOrFirst &&
|
|
45551
|
+
typeof paramsOrFirst === 'object' &&
|
|
45552
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45553
|
+
params = (paramsOrFirst || {});
|
|
45554
|
+
}
|
|
45555
|
+
else {
|
|
45556
|
+
params = {
|
|
45557
|
+
videoId: paramsOrFirst,
|
|
45558
|
+
};
|
|
45559
|
+
}
|
|
45560
|
+
const videoId = params.videoId;
|
|
45561
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45562
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45563
|
+
}
|
|
45564
|
+
const apiPath = '/videos/{videoId}/outputs/dash/master.mpd'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45565
|
+
const apiPayload = {};
|
|
45566
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45567
|
+
apiPayload['project'] = this.client.config.project;
|
|
45568
|
+
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45569
|
+
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45570
|
+
uri.searchParams.append(key, value);
|
|
45571
|
+
}
|
|
45572
|
+
return uri.toString();
|
|
45573
|
+
}
|
|
45574
|
+
getHlsManifest(paramsOrFirst) {
|
|
45575
|
+
let params;
|
|
45576
|
+
if (paramsOrFirst &&
|
|
45577
|
+
typeof paramsOrFirst === 'object' &&
|
|
45578
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45579
|
+
params = (paramsOrFirst || {});
|
|
45580
|
+
}
|
|
45581
|
+
else {
|
|
45582
|
+
params = {
|
|
45583
|
+
videoId: paramsOrFirst,
|
|
45584
|
+
};
|
|
45585
|
+
}
|
|
45586
|
+
const videoId = params.videoId;
|
|
45587
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45588
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45589
|
+
}
|
|
45590
|
+
const apiPath = '/videos/{videoId}/outputs/hls/master.m3u8'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45591
|
+
const apiPayload = {};
|
|
45592
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45593
|
+
apiPayload['project'] = this.client.config.project;
|
|
45594
|
+
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45595
|
+
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45596
|
+
uri.searchParams.append(key, value);
|
|
45597
|
+
}
|
|
45598
|
+
return uri.toString();
|
|
45599
|
+
}
|
|
45600
|
+
getStreamManifest(paramsOrFirst, ...rest) {
|
|
45601
|
+
let params;
|
|
45602
|
+
if (paramsOrFirst &&
|
|
45603
|
+
typeof paramsOrFirst === 'object' &&
|
|
45604
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45605
|
+
params = (paramsOrFirst || {});
|
|
45606
|
+
}
|
|
45607
|
+
else {
|
|
45608
|
+
params = {
|
|
45609
|
+
videoId: paramsOrFirst,
|
|
45610
|
+
renditionId: rest[0],
|
|
45611
|
+
streamId: rest[1],
|
|
45612
|
+
};
|
|
45613
|
+
}
|
|
45614
|
+
const videoId = params.videoId;
|
|
45615
|
+
const renditionId = params.renditionId;
|
|
45616
|
+
const streamId = params.streamId;
|
|
45617
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45618
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45619
|
+
}
|
|
45620
|
+
if (typeof renditionId === 'undefined' || renditionId === '') {
|
|
45621
|
+
throw new AppwriteException('Missing required parameter: "renditionId"');
|
|
45622
|
+
}
|
|
45623
|
+
if (typeof streamId === 'undefined') {
|
|
45624
|
+
throw new AppwriteException('Missing required parameter: "streamId"');
|
|
45625
|
+
}
|
|
45626
|
+
const apiPath = '/videos/{videoId}/outputs/hls/renditions/{renditionId}/streams/{streamId}/playlist.m3u8'
|
|
45627
|
+
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45628
|
+
.replace('{renditionId}', encodeURIComponent(String(renditionId)))
|
|
45629
|
+
.replace('{streamId}', encodeURIComponent(String(streamId)));
|
|
45630
|
+
const apiPayload = {};
|
|
45631
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45632
|
+
apiPayload['project'] = this.client.config.project;
|
|
45633
|
+
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45634
|
+
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45635
|
+
uri.searchParams.append(key, value);
|
|
45636
|
+
}
|
|
45637
|
+
return uri.toString();
|
|
45638
|
+
}
|
|
45639
|
+
getSegment(paramsOrFirst, ...rest) {
|
|
45640
|
+
let params;
|
|
45641
|
+
if (paramsOrFirst &&
|
|
45642
|
+
typeof paramsOrFirst === 'object' &&
|
|
45643
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45644
|
+
params = (paramsOrFirst || {});
|
|
45645
|
+
}
|
|
45646
|
+
else {
|
|
45647
|
+
params = {
|
|
45648
|
+
videoId: paramsOrFirst,
|
|
45649
|
+
output: rest[0],
|
|
45650
|
+
renditionId: rest[1],
|
|
45651
|
+
segmentId: rest[2],
|
|
45652
|
+
};
|
|
45653
|
+
}
|
|
45654
|
+
const videoId = params.videoId;
|
|
45655
|
+
const output = params.output;
|
|
45656
|
+
const renditionId = params.renditionId;
|
|
45657
|
+
const segmentId = params.segmentId;
|
|
45658
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45659
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45660
|
+
}
|
|
45661
|
+
if (typeof output === 'undefined') {
|
|
45662
|
+
throw new AppwriteException('Missing required parameter: "output"');
|
|
45663
|
+
}
|
|
45664
|
+
if (typeof renditionId === 'undefined' || renditionId === '') {
|
|
45665
|
+
throw new AppwriteException('Missing required parameter: "renditionId"');
|
|
45666
|
+
}
|
|
45667
|
+
if (typeof segmentId === 'undefined' || segmentId === '') {
|
|
45668
|
+
throw new AppwriteException('Missing required parameter: "segmentId"');
|
|
45669
|
+
}
|
|
45670
|
+
const apiPath = '/videos/{videoId}/outputs/{output}/renditions/{renditionId}/segments/{segmentId}'
|
|
45671
|
+
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45672
|
+
.replace('{output}', encodeURIComponent(String(output)))
|
|
45673
|
+
.replace('{renditionId}', encodeURIComponent(String(renditionId)))
|
|
45674
|
+
.replace('{segmentId}', encodeURIComponent(String(segmentId)));
|
|
45675
|
+
const apiPayload = {};
|
|
45676
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45677
|
+
apiPayload['project'] = this.client.config.project;
|
|
45678
|
+
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45679
|
+
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45680
|
+
uri.searchParams.append(key, value);
|
|
45681
|
+
}
|
|
45682
|
+
return uri.toString();
|
|
45683
|
+
}
|
|
45684
|
+
getSubtitleManifest(paramsOrFirst, ...rest) {
|
|
45685
|
+
let params;
|
|
45686
|
+
if (paramsOrFirst &&
|
|
45687
|
+
typeof paramsOrFirst === 'object' &&
|
|
45688
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45689
|
+
params = (paramsOrFirst || {});
|
|
45690
|
+
}
|
|
45691
|
+
else {
|
|
45692
|
+
params = {
|
|
45693
|
+
videoId: paramsOrFirst,
|
|
45694
|
+
output: rest[0],
|
|
45695
|
+
subtitleId: rest[1],
|
|
45696
|
+
};
|
|
45697
|
+
}
|
|
45698
|
+
const videoId = params.videoId;
|
|
45699
|
+
const output = params.output;
|
|
45700
|
+
const subtitleId = params.subtitleId;
|
|
45701
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45702
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45703
|
+
}
|
|
45704
|
+
if (typeof output === 'undefined') {
|
|
45705
|
+
throw new AppwriteException('Missing required parameter: "output"');
|
|
45706
|
+
}
|
|
45707
|
+
if (typeof subtitleId === 'undefined' || subtitleId === '') {
|
|
45708
|
+
throw new AppwriteException('Missing required parameter: "subtitleId"');
|
|
45709
|
+
}
|
|
45710
|
+
const apiPath = '/videos/{videoId}/outputs/{output}/subtitles/{subtitleId}/manifest'
|
|
45711
|
+
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45712
|
+
.replace('{output}', encodeURIComponent(String(output)))
|
|
45713
|
+
.replace('{subtitleId}', encodeURIComponent(String(subtitleId)));
|
|
45714
|
+
const apiPayload = {};
|
|
45715
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45716
|
+
apiPayload['project'] = this.client.config.project;
|
|
45717
|
+
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45718
|
+
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45719
|
+
uri.searchParams.append(key, value);
|
|
45720
|
+
}
|
|
45721
|
+
return uri.toString();
|
|
45722
|
+
}
|
|
45723
|
+
getSubtitleSegment(paramsOrFirst, ...rest) {
|
|
45724
|
+
let params;
|
|
45725
|
+
if (paramsOrFirst &&
|
|
45726
|
+
typeof paramsOrFirst === 'object' &&
|
|
45727
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45728
|
+
params = (paramsOrFirst || {});
|
|
45729
|
+
}
|
|
45730
|
+
else {
|
|
45731
|
+
params = {
|
|
45732
|
+
videoId: paramsOrFirst,
|
|
45733
|
+
output: rest[0],
|
|
45734
|
+
subtitleId: rest[1],
|
|
45735
|
+
segmentId: rest[2],
|
|
45736
|
+
};
|
|
45737
|
+
}
|
|
45738
|
+
const videoId = params.videoId;
|
|
45739
|
+
const output = params.output;
|
|
45740
|
+
const subtitleId = params.subtitleId;
|
|
45741
|
+
const segmentId = params.segmentId;
|
|
45742
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45743
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45744
|
+
}
|
|
45745
|
+
if (typeof output === 'undefined') {
|
|
45746
|
+
throw new AppwriteException('Missing required parameter: "output"');
|
|
45747
|
+
}
|
|
45748
|
+
if (typeof subtitleId === 'undefined' || subtitleId === '') {
|
|
45749
|
+
throw new AppwriteException('Missing required parameter: "subtitleId"');
|
|
45750
|
+
}
|
|
45751
|
+
if (typeof segmentId === 'undefined' || segmentId === '') {
|
|
45752
|
+
throw new AppwriteException('Missing required parameter: "segmentId"');
|
|
45753
|
+
}
|
|
45754
|
+
const apiPath = '/videos/{videoId}/outputs/{output}/subtitles/{subtitleId}/segments/{segmentId}'
|
|
45755
|
+
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45756
|
+
.replace('{output}', encodeURIComponent(String(output)))
|
|
45757
|
+
.replace('{subtitleId}', encodeURIComponent(String(subtitleId)))
|
|
45758
|
+
.replace('{segmentId}', encodeURIComponent(String(segmentId)));
|
|
45759
|
+
const apiPayload = {};
|
|
45760
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45761
|
+
apiPayload['project'] = this.client.config.project;
|
|
45762
|
+
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45763
|
+
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45764
|
+
uri.searchParams.append(key, value);
|
|
45765
|
+
}
|
|
45766
|
+
return uri.toString();
|
|
45767
|
+
}
|
|
45768
|
+
getPreview(paramsOrFirst, ...rest) {
|
|
45769
|
+
let params;
|
|
45770
|
+
if (paramsOrFirst &&
|
|
45771
|
+
typeof paramsOrFirst === 'object' &&
|
|
45772
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45773
|
+
params = (paramsOrFirst || {});
|
|
45774
|
+
}
|
|
45775
|
+
else {
|
|
45776
|
+
params = {
|
|
45777
|
+
videoId: paramsOrFirst,
|
|
45778
|
+
previewId: rest[0],
|
|
45779
|
+
width: rest[1],
|
|
45780
|
+
height: rest[2],
|
|
45781
|
+
output: rest[3],
|
|
45782
|
+
};
|
|
45783
|
+
}
|
|
45784
|
+
const videoId = params.videoId;
|
|
45785
|
+
const previewId = params.previewId;
|
|
45786
|
+
const width = params.width;
|
|
45787
|
+
const height = params.height;
|
|
45788
|
+
const output = params.output;
|
|
45789
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45790
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45791
|
+
}
|
|
45792
|
+
if (typeof previewId === 'undefined' || previewId === '') {
|
|
45793
|
+
throw new AppwriteException('Missing required parameter: "previewId"');
|
|
45794
|
+
}
|
|
45795
|
+
const apiPath = '/videos/{videoId}/previews/{previewId}'
|
|
45796
|
+
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45797
|
+
.replace('{previewId}', encodeURIComponent(String(previewId)));
|
|
45798
|
+
const apiPayload = {};
|
|
45799
|
+
if (typeof width !== 'undefined') {
|
|
45800
|
+
apiPayload['width'] = width;
|
|
45801
|
+
}
|
|
45802
|
+
if (typeof height !== 'undefined') {
|
|
45803
|
+
apiPayload['height'] = height;
|
|
45804
|
+
}
|
|
45805
|
+
if (typeof output !== 'undefined') {
|
|
45806
|
+
apiPayload['output'] = output;
|
|
45807
|
+
}
|
|
45808
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45809
|
+
apiPayload['project'] = this.client.config.project;
|
|
45810
|
+
apiPayload['impersonateuserid'] = this.client.config.impersonateuserid;
|
|
45811
|
+
for (const [key, value] of Object.entries(Client.flatten(apiPayload))) {
|
|
45812
|
+
uri.searchParams.append(key, value);
|
|
45813
|
+
}
|
|
45814
|
+
return uri.toString();
|
|
45815
|
+
}
|
|
45816
|
+
listRenditions(paramsOrFirst, ...rest) {
|
|
45817
|
+
let params;
|
|
45818
|
+
if (paramsOrFirst &&
|
|
45819
|
+
typeof paramsOrFirst === 'object' &&
|
|
45820
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45821
|
+
params = (paramsOrFirst || {});
|
|
45822
|
+
}
|
|
45823
|
+
else {
|
|
45824
|
+
params = {
|
|
45825
|
+
videoId: paramsOrFirst,
|
|
45826
|
+
output: rest[0],
|
|
45827
|
+
status: rest[1],
|
|
45828
|
+
};
|
|
45829
|
+
}
|
|
45830
|
+
const videoId = params.videoId;
|
|
45831
|
+
const output = params.output;
|
|
45832
|
+
const status = params.status;
|
|
45833
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45834
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45835
|
+
}
|
|
45836
|
+
const apiPath = '/videos/{videoId}/renditions'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45837
|
+
const apiPayload = {};
|
|
45838
|
+
if (typeof output !== 'undefined') {
|
|
45839
|
+
apiPayload['output'] = output;
|
|
45840
|
+
}
|
|
45841
|
+
if (typeof status !== 'undefined') {
|
|
45842
|
+
apiPayload['status'] = status;
|
|
45843
|
+
}
|
|
45844
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45845
|
+
const apiHeaders = {
|
|
45846
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
45847
|
+
accept: 'application/json',
|
|
45848
|
+
};
|
|
45849
|
+
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
45850
|
+
}
|
|
45851
|
+
createRendition(paramsOrFirst, ...rest) {
|
|
45852
|
+
let params;
|
|
45853
|
+
if (paramsOrFirst &&
|
|
45854
|
+
typeof paramsOrFirst === 'object' &&
|
|
45855
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45856
|
+
params = (paramsOrFirst || {});
|
|
45857
|
+
}
|
|
45858
|
+
else {
|
|
45859
|
+
params = {
|
|
45860
|
+
videoId: paramsOrFirst,
|
|
45861
|
+
profileId: rest[0],
|
|
45862
|
+
output: rest[1],
|
|
45863
|
+
};
|
|
45864
|
+
}
|
|
45865
|
+
const videoId = params.videoId;
|
|
45866
|
+
const profileId = params.profileId;
|
|
45867
|
+
const output = params.output;
|
|
45868
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45869
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45870
|
+
}
|
|
45871
|
+
if (typeof profileId === 'undefined') {
|
|
45872
|
+
throw new AppwriteException('Missing required parameter: "profileId"');
|
|
45873
|
+
}
|
|
45874
|
+
if (typeof output === 'undefined') {
|
|
45875
|
+
throw new AppwriteException('Missing required parameter: "output"');
|
|
45876
|
+
}
|
|
45877
|
+
const apiPath = '/videos/{videoId}/renditions'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45878
|
+
const apiPayload = {};
|
|
45879
|
+
if (typeof profileId !== 'undefined') {
|
|
45880
|
+
apiPayload['profileId'] = profileId;
|
|
45881
|
+
}
|
|
45882
|
+
if (typeof output !== 'undefined') {
|
|
45883
|
+
apiPayload['output'] = output;
|
|
45884
|
+
}
|
|
45885
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45886
|
+
const apiHeaders = {
|
|
45887
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
45888
|
+
'content-type': 'application/json',
|
|
45889
|
+
accept: 'application/json',
|
|
45890
|
+
};
|
|
45891
|
+
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
45892
|
+
}
|
|
45893
|
+
getRendition(paramsOrFirst, ...rest) {
|
|
45894
|
+
let params;
|
|
45895
|
+
if (paramsOrFirst &&
|
|
45896
|
+
typeof paramsOrFirst === 'object' &&
|
|
45897
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45898
|
+
params = (paramsOrFirst || {});
|
|
45899
|
+
}
|
|
45900
|
+
else {
|
|
45901
|
+
params = {
|
|
45902
|
+
videoId: paramsOrFirst,
|
|
45903
|
+
renditionId: rest[0],
|
|
45904
|
+
};
|
|
45905
|
+
}
|
|
45906
|
+
const videoId = params.videoId;
|
|
45907
|
+
const renditionId = params.renditionId;
|
|
45908
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45909
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45910
|
+
}
|
|
45911
|
+
if (typeof renditionId === 'undefined' || renditionId === '') {
|
|
45912
|
+
throw new AppwriteException('Missing required parameter: "renditionId"');
|
|
45913
|
+
}
|
|
45914
|
+
const apiPath = '/videos/{videoId}/renditions/{renditionId}'
|
|
45915
|
+
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45916
|
+
.replace('{renditionId}', encodeURIComponent(String(renditionId)));
|
|
45917
|
+
const apiPayload = {};
|
|
45918
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45919
|
+
const apiHeaders = {
|
|
45920
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
45921
|
+
accept: 'application/json',
|
|
45922
|
+
};
|
|
45923
|
+
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
45924
|
+
}
|
|
45925
|
+
deleteRendition(paramsOrFirst, ...rest) {
|
|
45926
|
+
let params;
|
|
45927
|
+
if (paramsOrFirst &&
|
|
45928
|
+
typeof paramsOrFirst === 'object' &&
|
|
45929
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45930
|
+
params = (paramsOrFirst || {});
|
|
45931
|
+
}
|
|
45932
|
+
else {
|
|
45933
|
+
params = {
|
|
45934
|
+
videoId: paramsOrFirst,
|
|
45935
|
+
renditionId: rest[0],
|
|
45936
|
+
};
|
|
45937
|
+
}
|
|
45938
|
+
const videoId = params.videoId;
|
|
45939
|
+
const renditionId = params.renditionId;
|
|
45940
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45941
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45942
|
+
}
|
|
45943
|
+
if (typeof renditionId === 'undefined' || renditionId === '') {
|
|
45944
|
+
throw new AppwriteException('Missing required parameter: "renditionId"');
|
|
45945
|
+
}
|
|
45946
|
+
const apiPath = '/videos/{videoId}/renditions/{renditionId}'
|
|
45947
|
+
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
45948
|
+
.replace('{renditionId}', encodeURIComponent(String(renditionId)));
|
|
45949
|
+
const apiPayload = {};
|
|
45950
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45951
|
+
const apiHeaders = {
|
|
45952
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
45953
|
+
'content-type': 'application/json',
|
|
45954
|
+
accept: 'application/json',
|
|
45955
|
+
};
|
|
45956
|
+
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
45957
|
+
}
|
|
45958
|
+
createSource(paramsOrFirst) {
|
|
45959
|
+
let params;
|
|
45960
|
+
if (paramsOrFirst &&
|
|
45961
|
+
typeof paramsOrFirst === 'object' &&
|
|
45962
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45963
|
+
params = (paramsOrFirst || {});
|
|
45964
|
+
}
|
|
45965
|
+
else {
|
|
45966
|
+
params = {
|
|
45967
|
+
videoId: paramsOrFirst,
|
|
45968
|
+
};
|
|
45969
|
+
}
|
|
45970
|
+
const videoId = params.videoId;
|
|
45971
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45972
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45973
|
+
}
|
|
45974
|
+
const apiPath = '/videos/{videoId}/source'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
45975
|
+
const apiPayload = {};
|
|
45976
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45977
|
+
const apiHeaders = {
|
|
45978
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
45979
|
+
'content-type': 'application/json',
|
|
45980
|
+
accept: 'application/json',
|
|
45981
|
+
};
|
|
45982
|
+
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
45983
|
+
}
|
|
45984
|
+
listSubtitles(paramsOrFirst) {
|
|
45985
|
+
let params;
|
|
45986
|
+
if (paramsOrFirst &&
|
|
45987
|
+
typeof paramsOrFirst === 'object' &&
|
|
45988
|
+
!Array.isArray(paramsOrFirst)) {
|
|
45989
|
+
params = (paramsOrFirst || {});
|
|
45990
|
+
}
|
|
45991
|
+
else {
|
|
45992
|
+
params = {
|
|
45993
|
+
videoId: paramsOrFirst,
|
|
45994
|
+
};
|
|
45995
|
+
}
|
|
45996
|
+
const videoId = params.videoId;
|
|
45997
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
45998
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
45999
|
+
}
|
|
46000
|
+
const apiPath = '/videos/{videoId}/subtitles'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
46001
|
+
const apiPayload = {};
|
|
46002
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46003
|
+
const apiHeaders = {
|
|
46004
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
46005
|
+
accept: 'application/json',
|
|
46006
|
+
};
|
|
46007
|
+
return this.client.call('get', uri, apiHeaders, apiPayload);
|
|
46008
|
+
}
|
|
46009
|
+
createSubtitle(paramsOrFirst, ...rest) {
|
|
46010
|
+
let params;
|
|
46011
|
+
if (paramsOrFirst &&
|
|
46012
|
+
typeof paramsOrFirst === 'object' &&
|
|
46013
|
+
!Array.isArray(paramsOrFirst)) {
|
|
46014
|
+
params = (paramsOrFirst || {});
|
|
46015
|
+
}
|
|
46016
|
+
else {
|
|
46017
|
+
params = {
|
|
46018
|
+
videoId: paramsOrFirst,
|
|
46019
|
+
bucketId: rest[0],
|
|
46020
|
+
fileId: rest[1],
|
|
46021
|
+
name: rest[2],
|
|
46022
|
+
code: rest[3],
|
|
46023
|
+
xdefault: rest[4],
|
|
46024
|
+
};
|
|
46025
|
+
}
|
|
46026
|
+
const videoId = params.videoId;
|
|
46027
|
+
const bucketId = params.bucketId;
|
|
46028
|
+
const fileId = params.fileId;
|
|
46029
|
+
const name = params.name;
|
|
46030
|
+
const code = params.code;
|
|
46031
|
+
const xdefault = params.xdefault;
|
|
46032
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
46033
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46034
|
+
}
|
|
46035
|
+
if (typeof bucketId === 'undefined') {
|
|
46036
|
+
throw new AppwriteException('Missing required parameter: "bucketId"');
|
|
46037
|
+
}
|
|
46038
|
+
if (typeof fileId === 'undefined') {
|
|
46039
|
+
throw new AppwriteException('Missing required parameter: "fileId"');
|
|
46040
|
+
}
|
|
46041
|
+
if (typeof name === 'undefined') {
|
|
46042
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
46043
|
+
}
|
|
46044
|
+
if (typeof code === 'undefined') {
|
|
46045
|
+
throw new AppwriteException('Missing required parameter: "code"');
|
|
46046
|
+
}
|
|
46047
|
+
const apiPath = '/videos/{videoId}/subtitles'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
46048
|
+
const apiPayload = {};
|
|
46049
|
+
if (typeof bucketId !== 'undefined') {
|
|
46050
|
+
apiPayload['bucketId'] = bucketId;
|
|
46051
|
+
}
|
|
46052
|
+
if (typeof fileId !== 'undefined') {
|
|
46053
|
+
apiPayload['fileId'] = fileId;
|
|
46054
|
+
}
|
|
46055
|
+
if (typeof name !== 'undefined') {
|
|
46056
|
+
apiPayload['name'] = name;
|
|
46057
|
+
}
|
|
46058
|
+
if (typeof code !== 'undefined') {
|
|
46059
|
+
apiPayload['code'] = code;
|
|
46060
|
+
}
|
|
46061
|
+
if (typeof xdefault !== 'undefined') {
|
|
46062
|
+
apiPayload['default'] = xdefault;
|
|
46063
|
+
}
|
|
46064
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46065
|
+
const apiHeaders = {
|
|
46066
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
46067
|
+
'content-type': 'application/json',
|
|
46068
|
+
accept: 'application/json',
|
|
46069
|
+
};
|
|
46070
|
+
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
46071
|
+
}
|
|
46072
|
+
updateSubtitle(paramsOrFirst, ...rest) {
|
|
46073
|
+
let params;
|
|
46074
|
+
if (paramsOrFirst &&
|
|
46075
|
+
typeof paramsOrFirst === 'object' &&
|
|
46076
|
+
!Array.isArray(paramsOrFirst)) {
|
|
46077
|
+
params = (paramsOrFirst || {});
|
|
46078
|
+
}
|
|
46079
|
+
else {
|
|
46080
|
+
params = {
|
|
46081
|
+
videoId: paramsOrFirst,
|
|
46082
|
+
subtitleId: rest[0],
|
|
46083
|
+
bucketId: rest[1],
|
|
46084
|
+
fileId: rest[2],
|
|
46085
|
+
name: rest[3],
|
|
46086
|
+
code: rest[4],
|
|
46087
|
+
xdefault: rest[5],
|
|
46088
|
+
};
|
|
46089
|
+
}
|
|
46090
|
+
const videoId = params.videoId;
|
|
46091
|
+
const subtitleId = params.subtitleId;
|
|
46092
|
+
const bucketId = params.bucketId;
|
|
46093
|
+
const fileId = params.fileId;
|
|
46094
|
+
const name = params.name;
|
|
46095
|
+
const code = params.code;
|
|
46096
|
+
const xdefault = params.xdefault;
|
|
46097
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
46098
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46099
|
+
}
|
|
46100
|
+
if (typeof subtitleId === 'undefined' || subtitleId === '') {
|
|
46101
|
+
throw new AppwriteException('Missing required parameter: "subtitleId"');
|
|
46102
|
+
}
|
|
46103
|
+
const apiPath = '/videos/{videoId}/subtitles/{subtitleId}'
|
|
46104
|
+
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
46105
|
+
.replace('{subtitleId}', encodeURIComponent(String(subtitleId)));
|
|
46106
|
+
const apiPayload = {};
|
|
46107
|
+
if (typeof bucketId !== 'undefined') {
|
|
46108
|
+
apiPayload['bucketId'] = bucketId;
|
|
46109
|
+
}
|
|
46110
|
+
if (typeof fileId !== 'undefined') {
|
|
46111
|
+
apiPayload['fileId'] = fileId;
|
|
46112
|
+
}
|
|
46113
|
+
if (typeof name !== 'undefined') {
|
|
46114
|
+
apiPayload['name'] = name;
|
|
46115
|
+
}
|
|
46116
|
+
if (typeof code !== 'undefined') {
|
|
46117
|
+
apiPayload['code'] = code;
|
|
46118
|
+
}
|
|
46119
|
+
if (typeof xdefault !== 'undefined') {
|
|
46120
|
+
apiPayload['default'] = xdefault;
|
|
46121
|
+
}
|
|
46122
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46123
|
+
const apiHeaders = {
|
|
46124
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
46125
|
+
'content-type': 'application/json',
|
|
46126
|
+
accept: 'application/json',
|
|
46127
|
+
};
|
|
46128
|
+
return this.client.call('patch', uri, apiHeaders, apiPayload);
|
|
46129
|
+
}
|
|
46130
|
+
deleteSubtitle(paramsOrFirst, ...rest) {
|
|
46131
|
+
let params;
|
|
46132
|
+
if (paramsOrFirst &&
|
|
46133
|
+
typeof paramsOrFirst === 'object' &&
|
|
46134
|
+
!Array.isArray(paramsOrFirst)) {
|
|
46135
|
+
params = (paramsOrFirst || {});
|
|
46136
|
+
}
|
|
46137
|
+
else {
|
|
46138
|
+
params = {
|
|
46139
|
+
videoId: paramsOrFirst,
|
|
46140
|
+
subtitleId: rest[0],
|
|
46141
|
+
};
|
|
46142
|
+
}
|
|
46143
|
+
const videoId = params.videoId;
|
|
46144
|
+
const subtitleId = params.subtitleId;
|
|
46145
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
46146
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46147
|
+
}
|
|
46148
|
+
if (typeof subtitleId === 'undefined' || subtitleId === '') {
|
|
46149
|
+
throw new AppwriteException('Missing required parameter: "subtitleId"');
|
|
46150
|
+
}
|
|
46151
|
+
const apiPath = '/videos/{videoId}/subtitles/{subtitleId}'
|
|
46152
|
+
.replace('{videoId}', encodeURIComponent(String(videoId)))
|
|
46153
|
+
.replace('{subtitleId}', encodeURIComponent(String(subtitleId)));
|
|
46154
|
+
const apiPayload = {};
|
|
46155
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46156
|
+
const apiHeaders = {
|
|
46157
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
46158
|
+
'content-type': 'application/json',
|
|
46159
|
+
accept: 'application/json',
|
|
46160
|
+
};
|
|
46161
|
+
return this.client.call('delete', uri, apiHeaders, apiPayload);
|
|
46162
|
+
}
|
|
46163
|
+
getTimeline(paramsOrFirst) {
|
|
46164
|
+
let params;
|
|
46165
|
+
if (paramsOrFirst &&
|
|
46166
|
+
typeof paramsOrFirst === 'object' &&
|
|
46167
|
+
!Array.isArray(paramsOrFirst)) {
|
|
46168
|
+
params = (paramsOrFirst || {});
|
|
46169
|
+
}
|
|
46170
|
+
else {
|
|
46171
|
+
params = {
|
|
46172
|
+
videoId: paramsOrFirst,
|
|
46173
|
+
};
|
|
46174
|
+
}
|
|
46175
|
+
const videoId = params.videoId;
|
|
46176
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
46177
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46178
|
+
}
|
|
46179
|
+
const apiPath = '/videos/{videoId}/timeline'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
46180
|
+
const apiPayload = {};
|
|
46181
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46182
|
+
const apiHeaders = {
|
|
46183
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
46184
|
+
accept: 'text/plain',
|
|
46185
|
+
};
|
|
46186
|
+
return this.client.call('get', uri, apiHeaders, apiPayload, 'text');
|
|
46187
|
+
}
|
|
46188
|
+
createTimeline(paramsOrFirst) {
|
|
46189
|
+
let params;
|
|
46190
|
+
if (paramsOrFirst &&
|
|
46191
|
+
typeof paramsOrFirst === 'object' &&
|
|
46192
|
+
!Array.isArray(paramsOrFirst)) {
|
|
46193
|
+
params = (paramsOrFirst || {});
|
|
46194
|
+
}
|
|
46195
|
+
else {
|
|
46196
|
+
params = {
|
|
46197
|
+
videoId: paramsOrFirst,
|
|
46198
|
+
};
|
|
46199
|
+
}
|
|
46200
|
+
const videoId = params.videoId;
|
|
46201
|
+
if (typeof videoId === 'undefined' || videoId === '') {
|
|
46202
|
+
throw new AppwriteException('Missing required parameter: "videoId"');
|
|
46203
|
+
}
|
|
46204
|
+
const apiPath = '/videos/{videoId}/timeline'.replace('{videoId}', encodeURIComponent(String(videoId)));
|
|
46205
|
+
const apiPayload = {};
|
|
46206
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
46207
|
+
const apiHeaders = {
|
|
46208
|
+
'X-Appwrite-Project': this.client.config.project,
|
|
46209
|
+
'content-type': 'application/json',
|
|
46210
|
+
accept: 'application/json',
|
|
46211
|
+
};
|
|
46212
|
+
return this.client.call('post', uri, apiHeaders, apiPayload);
|
|
46213
|
+
}
|
|
46214
|
+
}
|
|
46215
|
+
|
|
44581
46216
|
class Waf {
|
|
44582
46217
|
constructor(client) {
|
|
44583
46218
|
this.client = client;
|
|
@@ -48481,6 +50116,34 @@ var OAuthProvider;
|
|
|
48481
50116
|
OAuthProvider["Zoom"] = "zoom";
|
|
48482
50117
|
})(OAuthProvider || (OAuthProvider = {}));
|
|
48483
50118
|
|
|
50119
|
+
var PlatformResourceType;
|
|
50120
|
+
(function (PlatformResourceType) {
|
|
50121
|
+
PlatformResourceType["Projects"] = "projects";
|
|
50122
|
+
PlatformResourceType["Organizations"] = "organizations";
|
|
50123
|
+
PlatformResourceType["Users"] = "users";
|
|
50124
|
+
PlatformResourceType["Memberships"] = "memberships";
|
|
50125
|
+
PlatformResourceType["Rules"] = "rules";
|
|
50126
|
+
PlatformResourceType["Keys"] = "keys";
|
|
50127
|
+
PlatformResourceType["Platforms"] = "platforms";
|
|
50128
|
+
PlatformResourceType["Webhooks"] = "webhooks";
|
|
50129
|
+
PlatformResourceType["Certificates"] = "certificates";
|
|
50130
|
+
})(PlatformResourceType || (PlatformResourceType = {}));
|
|
50131
|
+
|
|
50132
|
+
var ProjectResourceType;
|
|
50133
|
+
(function (ProjectResourceType) {
|
|
50134
|
+
ProjectResourceType["Users"] = "users";
|
|
50135
|
+
ProjectResourceType["Teams"] = "teams";
|
|
50136
|
+
ProjectResourceType["Memberships"] = "memberships";
|
|
50137
|
+
ProjectResourceType["Databases"] = "databases";
|
|
50138
|
+
ProjectResourceType["Buckets"] = "buckets";
|
|
50139
|
+
ProjectResourceType["Functions"] = "functions";
|
|
50140
|
+
ProjectResourceType["Sites"] = "sites";
|
|
50141
|
+
ProjectResourceType["Deployments"] = "deployments";
|
|
50142
|
+
ProjectResourceType["Topics"] = "topics";
|
|
50143
|
+
ProjectResourceType["Providers"] = "providers";
|
|
50144
|
+
ProjectResourceType["Messages"] = "messages";
|
|
50145
|
+
})(ProjectResourceType || (ProjectResourceType = {}));
|
|
50146
|
+
|
|
48484
50147
|
var AnalyticsInterval;
|
|
48485
50148
|
(function (AnalyticsInterval) {
|
|
48486
50149
|
AnalyticsInterval["OneHour"] = "1h";
|
|
@@ -49330,6 +50993,13 @@ var QuerySuggestionResource;
|
|
|
49330
50993
|
QuerySuggestionResource["ResourceTokens"] = "resourcetokens";
|
|
49331
50994
|
QuerySuggestionResource["Transactions"] = "transactions";
|
|
49332
50995
|
QuerySuggestionResource["TransactionLogs"] = "transactionlogs";
|
|
50996
|
+
QuerySuggestionResource["Videos"] = "videos";
|
|
50997
|
+
QuerySuggestionResource["VideosPreviews"] = "videos_previews";
|
|
50998
|
+
QuerySuggestionResource["VideosRenditions"] = "videos_renditions";
|
|
50999
|
+
QuerySuggestionResource["VideosRenditionsSegments"] = "videos_renditions_segments";
|
|
51000
|
+
QuerySuggestionResource["VideosProfiles"] = "videos_profiles";
|
|
51001
|
+
QuerySuggestionResource["VideosSubtitles"] = "videos_subtitles";
|
|
51002
|
+
QuerySuggestionResource["VideosSubtitlesSegments"] = "videos_subtitles_segments";
|
|
49333
51003
|
QuerySuggestionResource["AnalyticsProperties"] = "analyticsproperties";
|
|
49334
51004
|
QuerySuggestionResource["DedicatedDatabases"] = "dedicateddatabases";
|
|
49335
51005
|
QuerySuggestionResource["DedicatedDatabaseConfigs"] = "dedicateddatabaseconfigs";
|
|
@@ -49753,6 +51423,8 @@ var ProjectKeyScopes;
|
|
|
49753
51423
|
ProjectKeyScopes["ReportsWrite"] = "reports.write";
|
|
49754
51424
|
ProjectKeyScopes["PresencesRead"] = "presences.read";
|
|
49755
51425
|
ProjectKeyScopes["PresencesWrite"] = "presences.write";
|
|
51426
|
+
ProjectKeyScopes["VideosRead"] = "videos.read";
|
|
51427
|
+
ProjectKeyScopes["VideosWrite"] = "videos.write";
|
|
49756
51428
|
ProjectKeyScopes["DedicatedDatabasesExecute"] = "dedicatedDatabases.execute";
|
|
49757
51429
|
ProjectKeyScopes["BackupsPoliciesRead"] = "backups.policies.read";
|
|
49758
51430
|
ProjectKeyScopes["BackupsPoliciesWrite"] = "backups.policies.write";
|
|
@@ -50022,6 +51694,7 @@ var ProjectAuthMethodId;
|
|
|
50022
51694
|
ProjectAuthMethodId["Invites"] = "invites";
|
|
50023
51695
|
ProjectAuthMethodId["Jwt"] = "jwt";
|
|
50024
51696
|
ProjectAuthMethodId["Phone"] = "phone";
|
|
51697
|
+
ProjectAuthMethodId["Passkey"] = "passkey";
|
|
50025
51698
|
})(ProjectAuthMethodId || (ProjectAuthMethodId = {}));
|
|
50026
51699
|
|
|
50027
51700
|
var ProjectOAuth2Auth0Prompt;
|
|
@@ -50163,6 +51836,7 @@ var ProjectPolicyId;
|
|
|
50163
51836
|
ProjectPolicyId["Denydisposableemail"] = "deny-disposable-email";
|
|
50164
51837
|
ProjectPolicyId["Denyfreeemail"] = "deny-free-email";
|
|
50165
51838
|
ProjectPolicyId["Denycorporateemail"] = "deny-corporate-email";
|
|
51839
|
+
ProjectPolicyId["Passkey"] = "passkey";
|
|
50166
51840
|
})(ProjectPolicyId || (ProjectPolicyId = {}));
|
|
50167
51841
|
|
|
50168
51842
|
var ProjectProtocolId;
|
|
@@ -50625,6 +52299,24 @@ var VectorsDBIndexType;
|
|
|
50625
52299
|
VectorsDBIndexType["Unique"] = "unique";
|
|
50626
52300
|
})(VectorsDBIndexType || (VectorsDBIndexType = {}));
|
|
50627
52301
|
|
|
52302
|
+
var VideoOutput;
|
|
52303
|
+
(function (VideoOutput) {
|
|
52304
|
+
VideoOutput["Hls"] = "hls";
|
|
52305
|
+
VideoOutput["Dash"] = "dash";
|
|
52306
|
+
VideoOutput["Cmaf"] = "cmaf";
|
|
52307
|
+
})(VideoOutput || (VideoOutput = {}));
|
|
52308
|
+
|
|
52309
|
+
var VideoRenditionStatus;
|
|
52310
|
+
(function (VideoRenditionStatus) {
|
|
52311
|
+
VideoRenditionStatus["Pending"] = "pending";
|
|
52312
|
+
VideoRenditionStatus["Started"] = "started";
|
|
52313
|
+
VideoRenditionStatus["Ended"] = "ended";
|
|
52314
|
+
VideoRenditionStatus["Uploading"] = "uploading";
|
|
52315
|
+
VideoRenditionStatus["Ready"] = "ready";
|
|
52316
|
+
VideoRenditionStatus["Error"] = "error";
|
|
52317
|
+
VideoRenditionStatus["Aborted"] = "aborted";
|
|
52318
|
+
})(VideoRenditionStatus || (VideoRenditionStatus = {}));
|
|
52319
|
+
|
|
50628
52320
|
var DatabaseType;
|
|
50629
52321
|
(function (DatabaseType) {
|
|
50630
52322
|
DatabaseType["Legacy"] = "legacy";
|
|
@@ -50859,5 +52551,5 @@ var WafRuleAction;
|
|
|
50859
52551
|
WafRuleAction["Redirect"] = "redirect";
|
|
50860
52552
|
})(WafRuleAction || (WafRuleAction = {}));
|
|
50861
52553
|
|
|
50862
|
-
export { Account, AccountKeyScopes, Activities, Adapter, AddonKey, Advisor, Affiliates, Analytics, AnalyticsDimension, AnalyticsInterval, AnalyticsTracking, Apps, AppwriteException, AppwriteMigrationResource, Assistant, AttributeStatus, AuthenticationFactor, AuthenticatorType, Avatars, BackupServices, Backups, BillingPlanGroup, BlockMode, BlockResourceType, Browser, BrowserPermission, BrowserTheme, BuildRuntime, CacheDatabase, CacheTarget, Channel, Client, ColumnStatus, Compression, Condition, Console, ConsoleResourceType, ConversationType, CreditCard, DatabaseStatus, DatabaseType, Databases, DatabasesIndexType, DeploymentDownloadType, DeploymentStatus, DetectionFrameworkType, DetectionRuntimeType, DocumentsDB, DocumentsDBIndexType, DomainPurchaseStatus, DomainRegistrationType, DomainSuggestionType, DomainTransferStatusEnum, Domains, EmbeddingModel, Embeddings, ExecutionMethod, ExecutionResourceType, ExecutionStatus, ExecutionTrigger, FirebaseMigrationResource, Flag, Framework, FunctionTemplateUseCase, Functions, Graphql, Growth, ID, IdTokenProvider, ImageFormat, ImageGravity, IndexStatus, InvalidationType, Locale, Manager, MessagePriority, MessageStatus, Messaging, MessagingProviderType, Migrations, Mongo, Mysql, NHostMigrationResource, Notifications, OAuth2Auth0Prompt, OAuth2DiscordPrompt, OAuth2GithubPrompt, OAuth2GooglePrompt, OAuth2KakaoPrompt, OAuth2MicrosoftPrompt, OAuth2OidcPrompt, OAuth2OktaPrompt, OAuth2SalesforcePrompt, OAuth2ZohoPrompt, OAuthProvider, Oauth2, OnDuplicate, Operator, OrderBy, Organization, OrganizationKeyScopes, Organizations, PasswordHash, Permission, Platform, PlatformType, Postgresql, Presences, Project, ProjectAuthMethodId, ProjectEmailTemplateId, ProjectEmailTemplateLocale, ProjectKeyScopes, ProjectOAuth2Auth0Prompt, ProjectOAuth2DiscordPrompt, ProjectOAuth2GitHubPrompt, ProjectOAuth2GooglePrompt, ProjectOAuth2KakaoPrompt, ProjectOAuth2MicrosoftPrompt, ProjectOAuth2OidcPrompt, ProjectOAuth2OktaPrompt, ProjectOAuth2SalesforcePrompt, ProjectOAuth2ZohoPrompt, ProjectOAuthProviderId, ProjectPolicyId, ProjectProtocolId, ProjectSMTPSecure, ProjectServiceId, Projects, Proxy, ProxyResourceType, ProxyRuleDeploymentResourceType, ProxyRuleStatus, Push, Query, QuerySuggestionResource, Realtime, Region, RelationMutate, RelationshipType, ResolvedTopic, Role, Runtime, ScheduleResourceType, SiteTemplateUseCase, Sites, SmtpEncryption, Status, StatusCode, Storage, SupabaseMigrationResource, TablesDB, TablesDBIndexType, Teams, TemplateReferenceType, Timezone, Tokens, Topic, Usage, UsageEventDimension, UsageEventMetric, UsageGaugeDimension, UsageGaugeMetric, UsageInterval, UsageOrderBy, UsageOrderDirection, UsageRange, Users, VCSDetectionType, VCSReferenceType, Vcs, VectorsDB, VectorsDBIndexType, Waf, WafRuleAction, Webhooks };
|
|
52554
|
+
export { Account, AccountKeyScopes, Activities, Adapter, AddonKey, Admin, Advisor, Affiliates, Analytics, AnalyticsDimension, AnalyticsInterval, AnalyticsTracking, Apps, AppwriteException, AppwriteMigrationResource, Assistant, AttributeStatus, AuthenticationFactor, AuthenticatorType, Avatars, BackupServices, Backups, BillingPlanGroup, BlockMode, BlockResourceType, Browser, BrowserPermission, BrowserTheme, BuildRuntime, CacheDatabase, CacheTarget, Channel, Client, ColumnStatus, Compression, Condition, Console, ConsoleResourceType, ConversationType, CreditCard, DatabaseStatus, DatabaseType, Databases, DatabasesIndexType, DeploymentDownloadType, DeploymentStatus, DetectionFrameworkType, DetectionRuntimeType, DocumentsDB, DocumentsDBIndexType, DomainPurchaseStatus, DomainRegistrationType, DomainSuggestionType, DomainTransferStatusEnum, Domains, EmbeddingModel, Embeddings, ExecutionMethod, ExecutionResourceType, ExecutionStatus, ExecutionTrigger, FirebaseMigrationResource, Flag, Framework, FunctionTemplateUseCase, Functions, Graphql, Growth, ID, IdTokenProvider, ImageFormat, ImageGravity, IndexStatus, InvalidationType, Locale, Manager, MessagePriority, MessageStatus, Messaging, MessagingProviderType, Migrations, Mongo, Mysql, NHostMigrationResource, Notifications, OAuth2Auth0Prompt, OAuth2DiscordPrompt, OAuth2GithubPrompt, OAuth2GooglePrompt, OAuth2KakaoPrompt, OAuth2MicrosoftPrompt, OAuth2OidcPrompt, OAuth2OktaPrompt, OAuth2SalesforcePrompt, OAuth2ZohoPrompt, OAuthProvider, Oauth2, OnDuplicate, Operator, OrderBy, Organization, OrganizationKeyScopes, Organizations, PasswordHash, Permission, Platform, PlatformResourceType, PlatformType, Postgresql, Presences, Project, ProjectAuthMethodId, ProjectEmailTemplateId, ProjectEmailTemplateLocale, ProjectKeyScopes, ProjectOAuth2Auth0Prompt, ProjectOAuth2DiscordPrompt, ProjectOAuth2GitHubPrompt, ProjectOAuth2GooglePrompt, ProjectOAuth2KakaoPrompt, ProjectOAuth2MicrosoftPrompt, ProjectOAuth2OidcPrompt, ProjectOAuth2OktaPrompt, ProjectOAuth2SalesforcePrompt, ProjectOAuth2ZohoPrompt, ProjectOAuthProviderId, ProjectPolicyId, ProjectProtocolId, ProjectResourceType, ProjectSMTPSecure, ProjectServiceId, Projects, Proxy, ProxyResourceType, ProxyRuleDeploymentResourceType, ProxyRuleStatus, Push, Query, QuerySuggestionResource, Realtime, Region, RelationMutate, RelationshipType, ResolvedTopic, Role, Runtime, ScheduleResourceType, SiteTemplateUseCase, Sites, SmtpEncryption, Status, StatusCode, Storage, SupabaseMigrationResource, TablesDB, TablesDBIndexType, Teams, TemplateReferenceType, Timezone, Tokens, Topic, Usage, UsageEventDimension, UsageEventMetric, UsageGaugeDimension, UsageGaugeMetric, UsageInterval, UsageOrderBy, UsageOrderDirection, UsageRange, Users, VCSDetectionType, VCSReferenceType, Vcs, VectorsDB, VectorsDBIndexType, VideoOutput, VideoRenditionStatus, Videos, Waf, WafRuleAction, Webhooks };
|
|
50863
52555
|
//# sourceMappingURL=sdk.js.map
|