@borealise/api 1.0.7 → 1.0.8
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.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +5 -3
- package/dist/index.mjs +5 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -628,10 +628,11 @@ interface SubscriptionStatus {
|
|
|
628
628
|
cancelAtPeriodEnd: boolean;
|
|
629
629
|
currentPeriodEnd: string | null;
|
|
630
630
|
}
|
|
631
|
-
interface
|
|
631
|
+
interface CreateIntentResponse {
|
|
632
632
|
success: boolean;
|
|
633
633
|
data: {
|
|
634
|
-
|
|
634
|
+
subscriptionId: string;
|
|
635
|
+
clientSecret: string;
|
|
635
636
|
};
|
|
636
637
|
}
|
|
637
638
|
interface PortalResponse {
|
|
@@ -646,9 +647,9 @@ declare class SubscriptionResource extends ApiResource {
|
|
|
646
647
|
success: boolean;
|
|
647
648
|
data: SubscriptionStatus;
|
|
648
649
|
}>>;
|
|
649
|
-
|
|
650
|
+
createIntent(plan: SubscriptionPlan): Promise<ApiResponse<CreateIntentResponse>>;
|
|
650
651
|
createPortal(): Promise<ApiResponse<PortalResponse>>;
|
|
651
652
|
}
|
|
652
653
|
declare const subscriptionResource: SubscriptionResource;
|
|
653
654
|
|
|
654
|
-
export { type AddMediaData, Api, type ApiConfig, ApiError, ApiResource, type ApiResponse, AuthResource, type AuthResponse, type AuthUser, type AvatarCatalogItem, type AvatarCatalogResponse, type AvatarUnlockType, type BackendErrorResponse, type BoothDJ, type BoothMedia, type BoothResponse, type BoothState, type ChatMessage, type ChatMessageResponse, type ChatMessagesResponse, ChatResource, type
|
|
655
|
+
export { type AddMediaData, Api, type ApiConfig, ApiError, ApiResource, type ApiResponse, AuthResource, type AuthResponse, type AuthUser, type AvatarCatalogItem, type AvatarCatalogResponse, type AvatarUnlockType, type BackendErrorResponse, type BoothDJ, type BoothMedia, type BoothResponse, type BoothState, type ChatMessage, type ChatMessageResponse, type ChatMessagesResponse, ChatResource, type CreateIntentResponse, type CreateRoomData, type EquipAvatarData, type FeaturedRoomsResponse, type GrabResponse, type ImportPlaylistData, type ImportPlaylistResponse, type ImportResult, type JoinRoomResponse, Logger, type LoginCredentials, type MeResponse, type MediaItem, type MediaItemResponse, type MediaSearchResult, type MediaSource, type PaginatedResponse, type Playlist, PlaylistResource, type PlaylistResponse, type PlaylistsResponse, type PortalResponse, type RefreshResponse, type RegisterData, type ResourceOptions, type Room, type RoomMember, RoomResource, type RoomResponse, type RoomRole, type RoomStaffResponse, type RoomUserState, type RoomsResponse, type SendMessageData, ShopResource, type ShuffleResponse, type SoundCloudSearchResponse, type SoundCloudTrackResponse, SourceResource, type SubscriptionPlan, SubscriptionResource, type SubscriptionStatus, type UpdateProfileData, type UpdateRoomData, type User, UserResource, type UserResponse, type VoteResponse, type WaitlistResponse, type WaitlistUser, type YouTubeSearchResponse, type YouTubeVideoResponse, authResource, chatResource, playlistResource, roomResource, shopResource, sourceResource, subscriptionResource, userResource };
|
package/dist/index.d.ts
CHANGED
|
@@ -628,10 +628,11 @@ interface SubscriptionStatus {
|
|
|
628
628
|
cancelAtPeriodEnd: boolean;
|
|
629
629
|
currentPeriodEnd: string | null;
|
|
630
630
|
}
|
|
631
|
-
interface
|
|
631
|
+
interface CreateIntentResponse {
|
|
632
632
|
success: boolean;
|
|
633
633
|
data: {
|
|
634
|
-
|
|
634
|
+
subscriptionId: string;
|
|
635
|
+
clientSecret: string;
|
|
635
636
|
};
|
|
636
637
|
}
|
|
637
638
|
interface PortalResponse {
|
|
@@ -646,9 +647,9 @@ declare class SubscriptionResource extends ApiResource {
|
|
|
646
647
|
success: boolean;
|
|
647
648
|
data: SubscriptionStatus;
|
|
648
649
|
}>>;
|
|
649
|
-
|
|
650
|
+
createIntent(plan: SubscriptionPlan): Promise<ApiResponse<CreateIntentResponse>>;
|
|
650
651
|
createPortal(): Promise<ApiResponse<PortalResponse>>;
|
|
651
652
|
}
|
|
652
653
|
declare const subscriptionResource: SubscriptionResource;
|
|
653
654
|
|
|
654
|
-
export { type AddMediaData, Api, type ApiConfig, ApiError, ApiResource, type ApiResponse, AuthResource, type AuthResponse, type AuthUser, type AvatarCatalogItem, type AvatarCatalogResponse, type AvatarUnlockType, type BackendErrorResponse, type BoothDJ, type BoothMedia, type BoothResponse, type BoothState, type ChatMessage, type ChatMessageResponse, type ChatMessagesResponse, ChatResource, type
|
|
655
|
+
export { type AddMediaData, Api, type ApiConfig, ApiError, ApiResource, type ApiResponse, AuthResource, type AuthResponse, type AuthUser, type AvatarCatalogItem, type AvatarCatalogResponse, type AvatarUnlockType, type BackendErrorResponse, type BoothDJ, type BoothMedia, type BoothResponse, type BoothState, type ChatMessage, type ChatMessageResponse, type ChatMessagesResponse, ChatResource, type CreateIntentResponse, type CreateRoomData, type EquipAvatarData, type FeaturedRoomsResponse, type GrabResponse, type ImportPlaylistData, type ImportPlaylistResponse, type ImportResult, type JoinRoomResponse, Logger, type LoginCredentials, type MeResponse, type MediaItem, type MediaItemResponse, type MediaSearchResult, type MediaSource, type PaginatedResponse, type Playlist, PlaylistResource, type PlaylistResponse, type PlaylistsResponse, type PortalResponse, type RefreshResponse, type RegisterData, type ResourceOptions, type Room, type RoomMember, RoomResource, type RoomResponse, type RoomRole, type RoomStaffResponse, type RoomUserState, type RoomsResponse, type SendMessageData, ShopResource, type ShuffleResponse, type SoundCloudSearchResponse, type SoundCloudTrackResponse, SourceResource, type SubscriptionPlan, SubscriptionResource, type SubscriptionStatus, type UpdateProfileData, type UpdateRoomData, type User, UserResource, type UserResponse, type VoteResponse, type WaitlistResponse, type WaitlistUser, type YouTubeSearchResponse, type YouTubeVideoResponse, authResource, chatResource, playlistResource, roomResource, shopResource, sourceResource, subscriptionResource, userResource };
|
package/dist/index.js
CHANGED
|
@@ -638,9 +638,11 @@ var SubscriptionResource = class extends ApiResource {
|
|
|
638
638
|
async getStatus() {
|
|
639
639
|
return this.api.get(`${this.endpoint}/status`);
|
|
640
640
|
}
|
|
641
|
-
// POST /api/subscriptions/
|
|
642
|
-
|
|
643
|
-
|
|
641
|
+
// POST /api/subscriptions/create-intent
|
|
642
|
+
// Creates an incomplete subscription and returns a PaymentIntent client_secret
|
|
643
|
+
// for use with the Stripe Payment Element
|
|
644
|
+
async createIntent(plan) {
|
|
645
|
+
return this.api.post(`${this.endpoint}/create-intent`, { plan });
|
|
644
646
|
}
|
|
645
647
|
// POST /api/subscriptions/portal
|
|
646
648
|
async createPortal() {
|
package/dist/index.mjs
CHANGED
|
@@ -583,9 +583,11 @@ var SubscriptionResource = class extends ApiResource {
|
|
|
583
583
|
async getStatus() {
|
|
584
584
|
return this.api.get(`${this.endpoint}/status`);
|
|
585
585
|
}
|
|
586
|
-
// POST /api/subscriptions/
|
|
587
|
-
|
|
588
|
-
|
|
586
|
+
// POST /api/subscriptions/create-intent
|
|
587
|
+
// Creates an incomplete subscription and returns a PaymentIntent client_secret
|
|
588
|
+
// for use with the Stripe Payment Element
|
|
589
|
+
async createIntent(plan) {
|
|
590
|
+
return this.api.post(`${this.endpoint}/create-intent`, { plan });
|
|
589
591
|
}
|
|
590
592
|
// POST /api/subscriptions/portal
|
|
591
593
|
async createPortal() {
|