@flashbacktech/flashbackclient 0.2.2 → 0.2.4
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/api/client.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { CreateRepoRequest, CreateRepoResponse, CreateRepoKeyRequest, CreateRepo
|
|
|
2
2
|
import { IApiClient, ProviderType } from './interfaces';
|
|
3
3
|
import { ActivateResponse, DeactivateResponse, LoginBody, LoginResponse, LogoutResponse, OAuth2ResponseDTO, RefreshTokenErrorResponse, RefreshTokenResponse, RegisterBody, RegisterResponse, ResetPasswordBody, Web3RegisterBody } from './types/auth';
|
|
4
4
|
import { StatsQueryParams, StatsResponse, NodeStatsMinuteResponse, NodeStatsDailyResponse, NodeStatsQueryParams, UnitStatsResponse, RepoStatsResponse, NodeStatsDailyQueryParams, BucketStatsResponse, StatsQueryWithBucketParams, NodeStatsQueryWithBucketParams, NodeStatsDailyQueryWithBucketParams } from './types/stats';
|
|
5
|
-
import {
|
|
5
|
+
import { NodeInfoResponse, RegisterRequest } from './types/bridge';
|
|
6
6
|
import { GetOrganizationKeysResponse } from './types/noderegistration';
|
|
7
7
|
import { QuotaResponse } from './types/quota';
|
|
8
8
|
import { DeviceListResponse, DeviceDetailsResponse, SessionListResponse, TrustDeviceRequest, TrustDeviceResponse, UntrustDeviceResponse, RemoveDeviceResponse, RevokeSessionResponse, RevokeAllSessionsResponse, SessionHeartbeatResponse, DeviceInfo } from './types/device';
|
|
9
|
-
import { BuySubscriptionRequest, BuySubscriptionResponse, GetSubscriptionsResponse, MySubscriptionResponse, PaymentsListResponse, PaymentsQueryParams, CancelSubscriptionResponse } from './types/subscriptions';
|
|
9
|
+
import { BuySubscriptionRequest, BuySubscriptionResponse, GetSubscriptionsResponse, MySubscriptionResponse, PaymentsListResponse, PaymentsQueryParams, CancelSubscriptionResponse, GetCheckoutSessionStatusResponse, CreateBillingPortalResponse } from './types/subscriptions';
|
|
10
10
|
import { WorkspaceTypes } from '.';
|
|
11
11
|
import { MFAMethodsResponse, MFASetupRequest, MFASetupResponse, MFAStatusResponse, MFAVerificationSetupRequest, MFAVerificationSetupResponse, MFAEnableRequest, MFAEnableResponse, MFADisableResponse, MFAPrimaryRequest, MFAPrimaryResponse, MFAResetResponse, MFAOrganizationEnforceRequest, MFAOrganizationEnforceResponse, MagicLinkActivationRequest, MagicLinkActivationResponse, MagicLinkSendResponse, PasskeyAuthOptionsResult, PasskeyCompleteRegistrationRequest, PasskeyCompleteRegistrationResponse, MFAVerificationRequest, MFAVerificationLoginResponse, MFAResetRequest } from './types/mfa';
|
|
12
12
|
import { DeleteSettingsRequest, GetSettingsResponse, PartialUpdateSettingsRequest, UpdateSettingsRequest } from './types/settings';
|
|
@@ -111,13 +111,20 @@ export declare class ApiClient implements IApiClient {
|
|
|
111
111
|
getBucketStats: (params?: {
|
|
112
112
|
bucketId?: string[];
|
|
113
113
|
}) => Promise<BucketStatsResponse>;
|
|
114
|
-
getNodeInfo: () => Promise<
|
|
114
|
+
getNodeInfo: () => Promise<NodeInfoResponse>;
|
|
115
|
+
getPrivateNodeInfo: (orgId: string) => Promise<NodeInfoResponse>;
|
|
116
|
+
deletePrivateNode: (orgId: string, nodeId: string) => Promise<{
|
|
117
|
+
success: boolean;
|
|
118
|
+
message: string;
|
|
119
|
+
}>;
|
|
115
120
|
sendFeedbackEmail: (data: FormData) => Promise<ActionResponse>;
|
|
116
121
|
getSubscriptions: () => Promise<GetSubscriptionsResponse>;
|
|
117
122
|
getMySubscription: () => Promise<MySubscriptionResponse>;
|
|
118
123
|
buySubscription: (data: BuySubscriptionRequest) => Promise<BuySubscriptionResponse>;
|
|
119
124
|
getPayments: (params?: PaymentsQueryParams) => Promise<PaymentsListResponse>;
|
|
120
125
|
cancelSubscription: () => Promise<CancelSubscriptionResponse>;
|
|
126
|
+
createBillingPortal: () => Promise<CreateBillingPortalResponse>;
|
|
127
|
+
getCheckoutSessionStatus: (id: string) => Promise<GetCheckoutSessionStatusResponse>;
|
|
121
128
|
getDevices: () => Promise<DeviceListResponse>;
|
|
122
129
|
getDeviceDetails: (deviceId: string) => Promise<DeviceDetailsResponse>;
|
|
123
130
|
trustDevice: (data: TrustDeviceRequest) => Promise<TrustDeviceResponse>;
|
package/dist/api/client.js
CHANGED
|
@@ -261,6 +261,12 @@ class ApiClient {
|
|
|
261
261
|
this.getNodeInfo = async () => {
|
|
262
262
|
return this.makeRequest('node', 'GET', null);
|
|
263
263
|
};
|
|
264
|
+
this.getPrivateNodeInfo = async (orgId) => {
|
|
265
|
+
return this.makeRequest(`organization/${orgId}/nodes`, 'GET', null);
|
|
266
|
+
};
|
|
267
|
+
this.deletePrivateNode = async (orgId, nodeId) => {
|
|
268
|
+
return this.makeRequest(`organization/${orgId}/node/${nodeId}`, 'DELETE', null);
|
|
269
|
+
};
|
|
264
270
|
this.sendFeedbackEmail = async (data) => {
|
|
265
271
|
return this.makeRequest('email/feedback', 'POST', data);
|
|
266
272
|
};
|
|
@@ -287,6 +293,12 @@ class ApiClient {
|
|
|
287
293
|
this.cancelSubscription = async () => {
|
|
288
294
|
return this.makeRequest('subscriptions/cancel', 'POST', null);
|
|
289
295
|
};
|
|
296
|
+
this.createBillingPortal = async () => {
|
|
297
|
+
return this.makeRequest('subscriptions/portal', 'POST', null);
|
|
298
|
+
};
|
|
299
|
+
this.getCheckoutSessionStatus = async (id) => {
|
|
300
|
+
return this.makeRequest(`subscriptions/checkout-session/${id}`, 'GET', null);
|
|
301
|
+
};
|
|
290
302
|
////// Device Management API
|
|
291
303
|
this.getDevices = async () => {
|
|
292
304
|
return this.makeRequest('devices', 'GET', null);
|
|
@@ -63,3 +63,18 @@ export interface CancelSubscriptionResponse {
|
|
|
63
63
|
message?: string;
|
|
64
64
|
error_code?: string;
|
|
65
65
|
}
|
|
66
|
+
export interface CreateBillingPortalResponse {
|
|
67
|
+
success: boolean;
|
|
68
|
+
url?: string;
|
|
69
|
+
message?: string;
|
|
70
|
+
error_code?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface GetCheckoutSessionStatusResponse {
|
|
73
|
+
success: boolean;
|
|
74
|
+
id?: string;
|
|
75
|
+
status?: string | null;
|
|
76
|
+
payment_status?: string | null;
|
|
77
|
+
subscriptionId?: string | null;
|
|
78
|
+
message?: string;
|
|
79
|
+
error_code?: string;
|
|
80
|
+
}
|