curtain-web-api 1.0.80 → 1.0.81

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.
@@ -13,6 +13,7 @@ export interface SiteProperties {
13
13
  jwt_remember_me_refresh_token_lifetime_days: number;
14
14
  umami_website_id?: string;
15
15
  umami_url?: string;
16
+ orcid_client_id?: string;
16
17
  }
17
18
  export interface CurtainChunkedUploadStatus {
18
19
  id: string;
@@ -46,6 +47,7 @@ export interface CurtainChunkedUploadResponse {
46
47
  }
47
48
  export interface CurtainChunkedUploadCompletionRequest {
48
49
  md5?: string;
50
+ name?: string;
49
51
  description?: string;
50
52
  curtain_type?: string;
51
53
  permanent?: boolean;
@@ -177,7 +179,7 @@ export declare class CurtainWebAPI {
177
179
  ORCIDLogin(authorizationCode: string, redirectURI: string, remember_me?: boolean): Promise<User>;
178
180
  checkIfRefreshTokenExpired(): boolean;
179
181
  deleteCurtainLink(curtainLinkID: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
180
- putSettings(settings: any, enable?: boolean, description?: string, sessionType?: string, encryption?: CurtainEncryption, permanent?: boolean, expiry_duration?: number, onUploadProgress?: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
182
+ putSettings(settings: any, enable?: boolean, description?: string, sessionType?: string, encryption?: CurtainEncryption, permanent?: boolean, expiry_duration?: number, onUploadProgress?: any, name?: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
181
183
  postSettings(id: string, token: string, onDownloadProgress?: any, url?: string | undefined): Promise<import("axios").AxiosResponse<any, any, {}>>;
182
184
  getPrideData(accession: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
183
185
  generateTemporarySession(linkId: string, lifetime: number): Promise<import("axios").AxiosResponse<any, any, {}>>;
@@ -187,7 +189,7 @@ export declare class CurtainWebAPI {
187
189
  getOwners(linkId: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
188
190
  addOwner(linkId: string, owner: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
189
191
  removeOwner(linkId: string, owner: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
190
- getCurtainLinks(username: string, sessionDescription?: string, offset?: number, sessionType?: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
192
+ getCurtainLinks(username: string, sessionName?: string, offset?: number, sessionType?: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
191
193
  getSiteProperties(appType?: string): Promise<import("axios").AxiosResponse<SiteProperties, any, {}>>;
192
194
  saveDataFilterList(name: string, data: string, category?: string): Promise<import("axios").AxiosResponse<any, any, {}>>;
193
195
  getDataFilterListByID(id: number, limit?: number): Promise<import("axios").AxiosResponse<any, any, {}>>;
@@ -234,6 +236,7 @@ export declare class CurtainWebAPI {
234
236
  completeCurtainUpload(uploadId: string, request?: CurtainChunkedUploadCompletionRequest): Promise<import("axios").AxiosResponse<CurtainChunkedUploadCompletionResponse, any, {}>>;
235
237
  cancelCurtainUpload(uploadId: string): Promise<import("axios").AxiosResponse<void, any, {}>>;
236
238
  uploadCurtainFileInChunks(file: File, chunkSize?: number, options?: {
239
+ name?: string;
237
240
  description?: string;
238
241
  curtain_type?: string;
239
242
  permanent?: boolean;
@@ -197,7 +197,7 @@ export class CurtainWebAPI {
197
197
  async putSettings(settings, enable = true, description = "", sessionType = "TP", encryption = {
198
198
  encrypted: false,
199
199
  e2e: false,
200
- }, permanent = false, expiry_duration, onUploadProgress = undefined) {
200
+ }, permanent = false, expiry_duration, onUploadProgress = undefined, name) {
201
201
  let form = new FormData();
202
202
  let data = JSON.stringify(settings, replacer);
203
203
  if (enable) {
@@ -248,6 +248,9 @@ export class CurtainWebAPI {
248
248
  else {
249
249
  form.append("file", new Blob([data], { type: 'text/json' }), "curtain-settings.json");
250
250
  }
251
+ if (name) {
252
+ form.append("name", name);
253
+ }
251
254
  form.append("description", description);
252
255
  form.append("curtain_type", sessionType);
253
256
  let headers = new AxiosHeaders();
@@ -407,12 +410,12 @@ export class CurtainWebAPI {
407
410
  return response;
408
411
  });
409
412
  }
410
- getCurtainLinks(username, sessionDescription = "", offset = 0, sessionType = "TP") {
413
+ getCurtainLinks(username, sessionName = "", offset = 0, sessionType = "TP") {
411
414
  let headers = new AxiosHeaders();
412
415
  headers["Accept"] = "application/json";
413
416
  let params = new URLSearchParams();
414
417
  params.append("username", username);
415
- params.append("description", sessionDescription);
418
+ params.append("name", sessionName);
416
419
  params.append("offset", offset.toString());
417
420
  params.append("curtain_type", sessionType);
418
421
  params.append("ordering", "-created");
@@ -772,6 +775,9 @@ export class CurtainWebAPI {
772
775
  if (request?.md5) {
773
776
  formData.append('md5', request.md5);
774
777
  }
778
+ if (request?.name) {
779
+ formData.append('name', request.name);
780
+ }
775
781
  if (request?.description) {
776
782
  formData.append('description', request.description);
777
783
  }
@@ -824,6 +830,7 @@ export class CurtainWebAPI {
824
830
  enable: options?.enable
825
831
  });
826
832
  const completionResponse = await this.completeCurtainUpload(response.data.id, {
833
+ name: options?.name,
827
834
  description: options?.description,
828
835
  curtain_type: options?.curtain_type,
829
836
  permanent: options?.permanent,
@@ -845,6 +852,7 @@ export class CurtainWebAPI {
845
852
  if (uploadId) {
846
853
  try {
847
854
  const completionResponse = await this.completeCurtainUpload(uploadId, {
855
+ name: options?.name,
848
856
  description: options?.description,
849
857
  curtain_type: options?.curtain_type,
850
858
  permanent: options?.permanent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "curtain-web-api",
3
- "version": "1.0.80",
3
+ "version": "1.0.81",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",
@@ -42,6 +42,7 @@ export interface SiteProperties {
42
42
  jwt_remember_me_refresh_token_lifetime_days: number;
43
43
  umami_website_id?: string;
44
44
  umami_url?: string;
45
+ orcid_client_id?: string;
45
46
  }
46
47
 
47
48
  export interface CurtainChunkedUploadStatus {
@@ -79,6 +80,7 @@ export interface CurtainChunkedUploadResponse {
79
80
 
80
81
  export interface CurtainChunkedUploadCompletionRequest {
81
82
  md5?: string;
83
+ name?: string;
82
84
  description?: string;
83
85
  curtain_type?: string;
84
86
  permanent?: boolean;
@@ -394,7 +396,7 @@ export class CurtainWebAPI {
394
396
  async putSettings(settings: any, enable: boolean = true, description: string = "", sessionType: string = "TP", encryption: CurtainEncryption = {
395
397
  encrypted: false,
396
398
  e2e: false,
397
- }, permanent: boolean = false, expiry_duration?: number, onUploadProgress: any = undefined) {
399
+ }, permanent: boolean = false, expiry_duration?: number, onUploadProgress: any = undefined, name?: string) {
398
400
  let form: FormData = new FormData();
399
401
  let data = JSON.stringify(settings, replacer)
400
402
  if (enable) {
@@ -441,6 +443,9 @@ export class CurtainWebAPI {
441
443
  form.append("file", new Blob([data], {type: 'text/json'}), "curtain-settings.json")
442
444
  }
443
445
 
446
+ if (name) {
447
+ form.append("name", name)
448
+ }
444
449
  form.append("description", description)
445
450
  form.append("curtain_type", sessionType)
446
451
  let headers = new AxiosHeaders();
@@ -614,12 +619,12 @@ export class CurtainWebAPI {
614
619
  })
615
620
  }
616
621
 
617
- getCurtainLinks(username: string, sessionDescription: string = "", offset: number = 0, sessionType: string = "TP") {
622
+ getCurtainLinks(username: string, sessionName: string = "", offset: number = 0, sessionType: string = "TP") {
618
623
  let headers = new AxiosHeaders();
619
624
  headers["Accept"] = "application/json";
620
625
  let params: URLSearchParams = new URLSearchParams();
621
626
  params.append("username", username);
622
- params.append("description", sessionDescription);
627
+ params.append("name", sessionName);
623
628
  params.append("offset", offset.toString());
624
629
  params.append("curtain_type", sessionType);
625
630
  params.append("ordering", "-created");
@@ -1035,6 +1040,9 @@ export class CurtainWebAPI {
1035
1040
  if (request?.md5) {
1036
1041
  formData.append('md5', request.md5);
1037
1042
  }
1043
+ if (request?.name) {
1044
+ formData.append('name', request.name);
1045
+ }
1038
1046
  if (request?.description) {
1039
1047
  formData.append('description', request.description);
1040
1048
  }
@@ -1075,6 +1083,7 @@ export class CurtainWebAPI {
1075
1083
  file: File,
1076
1084
  chunkSize: number = 1024 * 1024,
1077
1085
  options?: {
1086
+ name?: string;
1078
1087
  description?: string;
1079
1088
  curtain_type?: string;
1080
1089
  permanent?: boolean;
@@ -1107,6 +1116,7 @@ export class CurtainWebAPI {
1107
1116
  });
1108
1117
 
1109
1118
  const completionResponse = await this.completeCurtainUpload(response.data.id, {
1119
+ name: options?.name,
1110
1120
  description: options?.description,
1111
1121
  curtain_type: options?.curtain_type,
1112
1122
  permanent: options?.permanent,
@@ -1128,6 +1138,7 @@ export class CurtainWebAPI {
1128
1138
  if (uploadId) {
1129
1139
  try {
1130
1140
  const completionResponse = await this.completeCurtainUpload(uploadId, {
1141
+ name: options?.name,
1131
1142
  description: options?.description,
1132
1143
  curtain_type: options?.curtain_type,
1133
1144
  permanent: options?.permanent,