@ogcio/building-blocks-sdk 0.1.17 → 0.2.0

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 (37) hide show
  1. package/.gitleaksignore +2 -0
  2. package/.release-please-manifest.json +1 -1
  3. package/CHANGELOG.md +18 -0
  4. package/dist/client/clients/featureFlags/schema.d.ts +205 -63
  5. package/dist/client/clients/featureFlags/schema.d.ts.map +1 -1
  6. package/dist/client/clients/messaging/index.d.ts +2 -1835
  7. package/dist/client/clients/messaging/index.d.ts.map +1 -1
  8. package/dist/client/clients/messaging/index.js +3 -179
  9. package/dist/client/clients/messaging/index.js.map +1 -1
  10. package/dist/client/clients/messaging/schema.d.ts +2763 -2750
  11. package/dist/client/clients/messaging/schema.d.ts.map +1 -1
  12. package/dist/client/clients/payments/index.d.ts +240 -1
  13. package/dist/client/clients/payments/index.d.ts.map +1 -1
  14. package/dist/client/clients/payments/index.js +23 -0
  15. package/dist/client/clients/payments/index.js.map +1 -1
  16. package/dist/client/clients/payments/schema.d.ts +256 -1
  17. package/dist/client/clients/payments/schema.d.ts.map +1 -1
  18. package/dist/client/clients/profile/index.d.ts +852 -440
  19. package/dist/client/clients/profile/index.d.ts.map +1 -1
  20. package/dist/client/clients/profile/index.js +88 -54
  21. package/dist/client/clients/profile/index.js.map +1 -1
  22. package/dist/client/clients/profile/schema.d.ts +1237 -1114
  23. package/dist/client/clients/profile/schema.d.ts.map +1 -1
  24. package/dist/clients-configurations/clients-configuration.json +5 -4
  25. package/package.json +1 -1
  26. package/src/client/clients/featureFlags/open-api-definition.json +184 -95
  27. package/src/client/clients/featureFlags/schema.ts +205 -63
  28. package/src/client/clients/messaging/index.ts +2 -278
  29. package/src/client/clients/messaging/open-api-definition.json +30 -18
  30. package/src/client/clients/messaging/schema.ts +2763 -2750
  31. package/src/client/clients/payments/index.ts +37 -0
  32. package/src/client/clients/payments/open-api-definition.json +773 -185
  33. package/src/client/clients/payments/schema.ts +256 -1
  34. package/src/client/clients/profile/index.ts +140 -84
  35. package/src/client/clients/profile/open-api-definition.json +1825 -1323
  36. package/src/client/clients/profile/schema.ts +1237 -1114
  37. package/src/clients-configurations/clients-configuration.json +5 -4
package/.gitleaksignore CHANGED
@@ -3,3 +3,5 @@
3
3
  /src/src/client/clients/featureFlags/schema.ts:generic-api-key:9202
4
4
  /src/src/client/clients/featureFlags/open-api-definition.json:generic-api-key:9285
5
5
  /src/src/client/clients/featureFlags/schema.ts:generic-api-key:9389
