@ogcio/building-blocks-sdk 0.1.5 → 0.1.6

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.
Files changed (64) hide show
  1. package/.azure/pipeline.yaml +16 -0
  2. package/.azure/templates/pnpm-install.yaml +1 -1
  3. package/README.md +1 -1
  4. package/biome.jsonc +2 -1
  5. package/dist/__tests__/client/utils/client-utils.test.js +6 -6
  6. package/dist/__tests__/client/utils/client-utils.test.js.map +1 -1
  7. package/dist/client/base-client.d.ts +4 -2
  8. package/dist/client/base-client.d.ts.map +1 -1
  9. package/dist/client/base-client.js +7 -1
  10. package/dist/client/base-client.js.map +1 -1
  11. package/dist/client/clients/featureFlags/index.d.ts.map +1 -1
  12. package/dist/client/clients/featureFlags/index.js +2 -2
  13. package/dist/client/clients/featureFlags/index.js.map +1 -1
  14. package/dist/client/clients/journey/index.d.ts +2 -2
  15. package/dist/client/clients/journey/index.d.ts.map +1 -1
  16. package/dist/client/clients/journey/index.js +21 -21
  17. package/dist/client/clients/journey/index.js.map +1 -1
  18. package/dist/client/clients/journey/schema.d.ts +1 -1
  19. package/dist/client/clients/journey/schema.d.ts.map +1 -1
  20. package/dist/client/clients/messaging/index.d.ts.map +1 -1
  21. package/dist/client/clients/messaging/index.js +29 -29
  22. package/dist/client/clients/messaging/index.js.map +1 -1
  23. package/dist/client/clients/payments/index.d.ts +64 -35
  24. package/dist/client/clients/payments/index.d.ts.map +1 -1
  25. package/dist/client/clients/payments/index.js +34 -25
  26. package/dist/client/clients/payments/index.js.map +1 -1
  27. package/dist/client/clients/payments/schema.d.ts +81 -18
  28. package/dist/client/clients/payments/schema.d.ts.map +1 -1
  29. package/dist/client/clients/profile/index.d.ts.map +1 -1
  30. package/dist/client/clients/profile/index.js +13 -13
  31. package/dist/client/clients/profile/index.js.map +1 -1
  32. package/dist/client/clients/scheduler/index.js +1 -1
  33. package/dist/client/clients/scheduler/index.js.map +1 -1
  34. package/dist/client/clients/upload/index.d.ts.map +1 -1
  35. package/dist/client/clients/upload/index.js +7 -7
  36. package/dist/client/clients/upload/index.js.map +1 -1
  37. package/dist/client/utils/client-utils.d.ts +3 -2
  38. package/dist/client/utils/client-utils.d.ts.map +1 -1
  39. package/dist/client/utils/client-utils.js +10 -3
  40. package/dist/client/utils/client-utils.js.map +1 -1
  41. package/dist/index.d.ts +2 -1
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +12 -12
  44. package/dist/index.js.map +1 -1
  45. package/dist/types/index.d.ts +16 -1
  46. package/dist/types/index.d.ts.map +1 -1
  47. package/dist/types/index.js.map +1 -1
  48. package/package.json +1 -1
  49. package/src/__tests__/client/utils/client-utils.test.ts +6 -6
  50. package/src/client/base-client.ts +14 -2
  51. package/src/client/clients/featureFlags/index.ts +5 -2
  52. package/src/client/clients/journey/index.ts +42 -42
  53. package/src/client/clients/journey/open-api-definition.json +41 -6
  54. package/src/client/clients/journey/schema.ts +1 -1
  55. package/src/client/clients/messaging/index.ts +58 -58
  56. package/src/client/clients/payments/index.ts +65 -50
  57. package/src/client/clients/payments/open-api-definition.json +176 -101
  58. package/src/client/clients/payments/schema.ts +81 -18
  59. package/src/client/clients/profile/index.ts +26 -26
  60. package/src/client/clients/scheduler/index.ts +2 -2
  61. package/src/client/clients/upload/index.ts +14 -14
  62. package/src/client/utils/client-utils.ts +20 -2
  63. package/src/index.ts +17 -12
  64. package/src/types/index.ts +18 -1
