@raystack/frontier 0.20.0 → 0.21.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.
package/dist/index.mjs CHANGED
@@ -298,6 +298,23 @@ var V1Beta1 = class extends HttpClient {
298
298
  type: "application/json" /* Json */,
299
299
  format: "json"
300
300
  }, params));
301
+ /**
302
+ * @description Checkout a product to buy it one time or start a subscription plan on a billing account manually. It bypasses billing engine.
303
+ *
304
+ * @tags Checkout
305
+ * @name AdminServiceDelegatedCheckout2
306
+ * @summary Checkout a product or subscription
307
+ * @request POST:/v1beta1/admin/organizations/{org_id}/billing/checkouts
308
+ * @secure
309
+ */
310
+ this.adminServiceDelegatedCheckout2 = (orgId, body, params = {}) => this.request(__spreadValues({
311
+ path: `/v1beta1/admin/organizations/${orgId}/billing/checkouts`,
312
+ method: "POST",
313
+ body,
314
+ secure: true,
315
+ type: "application/json" /* Json */,
316
+ format: "json"
317
+ }, params));
301
318
  /**
302
319
  * @description Lists all the users added to the platform.
303
320
  *
@@ -1364,6 +1381,21 @@ var V1Beta1 = class extends HttpClient {
1364
1381
  type: "application/json" /* Json */,
1365
1382
  format: "json"
1366
1383
  }, params));
