@fugood/bricks-project 2.21.0-beta.36 → 2.21.0-beta.39

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.
@@ -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.36",
3
+ "version": "2.21.0-beta.39",
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": "4bc1b9a249bce22b5c2b6662c8bed6f9a4716ed5"
16
+ "gitHead": "e98ea50719977cc6a99124aab6792f8ab7747a47"
17
17
  }
package/types/bricks.ts CHANGED
@@ -3508,6 +3508,8 @@ Default property:
3508
3508
  enableCache?: boolean | DataLink
3509
3509
  /* The type of media to generate (image or video) */
3510
3510
  type?: 'image' | 'video' | DataLink
3511
+ /* Default image to display when no generated image is available */
3512
+ defaultImage?: string | DataLink
3511
3513
  /* The Lottie animation to show while generating */
3512
3514
  loadingAnimation?: string | DataLink
3513
3515
  /* The Lottie animation to show when an error occurs */
@@ -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 */
@@ -4023,11 +4033,25 @@ Default property:
4023
4033
  "showBack": true,
4024
4034
  "cameraType": "back",
4025
4035
  "cameraPosition": "top",
4026
- "nextButtonText": "NEXT",
4027
- "skipButtonText": "SKIP",
4028
- "doneButtonText": "DONE",
4029
4036
  "selectColumns": 3,
4030
- "sizeFactor": 2
4037
+ "sizeFactor": 1,
4038
+ "containerBackgroundColor": "#ffffff",
4039
+ "titleColor": "#000000",
4040
+ "descriptionColor": "#2e2e2e",
4041
+ "fieldBackgroundColor": "#E2E2E2",
4042
+ "fieldTextColor": "#1e1e1e",
4043
+ "fieldPlaceholderColor": "#333333",
4044
+ "fieldActiveBackgroundColor": "#FDCB8F",
4045
+ "fieldActiveTextColor": "#7D7D7D",
4046
+ "fieldControlColor": "#f08400",
4047
+ "primaryControlBtnBackgroundColor": "#1e1e1e",
4048
+ "primaryControlBtnTextColor": "#ffffff",
4049
+ "primaryControlBtnBorderColor": "#1e1e1e",
4050
+ "secondaryControlBtnBackgroundColor": "#ffffff",
4051
+ "secondaryControlBtnTextColor": "#1e1e1e",
4052
+ "secondaryControlBtnBorderColor": "#1e1e1e",
4053
+ "warnColor": "#ff4f00",
4054
+ "errorColor": "#ff0000"
4031
4055
  }
4032
4056
  */
4033
4057
  property?: {
@@ -4050,7 +4074,9 @@ Default property:
4050
4074
  title?: string | DataLink
4051
4075
  description?: string | DataLink
4052
4076
  kind?:
4077
+ | 'language'
4053
4078
  | 'number'
4079
+ | 'numeric-string'
4054
4080
  | 'text'
4055
4081
  | 'phone'
4056
4082
  | 'email'
@@ -4059,6 +4085,11 @@ Default property:
4059
4085
  | 'select'
4060
4086
  | 'multi-select'
4061
4087
  | 'yesno'
4088
+ | 'qty-list'
4089
+ | 'cart'
4090
+ | 'preference'
4091
+ | 'voice-record'
4092
+ | 'video-record'
4062
4093
  | 'code-scan'
4063
4094
  | 'message'
4064
4095
  | DataLink
@@ -4073,6 +4104,11 @@ Default property:
4073
4104
  | Array<string | DataLink>
4074
4105
  | DataLink
4075
4106
  | DataLink
4107
+ languageOptions?:
4108
+ | DataLink
4109
+ | {
4110
+ availableLangs?: Array<string | DataLink> | DataLink
4111
+ }
4076
4112
  numberOptions?:
4077
4113
  | DataLink
4078
4114
  | {
@@ -4112,6 +4148,7 @@ Default property:
4112
4148
  value?: string | DataLink
4113
4149
  image_uri?: string | DataLink
4114
4150
  label?: string | DataLink
4151
+ icon?: string | DataLink
4115
4152
  }
4116
4153
  >
4117
4154
  | DataLink
@@ -4126,6 +4163,7 @@ Default property:
4126
4163
  value?: string | DataLink
4127
4164
  image_uri?: string | DataLink
4128
4165
  label?: string | DataLink
4166
+ icon?: string | DataLink
4129
4167
  }
4130
4168
  >
