@raystack/frontier 0.8.36 → 0.8.37

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.d.ts CHANGED
@@ -101,7 +101,7 @@ interface ProtobufAny {
101
101
  * `NullValue` is a singleton enumeration to represent the null value for the
102
102
  * `Value` type union.
103
103
  *
104
- * The JSON representation for `NullValue` is JSON `null`.
104
+ * The JSON representation for `NullValue` is JSON `null`.
105
105
  *
106
106
  * - NULL_VALUE: Null value.
107
107
  * @default "NULL_VALUE"
@@ -248,11 +248,14 @@ interface V1Beta1BillingAccountRequestBody {
248
248
  interface V1Beta1BillingTransaction {
249
249
  id?: string;
250
250
  customer_id?: string;
251
+ /** additional metadata for storing event/service that triggered this usage */
251
252
  source?: string;
252
253
  /** @format int64 */
253
254
  amount?: string;
254
255
  type?: string;
255
256
  description?: string;
257
+ /** user_id is the user that triggered this usage */
258
+ user_id?: string;
256
259
  metadata?: object;
257
260
  /** @format date-time */
258
261
  created_at?: string;
@@ -263,6 +266,18 @@ type V1Beta1CancelSubscriptionResponse = object;
263
266
  interface V1Beta1ChangeSubscriptionResponse {
264
267
  phase?: SubscriptionPhase;
265
268
  }
269
+ interface V1Beta1CheckFeatureEntitlementRequest {
270
+ org_id?: string;
271
+ /** ID of the billing account to update the subscription for */
272
+ billing_id?: string;
273
+ /**
274
+ * either provide billing_id of the org or API can infer the default
275
+ * billing ID from either org_id or project_id, not both
276
+ */
277
+ project_id?: string;
278
+ /** feature or product name */
279
+ feature?: string;
280
+ }
266
281
  interface V1Beta1CheckFeatureEntitlementResponse {
267
282
  status?: boolean;
268
283
  }
@@ -321,6 +336,18 @@ interface V1Beta1CreateBillingAccountResponse {
321
336
  /** Created billing account */
322
337
  billing_account?: V1Beta1BillingAccount;
323
338
  }
339
+ interface V1Beta1CreateBillingUsageRequest {
340
+ org_id?: string;
341
+ /** ID of the billing account to update the subscription for */
342
+ billing_id?: string;
343
+ /**
344
+ * either provide billing_id of the org or API can infer the default
345
+ * billing ID from either org_id or project_id, not both
346
+ */
347
+ project_id?: string;
348
+ /** Usage to create */
349
+ usages?: V1Beta1Usage[];
350
+ }
324
351
  type V1Beta1CreateBillingUsageResponse = object;
325
352
  interface V1Beta1CreateCheckoutResponse {
326
353
  /** Checkout session */
@@ -332,6 +359,14 @@ interface V1Beta1CreateCurrentUserPreferencesRequest {
332
359
  interface V1Beta1CreateCurrentUserPreferencesResponse {
333
360
  preferences?: V1Beta1Preference[];
334
361
  }
362
+ interface V1Beta1CreateFeatureRequest {
363
+ /** Feature to create */
364
+ body?: V1Beta1FeatureRequestBody;
365
+ }
366
+ interface V1Beta1CreateFeatureResponse {
367
+ /** Created feature */
368
+ feature?: V1Beta1Feature;
369
+ }
335
370
  interface V1Beta1CreateGroupPreferencesResponse {
336
371
  preferences?: V1Beta1Preference[];
337
372
  }
@@ -509,6 +544,14 @@ interface V1Beta1Feature {
509
544
  /** @format date-time */
510
545
  updated_at?: string;
511
546
  }
547
+ interface V1Beta1FeatureRequestBody {
548
+ /** machine friendly name */
549
+ name?: string;
550
+ /** human friendly title */
551
+ title?: string;
552
+ product_ids?: string[];
553
+ metadata?: object;
554
+ }
512
555
  interface V1Beta1GetBillingAccountResponse {
513
556
  /** Billing account */
514
557
  billing_account?: V1Beta1BillingAccount;
@@ -523,6 +566,10 @@ interface V1Beta1GetCurrentUserResponse {
523
566
  user?: V1Beta1User;
524
567
  serviceuser?: V1Beta1ServiceUser;
525
568
  }
569
+ interface V1Beta1GetFeatureResponse {
570
+ /** Feature */
571
+ feature?: V1Beta1Feature;
572
+ }
526
573
  interface V1Beta1GetGroupResponse {
527
574
  group?: V1Beta1Group;
528
575
  }
@@ -624,6 +671,10 @@ interface V1Beta1GroupRequestBody {
624
671
  /** Metadata object for groups that can hold key value pairs defined in Group Metaschema. The metadata object can be used to store arbitrary information about the group such as labels, descriptions etc. The default Group Metaschema contains labels and descripton fields. Update the Group Metaschema to add more fields.<br/>*Example:*`{"labels": {"key": "value"}, "description": "Group description"}` */
625
672
  metadata?: object;
626
673
  }
674
+ interface V1Beta1HasTrialedResponse {
675
+ /** Has the billing account trialed the plan */
676
+ trialed?: boolean;
677
+ }
627
678
  interface V1Beta1Invitation {
628
679
  /**
629
680
  * The unique invitation identifier.
@@ -1479,6 +1530,10 @@ interface V1Beta1UpdateBillingAccountResponse {
1479
1530
  interface V1Beta1UpdateCurrentUserResponse {
1480
1531
  user?: V1Beta1User;
1481
1532
  }
1533
+ interface V1Beta1UpdateFeatureResponse {
1534
+ /** Updated feature */
1535
+ feature?: V1Beta1Feature;
1536
+ }
1482
1537
  interface V1Beta1UpdateGroupResponse {
1483
1538
  group?: V1Beta1Group;
1484
1539
  }
@@ -1522,13 +1577,22 @@ interface V1Beta1UpdateUserResponse {
1522
1577
  user?: V1Beta1User;
1523
1578
  }
1524
1579
  interface V1Beta1Usage {
1580
+ /** uuid used as an idempotent key */
1525
1581
  id?: string;
1526
1582
  customer_id?: string;
1583
+ /** additional metadata for storing event/service that triggered this usage */
1527
1584
  source?: string;
1528
1585
  description?: string;
1586
+ /**
1587
+ * Type is the type of usage, it can be credit or feature
1588
+ * if credit, the amount is the amount of credits that were consumed
1589
+ * if feature, the amount is the amount of features that were used
1590
+ */
1529
1591
  type?: string;
1530
1592
  /** @format int64 */
1531
1593
  amount?: string;
1594
+ /** user_id is the user that triggered this usage */
1595
+ user_id?: string;
1532
1596
  metadata?: object;
1533
1597
  /** @format date-time */
1534
1598
  created_at?: string;
@@ -1952,6 +2016,39 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
1952
2016
  * @secure
1953
2017
  */
1954
2018
  frontierServiceListFeatures: (params?: RequestParams) => Promise<HttpResponse<V1Beta1ListFeaturesResponse, RpcStatus>>;
2019
+ /**
2020
+ * @description Create a new feature for platform.
2021
+ *
2022
+ * @tags Feature
2023
+ * @name FrontierServiceCreateFeature
2024
+ * @summary Create feature
2025
+ * @request POST:/v1beta1/billing/features
2026
+ * @secure
2027
+ */
2028
+ frontierServiceCreateFeature: (body: V1Beta1CreateFeatureRequest, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateFeatureResponse, RpcStatus>>;
2029
+ /**
2030
+ * @description Get a feature by ID.
2031
+ *
2032
+ * @tags Feature
2033
+ * @name FrontierServiceGetFeature
2034
+ * @summary Get feature
2035
+ * @request GET:/v1beta1/billing/features/{id}
2036
+ * @secure
2037
+ */
2038
+ frontierServiceGetFeature: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetFeatureResponse, RpcStatus>>;
2039
+ /**
2040
+ * @description Update a feature by ID.
2041
+ *
2042
+ * @tags Feature
2043
+ * @name FrontierServiceUpdateFeature
2044
+ * @summary Update feature
2045
+ * @request PUT:/v1beta1/billing/features/{id}
2046
+ * @secure
2047
+ */
2048
+ frontierServiceUpdateFeature: (id: string, body: {
2049
+ /** Feature to update */
2050
+ body?: V1Beta1FeatureRequestBody | undefined;
2051
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdateFeatureResponse, RpcStatus>>;
1955
2052
  /**
1956
2053
  * @description List all plans.
1957
2054
  *
@@ -2382,6 +2479,11 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2382
2479
  * @secure
2383
2480
  */
2384
2481
  frontierServiceCheckFeatureEntitlement: (orgId: string, billingId: string, body: {
2482
+ /**
2483
+ * either provide billing_id of the org or API can infer the default
2484
+ * billing ID from either org_id or project_id, not both
2485
+ */
2486
+ project_id?: string;
2385
2487
  /** feature or product name */
2386
2488
  feature?: string;
2387
2489
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1CheckFeatureEntitlementResponse, RpcStatus>>;
@@ -2528,6 +2630,11 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2528
2630
  * @secure
2529
2631
  */
2530
2632
  frontierServiceCreateBillingUsage: (orgId: string, billingId: string, body: {
2633
+ /**
2634
+ * either provide billing_id of the org or API can infer the default
2635
+ * billing ID from either org_id or project_id, not both
2636
+ */
2637
+ project_id?: string;
2531
2638
  /** Usage to create */
2532
2639
  usages?: V1Beta1Usage[];
2533
2640
  }, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
@@ -2576,6 +2683,42 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2576
2683
  * @secure
2577
2684
  */
2578
2685
  frontierServiceGetBillingBalance: (orgId: string, id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetBillingBalanceResponse, RpcStatus>>;
2686
+ /**
2687
+ * @description Check if a billing account has trialed.
2688
+ *
2689
+ * @tags Billing
2690
+ * @name FrontierServiceHasTrialed
2691
+ * @summary Has trialed
2692
+ * @request GET:/v1beta1/organizations/{org_id}/billing/{id}/plans/{plan_id}/trialed
2693
+ * @secure
2694
+ */
2695
+ frontierServiceHasTrialed: (orgId: string, id: string, planId: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1HasTrialedResponse, RpcStatus>>;
2696
+ /**
2697
+ * @description List all invoices of a billing account.
2698
+ *
2699
+ * @tags Invoice
2700
+ * @name FrontierServiceListInvoices2
2701
+ * @summary List invoices
2702
+ * @request GET:/v1beta1/organizations/{org_id}/billing/invoices
2703
+ * @secure
2704
+ */
2705
+ frontierServiceListInvoices2: (orgId: string, query?: {
2706
+ /** ID of the billing account to list invoices for */
2707
+ billing_id?: string;
2708
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListInvoicesResponse, RpcStatus>>;
2709
+ /**
2710
+ * @description Get the upcoming invoice of a billing account.
2711
+ *
2712
+ * @tags Invoice
2713
+ * @name FrontierServiceGetUpcomingInvoice2
2714
+ * @summary Get upcoming invoice
2715
+ * @request GET:/v1beta1/organizations/{org_id}/billing/invoices/upcoming
2716
+ * @secure
2717
+ */
2718
+ frontierServiceGetUpcomingInvoice2: (orgId: string, query?: {
2719
+ /** ID of the billing account to get the upcoming invoice for */
2720
+ billing_id?: string;
2721
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetUpcomingInvoiceResponse, RpcStatus>>;
2579
2722
  /**
2580
2723
  * @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.
2581
2724
  *
@@ -2867,6 +3010,26 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2867
3010
  * @secure
2868
3011
  */
2869
3012
  frontierServiceUpdateOrganizationRole: (orgId: string, id: string, body: V1Beta1RoleRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdateOrganizationRoleResponse, RpcStatus>>;
3013
+ /**
3014
+ * @description Check if a billing account is entitled to a feature.
3015
+ *
3016
+ * @tags Entitlement
3017
+ * @name FrontierServiceCheckFeatureEntitlement2
3018
+ * @summary Check entitlement
3019
+ * @request POST:/v1beta1/organizations/billing/check
3020
+ * @secure
3021
+ */
3022
+ frontierServiceCheckFeatureEntitlement2: (body: V1Beta1CheckFeatureEntitlementRequest, params?: RequestParams) => Promise<HttpResponse<V1Beta1CheckFeatureEntitlementResponse, RpcStatus>>;
3023
+ /**
3024
+ * @description Report a new billing usage for a billing account.
3025
+ *
3026
+ * @tags Usage
3027
+ * @name FrontierServiceCreateBillingUsage2
3028
+ * @summary Create billing usage
3029
+ * @request POST:/v1beta1/organizations/billing/usages
3030
+ * @secure
3031
+ */
3032
+ frontierServiceCreateBillingUsage2: (body: V1Beta1CreateBillingUsageRequest, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
2870
3033
  /**
2871
3034
  * No description
2872
3035
  *
@@ -3649,4 +3812,4 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
3649
3812
 
3650
3813
  declare const FrontierClient: typeof V1Beta1;
3651
3814
 
3652
- export { BillingAccountAddress, BillingAccountBalance, ChangeSubscriptionRequestPhaseChange, ChangeSubscriptionRequestPlanChange, FrontierClient, ProductBehaviorConfig, ProtobufAny, ProtobufNullValue, RpcStatus, SubscriptionPhase, V1Beta1, V1Beta1AcceptOrganizationInvitationResponse, V1Beta1AddGroupUsersResponse, V1Beta1AddOrganizationUsersResponse, V1Beta1AddPlatformUserRequest, V1Beta1AddPlatformUserResponse, V1Beta1AuditLog, V1Beta1AuditLogActor, V1Beta1AuditLogTarget, V1Beta1AuthCallbackRequest, V1Beta1AuthCallbackResponse, V1Beta1AuthLogoutResponse, V1Beta1AuthStrategy, V1Beta1AuthTokenRequest, V1Beta1AuthTokenResponse, V1Beta1AuthenticateResponse, V1Beta1BatchCheckPermissionBody, V1Beta1BatchCheckPermissionRequest, V1Beta1BatchCheckPermissionResponse, V1Beta1BatchCheckPermissionResponsePair, V1Beta1BillingAccount, V1Beta1BillingAccountRequestBody, V1Beta1BillingTransaction, V1Beta1CancelSubscriptionResponse, V1Beta1ChangeSubscriptionResponse, V1Beta1CheckFeatureEntitlementResponse, V1Beta1CheckFederatedResourcePermissionRequest, V1Beta1CheckFederatedResourcePermissionResponse, V1Beta1CheckResourcePermissionRequest, V1Beta1CheckResourcePermissionResponse, V1Beta1CheckoutProductBody, V1Beta1CheckoutSession, V1Beta1CheckoutSetupBody, V1Beta1CheckoutSubscriptionBody, V1Beta1CreateBillingAccountResponse, V1Beta1CreateBillingUsageResponse, V1Beta1CreateCheckoutResponse, V1Beta1CreateCurrentUserPreferencesRequest, V1Beta1CreateCurrentUserPreferencesResponse, V1Beta1CreateGroupPreferencesResponse, V1Beta1CreateGroupResponse, V1Beta1CreateMetaSchemaResponse, V1Beta1CreateOrganizationAuditLogsResponse, V1Beta1CreateOrganizationDomainResponse, V1Beta1CreateOrganizationInvitationResponse, V1Beta1CreateOrganizationPreferencesResponse, V1Beta1CreateOrganizationResponse, V1Beta1CreateOrganizationRoleResponse, V1Beta1CreatePermissionRequest, V1Beta1CreatePermissionResponse, V1Beta1CreatePlanRequest, V1Beta1CreatePlanResponse, V1Beta1CreatePolicyResponse, V1Beta1CreatePreferencesRequest, V1Beta1CreatePreferencesResponse, V1Beta1CreateProductRequest, V1Beta1CreateProductResponse, V1Beta1CreateProjectPreferencesResponse, V1Beta1CreateProjectResourceResponse, V1Beta1CreateProjectResponse, V1Beta1CreateRelationResponse, V1Beta1CreateRoleResponse, V1Beta1CreateServiceUserKeyResponse, V1Beta1CreateServiceUserRequest, V1Beta1CreateServiceUserResponse, V1Beta1CreateServiceUserSecretResponse, V1Beta1CreateUserPreferencesResponse, V1Beta1CreateUserResponse, V1Beta1DelegatedCheckoutResponse, V1Beta1DeleteBillingAccountResponse, V1Beta1DeleteGroupResponse, V1Beta1DeleteMetaSchemaResponse, V1Beta1DeleteOrganizationDomainResponse, V1Beta1DeleteOrganizationInvitationResponse, V1Beta1DeleteOrganizationResponse, V1Beta1DeleteOrganizationRoleResponse, V1Beta1DeletePermissionResponse, V1Beta1DeletePolicyResponse, V1Beta1DeleteProjectResourceResponse, V1Beta1DeleteProjectResponse, V1Beta1DeleteRelationResponse, V1Beta1DeleteRoleResponse, V1Beta1DeleteServiceUserKeyResponse, V1Beta1DeleteServiceUserResponse, V1Beta1DeleteServiceUserSecretResponse, V1Beta1DeleteUserResponse, V1Beta1DescribePreferencesResponse, V1Beta1DisableGroupResponse, V1Beta1DisableOrganizationResponse, V1Beta1DisableProjectResponse, V1Beta1DisableUserResponse, V1Beta1Domain, V1Beta1EnableGroupResponse, V1Beta1EnableOrganizationResponse, V1Beta1EnableProjectResponse, V1Beta1EnableUserResponse, V1Beta1Feature, V1Beta1GetBillingAccountResponse, V1Beta1GetBillingBalanceResponse, V1Beta1GetCurrentUserResponse, V1Beta1GetGroupResponse, V1Beta1GetJWKsResponse, V1Beta1GetMetaSchemaResponse, V1Beta1GetNamespaceResponse, V1Beta1GetOrganizationAuditLogResponse, V1Beta1GetOrganizationDomainResponse, V1Beta1GetOrganizationInvitationResponse, V1Beta1GetOrganizationResponse, V1Beta1GetOrganizationRoleResponse, V1Beta1GetPermissionResponse, V1Beta1GetPlanResponse, V1Beta1GetPolicyResponse, V1Beta1GetProductResponse, V1Beta1GetProjectResourceResponse, V1Beta1GetProjectResponse, V1Beta1GetRelationResponse, V1Beta1GetServiceUserKeyResponse, V1Beta1GetServiceUserResponse, V1Beta1GetSubscriptionResponse, V1Beta1GetUpcomingInvoiceResponse, V1Beta1GetUserResponse, V1Beta1Group, V1Beta1GroupRequestBody, V1Beta1Invitation, V1Beta1Invoice, V1Beta1JSONWebKey, V1Beta1JoinOrganizationResponse, V1Beta1KeyCredential, V1Beta1ListAllBillingAccountsResponse, V1Beta1ListAllInvoicesResponse, V1Beta1ListAllOrganizationsResponse, V1Beta1ListAllUsersResponse, V1Beta1ListAuthStrategiesResponse, V1Beta1ListBillingAccountsResponse, V1Beta1ListBillingTransactionsResponse, V1Beta1ListCheckoutsResponse, V1Beta1ListCurrentUserGroupsResponse, V1Beta1ListCurrentUserGroupsResponseAccessPair, V1Beta1ListCurrentUserInvitationsResponse, V1Beta1ListCurrentUserPreferencesResponse, V1Beta1ListFeaturesResponse, V1Beta1ListGroupPreferencesResponse, V1Beta1ListGroupUsersResponse, V1Beta1ListGroupUsersResponseRolePair, V1Beta1ListGroupsResponse, V1Beta1ListInvoicesResponse, V1Beta1ListMetaSchemasResponse, V1Beta1ListNamespacesResponse, V1Beta1ListOrganizationAdminsResponse, V1Beta1ListOrganizationAuditLogsResponse, V1Beta1ListOrganizationDomainsResponse, V1Beta1ListOrganizationGroupsResponse, V1Beta1ListOrganizationInvitationsResponse, V1Beta1ListOrganizationPreferencesResponse, V1Beta1ListOrganizationProjectsResponse, V1Beta1ListOrganizationRolesResponse, V1Beta1ListOrganizationServiceUsersResponse, V1Beta1ListOrganizationUsersResponse, V1Beta1ListOrganizationUsersResponseRolePair, V1Beta1ListOrganizationsByCurrentUserResponse, V1Beta1ListOrganizationsByUserResponse, V1Beta1ListOrganizationsResponse, V1Beta1ListPermissionsResponse, V1Beta1ListPlansResponse, V1Beta1ListPlatformUsersResponse, V1Beta1ListPoliciesResponse, V1Beta1ListPreferencesResponse, V1Beta1ListProductsResponse, V1Beta1ListProjectAdminsResponse, V1Beta1ListProjectGroupsResponse, V1Beta1ListProjectGroupsResponseRolePair, V1Beta1ListProjectPreferencesResponse, V1Beta1ListProjectResourcesResponse, V1Beta1ListProjectServiceUsersResponse, V1Beta1ListProjectServiceUsersResponseRolePair, V1Beta1ListProjectUsersResponse, V1Beta1ListProjectUsersResponseRolePair, V1Beta1ListProjectsByCurrentUserResponse, V1Beta1ListProjectsByCurrentUserResponseAccessPair, V1Beta1ListProjectsByUserResponse, V1Beta1ListProjectsResponse, V1Beta1ListRelationsResponse, V1Beta1ListResourcesResponse, V1Beta1ListRolesResponse, V1Beta1ListServiceUserKeysResponse, V1Beta1ListServiceUserSecretsResponse, V1Beta1ListServiceUsersResponse, V1Beta1ListSubscriptionsResponse, V1Beta1ListUserGroupsResponse, V1Beta1ListUserInvitationsResponse, V1Beta1ListUserPreferencesResponse, V1Beta1ListUsersResponse, V1Beta1MetaSchema, V1Beta1MetaSchemaRequestBody, V1Beta1Namespace, V1Beta1Organization, V1Beta1OrganizationRequestBody, V1Beta1PaymentMethod, V1Beta1Permission, V1Beta1PermissionRequestBody, V1Beta1Plan, V1Beta1PlanRequestBody, V1Beta1Policy, V1Beta1PolicyRequestBody, V1Beta1Preference, V1Beta1PreferenceRequestBody, V1Beta1PreferenceTrait, V1Beta1Price, V1Beta1Product, V1Beta1ProductRequestBody, V1Beta1Project, V1Beta1ProjectRequestBody, V1Beta1Relation, V1Beta1RelationRequestBody, V1Beta1RemoveGroupUserResponse, V1Beta1RemoveOrganizationUserResponse, V1Beta1Resource, V1Beta1ResourceRequestBody, V1Beta1Role, V1Beta1RoleRequestBody, V1Beta1SecretCredential, V1Beta1ServiceUser, V1Beta1ServiceUserKey, V1Beta1ServiceUserRequestBody, V1Beta1Subscription, V1Beta1UpdateBillingAccountResponse, V1Beta1UpdateCurrentUserResponse, V1Beta1UpdateGroupResponse, V1Beta1UpdateMetaSchemaResponse, V1Beta1UpdateOrganizationResponse, V1Beta1UpdateOrganizationRoleResponse, V1Beta1UpdatePermissionResponse, V1Beta1UpdatePlanResponse, V1Beta1UpdatePolicyResponse, V1Beta1UpdateProductResponse, V1Beta1UpdateProjectResourceResponse, V1Beta1UpdateProjectResponse, V1Beta1UpdateRoleResponse, V1Beta1UpdateSubscriptionResponse, V1Beta1UpdateUserResponse, V1Beta1Usage, V1Beta1User, V1Beta1UserRequestBody, V1Beta1VerifyOrganizationDomainResponse };
3815
+ export { BillingAccountAddress, BillingAccountBalance, ChangeSubscriptionRequestPhaseChange, ChangeSubscriptionRequestPlanChange, FrontierClient, ProductBehaviorConfig, ProtobufAny, ProtobufNullValue, RpcStatus, SubscriptionPhase, V1Beta1, V1Beta1AcceptOrganizationInvitationResponse, V1Beta1AddGroupUsersResponse, V1Beta1AddOrganizationUsersResponse, V1Beta1AddPlatformUserRequest, V1Beta1AddPlatformUserResponse, V1Beta1AuditLog, V1Beta1AuditLogActor, V1Beta1AuditLogTarget, V1Beta1AuthCallbackRequest, V1Beta1AuthCallbackResponse, V1Beta1AuthLogoutResponse, V1Beta1AuthStrategy, V1Beta1AuthTokenRequest, V1Beta1AuthTokenResponse, V1Beta1AuthenticateResponse, V1Beta1BatchCheckPermissionBody, V1Beta1BatchCheckPermissionRequest, V1Beta1BatchCheckPermissionResponse, V1Beta1BatchCheckPermissionResponsePair, V1Beta1BillingAccount, V1Beta1BillingAccountRequestBody, V1Beta1BillingTransaction, V1Beta1CancelSubscriptionResponse, V1Beta1ChangeSubscriptionResponse, V1Beta1CheckFeatureEntitlementRequest, V1Beta1CheckFeatureEntitlementResponse, V1Beta1CheckFederatedResourcePermissionRequest, V1Beta1CheckFederatedResourcePermissionResponse, V1Beta1CheckResourcePermissionRequest, V1Beta1CheckResourcePermissionResponse, V1Beta1CheckoutProductBody, V1Beta1CheckoutSession, V1Beta1CheckoutSetupBody, V1Beta1CheckoutSubscriptionBody, V1Beta1CreateBillingAccountResponse, V1Beta1CreateBillingUsageRequest, V1Beta1CreateBillingUsageResponse, V1Beta1CreateCheckoutResponse, V1Beta1CreateCurrentUserPreferencesRequest, V1Beta1CreateCurrentUserPreferencesResponse, V1Beta1CreateFeatureRequest, V1Beta1CreateFeatureResponse, V1Beta1CreateGroupPreferencesResponse, V1Beta1CreateGroupResponse, V1Beta1CreateMetaSchemaResponse, V1Beta1CreateOrganizationAuditLogsResponse, V1Beta1CreateOrganizationDomainResponse, V1Beta1CreateOrganizationInvitationResponse, V1Beta1CreateOrganizationPreferencesResponse, V1Beta1CreateOrganizationResponse, V1Beta1CreateOrganizationRoleResponse, V1Beta1CreatePermissionRequest, V1Beta1CreatePermissionResponse, V1Beta1CreatePlanRequest, V1Beta1CreatePlanResponse, V1Beta1CreatePolicyResponse, V1Beta1CreatePreferencesRequest, V1Beta1CreatePreferencesResponse, V1Beta1CreateProductRequest, V1Beta1CreateProductResponse, V1Beta1CreateProjectPreferencesResponse, V1Beta1CreateProjectResourceResponse, V1Beta1CreateProjectResponse, V1Beta1CreateRelationResponse, V1Beta1CreateRoleResponse, V1Beta1CreateServiceUserKeyResponse, V1Beta1CreateServiceUserRequest, V1Beta1CreateServiceUserResponse, V1Beta1CreateServiceUserSecretResponse, V1Beta1CreateUserPreferencesResponse, V1Beta1CreateUserResponse, V1Beta1DelegatedCheckoutResponse, V1Beta1DeleteBillingAccountResponse, V1Beta1DeleteGroupResponse, V1Beta1DeleteMetaSchemaResponse, V1Beta1DeleteOrganizationDomainResponse, V1Beta1DeleteOrganizationInvitationResponse, V1Beta1DeleteOrganizationResponse, V1Beta1DeleteOrganizationRoleResponse, V1Beta1DeletePermissionResponse, V1Beta1DeletePolicyResponse, V1Beta1DeleteProjectResourceResponse, V1Beta1DeleteProjectResponse, V1Beta1DeleteRelationResponse, V1Beta1DeleteRoleResponse, V1Beta1DeleteServiceUserKeyResponse, V1Beta1DeleteServiceUserResponse, V1Beta1DeleteServiceUserSecretResponse, V1Beta1DeleteUserResponse, V1Beta1DescribePreferencesResponse, V1Beta1DisableGroupResponse, V1Beta1DisableOrganizationResponse, V1Beta1DisableProjectResponse, V1Beta1DisableUserResponse, V1Beta1Domain, V1Beta1EnableGroupResponse, V1Beta1EnableOrganizationResponse, V1Beta1EnableProjectResponse, V1Beta1EnableUserResponse, V1Beta1Feature, V1Beta1FeatureRequestBody, V1Beta1GetBillingAccountResponse, V1Beta1GetBillingBalanceResponse, V1Beta1GetCurrentUserResponse, V1Beta1GetFeatureResponse, V1Beta1GetGroupResponse, V1Beta1GetJWKsResponse, V1Beta1GetMetaSchemaResponse, V1Beta1GetNamespaceResponse, V1Beta1GetOrganizationAuditLogResponse, V1Beta1GetOrganizationDomainResponse, V1Beta1GetOrganizationInvitationResponse, V1Beta1GetOrganizationResponse, V1Beta1GetOrganizationRoleResponse, V1Beta1GetPermissionResponse, V1Beta1GetPlanResponse, V1Beta1GetPolicyResponse, V1Beta1GetProductResponse, V1Beta1GetProjectResourceResponse, V1Beta1GetProjectResponse, V1Beta1GetRelationResponse, V1Beta1GetServiceUserKeyResponse, V1Beta1GetServiceUserResponse, V1Beta1GetSubscriptionResponse, V1Beta1GetUpcomingInvoiceResponse, V1Beta1GetUserResponse, V1Beta1Group, V1Beta1GroupRequestBody, V1Beta1HasTrialedResponse, V1Beta1Invitation, V1Beta1Invoice, V1Beta1JSONWebKey, V1Beta1JoinOrganizationResponse, V1Beta1KeyCredential, V1Beta1ListAllBillingAccountsResponse, V1Beta1ListAllInvoicesResponse, V1Beta1ListAllOrganizationsResponse, V1Beta1ListAllUsersResponse, V1Beta1ListAuthStrategiesResponse, V1Beta1ListBillingAccountsResponse, V1Beta1ListBillingTransactionsResponse, V1Beta1ListCheckoutsResponse, V1Beta1ListCurrentUserGroupsResponse, V1Beta1ListCurrentUserGroupsResponseAccessPair, V1Beta1ListCurrentUserInvitationsResponse, V1Beta1ListCurrentUserPreferencesResponse, V1Beta1ListFeaturesResponse, V1Beta1ListGroupPreferencesResponse, V1Beta1ListGroupUsersResponse, V1Beta1ListGroupUsersResponseRolePair, V1Beta1ListGroupsResponse, V1Beta1ListInvoicesResponse, V1Beta1ListMetaSchemasResponse, V1Beta1ListNamespacesResponse, V1Beta1ListOrganizationAdminsResponse, V1Beta1ListOrganizationAuditLogsResponse, V1Beta1ListOrganizationDomainsResponse, V1Beta1ListOrganizationGroupsResponse, V1Beta1ListOrganizationInvitationsResponse, V1Beta1ListOrganizationPreferencesResponse, V1Beta1ListOrganizationProjectsResponse, V1Beta1ListOrganizationRolesResponse, V1Beta1ListOrganizationServiceUsersResponse, V1Beta1ListOrganizationUsersResponse, V1Beta1ListOrganizationUsersResponseRolePair, V1Beta1ListOrganizationsByCurrentUserResponse, V1Beta1ListOrganizationsByUserResponse, V1Beta1ListOrganizationsResponse, V1Beta1ListPermissionsResponse, V1Beta1ListPlansResponse, V1Beta1ListPlatformUsersResponse, V1Beta1ListPoliciesResponse, V1Beta1ListPreferencesResponse, V1Beta1ListProductsResponse, V1Beta1ListProjectAdminsResponse, V1Beta1ListProjectGroupsResponse, V1Beta1ListProjectGroupsResponseRolePair, V1Beta1ListProjectPreferencesResponse, V1Beta1ListProjectResourcesResponse, V1Beta1ListProjectServiceUsersResponse, V1Beta1ListProjectServiceUsersResponseRolePair, V1Beta1ListProjectUsersResponse, V1Beta1ListProjectUsersResponseRolePair, V1Beta1ListProjectsByCurrentUserResponse, V1Beta1ListProjectsByCurrentUserResponseAccessPair, V1Beta1ListProjectsByUserResponse, V1Beta1ListProjectsResponse, V1Beta1ListRelationsResponse, V1Beta1ListResourcesResponse, V1Beta1ListRolesResponse, V1Beta1ListServiceUserKeysResponse, V1Beta1ListServiceUserSecretsResponse, V1Beta1ListServiceUsersResponse, V1Beta1ListSubscriptionsResponse, V1Beta1ListUserGroupsResponse, V1Beta1ListUserInvitationsResponse, V1Beta1ListUserPreferencesResponse, V1Beta1ListUsersResponse, V1Beta1MetaSchema, V1Beta1MetaSchemaRequestBody, V1Beta1Namespace, V1Beta1Organization, V1Beta1OrganizationRequestBody, V1Beta1PaymentMethod, V1Beta1Permission, V1Beta1PermissionRequestBody, V1Beta1Plan, V1Beta1PlanRequestBody, V1Beta1Policy, V1Beta1PolicyRequestBody, V1Beta1Preference, V1Beta1PreferenceRequestBody, V1Beta1PreferenceTrait, V1Beta1Price, V1Beta1Product, V1Beta1ProductRequestBody, V1Beta1Project, V1Beta1ProjectRequestBody, V1Beta1Relation, V1Beta1RelationRequestBody, V1Beta1RemoveGroupUserResponse, V1Beta1RemoveOrganizationUserResponse, V1Beta1Resource, V1Beta1ResourceRequestBody, V1Beta1Role, V1Beta1RoleRequestBody, V1Beta1SecretCredential, V1Beta1ServiceUser, V1Beta1ServiceUserKey, V1Beta1ServiceUserRequestBody, V1Beta1Subscription, V1Beta1UpdateBillingAccountResponse, V1Beta1UpdateCurrentUserResponse, V1Beta1UpdateFeatureResponse, V1Beta1UpdateGroupResponse, V1Beta1UpdateMetaSchemaResponse, V1Beta1UpdateOrganizationResponse, V1Beta1UpdateOrganizationRoleResponse, V1Beta1UpdatePermissionResponse, V1Beta1UpdatePlanResponse, V1Beta1UpdatePolicyResponse, V1Beta1UpdateProductResponse, V1Beta1UpdateProjectResourceResponse, V1Beta1UpdateProjectResponse, V1Beta1UpdateRoleResponse, V1Beta1UpdateSubscriptionResponse, V1Beta1UpdateUserResponse, V1Beta1Usage, V1Beta1User, V1Beta1UserRequestBody, V1Beta1VerifyOrganizationDomainResponse };
package/dist/index.js CHANGED
@@ -577,6 +577,55 @@ var V1Beta1 = class extends HttpClient {
577
577
  secure: true,
578
578
  format: "json"
579
579
  }, params));
580
+ /**
581
+ * @description Create a new feature for platform.
582
+ *
583
+ * @tags Feature
584
+ * @name FrontierServiceCreateFeature
585
+ * @summary Create feature
586
+ * @request POST:/v1beta1/billing/features
587
+ * @secure
588
+ */
589
+ this.frontierServiceCreateFeature = (body, params = {}) => this.request(__spreadValues({
590
+ path: `/v1beta1/billing/features`,
591
+ method: "POST",
592
+ body,
593
+ secure: true,
594
+ type: "application/json" /* Json */,
595
+ format: "json"
596
+ }, params));
597
+ /**
598
+ * @description Get a feature by ID.
599
+ *
600
+ * @tags Feature
601
+ * @name FrontierServiceGetFeature
602
+ * @summary Get feature
603
+ * @request GET:/v1beta1/billing/features/{id}
604
+ * @secure
605
+ */
606
+ this.frontierServiceGetFeature = (id, params = {}) => this.request(__spreadValues({
607
+ path: `/v1beta1/billing/features/${id}`,
608
+ method: "GET",
609
+ secure: true,
610
+ format: "json"
611
+ }, params));
612
+ /**
613
+ * @description Update a feature by ID.
614
+ *
615
+ * @tags Feature
616
+ * @name FrontierServiceUpdateFeature
617
+ * @summary Update feature
618
+ * @request PUT:/v1beta1/billing/features/{id}
619
+ * @secure
620
+ */
621
+ this.frontierServiceUpdateFeature = (id, body, params = {}) => this.request(__spreadValues({
622
+ path: `/v1beta1/billing/features/${id}`,
623
+ method: "PUT",
624
+ body,
625
+ secure: true,
626
+ type: "application/json" /* Json */,
627
+ format: "json"
628
+ }, params));
580
629
  /**
581
630
  * @description List all plans.
582
631
  *
@@ -1432,6 +1481,53 @@ var V1Beta1 = class extends HttpClient {
1432
1481
  secure: true,
1433
1482
  format: "json"
1434
1483
  }, params));
1484
+ /**
1485
+ * @description Check if a billing account has trialed.
1486
+ *
1487
+ * @tags Billing
1488
+ * @name FrontierServiceHasTrialed
1489
+ * @summary Has trialed
1490
+ * @request GET:/v1beta1/organizations/{org_id}/billing/{id}/plans/{plan_id}/trialed
1491
+ * @secure
1492
+ */
1493
+ this.frontierServiceHasTrialed = (orgId, id, planId, params = {}) => this.request(__spreadValues({
1494
+ path: `/v1beta1/organizations/${orgId}/billing/${id}/plans/${planId}/trialed`,
1495
+ method: "GET",
1496
+ secure: true,
1497
+ format: "json"
1498
+ }, params));
1499
+ /**
1500
+ * @description List all invoices of a billing account.
1501
+ *
1502
+ * @tags Invoice
1503
+ * @name FrontierServiceListInvoices2
1504
+ * @summary List invoices
1505
+ * @request GET:/v1beta1/organizations/{org_id}/billing/invoices
1506
+ * @secure
1507
+ */
1508
+ this.frontierServiceListInvoices2 = (orgId, query, params = {}) => this.request(__spreadValues({
1509
+ path: `/v1beta1/organizations/${orgId}/billing/invoices`,
1510
+ method: "GET",
1511
+ query,
1512
+ secure: true,
1513
+ format: "json"
1514
+ }, params));
1515
+ /**
1516
+ * @description Get the upcoming invoice of a billing account.
1517
+ *
1518
+ * @tags Invoice
1519
+ * @name FrontierServiceGetUpcomingInvoice2
1520
+ * @summary Get upcoming invoice
1521
+ * @request GET:/v1beta1/organizations/{org_id}/billing/invoices/upcoming
1522
+ * @secure
1523
+ */
1524
+ this.frontierServiceGetUpcomingInvoice2 = (orgId, query, params = {}) => this.request(__spreadValues({
1525
+ path: `/v1beta1/organizations/${orgId}/billing/invoices/upcoming`,
1526
+ method: "GET",
1527
+ query,
1528
+ secure: true,
1529
+ format: "json"
1530
+ }, params));
1435
1531
  /**
1436
1532
  * @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.
1437
1533
  *
@@ -1843,6 +1939,40 @@ var V1Beta1 = class extends HttpClient {
1843
1939
  secure: true,
1844
1940
  format: "json"
1845
1941
  }, params));
1942
+ /**
1943
+ * @description Check if a billing account is entitled to a feature.
1944
+ *
1945
+ * @tags Entitlement
1946
+ * @name FrontierServiceCheckFeatureEntitlement2
1947
+ * @summary Check entitlement
1948
+ * @request POST:/v1beta1/organizations/billing/check
1949
+ * @secure
1950
+ */
1951
+ this.frontierServiceCheckFeatureEntitlement2 = (body, params = {}) => this.request(__spreadValues({
1952
+ path: `/v1beta1/organizations/billing/check`,
1953
+ method: "POST",
1954
+ body,
1955
+ secure: true,
1956
+ type: "application/json" /* Json */,
1957
+ format: "json"
1958
+ }, params));
1959
+ /**
1960
+ * @description Report a new billing usage for a billing account.
1961
+ *
1962
+ * @tags Usage
1963
+ * @name FrontierServiceCreateBillingUsage2
1964
+ * @summary Create billing usage
1965
+ * @request POST:/v1beta1/organizations/billing/usages
1966
+ * @secure
1967
+ */
1968
+ this.frontierServiceCreateBillingUsage2 = (body, params = {}) => this.request(__spreadValues({
1969
+ path: `/v1beta1/organizations/billing/usages`,
1970
+ method: "POST",
1971
+ body,
1972
+ secure: true,
1973
+ type: "application/json" /* Json */,
1974
+ format: "json"
1975
+ }, params));
1846
1976
  /**
1847
1977
  * No description
1848
1978
  *
package/dist/index.mjs CHANGED
@@ -552,6 +552,55 @@ var V1Beta1 = class extends HttpClient {
552
552
  secure: true,
553
553
  format: "json"
554
554
  }, params));
555
+ /**
556
+ * @description Create a new feature for platform.
557
+ *
558
+ * @tags Feature
559
+ * @name FrontierServiceCreateFeature
560
+ * @summary Create feature
561
+ * @request POST:/v1beta1/billing/features
562
+ * @secure
563
+ */
564
+ this.frontierServiceCreateFeature = (body, params = {}) => this.request(__spreadValues({
565
+ path: `/v1beta1/billing/features`,
566
+ method: "POST",
567
+ body,
568
+ secure: true,
569
+ type: "application/json" /* Json */,
570
+ format: "json"
571
+ }, params));
572
+ /**
573
+ * @description Get a feature by ID.
574
+ *
575
+ * @tags Feature
576
+ * @name FrontierServiceGetFeature
577
+ * @summary Get feature
578
+ * @request GET:/v1beta1/billing/features/{id}
579
+ * @secure
580
+ */
581
+ this.frontierServiceGetFeature = (id, params = {}) => this.request(__spreadValues({
582
+ path: `/v1beta1/billing/features/${id}`,
583
+ method: "GET",
584
+ secure: true,
585
+ format: "json"
586
+ }, params));
587
+ /**
588
+ * @description Update a feature by ID.
589
+ *
590
+ * @tags Feature
591
+ * @name FrontierServiceUpdateFeature
592
+ * @summary Update feature
593
+ * @request PUT:/v1beta1/billing/features/{id}
594
+ * @secure
595
+ */
596
+ this.frontierServiceUpdateFeature = (id, body, params = {}) => this.request(__spreadValues({
597
+ path: `/v1beta1/billing/features/${id}`,
598
+ method: "PUT",
599
+ body,
600
+ secure: true,
601
+ type: "application/json" /* Json */,
602
+ format: "json"
603
+ }, params));
555
604
  /**
556
605
  * @description List all plans.
557
606
  *
@@ -1407,6 +1456,53 @@ var V1Beta1 = class extends HttpClient {
1407
1456
  secure: true,
1408
1457
  format: "json"
1409
1458
  }, params));
1459
+ /**
1460
+ * @description Check if a billing account has trialed.
1461
+ *
1462
+ * @tags Billing
1463
+ * @name FrontierServiceHasTrialed
1464
+ * @summary Has trialed
1465
+ * @request GET:/v1beta1/organizations/{org_id}/billing/{id}/plans/{plan_id}/trialed
1466
+ * @secure
1467
+ */
1468
+ this.frontierServiceHasTrialed = (orgId, id, planId, params = {}) => this.request(__spreadValues({
1469
+ path: `/v1beta1/organizations/${orgId}/billing/${id}/plans/${planId}/trialed`,
1470
+ method: "GET",
1471
+ secure: true,
1472
+ format: "json"
1473
+ }, params));
1474
+ /**
1475
+ * @description List all invoices of a billing account.
1476
+ *
1477
+ * @tags Invoice
1478
+ * @name FrontierServiceListInvoices2
1479
+ * @summary List invoices
1480
+ * @request GET:/v1beta1/organizations/{org_id}/billing/invoices
1481
+ * @secure
1482
+ */
1483
+ this.frontierServiceListInvoices2 = (orgId, query, params = {}) => this.request(__spreadValues({
1484
+ path: `/v1beta1/organizations/${orgId}/billing/invoices`,
1485
+ method: "GET",
1486
+ query,
1487
+ secure: true,
1488
+ format: "json"
1489
+ }, params));
1490
+ /**
1491
+ * @description Get the upcoming invoice of a billing account.
1492
+ *
1493
+ * @tags Invoice
1494
+ * @name FrontierServiceGetUpcomingInvoice2
1495
+ * @summary Get upcoming invoice
1496
+ * @request GET:/v1beta1/organizations/{org_id}/billing/invoices/upcoming
1497
+ * @secure
1498
+ */
1499
+ this.frontierServiceGetUpcomingInvoice2 = (orgId, query, params = {}) => this.request(__spreadValues({
1500
+ path: `/v1beta1/organizations/${orgId}/billing/invoices/upcoming`,
1501
+ method: "GET",
1502
+ query,
1503
+ secure: true,
1504
+ format: "json"
1505
+ }, params));
1410
1506
  /**
1411
1507
  * @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.
1412
1508
  *
@@ -1818,6 +1914,40 @@ var V1Beta1 = class extends HttpClient {
1818
1914
  secure: true,
1819
1915
  format: "json"
1820
1916
  }, params));
1917
+ /**
1918
+ * @description Check if a billing account is entitled to a feature.
1919
+ *
1920
+ * @tags Entitlement
1921
+ * @name FrontierServiceCheckFeatureEntitlement2
1922
+ * @summary Check entitlement
1923
+ * @request POST:/v1beta1/organizations/billing/check
1924
+ * @secure
1925
+ */
1926
+ this.frontierServiceCheckFeatureEntitlement2 = (body, params = {}) => this.request(__spreadValues({
1927
+ path: `/v1beta1/organizations/billing/check`,
1928
+ method: "POST",
1929
+ body,
1930
+ secure: true,
1931
+ type: "application/json" /* Json */,
1932
+ format: "json"
1933
+ }, params));
1934
+ /**
1935
+ * @description Report a new billing usage for a billing account.
1936
+ *
1937
+ * @tags Usage
1938
+ * @name FrontierServiceCreateBillingUsage2
1939
+ * @summary Create billing usage
1940
+ * @request POST:/v1beta1/organizations/billing/usages
1941
+ * @secure
1942
+ */
1943
+ this.frontierServiceCreateBillingUsage2 = (body, params = {}) => this.request(__spreadValues({
1944
+ path: `/v1beta1/organizations/billing/usages`,
1945
+ method: "POST",
1946
+ body,
1947
+ secure: true,
1948
+ type: "application/json" /* Json */,
1949
+ format: "json"
1950
+ }, params));
1821
1951
  /**
1822
1952
  * No description
1823
1953
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raystack/frontier",
3
- "version": "0.8.36",
3
+ "version": "0.8.37",
4
4
  "description": "A js library for frontier",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",