@@ -558,6 +558,7 @@
558
558
  "stepData": {
559
559
  "anyOf": [
560
560
  {
561
+ "additionalProperties": false,
561
562
  "type": "object",
562
563
  "properties": {
563
564
  "url": {
@@ -569,6 +570,7 @@
569
570
  ]
570
571
  },
571
572
  {
573
+ "additionalProperties": false,
572
574
  "type": "object",
573
575
  "properties": {
574
576
  "paymentRequestId": {
@@ -584,6 +586,7 @@
584
586
  ]
585
587
  },
586
588
  {
589
+ "additionalProperties": false,
587
590
  "type": "object",
588
591
  "properties": {
589
592
  "templateId": {
@@ -603,6 +606,7 @@
603
606
  ]
604
607
  },
605
608
  {
609
+ "additionalProperties": false,
606
610
  "type": "object",
607
611
  "properties": {
608
612
  "buttonLabel": {
@@ -2157,6 +2161,7 @@
2157
2161
  "stepData": {
2158
2162
  "anyOf": [
2159
2163
  {
2164
+ "additionalProperties": false,
2160
2165
  "type": "object",
2161
2166
  "properties": {
2162
2167
  "url": {
@@ -2168,6 +2173,7 @@
2168
2173
  ]
2169
2174
  },
2170
2175
  {
2176
+ "additionalProperties": false,
2171
2177
  "type": "object",
2172
2178
  "properties": {
2173
2179
  "paymentRequestId": {
@@ -2183,6 +2189,7 @@
2183
2189
  ]
2184
2190
  },
2185
2191
  {
2192
+ "additionalProperties": false,
2186
2193
  "type": "object",
2187
2194
  "properties": {
2188
2195
  "templateId": {
@@ -2202,6 +2209,7 @@
2202
2209
  ]
2203
2210
  },
2204
2211
  {
2212
+ "additionalProperties": false,
2205
2213
  "type": "object",
2206
2214
  "properties": {
2207
2215
  "buttonLabel": {
@@ -2572,9 +2580,15 @@
2572
2580
  "type": "object",
2573
2581
  "properties": {
2574
2582
  "stepData": {
2575
- "validator": "StepDataValidator",
2583
+ "validator": {
2584
+ "name": "StepDataValidator",
2585
+ "options": {
2586
+ "bypassRequired": false
2587
+ }
2588
+ },
2576
2589
  "anyOf": [
2577
2590
  {
2591
+ "additionalProperties": false,
2578
2592
  "type": "object",
2579
2593
  "properties": {
2580
2594
  "url": {
@@ -2586,6 +2600,7 @@
2586
2600
  ]
2587
2601
  },
2588
2602
  {
2603
+ "additionalProperties": false,
2589
2604
  "type": "object",
2590
2605
  "properties": {
2591
2606
  "paymentRequestId": {
@@ -2601,6 +2616,7 @@
2601
2616
  ]
2602
2617
  },
2603
2618
  {
2619
+ "additionalProperties": false,
2604
2620
  "type": "object",
2605
2621
  "properties": {
2606
2622
  "templateId": {
@@ -2620,6 +2636,7 @@
2620
2636
  ]
2621
2637
  },
2622
2638
  {
2639
+ "additionalProperties": false,
2623
2640
  "type": "object",
2624
2641
  "properties": {
2625
2642
  "buttonLabel": {
@@ -2752,6 +2769,7 @@
2752
2769
  "stepData": {
2753
2770
  "anyOf": [
2754
2771
  {
2772
+ "additionalProperties": false,
2755
2773
  "type": "object",
2756
2774
  "properties": {
2757
2775
  "url": {
@@ -2763,6 +2781,7 @@
2763
2781
  ]
2764
2782
  },
2765
2783
  {
2784
+ "additionalProperties": false,
2766
2785
  "type": "object",
2767
2786
  "properties": {
2768
2787
  "paymentRequestId": {
@@ -2778,6 +2797,7 @@
2778
2797
  ]
2779
2798
  },
2780
2799
  {
2800
+ "additionalProperties": false,
2781
2801
  "type": "object",
2782
2802
  "properties": {
2783
2803
  "templateId": {
@@ -2797,6 +2817,7 @@
2797
2817
  ]
2798
2818
  },
2799
2819
  {
2820
+ "additionalProperties": false,
2800
2821
  "type": "object",
2801
2822
  "properties": {
2802
2823
  "buttonLabel": {
@@ -3034,9 +3055,19 @@
3034
3055
  }
3035
3056
  ]
3036
3057
  },
3058
+ "configured": {
3059
+ "type": "boolean"
3060
+ },
3037
3061
  "stepData": {
3062
+ "validator": {
3063
+ "name": "StepDataValidator",
3064
+ "options": {
3065
+ "bypassRequired": true
3066
+ }
3067
+ },
3038
3068
  "anyOf": [
3039
3069
  {
3070
+ "additionalProperties": false,
3040
3071
  "type": "object",
3041
3072
  "properties": {
3042
3073
  "url": {
@@ -3048,6 +3079,7 @@
3048
3079
  ]
3049
3080
  },
3050
3081
  {
3082
+ "additionalProperties": false,
3051
3083
  "type": "object",
3052
3084
  "properties": {
3053
3085
  "paymentRequestId": {
@@ -3063,6 +3095,7 @@
3063
3095
  ]
3064
3096
  },
3065
3097
  {
3098
+ "additionalProperties": false,
3066
3099
  "type": "object",
3067
3100
  "properties": {
3068
3101
  "templateId": {
@@ -3082,6 +3115,7 @@
3082
3115
  ]
3083
3116
  },
3084
3117
  {
3118
+ "additionalProperties": false,
3085
3119
  "type": "object",
3086
3120
  "properties": {
3087
3121
  "buttonLabel": {
@@ -3101,16 +3135,13 @@
3101
3135
  "properties": {}
3102
3136
  }
3103
3137
  ]
3104
- },
3105
- "configured": {
3106
- "type": "boolean"
3107
3138
  }
3108
3139
  },
3109
3140
  "required": [
3110
3141
  "journeyId",
3111
3142
  "stepType",
3112
- "stepData",
3113
- "configured"
3143
+ "configured",
3144
+ "stepData"
3114
3145
  ]
3115
3146
  }
3116
3147
  }
@@ -3171,6 +3202,7 @@
3171
3202
  "stepData": {
3172
3203
  "anyOf": [
3173
3204
  {
3205
+ "additionalProperties": false,
3174
3206
  "type": "object",
3175
3207
  "properties": {
3176
3208
  "url": {
@@ -3182,6 +3214,7 @@
3182
3214
  ]
3183
3215
  },
3184
3216
  {
3217
+ "additionalProperties": false,
3185
3218
  "type": "object",
3186
3219
  "properties": {
3187
3220
  "paymentRequestId": {
@@ -3197,6 +3230,7 @@
3197
3230
  ]
3198
3231
  },
3199
3232
  {
3233
+ "additionalProperties": false,
3200
3234
  "type": "object",
3201
3235
  "properties": {
3202
3236
  "templateId": {
@@ -3216,6 +3250,7 @@
3216
3250
  ]
3217
3251
  },
3218
3252
  {
3253
+ "additionalProperties": false,
3219
3254
  "type": "object",
3220
3255
  "properties": {
3221
3256
  "buttonLabel": {
@@ -1289,6 +1289,7 @@ export interface paths {
1289
1289
  "application/json": {
1290
1290
  journeyId: string;
1291
1291
  stepType: "title" | "form" | "payment" | "messaging" | "complete";
1292
+ configured: boolean;
1292
1293
  stepData: {
1293
1294
  url: string;
1294
1295
  } | {
@@ -1302,7 +1303,6 @@ export interface paths {
1302
1303
  buttonLabel: string;
1303
1304
  returnUrl: string;
1304
1305
  } | Record<string, never>;
1305
- configured: boolean;
1306
1306
  };
1307
1307
  };
1308
1308
  };
@@ -41,8 +41,8 @@ export class Messaging extends BaseClient<paths> {
41
41
  },
42
42
  })
43
43
  .then(
44
- (response) => formatResponse(response),
45
- (reason) => formatError(reason),
44
+ (response) => formatResponse(response, this.serviceName, this.logger),
45
+ (reason) => formatError(reason, this.serviceName, this.logger),
46
46
  );
47
47
  }
48
48
 
@@ -60,8 +60,8 @@ export class Messaging extends BaseClient<paths> {
60
60
  },
61
61
  })
62
62
  .then(
63
- (response) => formatResponse(response),
64
- (reason) => formatError(reason),
63
+ (response) => formatResponse(response, this.serviceName, this.logger),
64
+ (reason) => formatError(reason, this.serviceName, this.logger),
65
65
  );
66
66
  }
67
67
 
@@ -73,8 +73,8 @@ export class Messaging extends BaseClient<paths> {
73
73
  params: { path: { messageId } },
74
74
  })
75
75
  .then(
76
- (response) => formatResponse(response),
77
- (reason) => formatError(reason),
76
+ (response) => formatResponse(response, this.serviceName, this.logger),
77
+ (reason) => formatError(reason, this.serviceName, this.logger),
78
78
  );
79
79
  }
80
80
 
@@ -86,8 +86,8 @@ export class Messaging extends BaseClient<paths> {
86
86
  body,
87
87
  })
88
88
  .then(
89
- (response) => formatResponse(response),
90
- (reason) => formatError(reason),
89
+ (response) => formatResponse(response, this.serviceName, this.logger),
90
+ (reason) => formatError(reason, this.serviceName, this.logger),
91
91
  );
92
92
  }
93
93
 
@@ -101,8 +101,8 @@ export class Messaging extends BaseClient<paths> {
101
101
  },
102
102
  })
103
103
  .then(
104
- (response) => formatResponse(response),
105
- (reason) => formatError(reason),
104
+ (response) => formatResponse(response, this.serviceName, this.logger),
105
+ (reason) => formatError(reason, this.serviceName, this.logger),
106
106
  );
107
107
  }
108
108
 
@@ -118,8 +118,8 @@ export class Messaging extends BaseClient<paths> {
118
118
  },
119
119
  })
120
120
  .then(
121
- (response) => formatResponse(response),
122
- (reason) => formatError(reason),
121
+ (response) => formatResponse(response, this.serviceName, this.logger),
122
+ (reason) => formatError(reason, this.serviceName, this.logger),
123
123
  );
124
124
  }
125
125
 
@@ -196,8 +196,8 @@ export class Messaging extends BaseClient<paths> {
196
196
  body: paths["/api/v1/templates/"]["post"]["requestBody"]["content"]["application/json"],
197
197
  ) {
198
198
  return this.client.POST("/api/v1/templates/", { body }).then(
199
- (response) => formatResponse(response),
200
- (reason) => formatError(reason),
199
+ (response) => formatResponse(response, this.serviceName, this.logger),
200
+ (reason) => formatError(reason, this.serviceName, this.logger),
201
201
  );
202
202
  }
203
203
 
@@ -211,8 +211,8 @@ export class Messaging extends BaseClient<paths> {
211
211
  body,
212
212
  })
213
213
  .then(
214
- (response) => formatResponse(response),
215
- (reason) => formatError(reason),
214
+ (response) => formatResponse(response, this.serviceName, this.logger),
215
+ (reason) => formatError(reason, this.serviceName, this.logger),
216
216
  );
217
217
  }
218
218
 
@@ -224,8 +224,8 @@ export class Messaging extends BaseClient<paths> {
224
224
  params: { path: { templateId } },
225
225
  })
226
226
  .then(
227
- (response) => formatResponse(response),
228
- (reason) => formatError(reason),
227
+ (response) => formatResponse(response, this.serviceName, this.logger),
228
+ (reason) => formatError(reason, this.serviceName, this.logger),
229
229
  );
230
230
  }
231
231
 
@@ -294,8 +294,8 @@ export class Messaging extends BaseClient<paths> {
294
294
  },
295
295
  })
296
296
  .then(
297
- (response) => formatResponse(response),
298
- (reason) => formatError(reason),
297
+ (response) => formatResponse(response, this.serviceName, this.logger),
298
+ (reason) => formatError(reason, this.serviceName, this.logger),
299
299
  );
300
300
  }
301
301
 
@@ -320,8 +320,8 @@ export class Messaging extends BaseClient<paths> {
320
320
  },
321
321
  })
322
322
  .then(
323
- (response) => formatResponse(response),
324
- (reason) => formatError(reason),
323
+ (response) => formatResponse(response, this.serviceName, this.logger),
324
+ (reason) => formatError(reason, this.serviceName, this.logger),
325
325
  );
326
326
  }
327
327
 
@@ -331,8 +331,8 @@ export class Messaging extends BaseClient<paths> {
331
331
  params: { path: { providerId } },
332
332
  })
333
333
  .then(
334
- (response) => formatResponse(response),
335
- (reason) => formatError(reason),
334
+ (response) => formatResponse(response, this.serviceName, this.logger),
335
+ (reason) => formatError(reason, this.serviceName, this.logger),
336
336
  );
337
337
  }
338
338
 
@@ -405,8 +405,8 @@ export class Messaging extends BaseClient<paths> {
405
405
  },
406
406
  })
407
407
  .then(
408
- (response) => formatResponse(response),
409
- (reason) => formatError(reason),
408
+ (response) => formatResponse(response, this.serviceName, this.logger),
409
+ (reason) => formatError(reason, this.serviceName, this.logger),
410
410
  );
411
411
  }
412
412
 
@@ -429,8 +429,8 @@ export class Messaging extends BaseClient<paths> {
429
429
  },
430
430
  })
431
431
  .then(
432
- (response) => formatResponse(response),
433
- (reason) => formatError(reason),
432
+ (response) => formatResponse(response, this.serviceName, this.logger),
433
+ (reason) => formatError(reason, this.serviceName, this.logger),
434
434
  );
435
435
  }
436
436
 
@@ -440,8 +440,8 @@ export class Messaging extends BaseClient<paths> {
440
440
  params: { path: { providerId } },
441
441
  })
442
442
  .then(
443
- (response) => formatResponse(response),
444
- (reason) => formatError(reason),
443
+ (response) => formatResponse(response, this.serviceName, this.logger),
444
+ (reason) => formatError(reason, this.serviceName, this.logger),
445
445
  );
446
446
  }
447
447
 
@@ -469,8 +469,8 @@ export class Messaging extends BaseClient<paths> {
469
469
  body: toImport.records,
470
470
  })
471
471
  .then(
472
- (response) => formatResponse(response),
473
- (reason) => formatError(reason),
472
+ (response) => formatResponse(response, this.serviceName, this.logger),
473
+ (reason) => formatError(reason, this.serviceName, this.logger),
474
474
  );
475
475
  }
476
476
 
@@ -480,8 +480,8 @@ export class Messaging extends BaseClient<paths> {
480
480
  parseAs: "blob",
481
481
  })
482
482
  .then(
483
- (response) => formatResponse(response),
484
- (reason) => formatError(reason),
483
+ (response) => formatResponse(response, this.serviceName, this.logger),
484
+ (reason) => formatError(reason, this.serviceName, this.logger),
485
485
  );
486
486
  }
