@extrahorizon/javascript-sdk 8.10.0-dev-159-0e9a0f1 → 8.10.0-dev-161-c1dd6ca
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 +22 -0
- package/build/btoa.d.ts +6 -0
- package/build/client.d.ts +147 -0
- package/build/constants.d.ts +17 -0
- package/build/errorHandler.d.ts +1 -0
- package/build/errors.d.ts +361 -0
- package/build/http/client.d.ts +2 -0
- package/build/http/index.d.ts +4 -0
- package/build/http/interceptors.d.ts +9 -0
- package/build/http/oAuth1Signature.d.ts +18 -0
- package/build/http/oauth1.d.ts +3 -0
- package/build/http/oauth2.d.ts +3 -0
- package/build/http/proxy.d.ts +3 -0
- package/build/http/types.d.ts +331 -0
- package/build/http/utils.d.ts +21 -0
- package/build/index.cjs.js +1 -1
- package/build/index.d.ts +9 -0
- package/build/index.mjs +1 -1
- package/build/mock.d.ts +43 -0
- package/build/mockType.d.ts +1721 -0
- package/build/parseStoredCredentials.d.ts +11 -0
- package/build/rql/index.d.ts +16 -0
- package/build/rql/parser.d.ts +1 -0
- package/build/rql/types.d.ts +174 -0
- package/build/services/auth/applications/index.d.ts +5 -0
- package/build/services/auth/applications/types.d.ts +260 -0
- package/build/services/auth/index.d.ts +3 -0
- package/build/services/auth/oauth1/index.d.ts +5 -0
- package/build/services/auth/oauth1/types.d.ts +102 -0
- package/build/services/auth/oauth2/index.d.ts +5 -0
- package/build/services/auth/oauth2/types.d.ts +100 -0
- package/build/services/auth/oidc/index.d.ts +5 -0
- package/build/services/auth/oidc/loginAttempts/index.d.ts +5 -0
- package/build/services/auth/oidc/loginAttempts/types.d.ts +67 -0
- package/build/services/auth/oidc/providers/index.d.ts +5 -0
- package/build/services/auth/oidc/providers/types.d.ts +148 -0
- package/build/services/auth/oidc/types.d.ts +40 -0
- package/build/services/auth/types.d.ts +39 -0
- package/build/services/auth/users/index.d.ts +5 -0
- package/build/services/auth/users/types.d.ts +121 -0
- package/build/services/configurations/general.d.ts +5 -0
- package/build/services/configurations/groups.d.ts +5 -0
- package/build/services/configurations/index.d.ts +10 -0
- package/build/services/configurations/patients.d.ts +5 -0
- package/build/services/configurations/staff.d.ts +5 -0
- package/build/services/configurations/types.d.ts +222 -0
- package/build/services/configurations/users.d.ts +5 -0
- package/build/services/data/comments.d.ts +5 -0
- package/build/services/data/documents.d.ts +5 -0
- package/build/services/data/index.d.ts +13 -0
- package/build/services/data/indexes.d.ts +5 -0
- package/build/services/data/infrastructure.d.ts +10 -0
- package/build/services/data/json-schema.d.ts +121 -0
- package/build/services/data/properties.d.ts +5 -0
- package/build/services/data/schemas.d.ts +5 -0
- package/build/services/data/statuses.d.ts +5 -0
- package/build/services/data/transitions.d.ts +5 -0
- package/build/services/data/types.d.ts +1500 -0
- package/build/services/dispatchers/actions/index.d.ts +5 -0
- package/build/services/dispatchers/actions/types.d.ts +78 -0
- package/build/services/dispatchers/dispatchers/index.d.ts +5 -0
- package/build/services/dispatchers/dispatchers/types.d.ts +111 -0
- package/build/services/dispatchers/index.d.ts +7 -0
- package/build/services/dispatchers/types.d.ts +2 -0
- package/build/services/events/events.d.ts +5 -0
- package/build/services/events/index.d.ts +5 -0
- package/build/services/events/subscriptions.d.ts +5 -0
- package/build/services/events/types.d.ts +107 -0
- package/build/services/files/files.d.ts +5 -0
- package/build/services/files/formHelpers.d.ts +3 -0
- package/build/services/files/index.d.ts +6 -0
- package/build/services/files/settings/index.d.ts +5 -0
- package/build/services/files/settings/types.d.ts +38 -0
- package/build/services/files/tokens.d.ts +5 -0
- package/build/services/files/types.d.ts +185 -0
- package/build/services/helpers.d.ts +7 -0
- package/build/services/http-client.d.ts +22 -0
- package/build/services/index.d.ts +16 -0
- package/build/services/localizations/countries.d.ts +5 -0
- package/build/services/localizations/index.d.ts +3 -0
- package/build/services/localizations/languages.d.ts +5 -0
- package/build/services/localizations/localizations.d.ts +5 -0
- package/build/services/localizations/types.d.ts +150 -0
- package/build/services/logs/access/index.d.ts +5 -0
- package/build/services/logs/access/types.d.ts +41 -0
- package/build/services/logs/index.d.ts +3 -0
- package/build/services/logs/types.d.ts +4 -0
- package/build/services/mails/index.d.ts +3 -0
- package/build/services/mails/mails.d.ts +5 -0
- package/build/services/mails/types.d.ts +149 -0
- package/build/services/notifications/index.d.ts +6 -0
- package/build/services/notifications/notifications.d.ts +5 -0
- package/build/services/notifications/settings.d.ts +5 -0
- package/build/services/notifications/types.d.ts +235 -0
- package/build/services/notificationsV2/index.d.ts +6 -0
- package/build/services/notificationsV2/notificationsV2.d.ts +5 -0
- package/build/services/notificationsV2/types.d.ts +166 -0
- package/build/services/notificationsV2/userSettings/index.d.ts +5 -0
- package/build/services/notificationsV2/userSettings/types.d.ts +138 -0
- package/build/services/payments/appStore.d.ts +5 -0
- package/build/services/payments/appStoreSubscriptions.d.ts +5 -0
- package/build/services/payments/health.d.ts +9 -0
- package/build/services/payments/index.d.ts +15 -0
- package/build/services/payments/orders.d.ts +5 -0
- package/build/services/payments/playStore.d.ts +5 -0
- package/build/services/payments/playStoreHistory.d.ts +5 -0
- package/build/services/payments/playStoreSubscriptions.d.ts +5 -0
- package/build/services/payments/products.d.ts +5 -0
- package/build/services/payments/stripe.d.ts +5 -0
- package/build/services/payments/subscriptions.d.ts +5 -0
- package/build/services/payments/types.d.ts +1198 -0
- package/build/services/profiles/groups.d.ts +5 -0
- package/build/services/profiles/index.d.ts +8 -0
- package/build/services/profiles/logs.d.ts +5 -0
- package/build/services/profiles/profiles.d.ts +5 -0
- package/build/services/profiles/types.d.ts +375 -0
- package/build/services/tasks/api/index.d.ts +5 -0
- package/build/services/tasks/api/types.d.ts +146 -0
- package/build/services/tasks/apiRequests/index.d.ts +5 -0
- package/build/services/tasks/apiRequests/logs/index.d.ts +5 -0
- package/build/services/tasks/apiRequests/logs/types.d.ts +25 -0
- package/build/services/tasks/apiRequests/types.d.ts +83 -0
- package/build/services/tasks/functions/index.d.ts +5 -0
- package/build/services/tasks/functions/types.d.ts +171 -0
- package/build/services/tasks/index.d.ts +15 -0
- package/build/services/tasks/logs/index.d.ts +5 -0
- package/build/services/tasks/logs/types.d.ts +28 -0
- package/build/services/tasks/schedules/index.d.ts +5 -0
- package/build/services/tasks/schedules/types.d.ts +92 -0
- package/build/services/tasks/tasks.d.ts +5 -0
- package/build/services/tasks/types.d.ts +118 -0
- package/build/services/templates/index.d.ts +3 -0
- package/build/services/templates/templates.d.ts +5 -0
- package/build/services/templates/types.d.ts +237 -0
- package/build/services/templatesV2/index.d.ts +3 -0
- package/build/services/templatesV2/templatesV2.d.ts +5 -0
- package/build/services/templatesV2/types.d.ts +156 -0
- package/build/services/types.d.ts +103 -0
- package/build/services/users/activationRequests/index.d.ts +4 -0
- package/build/services/users/activationRequests/types.d.ts +70 -0
- package/build/services/users/forgotPasswordRequests/index.d.ts +4 -0
- package/build/services/users/forgotPasswordRequests/types.d.ts +70 -0
- package/build/services/users/globalRoles.d.ts +5 -0
- package/build/services/users/groupRoles.d.ts +5 -0
- package/build/services/users/index.d.ts +14 -0
- package/build/services/users/settings/index.d.ts +4 -0
- package/build/services/users/settings/types.d.ts +47 -0
- package/build/services/users/types.d.ts +1278 -0
- package/build/services/users/users.d.ts +5 -0
- package/build/sha1.d.ts +11 -0
- package/build/types/services/users/types.d.ts +69 -25
- package/build/types/version.d.ts +1 -1
- package/build/types.d.ts +104 -0
- package/build/utils.d.ts +5 -0
- package/build/version.d.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { ObjectId, OptionsBase, OptionsWithRql, PagedResultWithPager } from '../types';
|
|
2
|
+
export * from './userSettings/types';
|
|
3
|
+
export interface NotificationV2Creation<T extends Record<string, string> = Record<string, string>> {
|
|
4
|
+
targetUserId: ObjectId;
|
|
5
|
+
title: string;
|
|
6
|
+
body: string;
|
|
7
|
+
data?: T;
|
|
8
|
+
/**
|
|
9
|
+
* See https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#AndroidConfig
|
|
10
|
+
*/
|
|
11
|
+
android?: any;
|
|
12
|
+
/**
|
|
13
|
+
* See https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#ApnsConfig
|
|
14
|
+
*/
|
|
15
|
+
apns?: any;
|
|
16
|
+
/**
|
|
17
|
+
* See https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#WebpushConfig
|
|
18
|
+
*/
|
|
19
|
+
webpush?: any;
|
|
20
|
+
}
|
|
21
|
+
export interface NotificationV2<T extends Record<string, string> = Record<string, string>> extends NotificationV2Creation<T> {
|
|
22
|
+
id: ObjectId;
|
|
23
|
+
creatorId: ObjectId;
|
|
24
|
+
/**
|
|
25
|
+
* Indicates whether we tried to send the notification.
|
|
26
|
+
* Would be `false` if no devices with FCM tokens were found for the user.
|
|
27
|
+
* See `errors` for any errors that occurred.
|
|
28
|
+
*/
|
|
29
|
+
sent: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* The errors that occurred while sending the notification, if any.
|
|
32
|
+
*/
|
|
33
|
+
errors?: NotificationV2Error[];
|
|
34
|
+
creationTimestamp: Date;
|
|
35
|
+
updateTimestamp: Date;
|
|
36
|
+
}
|
|
37
|
+
export interface NotificationV2Error {
|
|
38
|
+
/**
|
|
39
|
+
* The name of the device for which the error occurred.
|
|
40
|
+
* If not set, the error occurred for the FCM token defined on the root of the user settings.
|
|
41
|
+
*/
|
|
42
|
+
deviceName?: string;
|
|
43
|
+
exhError: {
|
|
44
|
+
code: string;
|
|
45
|
+
name: string;
|
|
46
|
+
message: string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* The error received from FCM, unchanged, if available.
|
|
50
|
+
* @example
|
|
51
|
+
* {
|
|
52
|
+
* "error": {
|
|
53
|
+
* "code": 403,
|
|
54
|
+
* "message": "SenderId mismatch",
|
|
55
|
+
* "status": "PERMISSION_DENIED",
|
|
56
|
+
* "details": [
|
|
57
|
+
* {
|
|
58
|
+
* "@type": "type.googleapis.com/google.firebase.fcm.v1.FcmError",
|
|
59
|
+
* "errorCode": "SENDER_ID_MISMATCH",
|
|
60
|
+
* }
|
|
61
|
+
* ]
|
|
62
|
+
* }
|
|
63
|
+
* }
|
|
64
|
+
* */
|
|
65
|
+
fcmError?: any;
|
|
66
|
+
}
|
|
67
|
+
export interface NotificationV2Service {
|
|
68
|
+
/**
|
|
69
|
+
* # Create a notification
|
|
70
|
+
*
|
|
71
|
+
* A user's FCM token and their device's with an FCM token will be targeted for the notification
|
|
72
|
+
*
|
|
73
|
+
* If an unusable FCM token is detected, the request will succeed, however, the FCM token will be removed from the user's settings.
|
|
74
|
+
* Any unusable FCM token errors will be included in the `errors` field of the response.
|
|
75
|
+
*
|
|
76
|
+
* Multiple errors can occur at once when multiple devices are targeted and errors are thrown in this order:
|
|
77
|
+
* - `FirebaseConnectionError`
|
|
78
|
+
* - `FirebaseInvalidPlatformDataError`
|
|
79
|
+
* Both error types will include a `notificationId` and an `errors` field with details about any errors that occurred.
|
|
80
|
+
*
|
|
81
|
+
* ## Access via permissions
|
|
82
|
+
* Permission | Scopes | Effect
|
|
83
|
+
* - | - | -
|
|
84
|
+
* `CREATE_NOTIFICATIONS` | `global` | Create notifications for any user
|
|
85
|
+
* `CREATE_NOTIFICATIONS` | `group` | Create notifications for any patient in a group
|
|
86
|
+
* none | | Create notifications for yourself
|
|
87
|
+
*
|
|
88
|
+
* # Interface
|
|
89
|
+
* @param requestBody
|
|
90
|
+
* @param options
|
|
91
|
+
* @returns NotificationV2<T>
|
|
92
|
+
*
|
|
93
|
+
* @throws {FirebaseInvalidPlatformDataError} if FCM reports invalid values for `android`, `apns`, or `webpush`.
|
|
94
|
+
* @throws {FirebaseConnectionError} if FCM is unreachable or returns an unknown error.
|
|
95
|
+
*/
|
|
96
|
+
create<T extends Record<string, string>>(requestBody: NotificationV2Creation<T>, options?: OptionsBase): Promise<NotificationV2<T>>;
|
|
97
|
+
/**
|
|
98
|
+
* # Request a list of notifications
|
|
99
|
+
*
|
|
100
|
+
* ## Access via permissions
|
|
101
|
+
* Permission | Scopes | Effect
|
|
102
|
+
* - | - | -
|
|
103
|
+
* `VIEW_NOTIFICATIONS` | `global` | View all notifications
|
|
104
|
+
*
|
|
105
|
+
* # Interface
|
|
106
|
+
* @returns PagedResultWithPager<NotificationV2<T>>
|
|
107
|
+
*/
|
|
108
|
+
find<T extends Record<string, string>>(options?: OptionsWithRql): Promise<PagedResultWithPager<NotificationV2<T>>>;
|
|
109
|
+
/**
|
|
110
|
+
* # Request a list of notifications
|
|
111
|
+
*
|
|
112
|
+
* Do not pass in an rql with limit operator!
|
|
113
|
+
*
|
|
114
|
+
* ## Access via permissions
|
|
115
|
+
* Permission | Scopes | Effect
|
|
116
|
+
* - | - | -
|
|
117
|
+
* `VIEW_NOTIFICATIONS` | `global` | View all notifications
|
|
118
|
+
*
|
|
119
|
+
* # Interface
|
|
120
|
+
* @returns NotificationV2<T>[]
|
|
121
|
+
*/
|
|
122
|
+
findAll<T extends Record<string, string>>(options?: OptionsWithRql): Promise<NotificationV2<T>[]>;
|
|
123
|
+
/**
|
|
124
|
+
* # Request a list of notifications created for a user
|
|
125
|
+
*
|
|
126
|
+
* ## Access via permissions
|
|
127
|
+
* Permission | Scopes | Effect
|
|
128
|
+
* - | - | -
|
|
129
|
+
* `VIEW_NOTIFICATIONS` | `global` | View all notifications
|
|
130
|
+
*
|
|
131
|
+
* # Interface
|
|
132
|
+
* @param targetUserId the user id to search for
|
|
133
|
+
* @returns PagedResultWithPager<NotificationV2<T>>
|
|
134
|
+
*/
|
|
135
|
+
findByTargetUserId<T extends Record<string, string>>(targetUserId: ObjectId, options?: OptionsWithRql): Promise<PagedResultWithPager<NotificationV2<T>>>;
|
|
136
|
+
/**
|
|
137
|
+
* # Request the first notification found
|
|
138
|
+
*
|
|
139
|
+
* ## Access via permissions
|
|
140
|
+
* Permission | Scopes | Effect
|
|
141
|
+
* - | - | -
|
|
142
|
+
* `VIEW_NOTIFICATIONS` | `global` | View all notifications
|
|
143
|
+
*
|
|
144
|
+
* # Interface
|
|
145
|
+
* @returns NotificationV2<T> | undefined
|
|
146
|
+
*/
|
|
147
|
+
findFirst<T extends Record<string, string>>(options?: OptionsWithRql): Promise<NotificationV2<T> | undefined>;
|
|
148
|
+
/**
|
|
149
|
+
* # Request a notification by id
|
|
150
|
+
*
|
|
151
|
+
* ## Access via permissions
|
|
152
|
+
* Permission | Scopes | Effect
|
|
153
|
+
* - | - | -
|
|
154
|
+
* `VIEW_NOTIFICATIONS` | `global` | View all notifications
|
|
155
|
+
*
|
|
156
|
+
* # Interface
|
|
157
|
+
* @param notificationId the Id to search for
|
|
158
|
+
* @returns NotificationV2<T> | undefined
|
|
159
|
+
*/
|
|
160
|
+
findById<T extends Record<string, string>>(notificationId: ObjectId, options?: OptionsBase): Promise<NotificationV2<T> | undefined>;
|
|
161
|
+
/**
|
|
162
|
+
* Perform a health check
|
|
163
|
+
* @returns {boolean} success
|
|
164
|
+
*/
|
|
165
|
+
health(): Promise<boolean>;
|
|
166
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AuthHttpClient } from '../../../types';
|
|
2
|
+
import { HttpClient } from '../../http-client';
|
|
3
|
+
import { NotificationV2UserSettingsService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpWithAuth: AuthHttpClient) => NotificationV2UserSettingsService;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { AffectedRecords, ObjectId, OptionsBase, OptionsWithRql, PagedResultWithPager } from '../../types';
|
|
2
|
+
export interface NotificationV2UserSettingsUpsert {
|
|
3
|
+
/** @deprecated We recommend using `devices` instead */
|
|
4
|
+
fcmToken: string | null;
|
|
5
|
+
}
|
|
6
|
+
export interface NotificationV2UserSettings extends NotificationV2UserSettingsUpsert {
|
|
7
|
+
id: ObjectId;
|
|
8
|
+
devices?: NotificationV2UserDevice[];
|
|
9
|
+
creationTimestamp: Date;
|
|
10
|
+
updateTimestamp: Date;
|
|
11
|
+
}
|
|
12
|
+
export interface NotificationV2UserDeviceUpsert {
|
|
13
|
+
description?: string | null;
|
|
14
|
+
fcmToken?: string | null;
|
|
15
|
+
}
|
|
16
|
+
export interface NotificationV2UserDevice {
|
|
17
|
+
name: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
fcmToken?: string;
|
|
20
|
+
creationTimestamp: Date;
|
|
21
|
+
updateTimestamp: Date;
|
|
22
|
+
}
|
|
23
|
+
export interface NotificationV2UserSettingsService {
|
|
24
|
+
/**
|
|
25
|
+
* # Get the notification settings for a specific user
|
|
26
|
+
*
|
|
27
|
+
* This will always return a notification settings object, even if the user does not have any notification settings set up.
|
|
28
|
+
*
|
|
29
|
+
* ## Access via permissions
|
|
30
|
+
* Permission | Scopes | Effect
|
|
31
|
+
* - | - | -
|
|
32
|
+
* `VIEW_NOTIFICATION_SETTINGS` | `global` | View all notifications
|
|
33
|
+
* none | | View your own notification settings
|
|
34
|
+
*/
|
|
35
|
+
getById(userId: ObjectId, options?: OptionsBase): Promise<NotificationV2UserSettings>;
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated We recommend using `devices` instead, managed by the `addOrUpdateDevice()` and `removeDevice()` methods.
|
|
38
|
+
* # Update a user its notification settings
|
|
39
|
+
*
|
|
40
|
+
* Updates (or creates if non exists) a user its settings for the specified user id.
|
|
41
|
+
*
|
|
42
|
+
* ## Access via permissions
|
|
43
|
+
* Permission | Scopes | Effect
|
|
44
|
+
* - | - | -
|
|
45
|
+
* `UPDATE_NOTIFICATION_SETTINGS` | `global` | Update the notification settings of any user
|
|
46
|
+
* none | | Update your own notification settings
|
|
47
|
+
*
|
|
48
|
+
* ## Interface
|
|
49
|
+
* @param requestBody
|
|
50
|
+
* @param options
|
|
51
|
+
* @returns AffectedRecords
|
|
52
|
+
*/
|
|
53
|
+
update(userId: ObjectId, requestBody: NotificationV2UserSettingsUpsert, options?: OptionsBase): Promise<AffectedRecords>;
|
|
54
|
+
/**
|
|
55
|
+
* # Delete the notification settings for a specific user
|
|
56
|
+
*
|
|
57
|
+
* ## Access via permissions
|
|
58
|
+
* Permission | Scopes | Effect
|
|
59
|
+
* - | - | -
|
|
60
|
+
* `DELETE_NOTIFICATION_SETTINGS` | `global` | Delete the notification settings of any user
|
|
61
|
+
* none | | Delete your own notification settings
|
|
62
|
+
*
|
|
63
|
+
* ## Interface
|
|
64
|
+
* @throws {ResourceUnknownError} when notification settings for the specified user do not exist
|
|
65
|
+
*/
|
|
66
|
+
remove(userId: ObjectId, options?: OptionsBase): Promise<AffectedRecords>;
|
|
67
|
+
/**
|
|
68
|
+
* # Add or update a device for the notification settings of a user
|
|
69
|
+
*
|
|
70
|
+
* Create or update the device with the specified name for the user with the given Id.
|
|
71
|
+
*
|
|
72
|
+
* If the user already has a device with the specified name, it will be updated.
|
|
73
|
+
*
|
|
74
|
+
* If the user does not have a device with the specified name, it will be created.
|
|
75
|
+
*
|
|
76
|
+
* If the user does not have user settings, it will be created.
|
|
77
|
+
*
|
|
78
|
+
* Setting `null` for `fcmToken` or `description` will remove the configured value.
|
|
79
|
+
*
|
|
80
|
+
* ## Access via permissions
|
|
81
|
+
* Permission | Scopes | Effect
|
|
82
|
+
* - | - | -
|
|
83
|
+
* `UPDATE_NOTIFICATION_SETTINGS_DEVICE` | `global` | Update devices for notification settings of any user
|
|
84
|
+
* none | | Update devices for your own notification settings
|
|
85
|
+
*/
|
|
86
|
+
addOrUpdateDevice(userId: ObjectId, deviceName: string, requestBody: NotificationV2UserDeviceUpsert, options?: OptionsBase): Promise<AffectedRecords>;
|
|
87
|
+
/**
|
|
88
|
+
* # Remove a device from the notification settings of a user
|
|
89
|
+
*
|
|
90
|
+
* ## Access via permissions
|
|
91
|
+
* Permission | Scopes | Effect
|
|
92
|
+
* - | - | -
|
|
93
|
+
* `DELETE_NOTIFICATION_SETTINGS_DEVICE` | `global` | Delete devices from notification settings of any user
|
|
94
|
+
* none | | Delete devices from your own notification settings
|
|
95
|
+
*
|
|
96
|
+
* ## Interface
|
|
97
|
+
* @throws {ResourceUnknownError} when specified user or device does not exist
|
|
98
|
+
*/
|
|
99
|
+
removeDevice(userId: ObjectId, deviceName: string, options?: OptionsBase): Promise<AffectedRecords>;
|
|
100
|
+
/**
|
|
101
|
+
* # Request a list of user notification settings
|
|
102
|
+
*
|
|
103
|
+
* ## Access via permissions
|
|
104
|
+
* Permission | Scopes | Effect
|
|
105
|
+
* - | - | -
|
|
106
|
+
* `VIEW_NOTIFICATION_SETTINGS` | `global` | View all notifications
|
|
107
|
+
*
|
|
108
|
+
* ## Interface
|
|
109
|
+
* @returns PagedResultWithPager<NotificationV2User>
|
|
110
|
+
*/
|
|
111
|
+
find(options?: OptionsWithRql): Promise<PagedResultWithPager<NotificationV2UserSettings>>;
|
|
112
|
+
/**
|
|
113
|
+
* # Request a list of user notification settings
|
|
114
|
+
*
|
|
115
|
+
* Do not pass in an rql with limit operator!
|
|
116
|
+
*
|
|
117
|
+
* ## Access via permissions
|
|
118
|
+
* Permission | Scopes | Effect
|
|
119
|
+
* - | - | -
|
|
120
|
+
* `VIEW_NOTIFICATION_SETTINGS` | `global` | View all notifications
|
|
121
|
+
*
|
|
122
|
+
* ## Interface
|
|
123
|
+
* @returns NotificationV2User[]
|
|
124
|
+
*/
|
|
125
|
+
findAll(options?: OptionsWithRql): Promise<NotificationV2UserSettings[]>;
|
|
126
|
+
/**
|
|
127
|
+
* # Request the first user notification settings
|
|
128
|
+
*
|
|
129
|
+
* ## Access via permissions
|
|
130
|
+
* Permission | Scopes | Effect
|
|
131
|
+
* - | - | -
|
|
132
|
+
* `VIEW_NOTIFICATION_SETTINGS` | `global` | View all notifications
|
|
133
|
+
*
|
|
134
|
+
* ## Interface
|
|
135
|
+
* @returns NotificationV2User | undefined
|
|
136
|
+
*/
|
|
137
|
+
findFirst(options?: OptionsWithRql): Promise<NotificationV2UserSettings | undefined>;
|
|
138
|
+
}
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +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;
|
|
@@ -0,0 +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;
|