4131
4169
  | DataLink
@@ -4135,10 +4173,81 @@ Default property:
4135
4173
  yesnoOptions?:
4136
4174
  | DataLink
4137
4175
  | {
4176
+ imageUri?: string | DataLink
4138
4177
  withConfirmButton?: boolean | DataLink
4139
4178
  yesBtnText?: string | DataLink
4140
4179
  noBtnText?: string | DataLink
4141
4180
  }
4181
+ qtyListOptions?:
4182
+ | DataLink
4183
+ | {
4184
+ items?:
4185
+ | Array<
4186
+ | DataLink
4187
+ | {
4188
+ id?: string | DataLink
4189
+ title?: string | DataLink
4190
+ description?: string | DataLink
4191
+ imageUri?: string | DataLink
4192
+ price?: number | DataLink
4193
+ }
4194
+ >
4195
+ | DataLink
4196
+ }
4197
+ cartOptions?:
4198
+ | DataLink
4199
+ | {
4200
+ items?:
4201
+ | Array<
4202
+ | DataLink
4203
+ | {
4204
+ id?: string | DataLink
4205
+ title?: string | DataLink
4206
+ description?: string | DataLink
4207
+ imageUri?: string | DataLink
4208
+ price?: number | DataLink
4209
+ qty?: number | DataLink
4210
+ }
4211
+ >
4212
+ | DataLink
4213
+ }
4214
+ preferenceOptions?:
4215
+ | DataLink
4216
+ | {
4217
+ settings?:
4218
+ | Array<
4219
+ | DataLink
4220
+ | {
4221
+ key?: string | DataLink
4222
+ title?: string | DataLink
4223
+ options?:
4224
+ | Array<
4225
+ | DataLink
4226
+ | {
4227
+ label?: string | DataLink
4228
+ value?: string | DataLink
4229
+ }
4230
+ >
4231
+ | DataLink
4232
+ multiple?: boolean | DataLink
4233
+ }
4234
+ >
4235
+ | DataLink
4236
+ }
4237
+ voiceRecordOptions?:
4238
+ | DataLink
4239
+ | {
4240
+ sampleRate?: number | DataLink
4241
+ bitDepth?: '8bit' | '16bit' | DataLink
4242
+ channels?: 'mono' | 'stereo' | DataLink
4243
+ maxDuration?: number | DataLink
4244
+ }
4245
+ videoRecordOptions?:
4246
+ | DataLink
4247
+ | {
4248
+ manuallyStart?: boolean | DataLink
4249
+ recordDuration?: number | DataLink
4250
+ }
4142
4251
  messageOptions?:
4143
4252
  | DataLink
4144
4253
  | {
@@ -4162,6 +4271,12 @@ Default property:
4162
4271
  }
4163
4272
  >
4164
4273
  | DataLink
4274
+ /* Display language (RFC 3066) */
4275
+ displayLang?: string | DataLink
4276
+ /* Banner image */
4277
+ bannerImage?: string | DataLink
4278
+ /* Banner image md5 */
4279
+ bannerImageMd5?: string | DataLink
4165
4280
  /* Show close button */
4166
4281
  showClose?: boolean | DataLink
4167
4282
  /* Show back button */
@@ -4186,22 +4301,32 @@ Default property:
4186
4301
  containerBackgroundColor?: string | DataLink
4187
4302
  /* Title color */
4188
4303
  titleColor?: string | DataLink
4189
- /* Control button text color */
4190
- controlBtnTextColor?: string | DataLink
4191
- /* Control button color */
4192
- controlBtnColor?: string | DataLink
4193
- /* Number field color */
4194
- numberFieldColor?: string | DataLink
4195
- /* Text field border color */
4196
- textFieldBorderColor?: string | DataLink
4197
- /* Text field text color */
4198
- textFieldTextColor?: string | DataLink
4199
- /* Field placeholder color */
4304
+ /* Description color */
4305
+ descriptionColor?: string | DataLink
4306
+ /* Input field background color */
4307
+ fieldBackgroundColor?: string | DataLink
4308
+ /* Input field text color */
4309
+ fieldTextColor?: string | DataLink
4310
+ /* Input field placeholder color */
4200
4311
  fieldPlaceholderColor?: string | DataLink
