@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.
@@ -958,11 +958,27 @@
958
958
  "properties": {
959
959
  "text_id": {
960
960
  "type": "string",
961
- "const": "DR-1374-draft-3-C.4"
961
+ "enum": [
962
+ "C4-1168-checkout",
963
+ "C4-1168-pay-and-switch",
964
+ "C4-1168-switch",
965
+ "C4-1168-schedule-switch",
966
+ "C4-1168-schedule-downgrade",
967
+ "C4-1168-cancel",
968
+ "C4-1168-keep-basic"
969
+ ],
970
+ "description": "The approved sentence this display shows, one per action."
962
971
  },
963
972
  "text": {
964
973
  "type": "string",
965
- "minLength": 1
974
+ "minLength": 1,
975
+ "pattern": "^By selecting “",
976
+ "description": "The consent sentence shown directly above the button, naming the button."
977
+ },
978
+ "action_label": {
979
+ "type": "string",
980
+ "minLength": 1,
981
+ "description": "The label of the one button that confirms this decision."
966
982
  },
967
983
  "terms": {
968
984
  "type": "object",
@@ -1022,10 +1038,146 @@
1022
1038
  "required": [
1023
1039
  "text_id",
1024
1040
  "text",
1041
+ "action_label",
1025
1042
  "terms",
1026
1043
  "dpa"
1027
1044
  ],
1028
- "additionalProperties": false
1045
+ "additionalProperties": false,
1046
+ "allOf": [
1047
+ {
1048
+ "if": {
1049
+ "properties": {
1050
+ "text_id": {
1051
+ "const": "C4-1168-checkout"
1052
+ }
1053
+ },
1054
+ "required": [
1055
+ "text_id"
1056
+ ]
1057
+ },
1058
+ "then": {
1059
+ "properties": {
1060
+ "action_label": {
1061
+ "pattern": "^Pay \\S.* with Mollie$"
1062
+ }
1063
+ }
1064
+ }
1065
+ },
1066
+ {
1067
+ "if": {
1068
+ "properties": {
1069
+ "text_id": {
1070
+ "const": "C4-1168-pay-and-switch"
1071
+ }
1072
+ },
1073
+ "required": [
1074
+ "text_id"
1075
+ ]
1076
+ },
1077
+ "then": {
1078
+ "properties": {
1079
+ "action_label": {
1080
+ "pattern": "^Pay \\S.* and switch$"
1081
+ }
1082
+ }
1083
+ }
1084
+ },
1085
+ {
1086
+ "if": {
1087
+ "properties": {
1088
+ "text_id": {
1089
+ "const": "C4-1168-switch"
1090
+ }
1091
+ },
1092
+ "required": [
1093
+ "text_id"
1094
+ ]
1095
+ },
1096
+ "then": {
1097
+ "properties": {
1098
+ "action_label": {
1099
+ "pattern": "^Switch to \\S.*$"
1100
+ }
1101
+ }
1102
+ }
1103
+ },
1104
+ {
1105
+ "if": {
1106
+ "properties": {
1107
+ "text_id": {
1108
+ "const": "C4-1168-schedule-switch"
1109
+ }
1110
+ },
1111
+ "required": [
1112
+ "text_id"
1113
+ ]
1114
+ },
1115
+ "then": {
1116
+ "properties": {
1117
+ "action_label": {
1118
+ "const": "Switch to monthly at period end"
1119
+ }
1120
+ }
1121
+ }
1122
+ },
1123
+ {
1124
+ "if": {
1125
+ "properties": {
1126
+ "text_id": {
1127
+ "const": "C4-1168-schedule-downgrade"
1128
+ }
1129
+ },
1130
+ "required": [
1131
+ "text_id"
1132
+ ]
1133
+ },
1134
+ "then": {
1135
+ "properties": {
1136
+ "action_label": {
1137
+ "pattern": "^Schedule downgrade to \\S.*$"
1138
+ }
1139
+ }
1140
+ }
1141
+ },
1142
+ {
1143
+ "if": {
1144
+ "properties": {
1145
+ "text_id": {
1146
+ "const": "C4-1168-cancel"
1147
+ }
1148
+ },
1149
+ "required": [
1150
+ "text_id"
1151
+ ]
1152
+ },
1153
+ "then": {
1154
+ "properties": {
1155
+ "action_label": {
1156
+ "const": "Cancel at period end"
1157
+ }
1158
+ }
1159
+ }
1160
+ },
1161
+ {
1162
+ "if": {
1163
+ "properties": {
1164
+ "text_id": {
1165
+ "const": "C4-1168-keep-basic"
1166
+ }
1167
+ },
1168
+ "required": [
1169
+ "text_id"
1170
+ ]
1171
+ },
1172
+ "then": {
1173
+ "properties": {
1174
+ "action_label": {
1175
+ "const": "Delete the rest and stay on Basic"
1176
+ }
1177
+ }
1178
+ }
1179
+ }
1180
+ ]
1029
1181
  },
1030
1182
  "expires_at": {
1031
1183
  "type": "string",
@@ -2005,11 +2157,27 @@
2005
2157
  "properties": {
2006
2158
  "text_id": {
2007
2159
  "type": "string",
2008
- "const": "DR-1374-draft-3-C.4"
2160
+ "enum": [
2161
+ "C4-1168-checkout",
2162
+ "C4-1168-pay-and-switch",
2163
+ "C4-1168-switch",
2164
+ "C4-1168-schedule-switch",
2165
+ "C4-1168-schedule-downgrade",
2166
+ "C4-1168-cancel",
2167
+ "C4-1168-keep-basic"
2168
+ ],
2169
+ "description": "The approved sentence this display shows, one per action."
2009
2170
  },
2010
2171
  "text": {
2011
2172
  "type": "string",
2012
- "minLength": 1
2173
+ "minLength": 1,
2174
+ "pattern": "^By selecting “",
2175
+ "description": "The consent sentence shown directly above the button, naming the button."
2176
+ },
2177
+ "action_label": {
2178
+ "type": "string",
2179
+ "minLength": 1,
2180
+ "description": "The label of the one button that confirms this decision."
2013
2181
  },
2014
2182
  "terms": {
2015
2183
  "type": "object",
@@ -2069,10 +2237,146 @@
2069
2237
  "required": [
2070
2238
  "text_id",
2071
2239
  "text",
2240
+ "action_label",
2072
2241
  "terms",
2073
2242
  "dpa"
2074
2243
  ],
2075
- "additionalProperties": false
2244
+ "additionalProperties": false,
2245
+ "allOf": [
2246
+ {
2247
+ "if": {
2248
+ "properties": {
2249
+ "text_id": {
2250
+ "const": "C4-1168-checkout"
2251
+ }
2252
+ },
2253
+ "required": [
2254
+ "text_id"
2255
+ ]
2256
+ },
2257
+ "then": {
2258
+ "properties": {
2259
+ "action_label": {
2260
+ "pattern": "^Pay \\S.* with Mollie$"
2261
+ }
2262
+ }
2263
+ }
2264
+ },
2265
+ {
2266
+ "if": {
2267
+ "properties": {
2268
+ "text_id": {
2269
+ "const": "C4-1168-pay-and-switch"
2270
+ }
2271
+ },
2272
+ "required": [
2273
+ "text_id"
2274
+ ]
2275
+ },
2276
+ "then": {
2277
+ "properties": {
2278
+ "action_label": {
2279
+ "pattern": "^Pay \\S.* and switch$"
2280
+ }
2281
+ }
2282
+ }
2283
+ },
2284
+ {
2285
+ "if": {
2286
+ "properties": {
2287
+ "text_id": {
2288
+ "const": "C4-1168-switch"
2289
+ }
2290
+ },
2291
+ "required": [
2292
+ "text_id"
2293
+ ]
2294
+ },
2295
+ "then": {
2296
+ "properties": {
2297
+ "action_label": {
2298
+ "pattern": "^Switch to \\S.*$"
2299
+ }
2300
+ }
2301
+ }
2302
+ },
2303
+ {
2304
+ "if": {
2305
+ "properties": {
2306
+ "text_id": {
2307
+ "const": "C4-1168-schedule-switch"
2308
+ }
2309
+ },
2310
+ "required": [
2311
+ "text_id"
2312
+ ]
2313
+ },
2314
+ "then": {
2315
+ "properties": {
2316
+ "action_label": {
2317
+ "const": "Switch to monthly at period end"
2318
+ }
2319
+ }
2320
+ }
2321
+ },
2322
+ {
2323
+ "if": {
2324
+ "properties": {
2325
+ "text_id": {
2326
+ "const": "C4-1168-schedule-downgrade"
2327
+ }
2328
+ },
2329
+ "required": [
2330
+ "text_id"
2331
+ ]
2332
+ },
2333
+ "then": {
2334
+ "properties": {
2335
+ "action_label": {
2336
+ "pattern": "^Schedule downgrade to \\S.*$"
2337
+ }
2338
+ }
2339
+ }
2340
+ },
2341
+ {
2342
+ "if": {
2343
+ "properties": {
2344
+ "text_id": {
2345
+ "const": "C4-1168-cancel"
2346
+ }
2347
+ },
2348
+ "required": [
2349
+ "text_id"
2350
+ ]
2351
+ },
2352
+ "then": {
2353
+ "properties": {
2354
+ "action_label": {
2355
+ "const": "Cancel at period end"
2356
+ }
2357
+ }
2358
+ }
2359
+ },
2360
+ {
2361
+ "if": {
2362
+ "properties": {
2363
+ "text_id": {
2364
+ "const": "C4-1168-keep-basic"
2365
+ }
2366
+ },
2367
+ "required": [
2368
+ "text_id"
2369
+ ]
2370
+ },
2371
+ "then": {
2372
+ "properties": {
2373
+ "action_label": {
2374
+ "const": "Delete the rest and stay on Basic"
2375
+ }
2376
+ }
2377
+ }
2378
+ }
2379
+ ]
2076
2380
  },
2077
2381
  "expires_at": {
2078
2382
  "type": "string",
@@ -3052,11 +3356,27 @@
3052
3356
  "properties": {
3053
3357
  "text_id": {
3054
3358
  "type": "string",
3055
- "const": "DR-1374-draft-3-C.4"
3359
+ "enum": [
3360
+ "C4-1168-checkout",
3361
+ "C4-1168-pay-and-switch",
3362
+ "C4-1168-switch",
3363
+ "C4-1168-schedule-switch",
3364
+ "C4-1168-schedule-downgrade",
3365
+ "C4-1168-cancel",
3366
+ "C4-1168-keep-basic"
3367
+ ],
3368
+ "description": "The approved sentence this display shows, one per action."
3056
3369
  },
3057
3370
  "text": {
3058
3371
  "type": "string",
3059
- "minLength": 1
3372
+ "minLength": 1,
3373
+ "pattern": "^By selecting “",
3374
+ "description": "The consent sentence shown directly above the button, naming the button."
3375
+ },
3376
+ "action_label": {
3377
+ "type": "string",
3378
+ "minLength": 1,
3379
+ "description": "The label of the one button that confirms this decision."
3060
3380
  },
3061
3381
  "terms": {
3062
3382
  "type": "object",
@@ -3116,10 +3436,146 @@
3116
3436
  "required": [
3117
3437
  "text_id",
3118
3438
  "text",
3439
+ "action_label",
3119
3440
  "terms",
3120
3441
  "dpa"
3121
3442
  ],
3122
- "additionalProperties": false
3443
+ "additionalProperties": false,
3444
+ "allOf": [
3445
+ {
3446
+ "if": {
3447
+ "properties": {
3448
+ "text_id": {
3449
+ "const": "C4-1168-checkout"
3450
+ }
3451
+ },
3452
+ "required": [
3453
+ "text_id"
3454
+ ]
3455
+ },
3456
+ "then": {
3457
+ "properties": {
3458
+ "action_label": {
3459
+ "pattern": "^Pay \\S.* with Mollie$"
3460
+ }
3461
+ }
3462
+ }
3463
+ },
3464
+ {
3465
+ "if": {
3466
+ "properties": {
3467
+ "text_id": {
3468
+ "const": "C4-1168-pay-and-switch"
3469
+ }
3470
+ },
3471
+ "required": [
3472
+ "text_id"
3473
+ ]
3474
+ },
3475
+ "then": {
3476
+ "properties": {
3477
+ "action_label": {
3478
+ "pattern": "^Pay \\S.* and switch$"
3479
+ }
3480
+ }
3481
+ }
3482
+ },
3483
+ {
3484
+ "if": {
3485
+ "properties": {
3486
+ "text_id": {
3487
+ "const": "C4-1168-switch"
3488
+ }
3489
+ },
3490
+ "required": [
3491
+ "text_id"
3492
+ ]
3493
+ },
3494
+ "then": {
3495
+ "properties": {
3496
+ "action_label": {
3497
+ "pattern": "^Switch to \\S.*$"
3498
+ }
3499
+ }
3500
+ }
3501
+ },
3502
+ {
3503
+ "if": {
3504
+ "properties": {
3505
+ "text_id": {
3506
+ "const": "C4-1168-schedule-switch"
3507
+ }
3508
+ },
3509
+ "required": [
3510
+ "text_id"
3511
+ ]
3512
+ },
3513
+ "then": {
3514
+ "properties": {
3515
+ "action_label": {
3516
+ "const": "Switch to monthly at period end"
3517
+ }
3518
+ }
3519
+ }
3520
+ },
3521
+ {
3522
+ "if": {
3523
+ "properties": {
3524
+ "text_id": {
3525
+ "const": "C4-1168-schedule-downgrade"
3526
+ }
3527
+ },
3528
+ "required": [
3529
+ "text_id"
3530
+ ]
3531
+ },
3532
+ "then": {
3533
+ "properties": {
3534
+ "action_label": {
3535
+ "pattern": "^Schedule downgrade to \\S.*$"
3536
+ }
3537
+ }
3538
+ }
3539
+ },
3540
+ {
3541
+ "if": {
3542
+ "properties": {
3543
+ "text_id": {
3544
+ "const": "C4-1168-cancel"
3545
+ }
3546
+ },
3547
+ "required": [
3548
+ "text_id"
3549
+ ]
3550
+ },
3551
+ "then": {
3552
+ "properties": {
3553
+ "action_label": {
3554
+ "const": "Cancel at period end"
3555
+ }
3556
+ }
3557
+ }
3558
+ },
3559
+ {
3560
+ "if": {
3561
+ "properties": {
3562
+ "text_id": {
3563
+ "const": "C4-1168-keep-basic"
3564
+ }
3565
+ },
3566
+ "required": [
3567
+ "text_id"
3568
+ ]
3569
+ },
3570
+ "then": {
3571
+ "properties": {
3572
+ "action_label": {
3573
+ "const": "Delete the rest and stay on Basic"
3574
+ }
3575
+ }
3576
+ }
3577
+ }
3578
+ ]
3123
3579
  },
3124
3580
  "expires_at": {
3125
3581
  "type": "string",