@brifle/brifle-sdk 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/endpoints/v1/content.d.ts +16 -1
- package/dist/cjs/endpoints/v1/requests/content.d.ts +12 -1
- package/dist/cjs/endpoints/v1/responses/content.d.ts +9 -1
- package/dist/cjs/index.js +36 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/endpoints/v1/content.js +36 -0
- package/dist/esm/endpoints/v1/content.d.ts +16 -1
- package/dist/esm/endpoints/v1/requests/content.d.ts +12 -1
- package/dist/esm/endpoints/v1/responses/content.d.ts +9 -1
- package/dist/esm/index.mjs +36 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/index.d.ts +37 -2
- package/dist/types/endpoints/v1/content.d.ts +16 -1
- package/dist/types/endpoints/v1/requests/content.d.ts +12 -1
- package/dist/types/endpoints/v1/responses/content.d.ts +9 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiResponse } from "./apiResponse";
|
|
2
|
-
import { CheckReceiverResponse, ContentActionsResponse, ContentResponse, SendContentResponse } from "./responses/content";
|
|
2
|
+
import { CheckReceiverResponse, ContentActionsResponse, ContentResponse, CoverLetterOverviewResponse, SendContentResponse } from "./responses/content";
|
|
3
3
|
import { ApiV1 } from "../../api/api";
|
|
4
4
|
import { ReceiverRequest, SendContentRequest } from "./requests/content";
|
|
5
5
|
declare class ContentEndpoints {
|
|
@@ -38,5 +38,20 @@ declare class ContentEndpoints {
|
|
|
38
38
|
* @returns
|
|
39
39
|
*/
|
|
40
40
|
sendContent(tenantId: string, request: SendContentRequest): Promise<ApiResponse<SendContentResponse>>;
|
|
41
|
+
/**
|
|
42
|
+
* list all cover letters for a tenant
|
|
43
|
+
* @param tenantId - The tenant id
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
listCoverLetters(tenantId: string): Promise<ApiResponse<CoverLetterOverviewResponse>>;
|
|
47
|
+
/**
|
|
48
|
+
* get the content of a cover letter
|
|
49
|
+
* @param tenantId - The tenant id
|
|
50
|
+
* @param type - The type of the cover letter (custom | default)
|
|
51
|
+
* @param name - The name of the cover letter
|
|
52
|
+
* @param encoding - The encoding of the cover letter (base64 | pdf)
|
|
53
|
+
* @returns
|
|
54
|
+
*/
|
|
55
|
+
getCoverLetterContent(tenantId: string, type: 'custom' | 'default', name: string, encoding: 'base64' | 'pdf'): Promise<import("axios").AxiosResponse<Blob, any>>;
|
|
41
56
|
}
|
|
42
57
|
export { ContentEndpoints };
|
|
@@ -9,6 +9,17 @@ interface ReceiverRequest {
|
|
|
9
9
|
last_name?: string;
|
|
10
10
|
full_name?: string;
|
|
11
11
|
date_of_birth?: string;
|
|
12
|
+
postal_address?: PostalAddress;
|
|
13
|
+
}
|
|
14
|
+
interface PostalAddress {
|
|
15
|
+
city: string;
|
|
16
|
+
country: string;
|
|
17
|
+
date_of_birth?: string;
|
|
18
|
+
first_name: string;
|
|
19
|
+
house_number: string;
|
|
20
|
+
last_name: string;
|
|
21
|
+
postcode: string;
|
|
22
|
+
street: string;
|
|
12
23
|
}
|
|
13
24
|
interface BirthInformation {
|
|
14
25
|
birth_name?: string;
|
|
@@ -17,7 +28,7 @@ interface BirthInformation {
|
|
|
17
28
|
nationality?: string;
|
|
18
29
|
given_names?: string;
|
|
19
30
|
last_name?: string;
|
|
20
|
-
|
|
31
|
+
postal_address?: string;
|
|
21
32
|
}
|
|
22
33
|
interface PaymentDetails {
|
|
23
34
|
amount: number;
|
|
@@ -41,6 +41,14 @@ interface ContentActionsPaymentResponse {
|
|
|
41
41
|
};
|
|
42
42
|
link: string;
|
|
43
43
|
}
|
|
44
|
+
interface CoverLetterOverviewItem {
|
|
45
|
+
type: string;
|
|
46
|
+
name: string;
|
|
47
|
+
display_name: string;
|
|
48
|
+
}
|
|
49
|
+
interface CoverLetterOverviewResponse {
|
|
50
|
+
cover_letters: CoverLetterOverviewItem[];
|
|
51
|
+
}
|
|
44
52
|
interface EmbbededSignatureResponse {
|
|
45
53
|
id: string;
|
|
46
54
|
created_by: string;
|
|
@@ -70,4 +78,4 @@ interface ContentActionsResponse {
|
|
|
70
78
|
payments: ContentActionsPaymentResponse;
|
|
71
79
|
signatures: ContentActionsSignatureResponse;
|
|
72
80
|
}
|
|
73
|
-
export type { EmbbededSignatureResponse, Content, ContentActionsSignatureResponse, ContentActionsPaymentResponse, SendContentResponse, CheckReceiverResponse, ContentMeta, ContentResponse, ContentActionsResponse };
|
|
81
|
+
export type { EmbbededSignatureResponse, Content, CoverLetterOverviewResponse, CoverLetterOverviewItem, ContentActionsSignatureResponse, ContentActionsPaymentResponse, SendContentResponse, CheckReceiverResponse, ContentMeta, ContentResponse, ContentActionsResponse };
|
package/dist/cjs/index.js
CHANGED
|
@@ -199,6 +199,42 @@ class ContentEndpoints {
|
|
|
199
199
|
return ApiResponse.errorAxios(error);
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
|
+
/**
|
|
203
|
+
* list all cover letters for a tenant
|
|
204
|
+
* @param tenantId - The tenant id
|
|
205
|
+
* @returns
|
|
206
|
+
*/
|
|
207
|
+
listCoverLetters(tenantId) {
|
|
208
|
+
const path = this.getPath(`cover_letters/${tenantId}/list`);
|
|
209
|
+
return axios.get(path, {
|
|
210
|
+
headers: {
|
|
211
|
+
"Authorization": `Bearer ${this.state.auth_token}`
|
|
212
|
+
}
|
|
213
|
+
})
|
|
214
|
+
.then((response) => {
|
|
215
|
+
return ApiResponse.success(response.data);
|
|
216
|
+
})
|
|
217
|
+
.catch((error) => {
|
|
218
|
+
return ApiResponse.errorAxios(error);
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* get the content of a cover letter
|
|
223
|
+
* @param tenantId - The tenant id
|
|
224
|
+
* @param type - The type of the cover letter (custom | default)
|
|
225
|
+
* @param name - The name of the cover letter
|
|
226
|
+
* @param encoding - The encoding of the cover letter (base64 | pdf)
|
|
227
|
+
* @returns
|
|
228
|
+
*/
|
|
229
|
+
getCoverLetterContent(tenantId, type, name, encoding) {
|
|
230
|
+
const path = this.getPath(`cover_letter/${tenantId}/${type}/${name}/${encoding}`);
|
|
231
|
+
return axios.get(path, {
|
|
232
|
+
headers: {
|
|
233
|
+
"Authorization": `Bearer ${this.state.auth_token}`
|
|
234
|
+
},
|
|
235
|
+
responseType: 'blob'
|
|
236
|
+
});
|
|
237
|
+
}
|
|
202
238
|
}
|
|
203
239
|
|
|
204
240
|
class SignaturesEndpoint {
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -91,5 +91,41 @@ class ContentEndpoints {
|
|
|
91
91
|
return ApiResponse.errorAxios(error);
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* list all cover letters for a tenant
|
|
96
|
+
* @param tenantId - The tenant id
|
|
97
|
+
* @returns
|
|
98
|
+
*/
|
|
99
|
+
listCoverLetters(tenantId) {
|
|
100
|
+
const path = this.getPath(`cover_letters/${tenantId}/list`);
|
|
101
|
+
return axios.get(path, {
|
|
102
|
+
headers: {
|
|
103
|
+
"Authorization": `Bearer ${this.state.auth_token}`
|
|
104
|
+
}
|
|
105
|
+
})
|
|
106
|
+
.then((response) => {
|
|
107
|
+
return ApiResponse.success(response.data);
|
|
108
|
+
})
|
|
109
|
+
.catch((error) => {
|
|
110
|
+
return ApiResponse.errorAxios(error);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* get the content of a cover letter
|
|
115
|
+
* @param tenantId - The tenant id
|
|
116
|
+
* @param type - The type of the cover letter (custom | default)
|
|
117
|
+
* @param name - The name of the cover letter
|
|
118
|
+
* @param encoding - The encoding of the cover letter (base64 | pdf)
|
|
119
|
+
* @returns
|
|
120
|
+
*/
|
|
121
|
+
getCoverLetterContent(tenantId, type, name, encoding) {
|
|
122
|
+
const path = this.getPath(`cover_letter/${tenantId}/${type}/${name}/${encoding}`);
|
|
123
|
+
return axios.get(path, {
|
|
124
|
+
headers: {
|
|
125
|
+
"Authorization": `Bearer ${this.state.auth_token}`
|
|
126
|
+
},
|
|
127
|
+
responseType: 'blob'
|
|
128
|
+
});
|
|
129
|
+
}
|
|
94
130
|
}
|
|
95
131
|
export { ContentEndpoints };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiResponse } from "./apiResponse";
|
|
2
|
-
import { CheckReceiverResponse, ContentActionsResponse, ContentResponse, SendContentResponse } from "./responses/content";
|
|
2
|
+
import { CheckReceiverResponse, ContentActionsResponse, ContentResponse, CoverLetterOverviewResponse, SendContentResponse } from "./responses/content";
|
|
3
3
|
import { ApiV1 } from "../../api/api";
|
|
4
4
|
import { ReceiverRequest, SendContentRequest } from "./requests/content";
|
|
5
5
|
declare class ContentEndpoints {
|
|
@@ -38,5 +38,20 @@ declare class ContentEndpoints {
|
|
|
38
38
|
* @returns
|
|
39
39
|
*/
|
|
40
40
|
sendContent(tenantId: string, request: SendContentRequest): Promise<ApiResponse<SendContentResponse>>;
|
|
41
|
+
/**
|
|
42
|
+
* list all cover letters for a tenant
|
|
43
|
+
* @param tenantId - The tenant id
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
listCoverLetters(tenantId: string): Promise<ApiResponse<CoverLetterOverviewResponse>>;
|
|
47
|
+
/**
|
|
48
|
+
* get the content of a cover letter
|
|
49
|
+
* @param tenantId - The tenant id
|
|
50
|
+
* @param type - The type of the cover letter (custom | default)
|
|
51
|
+
* @param name - The name of the cover letter
|
|
52
|
+
* @param encoding - The encoding of the cover letter (base64 | pdf)
|
|
53
|
+
* @returns
|
|
54
|
+
*/
|
|
55
|
+
getCoverLetterContent(tenantId: string, type: 'custom' | 'default', name: string, encoding: 'base64' | 'pdf'): Promise<import("axios").AxiosResponse<Blob, any>>;
|
|
41
56
|
}
|
|
42
57
|
export { ContentEndpoints };
|
|
@@ -9,6 +9,17 @@ interface ReceiverRequest {
|
|
|
9
9
|
last_name?: string;
|
|
10
10
|
full_name?: string;
|
|
11
11
|
date_of_birth?: string;
|
|
12
|
+
postal_address?: PostalAddress;
|
|
13
|
+
}
|
|
14
|
+
interface PostalAddress {
|
|
15
|
+
city: string;
|
|
16
|
+
country: string;
|
|
17
|
+
date_of_birth?: string;
|
|
18
|
+
first_name: string;
|
|
19
|
+
house_number: string;
|
|
20
|
+
last_name: string;
|
|
21
|
+
postcode: string;
|
|
22
|
+
street: string;
|
|
12
23
|
}
|
|
13
24
|
interface BirthInformation {
|
|
14
25
|
birth_name?: string;
|
|
@@ -17,7 +28,7 @@ interface BirthInformation {
|
|
|
17
28
|
nationality?: string;
|
|
18
29
|
given_names?: string;
|
|
19
30
|
last_name?: string;
|
|
20
|
-
|
|
31
|
+
postal_address?: string;
|
|
21
32
|
}
|
|
22
33
|
interface PaymentDetails {
|
|
23
34
|
amount: number;
|
|
@@ -41,6 +41,14 @@ interface ContentActionsPaymentResponse {
|
|
|
41
41
|
};
|
|
42
42
|
link: string;
|
|
43
43
|
}
|
|
44
|
+
interface CoverLetterOverviewItem {
|
|
45
|
+
type: string;
|
|
46
|
+
name: string;
|
|
47
|
+
display_name: string;
|
|
48
|
+
}
|
|
49
|
+
interface CoverLetterOverviewResponse {
|
|
50
|
+
cover_letters: CoverLetterOverviewItem[];
|
|
51
|
+
}
|
|
44
52
|
interface EmbbededSignatureResponse {
|
|
45
53
|
id: string;
|
|
46
54
|
created_by: string;
|
|
@@ -70,4 +78,4 @@ interface ContentActionsResponse {
|
|
|
70
78
|
payments: ContentActionsPaymentResponse;
|
|
71
79
|
signatures: ContentActionsSignatureResponse;
|
|
72
80
|
}
|
|
73
|
-
export type { EmbbededSignatureResponse, Content, ContentActionsSignatureResponse, ContentActionsPaymentResponse, SendContentResponse, CheckReceiverResponse, ContentMeta, ContentResponse, ContentActionsResponse };
|
|
81
|
+
export type { EmbbededSignatureResponse, Content, CoverLetterOverviewResponse, CoverLetterOverviewItem, ContentActionsSignatureResponse, ContentActionsPaymentResponse, SendContentResponse, CheckReceiverResponse, ContentMeta, ContentResponse, ContentActionsResponse };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -197,6 +197,42 @@ class ContentEndpoints {
|
|
|
197
197
|
return ApiResponse.errorAxios(error);
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* list all cover letters for a tenant
|
|
202
|
+
* @param tenantId - The tenant id
|
|
203
|
+
* @returns
|
|
204
|
+
*/
|
|
205
|
+
listCoverLetters(tenantId) {
|
|
206
|
+
const path = this.getPath(`cover_letters/${tenantId}/list`);
|
|
207
|
+
return axios.get(path, {
|
|
208
|
+
headers: {
|
|
209
|
+
"Authorization": `Bearer ${this.state.auth_token}`
|
|
210
|
+
}
|
|
211
|
+
})
|
|
212
|
+
.then((response) => {
|
|
213
|
+
return ApiResponse.success(response.data);
|
|
214
|
+
})
|
|
215
|
+
.catch((error) => {
|
|
216
|
+
return ApiResponse.errorAxios(error);
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* get the content of a cover letter
|
|
221
|
+
* @param tenantId - The tenant id
|
|
222
|
+
* @param type - The type of the cover letter (custom | default)
|
|
223
|
+
* @param name - The name of the cover letter
|
|
224
|
+
* @param encoding - The encoding of the cover letter (base64 | pdf)
|
|
225
|
+
* @returns
|
|
226
|
+
*/
|
|
227
|
+
getCoverLetterContent(tenantId, type, name, encoding) {
|
|
228
|
+
const path = this.getPath(`cover_letter/${tenantId}/${type}/${name}/${encoding}`);
|
|
229
|
+
return axios.get(path, {
|
|
230
|
+
headers: {
|
|
231
|
+
"Authorization": `Bearer ${this.state.auth_token}`
|
|
232
|
+
},
|
|
233
|
+
responseType: 'blob'
|
|
234
|
+
});
|
|
235
|
+
}
|
|
200
236
|
}
|
|
201
237
|
|
|
202
238
|
class SignaturesEndpoint {
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as axios from 'axios';
|
|
1
2
|
import { AxiosError } from 'axios';
|
|
2
3
|
|
|
3
4
|
declare class ApiResponse<ResponseType> {
|
|
@@ -121,6 +122,14 @@ interface ContentActionsPaymentResponse {
|
|
|
121
122
|
};
|
|
122
123
|
link: string;
|
|
123
124
|
}
|
|
125
|
+
interface CoverLetterOverviewItem {
|
|
126
|
+
type: string;
|
|
127
|
+
name: string;
|
|
128
|
+
display_name: string;
|
|
129
|
+
}
|
|
130
|
+
interface CoverLetterOverviewResponse {
|
|
131
|
+
cover_letters: CoverLetterOverviewItem[];
|
|
132
|
+
}
|
|
124
133
|
interface EmbbededSignatureResponse {
|
|
125
134
|
id: string;
|
|
126
135
|
created_by: string;
|
|
@@ -162,6 +171,17 @@ interface ReceiverRequest {
|
|
|
162
171
|
last_name?: string;
|
|
163
172
|
full_name?: string;
|
|
164
173
|
date_of_birth?: string;
|
|
174
|
+
postal_address?: PostalAddress;
|
|
175
|
+
}
|
|
176
|
+
interface PostalAddress {
|
|
177
|
+
city: string;
|
|
178
|
+
country: string;
|
|
179
|
+
date_of_birth?: string;
|
|
180
|
+
first_name: string;
|
|
181
|
+
house_number: string;
|
|
182
|
+
last_name: string;
|
|
183
|
+
postcode: string;
|
|
184
|
+
street: string;
|
|
165
185
|
}
|
|
166
186
|
interface BirthInformation {
|
|
167
187
|
birth_name?: string;
|
|
@@ -170,7 +190,7 @@ interface BirthInformation {
|
|
|
170
190
|
nationality?: string;
|
|
171
191
|
given_names?: string;
|
|
172
192
|
last_name?: string;
|
|
173
|
-
|
|
193
|
+
postal_address?: string;
|
|
174
194
|
}
|
|
175
195
|
interface PaymentDetails {
|
|
176
196
|
amount: number;
|
|
@@ -255,6 +275,21 @@ declare class ContentEndpoints {
|
|
|
255
275
|
* @returns
|
|
256
276
|
*/
|
|
257
277
|
sendContent(tenantId: string, request: SendContentRequest): Promise<ApiResponse<SendContentResponse>>;
|
|
278
|
+
/**
|
|
279
|
+
* list all cover letters for a tenant
|
|
280
|
+
* @param tenantId - The tenant id
|
|
281
|
+
* @returns
|
|
282
|
+
*/
|
|
283
|
+
listCoverLetters(tenantId: string): Promise<ApiResponse<CoverLetterOverviewResponse>>;
|
|
284
|
+
/**
|
|
285
|
+
* get the content of a cover letter
|
|
286
|
+
* @param tenantId - The tenant id
|
|
287
|
+
* @param type - The type of the cover letter (custom | default)
|
|
288
|
+
* @param name - The name of the cover letter
|
|
289
|
+
* @param encoding - The encoding of the cover letter (base64 | pdf)
|
|
290
|
+
* @returns
|
|
291
|
+
*/
|
|
292
|
+
getCoverLetterContent(tenantId: string, type: 'custom' | 'default', name: string, encoding: 'base64' | 'pdf'): Promise<axios.AxiosResponse<Blob, any>>;
|
|
258
293
|
}
|
|
259
294
|
|
|
260
295
|
interface CreateSignatureReferenceRequest {
|
|
@@ -465,4 +500,4 @@ interface ApiV1State {
|
|
|
465
500
|
}
|
|
466
501
|
|
|
467
502
|
export { AccountsEndpoints, ApiResponse, ApiV1, AuthenticationEndpoints, ContentEndpoints, MailboxEndpoints, SignaturesEndpoint, TenantsEndpoints };
|
|
468
|
-
export type { AccountInfo, ApiV1State, BirthInformation, CheckReceiverResponse, Content, ContentActionsPaymentResponse, ContentActionsResponse, ContentActionsSignatureResponse, ContentMeta, ContentResponse, CreateSignatureReferenceRequest, CreateSignatureReferenceResponse, EmbbededSignatureResponse, ErrorResponse, FallbackOptions, InboxFilter, LoginRequest, LoginResponse, LogoutRequest, MailboxResponse, Meta, OutboxFilter, PaymentDetails, ReceiverRequest, SendContentRequest, SendContentResponse, Tenant, TenantsResponse };
|
|
503
|
+
export type { AccountInfo, ApiV1State, BirthInformation, CheckReceiverResponse, Content, ContentActionsPaymentResponse, ContentActionsResponse, ContentActionsSignatureResponse, ContentMeta, ContentResponse, CoverLetterOverviewItem, CoverLetterOverviewResponse, CreateSignatureReferenceRequest, CreateSignatureReferenceResponse, EmbbededSignatureResponse, ErrorResponse, FallbackOptions, InboxFilter, LoginRequest, LoginResponse, LogoutRequest, MailboxResponse, Meta, OutboxFilter, PaymentDetails, ReceiverRequest, SendContentRequest, SendContentResponse, Tenant, TenantsResponse };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiResponse } from "./apiResponse";
|
|
2
|
-
import { CheckReceiverResponse, ContentActionsResponse, ContentResponse, SendContentResponse } from "./responses/content";
|
|
2
|
+
import { CheckReceiverResponse, ContentActionsResponse, ContentResponse, CoverLetterOverviewResponse, SendContentResponse } from "./responses/content";
|
|
3
3
|
import { ApiV1 } from "../../api/api";
|
|
4
4
|
import { ReceiverRequest, SendContentRequest } from "./requests/content";
|
|
5
5
|
declare class ContentEndpoints {
|
|
@@ -38,5 +38,20 @@ declare class ContentEndpoints {
|
|
|
38
38
|
* @returns
|
|
39
39
|
*/
|
|
40
40
|
sendContent(tenantId: string, request: SendContentRequest): Promise<ApiResponse<SendContentResponse>>;
|
|
41
|
+
/**
|
|
42
|
+
* list all cover letters for a tenant
|
|
43
|
+
* @param tenantId - The tenant id
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
listCoverLetters(tenantId: string): Promise<ApiResponse<CoverLetterOverviewResponse>>;
|
|
47
|
+
/**
|
|
48
|
+
* get the content of a cover letter
|
|
49
|
+
* @param tenantId - The tenant id
|
|
50
|
+
* @param type - The type of the cover letter (custom | default)
|
|
51
|
+
* @param name - The name of the cover letter
|
|
52
|
+
* @param encoding - The encoding of the cover letter (base64 | pdf)
|
|
53
|
+
* @returns
|
|
54
|
+
*/
|
|
55
|
+
getCoverLetterContent(tenantId: string, type: 'custom' | 'default', name: string, encoding: 'base64' | 'pdf'): Promise<import("axios").AxiosResponse<Blob, any>>;
|
|
41
56
|
}
|
|
42
57
|
export { ContentEndpoints };
|
|
@@ -9,6 +9,17 @@ interface ReceiverRequest {
|
|
|
9
9
|
last_name?: string;
|
|
10
10
|
full_name?: string;
|
|
11
11
|
date_of_birth?: string;
|
|
12
|
+
postal_address?: PostalAddress;
|
|
13
|
+
}
|
|
14
|
+
interface PostalAddress {
|
|
15
|
+
city: string;
|
|
16
|
+
country: string;
|
|
17
|
+
date_of_birth?: string;
|
|
18
|
+
first_name: string;
|
|
19
|
+
house_number: string;
|
|
20
|
+
last_name: string;
|
|
21
|
+
postcode: string;
|
|
22
|
+
street: string;
|
|
12
23
|
}
|
|
13
24
|
interface BirthInformation {
|
|
14
25
|
birth_name?: string;
|
|
@@ -17,7 +28,7 @@ interface BirthInformation {
|
|
|
17
28
|
nationality?: string;
|
|
18
29
|
given_names?: string;
|
|
19
30
|
last_name?: string;
|
|
20
|
-
|
|
31
|
+
postal_address?: string;
|
|
21
32
|
}
|
|
22
33
|
interface PaymentDetails {
|
|
23
34
|
amount: number;
|
|
@@ -41,6 +41,14 @@ interface ContentActionsPaymentResponse {
|
|
|
41
41
|
};
|
|
42
42
|
link: string;
|
|
43
43
|
}
|
|
44
|
+
interface CoverLetterOverviewItem {
|
|
45
|
+
type: string;
|
|
46
|
+
name: string;
|
|
47
|
+
display_name: string;
|
|
48
|
+
}
|
|
49
|
+
interface CoverLetterOverviewResponse {
|
|
50
|
+
cover_letters: CoverLetterOverviewItem[];
|
|
51
|
+
}
|
|
44
52
|
interface EmbbededSignatureResponse {
|
|
45
53
|
id: string;
|
|
46
54
|
created_by: string;
|
|
@@ -70,4 +78,4 @@ interface ContentActionsResponse {
|
|
|
70
78
|
payments: ContentActionsPaymentResponse;
|
|
71
79
|
signatures: ContentActionsSignatureResponse;
|
|
72
80
|
}
|
|
73
|
-
export type { EmbbededSignatureResponse, Content, ContentActionsSignatureResponse, ContentActionsPaymentResponse, SendContentResponse, CheckReceiverResponse, ContentMeta, ContentResponse, ContentActionsResponse };
|
|
81
|
+
export type { EmbbededSignatureResponse, Content, CoverLetterOverviewResponse, CoverLetterOverviewItem, ContentActionsSignatureResponse, ContentActionsPaymentResponse, SendContentResponse, CheckReceiverResponse, ContentMeta, ContentResponse, ContentActionsResponse };
|