tonightpass 0.0.229 → 0.0.232
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 +17 -13
- package/dist/index.d.ts +17 -13
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -330,7 +330,7 @@ type UserPostComment = Base & {
|
|
|
330
330
|
isEdited: boolean;
|
|
331
331
|
editedAt?: Date;
|
|
332
332
|
};
|
|
333
|
-
type UserPostCommentEndpoints = Endpoint<"GET", "/users/@:username/posts/:postId/comments", ArrayResult<UserPostComment>, ArrayOptions<UserPostComment>> | Endpoint<"POST", "/users/~me/posts/:postId/comments", UserPostComment, CreateUserPostCommentDto> | Endpoint<"PUT", "/users/~me/posts/:postId/comments/:commentId", UserPostComment, UpdateUserPostCommentDto> | Endpoint<"DELETE", "/users/~me/posts/:postId/comments/:commentId", void>;
|
|
333
|
+
type UserPostCommentEndpoints = Endpoint<"GET", "/users/@:username/posts/:postId/comments", ArrayResult<UserPostComment>, ArrayOptions<UserPostComment>> | Endpoint<"POST", "/users/~me/posts/:postId/comments", UserPostComment, CreateUserPostCommentDto> | Endpoint<"PUT", "/users/~me/posts/:postId/comments/:commentId", UserPostComment, UpdateUserPostCommentDto> | Endpoint<"DELETE", "/users/~me/posts/:postId/comments/:commentId", void, null>;
|
|
334
334
|
|
|
335
335
|
declare enum UserPostMediaType {
|
|
336
336
|
Image = "image",
|
|
@@ -357,7 +357,7 @@ type UserPostRepost = Base & {
|
|
|
357
357
|
author: UserProfile;
|
|
358
358
|
comment?: string;
|
|
359
359
|
};
|
|
360
|
-
type UserPostRepostEndpoints = Endpoint<"GET", "/users/@:username/reposts", ArrayResult<UserPostRepost>, ArrayOptions<UserPostRepost>> | Endpoint<"GET", "/users/@:username/posts/:postId/reposts", ArrayResult<UserPostRepost>, ArrayOptions<UserPostRepost>> | Endpoint<"POST", "/users/~me/posts/:postId/reposts", UserPostRepost, CreateUserPostRepostDto> | Endpoint<"DELETE", "/users/~me/posts/:postId/reposts", void>;
|
|
360
|
+
type UserPostRepostEndpoints = Endpoint<"GET", "/users/@:username/reposts", ArrayResult<UserPostRepost>, ArrayOptions<UserPostRepost>> | Endpoint<"GET", "/users/@:username/posts/:postId/reposts", ArrayResult<UserPostRepost>, ArrayOptions<UserPostRepost>> | Endpoint<"POST", "/users/~me/posts/:postId/reposts", UserPostRepost, CreateUserPostRepostDto> | Endpoint<"DELETE", "/users/~me/posts/:postId/reposts", void, undefined>;
|
|
361
361
|
|
|
362
362
|
type UserPostViewEndpoints = Endpoint<"POST", "/users/@:username/posts/:postId/views", boolean, null>;
|
|
363
363
|
|
|
@@ -380,7 +380,7 @@ type UserPost = Base & {
|
|
|
380
380
|
isEdited: boolean;
|
|
381
381
|
editedAt?: Date;
|
|
382
382
|
};
|
|
383
|
-
type UserPostEndpoints = Endpoint<"GET", "/users/@:username/posts", ArrayResult<UserPost>, ArrayOptions<UserPost>> | Endpoint<"GET", "/users/@:username/posts/:postId", UserPost> | Endpoint<"POST", "/users/~me/posts", UserPost, CreateUserPostDto> | Endpoint<"PUT", "/users/~me/posts/:postId", UserPost, UpdateUserPostDto> | Endpoint<"DELETE", "/users/~me/posts/:postId", void> | UserPostCommentEndpoints | UserPostRepostEndpoints | UserPostViewEndpoints | UserPostMediaEndpoints;
|
|
383
|
+
type UserPostEndpoints = Endpoint<"GET", "/users/@:username/posts", ArrayResult<UserPost>, ArrayOptions<UserPost>> | Endpoint<"GET", "/users/@:username/posts/:postId", UserPost> | Endpoint<"POST", "/users/~me/posts", UserPost, CreateUserPostDto> | Endpoint<"PUT", "/users/~me/posts/:postId", UserPost, UpdateUserPostDto> | Endpoint<"DELETE", "/users/~me/posts/:postId", void, undefined> | UserPostCommentEndpoints | UserPostRepostEndpoints | UserPostViewEndpoints | UserPostMediaEndpoints;
|
|
384
384
|
|
|
385
385
|
declare class CreateUserPostDto {
|
|
386
386
|
content?: string;
|
|
@@ -408,7 +408,7 @@ type ApiKey = Base & {
|
|
|
408
408
|
lastUsedAt?: Date;
|
|
409
409
|
isActive: boolean;
|
|
410
410
|
};
|
|
411
|
-
type ApiKeyEndpoints = Endpoint<"GET", "/api-keys", ArrayResult<ApiKey>> | Endpoint<"GET", "/api-keys/:apiKeyId", ApiKey> | Endpoint<"POST", "/api-keys", ApiKey, CreateApiKeyDto> | Endpoint<"PUT", "/api-keys/:apiKeyId", ApiKey, UpdateApiKeyDto> | Endpoint<"DELETE", "/api-keys/:apiKeyId", ApiKey>;
|
|
411
|
+
type ApiKeyEndpoints = Endpoint<"GET", "/api-keys", ArrayResult<ApiKey>> | Endpoint<"GET", "/api-keys/:apiKeyId", ApiKey> | Endpoint<"POST", "/api-keys", ApiKey, CreateApiKeyDto> | Endpoint<"PUT", "/api-keys/:apiKeyId", ApiKey, UpdateApiKeyDto> | Endpoint<"DELETE", "/api-keys/:apiKeyId", ApiKey, undefined>;
|
|
412
412
|
|
|
413
413
|
declare enum UserNotificationType {
|
|
414
414
|
Follow = "follow"
|
|
@@ -424,7 +424,7 @@ type UserNotificationFollow = UserNotificationBase & {
|
|
|
424
424
|
type UserNotification = UserNotificationFollow;
|
|
425
425
|
type UserNotificationEndpoints = Endpoint<"GET", "/users/~me/notifications", ArrayResult<UserNotification>, ArrayOptions<UserNotification>> | Endpoint<"GET", "/users/~me/notifications/count", number, {
|
|
426
426
|
unseen?: boolean;
|
|
427
|
-
}> | Endpoint<"PUT", "/users/~me/notifications/read", void>;
|
|
427
|
+
}> | Endpoint<"PUT", "/users/~me/notifications/read", void, undefined>;
|
|
428
428
|
|
|
429
429
|
type UserBookingTicket = Base & {
|
|
430
430
|
booking: UserBookingWithoutTickets;
|
|
@@ -500,7 +500,7 @@ type ProfileMetadata = UserProfileMetadata | OrganizationProfileMetadata;
|
|
|
500
500
|
type SearchProfilesOptions = ArrayOptions<Profile> & {
|
|
501
501
|
q: string;
|
|
502
502
|
};
|
|
503
|
-
type ProfileEndpoints = Endpoint<"GET", "/profiles", ArrayResult<Profile>, ArrayOptions<Profile>> | Endpoint<"GET", "/profiles/search", ArrayResult<Profile>, SearchProfilesOptions> | Endpoint<"GET", "/profiles/@:username", Profile> | Endpoint<"GET", "/profiles/~me/relationships/suggestions", ArrayResult<Profile>, ArrayOptions<OrganizationProfile | UserProfile>> | Endpoint<"GET", "/profiles/@:username/relationships/followers", ArrayResult<UserProfile>, ArrayOptions<UserProfile>> | Endpoint<"POST", "/profiles/@:username/relationships/follow", boolean,
|
|
503
|
+
type ProfileEndpoints = Endpoint<"GET", "/profiles", ArrayResult<Profile>, ArrayOptions<Profile>> | Endpoint<"GET", "/profiles/search", ArrayResult<Profile>, SearchProfilesOptions> | Endpoint<"GET", "/profiles/@:username", Profile> | Endpoint<"GET", "/profiles/~me/relationships/suggestions", ArrayResult<Profile>, ArrayOptions<OrganizationProfile | UserProfile>> | Endpoint<"GET", "/profiles/@:username/relationships/followers", ArrayResult<UserProfile>, ArrayOptions<UserProfile>> | Endpoint<"POST", "/profiles/@:username/relationships/follow", boolean, undefined> | Endpoint<"POST", "/profiles/@:username/relationships/unfollow", boolean, undefined>;
|
|
504
504
|
|
|
505
505
|
type UserCustomer = UserProfile & {
|
|
506
506
|
email?: string;
|
|
@@ -637,7 +637,7 @@ type AuthResponse = {
|
|
|
637
637
|
accessToken: string;
|
|
638
638
|
refreshToken: string;
|
|
639
639
|
};
|
|
640
|
-
type AuthEndpoints = Endpoint<"POST", "/auth/sign-up", AuthResponse, CreateUserDto> | Endpoint<"POST", "/auth/sign-in", AuthResponse, SignInUserDto> | Endpoint<"POST", "/auth/sign-out", null,
|
|
640
|
+
type AuthEndpoints = Endpoint<"POST", "/auth/sign-up", AuthResponse, CreateUserDto> | Endpoint<"POST", "/auth/sign-in", AuthResponse, SignInUserDto> | Endpoint<"POST", "/auth/sign-out", null, undefined> | Endpoint<"POST", "/auth/refresh-token", AuthResponse, undefined> | Endpoint<"POST", "/auth/recovery", RecoveryResponse, RecoveryDto> | Endpoint<"POST", "/auth/recovery/reset", null, RecoveryResetDto> | Endpoint<"GET", "/oauth2/:provider", void> | Endpoint<"GET", "/oauth2/:provider/callback", void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Google}`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Google}/callback`, void> | Endpoint<"POST", `/oauth2/${OAuth2Provider.Google}/one-tap`, AuthResponse, GoogleOneTapDto> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Facebook}`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Facebook}/callback`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Twitter}`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Twitter}/callback`, void> | Endpoint<"DELETE", "/oauth2/:provider", void, undefined>;
|
|
641
641
|
|
|
642
642
|
type CareersOffice = {
|
|
643
643
|
id: number | null;
|
|
@@ -738,7 +738,7 @@ type ChannelMessage = Base & {
|
|
|
738
738
|
replyTo?: ChannelMessage;
|
|
739
739
|
reactions?: ChannelMessageReaction[];
|
|
740
740
|
};
|
|
741
|
-
type ChannelMessageEndpoints = Endpoint<"GET", "/channels/~me/:channelId/messages", ArrayResult<ChannelMessage>, ArrayOptions<ChannelMessage>> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/messages", ArrayResult<ChannelMessage>, ArrayOptions<ChannelMessage>> | Endpoint<"GET", "/channels/~me/:channelId/messages/:messageId", ChannelMessage> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/messages/:messageId", ChannelMessage> | Endpoint<"POST", "/channels/~me/:channelId/messages", ChannelMessage, CreateChannelMessageDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages", ChannelMessage, CreateChannelMessageDto> | Endpoint<"PUT", "/channels/~me/:channelId/messages/:messageId", ChannelMessage, UpdateChannelMessageDto> | Endpoint<"PUT", "/channels/:organizationSlug/:channelId/messages/:messageId", ChannelMessage, UpdateChannelMessageDto> | Endpoint<"DELETE", "/channels/~me/:channelId/messages/:messageId", void> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/messages/:messageId", void> | Endpoint<"POST", "/channels/~me/:channelId/messages/:messageId/reactions", void, AddReactionDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages/:messageId/reactions", void, AddReactionDto> | Endpoint<"DELETE", "/channels/~me/:channelId/messages/:messageId/reactions/:emoji", void> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/messages/:messageId/reactions/:emoji", void> | Endpoint<"POST", "/channels/~me/:channelId/messages/:messageId/read", void,
|
|
741
|
+
type ChannelMessageEndpoints = Endpoint<"GET", "/channels/~me/:channelId/messages", ArrayResult<ChannelMessage>, ArrayOptions<ChannelMessage>> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/messages", ArrayResult<ChannelMessage>, ArrayOptions<ChannelMessage>> | Endpoint<"GET", "/channels/~me/:channelId/messages/:messageId", ChannelMessage> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/messages/:messageId", ChannelMessage> | Endpoint<"POST", "/channels/~me/:channelId/messages", ChannelMessage, CreateChannelMessageDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages", ChannelMessage, CreateChannelMessageDto> | Endpoint<"PUT", "/channels/~me/:channelId/messages/:messageId", ChannelMessage, UpdateChannelMessageDto> | Endpoint<"PUT", "/channels/:organizationSlug/:channelId/messages/:messageId", ChannelMessage, UpdateChannelMessageDto> | Endpoint<"DELETE", "/channels/~me/:channelId/messages/:messageId", void, undefined> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/messages/:messageId", void, undefined> | Endpoint<"POST", "/channels/~me/:channelId/messages/:messageId/reactions", void, AddReactionDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages/:messageId/reactions", void, AddReactionDto> | Endpoint<"DELETE", "/channels/~me/:channelId/messages/:messageId/reactions/:emoji", void, undefined> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/messages/:messageId/reactions/:emoji", void, undefined> | Endpoint<"POST", "/channels/~me/:channelId/messages/:messageId/read", void, undefined> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages/:messageId/read", void, undefined> | Endpoint<"POST", "/channels/~me/:channelId/files", string, FormData> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/files", string, FormData> | Endpoint<"POST", "/channels/~me/:channelId/messages/:messageId/report", void, ReportChannelMessageDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages/:messageId/report", void, ReportChannelMessageDto>;
|
|
742
742
|
|
|
743
743
|
declare enum ChannelType {
|
|
744
744
|
Private = "private",
|
|
@@ -773,7 +773,7 @@ type ChannelMember = {
|
|
|
773
773
|
type UserChannelCountOptions = {
|
|
774
774
|
unseen?: boolean;
|
|
775
775
|
};
|
|
776
|
-
type ChannelEndpoints = Endpoint<"GET", "/channels/~me", ArrayResult<Channel>, ArrayOptions<Channel>> | Endpoint<"GET", "/channels/:organizationSlug", ArrayResult<Channel>, ArrayOptions<Channel>> | Endpoint<"GET", "/users/~me/channels/count", number, UserChannelCountOptions> | Endpoint<"GET", "/users/@:organizationSlug/channels/count", number, UserChannelCountOptions> | Endpoint<"GET", "/channels/~me/:channelId", Channel> | Endpoint<"GET", "/channels/:organizationSlug/:channelId", Channel> | Endpoint<"POST", "/channels/~me", Channel, CreateChannelDto> | Endpoint<"POST", "/channels/:organizationSlug", Channel, CreateChannelDto> | Endpoint<"PUT", "/channels/~me/:channelId", Channel, UpdateChannelDto> | Endpoint<"PUT", "/channels/:organizationSlug/:channelId", Channel, UpdateChannelDto> | Endpoint<"DELETE", "/channels/~me/:channelId", void> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId", void> | Endpoint<"POST", "/channels/~me/:channelId/participants", void, AddParticipantDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/participants", void, AddParticipantDto> | Endpoint<"DELETE", "/channels/~me/:channelId/participants/:username", void> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/participants/:username", void> | Endpoint<"GET", "/channels/~me/:channelId/members", ArrayResult<ChannelMember>, ArrayOptions<ChannelMember>> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/members", ArrayResult<ChannelMember>, ArrayOptions<ChannelMember>>;
|
|
776
|
+
type ChannelEndpoints = Endpoint<"GET", "/channels/~me", ArrayResult<Channel>, ArrayOptions<Channel>> | Endpoint<"GET", "/channels/:organizationSlug", ArrayResult<Channel>, ArrayOptions<Channel>> | Endpoint<"GET", "/users/~me/channels/count", number, UserChannelCountOptions> | Endpoint<"GET", "/users/@:organizationSlug/channels/count", number, UserChannelCountOptions> | Endpoint<"GET", "/channels/~me/:channelId", Channel> | Endpoint<"GET", "/channels/:organizationSlug/:channelId", Channel> | Endpoint<"POST", "/channels/~me", Channel, CreateChannelDto> | Endpoint<"POST", "/channels/:organizationSlug", Channel, CreateChannelDto> | Endpoint<"PUT", "/channels/~me/:channelId", Channel, UpdateChannelDto> | Endpoint<"PUT", "/channels/:organizationSlug/:channelId", Channel, UpdateChannelDto> | Endpoint<"DELETE", "/channels/~me/:channelId", void, undefined> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId", void, undefined> | Endpoint<"POST", "/channels/~me/:channelId/participants", void, AddParticipantDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/participants", void, AddParticipantDto> | Endpoint<"DELETE", "/channels/~me/:channelId/participants/:username", void, undefined> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/participants/:username", void, undefined> | Endpoint<"GET", "/channels/~me/:channelId/members", ArrayResult<ChannelMember>, ArrayOptions<ChannelMember>> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/members", ArrayResult<ChannelMember>, ArrayOptions<ChannelMember>>;
|
|
777
777
|
|
|
778
778
|
declare enum Currency {
|
|
779
779
|
EUR = "EUR",
|
|
@@ -1184,7 +1184,7 @@ declare enum OrganizationMemberRole {
|
|
|
1184
1184
|
Manager = "manager",
|
|
1185
1185
|
Member = "member"
|
|
1186
1186
|
}
|
|
1187
|
-
type OrganizationMembersEndpoints = Endpoint<"GET", "/organizations/members/~me", ArrayResult<OrganizationMember>, ArrayOptions<OrganizationMember>> | Endpoint<"GET", "/organizations/@:organizationSlug/members", ArrayResult<OrganizationMember>, ArrayOptions<OrganizationMember>> | Endpoint<"POST", "/organizations/@:organizationSlug/members", OrganizationMember, CreateOrganizationMemberDto> | Endpoint<"PUT", "/organizations/@:organizationSlug/members/:username", OrganizationMember, UpdateOrganizationMemberDto> | Endpoint<"DELETE", "/organizations/@:organizationSlug/members/:username", OrganizationMember[],
|
|
1187
|
+
type OrganizationMembersEndpoints = Endpoint<"GET", "/organizations/members/~me", ArrayResult<OrganizationMember>, ArrayOptions<OrganizationMember>> | Endpoint<"GET", "/organizations/@:organizationSlug/members", ArrayResult<OrganizationMember>, ArrayOptions<OrganizationMember>> | Endpoint<"POST", "/organizations/@:organizationSlug/members", OrganizationMember, CreateOrganizationMemberDto> | Endpoint<"PUT", "/organizations/@:organizationSlug/members/:username", OrganizationMember, UpdateOrganizationMemberDto> | Endpoint<"DELETE", "/organizations/@:organizationSlug/members/:username", OrganizationMember[], undefined> | Endpoint<"GET", "/organizations/@:organizationSlug/members/invitations/links", ArrayResult<OrganizationToken>, ArrayOptions<OrganizationToken>> | Endpoint<"POST", "/organizations/@:organizationSlug/members/invitations/links", OrganizationToken, CreateOrganizationMemberInvitationLinkDto> | Endpoint<"POST", "/organizations/@:organizationSlug/members/invitations/accept", OrganizationMember, AcceptOrganizationMemberInvitationDto> | Endpoint<"PUT", "/organizations/@:organizationSlug/members/~me/accept", OrganizationMember, undefined> | Endpoint<"DELETE", "/organizations/@:organizationSlug/members/~me/reject", null, undefined> | Endpoint<"DELETE", "/organizations/@:organizationSlug/members/~me", null, undefined>;
|
|
1188
1188
|
|
|
1189
1189
|
type OrganizationOrder = Omit<Order, "user"> & {
|
|
1190
1190
|
customer: OrganizationCustomer;
|
|
@@ -1214,7 +1214,7 @@ declare enum OrganizationFileType {
|
|
|
1214
1214
|
type OrganizationEndpoints = Endpoint<"GET", "/organizations/search", Organization[], {
|
|
1215
1215
|
q: string;
|
|
1216
1216
|
limit?: number;
|
|
1217
|
-
}> | Endpoint<"GET", "/organizations", ArrayResult<Organization>, ArrayOptions<Organization>> | Endpoint<"GET", "/organizations/@:organizationSlug", Organization> | Endpoint<"POST", "/organizations", Organization, CreateOrganizationDto> | Endpoint<"PUT", "/organizations/@:organizationSlug", Organization, UpdateOrganizationDto> | Endpoint<"DELETE", "/organizations/@:organizationSlug", Organization,
|
|
1217
|
+
}> | Endpoint<"GET", "/organizations", ArrayResult<Organization>, ArrayOptions<Organization>> | Endpoint<"GET", "/organizations/@:organizationSlug", Organization> | Endpoint<"POST", "/organizations", Organization, CreateOrganizationDto> | Endpoint<"PUT", "/organizations/@:organizationSlug", Organization, UpdateOrganizationDto> | Endpoint<"DELETE", "/organizations/@:organizationSlug", Organization, undefined> | Endpoint<"POST", "/organizations/@:organizationSlug/files/:organizationFileType", string, FormData> | Endpoint<"GET", "/organizations/@:organizationSlug/billing/account", OrganizationBillingAccount> | Endpoint<"GET", "/organizations/@:organizationSlug/billing/link", void> | Endpoint<"GET", "/organizations/@:organizationSlug/billing/dashboard", void> | OrganizationEventEndpoints | OrganizationMembersEndpoints | OrganizationAnalyticsEndpoints | OrganizationCustomersEndpoints | OrganizationOrdersEndpoints;
|
|
1218
1218
|
|
|
1219
1219
|
type WebhookEndpoints = Endpoint<"POST", "/webhooks/stripe", boolean, Stripe__default.Event>;
|
|
1220
1220
|
|
|
@@ -1291,6 +1291,7 @@ type Endpoints = ApiKeyEndpoints | AuthEndpoints | CareerEndpoints | ChannelEndp
|
|
|
1291
1291
|
|
|
1292
1292
|
interface APIRequestOptions extends Options {
|
|
1293
1293
|
apiKey?: string;
|
|
1294
|
+
accessToken?: string;
|
|
1294
1295
|
}
|
|
1295
1296
|
declare const request: <T>(url: string, options?: APIRequestOptions) => Promise<Response$1<APIResponse<T>>>;
|
|
1296
1297
|
|
|
@@ -1344,15 +1345,18 @@ declare class TonightPassAPIError<T> extends Error {
|
|
|
1344
1345
|
interface ClientOptions {
|
|
1345
1346
|
readonly baseURL: string;
|
|
1346
1347
|
readonly apiKey?: string;
|
|
1348
|
+
readonly accessToken?: string;
|
|
1347
1349
|
readonly cache?: CacheOptions;
|
|
1348
1350
|
}
|
|
1349
1351
|
declare class Client {
|
|
1350
1352
|
private options;
|
|
1351
1353
|
private apiKey?;
|
|
1354
|
+
private accessToken?;
|
|
1352
1355
|
private cacheManager?;
|
|
1353
1356
|
readonly url: (path: string, params: Record<string, ParamValue>) => string;
|
|
1354
1357
|
constructor(options: ClientOptions);
|
|
1355
1358
|
setOptions(options: ClientOptions): void;
|
|
1359
|
+
setAccessToken(accessToken: string | undefined): void;
|
|
1356
1360
|
clearCache(): void;
|
|
1357
1361
|
getCacheStats(): {
|
|
1358
1362
|
size: number;
|
|
@@ -1385,7 +1389,7 @@ declare const auth: (client: Client) => {
|
|
|
1385
1389
|
signIn: (data: SignInUserDto) => Promise<AuthResponse>;
|
|
1386
1390
|
signUp: (data: CreateUserDto) => Promise<AuthResponse>;
|
|
1387
1391
|
signOut: () => Promise<null>;
|
|
1388
|
-
refreshToken: () => Promise<
|
|
1392
|
+
refreshToken: () => Promise<AuthResponse>;
|
|
1389
1393
|
recovery: (data: RecoveryDto) => Promise<RecoveryResponse>;
|
|
1390
1394
|
recoveryReset: (data: RecoveryResetDto) => Promise<null>;
|
|
1391
1395
|
oauth2: {
|
|
@@ -1661,7 +1665,7 @@ declare class TonightPass {
|
|
|
1661
1665
|
signIn: (data: SignInUserDto) => Promise<AuthResponse>;
|
|
1662
1666
|
signUp: (data: CreateUserDto) => Promise<AuthResponse>;
|
|
1663
1667
|
signOut: () => Promise<null>;
|
|
1664
|
-
refreshToken: () => Promise<
|
|
1668
|
+
refreshToken: () => Promise<AuthResponse>;
|
|
1665
1669
|
recovery: (data: RecoveryDto) => Promise<RecoveryResponse>;
|
|
1666
1670
|
recoveryReset: (data: RecoveryResetDto) => Promise<null>;
|
|
1667
1671
|
oauth2: {
|
package/dist/index.d.ts
CHANGED
|
@@ -330,7 +330,7 @@ type UserPostComment = Base & {
|
|
|
330
330
|
isEdited: boolean;
|
|
331
331
|
editedAt?: Date;
|
|
332
332
|
};
|
|
333
|
-
type UserPostCommentEndpoints = Endpoint<"GET", "/users/@:username/posts/:postId/comments", ArrayResult<UserPostComment>, ArrayOptions<UserPostComment>> | Endpoint<"POST", "/users/~me/posts/:postId/comments", UserPostComment, CreateUserPostCommentDto> | Endpoint<"PUT", "/users/~me/posts/:postId/comments/:commentId", UserPostComment, UpdateUserPostCommentDto> | Endpoint<"DELETE", "/users/~me/posts/:postId/comments/:commentId", void>;
|
|
333
|
+
type UserPostCommentEndpoints = Endpoint<"GET", "/users/@:username/posts/:postId/comments", ArrayResult<UserPostComment>, ArrayOptions<UserPostComment>> | Endpoint<"POST", "/users/~me/posts/:postId/comments", UserPostComment, CreateUserPostCommentDto> | Endpoint<"PUT", "/users/~me/posts/:postId/comments/:commentId", UserPostComment, UpdateUserPostCommentDto> | Endpoint<"DELETE", "/users/~me/posts/:postId/comments/:commentId", void, null>;
|
|
334
334
|
|
|
335
335
|
declare enum UserPostMediaType {
|
|
336
336
|
Image = "image",
|
|
@@ -357,7 +357,7 @@ type UserPostRepost = Base & {
|
|
|
357
357
|
author: UserProfile;
|
|
358
358
|
comment?: string;
|
|
359
359
|
};
|
|
360
|
-
type UserPostRepostEndpoints = Endpoint<"GET", "/users/@:username/reposts", ArrayResult<UserPostRepost>, ArrayOptions<UserPostRepost>> | Endpoint<"GET", "/users/@:username/posts/:postId/reposts", ArrayResult<UserPostRepost>, ArrayOptions<UserPostRepost>> | Endpoint<"POST", "/users/~me/posts/:postId/reposts", UserPostRepost, CreateUserPostRepostDto> | Endpoint<"DELETE", "/users/~me/posts/:postId/reposts", void>;
|
|
360
|
+
type UserPostRepostEndpoints = Endpoint<"GET", "/users/@:username/reposts", ArrayResult<UserPostRepost>, ArrayOptions<UserPostRepost>> | Endpoint<"GET", "/users/@:username/posts/:postId/reposts", ArrayResult<UserPostRepost>, ArrayOptions<UserPostRepost>> | Endpoint<"POST", "/users/~me/posts/:postId/reposts", UserPostRepost, CreateUserPostRepostDto> | Endpoint<"DELETE", "/users/~me/posts/:postId/reposts", void, undefined>;
|
|
361
361
|
|
|
362
362
|
type UserPostViewEndpoints = Endpoint<"POST", "/users/@:username/posts/:postId/views", boolean, null>;
|
|
363
363
|
|
|
@@ -380,7 +380,7 @@ type UserPost = Base & {
|
|
|
380
380
|
isEdited: boolean;
|
|
381
381
|
editedAt?: Date;
|
|
382
382
|
};
|
|
383
|
-
type UserPostEndpoints = Endpoint<"GET", "/users/@:username/posts", ArrayResult<UserPost>, ArrayOptions<UserPost>> | Endpoint<"GET", "/users/@:username/posts/:postId", UserPost> | Endpoint<"POST", "/users/~me/posts", UserPost, CreateUserPostDto> | Endpoint<"PUT", "/users/~me/posts/:postId", UserPost, UpdateUserPostDto> | Endpoint<"DELETE", "/users/~me/posts/:postId", void> | UserPostCommentEndpoints | UserPostRepostEndpoints | UserPostViewEndpoints | UserPostMediaEndpoints;
|
|
383
|
+
type UserPostEndpoints = Endpoint<"GET", "/users/@:username/posts", ArrayResult<UserPost>, ArrayOptions<UserPost>> | Endpoint<"GET", "/users/@:username/posts/:postId", UserPost> | Endpoint<"POST", "/users/~me/posts", UserPost, CreateUserPostDto> | Endpoint<"PUT", "/users/~me/posts/:postId", UserPost, UpdateUserPostDto> | Endpoint<"DELETE", "/users/~me/posts/:postId", void, undefined> | UserPostCommentEndpoints | UserPostRepostEndpoints | UserPostViewEndpoints | UserPostMediaEndpoints;
|
|
384
384
|
|
|
385
385
|
declare class CreateUserPostDto {
|
|
386
386
|
content?: string;
|
|
@@ -408,7 +408,7 @@ type ApiKey = Base & {
|
|
|
408
408
|
lastUsedAt?: Date;
|
|
409
409
|
isActive: boolean;
|
|
410
410
|
};
|
|
411
|
-
type ApiKeyEndpoints = Endpoint<"GET", "/api-keys", ArrayResult<ApiKey>> | Endpoint<"GET", "/api-keys/:apiKeyId", ApiKey> | Endpoint<"POST", "/api-keys", ApiKey, CreateApiKeyDto> | Endpoint<"PUT", "/api-keys/:apiKeyId", ApiKey, UpdateApiKeyDto> | Endpoint<"DELETE", "/api-keys/:apiKeyId", ApiKey>;
|
|
411
|
+
type ApiKeyEndpoints = Endpoint<"GET", "/api-keys", ArrayResult<ApiKey>> | Endpoint<"GET", "/api-keys/:apiKeyId", ApiKey> | Endpoint<"POST", "/api-keys", ApiKey, CreateApiKeyDto> | Endpoint<"PUT", "/api-keys/:apiKeyId", ApiKey, UpdateApiKeyDto> | Endpoint<"DELETE", "/api-keys/:apiKeyId", ApiKey, undefined>;
|
|
412
412
|
|
|
413
413
|
declare enum UserNotificationType {
|
|
414
414
|
Follow = "follow"
|
|
@@ -424,7 +424,7 @@ type UserNotificationFollow = UserNotificationBase & {
|
|
|
424
424
|
type UserNotification = UserNotificationFollow;
|
|
425
425
|
type UserNotificationEndpoints = Endpoint<"GET", "/users/~me/notifications", ArrayResult<UserNotification>, ArrayOptions<UserNotification>> | Endpoint<"GET", "/users/~me/notifications/count", number, {
|
|
426
426
|
unseen?: boolean;
|
|
427
|
-
}> | Endpoint<"PUT", "/users/~me/notifications/read", void>;
|
|
427
|
+
}> | Endpoint<"PUT", "/users/~me/notifications/read", void, undefined>;
|
|
428
428
|
|
|
429
429
|
type UserBookingTicket = Base & {
|
|
430
430
|
booking: UserBookingWithoutTickets;
|
|
@@ -500,7 +500,7 @@ type ProfileMetadata = UserProfileMetadata | OrganizationProfileMetadata;
|
|
|
500
500
|
type SearchProfilesOptions = ArrayOptions<Profile> & {
|
|
501
501
|
q: string;
|
|
502
502
|
};
|
|
503
|
-
type ProfileEndpoints = Endpoint<"GET", "/profiles", ArrayResult<Profile>, ArrayOptions<Profile>> | Endpoint<"GET", "/profiles/search", ArrayResult<Profile>, SearchProfilesOptions> | Endpoint<"GET", "/profiles/@:username", Profile> | Endpoint<"GET", "/profiles/~me/relationships/suggestions", ArrayResult<Profile>, ArrayOptions<OrganizationProfile | UserProfile>> | Endpoint<"GET", "/profiles/@:username/relationships/followers", ArrayResult<UserProfile>, ArrayOptions<UserProfile>> | Endpoint<"POST", "/profiles/@:username/relationships/follow", boolean,
|
|
503
|
+
type ProfileEndpoints = Endpoint<"GET", "/profiles", ArrayResult<Profile>, ArrayOptions<Profile>> | Endpoint<"GET", "/profiles/search", ArrayResult<Profile>, SearchProfilesOptions> | Endpoint<"GET", "/profiles/@:username", Profile> | Endpoint<"GET", "/profiles/~me/relationships/suggestions", ArrayResult<Profile>, ArrayOptions<OrganizationProfile | UserProfile>> | Endpoint<"GET", "/profiles/@:username/relationships/followers", ArrayResult<UserProfile>, ArrayOptions<UserProfile>> | Endpoint<"POST", "/profiles/@:username/relationships/follow", boolean, undefined> | Endpoint<"POST", "/profiles/@:username/relationships/unfollow", boolean, undefined>;
|
|
504
504
|
|
|
505
505
|
type UserCustomer = UserProfile & {
|
|
506
506
|
email?: string;
|
|
@@ -637,7 +637,7 @@ type AuthResponse = {
|
|
|
637
637
|
accessToken: string;
|
|
638
638
|
refreshToken: string;
|
|
639
639
|
};
|
|
640
|
-
type AuthEndpoints = Endpoint<"POST", "/auth/sign-up", AuthResponse, CreateUserDto> | Endpoint<"POST", "/auth/sign-in", AuthResponse, SignInUserDto> | Endpoint<"POST", "/auth/sign-out", null,
|
|
640
|
+
type AuthEndpoints = Endpoint<"POST", "/auth/sign-up", AuthResponse, CreateUserDto> | Endpoint<"POST", "/auth/sign-in", AuthResponse, SignInUserDto> | Endpoint<"POST", "/auth/sign-out", null, undefined> | Endpoint<"POST", "/auth/refresh-token", AuthResponse, undefined> | Endpoint<"POST", "/auth/recovery", RecoveryResponse, RecoveryDto> | Endpoint<"POST", "/auth/recovery/reset", null, RecoveryResetDto> | Endpoint<"GET", "/oauth2/:provider", void> | Endpoint<"GET", "/oauth2/:provider/callback", void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Google}`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Google}/callback`, void> | Endpoint<"POST", `/oauth2/${OAuth2Provider.Google}/one-tap`, AuthResponse, GoogleOneTapDto> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Facebook}`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Facebook}/callback`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Twitter}`, void> | Endpoint<"GET", `/oauth2/${OAuth2Provider.Twitter}/callback`, void> | Endpoint<"DELETE", "/oauth2/:provider", void, undefined>;
|
|
641
641
|
|
|
642
642
|
type CareersOffice = {
|
|
643
643
|
id: number | null;
|
|
@@ -738,7 +738,7 @@ type ChannelMessage = Base & {
|
|
|
738
738
|
replyTo?: ChannelMessage;
|
|
739
739
|
reactions?: ChannelMessageReaction[];
|
|
740
740
|
};
|
|
741
|
-
type ChannelMessageEndpoints = Endpoint<"GET", "/channels/~me/:channelId/messages", ArrayResult<ChannelMessage>, ArrayOptions<ChannelMessage>> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/messages", ArrayResult<ChannelMessage>, ArrayOptions<ChannelMessage>> | Endpoint<"GET", "/channels/~me/:channelId/messages/:messageId", ChannelMessage> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/messages/:messageId", ChannelMessage> | Endpoint<"POST", "/channels/~me/:channelId/messages", ChannelMessage, CreateChannelMessageDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages", ChannelMessage, CreateChannelMessageDto> | Endpoint<"PUT", "/channels/~me/:channelId/messages/:messageId", ChannelMessage, UpdateChannelMessageDto> | Endpoint<"PUT", "/channels/:organizationSlug/:channelId/messages/:messageId", ChannelMessage, UpdateChannelMessageDto> | Endpoint<"DELETE", "/channels/~me/:channelId/messages/:messageId", void> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/messages/:messageId", void> | Endpoint<"POST", "/channels/~me/:channelId/messages/:messageId/reactions", void, AddReactionDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages/:messageId/reactions", void, AddReactionDto> | Endpoint<"DELETE", "/channels/~me/:channelId/messages/:messageId/reactions/:emoji", void> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/messages/:messageId/reactions/:emoji", void> | Endpoint<"POST", "/channels/~me/:channelId/messages/:messageId/read", void,
|
|
741
|
+
type ChannelMessageEndpoints = Endpoint<"GET", "/channels/~me/:channelId/messages", ArrayResult<ChannelMessage>, ArrayOptions<ChannelMessage>> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/messages", ArrayResult<ChannelMessage>, ArrayOptions<ChannelMessage>> | Endpoint<"GET", "/channels/~me/:channelId/messages/:messageId", ChannelMessage> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/messages/:messageId", ChannelMessage> | Endpoint<"POST", "/channels/~me/:channelId/messages", ChannelMessage, CreateChannelMessageDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages", ChannelMessage, CreateChannelMessageDto> | Endpoint<"PUT", "/channels/~me/:channelId/messages/:messageId", ChannelMessage, UpdateChannelMessageDto> | Endpoint<"PUT", "/channels/:organizationSlug/:channelId/messages/:messageId", ChannelMessage, UpdateChannelMessageDto> | Endpoint<"DELETE", "/channels/~me/:channelId/messages/:messageId", void, undefined> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/messages/:messageId", void, undefined> | Endpoint<"POST", "/channels/~me/:channelId/messages/:messageId/reactions", void, AddReactionDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages/:messageId/reactions", void, AddReactionDto> | Endpoint<"DELETE", "/channels/~me/:channelId/messages/:messageId/reactions/:emoji", void, undefined> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/messages/:messageId/reactions/:emoji", void, undefined> | Endpoint<"POST", "/channels/~me/:channelId/messages/:messageId/read", void, undefined> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages/:messageId/read", void, undefined> | Endpoint<"POST", "/channels/~me/:channelId/files", string, FormData> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/files", string, FormData> | Endpoint<"POST", "/channels/~me/:channelId/messages/:messageId/report", void, ReportChannelMessageDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/messages/:messageId/report", void, ReportChannelMessageDto>;
|
|
742
742
|
|
|
743
743
|
declare enum ChannelType {
|
|
744
744
|
Private = "private",
|
|
@@ -773,7 +773,7 @@ type ChannelMember = {
|
|
|
773
773
|
type UserChannelCountOptions = {
|
|
774
774
|
unseen?: boolean;
|
|
775
775
|
};
|
|
776
|
-
type ChannelEndpoints = Endpoint<"GET", "/channels/~me", ArrayResult<Channel>, ArrayOptions<Channel>> | Endpoint<"GET", "/channels/:organizationSlug", ArrayResult<Channel>, ArrayOptions<Channel>> | Endpoint<"GET", "/users/~me/channels/count", number, UserChannelCountOptions> | Endpoint<"GET", "/users/@:organizationSlug/channels/count", number, UserChannelCountOptions> | Endpoint<"GET", "/channels/~me/:channelId", Channel> | Endpoint<"GET", "/channels/:organizationSlug/:channelId", Channel> | Endpoint<"POST", "/channels/~me", Channel, CreateChannelDto> | Endpoint<"POST", "/channels/:organizationSlug", Channel, CreateChannelDto> | Endpoint<"PUT", "/channels/~me/:channelId", Channel, UpdateChannelDto> | Endpoint<"PUT", "/channels/:organizationSlug/:channelId", Channel, UpdateChannelDto> | Endpoint<"DELETE", "/channels/~me/:channelId", void> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId", void> | Endpoint<"POST", "/channels/~me/:channelId/participants", void, AddParticipantDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/participants", void, AddParticipantDto> | Endpoint<"DELETE", "/channels/~me/:channelId/participants/:username", void> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/participants/:username", void> | Endpoint<"GET", "/channels/~me/:channelId/members", ArrayResult<ChannelMember>, ArrayOptions<ChannelMember>> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/members", ArrayResult<ChannelMember>, ArrayOptions<ChannelMember>>;
|
|
776
|
+
type ChannelEndpoints = Endpoint<"GET", "/channels/~me", ArrayResult<Channel>, ArrayOptions<Channel>> | Endpoint<"GET", "/channels/:organizationSlug", ArrayResult<Channel>, ArrayOptions<Channel>> | Endpoint<"GET", "/users/~me/channels/count", number, UserChannelCountOptions> | Endpoint<"GET", "/users/@:organizationSlug/channels/count", number, UserChannelCountOptions> | Endpoint<"GET", "/channels/~me/:channelId", Channel> | Endpoint<"GET", "/channels/:organizationSlug/:channelId", Channel> | Endpoint<"POST", "/channels/~me", Channel, CreateChannelDto> | Endpoint<"POST", "/channels/:organizationSlug", Channel, CreateChannelDto> | Endpoint<"PUT", "/channels/~me/:channelId", Channel, UpdateChannelDto> | Endpoint<"PUT", "/channels/:organizationSlug/:channelId", Channel, UpdateChannelDto> | Endpoint<"DELETE", "/channels/~me/:channelId", void, undefined> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId", void, undefined> | Endpoint<"POST", "/channels/~me/:channelId/participants", void, AddParticipantDto> | Endpoint<"POST", "/channels/:organizationSlug/:channelId/participants", void, AddParticipantDto> | Endpoint<"DELETE", "/channels/~me/:channelId/participants/:username", void, undefined> | Endpoint<"DELETE", "/channels/:organizationSlug/:channelId/participants/:username", void, undefined> | Endpoint<"GET", "/channels/~me/:channelId/members", ArrayResult<ChannelMember>, ArrayOptions<ChannelMember>> | Endpoint<"GET", "/channels/:organizationSlug/:channelId/members", ArrayResult<ChannelMember>, ArrayOptions<ChannelMember>>;
|
|
777
777
|
|
|
778
778
|
declare enum Currency {
|
|
779
779
|
EUR = "EUR",
|
|
@@ -1184,7 +1184,7 @@ declare enum OrganizationMemberRole {
|
|
|
1184
1184
|
Manager = "manager",
|
|
1185
1185
|
Member = "member"
|
|
1186
1186
|
}
|
|
1187
|
-
type OrganizationMembersEndpoints = Endpoint<"GET", "/organizations/members/~me", ArrayResult<OrganizationMember>, ArrayOptions<OrganizationMember>> | Endpoint<"GET", "/organizations/@:organizationSlug/members", ArrayResult<OrganizationMember>, ArrayOptions<OrganizationMember>> | Endpoint<"POST", "/organizations/@:organizationSlug/members", OrganizationMember, CreateOrganizationMemberDto> | Endpoint<"PUT", "/organizations/@:organizationSlug/members/:username", OrganizationMember, UpdateOrganizationMemberDto> | Endpoint<"DELETE", "/organizations/@:organizationSlug/members/:username", OrganizationMember[],
|
|
1187
|
+
type OrganizationMembersEndpoints = Endpoint<"GET", "/organizations/members/~me", ArrayResult<OrganizationMember>, ArrayOptions<OrganizationMember>> | Endpoint<"GET", "/organizations/@:organizationSlug/members", ArrayResult<OrganizationMember>, ArrayOptions<OrganizationMember>> | Endpoint<"POST", "/organizations/@:organizationSlug/members", OrganizationMember, CreateOrganizationMemberDto> | Endpoint<"PUT", "/organizations/@:organizationSlug/members/:username", OrganizationMember, UpdateOrganizationMemberDto> | Endpoint<"DELETE", "/organizations/@:organizationSlug/members/:username", OrganizationMember[], undefined> | Endpoint<"GET", "/organizations/@:organizationSlug/members/invitations/links", ArrayResult<OrganizationToken>, ArrayOptions<OrganizationToken>> | Endpoint<"POST", "/organizations/@:organizationSlug/members/invitations/links", OrganizationToken, CreateOrganizationMemberInvitationLinkDto> | Endpoint<"POST", "/organizations/@:organizationSlug/members/invitations/accept", OrganizationMember, AcceptOrganizationMemberInvitationDto> | Endpoint<"PUT", "/organizations/@:organizationSlug/members/~me/accept", OrganizationMember, undefined> | Endpoint<"DELETE", "/organizations/@:organizationSlug/members/~me/reject", null, undefined> | Endpoint<"DELETE", "/organizations/@:organizationSlug/members/~me", null, undefined>;
|
|
1188
1188
|
|
|
1189
1189
|
type OrganizationOrder = Omit<Order, "user"> & {
|
|
1190
1190
|
customer: OrganizationCustomer;
|
|
@@ -1214,7 +1214,7 @@ declare enum OrganizationFileType {
|
|
|
1214
1214
|
type OrganizationEndpoints = Endpoint<"GET", "/organizations/search", Organization[], {
|
|
1215
1215
|
q: string;
|
|
1216
1216
|
limit?: number;
|
|
1217
|
-
}> | Endpoint<"GET", "/organizations", ArrayResult<Organization>, ArrayOptions<Organization>> | Endpoint<"GET", "/organizations/@:organizationSlug", Organization> | Endpoint<"POST", "/organizations", Organization, CreateOrganizationDto> | Endpoint<"PUT", "/organizations/@:organizationSlug", Organization, UpdateOrganizationDto> | Endpoint<"DELETE", "/organizations/@:organizationSlug", Organization,
|
|
1217
|
+
}> | Endpoint<"GET", "/organizations", ArrayResult<Organization>, ArrayOptions<Organization>> | Endpoint<"GET", "/organizations/@:organizationSlug", Organization> | Endpoint<"POST", "/organizations", Organization, CreateOrganizationDto> | Endpoint<"PUT", "/organizations/@:organizationSlug", Organization, UpdateOrganizationDto> | Endpoint<"DELETE", "/organizations/@:organizationSlug", Organization, undefined> | Endpoint<"POST", "/organizations/@:organizationSlug/files/:organizationFileType", string, FormData> | Endpoint<"GET", "/organizations/@:organizationSlug/billing/account", OrganizationBillingAccount> | Endpoint<"GET", "/organizations/@:organizationSlug/billing/link", void> | Endpoint<"GET", "/organizations/@:organizationSlug/billing/dashboard", void> | OrganizationEventEndpoints | OrganizationMembersEndpoints | OrganizationAnalyticsEndpoints | OrganizationCustomersEndpoints | OrganizationOrdersEndpoints;
|
|
1218
1218
|
|
|
1219
1219
|
type WebhookEndpoints = Endpoint<"POST", "/webhooks/stripe", boolean, Stripe__default.Event>;
|
|
1220
1220
|
|
|
@@ -1291,6 +1291,7 @@ type Endpoints = ApiKeyEndpoints | AuthEndpoints | CareerEndpoints | ChannelEndp
|
|
|
1291
1291
|
|
|
1292
1292
|
interface APIRequestOptions extends Options {
|
|
1293
1293
|
apiKey?: string;
|
|
1294
|
+
accessToken?: string;
|
|
1294
1295
|
}
|
|
1295
1296
|
declare const request: <T>(url: string, options?: APIRequestOptions) => Promise<Response$1<APIResponse<T>>>;
|
|
1296
1297
|
|
|
@@ -1344,15 +1345,18 @@ declare class TonightPassAPIError<T> extends Error {
|
|
|
1344
1345
|
interface ClientOptions {
|
|
1345
1346
|
readonly baseURL: string;
|
|
1346
1347
|
readonly apiKey?: string;
|
|
1348
|
+
readonly accessToken?: string;
|
|
1347
1349
|
readonly cache?: CacheOptions;
|
|
1348
1350
|
}
|
|
1349
1351
|
declare class Client {
|
|
1350
1352
|
private options;
|
|
1351
1353
|
private apiKey?;
|
|
1354
|
+
private accessToken?;
|
|
1352
1355
|
private cacheManager?;
|
|
1353
1356
|
readonly url: (path: string, params: Record<string, ParamValue>) => string;
|
|
1354
1357
|
constructor(options: ClientOptions);
|
|
1355
1358
|
setOptions(options: ClientOptions): void;
|
|
1359
|
+
setAccessToken(accessToken: string | undefined): void;
|
|
1356
1360
|
clearCache(): void;
|
|
1357
1361
|
getCacheStats(): {
|
|
1358
1362
|
size: number;
|
|
@@ -1385,7 +1389,7 @@ declare const auth: (client: Client) => {
|
|
|
1385
1389
|
signIn: (data: SignInUserDto) => Promise<AuthResponse>;
|
|
1386
1390
|
signUp: (data: CreateUserDto) => Promise<AuthResponse>;
|
|
1387
1391
|
signOut: () => Promise<null>;
|
|
1388
|
-
refreshToken: () => Promise<
|
|
1392
|
+
refreshToken: () => Promise<AuthResponse>;
|
|
1389
1393
|
recovery: (data: RecoveryDto) => Promise<RecoveryResponse>;
|
|
1390
1394
|
recoveryReset: (data: RecoveryResetDto) => Promise<null>;
|
|
1391
1395
|
oauth2: {
|
|
@@ -1661,7 +1665,7 @@ declare class TonightPass {
|
|
|
1661
1665
|
signIn: (data: SignInUserDto) => Promise<AuthResponse>;
|
|
1662
1666
|
signUp: (data: CreateUserDto) => Promise<AuthResponse>;
|
|
1663
1667
|
signOut: () => Promise<null>;
|
|
1664
|
-
refreshToken: () => Promise<
|
|
1668
|
+
refreshToken: () => Promise<AuthResponse>;
|
|
1665
1669
|
recovery: (data: RecoveryDto) => Promise<RecoveryResponse>;
|
|
1666
1670
|
recoveryReset: (data: RecoveryResetDto) => Promise<null>;
|
|
1667
1671
|
oauth2: {
|