@fugood/bricks-project 2.21.0-beta.35 → 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 +226 -7
|
@@ -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 */
|
|
@@ -3610,8 +3620,8 @@ Default property:
|
|
|
3610
3620
|
{
|
|
3611
3621
|
"init": false,
|
|
3612
3622
|
"httpMethod": "GET",
|
|
3613
|
-
"
|
|
3614
|
-
"
|
|
3623
|
+
"timeout": 10000,
|
|
3624
|
+
"attributePath": "textContent"
|
|
3615
3625
|
}
|
|
3616
3626
|
*/
|
|
3617
3627
|
property?: {
|
|
@@ -3631,12 +3641,22 @@ Default property:
|
|
|
3631
3641
|
userAgent?: string | DataLink
|
|
3632
3642
|
/* Headers of crawler request */
|
|
3633
3643
|
headers?: {} | DataLink
|
|
3644
|
+
/* Timeout of crawler request */
|
|
3645
|
+
timeout?: number | DataLink
|
|
3634
3646
|
/* CSS Query Selector of selected element */
|
|
3635
3647
|
selector?: string | DataLink
|
|
3636
3648
|
/* Attribute path of HTMLElement */
|
|
3637
3649
|
attributePath?: string | DataLink
|
|
3638
|
-
/*
|
|
3639
|
-
|
|
3650
|
+
/* Multiple selectors and attribute paths. */
|
|
3651
|
+
selectorList?:
|
|
3652
|
+
| Array<
|
|
3653
|
+
| DataLink
|
|
3654
|
+
| {
|
|
3655
|
+
selector?: string | DataLink
|
|
3656
|
+
attributePath?: string | DataLink
|
|
3657
|
+
}
|
|
3658
|
+
>
|
|
3659
|
+
| DataLink
|
|
3640
3660
|
}
|
|
3641
3661
|
events?: {
|
|
3642
3662
|
/* Event of crawling start */
|
|
@@ -3645,8 +3665,10 @@ Default property:
|
|
|
3645
3665
|
onEnd?: Array<EventAction>
|
|
3646
3666
|
}
|
|
3647
3667
|
outlets?: {
|
|
3648
|
-
/* Response for CRAWLER request */
|
|
3668
|
+
/* Response for CRAWLER request (selector) */
|
|
3649
3669
|
response?: () => Data
|
|
3670
|
+
/* Responses for CRAWLER request (selectorList) */
|
|
3671
|
+
responseList?: () => Data
|
|
3650
3672
|
/* The error response of CRAWLER request, it will save to property bank */
|
|
3651
3673
|
error?: () => Data
|
|
3652
3674
|
}
|
|
@@ -3666,7 +3688,7 @@ export type GeneratorWebCrawler = Generator &
|
|
|
3666
3688
|
| SwitchCondData
|
|
3667
3689
|
| {
|
|
3668
3690
|
__typename: 'SwitchCondInnerStateOutlet'
|
|
3669
|
-
outlet: 'response' | 'error'
|
|
3691
|
+
outlet: 'response' | 'responseList' | 'error'
|
|
3670
3692
|
value: any
|
|
3671
3693
|
}
|
|
3672
3694
|
}>
|
|
@@ -4254,6 +4276,111 @@ export type GeneratorQuestion = Generator &
|
|
|
4254
4276
|
>
|
|
4255
4277
|
}
|
|
4256
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
|
+
|
|
4257
4384
|
/* Read stats */
|
|
4258
4385
|
export type GeneratorIntentActionSendIntent = ActionWithParams & {
|
|
4259
4386
|
__actionName: 'GENERATOR_INTENT_SEND_INTENT'
|
|
@@ -4577,6 +4704,91 @@ export type GeneratorTapPayT2P = Generator &
|
|
|
4577
4704
|
>
|
|
4578
4705
|
}
|
|
4579
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
|
+
|
|
4580
4792
|
/* Start speech recognition */
|
|
4581
4793
|
export type GeneratorPlatformSTTActionStart = Action & {
|
|
4582
4794
|
__actionName: 'GENERATOR_PLATFORM_STT_START'
|
|
@@ -4697,6 +4909,11 @@ export type GeneratorThermalPrinterActionPrint = ActionWithParams & {
|
|
|
4697
4909
|
>
|
|
4698
4910
|
}
|
|
4699
4911
|
|
|
4912
|
+
/* Check thermal printer status */
|
|
4913
|
+
export type GeneratorThermalPrinterActionCheckStatus = Action & {
|
|
4914
|
+
__actionName: 'GENERATOR_THERMAL_PRINTER_CHECK_STATUS'
|
|
4915
|
+
}
|
|
4916
|
+
|
|
4700
4917
|
interface GeneratorThermalPrinterDef {
|
|
4701
4918
|
/*
|
|
4702
4919
|
Default property:
|
|
@@ -4719,7 +4936,7 @@ Default property:
|
|
|
4719
4936
|
lang?: 'ANK' | 'CHINESE' | 'TAIWAN' | 'KOREAN' | 'THAI' | 'SOUTHASIA' | DataLink
|
|
4720
4937
|
/* The timeout of scanning */
|
|
4721
4938
|
scanTimeout?: number | DataLink
|
|
4722
|
-
/* State update interval */
|
|
4939
|
+
/* State update interval, 0 means no update automatically */
|
|
4723
4940
|
stateUpdateInterval?: number | DataLink
|
|
4724
4941
|
/* Enable page mode on printing */
|
|
4725
4942
|
pageMode?: boolean | DataLink
|
|
@@ -6539,6 +6756,8 @@ Default property:
|
|
|
6539
6756
|
completionDryPenaltyLastN?: number | DataLink
|
|
6540
6757
|
/* Specify an array of sequence breakers for DRY sampling. Only a JSON array of strings is accepted. Default: `['\n', ':', '"', '*']` */
|
|
6541
6758
|
completionDrySequenceBreakers?: Array<string | DataLink> | DataLink
|
|
6759
|
+
/* Top n sigma sampling as described in academic paper "Top-nσ: Not All Logits Are You Need" https://arxiv.org/pdf/2411.07641. Default: `-1.0` (Disabled) */
|
|
6760
|
+
completionTopNSigma?: number | DataLink
|
|
6542
6761
|
/* Use Mirostat sampling. Top K, Nucleus, Tail Free and Locally Typical samplers are ignored if used. */
|
|
6543
6762
|
completionMirostat?: number | DataLink
|
|
6544
6763
|
/* Mirostat target entropy, parameter tau */
|