tonightpass 0.0.243 → 0.0.245

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 CHANGED
@@ -34,50 +34,6 @@ declare const REGEX: {
34
34
  USER_POST_MEDIA_URL: RegExp;
35
35
  };
36
36
 
37
- type CreateApiKeyDto = {
38
- name: string;
39
- };
40
-
41
- type UpdateApiKeyDto = {
42
- name?: string;
43
- isActive?: boolean;
44
- };
45
-
46
- declare class AddParticipantDto {
47
- username: string;
48
- }
49
-
50
- type Endpoint<M extends Options["method"], Path extends string, Res, Body = undefined> = {
51
- method: M;
52
- path: Path;
53
- res: Res;
54
- body: Body;
55
- };
56
- type SSEEndpoints = Extract<Endpoints, {
57
- method: "GET";
58
- }> extends infer E ? E extends {
59
- res: ReadableStream<infer _>;
60
- path: infer P;
61
- } ? P : never : never;
62
- type Endpoints = ApiKeyEndpoints | AuthEndpoints | CareerEndpoints | ChannelEndpoints | ChannelMessageEndpoints | CurrenciesEndpoints | FeedEndpoints | HealthEndpoints | OrderEndpoints | OrganizationEndpoints | PlaceEndpoints | ProfileEndpoints | RoadmapEndpoints | UserEndpoints | WebhookEndpoints | NotificationEndpoints;
63
-
64
- declare enum ApiKeyTier {
65
- PUBLIC = "public",
66
- BUILD = "build",
67
- PREMIUM = "premium",
68
- INTERNAL = "internal"
69
- }
70
- type ApiKey = Base & {
71
- key: string;
72
- name: string;
73
- tier: ApiKeyTier;
74
- rateLimit: number;
75
- user: UserProfile;
76
- lastUsedAt?: Date;
77
- isActive: boolean;
78
- };
79
- 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>;
80
-
81
37
  declare enum UserNotificationType {
82
38
  Follow = "follow"
83
39
  }
@@ -688,7 +644,17 @@ interface Health<T extends string = string> extends HealthCheckResult {
688
644
  error?: Record<T, HealthIndicatorResult[T]>;
689
645
  details: Record<T, HealthIndicatorResult[T]>;
690
646
  }
691
- type HealthEndpoints = Endpoint<"GET", "/health", Health<"database" | "app" | "api" | "database">> | Endpoint<"GET", "/health/database", Health<"database">> | Endpoint<"GET", "/health/api", Health<"api">> | Endpoint<"GET", "/health/app", Health<"app">>;
647
+ type MemorySnapshot = {
648
+ heapUsed: number;
649
+ heapTotal: number;
650
+ rss: number;
651
+ external: number;
652
+ };
653
+ type HealthMemory = {
654
+ before: MemorySnapshot;
655
+ afterGc: MemorySnapshot;
656
+ };
657
+ type HealthEndpoints = Endpoint<"GET", "/health", Health<"database" | "app" | "api" | "database">> | Endpoint<"GET", "/health/database", Health<"database">> | Endpoint<"GET", "/health/api", Health<"api">> | Endpoint<"GET", "/health/app", Health<"app">> | Endpoint<"GET", "/health/memory", HealthMemory>;
692
658
 
