@evoke-platform/context 1.2.0 → 1.3.0-dev.1
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/README.md +20 -0
- package/dist/objects/objects.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,6 +17,7 @@ available and no further installation is necessary.
|
|
|
17
17
|
|
|
18
18
|
- [Working With Objects](#working-with-objects)
|
|
19
19
|
- [REST API Calls](#rest-api-calls)
|
|
20
|
+
- [Authentication Context](#authentication-context)
|
|
20
21
|
- [Notifications](#notifications)
|
|
21
22
|
|
|
22
23
|
### Working With Objects
|
|
@@ -222,6 +223,25 @@ absolute URL.
|
|
|
222
223
|
|
|
223
224
|
##### `delete(url, options)`
|
|
224
225
|
|
|
226
|
+
### Authentication Context
|
|
227
|
+
|
|
228
|
+
- [useAuthenticationContext](#useauthenticationcontext)
|
|
229
|
+
|
|
230
|
+
#### `useAuthenticationContext()`
|
|
231
|
+
|
|
232
|
+
Hook to obtain the authentication context based on the current logged-in user.
|
|
233
|
+
|
|
234
|
+
The authentication context includes the following property and functions.
|
|
235
|
+
|
|
236
|
+
- `account` _[object]_
|
|
237
|
+
- The account of the currently logged-in user. This includes both the user's `id` and `name`.
|
|
238
|
+
- `logout()`
|
|
239
|
+
- A function that logs out the currently logged-in user. The user will be redirected to Evoke's logout page upon logout.
|
|
240
|
+
- `getAccessToken()`
|
|
241
|
+
- A function that returns an access token that is associated to the currently logged-in user. This token can be used to make API calls to Evoke's APIs to authenticate the API call.
|
|
242
|
+
- Note: As a general recommendation, the [ApiService](#class-apiservices) class should be used to make API calls as it will take care
|
|
243
|
+
of appending an access token to the call.
|
|
244
|
+
|
|
225
245
|
### Notifications
|
|
226
246
|
|
|
227
247
|
- [useNofitication](#usenotification)
|
|
@@ -90,6 +90,7 @@ export type Property = {
|
|
|
90
90
|
name: string;
|
|
91
91
|
type: PropertyType;
|
|
92
92
|
enum?: string[];
|
|
93
|
+
strictlyTrue?: boolean;
|
|
93
94
|
nonStrictEnum?: boolean;
|
|
94
95
|
objectId?: string;
|
|
95
96
|
relatedPropertyId?: string;
|
|
@@ -114,6 +115,7 @@ export type InputParameter = {
|
|
|
114
115
|
type: PropertyType;
|
|
115
116
|
required?: boolean;
|
|
116
117
|
enum?: string[];
|
|
118
|
+
strictlyTrue?: boolean;
|
|
117
119
|
nonStrictEnum?: boolean;
|
|
118
120
|
validation?: PropertyValidation | InputStringValidation;
|
|
119
121
|
objectId?: string;
|