@extrahorizon/javascript-sdk 8.9.0-dev-122-b59ec47 → 8.9.0-feat-134-c0f5b9d
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/CHANGELOG.md +7 -0
- package/build/index.cjs.js +198 -62
- package/build/index.mjs +197 -63
- package/build/types/client.d.ts +6 -0
- package/build/types/constants.d.ts +1 -0
- package/build/types/errors.d.ts +11 -0
- package/build/types/mockType.d.ts +60 -0
- package/build/types/services/auth/applications/types.d.ts +3 -3
- package/build/types/services/auth/oauth1/types.d.ts +2 -2
- package/build/types/services/auth/oauth2/types.d.ts +2 -2
- package/build/types/services/auth/oidc/loginAttempts/types.d.ts +1 -1
- package/build/types/services/auth/oidc/providers/types.d.ts +1 -1
- package/build/types/services/data/types.d.ts +5 -5
- package/build/types/services/dispatchers/dispatchers/types.d.ts +1 -1
- package/build/types/services/events/types.d.ts +4 -4
- package/build/types/services/files/types.d.ts +2 -2
- package/build/types/services/localizations/types.d.ts +2 -2
- package/build/types/services/logs/access/types.d.ts +2 -2
- package/build/types/services/mails/types.d.ts +22 -14
- package/build/types/services/notifications/types.d.ts +4 -4
- package/build/types/services/payments/types.d.ts +4 -4
- package/build/types/services/profiles/types.d.ts +2 -2
- package/build/types/services/tasks/apiRequests/logs/types.d.ts +1 -1
- package/build/types/services/tasks/apiRequests/types.d.ts +1 -1
- package/build/types/services/tasks/functions/types.d.ts +145 -1
- package/build/types/services/tasks/logs/types.d.ts +1 -1
- package/build/types/services/tasks/schedules/types.d.ts +1 -1
- package/build/types/services/tasks/types.d.ts +2 -2
- package/build/types/services/templatesV2/health.d.ts +9 -0
- package/build/types/services/templatesV2/index.d.ts +4 -0
- package/build/types/services/templatesV2/templatesV2.d.ts +5 -0
- package/build/types/services/templatesV2/types.d.ts +145 -0
- package/build/types/services/types.d.ts +4 -1
- package/build/types/services/users/activationRequests/types.d.ts +3 -3
- package/build/types/services/users/forgotPasswordRequests/types.d.ts +3 -3
- package/build/types/services/users/types.d.ts +27 -9
- package/build/types/version.d.ts +1 -1
- package/package.json +2 -2
|
@@ -8,6 +8,7 @@ export declare type MockClientOAuth1<MockFn> = {
|
|
|
8
8
|
findAll: MockFn;
|
|
9
9
|
findAllIterator: MockFn;
|
|
10
10
|
findFirst: MockFn;
|
|
11
|
+
findByEmail: MockFn;
|
|
11
12
|
removeUsers: MockFn;
|
|
12
13
|
patients: MockFn;
|
|
13
14
|
staff: MockFn;
|
|
@@ -181,6 +182,13 @@ export declare type MockClientOAuth1<MockFn> = {
|
|
|
181
182
|
findFirst: MockFn;
|
|
182
183
|
};
|
|
183
184
|
functions: {
|
|
185
|
+
find: MockFn;
|
|
186
|
+
create: MockFn;
|
|
187
|
+
getByName: MockFn;
|
|
188
|
+
update: MockFn;
|
|
189
|
+
delete: MockFn;
|
|
190
|
+
enable: MockFn;
|
|
191
|
+
disable: MockFn;
|
|
184
192
|
execute: MockFn;
|
|
185
193
|
};
|
|
186
194
|
api: {
|
|
@@ -221,6 +229,18 @@ export declare type MockClientOAuth1<MockFn> = {
|
|
|
221
229
|
resolveAsJson: MockFn;
|
|
222
230
|
resolveAsJsonUsingCode: MockFn;
|
|
223
231
|
};
|
|
232
|
+
templatesV2: {
|
|
233
|
+
health: MockFn;
|
|
234
|
+
create: MockFn;
|
|
235
|
+
update: MockFn;
|
|
236
|
+
remove: MockFn;
|
|
237
|
+
resolve: MockFn;
|
|
238
|
+
find: MockFn;
|
|
239
|
+
findAll: MockFn;
|
|
240
|
+
findById: MockFn;
|
|
241
|
+
findByName: MockFn;
|
|
242
|
+
findFirst: MockFn;
|
|
243
|
+
};
|
|
224
244
|
mails: {
|
|
225
245
|
health: MockFn;
|
|
226
246
|
find: MockFn;
|
|
@@ -561,6 +581,7 @@ export declare type MockClientOAuth2<MockFn> = {
|
|
|
561
581
|
findAll: MockFn;
|
|
562
582
|
findAllIterator: MockFn;
|
|
563
583
|
findFirst: MockFn;
|
|
584
|
+
findByEmail: MockFn;
|
|
564
585
|
removeUsers: MockFn;
|
|
565
586
|
patients: MockFn;
|
|
566
587
|
staff: MockFn;
|
|
@@ -734,6 +755,13 @@ export declare type MockClientOAuth2<MockFn> = {
|
|
|
734
755
|
findFirst: MockFn;
|
|
735
756
|
};
|
|
736
757
|
functions: {
|
|
758
|
+
find: MockFn;
|
|
759
|
+
create: MockFn;
|
|
760
|
+
getByName: MockFn;
|
|
761
|
+
update: MockFn;
|
|
762
|
+
delete: MockFn;
|
|
763
|
+
enable: MockFn;
|
|
764
|
+
disable: MockFn;
|
|
737
765
|
execute: MockFn;
|
|
738
766
|
};
|
|
739
767
|
api: {
|
|
@@ -774,6 +802,18 @@ export declare type MockClientOAuth2<MockFn> = {
|
|
|
774
802
|
resolveAsJson: MockFn;
|
|
775
803
|
resolveAsJsonUsingCode: MockFn;
|
|
776
804
|
};
|
|
805
|
+
templatesV2: {
|
|
806
|
+
health: MockFn;
|
|
807
|
+
create: MockFn;
|
|
808
|
+
update: MockFn;
|
|
809
|
+
remove: MockFn;
|
|
810
|
+
resolve: MockFn;
|
|
811
|
+
find: MockFn;
|
|
812
|
+
findAll: MockFn;
|
|
813
|
+
findById: MockFn;
|
|
814
|
+
findByName: MockFn;
|
|
815
|
+
findFirst: MockFn;
|
|
816
|
+
};
|
|
777
817
|
mails: {
|
|
778
818
|
health: MockFn;
|
|
779
819
|
find: MockFn;
|
|
@@ -1114,6 +1154,7 @@ export declare type MockClientProxy<MockFn> = {
|
|
|
1114
1154
|
findAll: MockFn;
|
|
1115
1155
|
findAllIterator: MockFn;
|
|
1116
1156
|
findFirst: MockFn;
|
|
1157
|
+
findByEmail: MockFn;
|
|
1117
1158
|
removeUsers: MockFn;
|
|
1118
1159
|
patients: MockFn;
|
|
1119
1160
|
staff: MockFn;
|
|
@@ -1287,6 +1328,13 @@ export declare type MockClientProxy<MockFn> = {
|
|
|
1287
1328
|
findFirst: MockFn;
|
|
1288
1329
|
};
|
|
1289
1330
|
functions: {
|
|
1331
|
+
find: MockFn;
|
|
1332
|
+
create: MockFn;
|
|
1333
|
+
getByName: MockFn;
|
|
1334
|
+
update: MockFn;
|
|
1335
|
+
delete: MockFn;
|
|
1336
|
+
enable: MockFn;
|
|
1337
|
+
disable: MockFn;
|
|
1290
1338
|
execute: MockFn;
|
|
1291
1339
|
};
|
|
1292
1340
|
api: {
|
|
@@ -1327,6 +1375,18 @@ export declare type MockClientProxy<MockFn> = {
|
|
|
1327
1375
|
resolveAsJson: MockFn;
|
|
1328
1376
|
resolveAsJsonUsingCode: MockFn;
|
|
1329
1377
|
};
|
|
1378
|
+
templatesV2: {
|
|
1379
|
+
health: MockFn;
|
|
1380
|
+
create: MockFn;
|
|
1381
|
+
update: MockFn;
|
|
1382
|
+
remove: MockFn;
|
|
1383
|
+
resolve: MockFn;
|
|
1384
|
+
find: MockFn;
|
|
1385
|
+
findAll: MockFn;
|
|
1386
|
+
findById: MockFn;
|
|
1387
|
+
findByName: MockFn;
|
|
1388
|
+
findFirst: MockFn;
|
|
1389
|
+
};
|
|
1330
1390
|
mails: {
|
|
1331
1391
|
health: MockFn;
|
|
1332
1392
|
find: MockFn;
|
|
@@ -48,7 +48,7 @@ export interface AuthApplicationsService {
|
|
|
48
48
|
*
|
|
49
49
|
* @throws {@link NoPermissionError} when the user doesn't have the required permissions to execute the function.
|
|
50
50
|
* */
|
|
51
|
-
findFirst(options?: OptionsWithRql): Promise<OAuth1Application | OAuth2Application>;
|
|
51
|
+
findFirst(options?: OptionsWithRql): Promise<(OAuth1Application | OAuth2Application) | undefined>;
|
|
52
52
|
/**
|
|
53
53
|
* ## Get an application by its id
|
|
54
54
|
* Gets the application currently registered in the cluster by its id.
|
|
@@ -65,7 +65,7 @@ export interface AuthApplicationsService {
|
|
|
65
65
|
*
|
|
66
66
|
* @throws {@link NoPermissionError} when the user doesn't have the required permissions to execute the function.
|
|
67
67
|
* */
|
|
68
|
-
findById(id: ObjectId, options?: OptionsWithRql): Promise<OAuth1Application | OAuth2Application>;
|
|
68
|
+
findById(id: ObjectId, options?: OptionsWithRql): Promise<(OAuth1Application | OAuth2Application) | undefined>;
|
|
69
69
|
/**
|
|
70
70
|
* ## Get an application by its name
|
|
71
71
|
* Gets the application currently registered in the cluster by its name.
|
|
@@ -82,7 +82,7 @@ export interface AuthApplicationsService {
|
|
|
82
82
|
*
|
|
83
83
|
* @throws {@link NoPermissionError} when the user doesn't have the required permissions to execute the function.
|
|
84
84
|
* */
|
|
85
|
-
findByName(name: string, options?: OptionsWithRql): Promise<OAuth1Application | OAuth2Application>;
|
|
85
|
+
findByName(name: string, options?: OptionsWithRql): Promise<(OAuth1Application | OAuth2Application) | undefined>;
|
|
86
86
|
/**
|
|
87
87
|
* @deprecated Use `find` instead
|
|
88
88
|
*
|
|
@@ -62,7 +62,7 @@ export interface AuthOauth1TokenService {
|
|
|
62
62
|
* none | | Can only see a list of OAuth1 tokens for this account
|
|
63
63
|
* VIEW_AUTHORIZATIONS | global | Can see a list of OAuth1 tokens for any account
|
|
64
64
|
*/
|
|
65
|
-
findFirst(options?: OptionsWithRql): Promise<OAuth1Token>;
|
|
65
|
+
findFirst(options?: OptionsWithRql): Promise<OAuth1Token | undefined>;
|
|
66
66
|
/**
|
|
67
67
|
* Get an oAuth1 token by its id
|
|
68
68
|
*
|
|
@@ -71,7 +71,7 @@ export interface AuthOauth1TokenService {
|
|
|
71
71
|
* none | | Can only see a list of OAuth1 tokens for this account
|
|
72
72
|
* VIEW_AUTHORIZATIONS | global | Can see a list of OAuth1 tokens for any account
|
|
73
73
|
*/
|
|
74
|
-
findById(id: string, options?: OptionsWithRql): Promise<OAuth1Token>;
|
|
74
|
+
findById(id: string, options?: OptionsWithRql): Promise<OAuth1Token | undefined>;
|
|
75
75
|
/**
|
|
76
76
|
* Remove a token
|
|
77
77
|
*
|
|
@@ -51,7 +51,7 @@ export interface AuthOauth2TokenService {
|
|
|
51
51
|
* none | | Can only see a list of OAuth2 tokens for this account
|
|
52
52
|
* VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 tokens for any account
|
|
53
53
|
*/
|
|
54
|
-
findFirst(options?: OptionsWithRql): Promise<OAuth2Token>;
|
|
54
|
+
findFirst(options?: OptionsWithRql): Promise<OAuth2Token | undefined>;
|
|
55
55
|
/**
|
|
56
56
|
* Get an oAuth2 token by its id
|
|
57
57
|
*
|
|
@@ -60,7 +60,7 @@ export interface AuthOauth2TokenService {
|
|
|
60
60
|
* none | | Can only see a list of OAuth2 tokens for this account
|
|
61
61
|
* VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 tokens for any account
|
|
62
62
|
*/
|
|
63
|
-
findById(id: string, options?: OptionsWithRql): Promise<OAuth2Token>;
|
|
63
|
+
findById(id: string, options?: OptionsWithRql): Promise<OAuth2Token | undefined>;
|
|
64
64
|
/**
|
|
65
65
|
* Remove an oAuth2 token
|
|
66
66
|
*
|
|
@@ -37,7 +37,7 @@ export interface LoginAttemptsService {
|
|
|
37
37
|
* @param options {@link OptionsWithRql} - Add filters to the requested list
|
|
38
38
|
* @returns The first element of the queried login attempts {@link LoginAttempt}
|
|
39
39
|
*/
|
|
40
|
-
findFirst(options?: OptionsWithRql): Promise<LoginAttempt>;
|
|
40
|
+
findFirst(options?: OptionsWithRql): Promise<LoginAttempt | undefined>;
|
|
41
41
|
}
|
|
42
42
|
export declare enum LoginAttemptStatus {
|
|
43
43
|
SUCCESS = "success",
|
|
@@ -54,7 +54,7 @@ export interface OidcProviderService {
|
|
|
54
54
|
* @returns The first element of the queried providers {@link OidcProvider}
|
|
55
55
|
* @throws {@link NoPermissionError} when the user doesn't have the required permissions to execute the function.
|
|
56
56
|
*/
|
|
57
|
-
findFirst(options?: OptionsWithRql): Promise<OidcProvider>;
|
|
57
|
+
findFirst(options?: OptionsWithRql): Promise<OidcProvider | undefined>;
|
|
58
58
|
/**
|
|
59
59
|
* ## Update an OpenID Connect provider
|
|
60
60
|
* ### You can use this function to update an existing OpenId Connect Provider. Fields left undefined will not be updated.
|
|
@@ -329,14 +329,14 @@ export interface DataCommentsService {
|
|
|
329
329
|
* @param documentId The id of the targeted document.
|
|
330
330
|
* @returns the first element found
|
|
331
331
|
*/
|
|
332
|
-
findById(id: ObjectId, schemaIdOrName: ObjectId | string, documentId: ObjectId, options?: OptionsWithRql): Promise<Comment>;
|
|
332
|
+
findById(id: ObjectId, schemaIdOrName: ObjectId | string, documentId: ObjectId, options?: OptionsWithRql): Promise<Comment | undefined>;
|
|
333
333
|
/**
|
|
334
334
|
* Find First
|
|
335
335
|
* @param schemaIdOrName The id or name of the targeted schema.
|
|
336
336
|
* @param documentId The id of the targeted document.
|
|
337
337
|
* @returns the first element found
|
|
338
338
|
*/
|
|
339
|
-
findFirst(schemaIdOrName: ObjectId | string, documentId: ObjectId, options?: OptionsWithRql): Promise<Comment>;
|
|
339
|
+
findFirst(schemaIdOrName: ObjectId | string, documentId: ObjectId, options?: OptionsWithRql): Promise<Comment | undefined>;
|
|
340
340
|
/**
|
|
341
341
|
* Update a comment
|
|
342
342
|
*
|
|
@@ -1345,18 +1345,18 @@ export interface DataSchemasService {
|
|
|
1345
1345
|
* @param id the Id to search for
|
|
1346
1346
|
* @returns the first element found
|
|
1347
1347
|
*/
|
|
1348
|
-
findById(id: ObjectId, options?: OptionsWithRql): Promise<Schema>;
|
|
1348
|
+
findById(id: ObjectId, options?: OptionsWithRql): Promise<Schema | undefined>;
|
|
1349
1349
|
/**
|
|
1350
1350
|
* Find By Name
|
|
1351
1351
|
* @param name the name to search for
|
|
1352
1352
|
* @returns the first element found
|
|
1353
1353
|
*/
|
|
1354
|
-
findByName(name: string, options?: OptionsWithRql): Promise<Schema>;
|
|
1354
|
+
findByName(name: string, options?: OptionsWithRql): Promise<Schema | undefined>;
|
|
1355
1355
|
/**
|
|
1356
1356
|
* Find First
|
|
1357
1357
|
* @returns the first element found
|
|
1358
1358
|
*/
|
|
1359
|
-
findFirst(options?: OptionsWithRql): Promise<Schema>;
|
|
1359
|
+
findFirst(options?: OptionsWithRql): Promise<Schema | undefined>;
|
|
1360
1360
|
/**
|
|
1361
1361
|
* Update a schema
|
|
1362
1362
|
*
|
|
@@ -52,7 +52,7 @@ export interface DispatchersService {
|
|
|
52
52
|
* @param options {@link OptionsWithRql} - Add filters to the requested list
|
|
53
53
|
* @returns The first element of the queried Dispatchers {@link Dispatcher}
|
|
54
54
|
*/
|
|
55
|
-
findFirst(options?: OptionsWithRql): Promise<Dispatcher>;
|
|
55
|
+
findFirst(options?: OptionsWithRql): Promise<Dispatcher | undefined>;
|
|
56
56
|
/**
|
|
57
57
|
* ## Create a Dispatcher
|
|
58
58
|
*
|
|
@@ -42,13 +42,13 @@ export interface EventsService {
|
|
|
42
42
|
* @param rql an optional rql string
|
|
43
43
|
* @returns the first element found
|
|
44
44
|
*/
|
|
45
|
-
findById(id: ObjectId, options?: OptionsWithRql): Promise<Event>;
|
|
45
|
+
findById(id: ObjectId, options?: OptionsWithRql): Promise<Event | undefined>;
|
|
46
46
|
/**
|
|
47
47
|
* Find First
|
|
48
48
|
* @param rql an optional rql string
|
|
49
49
|
* @returns the first element found
|
|
50
50
|
*/
|
|
51
|
-
findFirst(options?: OptionsWithRql): Promise<Event>;
|
|
51
|
+
findFirst(options?: OptionsWithRql): Promise<Event | undefined>;
|
|
52
52
|
/**
|
|
53
53
|
* Creates an event
|
|
54
54
|
*
|
|
@@ -80,13 +80,13 @@ export interface SubscriptionsService {
|
|
|
80
80
|
* @param rql an optional rql string
|
|
81
81
|
* @returns the first element found
|
|
82
82
|
*/
|
|
83
|
-
findById(id: ObjectId, options?: OptionsWithRql): Promise<Subscription>;
|
|
83
|
+
findById(id: ObjectId, options?: OptionsWithRql): Promise<Subscription | undefined>;
|
|
84
84
|
/**
|
|
85
85
|
* Find First
|
|
86
86
|
* @param rql an optional rql string
|
|
87
87
|
* @returns the first element found
|
|
88
88
|
*/
|
|
89
|
-
findFirst(options?: OptionsWithRql): Promise<Subscription>;
|
|
89
|
+
findFirst(options?: OptionsWithRql): Promise<Subscription | undefined>;
|
|
90
90
|
/**
|
|
91
91
|
* @deprecated Should not be used, services manage subscriptions themselves
|
|
92
92
|
*
|
|
@@ -55,13 +55,13 @@ export interface FilesService {
|
|
|
55
55
|
* @param rql an optional rql string
|
|
56
56
|
* @returns the first element found
|
|
57
57
|
*/
|
|
58
|
-
findByName(name: string, options?: OptionsWithRql): Promise<FileDetails>;
|
|
58
|
+
findByName(name: string, options?: OptionsWithRql): Promise<FileDetails | undefined>;
|
|
59
59
|
/**
|
|
60
60
|
* Find First
|
|
61
61
|
* @param rql an optional rql string
|
|
62
62
|
* @returns the first element found
|
|
63
63
|
*/
|
|
64
|
-
findFirst(options?: OptionsWithRql): Promise<FileDetails>;
|
|
64
|
+
findFirst(options?: OptionsWithRql): Promise<FileDetails | undefined>;
|
|
65
65
|
/**
|
|
66
66
|
* ## Add a new file from a plain text source
|
|
67
67
|
*
|
|
@@ -92,13 +92,13 @@ export interface LocalizationsService {
|
|
|
92
92
|
* @param rql an optional rql string
|
|
93
93
|
* @returns the first element found
|
|
94
94
|
*/
|
|
95
|
-
findByKey(key: string, options?: OptionsWithRql): Promise<Localization>;
|
|
95
|
+
findByKey(key: string, options?: OptionsWithRql): Promise<Localization | undefined>;
|
|
96
96
|
/**
|
|
97
97
|
* Find First
|
|
98
98
|
* @param rql an optional rql string
|
|
99
99
|
* @returns the first element found
|
|
100
100
|
*/
|
|
101
|
-
findFirst(options?: OptionsWithRql): Promise<Localization>;
|
|
101
|
+
findFirst(options?: OptionsWithRql): Promise<Localization | undefined>;
|
|
102
102
|
/**
|
|
103
103
|
* Create new localizations
|
|
104
104
|
*
|
|
@@ -17,11 +17,11 @@ export interface LogsAccessService {
|
|
|
17
17
|
* @param options {@link OptionsWithRql} - Add filters to the requested list
|
|
18
18
|
* @returns The first element of the queried access logs {@link AccessLog}
|
|
19
19
|
*/
|
|
20
|
-
findFirst(options?: OptionsWithRql): Promise<AccessLog>;
|
|
20
|
+
findFirst(options?: OptionsWithRql): Promise<AccessLog | undefined>;
|
|
21
21
|
}
|
|
22
22
|
export interface AccessLog {
|
|
23
23
|
/** The time of request receival */
|
|
24
|
-
timestamp:
|
|
24
|
+
timestamp: Date;
|
|
25
25
|
/** The status code of the response for the request */
|
|
26
26
|
httpStatus: number;
|
|
27
27
|
/** The duration of the request in seconds */
|
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
import { ObjectId, LanguageCode, MailAddress, MailAddressList, MailRecipients, AffectedRecords, PagedResult, OptionsBase, OptionsWithRql } from '../types';
|
|
1
|
+
import { ObjectId, LanguageCode, MailAddress, MailAddressList, MailRecipients, AffectedRecords, PagedResult, OptionsBase, OptionsWithRql, TimeZone } from '../types';
|
|
2
2
|
export interface Mail {
|
|
3
|
-
id
|
|
3
|
+
id: ObjectId;
|
|
4
4
|
creatorId?: ObjectId;
|
|
5
5
|
awsMessageId?: ObjectId;
|
|
6
|
-
subject
|
|
7
|
-
recipients
|
|
6
|
+
subject: string;
|
|
7
|
+
recipients: MailRecipients;
|
|
8
8
|
templateId?: ObjectId;
|
|
9
|
+
templateName?: string;
|
|
9
10
|
replyTo?: MailAddressList;
|
|
10
|
-
from
|
|
11
|
+
from: MailAddress;
|
|
11
12
|
body?: string;
|
|
12
13
|
language?: LanguageCode;
|
|
14
|
+
timeZone?: TimeZone;
|
|
13
15
|
content?: Record<string, any>;
|
|
14
|
-
views
|
|
15
|
-
creationTimestamp
|
|
16
|
-
updateTimestamp
|
|
16
|
+
views: number;
|
|
17
|
+
creationTimestamp: Date;
|
|
18
|
+
updateTimestamp: Date;
|
|
17
19
|
}
|
|
18
20
|
export declare type PlainMailCreation = {
|
|
19
21
|
subject: string;
|
|
20
22
|
body: string;
|
|
21
23
|
} & CommonMailCreationProperties;
|
|
22
24
|
export declare type TemplateBasedMailCreation = {
|
|
23
|
-
templateId
|
|
25
|
+
templateId?: ObjectId;
|
|
26
|
+
templateName?: string;
|
|
24
27
|
language?: LanguageCode;
|
|
28
|
+
timeZone?: TimeZone;
|
|
25
29
|
content: Record<string, any>;
|
|
26
30
|
} & CommonMailCreationProperties;
|
|
27
31
|
export interface CommonMailCreationProperties {
|
|
@@ -42,9 +46,9 @@ export interface Attachment {
|
|
|
42
46
|
type?: string;
|
|
43
47
|
}
|
|
44
48
|
export interface QueuedMail {
|
|
45
|
-
id
|
|
46
|
-
status
|
|
47
|
-
from
|
|
49
|
+
id: ObjectId;
|
|
50
|
+
status: QueuedMailStatus;
|
|
51
|
+
from: string;
|
|
48
52
|
to?: MailAddressList;
|
|
49
53
|
cc?: MailAddressList;
|
|
50
54
|
bcc?: MailAddressList;
|
|
@@ -57,14 +61,18 @@ export interface QueuedMail {
|
|
|
57
61
|
textEncoding?: string;
|
|
58
62
|
templateData?: {
|
|
59
63
|
templateId?: ObjectId;
|
|
64
|
+
templateName?: string;
|
|
60
65
|
credentials?: {
|
|
61
66
|
serviceId?: ObjectId;
|
|
62
67
|
applicationId?: ObjectId;
|
|
63
68
|
userId?: ObjectId;
|
|
64
69
|
};
|
|
65
70
|
language?: LanguageCode;
|
|
71
|
+
timeZone?: string;
|
|
66
72
|
content?: Record<string, any>;
|
|
67
73
|
};
|
|
74
|
+
creationTimestamp: Date;
|
|
75
|
+
updateTimestamp: Date;
|
|
68
76
|
}
|
|
69
77
|
export interface QueuedMailAttachment {
|
|
70
78
|
filename?: string;
|
|
@@ -98,13 +106,13 @@ export interface MailsService {
|
|
|
98
106
|
* @param rql an optional rql string
|
|
99
107
|
* @returns the first element found
|
|
100
108
|
*/
|
|
101
|
-
findById: (id: ObjectId, options?: OptionsWithRql) => Promise<Mail>;
|
|
109
|
+
findById: (id: ObjectId, options?: OptionsWithRql) => Promise<Mail | undefined>;
|
|
102
110
|
/**
|
|
103
111
|
* Find First
|
|
104
112
|
* @param rql an optional rql string
|
|
105
113
|
* @returns the first element found
|
|
106
114
|
*/
|
|
107
|
-
findFirst(options?: OptionsWithRql): Promise<Mail>;
|
|
115
|
+
findFirst(options?: OptionsWithRql): Promise<Mail | undefined>;
|
|
108
116
|
/**
|
|
109
117
|
* Send a mail
|
|
110
118
|
*
|
|
@@ -142,13 +142,13 @@ export interface NotificationsService {
|
|
|
142
142
|
* @param rql an optional rql string
|
|
143
143
|
* @returns the first element found
|
|
144
144
|
*/
|
|
145
|
-
findById(id: ObjectId, options?: OptionsWithRql): Promise<Notification>;
|
|
145
|
+
findById(id: ObjectId, options?: OptionsWithRql): Promise<Notification | undefined>;
|
|
146
146
|
/**
|
|
147
147
|
* Find First
|
|
148
148
|
* @param rql an optional rql string
|
|
149
149
|
* @returns the first element found
|
|
150
150
|
*/
|
|
151
|
-
findFirst(options?: OptionsWithRql): Promise<Notification>;
|
|
151
|
+
findFirst(options?: OptionsWithRql): Promise<Notification | undefined>;
|
|
152
152
|
/**
|
|
153
153
|
* Delete notification(s)
|
|
154
154
|
*
|
|
@@ -197,13 +197,13 @@ export interface NotificationSettingsServices {
|
|
|
197
197
|
* @param rql an optional rql string
|
|
198
198
|
* @returns the first element found
|
|
199
199
|
*/
|
|
200
|
-
findById(id: ObjectId, options?: OptionsWithRql): Promise<NotificationSettings>;
|
|
200
|
+
findById(id: ObjectId, options?: OptionsWithRql): Promise<NotificationSettings | undefined>;
|
|
201
201
|
/**
|
|
202
202
|
* Find First
|
|
203
203
|
* @param rql an optional rql string
|
|
204
204
|
* @returns the first element found
|
|
205
205
|
*/
|
|
206
|
-
findFirst(options?: OptionsWithRql): Promise<NotificationSettings>;
|
|
206
|
+
findFirst(options?: OptionsWithRql): Promise<NotificationSettings | undefined>;
|
|
207
207
|
/**
|
|
208
208
|
* Update the notification settings for a user
|
|
209
209
|
*
|
|
@@ -585,13 +585,13 @@ export interface PaymentsOrdersService {
|
|
|
585
585
|
* @param rql an optional rql string
|
|
586
586
|
* @returns the first element found
|
|
587
587
|
*/
|
|
588
|
-
findById(id: ObjectId, options?: OptionsWithRql): Promise<OrderSchema>;
|
|
588
|
+
findById(id: ObjectId, options?: OptionsWithRql): Promise<OrderSchema | undefined>;
|
|
589
589
|
/**
|
|
590
590
|
* Find First
|
|
591
591
|
* @param rql an optional rql string
|
|
592
592
|
* @returns the first element found
|
|
593
593
|
*/
|
|
594
|
-
findFirst(options?: OptionsWithRql): Promise<OrderSchema>;
|
|
594
|
+
findFirst(options?: OptionsWithRql): Promise<OrderSchema | undefined>;
|
|
595
595
|
/**
|
|
596
596
|
* Create an order
|
|
597
597
|
* @param requestBody
|
|
@@ -684,13 +684,13 @@ export interface PaymentsProductsService {
|
|
|
684
684
|
* @param rql an optional rql string
|
|
685
685
|
* @returns the first element found
|
|
686
686
|
*/
|
|
687
|
-
findById(id: ObjectId, options?: OptionsWithRql): Promise<ProductSchema>;
|
|
687
|
+
findById(id: ObjectId, options?: OptionsWithRql): Promise<ProductSchema | undefined>;
|
|
688
688
|
/**
|
|
689
689
|
* Find First
|
|
690
690
|
* @param rql an optional rql string
|
|
691
691
|
* @returns the first element found
|
|
692
692
|
*/
|
|
693
|
-
findFirst(options?: OptionsWithRql): Promise<ProductSchema>;
|
|
693
|
+
findFirst(options?: OptionsWithRql): Promise<ProductSchema | undefined>;
|
|
694
694
|
/**
|
|
695
695
|
* Add Tags to a Product
|
|
696
696
|
*
|
|
@@ -300,13 +300,13 @@ export interface ProfilesService {
|
|
|
300
300
|
* @param rql an optional rql string
|
|
301
301
|
* @returns the first element found
|
|
302
302
|
*/
|
|
303
|
-
findById(id: ObjectId, options?: OptionsWithRql): Promise<Profile>;
|
|
303
|
+
findById(id: ObjectId, options?: OptionsWithRql): Promise<Profile | undefined>;
|
|
304
304
|
/**
|
|
305
305
|
* Find First
|
|
306
306
|
* @param rql an optional rql string
|
|
307
307
|
* @returns the first element found
|
|
308
308
|
*/
|
|
309
|
-
findFirst(options?: OptionsWithRql): Promise<Profile>;
|
|
309
|
+
findFirst(options?: OptionsWithRql): Promise<Profile | undefined>;
|
|
310
310
|
/**
|
|
311
311
|
* Create a new profile
|
|
312
312
|
*
|
|
@@ -21,5 +21,5 @@ export interface ApiRequestLogsService {
|
|
|
21
21
|
* @param apiRequestId {@link string} The id of the targeted API Request
|
|
22
22
|
* @param options {@link OptionsWithRql} - Additional options for the request
|
|
23
23
|
* @returns The first element of the queried API Request logs {@link LogLine} */
|
|
24
|
-
findFirst(apiRequestId: ObjectId, options?: OptionsWithRql): Promise<LogLine>;
|
|
24
|
+
findFirst(apiRequestId: ObjectId, options?: OptionsWithRql): Promise<LogLine | undefined>;
|
|
25
25
|
}
|
|
@@ -39,7 +39,7 @@ export interface ApiRequestService {
|
|
|
39
39
|
* @param options {@link OptionsWithRql} - Add filters to the requested list
|
|
40
40
|
* @returns The first element of the queried API Requests {@link ApiRequest}
|
|
41
41
|
*/
|
|
42
|
-
findFirst(options?: OptionsWithRql): Promise<ApiRequest>;
|
|
42
|
+
findFirst(options?: OptionsWithRql): Promise<ApiRequest | undefined>;
|
|
43
43
|
logs: ApiRequestLogsService;
|
|
44
44
|
}
|
|
45
45
|
export interface ApiRequest {
|