@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,190 +1,260 @@
|
|
|
1
|
-
import { AffectedRecords, OptionsBase, OptionsWithRql, PagedResult } from '../../../types';
|
|
2
|
-
export interface AuthApplicationsService {
|
|
3
|
-
/**
|
|
4
|
-
* ## Create a new application
|
|
5
|
-
* You can use this function to create a new `oAuth1` or `oAuth2` application.
|
|
6
|
-
*
|
|
7
|
-
* You need permissions to use this function.
|
|
8
|
-
*
|
|
9
|
-
* #### Global Permissions
|
|
10
|
-
* `CREATE_APPLICATIONS` - Provides the ability to create new applications.
|
|
11
|
-
*
|
|
12
|
-
* @param data {@link OAuth1ApplicationCreation} or {@link OAuth2ApplicationCreation}
|
|
13
|
-
* @returns The newly created {@link OAuth1Application} or {@link OAuth2Application}.
|
|
14
|
-
* @throws {@link NoPermissionError} when the user doesn't have the required permissions to execute the function.
|
|
15
|
-
* @throws {@link FieldFormatError} when one of the provided parameters is not correctly formatted according to the documentation.
|
|
16
|
-
*/
|
|
17
|
-
create<T extends OAuth1ApplicationCreation | OAuth2ApplicationCreation>(data: T, options?: OptionsBase): Promise<T extends OAuth1ApplicationCreation ? OAuth1Application : OAuth2Application>;
|
|
18
|
-
/**
|
|
19
|
-
* ## Get a list of applications
|
|
20
|
-
* Provides a paginated list of applications currently registered in the cluster.
|
|
21
|
-
*
|
|
22
|
-
* Every logged-in user is able to retrieve a limited set of fields (only `name`, `description`, `logo` and `type
|
|
23
|
-
*
|
|
24
|
-
* #### Global Permissions
|
|
25
|
-
* `VIEW_APPLICATIONS` - Returns all applications fields
|
|
26
|
-
*
|
|
27
|
-
* #### Function details
|
|
28
|
-
* @param options {@link OptionsWithRql}
|
|
29
|
-
*
|
|
30
|
-
* @returns Provides a paginated list of applications currently registered in the cluster.
|
|
31
|
-
*
|
|
32
|
-
* @throws {@link NoPermissionError} when the user doesn't have the required permissions to execute the function.
|
|
33
|
-
* */
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* ##
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* #### Global Permissions
|
|
42
|
-
* `
|
|
43
|
-
*
|
|
44
|
-
* #### Function details
|
|
45
|
-
* @param
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
* @
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
* @
|
|
117
|
-
*
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
*
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
1
|
+
import { AffectedRecords, ObjectId, OptionsBase, OptionsWithRql, PagedResult } from '../../../types';
|
|
2
|
+
export interface AuthApplicationsService {
|
|
3
|
+
/**
|
|
4
|
+
* ## Create a new application
|
|
5
|
+
* You can use this function to create a new `oAuth1` or `oAuth2` application.
|
|
6
|
+
*
|
|
7
|
+
* You need permissions to use this function.
|
|
8
|
+
*
|
|
9
|
+
* #### Global Permissions
|
|
10
|
+
* `CREATE_APPLICATIONS` - Provides the ability to create new applications.
|
|
11
|
+
*
|
|
12
|
+
* @param data {@link OAuth1ApplicationCreation} or {@link OAuth2ApplicationCreation}
|
|
13
|
+
* @returns The newly created {@link OAuth1Application} or {@link OAuth2Application}.
|
|
14
|
+
* @throws {@link NoPermissionError} when the user doesn't have the required permissions to execute the function.
|
|
15
|
+
* @throws {@link FieldFormatError} when one of the provided parameters is not correctly formatted according to the documentation.
|
|
16
|
+
*/
|
|
17
|
+
create<T extends OAuth1ApplicationCreation | OAuth2ApplicationCreation>(data: T, options?: OptionsBase): Promise<T extends OAuth1ApplicationCreation ? OAuth1Application : OAuth2Application>;
|
|
18
|
+
/**
|
|
19
|
+
* ## Get a list of applications
|
|
20
|
+
* Provides a paginated list of applications currently registered in the cluster.
|
|
21
|
+
*
|
|
22
|
+
* Every logged-in user is able to retrieve a limited set of fields (only `name`, `description`, `logo` and `type`).
|
|
23
|
+
*
|
|
24
|
+
* #### Global Permissions
|
|
25
|
+
* `VIEW_APPLICATIONS` - Returns all applications fields
|
|
26
|
+
*
|
|
27
|
+
* #### Function details
|
|
28
|
+
* @param options {@link OptionsWithRql} additional options with rql that can be set for your request to the cluster.
|
|
29
|
+
*
|
|
30
|
+
* @returns Provides a paginated list of applications currently registered in the cluster.
|
|
31
|
+
*
|
|
32
|
+
* @throws {@link NoPermissionError} when the user doesn't have the required permissions to execute the function.
|
|
33
|
+
* */
|
|
34
|
+
find(options?: OptionsWithRql): Promise<PagedResult<OAuth1Application | OAuth2Application>>;
|
|
35
|
+
/**
|
|
36
|
+
* ## Get the first application found
|
|
37
|
+
* Gets the first application from the paginated list of applications currently registered in the cluster.
|
|
38
|
+
*
|
|
39
|
+
* Every logged-in user is able to retrieve a limited set of fields (only `name`, `description`, `logo` and `type`).
|
|
40
|
+
*
|
|
41
|
+
* #### Global Permissions
|
|
42
|
+
* `VIEW_APPLICATIONS` - Returns all applications fields
|
|
43
|
+
*
|
|
44
|
+
* #### Function details
|
|
45
|
+
* @param options {@link OptionsWithRql} additional options with rql that can be set for your request to the cluster.
|
|
46
|
+
*
|
|
47
|
+
* @returns Provides a paginated list of applications currently registered in the cluster.
|
|
48
|
+
*
|
|
49
|
+
* @throws {@link NoPermissionError} when the user doesn't have the required permissions to execute the function.
|
|
50
|
+
* */
|
|
51
|
+
findFirst(options?: OptionsWithRql): Promise<OAuth1Application | OAuth2Application>;
|
|
52
|
+
/**
|
|
53
|
+
* ## Get an application by its id
|
|
54
|
+
* Gets the application currently registered in the cluster by its id.
|
|
55
|
+
*
|
|
56
|
+
* Every logged-in user is able to retrieve a limited set of fields (only `name`, `description`, `logo` and `type`).
|
|
57
|
+
*
|
|
58
|
+
* #### Global Permissions
|
|
59
|
+
* `VIEW_APPLICATIONS` - Returns all applications fields
|
|
60
|
+
*
|
|
61
|
+
* #### Function details
|
|
62
|
+
* @param options {@link OptionsWithRql} additional options with rql that can be set for your request to the cluster.
|
|
63
|
+
*
|
|
64
|
+
* @returns Provides a paginated list of applications currently registered in the cluster.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link NoPermissionError} when the user doesn't have the required permissions to execute the function.
|
|
67
|
+
* */
|
|
68
|
+
findById(id: ObjectId, options?: OptionsWithRql): Promise<OAuth1Application | OAuth2Application>;
|
|
69
|
+
/**
|
|
70
|
+
* ## Get an application by its name
|
|
71
|
+
* Gets the application currently registered in the cluster by its name.
|
|
72
|
+
*
|
|
73
|
+
* Every logged-in user is able to retrieve a limited set of fields (only `name`, `description`, `logo` and `type`).
|
|
74
|
+
*
|
|
75
|
+
* #### Global Permissions
|
|
76
|
+
* `VIEW_APPLICATIONS` - Returns all applications fields
|
|
77
|
+
*
|
|
78
|
+
* #### Function details
|
|
79
|
+
* @param options {@link OptionsWithRql} additional options with rql that can be set for your request to the cluster.
|
|
80
|
+
*
|
|
81
|
+
* @returns Provides a paginated list of applications currently registered in the cluster.
|
|
82
|
+
*
|
|
83
|
+
* @throws {@link NoPermissionError} when the user doesn't have the required permissions to execute the function.
|
|
84
|
+
* */
|
|
85
|
+
findByName(name: string, options?: OptionsWithRql): Promise<OAuth1Application | OAuth2Application>;
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated Use `find` instead
|
|
88
|
+
*
|
|
89
|
+
* ## Get a list of applications
|
|
90
|
+
* Provides a paginated list of applications currently registered in the cluster.
|
|
91
|
+
*
|
|
92
|
+
* Every logged-in user is able to retrieve a limited set of fields (only `name`, `description`, `logo` and `type`).
|
|
93
|
+
*
|
|
94
|
+
* #### Global Permissions
|
|
95
|
+
* `VIEW_APPLICATIONS` - Returns all applications fields
|
|
96
|
+
*
|
|
97
|
+
* #### Function details
|
|
98
|
+
* @param options {@link OptionsWithRql} additional options with rql that can be set for your request to the cluster.
|
|
99
|
+
*
|
|
100
|
+
* @returns Provides a paginated list of applications currently registered in the cluster.
|
|
101
|
+
*
|
|
102
|
+
* @throws {@link NoPermissionError} when the user doesn't have the required permissions to execute the function.
|
|
103
|
+
* */
|
|
104
|
+
get(options?: OptionsWithRql): Promise<PagedResult<OAuth1Application | OAuth2Application>>;
|
|
105
|
+
/**
|
|
106
|
+
* ## Update an existing application
|
|
107
|
+
* You can use this function to update an existing `oAuth1` or `oAuth2` application.
|
|
108
|
+
*
|
|
109
|
+
* You need permissions to use this function.
|
|
110
|
+
*
|
|
111
|
+
* #### Global Permissions
|
|
112
|
+
* `UPDATE_APPLICATIONS` - Provides the ability to update existing applications.
|
|
113
|
+
*
|
|
114
|
+
* #### Function details
|
|
115
|
+
* @param applicationId A hexadecimal identifier of 24 characters of the application you want to update.
|
|
116
|
+
* @param data {@link OAuth1ApplicationUpdate} or {@link OAuth2ApplicationUpdate} containing the fields you want to update.
|
|
117
|
+
* The fields that are left undefined will not be updated.
|
|
118
|
+
* @param options {@link OptionsBase} additional options that can be set for your request to the cluster.
|
|
119
|
+
*
|
|
120
|
+
* @returns {Promise} A Promise with the number of affected records.
|
|
121
|
+
*
|
|
122
|
+
* @throws {@link ResourceUnknownError} when no application is found for the specified application Id.
|
|
123
|
+
* @throws {@link NoPermissionError} when the user doesn't have the required permissions to execute the function.
|
|
124
|
+
* @throws {@link FieldFormatError} when one of the provided parameters is not correctly formatted according to the documentation.
|
|
125
|
+
*/
|
|
126
|
+
update<T extends OAuth1ApplicationUpdate | OAuth2ApplicationUpdate>(applicationId: string, data: T, options?: OptionsBase): Promise<AffectedRecords>;
|
|
127
|
+
/**
|
|
128
|
+
* ## Delete an application
|
|
129
|
+
* You can use this function to remove an existing `oAuth1` or `oAuth2` application.
|
|
130
|
+
*
|
|
131
|
+
* You need permissions to use this function.
|
|
132
|
+
*
|
|
133
|
+
* #### Global permisions
|
|
134
|
+
* `DELETE_APPLICATIONS` - Provides the ability to remove the applications.
|
|
135
|
+
*
|
|
136
|
+
* #### Function details
|
|
137
|
+
* @param applicationId A hexadecimal identifier of 24 characters of the application you want to remove.
|
|
138
|
+
* @param options {@link OptionsBase} additional options that can be set for your request to the cluster.
|
|
139
|
+
*
|
|
140
|
+
* @returns {Promise} A Promise with the number of affected records.
|
|
141
|
+
*
|
|
142
|
+
* @throws {@link ResourceUnknownError} when no application is found for the specified application Id.
|
|
143
|
+
* @throws {@link NoPermissionError} when the user doesn't have the required permissions to execute the function.
|
|
144
|
+
*/
|
|
145
|
+
remove(applicationId: string, options?: OptionsBase): Promise<AffectedRecords>;
|
|
146
|
+
/**
|
|
147
|
+
* ## Create an application version
|
|
148
|
+
* You can use this function to create a new application version.
|
|
149
|
+
*
|
|
150
|
+
* You need permissions to use this function.
|
|
151
|
+
*
|
|
152
|
+
* #### Global permissions
|
|
153
|
+
* `CREATE_APPLICATIONS`- Provides the ability to create new application versions.
|
|
154
|
+
*
|
|
155
|
+
* #### Function details
|
|
156
|
+
* @param applicationId A hexadecimal identifier of 24 characters of the application.
|
|
157
|
+
* @param data An {@link ApplicationVersionCreation} object
|
|
158
|
+
* @param options {@link OptionsBase} additional options that can be set for your request to the cluster.
|
|
159
|
+
*
|
|
160
|
+
* @returns The newly created {@link OAuth1ApplicationVersion} or {@link OAuth2ApplicationVersion}.
|
|
161
|
+
*
|
|
162
|
+
* @throws {@link NoPermissionError} when the user doesn't have the required permissions to execute the function.
|
|
163
|
+
* @throws {@link FieldFormatError} when one of the provided parameters is not correctly formatted according to the documentation.
|
|
164
|
+
*/
|
|
165
|
+
createVersion(applicationId: string, data: ApplicationVersionCreation, options?: OptionsBase): Promise<ApplicationVersion>;
|
|
166
|
+
/**
|
|
167
|
+
* ## Delete an application version
|
|
168
|
+
* You can use this function to remove an existing appliction version.
|
|
169
|
+
*
|
|
170
|
+
* When you remove an application version users with existing oAuth1 tokens trying to communicate with the cluster will receive a `OAUTH_KEY_EXCEPTION`.
|
|
171
|
+
* In case of oAuth2 tokens users will receive a `OAUTH2_CLIENT_ID_EXCEPTION` when trying to use their refresh token to get new access tokens.
|
|
172
|
+
* You can use the error's above to force users to switch to a newer version of your applications in case the backend no longer recoginizes them.
|
|
173
|
+
*
|
|
174
|
+
* You need permissions to execute this function
|
|
175
|
+
*
|
|
176
|
+
* #### Global permissions
|
|
177
|
+
* `DELETE_APPLICATIONS` - Provides the ability to remove application versions.
|
|
178
|
+
*
|
|
179
|
+
* #### Function details
|
|
180
|
+
* @param applicationId A hexadecimal identifier of 24 characters of the application.
|
|
181
|
+
* @param versionId the version Identifier or `name` of the application version.
|
|
182
|
+
* @param options {@link OptionsBase} additional options that can be set for your request to the cluster.
|
|
183
|
+
*
|
|
184
|
+
* @returns {Promise} A Promise with the number of affected records.
|
|
185
|
+
*
|
|
186
|
+
* @throws {ResourceUnknownError} when the specified application or version could not be found
|
|
187
|
+
* @throws {@link NoPermissionError} when the user doesn't have the required permissions to execute the function.
|
|
188
|
+
*/
|
|
189
|
+
deleteVersion(applicationId: string, versionId: string, options?: OptionsBase): Promise<AffectedRecords>;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* @name Application
|
|
193
|
+
*/
|
|
194
|
+
export interface Application {
|
|
195
|
+
/** A 24 character long hexadecimal value acting as the identifier of your application */
|
|
196
|
+
id: string;
|
|
197
|
+
/** The name of your application. A minimum 1 and maximm of 100 characters is accepted */
|
|
198
|
+
name: string;
|
|
199
|
+
/** A Description of your application. A minimum 1 and maximm of 250 characters is accepted */
|
|
200
|
+
description: string;
|
|
201
|
+
/** The timestamp when the application was last updated */
|
|
202
|
+
updateTimestamp: Date;
|
|
203
|
+
/** The timestamp when the application was created */
|
|
204
|
+
creationTimestamp: Date;
|
|
205
|
+
}
|
|
206
|
+
export interface OAuth1Application extends Application {
|
|
207
|
+
/** type of the application */
|
|
208
|
+
type: ApplicationType.oauth1;
|
|
209
|
+
/** A List cointaining the different versions of the application */
|
|
210
|
+
versions?: OAuth1ApplicationVersion[];
|
|
211
|
+
}
|
|
212
|
+
export interface OAuth2Application extends Application {
|
|
213
|
+
/** type of the application */
|
|
214
|
+
type: ApplicationType.oauth2;
|
|
215
|
+
/** A List containing the different versions of the application */
|
|
216
|
+
versions?: OAuth2ApplicationVersion[];
|
|
217
|
+
/**
|
|
218
|
+
* @deprecated
|
|
219
|
+
* The logo of the application. Can be used in the oAuth2.0 authorization code grant to indicate the user what application he is authorizing.
|
|
220
|
+
* A hexadecimal value with a minimum of 1 and maximum of 100 characters is allowed.
|
|
221
|
+
* */
|
|
222
|
+
logo?: string;
|
|
223
|
+
/** A list of approved uri's that can be used when authenticating with [an authorization code grant flow](https://www.rfc-editor.org/rfc/rfc6749#section-1.3.1). Can only be used in an oAuth2 application type. A minimum of 1 uri and maximum 50 uri's can be provided. This field is required upon creation to the application */
|
|
224
|
+
redirectUris?: string[];
|
|
225
|
+
/**
|
|
226
|
+
* Defines wether your application should be considered a confidential app according to the [oAuth2.0 spec](https://www.rfc-editor.org/rfc/rfc6749). If not provided upon creation this value defaults to false.
|
|
227
|
+
*/
|
|
228
|
+
confidential: boolean;
|
|
229
|
+
}
|
|
230
|
+
export declare enum ApplicationType {
|
|
231
|
+
oauth1 = "oauth1",
|
|
232
|
+
oauth2 = "oauth2"
|
|
233
|
+
}
|
|
234
|
+
export declare type ApplicationCreation = Required<Pick<Application, 'name' | 'description'>>;
|
|
235
|
+
export declare type OAuth1ApplicationCreation = ApplicationCreation & Required<Pick<OAuth1Application, 'type'>>;
|
|
236
|
+
export declare type OAuth2ApplicationCreation = ApplicationCreation & Required<Pick<OAuth2Application, 'type' | 'redirectUris'>> & Partial<Pick<OAuth2Application, 'logo' | 'confidential'>>;
|
|
237
|
+
export interface ApplicationVersion {
|
|
238
|
+
/** The identifier of this version */
|
|
239
|
+
id: string;
|
|
240
|
+
/** The name of the application version. We suggest using semantic versioning vX.X.X (e.g. v1.2.0) */
|
|
241
|
+
name: string;
|
|
242
|
+
/** The timestap when this version was created */
|
|
243
|
+
creationTimestamp: Date;
|
|
244
|
+
}
|
|
245
|
+
export interface OAuth1ApplicationVersion extends ApplicationVersion {
|
|
246
|
+
/** the oAuth1 consumerKey */
|
|
247
|
+
consumerKey: string;
|
|
248
|
+
/** the oAuth1 consumerSecret */
|
|
249
|
+
consumerSecret: string;
|
|
250
|
+
}
|
|
251
|
+
export interface OAuth2ApplicationVersion extends ApplicationVersion {
|
|
252
|
+
/** The oAuth2 clientId */
|
|
253
|
+
clientId: string;
|
|
254
|
+
/** The oAuth2 clientSecret */
|
|
255
|
+
clientSecret: string;
|
|
256
|
+
}
|
|
257
|
+
export declare type ApplicationUpdate = Partial<Pick<Application, 'name' | 'description'>>;
|
|
258
|
+
export declare type OAuth1ApplicationUpdate = ApplicationUpdate & Required<Pick<OAuth1Application, 'type'>>;
|
|
259
|
+
export declare type OAuth2ApplicationUpdate = ApplicationUpdate & Required<Pick<OAuth2Application, 'type'>> & Partial<Pick<OAuth2Application, 'logo' | 'redirectUris'>>;
|
|
260
|
+
export declare type ApplicationVersionCreation = Required<Partial<Pick<ApplicationVersion, 'name'>>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../types';
|
|
2
|
-
import type { AuthService } from './types';
|
|
3
|
-
export declare function authService(httpWithAuth: HttpInstance): AuthService;
|
|
1
|
+
import type { HttpInstance } from '../../types';
|
|
2
|
+
import type { AuthService } from './types';
|
|
3
|
+
export declare function authService(httpWithAuth: HttpInstance): AuthService;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../../types';
|
|
2
|
-
import { HttpClient } from '../../http-client';
|
|
3
|
-
import type { AuthOauth1Service } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpWithAuth: HttpInstance) => AuthOauth1Service;
|
|
5
|
-
export default _default;
|
|
1
|
+
import type { HttpInstance } from '../../../types';
|
|
2
|
+
import { HttpClient } from '../../http-client';
|
|
3
|
+
import type { AuthOauth1Service } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpWithAuth: HttpInstance) => AuthOauth1Service;
|
|
5
|
+
export default _default;
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import { AffectedRecords, OptionsWithRql, PagedResult } from '../../types';
|
|
2
|
-
export interface AuthOauth1Service {
|
|
3
|
-
/**
|
|
4
|
-
* Generate an SSO token with OAuth 1 authentication
|
|
5
|
-
*
|
|
6
|
-
* Permission | Scope | Effect
|
|
7
|
-
* - | - | -
|
|
8
|
-
* none | | Everyone can use this endpoint
|
|
9
|
-
* @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/SSO/post_oauth1_ssoTokens_generate
|
|
10
|
-
* @throws {ApplicationNotAuthenticatedError}
|
|
11
|
-
* @throws {UserNotAuthenticatedError}
|
|
12
|
-
*/
|
|
13
|
-
generateSsoToken(): Promise<SsoToken>;
|
|
14
|
-
/**
|
|
15
|
-
* Consume an SSO token to get OAuth 1 tokens
|
|
16
|
-
*
|
|
17
|
-
* Permission | Scope | Effect
|
|
18
|
-
* - | - | -
|
|
19
|
-
* none | | Everyone can use this endpoint
|
|
20
|
-
* @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/SSO/post_oauth1_ssoTokens_generate
|
|
21
|
-
* @throws {ApplicationNotAuthenticatedError}
|
|
22
|
-
* @throws {ResourceUnknownError}
|
|
23
|
-
*/
|
|
24
|
-
consumeSsoToken(ssoToken: string): Promise<OAuth1Token>;
|
|
25
|
-
/**
|
|
26
|
-
* Get a list of OAuth1 tokens
|
|
27
|
-
*
|
|
28
|
-
* Permission | Scope | Effect
|
|
29
|
-
* - | - | -
|
|
30
|
-
* none | | Can only see a list of OAuth1 tokens for this account
|
|
31
|
-
* VIEW_AUTHORIZATIONS | global | Can see a list of OAuth1 tokens for any account
|
|
32
|
-
* @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/OAuth1/get_oauth1_tokens
|
|
33
|
-
*/
|
|
34
|
-
getTokens(options?: OptionsWithRql): Promise<PagedResult<OAuth1Token>>;
|
|
35
|
-
/**
|
|
36
|
-
* Delete a token
|
|
37
|
-
*
|
|
38
|
-
* Permission | Scope | Effect
|
|
39
|
-
* - | - | -
|
|
40
|
-
* none | | Can only see a list of OAuth1 tokens for this account
|
|
41
|
-
* VIEW_AUTHORIZATIONS | | Can remove any OAuth1 tokens of any account
|
|
42
|
-
* * @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/OAuth1/post_oauth1_tokens_mfa
|
|
43
|
-
*/
|
|
44
|
-
removeToken(tokenId: string): Promise<AffectedRecords>;
|
|
45
|
-
}
|
|
46
|
-
export interface SsoToken {
|
|
47
|
-
id: string;
|
|
48
|
-
ssoToken: string;
|
|
49
|
-
userId: string;
|
|
50
|
-
createdByApplicationId: string;
|
|
51
|
-
expiryTimestamp: Date;
|
|
52
|
-
creationTimestamp: Date;
|
|
53
|
-
updateTimestamp: Date;
|
|
54
|
-
}
|
|
55
|
-
export interface OAuth1Token {
|
|
56
|
-
id: string;
|
|
57
|
-
userId: string;
|
|
58
|
-
applicationId: string;
|
|
59
|
-
token: string;
|
|
60
|
-
tokenSecret: string;
|
|
61
|
-
lastUsedTimestamp: Date;
|
|
62
|
-
creationTimestamp: Date;
|
|
63
|
-
}
|
|
1
|
+
import { AffectedRecords, OptionsWithRql, PagedResult } from '../../types';
|
|
2
|
+
export interface AuthOauth1Service {
|
|
3
|
+
/**
|
|
4
|
+
* Generate an SSO token with OAuth 1 authentication
|
|
5
|
+
*
|
|
6
|
+
* Permission | Scope | Effect
|
|
7
|
+
* - | - | -
|
|
8
|
+
* none | | Everyone can use this endpoint
|
|
9
|
+
* @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/SSO/post_oauth1_ssoTokens_generate
|
|
10
|
+
* @throws {ApplicationNotAuthenticatedError}
|
|
11
|
+
* @throws {UserNotAuthenticatedError}
|
|
12
|
+
*/
|
|
13
|
+
generateSsoToken(): Promise<SsoToken>;
|
|
14
|
+
/**
|
|
15
|
+
* Consume an SSO token to get OAuth 1 tokens
|
|
16
|
+
*
|
|
17
|
+
* Permission | Scope | Effect
|
|
18
|
+
* - | - | -
|
|
19
|
+
* none | | Everyone can use this endpoint
|
|
20
|
+
* @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/SSO/post_oauth1_ssoTokens_generate
|
|
21
|
+
* @throws {ApplicationNotAuthenticatedError}
|
|
22
|
+
* @throws {ResourceUnknownError}
|
|
23
|
+
*/
|
|
24
|
+
consumeSsoToken(ssoToken: string): Promise<OAuth1Token>;
|
|
25
|
+
/**
|
|
26
|
+
* Get a list of OAuth1 tokens
|
|
27
|
+
*
|
|
28
|
+
* Permission | Scope | Effect
|
|
29
|
+
* - | - | -
|
|
30
|
+
* none | | Can only see a list of OAuth1 tokens for this account
|
|
31
|
+
* VIEW_AUTHORIZATIONS | global | Can see a list of OAuth1 tokens for any account
|
|
32
|
+
* @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/OAuth1/get_oauth1_tokens
|
|
33
|
+
*/
|
|
34
|
+
getTokens(options?: OptionsWithRql): Promise<PagedResult<OAuth1Token>>;
|
|
35
|
+
/**
|
|
36
|
+
* Delete a token
|
|
37
|
+
*
|
|
38
|
+
* Permission | Scope | Effect
|
|
39
|
+
* - | - | -
|
|
40
|
+
* none | | Can only see a list of OAuth1 tokens for this account
|
|
41
|
+
* VIEW_AUTHORIZATIONS | | Can remove any OAuth1 tokens of any account
|
|
42
|
+
* * @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/OAuth1/post_oauth1_tokens_mfa
|
|
43
|
+
*/
|
|
44
|
+
removeToken(tokenId: string): Promise<AffectedRecords>;
|
|
45
|
+
}
|
|
46
|
+
export interface SsoToken {
|
|
47
|
+
id: string;
|
|
48
|
+
ssoToken: string;
|
|
49
|
+
userId: string;
|
|
50
|
+
createdByApplicationId: string;
|
|
51
|
+
expiryTimestamp: Date;
|
|
52
|
+
creationTimestamp: Date;
|
|
53
|
+
updateTimestamp: Date;
|
|
54
|
+
}
|
|
55
|
+
export interface OAuth1Token {
|
|
56
|
+
id: string;
|
|
57
|
+
userId: string;
|
|
58
|
+
applicationId: string;
|
|
59
|
+
token: string;
|
|
60
|
+
tokenSecret: string;
|
|
61
|
+
lastUsedTimestamp: Date;
|
|
62
|
+
creationTimestamp: Date;
|
|
63
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { HttpInstance } from '../../../types';
|
|
2
|
-
import { HttpClient } from '../../http-client';
|
|
3
|
-
import type { AuthOauth2Service } from './types';
|
|
4
|
-
declare const _default: (client: HttpClient, httpWithAuth: HttpInstance) => AuthOauth2Service;
|
|
5
|
-
export default _default;
|
|
1
|
+
import type { HttpInstance } from '../../../types';
|
|
2
|
+
import { HttpClient } from '../../http-client';
|
|
3
|
+
import type { AuthOauth2Service } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpWithAuth: HttpInstance) => AuthOauth2Service;
|
|
5
|
+
export default _default;
|