487
487
 
@@ -498,8 +498,8 @@ export class Messaging extends BaseClient<paths> {
498
498
  },
499
499
  })
500
500
  .then(
501
- (response) => formatResponse(response),
502
- (reason) => formatError(reason),
501
+ (response) => formatResponse(response, this.serviceName, this.logger),
502
+ (reason) => formatError(reason, this.serviceName, this.logger),
503
503
  );
504
504
  }
505
505
 
@@ -520,8 +520,8 @@ export class Messaging extends BaseClient<paths> {
520
520
  },
521
521
  })
522
522
  .then(
523
- (response) => formatResponse(response),
524
- (reason) => formatError(reason),
523
+ (response) => formatResponse(response, this.serviceName, this.logger),
524
+ (reason) => formatError(reason, this.serviceName, this.logger),
525
525
  );
526
526
  }
527
527
 
@@ -531,8 +531,8 @@ export class Messaging extends BaseClient<paths> {
531
531
  params: { query: { importId, activeOnly: String(activeOnly) } },
532
532
  })
533
533
  .then(
534
- (response) => formatResponse(response),
535
- (reason) => formatError(reason),
534
+ (response) => formatResponse(response, this.serviceName, this.logger),
535
+ (reason) => formatError(reason, this.serviceName, this.logger),
536
536
  );