6
+ /src/src/client/clients/featureFlags/schema.ts:generic-api-key:9437
7
+ /src/src/client/clients/featureFlags/open-api-definition.json:generic-api-key:9245
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.1.17"
2
+ ".": "0.2.0"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.0](https://github.com/ogcio/building-blocks-sdk/compare/@ogcio/building-blocks-sdk@v0.1.18...@ogcio/building-blocks-sdk@v0.2.0) (2025-01-22)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * Moved to the new profile apis and removed imports from messaging ([#108](https://github.com/ogcio/building-blocks-sdk/issues/108))
9
+
10
+ ### Features
11
+
12
+ * Moved to the new profile apis and removed imports from messaging ([#108](https://github.com/ogcio/building-blocks-sdk/issues/108)) ([2aff0e1](https://github.com/ogcio/building-blocks-sdk/commit/2aff0e1807c061a233d064f0c9a2080c9b0e78e0))
13
+
14
+ ## [0.1.18](https://github.com/ogcio/building-blocks-sdk/compare/@ogcio/building-blocks-sdk@v0.1.17...@ogcio/building-blocks-sdk@v0.1.18) (2025-01-20)
15
+
16
+
17
+ ### Features
18
+
19
+ * validate transaction amount ([#114](https://github.com/ogcio/building-blocks-sdk/issues/114)) ([dabb99a](https://github.com/ogcio/building-blocks-sdk/commit/dabb99add732cf3ff24412ca764a2b9268057c1d))
20
+
3
21
  ## [0.1.17](https://github.com/ogcio/building-blocks-sdk/compare/@ogcio/building-blocks-sdk@v0.1.16...@ogcio/building-blocks-sdk@v0.1.17) (2025-01-17)
4
22
 
5
23
 
@@ -512,6 +512,26 @@ export interface paths {
512
512
  patch?: never;
513
513
  trace?: never;
514
514
  };
515
+ "/api/admin/licensed-users": {
516
+ parameters: {
517
+ query?: never;
518
+ header?: never;
519
+ path?: never;
520
+ cookie?: never;
521
+ };
522
+ /**
523
+ * Retrieves all licensed users data.
524
+ * @description Fetches an array of licensed users with date and count.
525
+ */
526
+ get: operations["getAllLicensedUsers"];
527
+ put?: never;
528
+ post?: never;
529
+ delete?: never;
530
+ options?: never;
531
+ head?: never;
532
+ patch?: never;
533
+ trace?: never;
534
+ };
515
535
  "/health": {
516
536
  parameters: {
517
537
  query?: never;
@@ -1376,6 +1396,26 @@ export interface paths {
1376
1396
  patch?: never;
1377
1397
  trace?: never;
1378
1398
  };
1399
+ "/api/admin/ui-config/cors": {
1400
+ parameters: {
1401
+ query?: never;
1402
+ header?: never;
1403
+ path?: never;
1404
+ cookie?: never;
1405
+ };
1406
+ get?: never;
1407
+ put?: never;
1408
+ /**
1409
+ * Sets allowed CORS origins
1410
+ * @description Sets Cross-Origin Resource Sharing headers for Frontend SDK API.
1411
+ */
1412
+ post: operations["setCors"];
1413
+ delete?: never;
1414
+ options?: never;
1415
+ head?: never;
1416
+ patch?: never;
1417
+ trace?: never;
1418
+ };
1379
1419
  "/api/admin/context": {
1380
1420
  parameters: {
1381
1421
  query?: never;
@@ -1448,6 +1488,46 @@ export interface paths {
1448
1488
  patch?: never;
1449
1489
  trace?: never;
1450
1490
  };
1491
+ "/api/admin/context/{contextField}/legal-values": {
1492
+ parameters: {
1493
+ query?: never;
1494
+ header?: never;
1495
+ path?: never;
1496
+ cookie?: never;
1497
+ };
1498
+ get?: never;
1499
+ put?: never;
1500
+ /**
1501
+ * Add or update legal value for the context field
1502
+ * @description Endpoint that allows adding or updating a single custom context field legal value. If the legal value already exists, it will be updated with the new description
1503
+ */
1504
+ post: operations["updateContextFieldLegalValue"];
1505
+ delete?: never;
1506
+ options?: never;
1507
+ head?: never;
1508
+ patch?: never;
1509
+ trace?: never;
1510
+ };
1511
+ "/api/admin/context/{contextField}/legal-values/{legalValue}": {
1512
+ parameters: {
1513
+ query?: never;
1514
+ header?: never;
1515
+ path?: never;
1516
+ cookie?: never;
1517
+ };
1518
+ get?: never;
1519
+ put?: never;
1520
+ post?: never;
1521
+ /**
1522
+ * Delete legal value for the context field
1523
+ * @description Removes the specified custom context field legal value. Does not validate that the legal value is not in use and does not remove usage from constraints that use it.
1524
+ */
1525
+ delete: operations["deleteContextFieldLegalValue"];
1526
+ options?: never;
1527
+ head?: never;
1528
+ patch?: never;
1529
+ trace?: never;
1530
+ };
1451
1531
  "/api/admin/context/validate": {
1452
1532
  parameters: {
1453
1533
  query?: never;
@@ -2445,7 +2525,7 @@ export interface paths {
2445
2525
  put?: never;
2446
2526
  /**
2447
2527
  * Mark features as stale / not stale
2448
- * @description This endpoint marks the provided list of features as either [stale](https://docs.getunleash.io/reference/technical-debt#stale-and-potentially-stale-toggles) or not stale depending on the request body you send. Any provided features that don't exist are ignored.
2528
+ * @description This endpoint marks the provided list of features as either [stale](https://docs.getunleash.io/reference/technical-debt#stale-and-potentially-stale-flags) or not stale depending on the request body you send. Any provided features that don't exist are ignored.
2449
2529
  */
2450
2530
  post: operations["staleFeatures"];
2451
2531
  delete?: never;
@@ -2648,7 +2728,7 @@ export interface paths {
2648
2728
  /**
2649
2729
  * Get a health report for a project.
2650
2730
  * @deprecated
2651
- * @description This endpoint returns a health report for the specified project. This data is used for [the technical debt dashboard](https://docs.getunleash.io/reference/technical-debt#the-technical-debt-dashboard)
2731
+ * @description This endpoint returns a health report for the specified project. This data is used for [the technical debt insights](https://docs.getunleash.io/reference/technical-debt)
2652
2732
  */
2653
2733
  get: operations["getProjectHealthReport"];
2654
2734
  put?: never;
@@ -3549,7 +3629,7 @@ export interface paths {
3549
3629
  patch?: never;
3550
3630
  trace?: never;
3551
3631
  };
3552
- "/api/client/features/delta": {
3632
+ "/api/client/delta": {
3553
3633
  parameters: {
3554
3634
  query?: never;
3555
3635
  header?: never;
@@ -4456,49 +4536,6 @@ export interface components {
4456
4536
  invalidContextProperties?: string[];
4457
4537
  };
4458
4538
  };
4459
- /** @description Describes an Unleash AI chat message. */
4460
- aiChatMessageSchema: {
4461
- /**
4462
- * @description The role of the message sender.
4463
- * @example user
4464
- * @enum {string}
4465
- */
4466
- role: "system" | "user" | "assistant";
4467
- /**
4468
- * @description The message content.
4469
- * @example What is your purpose?
4470
- */
4471
- content: string;
4472
- };
4473
- /** @description Describes a new Unleash AI chat message sent by the user. */
4474
- aiChatNewMessageSchema: {
4475
- /**
4476
- * @description The message content.
4477
- * @example What is your purpose?
4478
- */
4479
- message: string;
4480
- };
4481
- /** @description Describes an Unleash AI chat. */
4482
- aiChatSchema: {
4483
- /**
4484
- * @description The chat's ID. Chat IDs are incrementing integers. In other words, a more recently created chat will always have a higher ID than an older one. This ID is represented as a string since it is a BigInt.
4485
- * @example 7
4486
- */
4487
- id: string;
4488
- /**
4489
- * @description The ID of the user that the chat belongs to.
4490
- * @example 7
4491
- */
4492
- userId: number;
4493
- /**
4494
- * Format: date-time
4495
- * @description The date and time of when the chat was created.
4496
- * @example 2023-12-27T13:37:00+01:00
4497
- */
4498
- createdAt: string;
4499
- /** @description The messages exchanged between the user and the Unleash AI. */
4500
- messages: components["schemas"]["aiChatMessageSchema"][];
4501
- };
4502
4539
  /** @description An overview of an [Unleash API token](https://docs.getunleash.io/reference/api-tokens-and-client-keys). */
4503
4540
  apiTokenSchema: {
4504
4541
  /**
@@ -4583,7 +4620,7 @@ export interface components {
4583
4620
  * @description An SDK version identifier. Usually formatted as "unleash-client-<language>:<version>"
4584
4621
  * @example unleash-client-java:7.0.0
4585
4622
  */
4586
- sdkVersion?: string;
4623
+ sdkVersion?: string | null;
4587
4624
  /**
4588
4625
  * @description An IP address identifying the instance of the application running the SDK
4589
4626
  * @example 192.168.0.1
@@ -5049,6 +5086,17 @@ export interface components {
5049
5086
  /** @description Feature dependencies for this flag */
5050
5087
  dependencies?: components["schemas"]["dependentFeatureSchema"][];
5051
5088
  };
5089
+ /** @description Schema for delta updates of feature configurations. */
5090
+ clientFeaturesDeltaSchema: {
5091
+ /** @description A list of updated feature configurations. */
5092
+ updated: components["schemas"]["clientFeatureSchema"][];
5093
+ /** @description The revision ID of the delta update. */
5094
+ revisionId: number;
5095
+ /** @description A list of feature names that were removed. */
5096
+ removed: string[];
5097
+ /** @description A list of [Segments](https://docs.getunleash.io/reference/segments) configured for this Unleash instance */
5098
+ segments?: components["schemas"]["clientSegmentSchema"][];
5099
+ };
5052
5100
  /** @description Query parameters active for a client features request */
5053
5101
  clientFeaturesQuerySchema: {
5054
5102
  /**
@@ -6036,7 +6084,7 @@ export interface components {
6036
6084
  */
6037
6085
  members?: number;
6038
6086
  /**
6039
- * @description An indicator of the [project's health](https://docs.getunleash.io/reference/technical-debt#health-rating) on a scale from 0 to 100
6087
+ * @description An indicator of the [project's health](https://docs.getunleash.io/reference/technical-debt#project-status) on a scale from 0 to 100
6040
6088
  * @example 50
6041
6089
  */
6042
6090
  health?: number;
@@ -6328,7 +6376,7 @@ export interface components {
6328
6376
  * "impressionData": true
6329
6377
  * }
6330
6378
  */
6331
- data?: Record<string, never>;
6379
+ data?: Record<string, never> | null;
6332
6380
  /**
6333
6381
  * @description Data relating to the previous state of the event's subject.
6334
6382
  * @example {
@@ -6343,7 +6391,7 @@ export interface components {
6343
6391
  * "impressionData": true
6344
6392
  * }
6345
6393
  */
6346
- preData?: Record<string, never>;
6394
+ preData?: Record<string, never> | null;
6347
6395
  /** @description Any tags related to the event, if applicable. */
6348
6396
  tags?: components["schemas"]["tagSchema"][] | null;
6349
6397
  /** @description The concise, human-readable name of the event. */
@@ -7530,7 +7578,7 @@ export interface components {
7530
7578
  */
7531
7579
  members: number;
7532
7580
  /**
7533
- * @description The overall [health rating](https://docs.getunleash.io/reference/technical-debt#health-rating) of the project.
7581
+ * @description The overall [health rating](https://docs.getunleash.io/reference/technical-debt#project-status) of the project.
7534
7582
  * @example 95
7535
7583
  */
7536
7584
  health: number;
@@ -7598,7 +7646,7 @@ export interface components {
7598
7646
  */
7599
7647
  members: number;
7600
7648
  /**
7601
- * @description The overall [health rating](https://docs.getunleash.io/reference/technical-debt#health-rating) of the project.
7649
+ * @description The overall [health rating](https://docs.getunleash.io/reference/technical-debt#project-status) of the project.
7602
7650
  * @example 95
7603
7651
  */
7604
7652
  health: number;
@@ -8402,7 +8450,7 @@ export interface components {
8402
8450
  */
8403
8451
  name: string;
8404
8452
  /**
8405
- * @description An indicator of the [project's health](https://docs.getunleash.io/reference/technical-debt#health-rating) on a scale from 0 to 100
8453
+ * @description An indicator of the [project's health](https://docs.getunleash.io/reference/technical-debt#project-status) on a scale from 0 to 100
8406
8454
  * @example 50
8407
8455
  */
8408
8456
  health: number;
@@ -8891,7 +8939,7 @@ export interface components {
8891
8939
  /** @description Health summary of the project */
8892
8940
  health: {
8893
8941
  /**
8894
- * @description An indicator of the [project's health](https://docs.getunleash.io/reference/technical-debt#health-rating) on a scale from 0 to 100
8942
+ * @description An indicator of the [project's health](https://docs.getunleash.io/reference/technical-debt#project-status) on a scale from 0 to 100
8895
8943
  * @example 95
8896
8944
  */
8897
8945
  rating: number;
@@ -8971,7 +9019,7 @@ export interface components {
8971
9019
  */
8972
9020
  members?: number;
8973
9021
  /**
8974
- * @description An indicator of the [project's health](https://docs.getunleash.io/reference/technical-debt#health-rating) on a scale from 0 to 100
9022
+ * @description An indicator of the [project's health](https://docs.getunleash.io/reference/technical-debt#project-status) on a scale from 0 to 100
8975
9023
  * @example 50
8976
9024
  */
8977
9025
  health?: number;
@@ -9060,7 +9108,7 @@ export interface components {
9060
9108
  */
9061
9109
  description?: string | null;
9062
9110
  /**
9063
- * @description An indicator of the [project's health](https://docs.getunleash.io/reference/technical-debt#health-rating) on a scale from 0 to 100
9111
+ * @description An indicator of the [project's health](https://docs.getunleash.io/reference/technical-debt#project-status) on a scale from 0 to 100
9064
9112
  * @example 50
9065
9113
  */
9066
9114
  health?: number;
@@ -9778,6 +9826,16 @@ export interface components {
9778
9826
  /** @description A list of segments */
9779
9827
  segments?: components["schemas"]["adminSegmentSchema"][];
9780
9828
  };
9829
+ /** @description Unleash CORS configuration. */
9830
+ setCorsSchema: {
9831
+ /**
9832
+ * @description The list of origins that the front-end API should accept requests from.
9833
+ * @example [
9834
+ * "*"
9835
+ * ]
9836
+ */
9837
+ frontendApiOrigins?: string[];
9838
+ };
9781
9839
  /** @description An array of strategies with their new sort order */
9782
9840
  setStrategySortOrderSchema: {
9783
9841
  /**
@@ -10205,11 +10263,6 @@ export interface components {
10205
10263
  * @example false
10206
10264
  */
10207
10265
  samlConfiguredThroughEnv?: boolean;
10208
- /**
10209
- * @description Whether Unleash AI is available.
10210
- * @example false
10211
- */
10212
- unleashAIAvailable?: boolean;
10213
10266
  /**
10214
10267
  * @description The maximum number of sessions that a user has.
10215
10268
  * @example 10
@@ -17793,6 +17846,26 @@ export interface operations {
17793
17846
  };
17794
17847
  };
17795
17848
  };
17849
+ getAllLicensedUsers: {
17850
+ parameters: {
17851
+ query?: never;
17852
+ header?: never;
17853
+ path?: never;
17854
+ cookie?: never;
17855
+ };
17856
+ requestBody?: never;
17857
+ responses: {
17858
+ /** @description licensedUsersSchema */
17859
+ 200: {
17860
+ headers: {
17861
+ [name: string]: unknown;
17862
+ };
17863
+ content: {
17864
+ "application/json": components["schemas"]["licensedUsersSchema"];
17865
+ };
17866
+ };
17867
+ };
17868
+ };
17796
17869
  getHealth: {
17797
17870
  parameters: {
17798
17871
  query?: never;
@@ -21574,6 +21647,29 @@ export interface operations {
21574
21647
  };
21575
21648
  };
21576
21649
  };
21650
+ setCors: {
21651
+ parameters: {
21652
+ query?: never;
21653
+ header?: never;
21654
+ path?: never;
21655
+ cookie?: never;
21656
+ };
21657
+ /** @description setCorsSchema */
21658
+ requestBody: {
21659
+ content: {
21660
+ "application/json": components["schemas"]["setCorsSchema"];
21661
+ };
21662
+ };
21663
+ responses: {
21664
+ /** @description This response has no body. */
21665
+ 204: {
21666
+ headers: {
21667
+ [name: string]: unknown;
21668
+ };
21669
+ content?: never;
21670
+ };
21671
+ };
21672
+ };
21577
21673
  getContextFields: {
21578
21674
  parameters: {
21579
21675
  query?: never;
@@ -21735,6 +21831,52 @@ export interface operations {
21735
21831
  };
21736
21832
  };
21737
21833
  };
21834
+ updateContextFieldLegalValue: {
21835
+ parameters: {
21836
+ query?: never;
21837
+ header?: never;
21838
+ path: {
21839
+ contextField: string;
21840
+ };
21841
+ cookie?: never;
21842
+ };
21843
+ /** @description legalValueSchema */
21844
+ requestBody: {
21845
+ content: {
21846
+ "application/json": components["schemas"]["legalValueSchema"];
21847
+ };
21848
+ };
21849
+ responses: {
21850
+ /** @description This response has no body. */
21851
+ 200: {
21852
+ headers: {
21853
+ [name: string]: unknown;
21854
+ };
21855
+ content?: never;
21856
+ };
21857
+ };
21858
+ };
21859
+ deleteContextFieldLegalValue: {
21860
+ parameters: {
21861
+ query?: never;
21862
+ header?: never;
21863
+ path: {
21864
+ contextField: string;
21865
+ legalValue: string;
21866
+ };
21867
+ cookie?: never;
21868
+ };
21869
+ requestBody?: never;
21870
+ responses: {
21871
+ /** @description This response has no body. */
21872
+ 200: {
21873
+ headers: {
21874
+ [name: string]: unknown;
21875
+ };
21876
+ content?: never;
21877
+ };
21878
+ };
21879
+ };
21738
21880
  validate: {
21739
21881
  parameters: {
21740
21882
  query?: never;
@@ -34162,13 +34304,13 @@ export interface operations {
34162
34304
  };
34163
34305
  requestBody?: never;
34164
34306
  responses: {
34165
- /** @description clientFeaturesSchema */
34307
+ /** @description clientFeaturesDeltaSchema */
34166
34308
  200: {
34167
34309
  headers: {
34168
34310
  [name: string]: unknown;
34169
34311
  };
34170
34312
  content: {
34171
- "application/json": components["schemas"]["clientFeaturesSchema"];
34313
+ "application/json": components["schemas"]["clientFeaturesDeltaSchema"];
34172
34314
  };
34173
34315
  };
34174
34316
  };