4201
- /* Select item background color */
4202
- selectItemBackgroundColor?: string | DataLink
4203
- /* Select item active background color */
4204
- selectItemActiveBackgroundColor?: string | DataLink
4312
+ /* Selected option background color */
4313
+ fieldActiveBackgroundColor?: string | DataLink
4314
+ /* Selected option text color */
4315
+ fieldActiveTextColor?: string | DataLink
4316
+ /* Field control button color */
4317
+ fieldControlColor?: string | DataLink
4318
+ /* Primary control button background color */
4319
+ primaryControlBtnBackgroundColor?: string | DataLink
4320
+ /* Primary control button text color */
4321
+ primaryControlBtnTextColor?: string | DataLink
4322
+ /* Primary control button border color */
4323
+ primaryControlBtnBorderColor?: string | DataLink
4324
+ /* Secondary control button background color */
4325
+ secondaryControlBtnBackgroundColor?: string | DataLink
4326
+ /* Secondary control button text color */
4327
+ secondaryControlBtnTextColor?: string | DataLink
4328
+ /* Secondary control button border color */
4329
+ secondaryControlBtnBorderColor?: string | DataLink
4205
4330
  /* Warn color */
4206
4331
  warnColor?: string | DataLink
4207
4332
  /* Error color */
@@ -4214,8 +4339,8 @@ Default property:
4214
4339
  onBackQuestion?: Array<EventAction>
4215
4340
  /* Event of change question */
4216
4341
  onQuestionChange?: Array<EventAction>
4217
- /* Event of prompt paused */
4218
- onPause?: Array<EventAction>
4342
+ /* Event of user close question modal */
4343
+ onClose?: Array<EventAction>
4219
4344
  /* Event of warning showed */
4220
4345
  onWarning?: Array<EventAction>
4221
4346
  /* Event of completed inquire */
@@ -4266,6 +4391,111 @@ export type GeneratorQuestion = Generator &
4266
4391
  >
4267
4392
  }
4268
4393
 
4394
+ /* Show information */
4395
+ export type GeneratorInformationActionShow = ActionWithParams & {
4396
+ __actionName: 'GENERATOR_INFORMATION_SHOW'
4397
+ params?: Array<
4398
+ | {
4399
+ input: 'type'
4400
+ value?: string | DataLink
4401
+ mapping?: string
4402
+ }
4403
+ | {
4404
+ input: 'title'
4405
+ value?: string | DataLink
4406
+ mapping?: string
4407
+ }
4408
+ | {
4409
+ input: 'description'
4410
+ value?: string | DataLink
4411
+ mapping?: string
4412
+ }
4413
+ | {
4414
+ input: 'extraInfo'
4415
+ value?: {} | DataLink
4416
+ mapping?: string
4417
+ }
4418
+ | {
4419
+ input: 'displayLanguage'
4420
+ value?: string | DataLink
4421
+ mapping?: string
4422
+ }
4423
+ >
4424
+ }
4425
+
4426
+ /* Close information */
4427
+ export type GeneratorInformationActionClose = Action & {
4428
+ __actionName: 'GENERATOR_INFORMATION_CLOSE'
4429
+ }
4430
+
4431
+ interface GeneratorInformationDef {
4432
+ /*
4433
+ Default property:
4434
+ {
4435
+ "modalMode": "root",
4436
+ "backgroundColor": "#161616"
4437
+ }
4438
+ */
4439
+ property?: {
4440
+ /* Modal mode */
4441
+ modalMode?: 'root' | 'in-subspace' | DataLink
4442
+ /* Information type */
4443
+ type?: 'loading' | 'info' | 'warning' | 'success' | 'queue-number' | DataLink
4444
+ /* Title */
4445
+ title?: string | DataLink
4446
+ /* Description */
4447
+ description?: string | DataLink
4448
+ /* Extra information
4449
+ `queue-number`: { number: string, labelTitle: string, note: string } */
4450
+ extraInfo?: {} | DataLink
4451
+ /* Display language */
4452
+ displayLanguage?: string | DataLink
4453
+ /* Background color */
4454
+ backgroundColor?: string | DataLink
4455
+ }
4456
+ events?: {
4457
+ /* Trigger when user confirms the information */
4458
+ onConfirm?: Array<EventAction>
4459
+ /* Trigger when error occurs */
4460
+ onError?: Array<
4461
+ EventAction & {
4462
+ eventPropertyMapping?: {
4463
+ error: {
4464
+ type: 'string'
4465
+ path: string
4466
+ }
4467
+ }
4468
+ }
4469
+ >
4470
+ }
4471
+ outlets?: {
4472
+ /* Error message */
4473
+ errorMessage?: () => Data
4474
+ }
4475
+ }
4476
+
4477
+ /* Show information */
4478
+ export type GeneratorInformation = Generator &
4479
+ GeneratorInformationDef & {
4480
+ templateKey: 'GENERATOR_INFORMATION'
4481
+ switches: Array<
4482
+ SwitchDef &
4483
+ GeneratorInformationDef & {
4484
+ conds?: Array<{
4485
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
4486
+ cond:
4487
+ | SwitchCondInnerStateCurrentCanvas
4488
+ | SwitchCondData
4489
+ | {
4490
+ __typename: 'SwitchCondInnerStateOutlet'
4491
+ outlet: 'errorMessage'
4492
+ value: any
4493
+ }
4494
+ }>
4495
+ }
4496
+ >
4497
+ }
4498
+
4269
4499
  /* Read stats */