537
537
  }
538
538
 
@@ -546,8 +546,8 @@ export class Messaging extends BaseClient<paths> {
546
546
  },
547
547
  })
548
548
  .then(
549
- (response) => formatResponse(response),
550
- (reason) => formatError(reason),
549
+ (response) => formatResponse(response, this.serviceName, this.logger),
550
+ (reason) => formatError(reason, this.serviceName, this.logger),
551
551
  );
552
552
  }
553
553
 
@@ -557,8 +557,8 @@ export class Messaging extends BaseClient<paths> {
557
557
  params: { path: { organisationSettingId } },
558
558
  })
559
559
  .then(
560
- (response) => formatResponse(response),
561
- (reason) => formatError(reason),
560
+ (response) => formatResponse(response, this.serviceName, this.logger),
561
+ (reason) => formatError(reason, this.serviceName, this.logger),
562
562
  );
563
563
  }
564
564
 
@@ -572,8 +572,8 @@ export class Messaging extends BaseClient<paths> {
572
572
  params: { path: { organisationSettingId } },
573
573
  })
574
574
  .then(
575
- (response) => formatResponse(response),
576
- (reason) => formatError(reason),
575
+ (response) => formatResponse(response, this.serviceName, this.logger),
576
+ (reason) => formatError(reason, this.serviceName, this.logger),
577
577
  );
