@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,222 +1,222 @@
|
|
|
1
|
-
import { FindAllIterator } from '../../services/helpers';
|
|
2
|
-
import { AffectedRecords, ObjectId, OptionsBase, OptionsWithRql, PagedResult, PagedResultWithPager } from '../types';
|
|
3
|
-
export interface Notification {
|
|
4
|
-
id?: ObjectId;
|
|
5
|
-
type?: string;
|
|
6
|
-
viewed?: boolean;
|
|
7
|
-
userId?: ObjectId;
|
|
8
|
-
fields?: Record<string, string>;
|
|
9
|
-
important?: boolean;
|
|
10
|
-
creationTimestamp?: Date;
|
|
11
|
-
updateTimestamp?: Date;
|
|
12
|
-
}
|
|
13
|
-
interface CreateNotificationRequestBase {
|
|
14
|
-
userId?: ObjectId;
|
|
15
|
-
important?: boolean;
|
|
16
|
-
}
|
|
17
|
-
interface CreateNotificationRequestMessage extends CreateNotificationRequestBase {
|
|
18
|
-
type: 'message';
|
|
19
|
-
fields: {
|
|
20
|
-
title: string;
|
|
21
|
-
body: string;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
interface CreateNotificationRequestLink extends CreateNotificationRequestBase {
|
|
25
|
-
type: 'link';
|
|
26
|
-
fields: {
|
|
27
|
-
title: string;
|
|
28
|
-
body: string;
|
|
29
|
-
url: string;
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
interface CreateNotificationRequestMeasurementComment extends CreateNotificationRequestBase {
|
|
33
|
-
type: 'measurement_comment';
|
|
34
|
-
fields: {
|
|
35
|
-
commenterId: ObjectId;
|
|
36
|
-
measurementId: ObjectId;
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
interface CreateNotificationRequestMeasurementReviewed extends CreateNotificationRequestBase {
|
|
40
|
-
type: 'measurement_reviewed';
|
|
41
|
-
fields: {
|
|
42
|
-
measurementId: ObjectId;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
interface CreateNotificationRequestMeasurementPrescriptionExpiry extends CreateNotificationRequestBase {
|
|
46
|
-
type: 'prescription_expiry';
|
|
47
|
-
fields: {
|
|
48
|
-
groupId: ObjectId;
|
|
49
|
-
groupName: string;
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
interface CreateNotificationRequestActivated extends CreateNotificationRequestBase {
|
|
53
|
-
type: 'activated';
|
|
54
|
-
}
|
|
55
|
-
interface CreateNotificationRequestPasswordChanged extends CreateNotificationRequestBase {
|
|
56
|
-
type: 'password_changed';
|
|
57
|
-
}
|
|
58
|
-
export declare type CreateNotificationRequest = CreateNotificationRequestMessage | CreateNotificationRequestLink | CreateNotificationRequestMeasurementComment | CreateNotificationRequestMeasurementReviewed | CreateNotificationRequestMeasurementPrescriptionExpiry | CreateNotificationRequestActivated | CreateNotificationRequestPasswordChanged;
|
|
59
|
-
export interface NotifTypeDef {
|
|
60
|
-
name?: string;
|
|
61
|
-
requiredFields?: Record<string, FieldType>;
|
|
62
|
-
optionalFields?: Record<string, {
|
|
63
|
-
fieldType?: FieldType;
|
|
64
|
-
defaultValue?: string;
|
|
65
|
-
}>;
|
|
66
|
-
title?: string;
|
|
67
|
-
body?: string;
|
|
68
|
-
combinedBody?: string;
|
|
69
|
-
pushByDefault?: boolean;
|
|
70
|
-
}
|
|
71
|
-
export declare enum FieldType {
|
|
72
|
-
STRING = "STRING",
|
|
73
|
-
NUMBER = "NUMBER",
|
|
74
|
-
BOOLEAN = "BOOLEAN",
|
|
75
|
-
OBJECT_ID = "OBJECT_ID",
|
|
76
|
-
URL = "URL"
|
|
77
|
-
}
|
|
78
|
-
export interface Setting {
|
|
79
|
-
id?: ObjectId;
|
|
80
|
-
key?: string;
|
|
81
|
-
preferences?: Record<string, boolean>;
|
|
82
|
-
creationTimestamp?: Date;
|
|
83
|
-
updateTimestamp?: Date;
|
|
84
|
-
}
|
|
85
|
-
export declare type SettingCreation = Required<Pick<Setting, 'key' | 'preferences'>>;
|
|
86
|
-
export interface NotificationsService {
|
|
87
|
-
/**
|
|
88
|
-
* Create a notification
|
|
89
|
-
*
|
|
90
|
-
* Permission | Scope | Effect
|
|
91
|
-
* - | - | -
|
|
92
|
-
* none | | Create a notification for yourself
|
|
93
|
-
* `CREATE_NOTIFICATIONS` | `global` | Create a notification for another person
|
|
94
|
-
* @param requestBody CreateNotificationRequest
|
|
95
|
-
* @returns Notification
|
|
96
|
-
*/
|
|
97
|
-
create(requestBody: CreateNotificationRequest, options?: OptionsBase): Promise<Notification>;
|
|
98
|
-
/**
|
|
99
|
-
* Retrieve a list of notifications
|
|
100
|
-
*
|
|
101
|
-
* Permission | Scope | Effect
|
|
102
|
-
* - | - | -
|
|
103
|
-
* none | | View your own notifications
|
|
104
|
-
* `VIEW_NOTIFICATIONS` | `global` | View all notifications
|
|
105
|
-
* @param rql Add filters to the requested list.
|
|
106
|
-
* @returns PagedResult<Notification>
|
|
107
|
-
*/
|
|
108
|
-
find(options?: OptionsWithRql): Promise<PagedResultWithPager<Notification>>;
|
|
109
|
-
/**
|
|
110
|
-
* Request a list of all notifications
|
|
111
|
-
*
|
|
112
|
-
* Do not pass in an rql with limit operator!
|
|
113
|
-
*
|
|
114
|
-
* Permission | Scope | Effect
|
|
115
|
-
* - | - | -
|
|
116
|
-
* none | | View your own notifications
|
|
117
|
-
* `VIEW_NOTIFICATIONS` | `global` | View all notifications
|
|
118
|
-
* @returns Notification[]
|
|
119
|
-
*/
|
|
120
|
-
findAll(options?: OptionsWithRql): Promise<Notification[]>;
|
|
121
|
-
/**
|
|
122
|
-
* Request a list of all notifications
|
|
123
|
-
*
|
|
124
|
-
* Permission | Scope | Effect
|
|
125
|
-
* - | - | -
|
|
126
|
-
* none | | View your own notifications
|
|
127
|
-
* `VIEW_NOTIFICATIONS` | `global` | View all notifications
|
|
128
|
-
* @returns Notification[]
|
|
129
|
-
*/
|
|
130
|
-
findAllIterator(options?: OptionsWithRql): FindAllIterator<Notification>;
|
|
131
|
-
/**
|
|
132
|
-
* Find By Id
|
|
133
|
-
* @param id the Id to search for
|
|
134
|
-
* @param rql an optional rql string
|
|
135
|
-
* @returns the first element found
|
|
136
|
-
*/
|
|
137
|
-
findById(id: ObjectId, options?: OptionsWithRql): Promise<Notification>;
|
|
138
|
-
/**
|
|
139
|
-
* Find First
|
|
140
|
-
* @param rql an optional rql string
|
|
141
|
-
* @returns the first element found
|
|
142
|
-
*/
|
|
143
|
-
findFirst(options?: OptionsWithRql): Promise<Notification>;
|
|
144
|
-
/**
|
|
145
|
-
* Delete notification(s)
|
|
146
|
-
*
|
|
147
|
-
* Permission | Scope | Effect
|
|
148
|
-
* - | - | -
|
|
149
|
-
* `DELETE_NOTIFICATIONS` | `global` | **Required** for this endpoint
|
|
150
|
-
* @param rql Add filters to the requested list.
|
|
151
|
-
* @returns AffectedRecords
|
|
152
|
-
*/
|
|
153
|
-
remove(options?: OptionsWithRql): Promise<AffectedRecords>;
|
|
154
|
-
/**
|
|
155
|
-
* Mark your notification(s) as viewed
|
|
156
|
-
*
|
|
157
|
-
* Permission | Scope | Effect
|
|
158
|
-
* - | - | -
|
|
159
|
-
* none | | Everyone can use this endpoint
|
|
160
|
-
* @param rql Add filters to the requested list.
|
|
161
|
-
* @returns AffectedRecords
|
|
162
|
-
*/
|
|
163
|
-
markAsViewed(options?: OptionsWithRql): Promise<AffectedRecords>;
|
|
164
|
-
/**
|
|
165
|
-
* Retrieve the list of notification types
|
|
166
|
-
*
|
|
167
|
-
* Permission | Scope | Effect
|
|
168
|
-
* - | - | -
|
|
169
|
-
* none | | Everyone can use this endpoint
|
|
170
|
-
* @returns PagedResult<NotifTypeDef>
|
|
171
|
-
*/
|
|
172
|
-
getTypes(options?: OptionsBase): Promise<PagedResult<NotifTypeDef>>;
|
|
173
|
-
}
|
|
174
|
-
export interface NotificationSettingsServices {
|
|
175
|
-
/**
|
|
176
|
-
* Retrieve a list of notifications settings
|
|
177
|
-
*
|
|
178
|
-
* Permission | Scope | Effect
|
|
179
|
-
* - | - | -
|
|
180
|
-
* none | | View your own notification settings
|
|
181
|
-
* `VIEW_NOTIFICATION_SETTINGS` | `global` | View all notification settings
|
|
182
|
-
* @param rql Add filters to the requested list.
|
|
183
|
-
* @returns PagedResult<Setting>
|
|
184
|
-
*/
|
|
185
|
-
find(options?: OptionsWithRql): Promise<PagedResult<Setting>>;
|
|
186
|
-
/**
|
|
187
|
-
* Find By Id
|
|
188
|
-
* @param id the Id to search for
|
|
189
|
-
* @param rql an optional rql string
|
|
190
|
-
* @returns the first element found
|
|
191
|
-
*/
|
|
192
|
-
findById(id: ObjectId, options?: OptionsWithRql): Promise<Setting>;
|
|
193
|
-
/**
|
|
194
|
-
* Find First
|
|
195
|
-
* @param rql an optional rql string
|
|
196
|
-
* @returns the first element found
|
|
197
|
-
*/
|
|
198
|
-
findFirst(options?: OptionsWithRql): Promise<Setting>;
|
|
199
|
-
/**
|
|
200
|
-
* Update the notification settings for a user
|
|
201
|
-
*
|
|
202
|
-
* Permission | Scope | Effect
|
|
203
|
-
* - | - | -
|
|
204
|
-
* none | | Update your own notification settings
|
|
205
|
-
* `UPDATE_NOTIFICATION_SETTINGS` | `global` | Update all notification settings
|
|
206
|
-
* @param userId The User Id
|
|
207
|
-
* @param requestBody SettingCreation object
|
|
208
|
-
* @returns Setting
|
|
209
|
-
*/
|
|
210
|
-
update(userId: string, requestBody: SettingCreation, options?: OptionsBase): Promise<Setting>;
|
|
211
|
-
/**
|
|
212
|
-
* Delete the notifications settings for a user
|
|
213
|
-
*
|
|
214
|
-
* Permission | Scope | Effect
|
|
215
|
-
* - | - | -
|
|
216
|
-
* `UPDATE_NOTIFICATION_SETTINGS` | `global` | **Required** for this endpoint
|
|
217
|
-
* @param userId
|
|
218
|
-
* @returns AffectedRecords
|
|
219
|
-
*/
|
|
220
|
-
remove(userId: string, options?: OptionsBase): Promise<AffectedRecords>;
|
|
221
|
-
}
|
|
222
|
-
export {};
|
|
1
|
+
import { FindAllIterator } from '../../services/helpers';
|
|
2
|
+
import { AffectedRecords, ObjectId, OptionsBase, OptionsWithRql, PagedResult, PagedResultWithPager } from '../types';
|
|
3
|
+
export interface Notification {
|
|
4
|
+
id?: ObjectId;
|
|
5
|
+
type?: string;
|
|
6
|
+
viewed?: boolean;
|
|
7
|
+
userId?: ObjectId;
|
|
8
|
+
fields?: Record<string, string>;
|
|
9
|
+
important?: boolean;
|
|
10
|
+
creationTimestamp?: Date;
|
|
11
|
+
updateTimestamp?: Date;
|
|
12
|
+
}
|
|
13
|
+
interface CreateNotificationRequestBase {
|
|
14
|
+
userId?: ObjectId;
|
|
15
|
+
important?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface CreateNotificationRequestMessage extends CreateNotificationRequestBase {
|
|
18
|
+
type: 'message';
|
|
19
|
+
fields: {
|
|
20
|
+
title: string;
|
|
21
|
+
body: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
interface CreateNotificationRequestLink extends CreateNotificationRequestBase {
|
|
25
|
+
type: 'link';
|
|
26
|
+
fields: {
|
|
27
|
+
title: string;
|
|
28
|
+
body: string;
|
|
29
|
+
url: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
interface CreateNotificationRequestMeasurementComment extends CreateNotificationRequestBase {
|
|
33
|
+
type: 'measurement_comment';
|
|
34
|
+
fields: {
|
|
35
|
+
commenterId: ObjectId;
|
|
36
|
+
measurementId: ObjectId;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
interface CreateNotificationRequestMeasurementReviewed extends CreateNotificationRequestBase {
|
|
40
|
+
type: 'measurement_reviewed';
|
|
41
|
+
fields: {
|
|
42
|
+
measurementId: ObjectId;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
interface CreateNotificationRequestMeasurementPrescriptionExpiry extends CreateNotificationRequestBase {
|
|
46
|
+
type: 'prescription_expiry';
|
|
47
|
+
fields: {
|
|
48
|
+
groupId: ObjectId;
|
|
49
|
+
groupName: string;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
interface CreateNotificationRequestActivated extends CreateNotificationRequestBase {
|
|
53
|
+
type: 'activated';
|
|
54
|
+
}
|
|
55
|
+
interface CreateNotificationRequestPasswordChanged extends CreateNotificationRequestBase {
|
|
56
|
+
type: 'password_changed';
|
|
57
|
+
}
|
|
58
|
+
export declare type CreateNotificationRequest = CreateNotificationRequestMessage | CreateNotificationRequestLink | CreateNotificationRequestMeasurementComment | CreateNotificationRequestMeasurementReviewed | CreateNotificationRequestMeasurementPrescriptionExpiry | CreateNotificationRequestActivated | CreateNotificationRequestPasswordChanged;
|
|
59
|
+
export interface NotifTypeDef {
|
|
60
|
+
name?: string;
|
|
61
|
+
requiredFields?: Record<string, FieldType>;
|
|
62
|
+
optionalFields?: Record<string, {
|
|
63
|
+
fieldType?: FieldType;
|
|
64
|
+
defaultValue?: string;
|
|
65
|
+
}>;
|
|
66
|
+
title?: string;
|
|
67
|
+
body?: string;
|
|
68
|
+
combinedBody?: string;
|
|
69
|
+
pushByDefault?: boolean;
|
|
70
|
+
}
|
|
71
|
+
export declare enum FieldType {
|
|
72
|
+
STRING = "STRING",
|
|
73
|
+
NUMBER = "NUMBER",
|
|
74
|
+
BOOLEAN = "BOOLEAN",
|
|
75
|
+
OBJECT_ID = "OBJECT_ID",
|
|
76
|
+
URL = "URL"
|
|
77
|
+
}
|
|
78
|
+
export interface Setting {
|
|
79
|
+
id?: ObjectId;
|
|
80
|
+
key?: string;
|
|
81
|
+
preferences?: Record<string, boolean>;
|
|
82
|
+
creationTimestamp?: Date;
|
|
83
|
+
updateTimestamp?: Date;
|
|
84
|
+
}
|
|
85
|
+
export declare type SettingCreation = Required<Pick<Setting, 'key' | 'preferences'>>;
|
|
86
|
+
export interface NotificationsService {
|
|
87
|
+
/**
|
|
88
|
+
* Create a notification
|
|
89
|
+
*
|
|
90
|
+
* Permission | Scope | Effect
|
|
91
|
+
* - | - | -
|
|
92
|
+
* none | | Create a notification for yourself
|
|
93
|
+
* `CREATE_NOTIFICATIONS` | `global` | Create a notification for another person
|
|
94
|
+
* @param requestBody CreateNotificationRequest
|
|
95
|
+
* @returns Notification
|
|
96
|
+
*/
|
|
97
|
+
create(requestBody: CreateNotificationRequest, options?: OptionsBase): Promise<Notification>;
|
|
98
|
+
/**
|
|
99
|
+
* Retrieve a list of notifications
|
|
100
|
+
*
|
|
101
|
+
* Permission | Scope | Effect
|
|
102
|
+
* - | - | -
|
|
103
|
+
* none | | View your own notifications
|
|
104
|
+
* `VIEW_NOTIFICATIONS` | `global` | View all notifications
|
|
105
|
+
* @param rql Add filters to the requested list.
|
|
106
|
+
* @returns PagedResult<Notification>
|
|
107
|
+
*/
|
|
108
|
+
find(options?: OptionsWithRql): Promise<PagedResultWithPager<Notification>>;
|
|
109
|
+
/**
|
|
110
|
+
* Request a list of all notifications
|
|
111
|
+
*
|
|
112
|
+
* Do not pass in an rql with limit operator!
|
|
113
|
+
*
|
|
114
|
+
* Permission | Scope | Effect
|
|
115
|
+
* - | - | -
|
|
116
|
+
* none | | View your own notifications
|
|
117
|
+
* `VIEW_NOTIFICATIONS` | `global` | View all notifications
|
|
118
|
+
* @returns Notification[]
|
|
119
|
+
*/
|
|
120
|
+
findAll(options?: OptionsWithRql): Promise<Notification[]>;
|
|
121
|
+
/**
|
|
122
|
+
* Request a list of all notifications
|
|
123
|
+
*
|
|
124
|
+
* Permission | Scope | Effect
|
|
125
|
+
* - | - | -
|
|
126
|
+
* none | | View your own notifications
|
|
127
|
+
* `VIEW_NOTIFICATIONS` | `global` | View all notifications
|
|
128
|
+
* @returns Notification[]
|
|
129
|
+
*/
|
|
130
|
+
findAllIterator(options?: OptionsWithRql): FindAllIterator<Notification>;
|
|
131
|
+
/**
|
|
132
|
+
* Find By Id
|
|
133
|
+
* @param id the Id to search for
|
|
134
|
+
* @param rql an optional rql string
|
|
135
|
+
* @returns the first element found
|
|
136
|
+
*/
|
|
137
|
+
findById(id: ObjectId, options?: OptionsWithRql): Promise<Notification>;
|
|
138
|
+
/**
|
|
139
|
+
* Find First
|
|
140
|
+
* @param rql an optional rql string
|
|
141
|
+
* @returns the first element found
|
|
142
|
+
*/
|
|
143
|
+
findFirst(options?: OptionsWithRql): Promise<Notification>;
|
|
144
|
+
/**
|
|
145
|
+
* Delete notification(s)
|
|
146
|
+
*
|
|
147
|
+
* Permission | Scope | Effect
|
|
148
|
+
* - | - | -
|
|
149
|
+
* `DELETE_NOTIFICATIONS` | `global` | **Required** for this endpoint
|
|
150
|
+
* @param rql Add filters to the requested list.
|
|
151
|
+
* @returns AffectedRecords
|
|
152
|
+
*/
|
|
153
|
+
remove(options?: OptionsWithRql): Promise<AffectedRecords>;
|
|
154
|
+
/**
|
|
155
|
+
* Mark your notification(s) as viewed
|
|
156
|
+
*
|
|
157
|
+
* Permission | Scope | Effect
|
|
158
|
+
* - | - | -
|
|
159
|
+
* none | | Everyone can use this endpoint
|
|
160
|
+
* @param rql Add filters to the requested list.
|
|
161
|
+
* @returns AffectedRecords
|
|
162
|
+
*/
|
|
163
|
+
markAsViewed(options?: OptionsWithRql): Promise<AffectedRecords>;
|
|
164
|
+
/**
|
|
165
|
+
* Retrieve the list of notification types
|
|
166
|
+
*
|
|
167
|
+
* Permission | Scope | Effect
|
|
168
|
+
* - | - | -
|
|
169
|
+
* none | | Everyone can use this endpoint
|
|
170
|
+
* @returns PagedResult<NotifTypeDef>
|
|
171
|
+
*/
|
|
172
|
+
getTypes(options?: OptionsBase): Promise<PagedResult<NotifTypeDef>>;
|
|
173
|
+
}
|
|
174
|
+
export interface NotificationSettingsServices {
|
|
175
|
+
/**
|
|
176
|
+
* Retrieve a list of notifications settings
|
|
177
|
+
*
|
|
178
|
+
* Permission | Scope | Effect
|
|
179
|
+
* - | - | -
|
|
180
|
+
* none | | View your own notification settings
|
|
181
|
+
* `VIEW_NOTIFICATION_SETTINGS` | `global` | View all notification settings
|
|
182
|
+
* @param rql Add filters to the requested list.
|
|
183
|
+
* @returns PagedResult<Setting>
|
|
184
|
+
*/
|
|
185
|
+
find(options?: OptionsWithRql): Promise<PagedResult<Setting>>;
|
|
186
|
+
/**
|
|
187
|
+
* Find By Id
|
|
188
|
+
* @param id the Id to search for
|
|
189
|
+
* @param rql an optional rql string
|
|
190
|
+
* @returns the first element found
|
|
191
|
+
*/
|
|
192
|
+
findById(id: ObjectId, options?: OptionsWithRql): Promise<Setting>;
|
|
193
|
+
/**
|
|
194
|
+
* Find First
|
|
195
|
+
* @param rql an optional rql string
|
|
196
|
+
* @returns the first element found
|
|
197
|
+
*/
|
|
198
|
+
findFirst(options?: OptionsWithRql): Promise<Setting>;
|
|
199
|
+
/**
|
|
200
|
+
* Update the notification settings for a user
|
|
201
|
+
*
|
|
202
|
+
* Permission | Scope | Effect
|
|
203
|
+
* - | - | -
|
|
204
|
+
* none | | Update your own notification settings
|
|
205
|
+
* `UPDATE_NOTIFICATION_SETTINGS` | `global` | Update all notification settings
|
|
206
|
+
* @param userId The User Id
|
|
207
|
+
* @param requestBody SettingCreation object
|
|
208
|
+
* @returns Setting
|
|
209
|
+
*/
|
|
210
|
+
update(userId: string, requestBody: SettingCreation, options?: OptionsBase): Promise<Setting>;
|
|
211
|
+
/**
|
|
212
|
+
* Delete the notifications settings for a user
|
|
213
|
+
*
|
|
214
|
+
* Permission | Scope | Effect
|
|
215
|
+
* - | - | -
|
|
216
|
+
* `UPDATE_NOTIFICATION_SETTINGS` | `global` | **Required** for this endpoint
|
|
217
|
+
* @param userId
|
|
218
|
+
* @returns AffectedRecords
|
|
219
|
+
*/
|
|
220
|
+
remove(userId: string, options?: OptionsBase): Promise<AffectedRecords>;
|
|
221
|
+
}
|
|
222
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../types';
|
|
2
|
-
import { HttpClient } from '../http-client';
|
|
3
|
-
import type { PaymentsAppStoreService } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsAppStoreService;
|
|
5
|
-
export default _default;
|
|
1
|
+
import type { HttpInstance } from '../../types';
|
|
2
|
+
import { HttpClient } from '../http-client';
|
|
3
|
+
import type { PaymentsAppStoreService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsAppStoreService;
|
|
5
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../types';
|
|
2
|
-
import { HttpClient } from '../http-client';
|
|
3
|
-
import type { PaymentsAppStoreSubscriptionsService } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsAppStoreSubscriptionsService;
|
|
5
|
-
export default _default;
|
|
1
|
+
import type { HttpInstance } from '../../types';
|
|
2
|
+
import { HttpClient } from '../http-client';
|
|
3
|
+
import type { PaymentsAppStoreSubscriptionsService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsAppStoreSubscriptionsService;
|
|
5
|
+
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../types';
|
|
2
|
-
declare const _default: (client: any, httpAuth: HttpInstance) => {
|
|
3
|
-
/**
|
|
4
|
-
* Check if the service is available
|
|
5
|
-
* @returns true if service is up and running
|
|
6
|
-
*/
|
|
7
|
-
health(): Promise<boolean>;
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
1
|
+
import type { HttpInstance } from '../../types';
|
|
2
|
+
declare const _default: (client: any, httpAuth: HttpInstance) => {
|
|
3
|
+
/**
|
|
4
|
+
* Check if the service is available
|
|
5
|
+
* @returns true if service is up and running
|
|
6
|
+
*/
|
|
7
|
+
health(): Promise<boolean>;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../types';
|
|
2
|
-
import health from './health';
|
|
3
|
-
import { PaymentsAppStoreService, PaymentsAppStoreSubscriptionsService, PaymentsOrdersService, PaymentsProductsService, PaymentsStripeService, PaymentsSubscriptionsService, PaymentsPlayStoreService, PaymentsPlayStoreSubscriptionsService, PaymentsPlayStoreHistoryService } from './types';
|
|
4
|
-
export declare type PaymentsService = ReturnType<typeof health> & {
|
|
5
|
-
products: PaymentsProductsService;
|
|
6
|
-
orders: PaymentsOrdersService;
|
|
7
|
-
subscriptions: PaymentsSubscriptionsService;
|
|
8
|
-
appStore: PaymentsAppStoreService;
|
|
9
|
-
appStoreSubscriptions: PaymentsAppStoreSubscriptionsService;
|
|
10
|
-
playStore: PaymentsPlayStoreService;
|
|
11
|
-
playStoreHistory: PaymentsPlayStoreHistoryService;
|
|
12
|
-
playStoreSubscriptions: PaymentsPlayStoreSubscriptionsService;
|
|
13
|
-
stripe: PaymentsStripeService;
|
|
14
|
-
};
|
|
15
|
-
export declare const paymentsService: (httpWithAuth: HttpInstance) => PaymentsService;
|
|
1
|
+
import type { HttpInstance } from '../../types';
|
|
2
|
+
import health from './health';
|
|
3
|
+
import { PaymentsAppStoreService, PaymentsAppStoreSubscriptionsService, PaymentsOrdersService, PaymentsProductsService, PaymentsStripeService, PaymentsSubscriptionsService, PaymentsPlayStoreService, PaymentsPlayStoreSubscriptionsService, PaymentsPlayStoreHistoryService } from './types';
|
|
4
|
+
export declare type PaymentsService = ReturnType<typeof health> & {
|
|
5
|
+
products: PaymentsProductsService;
|
|
6
|
+
orders: PaymentsOrdersService;
|
|
7
|
+
subscriptions: PaymentsSubscriptionsService;
|
|
8
|
+
appStore: PaymentsAppStoreService;
|
|
9
|
+
appStoreSubscriptions: PaymentsAppStoreSubscriptionsService;
|
|
10
|
+
playStore: PaymentsPlayStoreService;
|
|
11
|
+
playStoreHistory: PaymentsPlayStoreHistoryService;
|
|
12
|
+
playStoreSubscriptions: PaymentsPlayStoreSubscriptionsService;
|
|
13
|
+
stripe: PaymentsStripeService;
|
|
14
|
+
};
|
|
15
|
+
export declare const paymentsService: (httpWithAuth: HttpInstance) => PaymentsService;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../types';
|
|
2
|
-
import { HttpClient } from '../http-client';
|
|
3
|
-
import type { PaymentsOrdersService } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsOrdersService;
|
|
5
|
-
export default _default;
|
|
1
|
+
import type { HttpInstance } from '../../types';
|
|
2
|
+
import { HttpClient } from '../http-client';
|
|
3
|
+
import type { PaymentsOrdersService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsOrdersService;
|
|
5
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../types';
|
|
2
|
-
import { HttpClient } from '../http-client';
|
|
3
|
-
import type { PaymentsPlayStoreService } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsPlayStoreService;
|
|
5
|
-
export default _default;
|
|
1
|
+
import type { HttpInstance } from '../../types';
|
|
2
|
+
import { HttpClient } from '../http-client';
|
|
3
|
+
import type { PaymentsPlayStoreService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsPlayStoreService;
|
|
5
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../types';
|
|
2
|
-
import { HttpClient } from '../http-client';
|
|
3
|
-
import type { PaymentsPlayStoreHistoryService } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsPlayStoreHistoryService;
|
|
5
|
-
export default _default;
|
|
1
|
+
import type { HttpInstance } from '../../types';
|
|
2
|
+
import { HttpClient } from '../http-client';
|
|
3
|
+
import type { PaymentsPlayStoreHistoryService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsPlayStoreHistoryService;
|
|
5
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../types';
|
|
2
|
-
import { HttpClient } from '../http-client';
|
|
3
|
-
import type { PaymentsPlayStoreSubscriptionsService } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsPlayStoreSubscriptionsService;
|
|
5
|
-
export default _default;
|
|
1
|
+
import type { HttpInstance } from '../../types';
|
|
2
|
+
import { HttpClient } from '../http-client';
|
|
3
|
+
import type { PaymentsPlayStoreSubscriptionsService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsPlayStoreSubscriptionsService;
|
|
5
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../types';
|
|
2
|
-
import { HttpClient } from '../http-client';
|
|
3
|
-
import type { PaymentsProductsService } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsProductsService;
|
|
5
|
-
export default _default;
|
|
1
|
+
import type { HttpInstance } from '../../types';
|
|
2
|
+
import { HttpClient } from '../http-client';
|
|
3
|
+
import type { PaymentsProductsService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsProductsService;
|
|
5
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../types';
|
|
2
|
-
import { HttpClient } from '../http-client';
|
|
3
|
-
import type { PaymentsStripeService } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsStripeService;
|
|
5
|
-
export default _default;
|
|
1
|
+
import type { HttpInstance } from '../../types';
|
|
2
|
+
import { HttpClient } from '../http-client';
|
|
3
|
+
import type { PaymentsStripeService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsStripeService;
|
|
5
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../types';
|
|
2
|
-
import { HttpClient } from '../http-client';
|
|
3
|
-
import type { PaymentsSubscriptionsService } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsSubscriptionsService;
|
|
5
|
-
export default _default;
|
|
1
|
+
import type { HttpInstance } from '../../types';
|
|
2
|
+
import { HttpClient } from '../http-client';
|
|
3
|
+
import type { PaymentsSubscriptionsService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpAuth: HttpInstance) => PaymentsSubscriptionsService;
|
|
5
|
+
export default _default;
|