@evoke-platform/context 1.0.0-dev.126 → 1.0.0-dev.128
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 -2
- 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
|
|
@@ -206,6 +207,25 @@ absolute URL.
|
|
|
206
207
|
|
|
207
208
|
##### `delete(url, options)`
|
|
208
209
|
|
|
210
|
+
### Authentication Context
|
|
211
|
+
|
|
212
|
+
- [useAuthenticationContext](#useauthenticationcontext)
|
|
213
|
+
|
|
214
|
+
#### `useAuthenticationContext()`
|
|
215
|
+
|
|
216
|
+
Hook to obtain the authentication context based on the current logged-in user.
|
|
217
|
+
|
|
218
|
+
The authentication context includes the following property and functions.
|
|
219
|
+
|
|
220
|
+
- `account` _[object]_
|
|
221
|
+
- The account of the currently logged-in user. This includes both the user's `id` and `name`.
|
|
222
|
+
- `logout()`
|
|
223
|
+
- A function that logs out the currently logged-in user. The user will be redirected to Evoke's logout page upon logout.
|
|
224
|
+
- `getAccessToken()`
|
|
225
|
+
- 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.
|
|
226
|
+
- Note: As a general recommendation, the [ApiService](#class-apiservices) class should be used to make API calls as it will take care
|
|
227
|
+
of appending an access token to the call.
|
|
228
|
+
|
|
209
229
|
### Notifications
|
|
210
230
|
|
|
211
231
|
- [useNofitication](#usenotification)
|
|
@@ -51,7 +51,7 @@ export type Obj = {
|
|
|
51
51
|
export type ObjWithRoot = Obj & {
|
|
52
52
|
rootObjectId: string;
|
|
53
53
|
};
|
|
54
|
-
export type PropertyType = 'address' | 'array' | 'boolean' | 'collection' | 'date' | 'date-time' | 'document' | 'image' | 'integer' | 'number' | 'object' | 'richText' | 'string' | 'time' | 'user';
|
|
54
|
+
export type PropertyType = 'address' | 'array' | 'boolean' | 'collection' | 'criteria' | 'date' | 'date-time' | 'document' | 'image' | 'integer' | 'number' | 'object' | 'richText' | 'string' | 'time' | 'user';
|
|
55
55
|
export type NumericValidation = {
|
|
56
56
|
errorMessage?: string;
|
|
57
57
|
minimum?: number;
|
|
@@ -202,7 +202,7 @@ export type FormEntry = InputParameterReference | Columns | Sections | Content;
|
|
|
202
202
|
export type Form = {
|
|
203
203
|
entries?: FormEntry[];
|
|
204
204
|
};
|
|
205
|
-
export type ActionInputType = 'button' | 'Section' | 'Columns' | 'Content' | 'Select' | 'TextField' | 'DateTime' | 'Document' | 'RepeatableField' | 'ManyToManyRepeatableField' | 'MultiSelect' | 'Decimal' | 'RichText' | 'Date' | 'Integer' | 'Image' | 'Object' | 'Time' | 'User';
|
|
205
|
+
export type ActionInputType = 'button' | 'Section' | 'Columns' | 'Content' | 'Criteria' | 'Select' | 'TextField' | 'DateTime' | 'Document' | 'RepeatableField' | 'ManyToManyRepeatableField' | 'MultiSelect' | 'Decimal' | 'RichText' | 'Date' | 'Integer' | 'Image' | 'Object' | 'Time' | 'User';
|
|
206
206
|
/**
|
|
207
207
|
* Represents an object action inputProperty object.
|
|
208
208
|
*/
|