578
578
  }
579
579
 
@@ -585,8 +585,8 @@ export class Messaging extends BaseClient<paths> {
585
585
  },
586
586
  })
587
587
  .then(
588
- (response) => formatResponse(response),
589
- (reason) => formatError(reason),
588
+ (response) => formatResponse(response, this.serviceName, this.logger),
589
+ (reason) => formatError(reason, this.serviceName, this.logger),
590
590
  );
591
591
  }
592
592
 
@@ -596,8 +596,8 @@ export class Messaging extends BaseClient<paths> {
596
596
  params: { path: { eventId } },
597
597
  })
598
598
  .then(
599
- (response) => formatResponse(response),
600
- (reason) => formatError(reason),
599
+ (response) => formatResponse(response, this.serviceName, this.logger),
600
+ (reason) => formatError(reason, this.serviceName, this.logger),
601
601
  );
602
602
  }
603
603
 
@@ -611,8 +611,8 @@ export class Messaging extends BaseClient<paths> {
611
611
  },
612
612
  })
613
613
  .then(
614
- (response) => formatResponse(response),
615
- (reason) => formatError(reason),
614
+ (response) => formatResponse(response, this.serviceName, this.logger),
615
+ (reason) => formatError(reason, this.serviceName, this.logger),
616
616
  );
