@extrahorizon/javascript-sdk 8.2.0 → 8.2.1-dev-49-61b4511
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 +1182 -1161
- package/README.md +108 -119
- package/build/index.cjs.js +1 -1
- package/build/index.mjs +1 -1
- package/build/types/btoa.d.ts +6 -6
- package/build/types/client.d.ts +136 -136
- package/build/types/constants.d.ts +15 -15
- package/build/types/errorHandler.d.ts +2 -2
- package/build/types/errors.d.ts +332 -332
- package/build/types/http/client.d.ts +2 -2
- package/build/types/http/index.d.ts +4 -4
- package/build/types/http/interceptors.d.ts +9 -9
- package/build/types/http/oAuth1Signature.d.ts +14 -14
- package/build/types/http/oauth1.d.ts +3 -3
- package/build/types/http/oauth2.d.ts +3 -3
- package/build/types/http/proxy.d.ts +3 -3
- package/build/types/http/types.d.ts +331 -331
- package/build/types/http/utils.d.ts +21 -21
- package/build/types/index.d.ts +9 -9
- package/build/types/mock.d.ts +43 -43
- package/build/types/mockType.d.ts +1547 -1511
- package/build/types/parseStoredCredentials.d.ts +11 -11
- package/build/types/rql/index.d.ts +16 -16
- package/build/types/rql/parser.d.ts +1 -1
- package/build/types/rql/types.d.ts +168 -168
- package/build/types/services/auth/applications/index.d.ts +5 -5
- package/build/types/services/auth/applications/types.d.ts +260 -190
- package/build/types/services/auth/index.d.ts +3 -3
- package/build/types/services/auth/oauth1/index.d.ts +5 -5
- package/build/types/services/auth/oauth1/types.d.ts +63 -63
- package/build/types/services/auth/oauth2/index.d.ts +5 -5
- package/build/types/services/auth/oauth2/types.d.ts +52 -52
- package/build/types/services/auth/oidc/index.d.ts +5 -5
- package/build/types/services/auth/oidc/loginAttempts/index.d.ts +5 -5
- package/build/types/services/auth/oidc/loginAttempts/types.d.ts +67 -67
- package/build/types/services/auth/oidc/providers/index.d.ts +5 -5
- package/build/types/services/auth/oidc/providers/types.d.ts +144 -144
- package/build/types/services/auth/oidc/types.d.ts +40 -40
- package/build/types/services/auth/types.d.ts +39 -39
- package/build/types/services/auth/users/index.d.ts +5 -5
- package/build/types/services/auth/users/types.d.ts +121 -121
- package/build/types/services/configurations/general.d.ts +5 -5
- package/build/types/services/configurations/groups.d.ts +5 -5
- package/build/types/services/configurations/index.d.ts +10 -10
- package/build/types/services/configurations/patients.d.ts +5 -5
- package/build/types/services/configurations/staff.d.ts +5 -5
- package/build/types/services/configurations/types.d.ts +222 -222
- package/build/types/services/configurations/users.d.ts +5 -5
- package/build/types/services/data/comments.d.ts +5 -5
- package/build/types/services/data/documents.d.ts +5 -5
- package/build/types/services/data/index.d.ts +13 -13
- package/build/types/services/data/indexes.d.ts +5 -5
- package/build/types/services/data/infrastructure.d.ts +10 -10
- package/build/types/services/data/json-schema.d.ts +121 -121
- package/build/types/services/data/properties.d.ts +5 -5
- package/build/types/services/data/schemas.d.ts +5 -5
- package/build/types/services/data/statuses.d.ts +5 -5
- package/build/types/services/data/transitions.d.ts +5 -5
- package/build/types/services/data/types.d.ts +899 -899
- package/build/types/services/dispatchers/actions/index.d.ts +5 -5
- package/build/types/services/dispatchers/actions/types.d.ts +78 -78
- package/build/types/services/dispatchers/dispatchers/index.d.ts +5 -5
- package/build/types/services/dispatchers/dispatchers/types.d.ts +111 -111
- package/build/types/services/dispatchers/index.d.ts +7 -7
- package/build/types/services/dispatchers/types.d.ts +2 -2
- package/build/types/services/events/events.d.ts +5 -5
- package/build/types/services/events/health.d.ts +9 -9
- package/build/types/services/events/index.d.ts +6 -6
- package/build/types/services/events/subscriptions.d.ts +5 -5
- package/build/types/services/events/types.d.ts +90 -90
- package/build/types/services/files/files.d.ts +5 -5
- package/build/types/services/files/formHelpers.d.ts +3 -3
- package/build/types/services/files/index.d.ts +6 -6
- package/build/types/services/files/settings/index.d.ts +5 -5
- package/build/types/services/files/settings/types.d.ts +38 -38
- package/build/types/services/files/tokens.d.ts +5 -5
- package/build/types/services/files/types.d.ts +185 -185
- package/build/types/services/helpers.d.ts +7 -7
- package/build/types/services/http-client.d.ts +22 -22
- package/build/types/services/index.d.ts +15 -15
- package/build/types/services/localizations/countries.d.ts +5 -5
- package/build/types/services/localizations/health.d.ts +9 -9
- package/build/types/services/localizations/index.d.ts +4 -4
- package/build/types/services/localizations/languages.d.ts +5 -5
- package/build/types/services/localizations/localizations.d.ts +5 -5
- package/build/types/services/localizations/types.d.ts +145 -145
- package/build/types/services/logs/access/index.d.ts +5 -5
- package/build/types/services/logs/access/types.d.ts +41 -41
- package/build/types/services/logs/index.d.ts +3 -3
- package/build/types/services/logs/types.d.ts +4 -4
- package/build/types/services/mails/index.d.ts +3 -3
- package/build/types/services/mails/mails.d.ts +5 -5
- package/build/types/services/mails/types.d.ts +141 -141
- package/build/types/services/notifications/health.d.ts +9 -9
- package/build/types/services/notifications/index.d.ts +7 -7
- package/build/types/services/notifications/notifications.d.ts +5 -5
- package/build/types/services/notifications/settings.d.ts +5 -5
- package/build/types/services/notifications/types.d.ts +222 -222
- package/build/types/services/payments/appStore.d.ts +5 -5
- package/build/types/services/payments/appStoreSubscriptions.d.ts +5 -5
- package/build/types/services/payments/health.d.ts +9 -9
- package/build/types/services/payments/index.d.ts +15 -15
- package/build/types/services/payments/orders.d.ts +5 -5
- package/build/types/services/payments/playStore.d.ts +5 -5
- package/build/types/services/payments/playStoreHistory.d.ts +5 -5
- package/build/types/services/payments/playStoreSubscriptions.d.ts +5 -5
- package/build/types/services/payments/products.d.ts +5 -5
- package/build/types/services/payments/stripe.d.ts +5 -5
- package/build/types/services/payments/subscriptions.d.ts +5 -5
- package/build/types/services/payments/types.d.ts +1189 -1189
- package/build/types/services/profiles/groups.d.ts +5 -5
- package/build/types/services/profiles/health.d.ts +9 -9
- package/build/types/services/profiles/index.d.ts +9 -9
- package/build/types/services/profiles/logs.d.ts +5 -5
- package/build/types/services/profiles/profiles.d.ts +5 -5
- package/build/types/services/profiles/types.d.ts +370 -369
- package/build/types/services/tasks/api/index.d.ts +5 -5
- package/build/types/services/tasks/api/types.d.ts +146 -146
- package/build/types/services/tasks/apiRequests/index.d.ts +5 -5
- package/build/types/services/tasks/apiRequests/logs/index.d.ts +5 -5
- package/build/types/services/tasks/apiRequests/logs/types.d.ts +25 -25
- package/build/types/services/tasks/apiRequests/types.d.ts +83 -83
- package/build/types/services/tasks/functions/index.d.ts +5 -5
- package/build/types/services/tasks/functions/types.d.ts +27 -27
- package/build/types/services/tasks/index.d.ts +15 -15
- package/build/types/services/tasks/logs/index.d.ts +5 -5
- package/build/types/services/tasks/logs/types.d.ts +28 -28
- package/build/types/services/tasks/schedules/index.d.ts +5 -5
- package/build/types/services/tasks/schedules/types.d.ts +88 -88
- package/build/types/services/tasks/tasks.d.ts +5 -5
- package/build/types/services/tasks/types.d.ts +107 -107
- package/build/types/services/templates/index.d.ts +3 -3
- package/build/types/services/templates/templates.d.ts +5 -5
- package/build/types/services/templates/types.d.ts +202 -202
- package/build/types/services/types.d.ts +77 -77
- package/build/types/services/users/activationRequests/index.d.ts +4 -4
- package/build/types/services/users/activationRequests/types.d.ts +70 -70
- package/build/types/services/users/forgotPasswordRequests/index.d.ts +4 -4
- package/build/types/services/users/forgotPasswordRequests/types.d.ts +70 -70
- package/build/types/services/users/globalRoles.d.ts +5 -5
- package/build/types/services/users/groupRoles.d.ts +5 -5
- package/build/types/services/users/health.d.ts +9 -9
- package/build/types/services/users/index.d.ts +16 -16
- package/build/types/services/users/settings/index.d.ts +4 -4
- package/build/types/services/users/settings/types.d.ts +47 -47
- package/build/types/services/users/types.d.ts +1202 -1055
- package/build/types/services/users/users.d.ts +5 -5
- package/build/types/sha1.d.ts +11 -11
- package/build/types/types.d.ts +102 -102
- package/build/types/utils.d.ts +4 -4
- package/build/types/version.d.ts +1 -1
- package/package.json +62 -62
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ApiRequestService } from '../../types';
|
|
2
|
-
import type { ApiService, FunctionsService, HttpInstance, LogsService, SchedulesService } from '../../types';
|
|
3
|
-
import api from './api';
|
|
4
|
-
import apiRequests from './apiRequests';
|
|
5
|
-
import functions from './functions';
|
|
6
|
-
import logs from './logs';
|
|
7
|
-
import schedules from './schedules';
|
|
8
|
-
import { TasksService } from './types';
|
|
9
|
-
export declare const tasksService: (httpWithAuth: HttpInstance) => TasksService & {
|
|
10
|
-
schedules: SchedulesService;
|
|
11
|
-
functions: FunctionsService;
|
|
12
|
-
api: ApiService;
|
|
13
|
-
logs: LogsService;
|
|
14
|
-
apiRequests: ApiRequestService;
|
|
15
|
-
};
|
|
1
|
+
import { ApiRequestService } from '../../types';
|
|
2
|
+
import type { ApiService, FunctionsService, HttpInstance, LogsService, SchedulesService } from '../../types';
|
|
3
|
+
import api from './api';
|
|
4
|
+
import apiRequests from './apiRequests';
|
|
5
|
+
import functions from './functions';
|
|
6
|
+
import logs from './logs';
|
|
7
|
+
import schedules from './schedules';
|
|
8
|
+
import { TasksService } from './types';
|
|
9
|
+
export declare const tasksService: (httpWithAuth: HttpInstance) => TasksService & {
|
|
10
|
+
schedules: SchedulesService;
|
|
11
|
+
functions: FunctionsService;
|
|
12
|
+
api: ApiService;
|
|
13
|
+
logs: LogsService;
|
|
14
|
+
apiRequests: ApiRequestService;
|
|
15
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HttpInstance } from '../../../http/types';
|
|
2
|
-
import { HttpClient } from '../../http-client';
|
|
3
|
-
import { LogsService } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpWithAuth: HttpInstance) => LogsService;
|
|
5
|
-
export default _default;
|
|
1
|
+
import { HttpInstance } from '../../../http/types';
|
|
2
|
+
import { HttpClient } from '../../http-client';
|
|
3
|
+
import { LogsService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpWithAuth: HttpInstance) => LogsService;
|
|
5
|
+
export default _default;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { ObjectId, OptionsWithRql } from '../../types';
|
|
2
|
-
export interface LogsService {
|
|
3
|
-
/**
|
|
4
|
-
* ## Retrieve a list of logs for a task
|
|
5
|
-
*
|
|
6
|
-
* **Global Permissions:**
|
|
7
|
-
* - `VIEW_TASK_LOGS` - **Required** for this endpoint
|
|
8
|
-
*
|
|
9
|
-
* @param taskId {@link string} The id of the targeted task
|
|
10
|
-
* @param options {@link OptionsWithRql} - Additional options for the request
|
|
11
|
-
* @returns An array of task logs {@link LogLine LineLog[]}
|
|
12
|
-
*/
|
|
13
|
-
find(taskId: ObjectId, options?: OptionsWithRql): Promise<LogLine[]>;
|
|
14
|
-
/**
|
|
15
|
-
* ## Retrieve the first queried task log
|
|
16
|
-
*
|
|
17
|
-
* **Global Permissions:**
|
|
18
|
-
* - `VIEW_TASK_LOGS` - **Required** for this endpoint
|
|
19
|
-
*
|
|
20
|
-
* @param taskId {@link string} The id of the targeted task
|
|
21
|
-
* @param options {@link OptionsWithRql} - Additional options for the request
|
|
22
|
-
* @returns The first element of the queried task logs {@link LogLine} */
|
|
23
|
-
findFirst(taskId: ObjectId, options?: OptionsWithRql): Promise<LogLine>;
|
|
24
|
-
}
|
|
25
|
-
export interface LogLine {
|
|
26
|
-
message: string;
|
|
27
|
-
timestamp: Date;
|
|
28
|
-
}
|
|
1
|
+
import { ObjectId, OptionsWithRql } from '../../types';
|
|
2
|
+
export interface LogsService {
|
|
3
|
+
/**
|
|
4
|
+
* ## Retrieve a list of logs for a task
|
|
5
|
+
*
|
|
6
|
+
* **Global Permissions:**
|
|
7
|
+
* - `VIEW_TASK_LOGS` - **Required** for this endpoint
|
|
8
|
+
*
|
|
9
|
+
* @param taskId {@link string} The id of the targeted task
|
|
10
|
+
* @param options {@link OptionsWithRql} - Additional options for the request
|
|
11
|
+
* @returns An array of task logs {@link LogLine LineLog[]}
|
|
12
|
+
*/
|
|
13
|
+
find(taskId: ObjectId, options?: OptionsWithRql): Promise<LogLine[]>;
|
|
14
|
+
/**
|
|
15
|
+
* ## Retrieve the first queried task log
|
|
16
|
+
*
|
|
17
|
+
* **Global Permissions:**
|
|
18
|
+
* - `VIEW_TASK_LOGS` - **Required** for this endpoint
|
|
19
|
+
*
|
|
20
|
+
* @param taskId {@link string} The id of the targeted task
|
|
21
|
+
* @param options {@link OptionsWithRql} - Additional options for the request
|
|
22
|
+
* @returns The first element of the queried task logs {@link LogLine} */
|
|
23
|
+
findFirst(taskId: ObjectId, options?: OptionsWithRql): Promise<LogLine>;
|
|
24
|
+
}
|
|
25
|
+
export interface LogLine {
|
|
26
|
+
message: string;
|
|
27
|
+
timestamp: Date;
|
|
28
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HttpInstance } from '../../../http/types';
|
|
2
|
-
import { HttpClient } from '../../http-client';
|
|
3
|
-
import { SchedulesService } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => SchedulesService;
|
|
5
|
-
export default _default;
|
|
1
|
+
import { HttpInstance } from '../../../http/types';
|
|
2
|
+
import { HttpClient } from '../../http-client';
|
|
3
|
+
import { SchedulesService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => SchedulesService;
|
|
5
|
+
export default _default;
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
import { FindAllIterator } from '../../helpers';
|
|
2
|
-
import { AffectedRecords, ObjectId, OptionsBase, OptionsWithRql, PagedResultWithPager } from '../../types';
|
|
3
|
-
export interface SchedulesService {
|
|
4
|
-
/**
|
|
5
|
-
* ## Create a new Schedule
|
|
6
|
-
*
|
|
7
|
-
* **Global Permissions:**
|
|
8
|
-
* - `CREATE_TASK_SCHEDULE` - Allows a user to create schedules
|
|
9
|
-
*
|
|
10
|
-
* @param schedule - The data used to create the schedule
|
|
11
|
-
* @param options - Additional options for the request
|
|
12
|
-
*/
|
|
13
|
-
create<T>(schedule: ScheduleCreation<T>, options?: OptionsBase): Promise<Schedule<T>>;
|
|
14
|
-
/**
|
|
15
|
-
* ## Delete a Schedule
|
|
16
|
-
*
|
|
17
|
-
* **Global Permissions:**
|
|
18
|
-
* - `DELETE_TASK_SCHEDULE` - Allows a user to delete schedules
|
|
19
|
-
*
|
|
20
|
-
* @param scheduleId - The id of the schedule to delete
|
|
21
|
-
* @param options - Additional options for the request
|
|
22
|
-
*/
|
|
23
|
-
delete(scheduleId: ObjectId, options?: OptionsBase): Promise<AffectedRecords>;
|
|
24
|
-
/**
|
|
25
|
-
* ## Retrieve a paged list of schedules
|
|
26
|
-
*
|
|
27
|
-
* **Global Permissions:**
|
|
28
|
-
* - `VIEW_TASK_SCHEDULES` - Allows a user to view schedules
|
|
29
|
-
*
|
|
30
|
-
* @param options {@link OptionsWithRql} - Add filters to the requested list
|
|
31
|
-
* @returns A paged list of schedules {@link PagedResultWithPager PagedResultWithPager<Schedule>}
|
|
32
|
-
*/
|
|
33
|
-
find<T>(options?: OptionsWithRql): Promise<PagedResultWithPager<Schedule<T>>>;
|
|
34
|
-
/**
|
|
35
|
-
* ## Retrieve a list of all Schedules
|
|
36
|
-
*
|
|
37
|
-
* **Global Permissions:**
|
|
38
|
-
* - `VIEW_TASK_SCHEDULES` - Allows a user to view schedules
|
|
39
|
-
*
|
|
40
|
-
* @param options {@link OptionsWithRql} - Add filters to the requested list
|
|
41
|
-
* @returns An array of Schedules {@link Schedule Schedule[]}
|
|
42
|
-
* @throws {@link Error} Do not pass in limit operator with findAll
|
|
43
|
-
*/
|
|
44
|
-
findAll<T>(options?: OptionsWithRql): Promise<Schedule<T>[]>;
|
|
45
|
-
/**
|
|
46
|
-
* ## Retrieve a paged list of Schedules
|
|
47
|
-
*
|
|
48
|
-
* **Global Permissions:**
|
|
49
|
-
* - `VIEW_TASK_SCHEDULES` - Allows a user to view Schedules
|
|
50
|
-
*
|
|
51
|
-
* @param options {@link OptionsWithRql} - Add filters to the requested list
|
|
52
|
-
* @returns An iterator for the queried schedules {@link FindAllIterator FindAllIterator<Schedule>}
|
|
53
|
-
*/
|
|
54
|
-
findAllIterator<T>(options?: OptionsWithRql): FindAllIterator<Schedule<T>>;
|
|
55
|
-
/**
|
|
56
|
-
* ## Retrieve the first queried Schedule
|
|
57
|
-
*
|
|
58
|
-
* **Global Permissions:**
|
|
59
|
-
* - `VIEW_TASK_SCHEDULES` - Allows a user to view Schedules
|
|
60
|
-
*
|
|
61
|
-
* @param options {@link OptionsWithRql} - Add filters to the requested list
|
|
62
|
-
* @returns The first element of the queried Schedules {@link Schedule}
|
|
63
|
-
*/
|
|
64
|
-
findFirst<T>(options?: OptionsWithRql): Promise<Schedule<T>>;
|
|
65
|
-
}
|
|
66
|
-
export interface ScheduleCreation<T = Record<string, any>> {
|
|
67
|
-
/** The period in seconds, for which the function defined will execute recurrently */
|
|
68
|
-
interval: number;
|
|
69
|
-
/** The functionName property serves as the unique identifier amongst all Functions */
|
|
70
|
-
functionName: string;
|
|
71
|
-
/** The data to be provided to the Function, the type may be user defined */
|
|
72
|
-
data?: T;
|
|
73
|
-
/** The priority of the schedule (Higher priorities shall execute first) */
|
|
74
|
-
priority?: number;
|
|
75
|
-
/** The timestamp at which the schedule will start executing */
|
|
76
|
-
startTimestamp?: Date;
|
|
77
|
-
}
|
|
78
|
-
export interface Schedule<T = Record<string, any>> extends ScheduleCreation<T> {
|
|
79
|
-
id: ObjectId;
|
|
80
|
-
/** The timestamp at which the schedule will start executing */
|
|
81
|
-
startTimestamp: Date;
|
|
82
|
-
/** The timestamp at which the schedule was last updated */
|
|
83
|
-
updateTimestamp: Date;
|
|
84
|
-
/** The timestamp at which the schedule was created */
|
|
85
|
-
creationTimestamp: Date;
|
|
86
|
-
/** The timestamp at which the schedule will next execute */
|
|
87
|
-
nextTimestamp: Date;
|
|
88
|
-
}
|
|
1
|
+
import { FindAllIterator } from '../../helpers';
|
|
2
|
+
import { AffectedRecords, ObjectId, OptionsBase, OptionsWithRql, PagedResultWithPager } from '../../types';
|
|
3
|
+
export interface SchedulesService {
|
|
4
|
+
/**
|
|
5
|
+
* ## Create a new Schedule
|
|
6
|
+
*
|
|
7
|
+
* **Global Permissions:**
|
|
8
|
+
* - `CREATE_TASK_SCHEDULE` - Allows a user to create schedules
|
|
9
|
+
*
|
|
10
|
+
* @param schedule - The data used to create the schedule
|
|
11
|
+
* @param options - Additional options for the request
|
|
12
|
+
*/
|
|
13
|
+
create<T>(schedule: ScheduleCreation<T>, options?: OptionsBase): Promise<Schedule<T>>;
|
|
14
|
+
/**
|
|
15
|
+
* ## Delete a Schedule
|
|
16
|
+
*
|
|
17
|
+
* **Global Permissions:**
|
|
18
|
+
* - `DELETE_TASK_SCHEDULE` - Allows a user to delete schedules
|
|
19
|
+
*
|
|
20
|
+
* @param scheduleId - The id of the schedule to delete
|
|
21
|
+
* @param options - Additional options for the request
|
|
22
|
+
*/
|
|
23
|
+
delete(scheduleId: ObjectId, options?: OptionsBase): Promise<AffectedRecords>;
|
|
24
|
+
/**
|
|
25
|
+
* ## Retrieve a paged list of schedules
|
|
26
|
+
*
|
|
27
|
+
* **Global Permissions:**
|
|
28
|
+
* - `VIEW_TASK_SCHEDULES` - Allows a user to view schedules
|
|
29
|
+
*
|
|
30
|
+
* @param options {@link OptionsWithRql} - Add filters to the requested list
|
|
31
|
+
* @returns A paged list of schedules {@link PagedResultWithPager PagedResultWithPager<Schedule>}
|
|
32
|
+
*/
|
|
33
|
+
find<T>(options?: OptionsWithRql): Promise<PagedResultWithPager<Schedule<T>>>;
|
|
34
|
+
/**
|
|
35
|
+
* ## Retrieve a list of all Schedules
|
|
36
|
+
*
|
|
37
|
+
* **Global Permissions:**
|
|
38
|
+
* - `VIEW_TASK_SCHEDULES` - Allows a user to view schedules
|
|
39
|
+
*
|
|
40
|
+
* @param options {@link OptionsWithRql} - Add filters to the requested list
|
|
41
|
+
* @returns An array of Schedules {@link Schedule Schedule[]}
|
|
42
|
+
* @throws {@link Error} Do not pass in limit operator with findAll
|
|
43
|
+
*/
|
|
44
|
+
findAll<T>(options?: OptionsWithRql): Promise<Schedule<T>[]>;
|
|
45
|
+
/**
|
|
46
|
+
* ## Retrieve a paged list of Schedules
|
|
47
|
+
*
|
|
48
|
+
* **Global Permissions:**
|
|
49
|
+
* - `VIEW_TASK_SCHEDULES` - Allows a user to view Schedules
|
|
50
|
+
*
|
|
51
|
+
* @param options {@link OptionsWithRql} - Add filters to the requested list
|
|
52
|
+
* @returns An iterator for the queried schedules {@link FindAllIterator FindAllIterator<Schedule>}
|
|
53
|
+
*/
|
|
54
|
+
findAllIterator<T>(options?: OptionsWithRql): FindAllIterator<Schedule<T>>;
|
|
55
|
+
/**
|
|
56
|
+
* ## Retrieve the first queried Schedule
|
|
57
|
+
*
|
|
58
|
+
* **Global Permissions:**
|
|
59
|
+
* - `VIEW_TASK_SCHEDULES` - Allows a user to view Schedules
|
|
60
|
+
*
|
|
61
|
+
* @param options {@link OptionsWithRql} - Add filters to the requested list
|
|
62
|
+
* @returns The first element of the queried Schedules {@link Schedule}
|
|
63
|
+
*/
|
|
64
|
+
findFirst<T>(options?: OptionsWithRql): Promise<Schedule<T>>;
|
|
65
|
+
}
|
|
66
|
+
export interface ScheduleCreation<T = Record<string, any>> {
|
|
67
|
+
/** The period in seconds, for which the function defined will execute recurrently */
|
|
68
|
+
interval: number;
|
|
69
|
+
/** The functionName property serves as the unique identifier amongst all Functions */
|
|
70
|
+
functionName: string;
|
|
71
|
+
/** The data to be provided to the Function, the type may be user defined */
|
|
72
|
+
data?: T;
|
|
73
|
+
/** The priority of the schedule (Higher priorities shall execute first) */
|
|
74
|
+
priority?: number;
|
|
75
|
+
/** The timestamp at which the schedule will start executing */
|
|
76
|
+
startTimestamp?: Date;
|
|
77
|
+
}
|
|
78
|
+
export interface Schedule<T = Record<string, any>> extends ScheduleCreation<T> {
|
|
79
|
+
id: ObjectId;
|
|
80
|
+
/** The timestamp at which the schedule will start executing */
|
|
81
|
+
startTimestamp: Date;
|
|
82
|
+
/** The timestamp at which the schedule was last updated */
|
|
83
|
+
updateTimestamp: Date;
|
|
84
|
+
/** The timestamp at which the schedule was created */
|
|
85
|
+
creationTimestamp: Date;
|
|
86
|
+
/** The timestamp at which the schedule will next execute */
|
|
87
|
+
nextTimestamp: Date;
|
|
88
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../types';
|
|
2
|
-
import { HttpClient } from '../http-client';
|
|
3
|
-
import type { TasksService } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => TasksService;
|
|
5
|
-
export default _default;
|
|
1
|
+
import type { HttpInstance } from '../../types';
|
|
2
|
+
import { HttpClient } from '../http-client';
|
|
3
|
+
import type { TasksService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => TasksService;
|
|
5
|
+
export default _default;
|
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
import { FindAllIterator } from '../../services/helpers';
|
|
2
|
-
import type { AffectedRecords, ObjectId, OptionsBase, OptionsWithRql, PagedResult } from '../types';
|
|
3
|
-
export * from './api/types';
|
|
4
|
-
export * from './apiRequests/types';
|
|
5
|
-
export * from './functions/types';
|
|
6
|
-
export * from './logs/types';
|
|
7
|
-
export * from './schedules/types';
|
|
8
|
-
export declare enum TaskStatus {
|
|
9
|
-
NEW = "new",
|
|
10
|
-
IN_PROGRESS = "inProgress",
|
|
11
|
-
COMPLETE = "complete",
|
|
12
|
-
FAILED = "failed",
|
|
13
|
-
CANCELED = "canceled"
|
|
14
|
-
}
|
|
15
|
-
export interface Task<DataType = any> {
|
|
16
|
-
id?: ObjectId;
|
|
17
|
-
status?: TaskStatus;
|
|
18
|
-
statusChangedTimestamp?: Date;
|
|
19
|
-
/**
|
|
20
|
-
* AWS Lambda function name
|
|
21
|
-
*/
|
|
22
|
-
functionName: string;
|
|
23
|
-
/**
|
|
24
|
-
* Data send to the function
|
|
25
|
-
*/
|
|
26
|
-
data?: DataType;
|
|
27
|
-
startTimestamp?: Date;
|
|
28
|
-
tags?: Array<string>;
|
|
29
|
-
priority?: number;
|
|
30
|
-
creationTimestamp?: Date;
|
|
31
|
-
updateTimestamp?: Date;
|
|
32
|
-
/** The Extra Horizon document id for the application used to make the request */
|
|
33
|
-
createdByApplicationId?: ObjectId;
|
|
34
|
-
/** The Extra Horizon document id for the user who made the request */
|
|
35
|
-
createdByUserId?: ObjectId;
|
|
36
|
-
}
|
|
37
|
-
export declare type TaskInput = Pick<Task, 'functionName' | 'data' | 'startTimestamp' | 'priority' | 'tags'>;
|
|
38
|
-
export interface TasksService {
|
|
39
|
-
/**
|
|
40
|
-
* View a list of tasks
|
|
41
|
-
*
|
|
42
|
-
* Permission | Scope | Effect
|
|
43
|
-
* - | - | -
|
|
44
|
-
* `VIEW_TASKS` | `gobal` | **Required** for this endpoint
|
|
45
|
-
* @returns PagedResult<Task>
|
|
46
|
-
*/
|
|
47
|
-
find(options?: OptionsWithRql): Promise<PagedResult<Task>>;
|
|
48
|
-
/**
|
|
49
|
-
* Find By Id
|
|
50
|
-
* @param id the Id to search for
|
|
51
|
-
* @param rql an optional rql string
|
|
52
|
-
* @returns the first element found
|
|
53
|
-
*/
|
|
54
|
-
findById(id: ObjectId, options?: OptionsWithRql): Promise<Task>;
|
|
55
|
-
/**
|
|
56
|
-
* Request a list of all tasks
|
|
57
|
-
*
|
|
58
|
-
* Do not pass in an rql with limit operator!
|
|
59
|
-
*
|
|
60
|
-
* Permission | Scope | Effect
|
|
61
|
-
* - | - | -
|
|
62
|
-
* `VIEW_TASKS` | `gobal` | **Required** for this endpoint
|
|
63
|
-
* @param rql Add filters to the requested list.
|
|
64
|
-
* @returns Task[]
|
|
65
|
-
*/
|
|
66
|
-
findAll(options?: OptionsWithRql): Promise<Task[]>;
|
|
67
|
-
/**
|
|
68
|
-
* Request a list of all tasks
|
|
69
|
-
*
|
|
70
|
-
* Permission | Scope | Effect
|
|
71
|
-
* - | - | -
|
|
72
|
-
* `VIEW_TASKS` | `gobal` | **Required** for this endpoint
|
|
73
|
-
* @param rql Add filters to the requested list.
|
|
74
|
-
* @returns Task[]
|
|
75
|
-
*/
|
|
76
|
-
findAllIterator(options?: OptionsWithRql): FindAllIterator<Task>;
|
|
77
|
-
/**
|
|
78
|
-
* Find First
|
|
79
|
-
* @param rql an optional rql string
|
|
80
|
-
* @returns the first element found
|
|
81
|
-
*/
|
|
82
|
-
findFirst(options?: OptionsWithRql): Promise<Task>;
|
|
83
|
-
/**
|
|
84
|
-
* Create a task
|
|
85
|
-
*
|
|
86
|
-
* Permission | Scope | Effect
|
|
87
|
-
* - | - | -
|
|
88
|
-
* `CREATE_TASKS` | `gobal` | **Required** for this endpoint
|
|
89
|
-
* @param requestBody
|
|
90
|
-
* @returns Task Success
|
|
91
|
-
*/
|
|
92
|
-
create(requestBody: TaskInput, options?: OptionsBase): Promise<Task>;
|
|
93
|
-
/**
|
|
94
|
-
* Cancel a task
|
|
95
|
-
*
|
|
96
|
-
* The targeted task **MUST** be in the `new` status.
|
|
97
|
-
*
|
|
98
|
-
* Permission | Scope | Effect
|
|
99
|
-
* - | - | -
|
|
100
|
-
* `CANCEL_TASKS` | `gobal` | **Required** for this endpoint
|
|
101
|
-
* @param taskId The id of the targeted task
|
|
102
|
-
* @returns AffectedRecords
|
|
103
|
-
* @throws {IllegalStateException}
|
|
104
|
-
* @throws {ResourceUnknownException}
|
|
105
|
-
*/
|
|
106
|
-
cancel(taskId: ObjectId, options?: OptionsBase): Promise<AffectedRecords>;
|
|
107
|
-
}
|
|
1
|
+
import { FindAllIterator } from '../../services/helpers';
|
|
2
|
+
import type { AffectedRecords, ObjectId, OptionsBase, OptionsWithRql, PagedResult } from '../types';
|
|
3
|
+
export * from './api/types';
|
|
4
|
+
export * from './apiRequests/types';
|
|
5
|
+
export * from './functions/types';
|
|
6
|
+
export * from './logs/types';
|
|
7
|
+
export * from './schedules/types';
|
|
8
|
+
export declare enum TaskStatus {
|
|
9
|
+
NEW = "new",
|
|
10
|
+
IN_PROGRESS = "inProgress",
|
|
11
|
+
COMPLETE = "complete",
|
|
12
|
+
FAILED = "failed",
|
|
13
|
+
CANCELED = "canceled"
|
|
14
|
+
}
|
|
15
|
+
export interface Task<DataType = any> {
|
|
16
|
+
id?: ObjectId;
|
|
17
|
+
status?: TaskStatus;
|
|
18
|
+
statusChangedTimestamp?: Date;
|
|
19
|
+
/**
|
|
20
|
+
* AWS Lambda function name
|
|
21
|
+
*/
|
|
22
|
+
functionName: string;
|
|
23
|
+
/**
|
|
24
|
+
* Data send to the function
|
|
25
|
+
*/
|
|
26
|
+
data?: DataType;
|
|
27
|
+
startTimestamp?: Date;
|
|
28
|
+
tags?: Array<string>;
|
|
29
|
+
priority?: number;
|
|
30
|
+
creationTimestamp?: Date;
|
|
31
|
+
updateTimestamp?: Date;
|
|
32
|
+
/** The Extra Horizon document id for the application used to make the request */
|
|
33
|
+
createdByApplicationId?: ObjectId;
|
|
34
|
+
/** The Extra Horizon document id for the user who made the request */
|
|
35
|
+
createdByUserId?: ObjectId;
|
|
36
|
+
}
|
|
37
|
+
export declare type TaskInput = Pick<Task, 'functionName' | 'data' | 'startTimestamp' | 'priority' | 'tags'>;
|
|
38
|
+
export interface TasksService {
|
|
39
|
+
/**
|
|
40
|
+
* View a list of tasks
|
|
41
|
+
*
|
|
42
|
+
* Permission | Scope | Effect
|
|
43
|
+
* - | - | -
|
|
44
|
+
* `VIEW_TASKS` | `gobal` | **Required** for this endpoint
|
|
45
|
+
* @returns PagedResult<Task>
|
|
46
|
+
*/
|
|
47
|
+
find(options?: OptionsWithRql): Promise<PagedResult<Task>>;
|
|
48
|
+
/**
|
|
49
|
+
* Find By Id
|
|
50
|
+
* @param id the Id to search for
|
|
51
|
+
* @param rql an optional rql string
|
|
52
|
+
* @returns the first element found
|
|
53
|
+
*/
|
|
54
|
+
findById(id: ObjectId, options?: OptionsWithRql): Promise<Task>;
|
|
55
|
+
/**
|
|
56
|
+
* Request a list of all tasks
|
|
57
|
+
*
|
|
58
|
+
* Do not pass in an rql with limit operator!
|
|
59
|
+
*
|
|
60
|
+
* Permission | Scope | Effect
|
|
61
|
+
* - | - | -
|
|
62
|
+
* `VIEW_TASKS` | `gobal` | **Required** for this endpoint
|
|
63
|
+
* @param rql Add filters to the requested list.
|
|
64
|
+
* @returns Task[]
|
|
65
|
+
*/
|
|
66
|
+
findAll(options?: OptionsWithRql): Promise<Task[]>;
|
|
67
|
+
/**
|
|
68
|
+
* Request a list of all tasks
|
|
69
|
+
*
|
|
70
|
+
* Permission | Scope | Effect
|
|
71
|
+
* - | - | -
|
|
72
|
+
* `VIEW_TASKS` | `gobal` | **Required** for this endpoint
|
|
73
|
+
* @param rql Add filters to the requested list.
|
|
74
|
+
* @returns Task[]
|
|
75
|
+
*/
|
|
76
|
+
findAllIterator(options?: OptionsWithRql): FindAllIterator<Task>;
|
|
77
|
+
/**
|
|
78
|
+
* Find First
|
|
79
|
+
* @param rql an optional rql string
|
|
80
|
+
* @returns the first element found
|
|
81
|
+
*/
|
|
82
|
+
findFirst(options?: OptionsWithRql): Promise<Task>;
|
|
83
|
+
/**
|
|
84
|
+
* Create a task
|
|
85
|
+
*
|
|
86
|
+
* Permission | Scope | Effect
|
|
87
|
+
* - | - | -
|
|
88
|
+
* `CREATE_TASKS` | `gobal` | **Required** for this endpoint
|
|
89
|
+
* @param requestBody
|
|
90
|
+
* @returns Task Success
|
|
91
|
+
*/
|
|
92
|
+
create(requestBody: TaskInput, options?: OptionsBase): Promise<Task>;
|
|
93
|
+
/**
|
|
94
|
+
* Cancel a task
|
|
95
|
+
*
|
|
96
|
+
* The targeted task **MUST** be in the `new` status.
|
|
97
|
+
*
|
|
98
|
+
* Permission | Scope | Effect
|
|
99
|
+
* - | - | -
|
|
100
|
+
* `CANCEL_TASKS` | `gobal` | **Required** for this endpoint
|
|
101
|
+
* @param taskId The id of the targeted task
|
|
102
|
+
* @returns AffectedRecords
|
|
103
|
+
* @throws {IllegalStateException}
|
|
104
|
+
* @throws {ResourceUnknownException}
|
|
105
|
+
*/
|
|
106
|
+
cancel(taskId: ObjectId, options?: OptionsBase): Promise<AffectedRecords>;
|
|
107
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../types';
|
|
2
|
-
import { TemplatesService } from './types';
|
|
3
|
-
export declare const templatesService: (httpWithAuth: HttpInstance) => TemplatesService;
|
|
1
|
+
import type { HttpInstance } from '../../types';
|
|
2
|
+
import { TemplatesService } from './types';
|
|
3
|
+
export declare const templatesService: (httpWithAuth: HttpInstance) => TemplatesService;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../types';
|
|
2
|
-
import { HttpClient } from '../http-client';
|
|
3
|
-
import type { TemplatesService } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => TemplatesService;
|
|
5
|
-
export default _default;
|
|
1
|
+
import type { HttpInstance } from '../../types';
|
|
2
|
+
import { HttpClient } from '../http-client';
|
|
3
|
+
import type { TemplatesService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => TemplatesService;
|
|
5
|
+
export default _default;
|