1384
+ /**
1385
+ * @description Get a checkout by ID.
1386
+ *
1387
+ * @tags Checkout
1388
+ * @name FrontierServiceGetCheckout
1389
+ * @summary Get checkout
1390
+ * @request GET:/v1beta1/organizations/{org_id}/billing/{billing_id}/checkouts/{id}
1391
+ * @secure
1392
+ */
1393
+ this.frontierServiceGetCheckout = (orgId, billingId, id, params = {}) => this.request(__spreadValues({
1394
+ path: `/v1beta1/organizations/${orgId}/billing/${billingId}/checkouts/${id}`,
1395
+ method: "GET",
1396
+ secure: true,
1397
+ format: "json"
1398
+ }, params));
1367
1399
  /**
1368
1400
  * @description List all invoices of a billing account.
1369
1401
  *
@@ -1574,6 +1606,38 @@ var V1Beta1 = class extends HttpClient {
1574
1606
  secure: true,
1575
1607
  format: "json"
1576
1608
  }, params));
1609
+ /**
1610
+ * @description Disable a billing account by ID. Disabling a billing account doesn't automatically disable it's active subscriptions.
1611
+ *
1612
+ * @tags Billing
1613
+ * @name FrontierServiceDisableBillingAccount
1614
+ * @summary Disable billing account
1615
+ * @request POST:/v1beta1/organizations/{org_id}/billing/{id}/disable
1616
+ * @secure
1617
+ */
1618
+ this.frontierServiceDisableBillingAccount = (orgId, id, body, params = {}) => this.request(__spreadValues({
1619
+ path: `/v1beta1/organizations/${orgId}/billing/${id}/disable`,
1620
+ method: "POST",
1621
+ body,
1622
+ secure: true,
1623
+ format: "json"
1624
+ }, params));
1625
+ /**
1626
+ * @description Enable a billing account by ID.
1627
+ *
1628
+ * @tags Billing
1629
+ * @name FrontierServiceEnableBillingAccount
1630
+ * @summary Enable billing account
1631
+ * @request POST:/v1beta1/organizations/{org_id}/billing/{id}/enable
1632
+ * @secure
1633
+ */
1634
+ this.frontierServiceEnableBillingAccount = (orgId, id, body, params = {}) => this.request(__spreadValues({
1635
+ path: `/v1beta1/organizations/${orgId}/billing/${id}/enable`,
1636
+ method: "POST",
1637
+ body,
1638
+ secure: true,
1639
+ format: "json"
1640
+ }, params));
1577
1641
  /**
1578
1642
  * @description Check if a billing account has trialed.
1579
1643
  *
@@ -1589,6 +1653,71 @@ var V1Beta1 = class extends HttpClient {
1589
1653
  secure: true,
1590
1654
  format: "json"
1591
1655
  }, params));
1656
+ /**
1657
+ * @description Register a billing account to a provider if it's not already.
1658
+ *
1659
+ * @tags Billing
1660
+ * @name FrontierServiceRegisterBillingAccount
1661
+ * @summary Register billing account to provider
1662
+ * @request POST:/v1beta1/organizations/{org_id}/billing/{id}/register
1663
+ * @secure
1664
+ */
1665
+ this.frontierServiceRegisterBillingAccount = (orgId, id, body, params = {}) => this.request(__spreadValues({
1666
+ path: `/v1beta1/organizations/${orgId}/billing/${id}/register`,
1667
+ method: "POST",
1668
+ body,
1669
+ secure: true,
1670
+ format: "json"
1671
+ }, params));
1672
+ /**
1673
+ * @description List all checkouts of a billing account.
1674
+ *
1675
+ * @tags Checkout
1676
+ * @name FrontierServiceListCheckouts2
1677
+ * @summary List checkouts
1678
+ * @request GET:/v1beta1/organizations/{org_id}/billing/checkouts
1679
+ * @secure
1680
+ */
1681
+ this.frontierServiceListCheckouts2 = (orgId, query, params = {}) => this.request(__spreadValues({
1682
+ path: `/v1beta1/organizations/${orgId}/billing/checkouts`,
1683
+ method: "GET",
1684
+ query,
1685
+ secure: true,
1686
+ format: "json"
1687
+ }, params));
1688
+ /**
1689
+ * @description Checkout a product to buy it one time or start a subscription plan on a billing account.
1690
+ *
1691
+ * @tags Checkout
1692
+ * @name FrontierServiceCreateCheckout2
1693
+ * @summary Checkout a product or subscription
1694
+ * @request POST:/v1beta1/organizations/{org_id}/billing/checkouts
1695
+ * @secure
1696
+ */
1697
+ this.frontierServiceCreateCheckout2 = (orgId, body, params = {}) => this.request(__spreadValues({
1698
+ path: `/v1beta1/organizations/${orgId}/billing/checkouts`,
1699
+ method: "POST",
1700
+ body,
1701
+ secure: true,
1702
+ type: "application/json" /* Json */,
1703
+ format: "json"
1704
+ }, params));
1705
+ /**
1706
+ * @description Get a checkout by ID.
1707
+ *
1708
+ * @tags Checkout
1709
+ * @name FrontierServiceGetCheckout2
1710
+ * @summary Get checkout
1711
+ * @request GET:/v1beta1/organizations/{org_id}/billing/checkouts/{id}
1712
+ * @secure
1713
+ */
1714
+ this.frontierServiceGetCheckout2 = (orgId, id, query, params = {}) => this.request(__spreadValues({
1715
+ path: `/v1beta1/organizations/${orgId}/billing/checkouts/${id}`,
1716
+ method: "GET",
1717
+ query,
1718
+ secure: true,
1719
+ format: "json"
1720
+ }, params));
1592
1721
  /**
1593
1722
  * @description List all invoices of a billing account.
1594
1723
  *
@@ -1621,6 +1750,105 @@ var V1Beta1 = class extends HttpClient {
1621
1750
  secure: true,
1622
1751
  format: "json"
1623
1752
  }, params));
1753
+ /**
1754
+ * @description List subscriptions of a billing account.
1755
+ *
1756
+ * @tags Subscription
1757
+ * @name FrontierServiceListSubscriptions2
1758
+ * @summary List subscriptions
1759
+ * @request GET:/v1beta1/organizations/{org_id}/billing/subscriptions
1760
+ * @secure
1761
+ */
1762
+ this.frontierServiceListSubscriptions2 = (orgId, query, params = {}) => this.request(__spreadValues({
1763
+ path: `/v1beta1/organizations/${orgId}/billing/subscriptions`,
1764
+ method: "GET",
1765
+ query,
1766
+ secure: true,
1767
+ format: "json"
1768
+ }, params));
1769
+ /**
1770
+ * @description Get a subscription by ID.
1771
+ *
1772
+ * @tags Subscription
1773
+ * @name FrontierServiceGetSubscription2
1774
+ * @summary Get subscription
1775
+ * @request GET:/v1beta1/organizations/{org_id}/billing/subscriptions/{id}
1776
+ * @secure
1777
+ */
1778
+ this.frontierServiceGetSubscription2 = (orgId, id, query, params = {}) => this.request(__spreadValues({
1779
+ path: `/v1beta1/organizations/${orgId}/billing/subscriptions/${id}`,
1780
+ method: "GET",
1781
+ query,
1782
+ secure: true,
1783
+ format: "json"
1784
+ }, params));
1785
+ /**
1786
+ * @description Update a subscription by ID.
1787
+ *
1788
+ * @tags Subscription
1789
+ * @name FrontierServiceUpdateSubscription2
1790
+ * @summary Update subscription
1791
+ * @request POST:/v1beta1/organizations/{org_id}/billing/subscriptions/{id}
1792
+ * @secure
1793
+ */
1794
+ this.frontierServiceUpdateSubscription2 = (orgId, id, body, params = {}) => this.request(__spreadValues({
1795
+ path: `/v1beta1/organizations/${orgId}/billing/subscriptions/${id}`,
1796
+ method: "POST",
1797
+ body,
1798
+ secure: true,
1799
+ type: "application/json" /* Json */,
1800
+ format: "json"
1801
+ }, params));
1802
+ /**
1803
+ * @description Cancel a subscription by ID.
1804
+ *
1805
+ * @tags Subscription
1806
+ * @name FrontierServiceCancelSubscription2
1807
+ * @summary Cancel subscription
1808
+ * @request POST:/v1beta1/organizations/{org_id}/billing/subscriptions/{id}/cancel
1809
+ * @secure
1810
+ */
1811
+ this.frontierServiceCancelSubscription2 = (orgId, id, body, params = {}) => this.request(__spreadValues({
1812
+ path: `/v1beta1/organizations/${orgId}/billing/subscriptions/${id}/cancel`,
1813
+ method: "POST",
1814
+ body,
1815
+ secure: true,
1816
+ type: "application/json" /* Json */,
1817
+ format: "json"
1818
+ }, params));
1819
+ /**
1820
+ * @description Change a subscription plan by ID.
1821
+ *
1822
+ * @tags Subscription
1823
+ * @name FrontierServiceChangeSubscription2
1824
+ * @summary Change subscription plan
1825
+ * @request POST:/v1beta1/organizations/{org_id}/billing/subscriptions/{id}/change
1826
+ * @secure
1827
+ */
1828
+ this.frontierServiceChangeSubscription2 = (orgId, id, body, params = {}) => this.request(__spreadValues({
1829
+ path: `/v1beta1/organizations/${orgId}/billing/subscriptions/${id}/change`,
1830
+ method: "POST",
1831
+ body,
1832
+ secure: true,
1833
+ type: "application/json" /* Json */,
1834
+ format: "json"
1835
+ }, params));
1836
+ /**
1837
+ * @description List all transactions of a billing account.
1838
+ *
1839
+ * @tags Transaction
1840
+ * @name FrontierServiceListBillingTransactions2
1841
+ * @summary List billing transactions
1842
+ * @request GET:/v1beta1/organizations/{org_id}/billing/transactions
1843
+ * @secure
1844
+ */
1845
+ this.frontierServiceListBillingTransactions2 = (orgId, query, params = {}) => this.request(__spreadValues({
1846
+ path: `/v1beta1/organizations/${orgId}/billing/transactions`,
1847
+ method: "GET",
1848
+ query,
1849
+ secure: true,
1850
+ format: "json"
1851
+ }, params));
1624
1852
  /**
1625
1853
  * @description Returns all domains whitelisted for an organization (both pending and verified if no filters are provided for the state). The verified domains allow users email with the org's whitelisted domain to join the organization without invitation.
1626
1854
  *
@@ -2240,6 +2468,23 @@ var V1Beta1 = class extends HttpClient {
2240
2468
  secure: true,
2241
2469
  format: "json"
2242
2470
  }, params));
2471
+ /**
2472
+ * @description Create a policy for a project
2473
+ *
2474
+ * @tags Policy
2475
+ * @name FrontierServiceCreatePolicyForProject
2476
+ * @summary Create Policy for Project
2477
+ * @request POST:/v1beta1/policies/projects/{project_id}
2478
+ * @secure
2479
+ */
2480
+ this.frontierServiceCreatePolicyForProject = (projectId, body, params = {}) => this.request(__spreadValues({
2481
+ path: `/v1beta1/policies/projects/${projectId}`,
2482
+ method: "POST",
2483
+ body,
2484
+ secure: true,
2485
+ type: "application/json" /* Json */,
2486
+ format: "json"
2487
+ }, params));
2243
2488
  /**
2244
2489
  * @description Returns a list of all preferences configured on an instance in Frontier. e.g user, project, organization etc
2245
2490
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raystack/frontier",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "description": "A js library for frontier",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -54,6 +54,7 @@
54
54
  "devDependencies": {
55
55
  "@jest/globals": "^29.7.0",
56
56
  "@radix-ui/react-icons": "^1.3.0",
57
+ "@raystack/eslint-config": "workspace:^",
57
58
  "@raystack/frontier-tsconfig": "workspace:^",
58
59
  "@size-limit/preset-small-lib": "^8.2.6",
59
60
  "@tanstack/react-table": "^8.10.1",
@@ -65,7 +66,6 @@
65
66
  "esbuild-css-modules-plugin": "^2.7.1",
66
67
  "esbuild-plugin-external-global": "^1.0.1",
67
68
  "eslint": "^7.32.0",
68
- "@raystack/eslint-config": "workspace:^",
69
69
  "jest": "^29.7.0",
70
70
  "np": "^7.7.0",
71
71
  "prettier": "^2.8.8",
@@ -79,7 +79,7 @@
79
79
  },
80
80
  "dependencies": {
81
81
  "@hookform/resolvers": "^3.3.1",
82
- "@raystack/apsara": "^0.11.10",
82
+ "@raystack/apsara": "^0.15.0",
83
83
  "@tanstack/react-router": "0.0.1-beta.194",
84
84
  "axios": "^1.5.0",
85
85
  "class-variance-authority": "^0.7.0",
@@ -816,6 +816,14 @@ interface V1Beta1CreatePlanResponse {
816
816
  /** Created plan */