617
617
  }
618
618
 
@@ -632,8 +632,8 @@ export class Messaging extends BaseClient<paths> {
632
632
  },
633
633
  })
634
634
  .then(
635
- (response) => formatResponse(response),
636
- (reason) => formatError(reason),
635
+ (response) => formatResponse(response, this.serviceName, this.logger),
636
+ (reason) => formatError(reason, this.serviceName, this.logger),
637
637
  );
638
638
  }
639
639
 
@@ -651,8 +651,8 @@ export class Messaging extends BaseClient<paths> {
651
651
  },
652
652
  })
653
653
  .then(
654
- (response) => formatResponse(response),
655
- (reason) => formatError(reason),
654
+ (response) => formatResponse(response, this.serviceName, this.logger),
655
+ (reason) => formatError(reason, this.serviceName, this.logger),
656
656
  );
657
657
  }
658
658
 
@@ -670,8 +670,8 @@ export class Messaging extends BaseClient<paths> {
670
670
  },
671
671
  })
672
672
  .then(
673
- (response) => formatResponse(response),
674
- (reason) => formatError(reason),
673
+ (response) => formatResponse(response, this.serviceName, this.logger),
674
+ (reason) => formatError(reason, this.serviceName, this.logger),
675
675
  );
676
676
  }
677
677