@raystack/frontier 0.8.41 → 0.9.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
@@ -72,6 +72,15 @@ interface BillingAccountBalance {
72
72
  /** @format date-time */
73
73
  updated_at?: string;
74
74
  }
75
+ interface BillingAccountTax {
76
+ /**
77
+ * tax type like "vat", "gst", "sales_tax" or if it's
78
+ * provider specific us_ein, uk_vat, in_gst, etc
79
+ */
80
+ type?: string;
81
+ /** unique identifier provided by the tax agency */
82
+ id?: string;
83
+ }
75
84
  interface ChangeSubscriptionRequestPhaseChange {
76
85
  /** should the upcoming changes be cancelled */
77
86
  cancel_upcoming_changes?: boolean;
@@ -231,11 +240,13 @@ interface V1Beta1BillingAccount {
231
240
  provider?: string;
232
241
  currency?: string;
233
242
  state?: string;
243
+ tax_data?: BillingAccountTax[];
234
244
  metadata?: object;
235
245
  /** @format date-time */
236
246
  created_at?: string;
237
247
  /** @format date-time */
238
248
  updated_at?: string;
249
+ organization?: V1Beta1Organization;
239
250
  }
240
251
  interface V1Beta1BillingAccountRequestBody {
241
252
  name?: string;
@@ -243,6 +254,7 @@ interface V1Beta1BillingAccountRequestBody {
243
254
  phone?: string;
244
255
  address?: BillingAccountAddress;
245
256
  currency?: string;
257
+ tax_data?: BillingAccountTax[];
246
258
  metadata?: object;
247
259
  }
248
260
  interface V1Beta1BillingTransaction {
@@ -261,6 +273,8 @@ interface V1Beta1BillingTransaction {
261
273
  created_at?: string;
262
274
  /** @format date-time */
263
275
  updated_at?: string;
276
+ user?: V1Beta1User;
277
+ customer?: V1Beta1BillingAccount;
264
278
  }
265
279
  type V1Beta1CancelSubscriptionResponse = object;
266
280
  interface V1Beta1ChangeSubscriptionResponse {
@@ -331,6 +345,12 @@ interface V1Beta1CheckoutSubscriptionBody {
331
345
  plan?: string;
332
346
  skip_trial?: boolean;
333
347
  cancel_after_trial?: boolean;
348
+ /**
349
+ * provider_coupon_id is the coupon code that will be applied to the subscription
350
+ * generated by the billing provider, this will be deprecated once coupons are
351
+ * managed by the platform
352
+ */
353
+ provider_coupon_id?: string;
334
354
  }
335
355
  interface V1Beta1CreateBillingAccountResponse {
336
356
  /** Created billing account */
@@ -745,6 +765,7 @@ interface V1Beta1Invoice {
745
765
  metadata?: object;
746
766
  /** @format date-time */
747
767
  created_at?: string;
768
+ customer?: V1Beta1BillingAccount;
748
769
  }
749
770
  /** JSON Web Key as specified in RFC 7517 */
750
771
  interface V1Beta1JSONWebKey {
@@ -1540,6 +1561,8 @@ interface V1Beta1Subscription {
1540
1561
  /** @format date-time */
1541
1562
  billing_cycle_anchor_at?: string;
1542
1563
  phases?: SubscriptionPhase[];
1564
+ customer?: V1Beta1BillingAccount;
1565
+ plan?: V1Beta1Plan;
1543
1566
  }
1544
1567
  interface V1Beta1UpdateBillingAccountResponse {
1545
1568
  /** Updated billing account */
@@ -2490,7 +2513,9 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2490
2513
  * @request GET:/v1beta1/organizations/{org_id}/billing
2491
2514
  * @secure
2492
2515
  */
2493
- frontierServiceListBillingAccounts: (orgId: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListBillingAccountsResponse, RpcStatus>>;
2516
+ frontierServiceListBillingAccounts: (orgId: string, query?: {
2517
+ expand?: string[];
2518
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListBillingAccountsResponse, RpcStatus>>;
2494
2519
  /**
2495
2520
  * @description Create a new billing account for an organization.
2496
2521
  *
@@ -2562,6 +2587,7 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2562
2587
  */
2563
2588
  frontierServiceListInvoices: (orgId: string, billingId: string, query?: {
2564
2589
  nonzero_amount_only?: boolean;
2590
+ expand?: string[];
2565
2591
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListInvoicesResponse, RpcStatus>>;
2566
2592
  /**
2567
2593
  * @description Get the upcoming invoice of a billing account.
@@ -2586,6 +2612,7 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2586
2612
  /** Filter subscriptions by state */
2587
2613
  state?: string;
2588
2614
  plan?: string;
2615
+ expand?: string[];
2589
2616
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListSubscriptionsResponse, RpcStatus>>;
2590
2617
  /**
2591
2618
  * @description Get a subscription by ID.
@@ -2596,7 +2623,9 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2596
2623
  * @request GET:/v1beta1/organizations/{org_id}/billing/{billing_id}/subscriptions/{id}
2597
2624
  * @secure
2598
2625
  */
2599
- frontierServiceGetSubscription: (orgId: string, billingId: string, id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetSubscriptionResponse, RpcStatus>>;
2626
+ frontierServiceGetSubscription: (orgId: string, billingId: string, id: string, query?: {
2627
+ expand?: string[];
2628
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetSubscriptionResponse, RpcStatus>>;
2600
2629
  /**
2601
2630
  * @description Update a subscription by ID.
2602
2631
  *
@@ -2656,6 +2685,7 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2656
2685
  frontierServiceListBillingTransactions: (orgId: string, billingId: string, query?: {
2657
2686
  /** @format date-time */
2658
2687
  since?: string;
2688
+ expand?: string[];
2659
2689
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListBillingTransactionsResponse, RpcStatus>>;
2660
2690
  /**
2661
2691
  * @description Report a new billing usage for a billing account.
@@ -2686,6 +2716,7 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2686
2716
  */
2687
2717
  frontierServiceGetBillingAccount: (orgId: string, id: string, query?: {
2688
2718
  with_payment_methods?: boolean;
2719
+ expand?: string[];
2689
2720
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetBillingAccountResponse, RpcStatus>>;
2690
2721
  /**
2691
2722
  * @description Delete a billing account by ID.
@@ -2743,6 +2774,7 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2743
2774
  /** ID of the billing account to list invoices for */
2744
2775
  billing_id?: string;
2745
2776
  nonzero_amount_only?: boolean;
2777
+ expand?: string[];
2746
2778
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListInvoicesResponse, RpcStatus>>;
2747
2779
  /**
2748
2780
  * @description Get the upcoming invoice of a billing account.
@@ -3860,4 +3892,4 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
3860
3892
 
3861
3893
  declare const FrontierClient: typeof V1Beta1;
3862
3894
 
3863
- 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, V1Beta1RevertBillingUsageRequest, V1Beta1RevertBillingUsageResponse, 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 };
3895
+ 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, 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, V1Beta1RevertBillingUsageRequest, V1Beta1RevertBillingUsageResponse, 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
@@ -1218,9 +1218,10 @@ var V1Beta1 = class extends HttpClient {
1218
1218
  * @request GET:/v1beta1/organizations/{org_id}/billing
1219
1219
  * @secure
1220
1220
  */
1221
- this.frontierServiceListBillingAccounts = (orgId, params = {}) => this.request(__spreadValues({
1221
+ this.frontierServiceListBillingAccounts = (orgId, query, params = {}) => this.request(__spreadValues({
1222
1222
  path: `/v1beta1/organizations/${orgId}/billing`,
1223
1223
  method: "GET",
1224
+ query,
1224
1225
  secure: true,
1225
1226
  format: "json"
1226
1227
  }, params));
@@ -1346,9 +1347,10 @@ var V1Beta1 = class extends HttpClient {
1346
1347
  * @request GET:/v1beta1/organizations/{org_id}/billing/{billing_id}/subscriptions/{id}
1347
1348
  * @secure
1348
1349
  */
1349
- this.frontierServiceGetSubscription = (orgId, billingId, id, params = {}) => this.request(__spreadValues({
1350
+ this.frontierServiceGetSubscription = (orgId, billingId, id, query, params = {}) => this.request(__spreadValues({
1350
1351
  path: `/v1beta1/organizations/${orgId}/billing/${billingId}/subscriptions/${id}`,
1351
1352
  method: "GET",
1353
+ query,
1352
1354
  secure: true,
1353
1355
  format: "json"
1354
1356
  }, params));
package/dist/index.mjs CHANGED
@@ -1193,9 +1193,10 @@ var V1Beta1 = class extends HttpClient {
1193
1193
  * @request GET:/v1beta1/organizations/{org_id}/billing
1194
1194
  * @secure
1195
1195
  */
1196
- this.frontierServiceListBillingAccounts = (orgId, params = {}) => this.request(__spreadValues({
1196
+ this.frontierServiceListBillingAccounts = (orgId, query, params = {}) => this.request(__spreadValues({
1197
1197
  path: `/v1beta1/organizations/${orgId}/billing`,
1198
1198
  method: "GET",
1199
+ query,
1199
1200
  secure: true,
1200
1201
  format: "json"
1201
1202
  }, params));
@@ -1321,9 +1322,10 @@ var V1Beta1 = class extends HttpClient {
1321
1322
  * @request GET:/v1beta1/organizations/{org_id}/billing/{billing_id}/subscriptions/{id}
1322
1323
  * @secure
1323
1324
  */
1324
- this.frontierServiceGetSubscription = (orgId, billingId, id, params = {}) => this.request(__spreadValues({
1325
+ this.frontierServiceGetSubscription = (orgId, billingId, id, query, params = {}) => this.request(__spreadValues({
1325
1326
  path: `/v1beta1/organizations/${orgId}/billing/${billingId}/subscriptions/${id}`,
1326
1327
  method: "GET",
1328
+ query,
1327
1329
  secure: true,
1328
1330
  format: "json"
1329
1331
  }, params));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raystack/frontier",
3
- "version": "0.8.41",
3
+ "version": "0.9.0",
4
4
  "description": "A js library for frontier",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -225,7 +225,7 @@ declare const router: Router<Route<any, "/", "/", string, "__root__", _tanstack_
225
225
  organizationId: string;
226
226
  tempShowBilling?: boolean | undefined;
227
227
  tempShowTokens?: boolean | undefined;
228
- }, _tanstack_react_router.AnyContext, Route<Route<_tanstack_react_router.RootRoute<_tanstack_react_router.AnyContext, unknown, {}, _tanstack_react_router.RouteContext, Pick<OrganizationProfileProps, "organizationId" | "tempShowBilling" | "tempShowTokens">>, "/billing", "/billing", string, "/billing", {}, unknown, {}, {}, {}, {}, _tanstack_react_router.RouteContext, {
228
+ }, _tanstack_react_router.AnyContext, (Route<Route<_tanstack_react_router.RootRoute<_tanstack_react_router.AnyContext, unknown, {}, _tanstack_react_router.RouteContext, Pick<OrganizationProfileProps, "organizationId" | "tempShowBilling" | "tempShowTokens">>, "/billing", "/billing", string, "/billing", {}, unknown, {}, {}, {}, {}, _tanstack_react_router.RouteContext, {
229
229
  organizationId: string;
230
230
  tempShowBilling?: boolean | undefined;
231
231
  tempShowTokens?: boolean | undefined;
@@ -237,7 +237,19 @@ declare const router: Router<Route<any, "/", "/", string, "__root__", _tanstack_
237
237
  organizationId: string;
238
238
  tempShowBilling?: boolean | undefined;
239
239
  tempShowTokens?: boolean | undefined;
240
- }, _tanstack_react_router.AnyContext, unknown, _tanstack_react_router.AnyRoute>[], _tanstack_react_router.AnyRoute> | Route<_tanstack_react_router.RootRoute<_tanstack_react_router.AnyContext, unknown, {}, _tanstack_react_router.RouteContext, Pick<OrganizationProfileProps, "organizationId" | "tempShowBilling" | "tempShowTokens">>, "/plans", "/plans", string, "/plans", {}, unknown, {}, {}, {}, {}, _tanstack_react_router.RouteContext, {
240
+ }, _tanstack_react_router.AnyContext, unknown, _tanstack_react_router.AnyRoute> | Route<Route<_tanstack_react_router.RootRoute<_tanstack_react_router.AnyContext, unknown, {}, _tanstack_react_router.RouteContext, Pick<OrganizationProfileProps, "organizationId" | "tempShowBilling" | "tempShowTokens">>, "/billing", "/billing", string, "/billing", {}, unknown, {}, {}, {}, {}, _tanstack_react_router.RouteContext, {
241
+ organizationId: string;
242
+ tempShowBilling?: boolean | undefined;
243
+ tempShowTokens?: boolean | undefined;
244
+ }, _tanstack_react_router.AnyContext, unknown, _tanstack_react_router.AnyRoute>, "/cycle-switch/$planId", "/billing/cycle-switch/$planId", string, "/billing/cycle-switch/$planId", {}, unknown, {}, {}, {
245
+ planId: string;
246
+ }, {
247
+ planId: string;
248
+ }, _tanstack_react_router.RouteContext, {
249
+ organizationId: string;
250
+ tempShowBilling?: boolean | undefined;
251
+ tempShowTokens?: boolean | undefined;
252
+ }, _tanstack_react_router.AnyContext, unknown, _tanstack_react_router.AnyRoute>)[], _tanstack_react_router.AnyRoute> | Route<_tanstack_react_router.RootRoute<_tanstack_react_router.AnyContext, unknown, {}, _tanstack_react_router.RouteContext, Pick<OrganizationProfileProps, "organizationId" | "tempShowBilling" | "tempShowTokens">>, "/plans", "/plans", string, "/plans", {}, unknown, {}, {}, {}, {}, _tanstack_react_router.RouteContext, {
241
253
  organizationId: string;
242
254
  tempShowBilling?: boolean | undefined;
243
255
  tempShowTokens?: boolean | undefined;
@@ -278,8 +290,11 @@ interface FrontierClientBillingOptions {
278
290
  cancelUrl?: string;
279
291
  hideDecimals?: boolean;
280
292
  cancelAfterTrial?: boolean;
293
+ showPerMonthPrice?: boolean;
294
+ tokenProductId?: string;
281
295
  }
282
296
  interface FrontierClientOptions {
297
+ theme?: 'dark' | 'light';
283
298
  endpoint?: string;
284
299
  redirectSignup?: string;
285
300
  redirectLogin?: string;
@@ -372,6 +387,15 @@ interface BillingAccountBalance {
372
387
  /** @format date-time */
373
388
  updated_at?: string;
374
389
  }
390
+ interface BillingAccountTax {
391
+ /**
392
+ * tax type like "vat", "gst", "sales_tax" or if it's
393
+ * provider specific us_ein, uk_vat, in_gst, etc
394
+ */
395
+ type?: string;
396
+ /** unique identifier provided by the tax agency */
397
+ id?: string;
398
+ }
375
399
  interface ChangeSubscriptionRequestPhaseChange {
376
400
  /** should the upcoming changes be cancelled */
377
401
  cancel_upcoming_changes?: boolean;
@@ -513,11 +537,13 @@ interface V1Beta1BillingAccount {
513
537
  provider?: string;
514
538
  currency?: string;
515
539
  state?: string;
540
+ tax_data?: BillingAccountTax[];
516
541
  metadata?: object;
517
542
  /** @format date-time */
518
543
  created_at?: string;
519
544
  /** @format date-time */
520
545
  updated_at?: string;
546
+ organization?: V1Beta1Organization;
521
547
  }
522
548
  interface V1Beta1BillingAccountRequestBody {
523
549
  name?: string;
@@ -525,6 +551,7 @@ interface V1Beta1BillingAccountRequestBody {
525
551
  phone?: string;
526
552
  address?: BillingAccountAddress;
527
553
  currency?: string;
554
+ tax_data?: BillingAccountTax[];
528
555
  metadata?: object;
529
556
  }
530
557
  interface V1Beta1BillingTransaction {
@@ -543,6 +570,8 @@ interface V1Beta1BillingTransaction {
543
570
  created_at?: string;
544
571
  /** @format date-time */
545
572
  updated_at?: string;
573
+ user?: V1Beta1User;
574
+ customer?: V1Beta1BillingAccount;
546
575
  }
547
576
  interface V1Beta1ChangeSubscriptionResponse {
548
577
  phase?: SubscriptionPhase;
@@ -612,6 +641,12 @@ interface V1Beta1CheckoutSubscriptionBody {
612
641
  plan?: string;
613
642
  skip_trial?: boolean;
614
643
  cancel_after_trial?: boolean;
644
+ /**
645
+ * provider_coupon_id is the coupon code that will be applied to the subscription
646
+ * generated by the billing provider, this will be deprecated once coupons are
647
+ * managed by the platform
648
+ */
649
+ provider_coupon_id?: string;
615
650
  }
616
651
  interface V1Beta1CreateBillingAccountResponse {
617
652
  /** Created billing account */
@@ -999,6 +1034,7 @@ interface V1Beta1Invoice {
999
1034
  metadata?: object;
1000
1035
  /** @format date-time */
1001
1036
  created_at?: string;
1037
+ customer?: V1Beta1BillingAccount;
1002
1038
  }
1003
1039
  /** JSON Web Key as specified in RFC 7517 */
1004
1040
  interface V1Beta1JSONWebKey {
@@ -1790,6 +1826,8 @@ interface V1Beta1Subscription {
1790
1826
  /** @format date-time */
1791
1827
  billing_cycle_anchor_at?: string;
1792
1828
  phases?: SubscriptionPhase[];
1829
+ customer?: V1Beta1BillingAccount;
1830
+ plan?: V1Beta1Plan;
1793
1831
  }
1794
1832
  interface V1Beta1UpdateBillingAccountResponse {
1795
1833
  /** Updated billing account */
@@ -2740,7 +2778,9 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2740
2778
  * @request GET:/v1beta1/organizations/{org_id}/billing
2741
2779
  * @secure
2742
2780
  */
2743
- frontierServiceListBillingAccounts: (orgId: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListBillingAccountsResponse, RpcStatus>>;
2781
+ frontierServiceListBillingAccounts: (orgId: string, query?: {
2782
+ expand?: string[];
2783
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListBillingAccountsResponse, RpcStatus>>;
2744
2784
  /**
2745
2785
  * @description Create a new billing account for an organization.
2746
2786
  *
@@ -2812,6 +2852,7 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2812
2852
  */
2813
2853
  frontierServiceListInvoices: (orgId: string, billingId: string, query?: {
2814
2854
  nonzero_amount_only?: boolean;
2855
+ expand?: string[];
2815
2856
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListInvoicesResponse, RpcStatus>>;
2816
2857
  /**
2817
2858
  * @description Get the upcoming invoice of a billing account.
@@ -2836,6 +2877,7 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2836
2877
  /** Filter subscriptions by state */
2837
2878
  state?: string;
2838
2879
  plan?: string;
2880
+ expand?: string[];
2839
2881
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListSubscriptionsResponse, RpcStatus>>;
2840
2882
  /**
2841
2883
  * @description Get a subscription by ID.
@@ -2846,7 +2888,9 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2846
2888
  * @request GET:/v1beta1/organizations/{org_id}/billing/{billing_id}/subscriptions/{id}
2847
2889
  * @secure
2848
2890
  */
2849
- frontierServiceGetSubscription: (orgId: string, billingId: string, id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetSubscriptionResponse, RpcStatus>>;
2891
+ frontierServiceGetSubscription: (orgId: string, billingId: string, id: string, query?: {
2892
+ expand?: string[];
2893
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetSubscriptionResponse, RpcStatus>>;
2850
2894
  /**
2851
2895
  * @description Update a subscription by ID.
2852
2896
  *
@@ -2906,6 +2950,7 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2906
2950
  frontierServiceListBillingTransactions: (orgId: string, billingId: string, query?: {
2907
2951
  /** @format date-time */
2908
2952
  since?: string;
2953
+ expand?: string[];
2909
2954
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListBillingTransactionsResponse, RpcStatus>>;
2910
2955
  /**
2911
2956
  * @description Report a new billing usage for a billing account.
@@ -2936,6 +2981,7 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2936
2981
  */
2937
2982
  frontierServiceGetBillingAccount: (orgId: string, id: string, query?: {
2938
2983
  with_payment_methods?: boolean;
2984
+ expand?: string[];
2939
2985
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetBillingAccountResponse, RpcStatus>>;
2940
2986
  /**
2941
2987
  * @description Delete a billing account by ID.
@@ -2993,6 +3039,7 @@ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDat
2993
3039
  /** ID of the billing account to list invoices for */
2994
3040
  billing_id?: string;
2995
3041
  nonzero_amount_only?: boolean;
3042
+ expand?: string[];
2996
3043
  }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListInvoicesResponse, RpcStatus>>;
2997
3044
  /**
2998
3045
  * @description Get the upcoming invoice of a billing account.