693
659
  /**
694
660
  * Represents a GeoJSON point with specific geographic coordinates.
@@ -1113,6 +1079,60 @@ type ArrayResult<T> = {
1113
1079
  limit: number;
1114
1080
  };
1115
1081
 
1082
+ type Endpoint<M extends Options["method"], Path extends string, Res, Body = undefined> = {
1083
+ method: M;
1084
+ path: Path;
1085
+ res: Res;
1086
+ body: Body;
1087
+ };
1088
+ type SSEEndpoints = Extract<Endpoints, {
1089
+ method: "GET";
1090
+ }> extends infer E ? E extends {
1091
+ res: ReadableStream<infer _>;
1092
+ path: infer P;
1093
+ } ? P : never : never;
1094
+ type Endpoints = ApiKeyEndpoints | AuthEndpoints | CareerEndpoints | ChannelEndpoints | ChannelMessageEndpoints | CurrenciesEndpoints | FeedEndpoints | HealthEndpoints | OrderEndpoints | OrganizationEndpoints | PlaceEndpoints | ProfileEndpoints | RoadmapEndpoints | UserEndpoints | WebhookEndpoints | NotificationEndpoints;
1095
+
1096
+ declare enum ApiKeyTier {
1097
+ PUBLIC = "public",
1098
+ INTERNAL = "internal"
1099
+ }
1100
+ declare enum ApiKeyType {
1101
+ User = "user",
1102
+ App = "app"
1103
+ }
1104
+ type ApiKey = Base & {
1105
+ key: string;
1106
+ name: string;
1107
+ type: ApiKeyType;
1108
+ tier: ApiKeyTier;
1109
+ rateLimit: number;
1110
+ allowedOrigins: string[];
1111
+ user: UserProfile;
1112
+ lastUsedAt?: Date;
1113
+ isActive: boolean;
1114
+ };
1115
+ 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>;
1116
+
1117
+ declare class CreateApiKeyDto {
1118
+ name: string;
1119
+ type?: ApiKeyType;
1120
+ tier?: ApiKeyTier;
1121
+ allowedOrigins?: string[];
1122
+ }
1123
+
1124
+ declare class UpdateApiKeyDto {
1125
+ name?: string;
1126
+ isActive?: boolean;
1127
+ type?: ApiKeyType;
1128
+ tier?: ApiKeyTier;
1129
+ allowedOrigins?: string[];
1130
+ }
1131
+
1132
+ declare class AddParticipantDto {
1133
+ username: string;
1134
+ }
1135
+
1116
1136
  declare class CreateChannelDto {
1117
1137
  type: ChannelType;
1118
1138
  participantUsernames: string[];
@@ -1614,6 +1634,7 @@ declare const health: (client: Client) => {
1614
1634
  database: () => Promise<Health<"database">>;
1615
1635
  api: () => Promise<Health<"api">>;
1616
1636
  app: () => Promise<Health<"app">>;
1637
+ memory: () => Promise<HealthMemory>;
1617
1638
  };
1618
1639
 
1619
1640
  declare const notifications: (client: Client) => {
@@ -1911,6 +1932,7 @@ declare class TonightPass {
1911
1932
  database: () => Promise<Health<"database">>;
1912
1933
  api: () => Promise<Health<"api">>;
1913
1934
  app: () => Promise<Health<"app">>;
1935
+ memory: () => Promise<HealthMemory>;
1914
1936
  };
1915
1937
  readonly orders: {
1916
1938
  getAll: (options?: ArrayOptions<Order>) => Promise<ArrayResult<Order>>;
@@ -2238,4 +2260,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
2238
2260
  client: ChannelWebSocketClient;
2239
2261
  };
2240
2262
 
2241
- export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AddRoadmapReactionBody, type AnalyticsOptions, type ApiKey, type ApiKeyEndpoints, ApiKeyTier, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, AuthFlow, type AuthMethod, type AuthResponse, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CacheEntry, CacheManager, type CacheOptions, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelDeleteEvent, type ChannelEndpoints, type ChannelMember, type ChannelMemberJoinEvent, type ChannelMemberLeaveEvent, ChannelMemberRole, type ChannelMessage, type ChannelMessageCreateEvent, type ChannelMessageDeleteEvent, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelMessageUpdateEvent, type ChannelParticipant, ChannelStatus, ChannelType, type ChannelUpdateEvent, ChannelWebSocketClient, type ChannelWebSocketEvent, Client, type ClientOptions, ContentOrAttachmentsConstraint, type CreateApiKeyDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, CreateUserPostCommentDto, CreateUserPostDto, CreateUserPostRepostDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type FeedEndpoints, type FeedPost, FeedType, type FileObject, type GeoPoint, GeoPointDto, type GeoSearchAggregation, GoogleOneTapDto, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NearbyCitiesOptions, type NotificationEndpoints, OAuth2Provider, type Order, type OrderEndpoints, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationCustomer, type OrganizationCustomerMetadata, type OrganizationCustomersEndpoints, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventCalendar, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, type OrganizationEventViewEndpoints, type OrganizationEventViewOptions, type OrganizationEventViewResult, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberRolePower, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationOrder, type OrganizationOrdersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type PlaceCity, type PlaceCountry, type PlaceEndpoints, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, ROADMAP_REACTIONS, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, type RoadmapEndpoints, type RoadmapFeature, RoadmapFeatureStatus, type RoadmapReaction, type RoadmapReactionCounts, type SSEEndpoints, type SearchOrganizationEventsOptions, type SearchPlacesOptions, type SearchProfilesOptions, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TypingStartEvent, type TypingStopEvent, type UpdateApiKeyDto, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, UpdateUserPostCommentDto, UpdateUserPostDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserBookingTicketEndpoints, type UserBookingWithoutTickets, type UserChannelCountOptions, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserCustomer, type UserCustomerMetadata, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserOAuthProvider, type UserPost, type UserPostComment, type UserPostCommentEndpoints, type UserPostEndpoints, type UserPostMedia, type UserPostMediaEndpoints, UserPostMediaType, type UserPostRepost, type UserPostRepostEndpoints, type UserPostViewEndpoints, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, UserRolePower, type UserToken, UserTokenType, VerifyEmailConfirmDto, type VerifyEmailResponse, WebSocketClient, type WebSocketClientOptions, type WebSocketConnectOptions, type WebSocketEndpoint, type WebSocketEndpoints, type WebSocketEvent, type WebSocketEventHandler, type WebSocketOptionsFor, type WebSocketPath, type WebSocketPaths, type WebSocketPathsFor, type WebhookEndpoints, apiKeys, auth, buildFileFormData, careers, channels, channelsWS, currencies, feed, health, isBrowser, isMemberRoleAtLeast, normalizeAddress, notifications, orders, organizations, places, profiles, request, roadmap, sdk, users };
2263
+ export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AddRoadmapReactionBody, type AnalyticsOptions, type ApiKey, type ApiKeyEndpoints, ApiKeyTier, ApiKeyType, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, AuthFlow, type AuthMethod, type AuthResponse, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CacheEntry, CacheManager, type CacheOptions, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelDeleteEvent, type ChannelEndpoints, type ChannelMember, type ChannelMemberJoinEvent, type ChannelMemberLeaveEvent, ChannelMemberRole, type ChannelMessage, type ChannelMessageCreateEvent, type ChannelMessageDeleteEvent, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelMessageUpdateEvent, type ChannelParticipant, ChannelStatus, ChannelType, type ChannelUpdateEvent, ChannelWebSocketClient, type ChannelWebSocketEvent, Client, type ClientOptions, ContentOrAttachmentsConstraint, CreateApiKeyDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, CreateUserPostCommentDto, CreateUserPostDto, CreateUserPostRepostDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type FeedEndpoints, type FeedPost, FeedType, type FileObject, type GeoPoint, GeoPointDto, type GeoSearchAggregation, GoogleOneTapDto, type Health, type HealthEndpoints, type HealthMemory, Language, type Location$1 as Location, type MemorySnapshot, type NearbyCitiesOptions, type NotificationEndpoints, OAuth2Provider, type Order, type OrderEndpoints, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationCustomer, type OrganizationCustomerMetadata, type OrganizationCustomersEndpoints, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventCalendar, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, type OrganizationEventViewEndpoints, type OrganizationEventViewOptions, type OrganizationEventViewResult, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberRolePower, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationOrder, type OrganizationOrdersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type PlaceCity, type PlaceCountry, type PlaceEndpoints, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, ROADMAP_REACTIONS, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, type RoadmapEndpoints, type RoadmapFeature, RoadmapFeatureStatus, type RoadmapReaction, type RoadmapReactionCounts, type SSEEndpoints, type SearchOrganizationEventsOptions, type SearchPlacesOptions, type SearchProfilesOptions, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TypingStartEvent, type TypingStopEvent, UpdateApiKeyDto, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, UpdateUserPostCommentDto, UpdateUserPostDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserBookingTicketEndpoints, type UserBookingWithoutTickets, type UserChannelCountOptions, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserCustomer, type UserCustomerMetadata, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserOAuthProvider, type UserPost, type UserPostComment, type UserPostCommentEndpoints, type UserPostEndpoints, type UserPostMedia, type UserPostMediaEndpoints, UserPostMediaType, type UserPostRepost, type UserPostRepostEndpoints, type UserPostViewEndpoints, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, UserRolePower, type UserToken, UserTokenType, VerifyEmailConfirmDto, type VerifyEmailResponse, WebSocketClient, type WebSocketClientOptions, type WebSocketConnectOptions, type WebSocketEndpoint, type WebSocketEndpoints, type WebSocketEvent, type WebSocketEventHandler, type WebSocketOptionsFor, type WebSocketPath, type WebSocketPaths, type WebSocketPathsFor, type WebhookEndpoints, apiKeys, auth, buildFileFormData, careers, channels, channelsWS, currencies, feed, health, isBrowser, isMemberRoleAtLeast, normalizeAddress, notifications, orders, organizations, places, profiles, request, roadmap, sdk, users };
package/dist/index.d.ts CHANGED
@@ -34,50 +34,6 @@ declare const REGEX: {
34
34
  USER_POST_MEDIA_URL: RegExp;
35
35
  };
36
36
 
37
- type CreateApiKeyDto = {
38
- name: string;
39
- };
40
-
41
- type UpdateApiKeyDto = {
42
- name?: string;
43
- isActive?: boolean;
44
- };
45
-
46
- declare class AddParticipantDto {
47
- username: string;
48
- }
49
-
50
- type Endpoint<M extends Options["method"], Path extends string, Res, Body = undefined> = {
51
- method: M;
52
- path: Path;
53
- res: Res;
54
- body: Body;
55
- };
56
- type SSEEndpoints = Extract<Endpoints, {
57
- method: "GET";
58
- }> extends infer E ? E extends {
59
- res: ReadableStream<infer _>;
60
- path: infer P;
61
- } ? P : never : never;
62
- type Endpoints = ApiKeyEndpoints | AuthEndpoints | CareerEndpoints | ChannelEndpoints | ChannelMessageEndpoints | CurrenciesEndpoints | FeedEndpoints | HealthEndpoints | OrderEndpoints | OrganizationEndpoints | PlaceEndpoints | ProfileEndpoints | RoadmapEndpoints | UserEndpoints | WebhookEndpoints | NotificationEndpoints;
63
-
64
- declare enum ApiKeyTier {
65
- PUBLIC = "public",
66
- BUILD = "build",
67
- PREMIUM = "premium",
68
- INTERNAL = "internal"
69
- }
70
- type ApiKey = Base & {
71
- key: string;
72
- name: string;
73
- tier: ApiKeyTier;
74
- rateLimit: number;
75
- user: UserProfile;
76
- lastUsedAt?: Date;
77
- isActive: boolean;
78
- };
79
- 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>;
80
-
81
37
  declare enum UserNotificationType {
82
38
  Follow = "follow"
83
39
  }
@@ -688,7 +644,17 @@ interface Health<T extends string = string> extends HealthCheckResult {
688
644
  error?: Record<T, HealthIndicatorResult[T]>;
689
645
  details: Record<T, HealthIndicatorResult[T]>;
690
646
  }
691
- type HealthEndpoints = Endpoint<"GET", "/health", Health<"database" | "app" | "api" | "database">> | Endpoint<"GET", "/health/database", Health<"database">> | Endpoint<"GET", "/health/api", Health<"api">> | Endpoint<"GET", "/health/app", Health<"app">>;
647
+ type MemorySnapshot = {
648
+ heapUsed: number;
649
+ heapTotal: number;
650
+ rss: number;
651
+ external: number;
652
+ };
653
+ type HealthMemory = {
654
+ before: MemorySnapshot;
655
+ afterGc: MemorySnapshot;
656
+ };
657
+ type HealthEndpoints = Endpoint<"GET", "/health", Health<"database" | "app" | "api" | "database">> | Endpoint<"GET", "/health/database", Health<"database">> | Endpoint<"GET", "/health/api", Health<"api">> | Endpoint<"GET", "/health/app", Health<"app">> | Endpoint<"GET", "/health/memory", HealthMemory>;
692
658
 
693
659
  /**
694
660
  * Represents a GeoJSON point with specific geographic coordinates.
@@ -1113,6 +1079,60 @@ type ArrayResult<T> = {
1113
1079
  limit: number;
1114
1080
  };
1115
1081
 
1082
+ type Endpoint<M extends Options["method"], Path extends string, Res, Body = undefined> = {
1083
+ method: M;
1084
+ path: Path;
1085
+ res: Res;
1086
+ body: Body;
1087
+ };
1088
+ type SSEEndpoints = Extract<Endpoints, {
1089
+ method: "GET";
1090
+ }> extends infer E ? E extends {
1091
+ res: ReadableStream<infer _>;
1092
+ path: infer P;
1093
+ } ? P : never : never;
1094
+ type Endpoints = ApiKeyEndpoints | AuthEndpoints | CareerEndpoints | ChannelEndpoints | ChannelMessageEndpoints | CurrenciesEndpoints | FeedEndpoints | HealthEndpoints | OrderEndpoints | OrganizationEndpoints | PlaceEndpoints | ProfileEndpoints | RoadmapEndpoints | UserEndpoints | WebhookEndpoints | NotificationEndpoints;
1095
+
1096
+ declare enum ApiKeyTier {
1097
+ PUBLIC = "public",
1098
+ INTERNAL = "internal"
1099
+ }
1100
+ declare enum ApiKeyType {
1101
+ User = "user",
1102
+ App = "app"
1103
+ }
1104
+ type ApiKey = Base & {
1105
+ key: string;
1106
+ name: string;
1107
+ type: ApiKeyType;
1108
+ tier: ApiKeyTier;
1109
+ rateLimit: number;
1110
+ allowedOrigins: string[];
1111
+ user: UserProfile;
1112
+ lastUsedAt?: Date;
1113
+ isActive: boolean;
1114
+ };
1115
+ 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>;
1116
+
1117
+ declare class CreateApiKeyDto {
1118
+ name: string;
1119
+ type?: ApiKeyType;
1120
+ tier?: ApiKeyTier;
1121
+ allowedOrigins?: string[];
1122
+ }
1123
+
1124
+ declare class UpdateApiKeyDto {
1125
+ name?: string;
1126
+ isActive?: boolean;
1127
+ type?: ApiKeyType;
1128
+ tier?: ApiKeyTier;
1129
+ allowedOrigins?: string[];
1130
+ }
1131
+
1132
+ declare class AddParticipantDto {
1133
+ username: string;
1134
+ }
1135
+
1116
1136
  declare class CreateChannelDto {
1117
1137
  type: ChannelType;
1118
1138
  participantUsernames: string[];
@@ -1614,6 +1634,7 @@ declare const health: (client: Client) => {
1614
1634
  database: () => Promise<Health<"database">>;
1615
1635
  api: () => Promise<Health<"api">>;
1616
1636
  app: () => Promise<Health<"app">>;
1637
+ memory: () => Promise<HealthMemory>;
1617
1638
  };
1618
1639
 
1619
1640
  declare const notifications: (client: Client) => {
@@ -1911,6 +1932,7 @@ declare class TonightPass {
1911
1932
  database: () => Promise<Health<"database">>;
1912
1933
  api: () => Promise<Health<"api">>;
1913
1934
  app: () => Promise<Health<"app">>;
1935
+ memory: () => Promise<HealthMemory>;
1914
1936
  };
1915
1937
  readonly orders: {
1916
1938
  getAll: (options?: ArrayOptions<Order>) => Promise<ArrayResult<Order>>;
@@ -2238,4 +2260,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
2238
2260
  client: ChannelWebSocketClient;
2239
2261
  };
2240
2262
 
2241
- export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AddRoadmapReactionBody, type AnalyticsOptions, type ApiKey, type ApiKeyEndpoints, ApiKeyTier, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, AuthFlow, type AuthMethod, type AuthResponse, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CacheEntry, CacheManager, type CacheOptions, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelDeleteEvent, type ChannelEndpoints, type ChannelMember, type ChannelMemberJoinEvent, type ChannelMemberLeaveEvent, ChannelMemberRole, type ChannelMessage, type ChannelMessageCreateEvent, type ChannelMessageDeleteEvent, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelMessageUpdateEvent, type ChannelParticipant, ChannelStatus, ChannelType, type ChannelUpdateEvent, ChannelWebSocketClient, type ChannelWebSocketEvent, Client, type ClientOptions, ContentOrAttachmentsConstraint, type CreateApiKeyDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, CreateUserPostCommentDto, CreateUserPostDto, CreateUserPostRepostDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type FeedEndpoints, type FeedPost, FeedType, type FileObject, type GeoPoint, GeoPointDto, type GeoSearchAggregation, GoogleOneTapDto, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NearbyCitiesOptions, type NotificationEndpoints, OAuth2Provider, type Order, type OrderEndpoints, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationCustomer, type OrganizationCustomerMetadata, type OrganizationCustomersEndpoints, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventCalendar, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, type OrganizationEventViewEndpoints, type OrganizationEventViewOptions, type OrganizationEventViewResult, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberRolePower, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationOrder, type OrganizationOrdersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type PlaceCity, type PlaceCountry, type PlaceEndpoints, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, ROADMAP_REACTIONS, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, type RoadmapEndpoints, type RoadmapFeature, RoadmapFeatureStatus, type RoadmapReaction, type RoadmapReactionCounts, type SSEEndpoints, type SearchOrganizationEventsOptions, type SearchPlacesOptions, type SearchProfilesOptions, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TypingStartEvent, type TypingStopEvent, type UpdateApiKeyDto, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, UpdateUserPostCommentDto, UpdateUserPostDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserBookingTicketEndpoints, type UserBookingWithoutTickets, type UserChannelCountOptions, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserCustomer, type UserCustomerMetadata, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserOAuthProvider, type UserPost, type UserPostComment, type UserPostCommentEndpoints, type UserPostEndpoints, type UserPostMedia, type UserPostMediaEndpoints, UserPostMediaType, type UserPostRepost, type UserPostRepostEndpoints, type UserPostViewEndpoints, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, UserRolePower, type UserToken, UserTokenType, VerifyEmailConfirmDto, type VerifyEmailResponse, WebSocketClient, type WebSocketClientOptions, type WebSocketConnectOptions, type WebSocketEndpoint, type WebSocketEndpoints, type WebSocketEvent, type WebSocketEventHandler, type WebSocketOptionsFor, type WebSocketPath, type WebSocketPaths, type WebSocketPathsFor, type WebhookEndpoints, apiKeys, auth, buildFileFormData, careers, channels, channelsWS, currencies, feed, health, isBrowser, isMemberRoleAtLeast, normalizeAddress, notifications, orders, organizations, places, profiles, request, roadmap, sdk, users };
2263
+ export { type APIRequestOptions, type APIResponse, AcceptOrganizationMemberInvitationDto, AddParticipantDto, AddReactionDto, type AddRoadmapReactionBody, type AnalyticsOptions, type ApiKey, type ApiKeyEndpoints, ApiKeyTier, ApiKeyType, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, AtLeastOneMedia, AtLeastOneMediaConstraint, AtLeastOneMediaOnUpdate, AtLeastOneMediaOnUpdateConstraint, type AuthEndpoints, AuthFlow, type AuthMethod, type AuthResponse, type Base, BaseOrganizationEventDto, type BaseProfile, type BaseProfileMetadata, type Body, type CacheEntry, CacheManager, type CacheOptions, type CareerEndpoints, type CareersCategory, type CareersEmploymentType, type CareersJob, type CareersOffice, type Channel, type ChannelDeleteEvent, type ChannelEndpoints, type ChannelMember, type ChannelMemberJoinEvent, type ChannelMemberLeaveEvent, ChannelMemberRole, type ChannelMessage, type ChannelMessageCreateEvent, type ChannelMessageDeleteEvent, type ChannelMessageEndpoints, type ChannelMessageReaction, type ChannelMessageReadByEntry, ChannelMessageReportReason, type ChannelMessageUpdateEvent, type ChannelParticipant, ChannelStatus, ChannelType, type ChannelUpdateEvent, ChannelWebSocketClient, type ChannelWebSocketEvent, Client, type ClientOptions, ContentOrAttachmentsConstraint, CreateApiKeyDto, CreateChannelDto, CreateChannelMessageDto, CreateLocationDto, CreateOrganizationDto, CreateOrganizationEventDto, type CreateOrganizationEventInput, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, type CreateOrganizationEventTicketInput, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateOrganizationMemberInvitationLinkDto, CreateUserDto, CreateUserIdentityDto, CreateUserPostCommentDto, CreateUserPostDto, CreateUserPostRepostDto, type CurrenciesEndpoints, Currency, type CurrencyConversion, type CurrencyConversionResult, DEFAULT_API_URL, type DeepPartial, type Distance, type Endpoint, type Endpoints, ErrorType, type ErroredAPIResponse, type EventAnalyticsOptions, type ExchangeRates, type ExcludeBase, type FeedEndpoints, type FeedPost, FeedType, type FileObject, type GeoPoint, GeoPointDto, type GeoSearchAggregation, GoogleOneTapDto, type Health, type HealthEndpoints, type HealthMemory, Language, type Location$1 as Location, type MemorySnapshot, type NearbyCitiesOptions, type NotificationEndpoints, OAuth2Provider, type Order, type OrderEndpoints, type Organization, type OrganizationAnalyticsEndpoints, type OrganizationAnalyticsOverview, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationCustomer, type OrganizationCustomerMetadata, type OrganizationCustomersEndpoints, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventAnalytics, type OrganizationEventArrayOptions, type OrganizationEventCalendar, type OrganizationEventEndpoints, OrganizationEventFileType, type OrganizationEventOrderEndpoints, OrganizationEventStatus, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, type OrganizationEventViewEndpoints, type OrganizationEventViewOptions, type OrganizationEventViewResult, OrganizationEventVisibilityType, OrganizationFileType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberRolePower, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationOrder, type OrganizationOrdersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationToken, OrganizationTokenType, type PathsFor, type PlaceCity, type PlaceCountry, type PlaceEndpoints, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, ROADMAP_REACTIONS, RecoveryDto, RecoveryResetDto, type RecoveryResponse, ReportChannelMessageDto, type Response, type ResponseFor, type RoadmapEndpoints, type RoadmapFeature, RoadmapFeatureStatus, type RoadmapReaction, type RoadmapReactionCounts, type SSEEndpoints, type SearchOrganizationEventsOptions, type SearchPlacesOptions, type SearchProfilesOptions, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, type TypingStartEvent, type TypingStopEvent, UpdateApiKeyDto, UpdateChannelDto, UpdateChannelMessageDto, UpdateLocationDto, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, UpdateUserPostCommentDto, UpdateUserPostDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserBookingTicketEndpoints, type UserBookingWithoutTickets, type UserChannelCountOptions, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserCustomer, type UserCustomerMetadata, type UserEndpoints, UserFileType, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserNotification, type UserNotificationBase, type UserNotificationEndpoints, type UserNotificationFollow, UserNotificationType, type UserOAuthProvider, type UserPost, type UserPostComment, type UserPostCommentEndpoints, type UserPostEndpoints, type UserPostMedia, type UserPostMediaEndpoints, UserPostMediaType, type UserPostRepost, type UserPostRepostEndpoints, type UserPostViewEndpoints, UserPostVisibility, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, UserRolePower, type UserToken, UserTokenType, VerifyEmailConfirmDto, type VerifyEmailResponse, WebSocketClient, type WebSocketClientOptions, type WebSocketConnectOptions, type WebSocketEndpoint, type WebSocketEndpoints, type WebSocketEvent, type WebSocketEventHandler, type WebSocketOptionsFor, type WebSocketPath, type WebSocketPaths, type WebSocketPathsFor, type WebhookEndpoints, apiKeys, auth, buildFileFormData, careers, channels, channelsWS, currencies, feed, health, isBrowser, isMemberRoleAtLeast, normalizeAddress, notifications, orders, organizations, places, profiles, request, roadmap, sdk, users };