tonightpass 0.0.244 → 0.0.246
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 +46 -11
- package/dist/index.d.ts +46 -11
- 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
|
@@ -644,7 +644,17 @@ interface Health<T extends string = string> extends HealthCheckResult {
|
|
|
644
644
|
error?: Record<T, HealthIndicatorResult[T]>;
|
|
645
645
|
details: Record<T, HealthIndicatorResult[T]>;
|
|
646
646
|
}
|
|
647
|
-
type
|
|
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>;
|
|
648
658
|
|
|
649
659
|
/**
|
|
650
660
|
* Represents a GeoJSON point with specific geographic coordinates.
|
|
@@ -1415,29 +1425,52 @@ declare const UserRolePower: {
|
|
|
1415
1425
|
[key in UserRole]: number;
|
|
1416
1426
|
};
|
|
1417
1427
|
|
|
1428
|
+
declare class MemoryCacheStore implements CacheStore {
|
|
1429
|
+
private readonly cache;
|
|
1430
|
+
private readonly maxSize;
|
|
1431
|
+
constructor(maxSize?: number);
|
|
1432
|
+
get(key: string): Promise<CacheEntry<unknown> | null>;
|
|
1433
|
+
set(key: string, entry: CacheEntry<unknown>): Promise<void>;
|
|
1434
|
+
delete(key: string): Promise<void>;
|
|
1435
|
+
clear(): Promise<void>;
|
|
1436
|
+
size(): Promise<number>;
|
|
1437
|
+
keys(): Promise<string[]>;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1418
1440
|
type CacheEntry<T> = {
|
|
1419
1441
|
data: T;
|
|
1420
1442
|
timestamp: number;
|
|
1421
1443
|
};
|
|
1444
|
+
type CacheStore = {
|
|
1445
|
+
get(key: string): Promise<CacheEntry<unknown> | null>;
|
|
1446
|
+
set(key: string, entry: CacheEntry<unknown>): Promise<void>;
|
|
1447
|
+
delete(key: string): Promise<void>;
|
|
1448
|
+
clear(): Promise<void>;
|
|
1449
|
+
size(): Promise<number>;
|
|
1450
|
+
keys(): Promise<string[]>;
|
|
1451
|
+
};
|
|
1452
|
+
|
|
1422
1453
|
type CacheOptions = {
|
|
1423
1454
|
enabled: boolean;
|
|
1424
1455
|
ttl?: number;
|
|
1456
|
+
maxSize?: number;
|
|
1425
1457
|
methods?: Options["method"][];
|
|
1458
|
+
store?: CacheStore;
|
|
1426
1459
|
};
|
|
1427
1460
|
declare class CacheManager {
|
|
1428
|
-
private readonly
|
|
1461
|
+
private readonly store;
|
|
1429
1462
|
private readonly options;
|
|
1430
1463
|
constructor(options: CacheOptions);
|
|
1431
1464
|
private generateKey;
|
|
1432
1465
|
private shouldCache;
|
|
1433
1466
|
private isValid;
|
|
1434
|
-
get<T>(method: Options["method"], url: string): T | null
|
|
1435
|
-
set<T>(method: Options["method"], url: string, data: T): void
|
|
1436
|
-
clear(): void
|
|
1437
|
-
stats(): {
|
|
1467
|
+
get<T>(method: Options["method"], url: string): Promise<T | null>;
|
|
1468
|
+
set<T>(method: Options["method"], url: string, data: T): Promise<void>;
|
|
1469
|
+
clear(): Promise<void>;
|
|
1470
|
+
stats(): Promise<{
|
|
1438
1471
|
size: number;
|
|
1439
1472
|
keys: string[];
|
|
1440
|
-
}
|
|
1473
|
+
}>;
|
|
1441
1474
|
}
|
|
1442
1475
|
|
|
1443
1476
|
interface APIRequestOptions extends Options {
|
|
@@ -1508,11 +1541,11 @@ declare class Client {
|
|
|
1508
1541
|
constructor(options: ClientOptions);
|
|
1509
1542
|
setOptions(options: ClientOptions): void;
|
|
1510
1543
|
setAccessToken(accessToken: string | undefined): void;
|
|
1511
|
-
clearCache(): void
|
|
1512
|
-
getCacheStats(): {
|
|
1544
|
+
clearCache(): Promise<void>;
|
|
1545
|
+
getCacheStats(): Promise<{
|
|
1513
1546
|
size: number;
|
|
1514
1547
|
keys: string[];
|
|
1515
|
-
} | undefined
|
|
1548
|
+
} | undefined>;
|
|
1516
1549
|
get<Path extends PathsFor<"GET">>(path: Path, query?: Query<Path>, options?: APIRequestOptions): Promise<ResponseFor<"GET", Path>>;
|
|
1517
1550
|
post<Path extends PathsFor<"POST">>(path: Path, body: Body<"POST", Path>, query?: Query<Path>, options?: APIRequestOptions): Promise<ResponseFor<"POST", Path>>;
|
|
1518
1551
|
put<Path extends PathsFor<"PUT">>(path: Path, body: Body<"PUT", Path>, query?: Query<Path>, options?: APIRequestOptions): Promise<ResponseFor<"PUT", Path>>;
|
|
@@ -1624,6 +1657,7 @@ declare const health: (client: Client) => {
|
|
|
1624
1657
|
database: () => Promise<Health<"database">>;
|
|
1625
1658
|
api: () => Promise<Health<"api">>;
|
|
1626
1659
|
app: () => Promise<Health<"app">>;
|
|
1660
|
+
memory: () => Promise<HealthMemory>;
|
|
1627
1661
|
};
|
|
1628
1662
|
|
|
1629
1663
|
declare const notifications: (client: Client) => {
|
|
@@ -1921,6 +1955,7 @@ declare class TonightPass {
|
|
|
1921
1955
|
database: () => Promise<Health<"database">>;
|
|
1922
1956
|
api: () => Promise<Health<"api">>;
|
|
1923
1957
|
app: () => Promise<Health<"app">>;
|
|
1958
|
+
memory: () => Promise<HealthMemory>;
|
|
1924
1959
|
};
|
|
1925
1960
|
readonly orders: {
|
|
1926
1961
|
getAll: (options?: ArrayOptions<Order>) => Promise<ArrayResult<Order>>;
|
|
@@ -2248,4 +2283,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
|
|
|
2248
2283
|
client: ChannelWebSocketClient;
|
|
2249
2284
|
};
|
|
2250
2285
|
|
|
2251
|
-
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, 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, 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 };
|
|
2286
|
+
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 CacheStore, 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, MemoryCacheStore, 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
|
@@ -644,7 +644,17 @@ interface Health<T extends string = string> extends HealthCheckResult {
|
|
|
644
644
|
error?: Record<T, HealthIndicatorResult[T]>;
|
|
645
645
|
details: Record<T, HealthIndicatorResult[T]>;
|
|
646
646
|
}
|
|
647
|
-
type
|
|
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>;
|
|
648
658
|
|
|
649
659
|
/**
|
|
650
660
|
* Represents a GeoJSON point with specific geographic coordinates.
|
|
@@ -1415,29 +1425,52 @@ declare const UserRolePower: {
|
|
|
1415
1425
|
[key in UserRole]: number;
|
|
1416
1426
|
};
|
|
1417
1427
|
|
|
1428
|
+
declare class MemoryCacheStore implements CacheStore {
|
|
1429
|
+
private readonly cache;
|
|
1430
|
+
private readonly maxSize;
|
|
1431
|
+
constructor(maxSize?: number);
|
|
1432
|
+
get(key: string): Promise<CacheEntry<unknown> | null>;
|
|
1433
|
+
set(key: string, entry: CacheEntry<unknown>): Promise<void>;
|
|
1434
|
+
delete(key: string): Promise<void>;
|
|
1435
|
+
clear(): Promise<void>;
|
|
1436
|
+
size(): Promise<number>;
|
|
1437
|
+
keys(): Promise<string[]>;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1418
1440
|
type CacheEntry<T> = {
|
|
1419
1441
|
data: T;
|
|
1420
1442
|
timestamp: number;
|
|
1421
1443
|
};
|
|
1444
|
+
type CacheStore = {
|
|
1445
|
+
get(key: string): Promise<CacheEntry<unknown> | null>;
|
|
1446
|
+
set(key: string, entry: CacheEntry<unknown>): Promise<void>;
|
|
1447
|
+
delete(key: string): Promise<void>;
|
|
1448
|
+
clear(): Promise<void>;
|
|
1449
|
+
size(): Promise<number>;
|
|
1450
|
+
keys(): Promise<string[]>;
|
|
1451
|
+
};
|
|
1452
|
+
|
|
1422
1453
|
type CacheOptions = {
|
|
1423
1454
|
enabled: boolean;
|
|
1424
1455
|
ttl?: number;
|
|
1456
|
+
maxSize?: number;
|
|
1425
1457
|
methods?: Options["method"][];
|
|
1458
|
+
store?: CacheStore;
|
|
1426
1459
|
};
|
|
1427
1460
|
declare class CacheManager {
|
|
1428
|
-
private readonly
|
|
1461
|
+
private readonly store;
|
|
1429
1462
|
private readonly options;
|
|
1430
1463
|
constructor(options: CacheOptions);
|
|
1431
1464
|
private generateKey;
|
|
1432
1465
|
private shouldCache;
|
|
1433
1466
|
private isValid;
|
|
1434
|
-
get<T>(method: Options["method"], url: string): T | null
|
|
1435
|
-
set<T>(method: Options["method"], url: string, data: T): void
|
|
1436
|
-
clear(): void
|
|
1437
|
-
stats(): {
|
|
1467
|
+
get<T>(method: Options["method"], url: string): Promise<T | null>;
|
|
1468
|
+
set<T>(method: Options["method"], url: string, data: T): Promise<void>;
|
|
1469
|
+
clear(): Promise<void>;
|
|
1470
|
+
stats(): Promise<{
|
|
1438
1471
|
size: number;
|
|
1439
1472
|
keys: string[];
|
|
1440
|
-
}
|
|
1473
|
+
}>;
|
|
1441
1474
|
}
|
|
1442
1475
|
|
|
1443
1476
|
interface APIRequestOptions extends Options {
|
|
@@ -1508,11 +1541,11 @@ declare class Client {
|
|
|
1508
1541
|
constructor(options: ClientOptions);
|
|
1509
1542
|
setOptions(options: ClientOptions): void;
|
|
1510
1543
|
setAccessToken(accessToken: string | undefined): void;
|
|
1511
|
-
clearCache(): void
|
|
1512
|
-
getCacheStats(): {
|
|
1544
|
+
clearCache(): Promise<void>;
|
|
1545
|
+
getCacheStats(): Promise<{
|
|
1513
1546
|
size: number;
|
|
1514
1547
|
keys: string[];
|
|
1515
|
-
} | undefined
|
|
1548
|
+
} | undefined>;
|
|
1516
1549
|
get<Path extends PathsFor<"GET">>(path: Path, query?: Query<Path>, options?: APIRequestOptions): Promise<ResponseFor<"GET", Path>>;
|
|
1517
1550
|
post<Path extends PathsFor<"POST">>(path: Path, body: Body<"POST", Path>, query?: Query<Path>, options?: APIRequestOptions): Promise<ResponseFor<"POST", Path>>;
|
|
1518
1551
|
put<Path extends PathsFor<"PUT">>(path: Path, body: Body<"PUT", Path>, query?: Query<Path>, options?: APIRequestOptions): Promise<ResponseFor<"PUT", Path>>;
|
|
@@ -1624,6 +1657,7 @@ declare const health: (client: Client) => {
|
|
|
1624
1657
|
database: () => Promise<Health<"database">>;
|
|
1625
1658
|
api: () => Promise<Health<"api">>;
|
|
1626
1659
|
app: () => Promise<Health<"app">>;
|
|
1660
|
+
memory: () => Promise<HealthMemory>;
|
|
1627
1661
|
};
|
|
1628
1662
|
|
|
1629
1663
|
declare const notifications: (client: Client) => {
|
|
@@ -1921,6 +1955,7 @@ declare class TonightPass {
|
|
|
1921
1955
|
database: () => Promise<Health<"database">>;
|
|
1922
1956
|
api: () => Promise<Health<"api">>;
|
|
1923
1957
|
app: () => Promise<Health<"app">>;
|
|
1958
|
+
memory: () => Promise<HealthMemory>;
|
|
1924
1959
|
};
|
|
1925
1960
|
readonly orders: {
|
|
1926
1961
|
getAll: (options?: ArrayOptions<Order>) => Promise<ArrayResult<Order>>;
|
|
@@ -2248,4 +2283,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
|
|
|
2248
2283
|
client: ChannelWebSocketClient;
|
|
2249
2284
|
};
|
|
2250
2285
|
|
|
2251
|
-
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, 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, 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 };
|
|
2286
|
+
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 CacheStore, 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, MemoryCacheStore, 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 };
|