817
817
  plan?: V1Beta1Plan;
818
818
  }
819
+ interface V1Beta1CreatePolicyForProjectBody {
820
+ /** unique id of the role to which policy is assigned */
821
+ role_id: string;
822
+ /** The title can contain any UTF-8 character, used to provide a human-readable name for the policy. Can also be left empty. <br/> *Example:* `Policy title` */
823
+ title?: string;
824
+ /** principal is the user or group to which policy is assigned. The principal id must be prefixed with its namespace id in this format `namespace:uuid`. The namespace can be `app/user`, `app/group` or `app/serviceuser` (coming up!) and uuid is the unique id of the principal. <br/> *Example:* `app/user:92f69c3a-334b-4f25-90b8-4d4f3be6b825` */
825
+ principal: string;
826
+ }
819
827
  interface V1Beta1CreatePolicyResponse {
820
828
  policy?: V1Beta1Policy;
821
829
  }
@@ -956,6 +964,10 @@ interface V1Beta1GetBillingBalanceResponse {
956
964
  /** Balance of the billing account */
957
965
  balance?: BillingAccountBalance;
958
966
  }
967
+ interface V1Beta1GetCheckoutResponse {
968
+ /** Checkout session */
969
+ checkout_session?: V1Beta1CheckoutSession;
970
+ }
959
971
  interface V1Beta1GetCurrentUserResponse {
960
972
  user?: V1Beta1User;
961
973
  serviceuser?: V1Beta1ServiceUser;
@@ -2221,6 +2233,23 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2221
2233
  */
2222
2234
  amount?: string;
2223
2235
  }, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
