curtain-web-api 1.0.69 → 1.0.70

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.
@@ -34,6 +34,8 @@ export interface CurtainChunkedUploadRequest {
34
34
  encrypted?: boolean;
35
35
  expiry_duration?: number;
36
36
  enable?: boolean;
37
+ curtain_id?: number;
38
+ link_id?: string;
37
39
  }
38
40
  export interface CurtainChunkedUploadResponse {
39
41
  id: string;
@@ -48,6 +50,8 @@ export interface CurtainChunkedUploadCompletionRequest {
48
50
  encrypted?: boolean;
49
51
  expiry_duration?: number;
50
52
  enable?: boolean;
53
+ curtain_id?: number;
54
+ link_id?: string;
51
55
  }
52
56
  export interface CurtainChunkedUploadCompletionResponse {
53
57
  curtain?: any;
@@ -170,6 +174,8 @@ export declare class CurtainWebAPI {
170
174
  enable?: boolean;
171
175
  upload_session_id?: string;
172
176
  onProgress?: (progress: number) => void;
177
+ curtain_id?: number;
178
+ link_id?: string;
173
179
  }): Promise<CurtainChunkedUploadCompletionResponse>;
174
180
  getAnnouncements(limit?: number, offset?: number): Promise<import("axios").AxiosResponse<{
175
181
  count: number;
@@ -708,6 +708,12 @@ export class CurtainWebAPI {
708
708
  if (request?.enable !== undefined) {
709
709
  formData.append('enable', request.enable.toString());
710
710
  }
711
+ if (request?.curtain_id !== undefined) {
712
+ formData.append('curtain_id', request.curtain_id.toString());
713
+ }
714
+ if (request?.link_id) {
715
+ formData.append('link_id', request.link_id);
716
+ }
711
717
  let headers = new AxiosHeaders();
712
718
  headers["Accept"] = "application/json";
713
719
  return this.axiosInstance.put(`${this.baseURL}curtain-chunked-upload/${uploadId}/`, formData, { headers: headers });
@@ -741,7 +747,9 @@ export class CurtainWebAPI {
741
747
  permanent: options?.permanent,
742
748
  encrypted: options?.encrypted,
743
749
  expiry_duration: options?.expiry_duration,
744
- enable: options?.enable
750
+ enable: options?.enable,
751
+ curtain_id: options?.curtain_id,
752
+ link_id: options?.link_id
745
753
  });
746
754
  resolve(completionResponse.data);
747
755
  }
@@ -760,7 +768,9 @@ export class CurtainWebAPI {
760
768
  permanent: options?.permanent,
761
769
  encrypted: options?.encrypted,
762
770
  expiry_duration: options?.expiry_duration,
763
- enable: options?.enable
771
+ enable: options?.enable,
772
+ curtain_id: options?.curtain_id,
773
+ link_id: options?.link_id
764
774
  });
765
775
  resolve(completionResponse.data);
766
776
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "curtain-web-api",
3
- "version": "1.0.69",
3
+ "version": "1.0.70",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",
@@ -64,6 +64,8 @@ export interface CurtainChunkedUploadRequest {
64
64
  encrypted?: boolean;
65
65
  expiry_duration?: number;
66
66
  enable?: boolean;
67
+ curtain_id?: number;
68
+ link_id?: string;
67
69
  }
68
70
 
69
71
  export interface CurtainChunkedUploadResponse {
@@ -80,6 +82,8 @@ export interface CurtainChunkedUploadCompletionRequest {
80
82
  encrypted?: boolean;
81
83
  expiry_duration?: number;
82
84
  enable?: boolean;
85
+ curtain_id?: number;
86
+ link_id?: string;
83
87
  }
84
88
 
85
89
  export interface CurtainChunkedUploadCompletionResponse {
@@ -888,6 +892,12 @@ export class CurtainWebAPI {
888
892
  if (request?.enable !== undefined) {
889
893
  formData.append('enable', request.enable.toString());
890
894
  }
895
+ if (request?.curtain_id !== undefined) {
896
+ formData.append('curtain_id', request.curtain_id.toString());
897
+ }
898
+ if (request?.link_id) {
899
+ formData.append('link_id', request.link_id);
900
+ }
891
901
 
892
902
  let headers = new AxiosHeaders();
893
903
  headers["Accept"] = "application/json";
@@ -912,6 +922,8 @@ export class CurtainWebAPI {
912
922
  enable?: boolean;
913
923
  upload_session_id?: string;
914
924
  onProgress?: (progress: number) => void;
925
+ curtain_id?: number;
926
+ link_id?: string;
915
927
  }
916
928
  ): Promise<CurtainChunkedUploadCompletionResponse> {
917
929
  return new Promise(async (resolve, reject) => {
@@ -939,7 +951,9 @@ export class CurtainWebAPI {
939
951
  permanent: options?.permanent,
940
952
  encrypted: options?.encrypted,
941
953
  expiry_duration: options?.expiry_duration,
942
- enable: options?.enable
954
+ enable: options?.enable,
955
+ curtain_id: options?.curtain_id,
956
+ link_id: options?.link_id
943
957
  });
944
958
  resolve(completionResponse.data);
945
959
  } catch (error) {
@@ -958,7 +972,9 @@ export class CurtainWebAPI {
958
972
  permanent: options?.permanent,
959
973
  encrypted: options?.encrypted,
960
974
  expiry_duration: options?.expiry_duration,
961
- enable: options?.enable
975
+ enable: options?.enable,
976
+ curtain_id: options?.curtain_id,
977
+ link_id: options?.link_id
962
978
  });
963
979
  resolve(completionResponse.data);
964
980
  } catch (error) {