@insurance-broker/api-client 1.42.0 → 1.43.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 (2) hide show
  1. package/dist/schema.d.ts +413 -0
  2. package/package.json +1 -1
package/dist/schema.d.ts CHANGED
@@ -3186,6 +3186,132 @@ export interface paths {
3186
3186
  patch?: never;
3187
3187
  trace?: never;
3188
3188
  };
3189
+ "/api/v1/platform/plans": {
3190
+ parameters: {
3191
+ query?: never;
3192
+ header?: never;
3193
+ path?: never;
3194
+ cookie?: never;
3195
+ };
3196
+ /**
3197
+ * Every plan in the catalogue and what each one grants.
3198
+ * @description TEN-005. Retired plans included: a plan withdrawn from sale still has brokers on it, and the question this list answers is usually "what is that broker actually on?"
3199
+ *
3200
+ * **A feature absent from a plan is not the same as one granted `false`.** An absent feature falls through to the feature's own default; a granted `false` is the plan saying no. Both appear here as they are.
3201
+ */
3202
+ get: operations["ListPlans"];
3203
+ put?: never;
3204
+ post?: never;
3205
+ delete?: never;
3206
+ options?: never;
3207
+ head?: never;
3208
+ patch?: never;
3209
+ trace?: never;
3210
+ };
3211
+ "/api/v1/platform/plans/{planCode}/features": {
3212
+ parameters: {
3213
+ query?: never;
3214
+ header?: never;
3215
+ path?: never;
3216
+ cookie?: never;
3217
+ };
3218
+ get?: never;
3219
+ put?: never;
3220
+ /**
3221
+ * Make a plan carry a feature, or change what it grants.
3222
+ * @description TEN-005, and the repair path issue #281 was opened for. Creates the `platform_tenancy_plan_features` row that seeding cannot create on a database whose plan predates the feature key.
3223
+ *
3224
+ * **One route for both granting and repricing**, because the caller cannot know which it is without a read it would then race. `201` says the plan did not carry the feature before; `200` says the value moved. The audit entry records which, and from what.
3225
+ *
3226
+ * **Nothing here defines a feature.** A key that is not already in the catalogue is refused: which features exist is configuration, and a surface that could mint one would create keys no gate reads.
3227
+ *
3228
+ * **Every broker on this plan is affected**, including ones nobody named. This is the route on the platform with the widest blast radius per request, which is why it has a permission of its own rather than sharing tenant provisioning's.
3229
+ */
3230
+ post: operations["GrantPlanFeature"];
3231
+ delete?: never;
3232
+ options?: never;
3233
+ head?: never;
3234
+ patch?: never;
3235
+ trace?: never;
3236
+ };
3237
+ "/api/v1/platform/plans/{planCode}/features/{featureKey}/withdrawal": {
3238
+ parameters: {
3239
+ query?: never;
3240
+ header?: never;
3241
+ path?: never;
3242
+ cookie?: never;
3243
+ };
3244
+ get?: never;
3245
+ put?: never;
3246
+ /**
3247
+ * Stop a plan carrying a feature.
3248
+ * @description Removes the grant, so brokers on this plan fall back to the feature's own default.
3249
+ *
3250
+ * **This is not the same as granting `false`**, and choosing the wrong one is how a withdrawal silently grants. If the feature's default is `true` — which is how a capability that shipped before its gate is kept working on existing deployments — removing the row leaves every broker on this plan entitled. Grant `false` to mean "this plan does not include it".
3251
+ *
3252
+ * A plan that does not carry the feature answers `404`: there was nothing to withdraw, and reporting success would tell an operator a decision was taken that was not.
3253
+ */
3254
+ post: operations["WithdrawPlanFeature"];
3255
+ delete?: never;
3256
+ options?: never;
3257
+ head?: never;
3258
+ patch?: never;
3259
+ trace?: never;
3260
+ };
3261
+ "/api/v1/platform/tenants/{tenantKey}/entitlements": {
3262
+ parameters: {
3263
+ query?: never;
3264
+ header?: never;
3265
+ path?: never;
3266
+ cookie?: never;
3267
+ };
3268
+ /**
3269
+ * What one broker is on, and every override it carries.
3270
+ * @description TEN-005. The plan the broker is currently on, and the overrides that take precedence over it.
3271
+ *
3272
+ * **Expired overrides are listed too**, marked `isEffective: false`. "Why did this broker lose a feature overnight?" is answerable only if the row that stopped applying is still visible.
3273
+ */
3274
+ get: operations["ListTenantEntitlements"];
3275
+ put?: never;
3276
+ /**
3277
+ * Give one broker terms its plan does not express.
3278
+ * @description TEN-005. Takes precedence over the broker's plan for this one feature, and over nothing else.
3279
+ *
3280
+ * **`false` is a deliberate denial**, and a different state from having no override: it refuses the feature whatever the plan grants. Withdrawing the override is how a broker goes back to what its plan says.
3281
+ *
3282
+ * **An expiry must be in the future.** An override that had already expired would look like something was granted when nothing was.
3283
+ *
3284
+ * `201` says the override is new; `200` says an existing one was restated. The whole row is restated rather than patched, because a value, a reason and an expiry only make sense together — a patched value under an old reason describes a decision that has since changed.
3285
+ */
3286
+ post: operations["OverrideTenantEntitlement"];
3287
+ delete?: never;
3288
+ options?: never;
3289
+ head?: never;
3290
+ patch?: never;
3291
+ trace?: never;
3292
+ };
3293
+ "/api/v1/platform/tenants/{tenantKey}/entitlements/{featureKey}/withdrawal": {
3294
+ parameters: {
3295
+ query?: never;
3296
+ header?: never;
3297
+ path?: never;
3298
+ cookie?: never;
3299
+ };
3300
+ get?: never;
3301
+ put?: never;
3302
+ /**
3303
+ * Remove a broker's override so it falls back to its plan.
3304
+ * @description The override is deleted rather than expired: an expiry says "stop applying later", and an operator withdrawing one means now. A broker with no override for a feature is answered by its plan, and by the feature's default if the plan is silent.
3305
+ *
3306
+ * A broker with no override for that feature answers `404`.
3307
+ */
3308
+ post: operations["WithdrawTenantEntitlement"];
3309
+ delete?: never;
3310
+ options?: never;
3311
+ head?: never;
3312
+ patch?: never;
3313
+ trace?: never;
3314
+ };
3189
3315
  "/api/v1/public/branding": {
3190
3316
  parameters: {
3191
3317
  query?: never;
@@ -5185,6 +5311,10 @@ export interface components {
5185
5311
  GenerateDocumentRequest: {
5186
5312
  format: null | string;
5187
5313
  };
5314
+ GrantPlanFeatureRequest: {
5315
+ featureKey: null | string;
5316
+ value: null | string;
5317
+ };
5188
5318
  GrantPlatformAdministratorRequest: {
5189
5319
  subjectId: null | string;
5190
5320
  displayName: null | string;
@@ -5612,6 +5742,13 @@ export interface components {
5612
5742
  /** Format: date-time */
5613
5743
  updatedAtUtc: string;
5614
5744
  };
5745
+ OverrideEntitlementRequest: {
5746
+ featureKey: null | string;
5747
+ value: null | string;
5748
+ reason: null | string;
5749
+ /** Format: date-time */
5750
+ expiresAtUtc: null | string;
5751
+ };
5615
5752
  OwnCustomerAccountResponse: {
5616
5753
  /** Format: uuid */
5617
5754
  customerId: string;
@@ -5791,6 +5928,20 @@ export interface components {
5791
5928
  /** Format: date-time */
5792
5929
  updatedAtUtc: string;
5793
5930
  };
5931
+ PlatformPlanFeatureResponse: {
5932
+ featureKey: string;
5933
+ value: string;
5934
+ valueKind: string;
5935
+ };
5936
+ PlatformPlanResponse: {
5937
+ code: string;
5938
+ name: string;
5939
+ description: null | string;
5940
+ isPubliclyAvailable: boolean;
5941
+ /** Format: int32 */
5942
+ sortOrder: number | string;
5943
+ features: components["schemas"]["PlatformPlanFeatureResponse"][];
5944
+ };
5794
5945
  PolicyDocumentResponse: {
5795
5946
  /** Format: uuid */
5796
5947
  id: string;
@@ -6647,6 +6798,19 @@ export interface components {
6647
6798
  supportPhone: null | string;
6648
6799
  websiteUrl: null | string;
6649
6800
  };
6801
+ TenantEntitlementResponse: {
6802
+ featureKey: string;
6803
+ value: string;
6804
+ reason: null | string;
6805
+ /** Format: date-time */
6806
+ expiresAtUtc: null | string;
6807
+ isEffective: boolean;
6808
+ };
6809
+ TenantEntitlementsResponse: {
6810
+ tenantKey: string;
6811
+ planCode: null | string;
6812
+ entitlements: components["schemas"]["TenantEntitlementResponse"][];
6813
+ };
6650
6814
  TenantProfileResponse: {
6651
6815
  regulatorName: null | string;
6652
6816
  licenceNumber: null | string;
@@ -14426,6 +14590,255 @@ export interface operations {
14426
14590
  };
14427
14591
  };
14428
14592
  };
14593
+ ListPlans: {
14594
+ parameters: {
14595
+ query?: never;
14596
+ header?: never;
14597
+ path?: never;
14598
+ cookie?: never;
14599
+ };
14600
+ requestBody?: never;
14601
+ responses: {
14602
+ /** @description OK */
14603
+ 200: {
14604
+ headers: {
14605
+ [name: string]: unknown;
14606
+ };
14607
+ content: {
14608
+ "application/json": components["schemas"]["PlatformPlanResponse"][];
14609
+ };
14610
+ };
14611
+ /** @description Forbidden */
14612
+ 403: {
14613
+ headers: {
14614
+ [name: string]: unknown;
14615
+ };
14616
+ content?: never;
14617
+ };
14618
+ };
14619
+ };
14620
+ GrantPlanFeature: {
14621
+ parameters: {
14622
+ query?: never;
14623
+ header?: never;
14624
+ path: {
14625
+ planCode: string;
14626
+ };
14627
+ cookie?: never;
14628
+ };
14629
+ requestBody: {
14630
+ content: {
14631
+ "application/json": components["schemas"]["GrantPlanFeatureRequest"];
14632
+ };
14633
+ };
14634
+ responses: {
14635
+ /** @description OK */
14636
+ 200: {
14637
+ headers: {
14638
+ [name: string]: unknown;
14639
+ };
14640
+ content: {
14641
+ "application/json": components["schemas"]["PlatformPlanFeatureResponse"];
14642
+ };
14643
+ };
14644
+ /** @description Created */
14645
+ 201: {
14646
+ headers: {
14647
+ [name: string]: unknown;
14648
+ };
14649
+ content: {
14650
+ "application/json": components["schemas"]["PlatformPlanFeatureResponse"];
14651
+ };
14652
+ };
14653
+ /** @description Bad Request */
14654
+ 400: {
14655
+ headers: {
14656
+ [name: string]: unknown;
14657
+ };
14658
+ content: {
14659
+ "application/problem+json": components["schemas"]["ProblemDetails"];
14660
+ };
14661
+ };
14662
+ /** @description Forbidden */
14663
+ 403: {
14664
+ headers: {
14665
+ [name: string]: unknown;
14666
+ };
14667
+ content?: never;
14668
+ };
14669
+ /** @description Not Found */
14670
+ 404: {
14671
+ headers: {
14672
+ [name: string]: unknown;
14673
+ };
14674
+ content?: never;
14675
+ };
14676
+ };
14677
+ };
14678
+ WithdrawPlanFeature: {
14679
+ parameters: {
14680
+ query?: never;
14681
+ header?: never;
14682
+ path: {
14683
+ planCode: string;
14684
+ featureKey: string;
14685
+ };
14686
+ cookie?: never;
14687
+ };
14688
+ requestBody?: never;
14689
+ responses: {
14690
+ /** @description No Content */
14691
+ 204: {
14692
+ headers: {
14693
+ [name: string]: unknown;
14694
+ };
14695
+ content?: never;
14696
+ };
14697
+ /** @description Forbidden */
14698
+ 403: {
14699
+ headers: {
14700
+ [name: string]: unknown;
14701
+ };
14702
+ content?: never;
14703
+ };
14704
+ /** @description Not Found */
14705
+ 404: {
14706
+ headers: {
14707
+ [name: string]: unknown;
14708
+ };
14709
+ content?: never;
14710
+ };
14711
+ };
14712
+ };
14713
+ ListTenantEntitlements: {
14714
+ parameters: {
14715
+ query?: never;
14716
+ header?: never;
14717
+ path: {
14718
+ tenantKey: string;
14719
+ };
14720
+ cookie?: never;
14721
+ };
14722
+ requestBody?: never;
14723
+ responses: {
14724
+ /** @description OK */
14725
+ 200: {
14726
+ headers: {
14727
+ [name: string]: unknown;
14728
+ };
14729
+ content: {
14730
+ "application/json": components["schemas"]["TenantEntitlementsResponse"];
14731
+ };
14732
+ };
14733
+ /** @description Forbidden */
14734
+ 403: {
14735
+ headers: {
14736
+ [name: string]: unknown;
14737
+ };
14738
+ content?: never;
14739
+ };
14740
+ /** @description Not Found */
14741
+ 404: {
14742
+ headers: {
14743
+ [name: string]: unknown;
14744
+ };
14745
+ content?: never;
14746
+ };
14747
+ };
14748
+ };
14749
+ OverrideTenantEntitlement: {
14750
+ parameters: {
14751
+ query?: never;
14752
+ header?: never;
14753
+ path: {
14754
+ tenantKey: string;
14755
+ };
14756
+ cookie?: never;
14757
+ };
14758
+ requestBody: {
14759
+ content: {
14760
+ "application/json": components["schemas"]["OverrideEntitlementRequest"];
14761
+ };
14762
+ };
14763
+ responses: {
14764
+ /** @description OK */
14765
+ 200: {
14766
+ headers: {
14767
+ [name: string]: unknown;
14768
+ };
14769
+ content: {
14770
+ "application/json": components["schemas"]["TenantEntitlementResponse"];
14771
+ };
14772
+ };
14773
+ /** @description Created */
14774
+ 201: {
14775
+ headers: {
14776
+ [name: string]: unknown;
14777
+ };
14778
+ content: {
14779
+ "application/json": components["schemas"]["TenantEntitlementResponse"];
14780
+ };
14781
+ };
14782
+ /** @description Bad Request */
14783
+ 400: {
14784
+ headers: {
14785
+ [name: string]: unknown;
14786
+ };
14787
+ content: {
14788
+ "application/problem+json": components["schemas"]["ProblemDetails"];
14789
+ };
14790
+ };
14791
+ /** @description Forbidden */
14792
+ 403: {
14793
+ headers: {
14794
+ [name: string]: unknown;
14795
+ };
14796
+ content?: never;
14797
+ };
14798
+ /** @description Not Found */
14799
+ 404: {
14800
+ headers: {
14801
+ [name: string]: unknown;
14802
+ };
14803
+ content?: never;
14804
+ };
14805
+ };
14806
+ };
14807
+ WithdrawTenantEntitlement: {
14808
+ parameters: {
14809
+ query?: never;
14810
+ header?: never;
14811
+ path: {
14812
+ tenantKey: string;
14813
+ featureKey: string;
14814
+ };
14815
+ cookie?: never;
14816
+ };
14817
+ requestBody?: never;
14818
+ responses: {
14819
+ /** @description No Content */
14820
+ 204: {
14821
+ headers: {
14822
+ [name: string]: unknown;
14823
+ };
14824
+ content?: never;
14825
+ };
14826
+ /** @description Forbidden */
14827
+ 403: {
14828
+ headers: {
14829
+ [name: string]: unknown;
14830
+ };
14831
+ content?: never;
14832
+ };
14833
+ /** @description Not Found */
14834
+ 404: {
14835
+ headers: {
14836
+ [name: string]: unknown;
14837
+ };
14838
+ content?: never;
14839
+ };
14840
+ };
14841
+ };
14429
14842
  GetPublicBranding: {
14430
14843
  parameters: {
14431
14844
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insurance-broker/api-client",
3
- "version": "1.42.0",
3
+ "version": "1.43.0",
4
4
  "description": "Generated TypeScript client for the Insurance Broker Platform API. Do not edit by hand: regenerate with scripts/update-api-contract.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,