2236
+ /**
2237
+ * @description Checkout a product to buy it one time or start a subscription plan on a billing account manually. It bypasses billing engine.
2238
+ *
2239
+ * @tags Checkout
2240
+ * @name AdminServiceDelegatedCheckout2
2241
+ * @summary Checkout a product or subscription
2242
+ * @request POST:/v1beta1/admin/organizations/{org_id}/billing/checkouts
2243
+ * @secure
2244
+ */
2245
+ adminServiceDelegatedCheckout2: (orgId: string, body: {
2246
+ /** ID of the billing account to update the subscription for */
2247
+ billing_id?: string;
2248
+ /** Subscription to create */
2249
+ subscription_body?: V1Beta1CheckoutSubscriptionBody;
2250
+ /** Product to buy */
2251
+ product_body?: V1Beta1CheckoutProductBody;
2252
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1DelegatedCheckoutResponse, RpcStatus>>;
2224
2253
  /**
2225
2254
  * @description Lists all the users added to the platform.
2226
2255
  *
@@ -3020,6 +3049,8 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
3020
3049
  frontierServiceCreateBillingAccount: (orgId: string, body: {
3021
3050
  /** Billing account to create. */
3022
3051
  body?: V1Beta1BillingAccountRequestBody | undefined;
3052
+ /** Offline billing account don't get registered with billing provider */
3053
+ offline?: boolean | undefined;
3023
3054
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateBillingAccountResponse, RpcStatus>>;
3024
3055
  /**
3025
3056
  * @description Check if a billing account is entitled to a feature.
@@ -3068,6 +3099,16 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
3068
3099
  /** Payment method setup */
3069
3100
  setup_body?: V1Beta1CheckoutSetupBody;
3070
3101
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateCheckoutResponse, RpcStatus>>;
3102
+ /**
3103
+ * @description Get a checkout by ID.
3104
+ *
3105
+ * @tags Checkout
3106
+ * @name FrontierServiceGetCheckout
3107
+ * @summary Get checkout
3108
+ * @request GET:/v1beta1/organizations/{org_id}/billing/{billing_id}/checkouts/{id}
3109
+ * @secure
3110
+ */
3111
+ frontierServiceGetCheckout: (orgId: string, billingId: string, id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetCheckoutResponse, RpcStatus>>;
3071
3112
  /**
3072
3113
  * @description List all invoices of a billing account.
3073
3114
  *
@@ -3177,6 +3218,10 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
3177
3218
  frontierServiceListBillingTransactions: (orgId: string, billingId: string, query?: {
3178
3219
  /** @format date-time */
3179
3220
  since?: string;
3221
+ /** @format date-time */
3222
+ start_range?: string;
3223
+ /** @format date-time */
3224
+ end_range?: string;
3180
3225
  expand?: string[];
3181
3226
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListBillingTransactionsResponse, RpcStatus>>;
3182
3227
  /**
@@ -3243,6 +3288,26 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
3243
3288
  * @secure
3244
3289
  */
3245
3290
  frontierServiceGetBillingBalance: (orgId: string, id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetBillingBalanceResponse, RpcStatus>>;
3291
+ /**
3292
+ * @description Disable a billing account by ID. Disabling a billing account doesn't automatically disable it's active subscriptions.
3293
+ *
3294
+ * @tags Billing
3295
+ * @name FrontierServiceDisableBillingAccount
3296
+ * @summary Disable billing account
3297
+ * @request POST:/v1beta1/organizations/{org_id}/billing/{id}/disable
3298
+ * @secure
3299
+ */
3300
+ frontierServiceDisableBillingAccount: (orgId: string, id: string, body: object, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
3301
+ /**
3302
+ * @description Enable a billing account by ID.
3303
+ *
3304
+ * @tags Billing
3305
+ * @name FrontierServiceEnableBillingAccount
3306
+ * @summary Enable billing account
3307
+ * @request POST:/v1beta1/organizations/{org_id}/billing/{id}/enable
3308
+ * @secure
3309
+ */
3310
+ frontierServiceEnableBillingAccount: (orgId: string, id: string, body: object, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
3246
3311
  /**
3247
3312
  * @description Check if a billing account has trialed.
3248
3313
  *
@@ -3253,6 +3318,63 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
3253
3318
  * @secure
3254
3319
  */
3255
3320
  frontierServiceHasTrialed: (orgId: string, id: string, planId: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1HasTrialedResponse, RpcStatus>>;
3321
+ /**
3322
+ * @description Register a billing account to a provider if it's not already.
3323
+ *
3324
+ * @tags Billing
3325
+ * @name FrontierServiceRegisterBillingAccount
3326
+ * @summary Register billing account to provider
3327
+ * @request POST:/v1beta1/organizations/{org_id}/billing/{id}/register
3328
+ * @secure
3329
+ */
3330
+ frontierServiceRegisterBillingAccount: (orgId: string, id: string, body: object, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
3331
+ /**
3332
+ * @description List all checkouts of a billing account.
3333
+ *
3334
+ * @tags Checkout
3335
+ * @name FrontierServiceListCheckouts2
3336
+ * @summary List checkouts
3337
+ * @request GET:/v1beta1/organizations/{org_id}/billing/checkouts
3338
+ * @secure
3339
+ */
3340
+ frontierServiceListCheckouts2: (orgId: string, query?: {
3341
+ /** ID of the billing account to get the subscriptions for */
3342
+ billing_id?: string;
3343
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListCheckoutsResponse, RpcStatus>>;
3344
+ /**
3345
+ * @description Checkout a product to buy it one time or start a subscription plan on a billing account.
3346
+ *
3347
+ * @tags Checkout
3348
+ * @name FrontierServiceCreateCheckout2
3349
+ * @summary Checkout a product or subscription
3350
+ * @request POST:/v1beta1/organizations/{org_id}/billing/checkouts
3351
+ * @secure
3352
+ */
3353
+ frontierServiceCreateCheckout2: (orgId: string, body: {
3354
+ /** ID of the billing account to update the subscription for */
3355
+ billing_id?: string;
3356
+ success_url?: string;
3357
+ cancel_url?: string;
3358
+ /** Subscription to create */
3359
+ subscription_body?: V1Beta1CheckoutSubscriptionBody;
3360
+ /** Product to buy */
3361
+ product_body?: V1Beta1CheckoutProductBody;
3362
+ /** Payment method setup */
3363
+ setup_body?: V1Beta1CheckoutSetupBody;
3364
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateCheckoutResponse, RpcStatus>>;
3365
+ /**
3366
+ * @description Get a checkout by ID.
3367
+ *
3368
+ * @tags Checkout
3369
+ * @name FrontierServiceGetCheckout2
3370
+ * @summary Get checkout
3371
+ * @request GET:/v1beta1/organizations/{org_id}/billing/checkouts/{id}
3372
+ * @secure
3373
+ */
3374
+ frontierServiceGetCheckout2: (orgId: string, id: string, query?: {
3375
+ /** ID of the billing account to get the subscriptions for */
3376
+ billing_id?: string;
3377
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetCheckoutResponse, RpcStatus>>;
3256
3378
  /**
3257
3379
  * @description List all invoices of a billing account.
3258
3380
  *
@@ -3281,6 +3403,110 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
3281
3403
  /** ID of the billing account to get the upcoming invoice for */
3282
3404
  billing_id?: string;
3283
3405
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetUpcomingInvoiceResponse, RpcStatus>>;
3406
+ /**
3407
+ * @description List subscriptions of a billing account.
3408
+ *
3409
+ * @tags Subscription
3410
+ * @name FrontierServiceListSubscriptions2
3411
+ * @summary List subscriptions
3412
+ * @request GET:/v1beta1/organizations/{org_id}/billing/subscriptions
3413
+ * @secure
3414
+ */
3415
+ frontierServiceListSubscriptions2: (orgId: string, query?: {
3416
+ /** ID of the billing account to list subscriptions for */
3417
+ billing_id?: string;
3418
+ /** Filter subscriptions by state */
3419
+ state?: string;
3420
+ plan?: string;
3421
+ expand?: string[];
3422
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListSubscriptionsResponse, RpcStatus>>;
3423
+ /**
3424
+ * @description Get a subscription by ID.
3425
+ *
3426
+ * @tags Subscription
3427
+ * @name FrontierServiceGetSubscription2
3428
+ * @summary Get subscription
3429
+ * @request GET:/v1beta1/organizations/{org_id}/billing/subscriptions/{id}
3430
+ * @secure
3431
+ */
3432
+ frontierServiceGetSubscription2: (orgId: string, id: string, query?: {
3433
+ /** ID of the billing account to get the subscription for */
3434
+ billing_id?: string;
3435
+ expand?: string[];
3436
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetSubscriptionResponse, RpcStatus>>;
3437
+ /**
3438
+ * @description Update a subscription by ID.
3439
+ *
3440
+ * @tags Subscription
3441
+ * @name FrontierServiceUpdateSubscription2
3442
+ * @summary Update subscription
3443
+ * @request POST:/v1beta1/organizations/{org_id}/billing/subscriptions/{id}
3444
+ * @secure
3445
+ */
3446
+ frontierServiceUpdateSubscription2: (orgId: string, id: string, body: {
3447
+ /** ID of the billing account to update the subscription for */
3448
+ billing_id?: string;
3449
+ metadata?: object;
3450
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdateSubscriptionResponse, RpcStatus>>;
3451
+ /**
3452
+ * @description Cancel a subscription by ID.
3453
+ *
3454
+ * @tags Subscription
3455
+ * @name FrontierServiceCancelSubscription2
3456
+ * @summary Cancel subscription
3457
+ * @request POST:/v1beta1/organizations/{org_id}/billing/subscriptions/{id}/cancel
3458
+ * @secure
3459
+ */
3460
+ frontierServiceCancelSubscription2: (orgId: string, id: string, body: {
3461
+ /** ID of the billing account to update the subscription for */
3462
+ billing_id?: string;
3463
+ immediate?: boolean;
3464
+ }, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
3465
+ /**
3466
+ * @description Change a subscription plan by ID.
3467
+ *
3468
+ * @tags Subscription
3469
+ * @name FrontierServiceChangeSubscription2
3470
+ * @summary Change subscription plan
3471
+ * @request POST:/v1beta1/organizations/{org_id}/billing/subscriptions/{id}/change
3472
+ * @secure
3473
+ */
3474
+ frontierServiceChangeSubscription2: (orgId: string, id: string, body: {
3475
+ /** ID of the billing account to update the subscription for */
3476
+ billing_id?: string;
3477
+ /**
3478
+ * plan to change to
3479
+ * deprecated in favor of plan_change
3480
+ */
3481
+ plan?: string;
3482
+ /**
3483
+ * should the change be immediate or at the end of the current billing period
3484
+ * deprecated in favor of plan_change
3485
+ */
3486
+ immediate?: boolean;
3487
+ plan_change?: ChangeSubscriptionRequestPlanChange;
3488
+ phase_change?: ChangeSubscriptionRequestPhaseChange;
3489
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ChangeSubscriptionResponse, RpcStatus>>;
3490
+ /**
3491
+ * @description List all transactions of a billing account.
3492
+ *
3493
+ * @tags Transaction
3494
+ * @name FrontierServiceListBillingTransactions2
3495
+ * @summary List billing transactions
3496
+ * @request GET:/v1beta1/organizations/{org_id}/billing/transactions
3497
+ * @secure
3498
+ */
3499
+ frontierServiceListBillingTransactions2: (orgId: string, query?: {
3500
+ /** ID of the billing account to update the subscription for */
3501
+ billing_id?: string;
3502
+ /** @format date-time */
3503
+ since?: string;
3504
+ /** @format date-time */
3505
+ start_range?: string;
3506
+ /** @format date-time */
3507
+ end_range?: string;
3508
+ expand?: string[];
3509
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListBillingTransactionsResponse, RpcStatus>>;
3284
3510
  /**
3285
3511
  * @description Returns all domains whitelisted for an organization (both pending and verified if no filters are provided for the state). The verified domains allow users email with the org's whitelisted domain to join the organization without invitation.
3286
3512
  *
@@ -3713,6 +3939,16 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
3713
3939
  * @secure
3714
3940
  */
3715
3941
  frontierServiceUpdatePolicy: (id: string, body: V1Beta1PolicyRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdatePolicyResponse, RpcStatus>>;
3942
+ /**
3943
+ * @description Create a policy for a project
3944
+ *
3945
+ * @tags Policy
3946
+ * @name FrontierServiceCreatePolicyForProject
3947
+ * @summary Create Policy for Project
3948
+ * @request POST:/v1beta1/policies/projects/{project_id}
3949
+ * @secure
3950
+ */
3951
+ frontierServiceCreatePolicyForProject: (projectId: string, body: V1Beta1CreatePolicyForProjectBody, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
3716
3952
  /**
3717
3953
  * @description Returns a list of all preferences configured on an instance in Frontier. e.g user, project, organization etc
3718
3954
  *