4270
4500
  export type GeneratorIntentActionSendIntent = ActionWithParams & {
4271
4501
  __actionName: 'GENERATOR_INTENT_SEND_INTENT'
@@ -4589,6 +4819,91 @@ export type GeneratorTapPayT2P = Generator &
4589
4819
  >
4590
4820
  }
4591
4821
 
4822
+ /* Sale */
4823
+ export type GeneratorCastlesPayActionSale = ActionWithParams & {
4824
+ __actionName: 'GENERATOR_CASTLES_PAY_SALE'
4825
+ params?: Array<{
4826
+ input: 'amount'
4827
+ value?: number | DataLink
4828
+ mapping?: string
4829
+ }>
4830
+ }
4831
+
4832
+ /* Cancel Transaction */
4833
+ export type GeneratorCastlesPayActionCancelTransaction = ActionWithParams & {
4834
+ __actionName: 'GENERATOR_CASTLES_PAY_CANCEL_TRANSACTION'
4835
+ params?: Array<{
4836
+ input: 'transactionId'
4837
+ value?: string | DataLink
4838
+ mapping?: string
4839
+ }>
4840
+ }
4841
+
4842
+ /* Open Search */
4843
+ export type GeneratorCastlesPayActionOpenSearch = Action & {
4844
+ __actionName: 'GENERATOR_CASTLES_PAY_OPEN_SEARCH'
4845
+ }
4846
+
4847
+ interface GeneratorCastlesPayDef {
4848
+ /*
4849
+ Default property:
4850
+ {}
4851
+ */
4852
+ property?: {}
4853
+ events?: {
4854
+ /* Action Success */
4855
+ onActionSuccess?: Array<
4856
+ EventAction & {
4857
+ eventPropertyMapping?: {
4858
+ actionResult: {
4859
+ type: 'object'
4860
+ path: string
4861
+ }
4862
+ }
4863
+ }
4864
+ >
4865
+ /* Action Error */
4866
+ onActionError?: Array<
4867
+ EventAction & {
4868
+ eventPropertyMapping?: {
4869
+ error: {
4870
+ type: 'string'
4871
+ path: string
4872
+ }
4873
+ }
4874
+ }
4875
+ >
4876
+ }
4877
+ outlets?: {
4878
+ /* Last Transaction Result */
4879
+ lastTransactionResult?: () => Data
4880
+ /* Last Error */
4881
+ lastError?: () => Data
4882
+ }
4883
+ }
4884
+
4885
+ /* Castles Pay */
4886
+ export type GeneratorCastlesPay = Generator &
4887
+ GeneratorCastlesPayDef & {
4888
+ templateKey: 'GENERATOR_CASTLES_PAY'
4889
+ switches: Array<
4890
+ SwitchDef &
4891
+ GeneratorCastlesPayDef & {
4892
+ conds?: Array<{
4893
+ method: '==' | '!=' | '>' | '<' | '>=' | '<='
4894
+ cond:
4895
+ | SwitchCondInnerStateCurrentCanvas
4896
+ | SwitchCondData
4897
+ | {
4898
+ __typename: 'SwitchCondInnerStateOutlet'
4899
+ outlet: 'lastTransactionResult' | 'lastError'
4900
+ value: any
4901
+ }
4902
+ }>
4903
+ }
4904
+ >
4905
+ }
4906
+
4592
4907
  /* Start speech recognition */
4593
4908
  export type GeneratorPlatformSTTActionStart = Action & {
4594
4909
  __actionName: 'GENERATOR_PLATFORM_STT_START'