@fleetless/contracts 15.6.0 → 16.0.0-next.2

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.
@@ -939,11 +939,27 @@
939
939
  "properties": {
940
940
  "text_id": {
941
941
  "type": "string",
942
- "const": "DR-1374-draft-3-C.4"
942
+ "enum": [
943
+ "C4-1168-checkout",
944
+ "C4-1168-pay-and-switch",
945
+ "C4-1168-switch",
946
+ "C4-1168-schedule-switch",
947
+ "C4-1168-schedule-downgrade",
948
+ "C4-1168-cancel",
949
+ "C4-1168-keep-basic"
950
+ ],
951
+ "description": "The approved sentence this display shows, one per action."
943
952
  },
944
953
  "text": {
945
954
  "type": "string",
946
- "minLength": 1
955
+ "minLength": 1,
956
+ "pattern": "^By selecting “",
957
+ "description": "The consent sentence shown directly above the button, naming the button."
958
+ },
959
+ "action_label": {
960
+ "type": "string",
961
+ "minLength": 1,
962
+ "description": "The label of the one button that confirms this decision."
947
963
  },
948
964
  "terms": {
949
965
  "type": "object",
@@ -1003,10 +1019,146 @@
1003
1019
  "required": [
1004
1020
  "text_id",
1005
1021
  "text",
1022
+ "action_label",
1006
1023
  "terms",
1007
1024
  "dpa"
1008
1025
  ],
1009
- "additionalProperties": false
1026
+ "additionalProperties": false,
1027
+ "allOf": [
1028
+ {
1029
+ "if": {
1030
+ "properties": {
1031
+ "text_id": {
1032
+ "const": "C4-1168-checkout"
1033
+ }
1034
+ },
1035
+ "required": [
1036
+ "text_id"
1037
+ ]
1038
+ },
1039
+ "then": {
1040
+ "properties": {
1041
+ "action_label": {
1042
+ "pattern": "^Pay \\S.* with Mollie$"
1043
+ }
1044
+ }
1045
+ }
1046
+ },
1047
+ {
1048
+ "if": {
1049
+ "properties": {
1050
+ "text_id": {
1051
+ "const": "C4-1168-pay-and-switch"
1052
+ }
1053
+ },
1054
+ "required": [
1055
+ "text_id"
1056
+ ]
1057
+ },
1058
+ "then": {
1059
+ "properties": {
1060
+ "action_label": {
1061
+ "pattern": "^Pay \\S.* and switch$"
1062
+ }
1063
+ }
1064
+ }
1065
+ },
1066
+ {
1067
+ "if": {
1068
+ "properties": {
1069
+ "text_id": {
1070
+ "const": "C4-1168-switch"
1071
+ }
1072
+ },
1073
+ "required": [
1074
+ "text_id"
1075
+ ]
1076
+ },
1077
+ "then": {
1078
+ "properties": {
1079
+ "action_label": {
1080
+ "pattern": "^Switch to \\S.*$"
1081
+ }
1082
+ }
1083
+ }
1084
+ },
1085
+ {
1086
+ "if": {
1087
+ "properties": {
1088
+ "text_id": {
1089
+ "const": "C4-1168-schedule-switch"
1090
+ }
1091
+ },
1092
+ "required": [
1093
+ "text_id"
1094
+ ]
1095
+ },
1096
+ "then": {
1097
+ "properties": {
1098
+ "action_label": {
1099
+ "const": "Switch to monthly at period end"
1100
+ }
1101
+ }
1102
+ }
1103
+ },
1104
+ {
1105
+ "if": {
1106
+ "properties": {
1107
+ "text_id": {
1108
+ "const": "C4-1168-schedule-downgrade"
1109
+ }
1110
+ },
1111
+ "required": [
1112
+ "text_id"
1113
+ ]
1114
+ },
1115
+ "then": {
1116
+ "properties": {
1117
+ "action_label": {
1118
+ "pattern": "^Schedule downgrade to \\S.*$"
1119
+ }
1120
+ }
1121
+ }
1122
+ },
1123
+ {
1124
+ "if": {
1125
+ "properties": {
1126
+ "text_id": {
1127
+ "const": "C4-1168-cancel"
1128
+ }
1129
+ },
1130
+ "required": [
1131
+ "text_id"
1132
+ ]
1133
+ },
1134
+ "then": {
1135
+ "properties": {
1136
+ "action_label": {
1137
+ "const": "Cancel at period end"
1138
+ }
1139
+ }
1140
+ }
1141
+ },
1142
+ {
1143
+ "if": {
1144
+ "properties": {
1145
+ "text_id": {
1146
+ "const": "C4-1168-keep-basic"
1147
+ }
1148
+ },
1149
+ "required": [
1150
+ "text_id"
1151
+ ]
1152
+ },
1153
+ "then": {
1154
+ "properties": {
1155
+ "action_label": {
1156
+ "const": "Delete the rest and stay on Basic"
1157
+ }
1158
+ }
1159
+ }
1160
+ }
1161
+ ]
1010
1162
  },
1011
1163
  "expires_at": {
1012
1164
  "type": "string",
@@ -1986,11 +2138,27 @@
1986
2138
  "properties": {
1987
2139
  "text_id": {
1988
2140
  "type": "string",
1989
- "const": "DR-1374-draft-3-C.4"
2141
+ "enum": [
2142
+ "C4-1168-checkout",
2143
+ "C4-1168-pay-and-switch",
2144
+ "C4-1168-switch",
2145
+ "C4-1168-schedule-switch",
2146
+ "C4-1168-schedule-downgrade",
2147
+ "C4-1168-cancel",
2148
+ "C4-1168-keep-basic"
2149
+ ],
2150
+ "description": "The approved sentence this display shows, one per action."
1990
2151
  },
1991
2152
  "text": {
1992
2153
  "type": "string",
1993
- "minLength": 1
2154
+ "minLength": 1,
2155
+ "pattern": "^By selecting “",
2156
+ "description": "The consent sentence shown directly above the button, naming the button."
2157
+ },
2158
+ "action_label": {
2159
+ "type": "string",
2160
+ "minLength": 1,
2161
+ "description": "The label of the one button that confirms this decision."
1994
2162
  },
1995
2163
  "terms": {
1996
2164
  "type": "object",
@@ -2050,10 +2218,146 @@
2050
2218
  "required": [
2051
2219
  "text_id",
2052
2220
  "text",
2221
+ "action_label",
2053
2222
  "terms",
2054
2223
  "dpa"
2055
2224
  ],
2056
- "additionalProperties": false
2225
+ "additionalProperties": false,
2226
+ "allOf": [
2227
+ {
2228
+ "if": {
2229
+ "properties": {
2230
+ "text_id": {
2231
+ "const": "C4-1168-checkout"
2232
+ }
2233
+ },
2234
+ "required": [
2235
+ "text_id"
2236
+ ]
2237
+ },
2238
+ "then": {
2239
+ "properties": {
2240
+ "action_label": {
2241
+ "pattern": "^Pay \\S.* with Mollie$"
2242
+ }
2243
+ }
2244
+ }
2245
+ },
2246
+ {
2247
+ "if": {
2248
+ "properties": {
2249
+ "text_id": {
2250
+ "const": "C4-1168-pay-and-switch"
2251
+ }
2252
+ },
2253
+ "required": [
2254
+ "text_id"
2255
+ ]
2256
+ },
2257
+ "then": {
2258
+ "properties": {
2259
+ "action_label": {
2260
+ "pattern": "^Pay \\S.* and switch$"
2261
+ }
2262
+ }
2263
+ }
2264
+ },
2265
+ {
2266
+ "if": {
2267
+ "properties": {
2268
+ "text_id": {
2269
+ "const": "C4-1168-switch"
2270
+ }
2271
+ },
2272
+ "required": [
2273
+ "text_id"
2274
+ ]
2275
+ },
2276
+ "then": {
2277
+ "properties": {
2278
+ "action_label": {
2279
+ "pattern": "^Switch to \\S.*$"
2280
+ }
2281
+ }
2282
+ }
2283
+ },
2284
+ {
2285
+ "if": {
2286
+ "properties": {
2287
+ "text_id": {
2288
+ "const": "C4-1168-schedule-switch"
2289
+ }
2290
+ },
2291
+ "required": [
2292
+ "text_id"
2293
+ ]
2294
+ },
2295
+ "then": {
2296
+ "properties": {
2297
+ "action_label": {
2298
+ "const": "Switch to monthly at period end"
2299
+ }
2300
+ }
2301
+ }
2302
+ },
2303
+ {
2304
+ "if": {
2305
+ "properties": {
2306
+ "text_id": {
2307
+ "const": "C4-1168-schedule-downgrade"
2308
+ }
2309
+ },
2310
+ "required": [
2311
+ "text_id"
2312
+ ]
2313
+ },
2314
+ "then": {
2315
+ "properties": {
2316
+ "action_label": {
2317
+ "pattern": "^Schedule downgrade to \\S.*$"
2318
+ }
2319
+ }
2320
+ }
2321
+ },
2322
+ {
2323
+ "if": {
2324
+ "properties": {
2325
+ "text_id": {
2326
+ "const": "C4-1168-cancel"
2327
+ }
2328
+ },
2329
+ "required": [
2330
+ "text_id"
2331
+ ]
2332
+ },
2333
+ "then": {
2334
+ "properties": {
2335
+ "action_label": {
2336
+ "const": "Cancel at period end"
2337
+ }
2338
+ }
2339
+ }
2340
+ },
2341
+ {
2342
+ "if": {
2343
+ "properties": {
2344
+ "text_id": {
2345
+ "const": "C4-1168-keep-basic"
2346
+ }
2347
+ },
2348
+ "required": [
2349
+ "text_id"
2350
+ ]
2351
+ },
2352
+ "then": {
2353
+ "properties": {
2354
+ "action_label": {
2355
+ "const": "Delete the rest and stay on Basic"
2356
+ }
2357
+ }
2358
+ }
2359
+ }
2360
+ ]
2057
2361
  },
2058
2362
  "expires_at": {
2059
2363
  "type": "string",
@@ -3033,11 +3337,27 @@
3033
3337
  "properties": {
3034
3338
  "text_id": {
3035
3339
  "type": "string",
3036
- "const": "DR-1374-draft-3-C.4"
3340
+ "enum": [
3341
+ "C4-1168-checkout",
3342
+ "C4-1168-pay-and-switch",
3343
+ "C4-1168-switch",
3344
+ "C4-1168-schedule-switch",
3345
+ "C4-1168-schedule-downgrade",
3346
+ "C4-1168-cancel",
3347
+ "C4-1168-keep-basic"
3348
+ ],
3349
+ "description": "The approved sentence this display shows, one per action."
3037
3350
  },
3038
3351
  "text": {
3039
3352
  "type": "string",
3040
- "minLength": 1
3353
+ "minLength": 1,
3354
+ "pattern": "^By selecting “",
3355
+ "description": "The consent sentence shown directly above the button, naming the button."
3356
+ },
3357
+ "action_label": {
3358
+ "type": "string",
3359
+ "minLength": 1,
3360
+ "description": "The label of the one button that confirms this decision."
3041
3361
  },
3042
3362
  "terms": {
3043
3363
  "type": "object",
@@ -3097,10 +3417,146 @@
3097
3417
  "required": [
3098
3418
  "text_id",
3099
3419
  "text",
3420
+ "action_label",
3100
3421
  "terms",
3101
3422
  "dpa"
3102
3423
  ],
3103
- "additionalProperties": false
3424
+ "additionalProperties": false,
3425
+ "allOf": [
3426
+ {
3427
+ "if": {
3428
+ "properties": {
3429
+ "text_id": {
3430
+ "const": "C4-1168-checkout"
3431
+ }
3432
+ },
3433
+ "required": [
3434
+ "text_id"
3435
+ ]
3436
+ },
3437
+ "then": {
3438
+ "properties": {
3439
+ "action_label": {
3440
+ "pattern": "^Pay \\S.* with Mollie$"
3441
+ }
3442
+ }
3443
+ }
3444
+ },
3445
+ {
3446
+ "if": {
3447
+ "properties": {
3448
+ "text_id": {
3449
+ "const": "C4-1168-pay-and-switch"
3450
+ }
3451
+ },
3452
+ "required": [
3453
+ "text_id"
3454
+ ]
3455
+ },
3456
+ "then": {
3457
+ "properties": {
3458
+ "action_label": {
3459
+ "pattern": "^Pay \\S.* and switch$"
3460
+ }
3461
+ }
3462
+ }
3463
+ },
3464
+ {
3465
+ "if": {
3466
+ "properties": {
3467
+ "text_id": {
3468
+ "const": "C4-1168-switch"
3469
+ }
3470
+ },
3471
+ "required": [
3472
+ "text_id"
3473
+ ]
3474
+ },
3475
+ "then": {
3476
+ "properties": {
3477
+ "action_label": {
3478
+ "pattern": "^Switch to \\S.*$"
3479
+ }
3480
+ }
3481
+ }
3482
+ },
3483
+ {
3484
+ "if": {
3485
+ "properties": {
3486
+ "text_id": {
3487
+ "const": "C4-1168-schedule-switch"
3488
+ }
3489
+ },
3490
+ "required": [
3491
+ "text_id"
3492
+ ]
3493
+ },
3494
+ "then": {
3495
+ "properties": {
3496
+ "action_label": {
3497
+ "const": "Switch to monthly at period end"
3498
+ }
3499
+ }
3500
+ }
3501
+ },
3502
+ {
3503
+ "if": {
3504
+ "properties": {
3505
+ "text_id": {
3506
+ "const": "C4-1168-schedule-downgrade"
3507
+ }
3508
+ },
3509
+ "required": [
3510
+ "text_id"
3511
+ ]
3512
+ },
3513
+ "then": {
3514
+ "properties": {
3515
+ "action_label": {
3516
+ "pattern": "^Schedule downgrade to \\S.*$"
3517
+ }
3518
+ }
3519
+ }
3520
+ },
3521
+ {
3522
+ "if": {
3523
+ "properties": {
3524
+ "text_id": {
3525
+ "const": "C4-1168-cancel"
3526
+ }
3527
+ },
3528
+ "required": [
3529
+ "text_id"
3530
+ ]
3531
+ },
3532
+ "then": {
3533
+ "properties": {
3534
+ "action_label": {
3535
+ "const": "Cancel at period end"
3536
+ }
3537
+ }
3538
+ }
3539
+ },
3540
+ {
3541
+ "if": {
3542
+ "properties": {
3543
+ "text_id": {
3544
+ "const": "C4-1168-keep-basic"
3545
+ }
3546
+ },
3547
+ "required": [
3548
+ "text_id"
3549
+ ]
3550
+ },
3551
+ "then": {
3552
+ "properties": {
3553
+ "action_label": {
3554
+ "const": "Delete the rest and stay on Basic"
3555
+ }
3556
+ }
3557
+ }
3558
+ }
3559
+ ]
3104
3560
  },
3105
3561
  "expires_at": {
3106
3562
  "type": "string",