@fugood/bricks-project 2.21.0-beta.36 → 2.21.0-beta.37
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/compile/action-name-map.ts +17 -0
- package/package.json +2 -2
- package/types/generators.ts +200 -0
|
@@ -431,6 +431,15 @@ export const templateActionNameMap = {
|
|
|
431
431
|
},
|
|
432
432
|
},
|
|
433
433
|
|
|
434
|
+
GENERATOR_INFORMATION: {
|
|
435
|
+
GENERATOR_INFORMATION_SHOW: {
|
|
436
|
+
type: 'GENERATOR_INFORMATION_TYPE',
|
|
437
|
+
title: 'GENERATOR_INFORMATION_TITLE',
|
|
438
|
+
description: 'GENERATOR_INFORMATION_DESCRIPTION',
|
|
439
|
+
extraInfo: 'GENERATOR_INFORMATION_EXTRA_INFO',
|
|
440
|
+
displayLanguage: 'GENERATOR_INFORMATION_DISPLAY_LANGUAGE',
|
|
441
|
+
},
|
|
442
|
+
},
|
|
434
443
|
GENERATOR_INTENT: {
|
|
435
444
|
GENERATOR_INTENT_SEND_INTENT: {
|
|
436
445
|
action: 'GENERATOR_INTENT_ACTION',
|
|
@@ -458,6 +467,14 @@ export const templateActionNameMap = {
|
|
|
458
467
|
email: 'GENERATOR_TAPPAY_T2P_IOS_EMAIL',
|
|
459
468
|
},
|
|
460
469
|
},
|
|
470
|
+
GENERATOR_CASTLES_PAY: {
|
|
471
|
+
GENERATOR_CASTLES_PAY_SALE: {
|
|
472
|
+
amount: 'GENERATOR_CASTLES_PAY_AMOUNT',
|
|
473
|
+
},
|
|
474
|
+
GENERATOR_CASTLES_PAY_CANCEL_TRANSACTION: {
|
|
475
|
+
transactionId: 'GENERATOR_CASTLES_PAY_TRANSACTION_ID',
|
|
476
|
+
},
|
|
477
|
+
},
|
|
461
478
|
|
|
462
479
|
GENERATOR_THERMAL_PRINTER: {
|
|
463
480
|
GENERATOR_THERMAL_PRINTER_PRINT: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fugood/bricks-project",
|
|
3
|
-
"version": "2.21.0-beta.
|
|
3
|
+
"version": "2.21.0-beta.37",
|
|
4
4
|
"main": "index.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node scripts/build.js"
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
"lodash": "^4.17.4",
|
|
14
14
|
"uuid": "^8.3.1"
|
|
15
15
|
},
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "112fd6e75fb8df64fee72f2e6f92d1965caea2ab"
|
|
17
17
|
}
|
package/types/generators.ts
CHANGED
|
@@ -3249,6 +3249,11 @@ export type GeneratorHTTPServerActionClearTempFiles = Action & {
|
|
|
3249
3249
|
__actionName: 'GENERATOR_HTTP_SERVER_CLEAR_TEMP_FILES'
|
|
3250
3250
|
}
|
|
3251
3251
|
|
|
3252
|
+
/* End stream */
|
|
3253
|
+
export type GeneratorHTTPServerActionEndStream = Action & {
|
|
3254
|
+
__actionName: 'GENERATOR_HTTP_SERVER_END_STREAM'
|
|
3255
|
+
}
|
|
3256
|
+
|
|
3252
3257
|
interface GeneratorHTTPServerDef {
|
|
3253
3258
|
/*
|
|
3254
3259
|
Default property:
|
|
@@ -3315,9 +3320,14 @@ Default property:
|
|
|
3315
3320
|
| 'application/xml'
|
|
3316
3321
|
| 'application/json'
|
|
3317
3322
|
| 'application/octet-stream'
|
|
3323
|
+
| 'text/event-stream'
|
|
3318
3324
|
| DataLink
|
|
3319
3325
|
/* Response Body */
|
|
3320
3326
|
resBody?: any
|
|
3327
|
+
/* Event name of SSE */
|
|
3328
|
+
sseEvent?: string | DataLink
|
|
3329
|
+
/* SSE single request mode, block new request until the previous request is processed */
|
|
3330
|
+
sseSingleRequest?: boolean | DataLink
|
|
3321
3331
|
}
|
|
3322
3332
|
events?: {
|
|
3323
3333
|
/* Event of HTTP server is ready */
|
|
@@ -4266,6 +4276,111 @@ export type GeneratorQuestion = Generator &
|
|
|
4266
4276
|
>
|
|
4267
4277
|
}
|
|
4268
4278
|
|
|
4279
|
+
/* Show information */
|
|
4280
|
+
export type GeneratorInformationActionShow = ActionWithParams & {
|
|
4281
|
+
__actionName: 'GENERATOR_INFORMATION_SHOW'
|
|
4282
|
+
params?: Array<
|
|
4283
|
+
| {
|
|
4284
|
+
input: 'type'
|
|
4285
|
+
value?: string | DataLink
|
|
4286
|
+
mapping?: string
|
|
4287
|
+
}
|
|
4288
|
+
| {
|
|
4289
|
+
input: 'title'
|
|
4290
|
+
value?: string | DataLink
|
|
4291
|
+
mapping?: string
|
|
4292
|
+
}
|
|
4293
|
+
| {
|
|
4294
|
+
input: 'description'
|
|
4295
|
+
value?: string | DataLink
|
|
4296
|
+
mapping?: string
|
|
4297
|
+
}
|
|
4298
|
+
| {
|
|
4299
|
+
input: 'extraInfo'
|
|
4300
|
+
value?: {} | DataLink
|
|
4301
|
+
mapping?: string
|
|
4302
|
+
}
|
|
4303
|
+
| {
|
|
4304
|
+
input: 'displayLanguage'
|
|
4305
|
+
value?: string | DataLink
|
|
4306
|
+
mapping?: string
|
|
4307
|
+
}
|
|
4308
|
+
>
|
|
4309
|
+
}
|
|
4310
|
+
|
|
4311
|
+
/* Close information */
|
|
4312
|
+
export type GeneratorInformationActionClose = Action & {
|
|
4313
|
+
__actionName: 'GENERATOR_INFORMATION_CLOSE'
|
|
4314
|
+
}
|
|
4315
|
+
|
|
4316
|
+
interface GeneratorInformationDef {
|
|
4317
|
+
/*
|
|
4318
|
+
Default property:
|
|
4319
|
+
{
|
|
4320
|
+
"modalMode": "root",
|
|
4321
|
+
"backgroundColor": "#161616"
|
|
4322
|
+
}
|
|
4323
|
+
*/
|
|
4324
|
+
property?: {
|
|
4325
|
+
/* Modal mode */
|
|
4326
|
+
modalMode?: 'root' | 'in-subspace' | DataLink
|
|
4327
|
+
/* Information type */
|
|
4328
|
+
type?: 'loading' | 'info' | 'warning' | 'success' | 'queue-number' | DataLink
|
|
4329
|
+
/* Title */
|
|
4330
|
+
title?: string | DataLink
|
|
4331
|
+
/* Description */
|
|
4332
|
+
description?: string | DataLink
|
|
4333
|
+
/* Extra information
|
|
4334
|
+
`queue-number`: { number: string, labelTitle: string, note: string } */
|
|
4335
|
+
extraInfo?: {} | DataLink
|
|
4336
|
+
/* Display language */
|
|
4337
|
+
displayLanguage?: string | DataLink
|
|
4338
|
+
/* Background color */
|
|
4339
|
+
backgroundColor?: string | DataLink
|
|
4340
|
+
}
|
|
4341
|
+
events?: {
|
|
4342
|
+
/* Trigger when user confirms the information */
|
|
4343
|
+
onConfirm?: Array<EventAction>
|
|
4344
|
+
/* Trigger when error occurs */
|
|
4345
|
+
onError?: Array<
|
|
4346
|
+
EventAction & {
|
|
4347
|
+
eventPropertyMapping?: {
|
|
4348
|
+
error: {
|
|
4349
|
+
type: 'string'
|
|
4350
|
+
path: string
|
|
4351
|
+
}
|
|
4352
|
+
}
|
|
4353
|
+
}
|
|
4354
|
+
>
|
|
4355
|
+
}
|
|
4356
|
+
outlets?: {
|
|
4357
|
+
/* Error message */
|
|
4358
|
+
errorMessage?: () => Data
|
|
4359
|
+
}
|
|
4360
|
+
}
|
|
4361
|
+
|
|
4362
|
+
/* Show information */
|
|
4363
|
+
export type GeneratorInformation = Generator &
|
|
4364
|
+
GeneratorInformationDef & {
|
|
4365
|
+
templateKey: 'GENERATOR_INFORMATION'
|
|
4366
|
+
switches: Array<
|
|
4367
|
+
SwitchDef &
|
|
4368
|
+
GeneratorInformationDef & {
|
|
4369
|
+
conds?: Array<{
|
|
4370
|
+
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
4371
|
+
cond:
|
|
4372
|
+
| SwitchCondInnerStateCurrentCanvas
|
|
4373
|
+
| SwitchCondData
|
|
4374
|
+
| {
|
|
4375
|
+
__typename: 'SwitchCondInnerStateOutlet'
|
|
4376
|
+
outlet: 'errorMessage'
|
|
4377
|
+
value: any
|
|
4378
|
+
}
|
|
4379
|
+
}>
|
|
4380
|
+
}
|
|
4381
|
+
>
|
|
4382
|
+
}
|
|
4383
|
+
|
|
4269
4384
|
/* Read stats */
|
|
4270
4385
|
export type GeneratorIntentActionSendIntent = ActionWithParams & {
|
|
4271
4386
|
__actionName: 'GENERATOR_INTENT_SEND_INTENT'
|
|
@@ -4589,6 +4704,91 @@ export type GeneratorTapPayT2P = Generator &
|
|
|
4589
4704
|
>
|
|
4590
4705
|
}
|
|
4591
4706
|
|
|
4707
|
+
/* Sale */
|
|
4708
|
+
export type GeneratorCastlesPayActionSale = ActionWithParams & {
|
|
4709
|
+
__actionName: 'GENERATOR_CASTLES_PAY_SALE'
|
|
4710
|
+
params?: Array<{
|
|
4711
|
+
input: 'amount'
|
|
4712
|
+
value?: number | DataLink
|
|
4713
|
+
mapping?: string
|
|
4714
|
+
}>
|
|
4715
|
+
}
|
|
4716
|
+
|
|
4717
|
+
/* Cancel Transaction */
|
|
4718
|
+
export type GeneratorCastlesPayActionCancelTransaction = ActionWithParams & {
|
|
4719
|
+
__actionName: 'GENERATOR_CASTLES_PAY_CANCEL_TRANSACTION'
|
|
4720
|
+
params?: Array<{
|
|
4721
|
+
input: 'transactionId'
|
|
4722
|
+
value?: string | DataLink
|
|
4723
|
+
mapping?: string
|
|
4724
|
+
}>
|
|
4725
|
+
}
|
|
4726
|
+
|
|
4727
|
+
/* Open Search */
|
|
4728
|
+
export type GeneratorCastlesPayActionOpenSearch = Action & {
|
|
4729
|
+
__actionName: 'GENERATOR_CASTLES_PAY_OPEN_SEARCH'
|
|
4730
|
+
}
|
|
4731
|
+
|
|
4732
|
+
interface GeneratorCastlesPayDef {
|
|
4733
|
+
/*
|
|
4734
|
+
Default property:
|
|
4735
|
+
{}
|
|
4736
|
+
*/
|
|
4737
|
+
property?: {}
|
|
4738
|
+
events?: {
|
|
4739
|
+
/* Action Success */
|
|
4740
|
+
onActionSuccess?: Array<
|
|
4741
|
+
EventAction & {
|
|
4742
|
+
eventPropertyMapping?: {
|
|
4743
|
+
actionResult: {
|
|
4744
|
+
type: 'object'
|
|
4745
|
+
path: string
|
|
4746
|
+
}
|
|
4747
|
+
}
|
|
4748
|
+
}
|
|
4749
|
+
>
|
|
4750
|
+
/* Action Error */
|
|
4751
|
+
onActionError?: Array<
|
|
4752
|
+
EventAction & {
|
|
4753
|
+
eventPropertyMapping?: {
|
|
4754
|
+
error: {
|
|
4755
|
+
type: 'string'
|
|
4756
|
+
path: string
|
|
4757
|
+
}
|
|
4758
|
+
}
|
|
4759
|
+
}
|
|
4760
|
+
>
|
|
4761
|
+
}
|
|
4762
|
+
outlets?: {
|
|
4763
|
+
/* Last Transaction Result */
|
|
4764
|
+
lastTransactionResult?: () => Data
|
|
4765
|
+
/* Last Error */
|
|
4766
|
+
lastError?: () => Data
|
|
4767
|
+
}
|
|
4768
|
+
}
|
|
4769
|
+
|
|
4770
|
+
/* Castles Pay */
|
|
4771
|
+
export type GeneratorCastlesPay = Generator &
|
|
4772
|
+
GeneratorCastlesPayDef & {
|
|
4773
|
+
templateKey: 'GENERATOR_CASTLES_PAY'
|
|
4774
|
+
switches: Array<
|
|
4775
|
+
SwitchDef &
|
|
4776
|
+
GeneratorCastlesPayDef & {
|
|
4777
|
+
conds?: Array<{
|
|
4778
|
+
method: '==' | '!=' | '>' | '<' | '>=' | '<='
|
|
4779
|
+
cond:
|
|
4780
|
+
| SwitchCondInnerStateCurrentCanvas
|
|
4781
|
+
| SwitchCondData
|
|
4782
|
+
| {
|
|
4783
|
+
__typename: 'SwitchCondInnerStateOutlet'
|
|
4784
|
+
outlet: 'lastTransactionResult' | 'lastError'
|
|
4785
|
+
value: any
|
|
4786
|
+
}
|
|
4787
|
+
}>
|
|
4788
|
+
}
|
|
4789
|
+
>
|
|
4790
|
+
}
|
|
4791
|
+
|
|
4592
4792
|
/* Start speech recognition */
|
|
4593
4793
|
export type GeneratorPlatformSTTActionStart = Action & {
|
|
4594
4794
|
__actionName: 'GENERATOR_PLATFORM_STT_START'
|