@raystack/frontier 0.12.0 → 0.14.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.d.ts CHANGED
@@ -106,6 +106,10 @@ interface SubscriptionPhase {
106
106
  effective_at?: string;
107
107
  plan_id?: string;
108
108
  }
109
+ interface WebhookSecret {
110
+ id?: string;
111
+ value?: string;
112
+ }
109
113
  interface ProtobufAny {
110
114
  '@type'?: string;
111
115
  [key: string]: any;
@@ -114,7 +118,7 @@ interface ProtobufAny {
114
118
  * `NullValue` is a singleton enumeration to represent the null value for the
115
119
  * `Value` type union.
116
120
  *
117
- * The JSON representation for `NullValue` is JSON `null`.
121
+ * The JSON representation for `NullValue` is JSON `null`.
118
122
  *
119
123
  * - NULL_VALUE: Null value.
120
124
  * @default "NULL_VALUE"
@@ -280,6 +284,7 @@ interface V1Beta1BillingTransaction {
280
284
  user?: V1Beta1User;
281
285
  customer?: V1Beta1BillingAccount;
282
286
  }
287
+ type V1Beta1BillingWebhookCallbackResponse = object;
283
288
  type V1Beta1CancelSubscriptionResponse = object;
284
289
  interface V1Beta1ChangeSubscriptionResponse {
285
290
  phase?: SubscriptionPhase;
@@ -488,6 +493,12 @@ interface V1Beta1CreateUserPreferencesResponse {
488
493
  interface V1Beta1CreateUserResponse {
489
494
  user?: V1Beta1User;
490
495
  }
496
+ interface V1Beta1CreateWebhookRequest {
497
+ body?: V1Beta1WebhookRequestBody;
498
+ }
499
+ interface V1Beta1CreateWebhookResponse {
500
+ webhook?: V1Beta1Webhook;
501
+ }
491
502
  interface V1Beta1DelegatedCheckoutResponse {
492
503
  /** subscription if created */
493
504
  subscription?: V1Beta1Subscription;
@@ -512,6 +523,7 @@ type V1Beta1DeleteServiceUserJWKResponse = object;
512
523
  type V1Beta1DeleteServiceUserResponse = object;
513
524
  type V1Beta1DeleteServiceUserTokenResponse = object;
514
525
  type V1Beta1DeleteUserResponse = object;
526
+ type V1Beta1DeleteWebhookResponse = object;
515
527
  interface V1Beta1DescribePreferencesResponse {
516
528
  traits?: V1Beta1PreferenceTrait[];
517
529
  }
@@ -1032,6 +1044,9 @@ interface V1Beta1ListUsersResponse {
1032
1044
  count?: number;
1033
1045
  users?: V1Beta1User[];
1034
1046
  }
1047
+ interface V1Beta1ListWebhooksResponse {
1048
+ webhooks?: V1Beta1Webhook[];
1049
+ }
1035
1050
  interface V1Beta1MetaSchema {
1036
1051
  /**
1037
1052
  * The unique metaschema uuid.
@@ -1409,6 +1424,13 @@ interface V1Beta1RelationRequestBody {
1409
1424
  }
1410
1425
  type V1Beta1RemoveGroupUserResponse = object;
1411
1426
  type V1Beta1RemoveOrganizationUserResponse = object;
1427
+ interface V1Beta1RemovePlatformUserRequest {
1428
+ /** The user id to remove from the the platform. */
1429
+ user_id?: string;
1430
+ /** The service user id to remove from the the platform. */
1431
+ serviceuser_id?: string;
1432
+ }
1433
+ type V1Beta1RemovePlatformUserResponse = object;
1412
1434
  interface V1Beta1Resource {
1413
1435
  id?: string;
1414
1436
  /** Name of the resource. Must be unique within the project. */
@@ -1646,6 +1668,9 @@ interface V1Beta1UpdateSubscriptionResponse {
1646
1668
  interface V1Beta1UpdateUserResponse {
1647
1669
  user?: V1Beta1User;
1648
1670
  }
1671
+ interface V1Beta1UpdateWebhookResponse {
1672
+ webhook?: V1Beta1Webhook;
1673
+ }
1649
1674
  interface V1Beta1Usage {
1650
1675
  /** uuid used as an idempotent key */
1651
1676
  id?: string;
@@ -1722,6 +1747,36 @@ interface V1Beta1UserRequestBody {
1722
1747
  interface V1Beta1VerifyOrganizationDomainResponse {
1723
1748
  state?: string;
1724
1749
  }
1750
+ interface V1Beta1Webhook {
1751
+ id?: string;
1752
+ description?: string;
1753
+ url?: string;
1754
+ subscribed_events?: string[];
1755
+ /** headers to be sent with the webhook */
1756
+ headers?: Record<string, string>;
1757
+ /**
1758
+ * secret to sign the payload, there could be multiple enabled secrets for a webhook
1759
+ * but only one will be used to sign the payload, this is useful for rotating secrets
1760
+ */
1761
+ secrets?: WebhookSecret[];
1762
+ state?: string;
1763
+ metadata?: object;
1764
+ /** @format date-time */
1765
+ created_at?: string;
1766
+ /** @format date-time */
1767
+ updated_at?: string;
1768
+ }
1769
+ interface V1Beta1WebhookRequestBody {
1770
+ /** URL to send the webhook to (valid absolute URI via RFC 3986) */
1771
+ url?: string;
1772
+ description?: string;
1773
+ /** events to subscribe to, if empty all events are subscribed */
1774
+ subscribed_events?: string[];
1775
+ /** headers to be sent with the webhook */
1776
+ headers?: Record<string, string>;
1777
+ state?: string;
1778
+ metadata?: object;
1779
+ }
1725
1780
 
1726
1781
  declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1727
1782
  /**
@@ -1840,6 +1895,16 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
1840
1895
  * @secure
1841
1896
  */
1842
1897
  adminServiceAddPlatformUser: (body: V1Beta1AddPlatformUserRequest, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1898
+ /**
1899
+ * @description Removes a user from the platform.
1900
+ *
1901
+ * @tags Platform
1902
+ * @name AdminServiceRemovePlatformUser
1903
+ * @summary Remove platform user
1904
+ * @request POST:/v1beta1/admin/platform/users/remove
1905
+ * @secure
1906
+ */
1907
+ adminServiceRemovePlatformUser: (body: V1Beta1RemovePlatformUserRequest, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1843
1908
  /**
1844
1909
  * @description Lists all the projects from all the organizations in a Frontier instance. It can be filtered by organization and state.
1845
1910
  *
@@ -1918,6 +1983,48 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
1918
1983
  /** The state to filter by. It can be enabled or disabled. */
1919
1984
  state?: string;
1920
1985
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListAllUsersResponse, RpcStatus>>;
1986
+ /**
1987
+ * @description List all webhooks.
1988
+ *
1989
+ * @tags Webhook
1990
+ * @name AdminServiceListWebhooks
1991
+ * @summary List webhooks
1992
+ * @request GET:/v1beta1/admin/webhooks
1993
+ * @secure
1994
+ */
1995
+ adminServiceListWebhooks: (params?: RequestParams) => Promise<HttpResponse<V1Beta1ListWebhooksResponse, RpcStatus>>;
1996
+ /**
1997
+ * @description Create a new webhook.
1998
+ *
1999
+ * @tags Webhook
2000
+ * @name AdminServiceCreateWebhook
2001
+ * @summary Create webhook
2002
+ * @request POST:/v1beta1/admin/webhooks
2003
+ * @secure
2004
+ */
2005
+ adminServiceCreateWebhook: (body: V1Beta1CreateWebhookRequest, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateWebhookResponse, RpcStatus>>;
2006
+ /**
2007
+ * @description Delete a webhook.
2008
+ *
2009
+ * @tags Webhook
2010
+ * @name AdminServiceDeleteWebhook
2011
+ * @summary Delete webhook
2012
+ * @request DELETE:/v1beta1/admin/webhooks/{id}
2013
+ * @secure
2014
+ */
2015
+ adminServiceDeleteWebhook: (id: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
2016
+ /**
2017
+ * @description Update a webhook.
2018
+ *
2019
+ * @tags Webhook
2020
+ * @name AdminServiceUpdateWebhook
2021
+ * @summary Update webhook
2022
+ * @request PUT:/v1beta1/admin/webhooks/{id}
2023
+ * @secure
2024
+ */
2025
+ adminServiceUpdateWebhook: (id: string, body: {
2026
+ body?: V1Beta1WebhookRequestBody | undefined;
2027
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdateWebhookResponse, RpcStatus>>;
1921
2028
  /**
1922
2029
  * @description Returns a list of identity providers configured on an instance level in Frontier. e.g Google, AzureAD, Github etc
1923
2030
  *
@@ -2222,6 +2329,16 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2222
2329
  /** Product to update */
2223
2330
  body?: V1Beta1ProductRequestBody | undefined;
2224
2331
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdateProductResponse, RpcStatus>>;
2332
+ /**
2333
+ * @description Accepts a Billing webhook and processes it.
2334
+ *
2335
+ * @tags Webhook
2336
+ * @name FrontierServiceBillingWebhookCallback
2337
+ * @summary Accept Billing webhook
2338
+ * @request POST:/v1beta1/billing/webhooks/callback/{provider}
2339
+ * @secure
2340
+ */
2341
+ frontierServiceBillingWebhookCallback: (provider: string, body: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
2225
2342
  /**
2226
2343
  * @description Returns true if a principal has required permissions to access a resource and false otherwise.<br/> Note the principal can be a user or a service account. Frontier will extract principal from the current logged in session cookie (if any), or the client id and secret (in case of service users) or the access token.
2227
2344
  *
@@ -3953,4 +4070,4 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
3953
4070
 
3954
4071
  declare const FrontierClient: typeof V1Beta1;
3955
4072
 
3956
- export { BillingAccountAddress, BillingAccountBalance, BillingAccountTax, 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, V1Beta1CreateServiceUserCredentialResponse, V1Beta1CreateServiceUserJWKResponse, V1Beta1CreateServiceUserRequest, V1Beta1CreateServiceUserResponse, V1Beta1CreateServiceUserTokenResponse, V1Beta1CreateUserPreferencesResponse, V1Beta1CreateUserResponse, V1Beta1DelegatedCheckoutResponse, V1Beta1DeleteBillingAccountResponse, V1Beta1DeleteGroupResponse, V1Beta1DeleteMetaSchemaResponse, V1Beta1DeleteOrganizationDomainResponse, V1Beta1DeleteOrganizationInvitationResponse, V1Beta1DeleteOrganizationResponse, V1Beta1DeleteOrganizationRoleResponse, V1Beta1DeletePermissionResponse, V1Beta1DeletePolicyResponse, V1Beta1DeleteProjectResourceResponse, V1Beta1DeleteProjectResponse, V1Beta1DeleteRelationResponse, V1Beta1DeleteRoleResponse, V1Beta1DeleteServiceUserCredentialResponse, V1Beta1DeleteServiceUserJWKResponse, V1Beta1DeleteServiceUserResponse, V1Beta1DeleteServiceUserTokenResponse, 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, V1Beta1GetServiceUserJWKResponse, 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, V1Beta1ListServiceUserCredentialsResponse, V1Beta1ListServiceUserJWKsResponse, V1Beta1ListServiceUserTokensResponse, 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, V1Beta1RevertBillingUsageRequest, V1Beta1RevertBillingUsageResponse, V1Beta1Role, V1Beta1RoleRequestBody, V1Beta1SecretCredential, V1Beta1ServiceUser, V1Beta1ServiceUserJWK, V1Beta1ServiceUserRequestBody, V1Beta1ServiceUserToken, V1Beta1Subscription, V1Beta1UpdateBillingAccountResponse, V1Beta1UpdateCurrentUserResponse, V1Beta1UpdateFeatureResponse, V1Beta1UpdateGroupResponse, V1Beta1UpdateMetaSchemaResponse, V1Beta1UpdateOrganizationResponse, V1Beta1UpdateOrganizationRoleResponse, V1Beta1UpdatePermissionResponse, V1Beta1UpdatePlanResponse, V1Beta1UpdatePolicyResponse, V1Beta1UpdateProductResponse, V1Beta1UpdateProjectResourceResponse, V1Beta1UpdateProjectResponse, V1Beta1UpdateRoleResponse, V1Beta1UpdateSubscriptionResponse, V1Beta1UpdateUserResponse, V1Beta1Usage, V1Beta1User, V1Beta1UserRequestBody, V1Beta1VerifyOrganizationDomainResponse };
4073
+ export { BillingAccountAddress, BillingAccountBalance, BillingAccountTax, 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, V1Beta1BillingWebhookCallbackResponse, 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, V1Beta1CreateServiceUserCredentialResponse, V1Beta1CreateServiceUserJWKResponse, V1Beta1CreateServiceUserRequest, V1Beta1CreateServiceUserResponse, V1Beta1CreateServiceUserTokenResponse, V1Beta1CreateUserPreferencesResponse, V1Beta1CreateUserResponse, V1Beta1CreateWebhookRequest, V1Beta1CreateWebhookResponse, V1Beta1DelegatedCheckoutResponse, V1Beta1DeleteBillingAccountResponse, V1Beta1DeleteGroupResponse, V1Beta1DeleteMetaSchemaResponse, V1Beta1DeleteOrganizationDomainResponse, V1Beta1DeleteOrganizationInvitationResponse, V1Beta1DeleteOrganizationResponse, V1Beta1DeleteOrganizationRoleResponse, V1Beta1DeletePermissionResponse, V1Beta1DeletePolicyResponse, V1Beta1DeleteProjectResourceResponse, V1Beta1DeleteProjectResponse, V1Beta1DeleteRelationResponse, V1Beta1DeleteRoleResponse, V1Beta1DeleteServiceUserCredentialResponse, V1Beta1DeleteServiceUserJWKResponse, V1Beta1DeleteServiceUserResponse, V1Beta1DeleteServiceUserTokenResponse, V1Beta1DeleteUserResponse, V1Beta1DeleteWebhookResponse, 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, V1Beta1GetServiceUserJWKResponse, 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, V1Beta1ListServiceUserCredentialsResponse, V1Beta1ListServiceUserJWKsResponse, V1Beta1ListServiceUserTokensResponse, V1Beta1ListServiceUsersResponse, V1Beta1ListSubscriptionsResponse, V1Beta1ListUserGroupsResponse, V1Beta1ListUserInvitationsResponse, V1Beta1ListUserPreferencesResponse, V1Beta1ListUsersResponse, V1Beta1ListWebhooksResponse, V1Beta1MetaSchema, V1Beta1MetaSchemaRequestBody, V1Beta1Namespace, V1Beta1Organization, V1Beta1OrganizationRequestBody, V1Beta1PaymentMethod, V1Beta1Permission, V1Beta1PermissionRequestBody, V1Beta1Plan, V1Beta1PlanRequestBody, V1Beta1Policy, V1Beta1PolicyRequestBody, V1Beta1Preference, V1Beta1PreferenceRequestBody, V1Beta1PreferenceTrait, V1Beta1Price, V1Beta1Product, V1Beta1ProductRequestBody, V1Beta1Project, V1Beta1ProjectRequestBody, V1Beta1Relation, V1Beta1RelationRequestBody, V1Beta1RemoveGroupUserResponse, V1Beta1RemoveOrganizationUserResponse, V1Beta1RemovePlatformUserRequest, V1Beta1RemovePlatformUserResponse, V1Beta1Resource, V1Beta1ResourceRequestBody, V1Beta1RevertBillingUsageRequest, V1Beta1RevertBillingUsageResponse, V1Beta1Role, V1Beta1RoleRequestBody, V1Beta1SecretCredential, V1Beta1ServiceUser, V1Beta1ServiceUserJWK, V1Beta1ServiceUserRequestBody, V1Beta1ServiceUserToken, V1Beta1Subscription, V1Beta1UpdateBillingAccountResponse, V1Beta1UpdateCurrentUserResponse, V1Beta1UpdateFeatureResponse, V1Beta1UpdateGroupResponse, V1Beta1UpdateMetaSchemaResponse, V1Beta1UpdateOrganizationResponse, V1Beta1UpdateOrganizationRoleResponse, V1Beta1UpdatePermissionResponse, V1Beta1UpdatePlanResponse, V1Beta1UpdatePolicyResponse, V1Beta1UpdateProductResponse, V1Beta1UpdateProjectResourceResponse, V1Beta1UpdateProjectResponse, V1Beta1UpdateRoleResponse, V1Beta1UpdateSubscriptionResponse, V1Beta1UpdateUserResponse, V1Beta1UpdateWebhookResponse, V1Beta1Usage, V1Beta1User, V1Beta1UserRequestBody, V1Beta1VerifyOrganizationDomainResponse, V1Beta1Webhook, V1Beta1WebhookRequestBody, WebhookSecret };
package/dist/index.js CHANGED
@@ -355,6 +355,23 @@ var V1Beta1 = class extends HttpClient {
355
355
  type: "application/json" /* Json */,
356
356
  format: "json"
357
357
  }, params));
358
+ /**
359
+ * @description Removes a user from the platform.
360
+ *
361
+ * @tags Platform
362
+ * @name AdminServiceRemovePlatformUser
363
+ * @summary Remove platform user
364
+ * @request POST:/v1beta1/admin/platform/users/remove
365
+ * @secure
366
+ */
367
+ this.adminServiceRemovePlatformUser = (body, params = {}) => this.request(__spreadValues({
368
+ path: `/v1beta1/admin/platform/users/remove`,
369
+ method: "POST",
370
+ body,
371
+ secure: true,
372
+ type: "application/json" /* Json */,
373
+ format: "json"
374
+ }, params));
358
375
  /**
359
376
  * @description Lists all the projects from all the organizations in a Frontier instance. It can be filtered by organization and state.
360
377
  *
@@ -419,6 +436,70 @@ var V1Beta1 = class extends HttpClient {
419
436
  secure: true,
420
437
  format: "json"
421
438
  }, params));
439
+ /**
440
+ * @description List all webhooks.
441
+ *
442
+ * @tags Webhook
443
+ * @name AdminServiceListWebhooks
444
+ * @summary List webhooks
445
+ * @request GET:/v1beta1/admin/webhooks
446
+ * @secure
447
+ */
448
+ this.adminServiceListWebhooks = (params = {}) => this.request(__spreadValues({
449
+ path: `/v1beta1/admin/webhooks`,
450
+ method: "GET",
451
+ secure: true,
452
+ format: "json"
453
+ }, params));
454
+ /**
455
+ * @description Create a new webhook.
456
+ *
457
+ * @tags Webhook
458
+ * @name AdminServiceCreateWebhook
459
+ * @summary Create webhook
460
+ * @request POST:/v1beta1/admin/webhooks
461
+ * @secure
462
+ */
463
+ this.adminServiceCreateWebhook = (body, params = {}) => this.request(__spreadValues({
464
+ path: `/v1beta1/admin/webhooks`,
465
+ method: "POST",
466
+ body,
467
+ secure: true,
468
+ type: "application/json" /* Json */,
469
+ format: "json"
470
+ }, params));
471
+ /**
472
+ * @description Delete a webhook.
473
+ *
474
+ * @tags Webhook
475
+ * @name AdminServiceDeleteWebhook
476
+ * @summary Delete webhook
477
+ * @request DELETE:/v1beta1/admin/webhooks/{id}
478
+ * @secure
479
+ */
480
+ this.adminServiceDeleteWebhook = (id, params = {}) => this.request(__spreadValues({
481
+ path: `/v1beta1/admin/webhooks/${id}`,
482
+ method: "DELETE",
483
+ secure: true,
484
+ format: "json"
485
+ }, params));
486
+ /**
487
+ * @description Update a webhook.
488
+ *
489
+ * @tags Webhook
490
+ * @name AdminServiceUpdateWebhook
491
+ * @summary Update webhook
492
+ * @request PUT:/v1beta1/admin/webhooks/{id}
493
+ * @secure
494
+ */
495
+ this.adminServiceUpdateWebhook = (id, body, params = {}) => this.request(__spreadValues({
496
+ path: `/v1beta1/admin/webhooks/${id}`,
497
+ method: "PUT",
498
+ body,
499
+ secure: true,
500
+ type: "application/json" /* Json */,
501
+ format: "json"
502
+ }, params));
422
503
  /**
423
504
  * @description Returns a list of identity providers configured on an instance level in Frontier. e.g Google, AzureAD, Github etc
424
505
  *
@@ -771,6 +852,23 @@ var V1Beta1 = class extends HttpClient {
771
852
  type: "application/json" /* Json */,
772
853
  format: "json"
773
854
  }, params));
855
+ /**
856
+ * @description Accepts a Billing webhook and processes it.
857
+ *
858
+ * @tags Webhook
859
+ * @name FrontierServiceBillingWebhookCallback
860
+ * @summary Accept Billing webhook
861
+ * @request POST:/v1beta1/billing/webhooks/callback/{provider}
862
+ * @secure
863
+ */
864
+ this.frontierServiceBillingWebhookCallback = (provider, body, params = {}) => this.request(__spreadValues({
865
+ path: `/v1beta1/billing/webhooks/callback/${provider}`,
866
+ method: "POST",
867
+ body,
868
+ secure: true,
869
+ type: "application/json" /* Json */,
870
+ format: "json"
871
+ }, params));
774
872
  /**
775
873
  * @description Returns true if a principal has required permissions to access a resource and false otherwise.<br/> Note the principal can be a user or a service account. Frontier will extract principal from the current logged in session cookie (if any), or the client id and secret (in case of service users) or the access token.
776
874
  *
package/dist/index.mjs CHANGED
@@ -330,6 +330,23 @@ var V1Beta1 = class extends HttpClient {
330
330
  type: "application/json" /* Json */,
331
331
  format: "json"
332
332
  }, params));
333
+ /**
334
+ * @description Removes a user from the platform.
335
+ *
336
+ * @tags Platform
337
+ * @name AdminServiceRemovePlatformUser
338
+ * @summary Remove platform user
339
+ * @request POST:/v1beta1/admin/platform/users/remove
340
+ * @secure
341
+ */
342
+ this.adminServiceRemovePlatformUser = (body, params = {}) => this.request(__spreadValues({
343
+ path: `/v1beta1/admin/platform/users/remove`,
344
+ method: "POST",
345
+ body,
346
+ secure: true,
347
+ type: "application/json" /* Json */,
348
+ format: "json"
349
+ }, params));
333
350
  /**
334
351
  * @description Lists all the projects from all the organizations in a Frontier instance. It can be filtered by organization and state.
335
352
  *
@@ -394,6 +411,70 @@ var V1Beta1 = class extends HttpClient {
394
411
  secure: true,
395
412
  format: "json"
396
413
  }, params));
414
+ /**
415
+ * @description List all webhooks.
416
+ *
417
+ * @tags Webhook
418
+ * @name AdminServiceListWebhooks
419
+ * @summary List webhooks
420
+ * @request GET:/v1beta1/admin/webhooks
421
+ * @secure
422
+ */
423
+ this.adminServiceListWebhooks = (params = {}) => this.request(__spreadValues({
424
+ path: `/v1beta1/admin/webhooks`,
425
+ method: "GET",
426
+ secure: true,
427
+ format: "json"
428
+ }, params));
429
+ /**
430
+ * @description Create a new webhook.
431
+ *
432
+ * @tags Webhook
433
+ * @name AdminServiceCreateWebhook
434
+ * @summary Create webhook
435
+ * @request POST:/v1beta1/admin/webhooks
436
+ * @secure
437
+ */
438
+ this.adminServiceCreateWebhook = (body, params = {}) => this.request(__spreadValues({
439
+ path: `/v1beta1/admin/webhooks`,
440
+ method: "POST",
441
+ body,
442
+ secure: true,
443
+ type: "application/json" /* Json */,
444
+ format: "json"
445
+ }, params));
446
+ /**
447
+ * @description Delete a webhook.
448
+ *
449
+ * @tags Webhook
450
+ * @name AdminServiceDeleteWebhook
451
+ * @summary Delete webhook
452
+ * @request DELETE:/v1beta1/admin/webhooks/{id}
453
+ * @secure
454
+ */
455
+ this.adminServiceDeleteWebhook = (id, params = {}) => this.request(__spreadValues({
456
+ path: `/v1beta1/admin/webhooks/${id}`,
457
+ method: "DELETE",
458
+ secure: true,
459
+ format: "json"
460
+ }, params));
461
+ /**
462
+ * @description Update a webhook.
463
+ *
464
+ * @tags Webhook
465
+ * @name AdminServiceUpdateWebhook
466
+ * @summary Update webhook
467
+ * @request PUT:/v1beta1/admin/webhooks/{id}
468
+ * @secure
469
+ */
470
+ this.adminServiceUpdateWebhook = (id, body, params = {}) => this.request(__spreadValues({
471
+ path: `/v1beta1/admin/webhooks/${id}`,
472
+ method: "PUT",
473
+ body,
474
+ secure: true,
475
+ type: "application/json" /* Json */,
476
+ format: "json"
477
+ }, params));
397
478
  /**
398
479
  * @description Returns a list of identity providers configured on an instance level in Frontier. e.g Google, AzureAD, Github etc
399
480
  *
@@ -746,6 +827,23 @@ var V1Beta1 = class extends HttpClient {
746
827
  type: "application/json" /* Json */,
747
828
  format: "json"
748
829
  }, params));
830
+ /**
831
+ * @description Accepts a Billing webhook and processes it.
832
+ *
833
+ * @tags Webhook
834
+ * @name FrontierServiceBillingWebhookCallback
835
+ * @summary Accept Billing webhook
836
+ * @request POST:/v1beta1/billing/webhooks/callback/{provider}
837
+ * @secure
838
+ */
839
+ this.frontierServiceBillingWebhookCallback = (provider, body, params = {}) => this.request(__spreadValues({
840
+ path: `/v1beta1/billing/webhooks/callback/${provider}`,
841
+ method: "POST",
842
+ body,
843
+ secure: true,
844
+ type: "application/json" /* Json */,
845
+ format: "json"
846
+ }, params));
749
847
  /**
750
848
  * @description Returns true if a principal has required permissions to access a resource and false otherwise.<br/> Note the principal can be a user or a service account. Frontier will extract principal from the current logged in session cookie (if any), or the client id and secret (in case of service users) or the access token.
751
849
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raystack/frontier",
3
- "version": "0.12.0",
3
+ "version": "0.14.0",
4
4
  "description": "A js library for frontier",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -303,6 +303,11 @@ interface FrontierClientOptions {
303
303
  dateFormat?: string;
304
304
  shortDateFormat?: string;
305
305
  billing?: FrontierClientBillingOptions;
306
+ messages?: {
307
+ billing?: {
308
+ plan_change?: Record<string, string>;
309
+ };
310
+ };
306
311
  }
307
312
  interface InitialState {
308
313
  sessionId?: string | null;
@@ -421,6 +426,10 @@ interface SubscriptionPhase {
421
426
  effective_at?: string;
422
427
  plan_id?: string;
423
428
  }
429
+ interface WebhookSecret {
430
+ id?: string;
431
+ value?: string;
432
+ }
424
433
  interface ProtobufAny {
425
434
  '@type'?: string;
426
435
  [key: string]: any;
@@ -782,6 +791,12 @@ interface V1Beta1CreateUserPreferencesResponse {
782
791
  interface V1Beta1CreateUserResponse {
783
792
  user?: V1Beta1User;
784
793
  }
794
+ interface V1Beta1CreateWebhookRequest {
795
+ body?: V1Beta1WebhookRequestBody;
796
+ }
797
+ interface V1Beta1CreateWebhookResponse {
798
+ webhook?: V1Beta1Webhook;
799
+ }
785
800
  interface V1Beta1DelegatedCheckoutResponse {
786
801
  /** subscription if created */
787
802
  subscription?: V1Beta1Subscription;
@@ -1299,6 +1314,9 @@ interface V1Beta1ListUsersResponse {
1299
1314
  count?: number;
1300
1315
  users?: V1Beta1User[];
1301
1316
  }
1317
+ interface V1Beta1ListWebhooksResponse {
1318
+ webhooks?: V1Beta1Webhook[];
1319
+ }
1302
1320
  interface V1Beta1MetaSchema {
1303
1321
  /**
1304
1322
  * The unique metaschema uuid.
@@ -1674,6 +1692,12 @@ interface V1Beta1RelationRequestBody {
1674
1692
  relation?: string;
1675
1693
  subject_sub_relation?: string;
1676
1694
  }
1695
+ interface V1Beta1RemovePlatformUserRequest {
1696
+ /** The user id to remove from the the platform. */
1697
+ user_id?: string;
1698
+ /** The service user id to remove from the the platform. */
1699
+ serviceuser_id?: string;
1700
+ }
1677
1701
  interface V1Beta1Resource {
1678
1702
  id?: string;
1679
1703
  /** Name of the resource. Must be unique within the project. */
@@ -1910,6 +1934,9 @@ interface V1Beta1UpdateSubscriptionResponse {
1910
1934
  interface V1Beta1UpdateUserResponse {
1911
1935
  user?: V1Beta1User;
1912
1936
  }
1937
+ interface V1Beta1UpdateWebhookResponse {
1938
+ webhook?: V1Beta1Webhook;
1939
+ }
1913
1940
  interface V1Beta1Usage {
1914
1941
  /** uuid used as an idempotent key */
1915
1942
  id?: string;
@@ -1986,6 +2013,36 @@ interface V1Beta1UserRequestBody {
1986
2013
  interface V1Beta1VerifyOrganizationDomainResponse {
1987
2014
  state?: string;
1988
2015
  }
2016
+ interface V1Beta1Webhook {
2017
+ id?: string;
2018
+ description?: string;
2019
+ url?: string;
2020
+ subscribed_events?: string[];
2021
+ /** headers to be sent with the webhook */
2022
+ headers?: Record<string, string>;
2023
+ /**
2024
+ * secret to sign the payload, there could be multiple enabled secrets for a webhook
2025
+ * but only one will be used to sign the payload, this is useful for rotating secrets
2026
+ */
2027
+ secrets?: WebhookSecret[];
2028
+ state?: string;
2029
+ metadata?: object;
2030
+ /** @format date-time */
2031
+ created_at?: string;
2032
+ /** @format date-time */
2033
+ updated_at?: string;
2034
+ }
2035
+ interface V1Beta1WebhookRequestBody {
2036
+ /** URL to send the webhook to (valid absolute URI via RFC 3986) */
2037
+ url?: string;
2038
+ description?: string;
2039
+ /** events to subscribe to, if empty all events are subscribed */
2040
+ subscribed_events?: string[];
2041
+ /** headers to be sent with the webhook */
2042
+ headers?: Record<string, string>;
2043
+ state?: string;
2044
+ metadata?: object;
2045
+ }
1989
2046
 
1990
2047
  declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
1991
2048
  /**
@@ -2104,6 +2161,16 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2104
2161
  * @secure
2105
2162
  */
2106
2163
  adminServiceAddPlatformUser: (body: V1Beta1AddPlatformUserRequest, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
2164
+ /**
2165
+ * @description Removes a user from the platform.
2166
+ *
2167
+ * @tags Platform
2168
+ * @name AdminServiceRemovePlatformUser
2169
+ * @summary Remove platform user
2170
+ * @request POST:/v1beta1/admin/platform/users/remove
2171
+ * @secure
2172
+ */
2173
+ adminServiceRemovePlatformUser: (body: V1Beta1RemovePlatformUserRequest, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
2107
2174
  /**
2108
2175
  * @description Lists all the projects from all the organizations in a Frontier instance. It can be filtered by organization and state.
2109
2176
  *
@@ -2182,6 +2249,48 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2182
2249
  /** The state to filter by. It can be enabled or disabled. */
2183
2250
  state?: string;
2184
2251
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListAllUsersResponse, RpcStatus>>;
2252
+ /**
2253
+ * @description List all webhooks.
2254
+ *
2255
+ * @tags Webhook
2256
+ * @name AdminServiceListWebhooks
2257
+ * @summary List webhooks
2258
+ * @request GET:/v1beta1/admin/webhooks
2259
+ * @secure
2260
+ */
2261
+ adminServiceListWebhooks: (params?: RequestParams) => Promise<HttpResponse<V1Beta1ListWebhooksResponse, RpcStatus>>;
2262
+ /**
2263
+ * @description Create a new webhook.
2264
+ *
2265
+ * @tags Webhook
2266
+ * @name AdminServiceCreateWebhook
2267
+ * @summary Create webhook
2268
+ * @request POST:/v1beta1/admin/webhooks
2269
+ * @secure
2270
+ */
2271
+ adminServiceCreateWebhook: (body: V1Beta1CreateWebhookRequest, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateWebhookResponse, RpcStatus>>;
2272
+ /**
2273
+ * @description Delete a webhook.
2274
+ *
2275
+ * @tags Webhook
2276
+ * @name AdminServiceDeleteWebhook
2277
+ * @summary Delete webhook
2278
+ * @request DELETE:/v1beta1/admin/webhooks/{id}
2279
+ * @secure
2280
+ */
2281
+ adminServiceDeleteWebhook: (id: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
2282
+ /**
2283
+ * @description Update a webhook.
2284
+ *
2285
+ * @tags Webhook
2286
+ * @name AdminServiceUpdateWebhook
2287
+ * @summary Update webhook
2288
+ * @request PUT:/v1beta1/admin/webhooks/{id}
2289
+ * @secure
2290
+ */
2291
+ adminServiceUpdateWebhook: (id: string, body: {
2292
+ body?: V1Beta1WebhookRequestBody | undefined;
2293
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdateWebhookResponse, RpcStatus>>;
2185
2294
  /**
2186
2295
  * @description Returns a list of identity providers configured on an instance level in Frontier. e.g Google, AzureAD, Github etc
2187
2296
  *
@@ -2486,6 +2595,16 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2486
2595
  /** Product to update */
2487
2596
  body?: V1Beta1ProductRequestBody | undefined;
2488
2597
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdateProductResponse, RpcStatus>>;
2598
+ /**
2599
+ * @description Accepts a Billing webhook and processes it.
2600
+ *
2601
+ * @tags Webhook
2602
+ * @name FrontierServiceBillingWebhookCallback
2603
+ * @summary Accept Billing webhook
2604
+ * @request POST:/v1beta1/billing/webhooks/callback/{provider}
2605
+ * @secure
2606
+ */
2607
+ frontierServiceBillingWebhookCallback: (provider: string, body: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
2489
2608
  /**
2490
2609
  * @description Returns true if a principal has required permissions to access a resource and false otherwise.<br/> Note the principal can be a user or a service account. Frontier will extract principal from the current logged in session cookie (if any), or the client id and secret (in case of service users) or the access token.
2491
2610
  *