@appsemble/types 0.20.4 → 0.20.7
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/dist/index.d.ts +79 -4
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -165,6 +165,49 @@ export interface TokenResponse {
|
|
|
165
165
|
refresh_token?: string;
|
|
166
166
|
token_type: 'bearer';
|
|
167
167
|
}
|
|
168
|
+
interface BaseICSRemapper {
|
|
169
|
+
/**
|
|
170
|
+
* The start of the icalendar event.
|
|
171
|
+
*/
|
|
172
|
+
start: Remapper;
|
|
173
|
+
/**
|
|
174
|
+
* The title of the event.
|
|
175
|
+
*/
|
|
176
|
+
title: Remapper;
|
|
177
|
+
/**
|
|
178
|
+
* An optional description of the event.
|
|
179
|
+
*/
|
|
180
|
+
description?: Remapper;
|
|
181
|
+
/**
|
|
182
|
+
* An optional link to attach to the event.
|
|
183
|
+
*/
|
|
184
|
+
url?: Remapper;
|
|
185
|
+
/**
|
|
186
|
+
* An optional location description to attach to the event.
|
|
187
|
+
*/
|
|
188
|
+
location?: Remapper;
|
|
189
|
+
/**
|
|
190
|
+
* An optional geolocation description to attach to the event.
|
|
191
|
+
*
|
|
192
|
+
* This must be an object with the properties `lat` or `latitude`, and `lon`, `lng` or
|
|
193
|
+
* `longitude`.
|
|
194
|
+
*/
|
|
195
|
+
coordinates?: Remapper;
|
|
196
|
+
}
|
|
197
|
+
interface DurationICSRemapper extends BaseICSRemapper {
|
|
198
|
+
/**
|
|
199
|
+
* The duration of the event.
|
|
200
|
+
*
|
|
201
|
+
* @example '1w 3d 10h 30m'
|
|
202
|
+
*/
|
|
203
|
+
duration: Remapper;
|
|
204
|
+
}
|
|
205
|
+
interface EndTimeICSRemapper extends BaseICSRemapper {
|
|
206
|
+
/**
|
|
207
|
+
* The end time of the event as a date or a date string.
|
|
208
|
+
*/
|
|
209
|
+
end: Remapper;
|
|
210
|
+
}
|
|
168
211
|
export interface Remappers {
|
|
169
212
|
/**
|
|
170
213
|
* Get app metadata.
|
|
@@ -207,6 +250,18 @@ export interface Remappers {
|
|
|
207
250
|
* Returns `true` if all entries are equal, otherwise `false`.
|
|
208
251
|
*/
|
|
209
252
|
equals: Remapper[];
|
|
253
|
+
/**
|
|
254
|
+
* Compares the first computed remapper value with the second computed remapper value.
|
|
255
|
+
*
|
|
256
|
+
* Returns `true` of the first entry is greater than the second entry.
|
|
257
|
+
*/
|
|
258
|
+
gt: [Remapper, Remapper];
|
|
259
|
+
/**
|
|
260
|
+
* Compares the first computed remapper value with the second computed remapper value.
|
|
261
|
+
*
|
|
262
|
+
* Returns `true` of the first entry is less than the second entry.
|
|
263
|
+
*/
|
|
264
|
+
lt: [Remapper, Remapper];
|
|
210
265
|
/**
|
|
211
266
|
* Builds an array based on the given data and remappers.
|
|
212
267
|
*
|
|
@@ -226,6 +281,10 @@ export interface Remappers {
|
|
|
226
281
|
* If the input is not an array, the input is returned without any modifications.
|
|
227
282
|
*/
|
|
228
283
|
'array.unique': Remapper;
|
|
284
|
+
/**
|
|
285
|
+
* Create an icalendar event.
|
|
286
|
+
*/
|
|
287
|
+
ics: DurationICSRemapper | EndTimeICSRemapper;
|
|
229
288
|
/**
|
|
230
289
|
* Checks if condition results in a truthy value.
|
|
231
290
|
*
|
|
@@ -449,7 +508,7 @@ export interface ResourceDefinition {
|
|
|
449
508
|
/**
|
|
450
509
|
* A time string representing when a resource should expire.
|
|
451
510
|
*
|
|
452
|
-
*
|
|
511
|
+
* @example '1d 8h 30m'
|
|
453
512
|
*/
|
|
454
513
|
expires?: string;
|
|
455
514
|
}
|
|
@@ -514,6 +573,12 @@ export interface DialogActionDefinition extends BaseActionDefinition<'dialog'> {
|
|
|
514
573
|
*/
|
|
515
574
|
title?: Remapper;
|
|
516
575
|
}
|
|
576
|
+
export interface DownloadActionDefinition extends BaseActionDefinition<'download'> {
|
|
577
|
+
/**
|
|
578
|
+
* The filename to download the file as. It must include a file extension.
|
|
579
|
+
*/
|
|
580
|
+
filename: string;
|
|
581
|
+
}
|
|
517
582
|
export interface EmailActionDefinition extends BaseActionDefinition<'email'> {
|
|
518
583
|
/**
|
|
519
584
|
* The recipient of the email.
|
|
@@ -542,9 +607,19 @@ export interface EmailActionDefinition extends BaseActionDefinition<'email'> {
|
|
|
542
607
|
*/
|
|
543
608
|
body: Remapper;
|
|
544
609
|
/**
|
|
545
|
-
* The attachments
|
|
610
|
+
* The attachments to include in the email.
|
|
611
|
+
*
|
|
612
|
+
* The remapper must resolve to an object containing the following properties:
|
|
613
|
+
*
|
|
614
|
+
* - \`target\`: The asset ID or link to download contents from to add as an attachment. This is
|
|
615
|
+
* mutually exclusive with \`content\`.
|
|
616
|
+
* - \`content\`: The raw content to include as the file content. This is mutually exclusive with
|
|
617
|
+
* \`target\`.
|
|
618
|
+
* - \`filename\`: The filename to include the attachment as.
|
|
619
|
+
* - \`accept\` If the target is a URL, this will be set as the HTTP \`Accept\` header when
|
|
620
|
+
* downloading the file.
|
|
546
621
|
*
|
|
547
|
-
*
|
|
622
|
+
* If the attachment is a string, it will be treated as the target.
|
|
548
623
|
*/
|
|
549
624
|
attachments?: Remapper;
|
|
550
625
|
}
|
|
@@ -766,7 +841,7 @@ export declare type MessageActionDefinition = BaseActionDefinition<'message'> &
|
|
|
766
841
|
*/
|
|
767
842
|
body: Remapper;
|
|
768
843
|
};
|
|
769
|
-
export declare type ActionDefinition = AnalyticsAction | BaseActionDefinition<'dialog.error'> | BaseActionDefinition<'dialog.ok'> | BaseActionDefinition<'flow.back'> | BaseActionDefinition<'flow.cancel'> | BaseActionDefinition<'flow.finish'> | BaseActionDefinition<'flow.next'> | BaseActionDefinition<'link.back'> | BaseActionDefinition<'link.next'> | BaseActionDefinition<'noop'> | BaseActionDefinition<'team.join'> | BaseActionDefinition<'team.list'> | BaseActionDefinition<'throw'> | ConditionActionDefinition | DialogActionDefinition | EmailActionDefinition | EventActionDefinition | FlowToActionDefinition | LinkActionDefinition | LogActionDefinition | MessageActionDefinition | RequestActionDefinition | ResourceCountActionDefinition | ResourceCreateActionDefinition | ResourceDeleteActionDefinition | ResourceGetActionDefinition | ResourceQueryActionDefinition | ResourceSubscriptionStatusActionDefinition | ResourceSubscriptionSubscribeActionDefinition | ResourceSubscriptionToggleActionDefinition | ResourceSubscriptionUnsubscribeActionDefinition | ResourceUpdateActionDefinition | ShareActionDefinition | StaticActionDefinition | StorageReadActionDefinition | StorageWriteActionDefinition | TeamInviteActionDefinition | UserLoginAction | UserRegisterAction | UserUpdateAction;
|
|
844
|
+
export declare type ActionDefinition = AnalyticsAction | BaseActionDefinition<'dialog.error'> | BaseActionDefinition<'dialog.ok'> | BaseActionDefinition<'flow.back'> | BaseActionDefinition<'flow.cancel'> | BaseActionDefinition<'flow.finish'> | BaseActionDefinition<'flow.next'> | BaseActionDefinition<'link.back'> | BaseActionDefinition<'link.next'> | BaseActionDefinition<'noop'> | BaseActionDefinition<'team.join'> | BaseActionDefinition<'team.list'> | BaseActionDefinition<'throw'> | ConditionActionDefinition | DialogActionDefinition | DownloadActionDefinition | EmailActionDefinition | EventActionDefinition | FlowToActionDefinition | LinkActionDefinition | LogActionDefinition | MessageActionDefinition | RequestActionDefinition | ResourceCountActionDefinition | ResourceCreateActionDefinition | ResourceDeleteActionDefinition | ResourceGetActionDefinition | ResourceQueryActionDefinition | ResourceSubscriptionStatusActionDefinition | ResourceSubscriptionSubscribeActionDefinition | ResourceSubscriptionToggleActionDefinition | ResourceSubscriptionUnsubscribeActionDefinition | ResourceUpdateActionDefinition | ShareActionDefinition | StaticActionDefinition | StorageReadActionDefinition | StorageWriteActionDefinition | TeamInviteActionDefinition | UserLoginAction | UserRegisterAction | UserUpdateAction;
|
|
770
845
|
export interface ActionType {
|
|
771
846
|
/**
|
|
772
847
|
* Whether or not app creators are required to define this action.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/types",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.7",
|
|
4
4
|
"description": "TypeScript definitions reused within Appsemble internally",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"test": "jest"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@appsemble/sdk": "0.20.
|
|
33
|
+
"@appsemble/sdk": "0.20.7",
|
|
34
34
|
"@fortawesome/fontawesome-common-types": "^6.0.0",
|
|
35
35
|
"jsonschema": "^1.0.0",
|
|
36
|
-
"openapi-types": "^
|
|
36
|
+
"openapi-types": "^11.0.0",
|
|
37
37
|
"type-fest": "^2.0.0"
|
|
38
38
|
}
|
|
39
39
|
}
|