tonightpass 0.0.242 → 0.0.244

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
  }
@@ -1014,7 +970,10 @@ type PlaceCity = Base & {
1014
970
  type SearchPlacesOptions = ArrayOptions<PlaceCity> & {
1015
971
  q: string;
1016
972
  };
1017
- type PlaceEndpoints = Endpoint<"GET", "/places/countries", ArrayResult<PlaceCountry>, ArrayOptions<PlaceCountry>> | Endpoint<"GET", "/places/countries/:countrySlug", PlaceCountry> | Endpoint<"GET", "/places/countries/:countrySlug/cities", ArrayResult<PlaceCity>, ArrayOptions<PlaceCity>> | Endpoint<"GET", "/places/countries/:countrySlug/cities/:citySlug", PlaceCity | ExcludeBase<PlaceCity>> | Endpoint<"GET", "/places/cities", ArrayResult<PlaceCity>, ArrayOptions<PlaceCity>> | Endpoint<"GET", "/places/cities/search", ArrayResult<PlaceCity>, SearchPlacesOptions>;
973
+ type NearbyCitiesOptions = ArrayOptions<PlaceCity> & {
974
+ radius?: number;
975
+ };
976
+ type PlaceEndpoints = Endpoint<"GET", "/places/countries", ArrayResult<PlaceCountry>, ArrayOptions<PlaceCountry>> | Endpoint<"GET", "/places/countries/:countrySlug", PlaceCountry> | Endpoint<"GET", "/places/countries/:countrySlug/cities", ArrayResult<PlaceCity>, ArrayOptions<PlaceCity>> | Endpoint<"GET", "/places/countries/:countrySlug/cities/:citySlug", PlaceCity | ExcludeBase<PlaceCity>> | Endpoint<"GET", "/places/countries/:countrySlug/cities/:citySlug/nearby", ArrayResult<Distance<PlaceCity>>, NearbyCitiesOptions> | Endpoint<"GET", "/places/cities", ArrayResult<PlaceCity>, ArrayOptions<PlaceCity>> | Endpoint<"GET", "/places/cities/search", ArrayResult<PlaceCity>, SearchPlacesOptions>;
1018
977
 
1019
978
  declare const ROADMAP_REACTIONS: readonly ["👍", "❤️", "🎉", "👀", "🚀"];
1020
979
  type RoadmapReaction = (typeof ROADMAP_REACTIONS)[number];
@@ -1110,6 +1069,60 @@ type ArrayResult<T> = {
1110
1069
  limit: number;
1111
1070
  };
1112
1071
 
1072
+ type Endpoint<M extends Options["method"], Path extends string, Res, Body = undefined> = {
1073
+ method: M;
1074
+ path: Path;
1075
+ res: Res;
1076
+ body: Body;
1077
+ };
1078
+ type SSEEndpoints = Extract<Endpoints, {
1079
+ method: "GET";
1080
+ }> extends infer E ? E extends {
1081
+ res: ReadableStream<infer _>;
1082
+ path: infer P;
1083
+ } ? P : never : never;
1084
+ type Endpoints = ApiKeyEndpoints | AuthEndpoints | CareerEndpoints | ChannelEndpoints | ChannelMessageEndpoints | CurrenciesEndpoints | FeedEndpoints | HealthEndpoints | OrderEndpoints | OrganizationEndpoints | PlaceEndpoints | ProfileEndpoints | RoadmapEndpoints | UserEndpoints | WebhookEndpoints | NotificationEndpoints;
1085
+
1086
+ declare enum ApiKeyTier {
1087
+ PUBLIC = "public",
1088
+ INTERNAL = "internal"
1089
+ }
1090
+ declare enum ApiKeyType {
1091
+ User = "user",
1092
+ App = "app"
1093
+ }
1094
+ type ApiKey = Base & {
1095
+ key: string;
1096
+ name: string;
1097
+ type: ApiKeyType;
1098
+ tier: ApiKeyTier;
1099
+ rateLimit: number;
1100
+ allowedOrigins: string[];
1101
+ user: UserProfile;
1102
+ lastUsedAt?: Date;
1103
+ isActive: boolean;
1104
+ };
1105
+ 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>;
1106
+
1107
+ declare class CreateApiKeyDto {
1108
+ name: string;
1109
+ type?: ApiKeyType;
1110
+ tier?: ApiKeyTier;
1111
+ allowedOrigins?: string[];
1112
+ }
1113
+
1114
+ declare class UpdateApiKeyDto {
1115
+ name?: string;
1116
+ isActive?: boolean;
1117
+ type?: ApiKeyType;
1118
+ tier?: ApiKeyTier;
1119
+ allowedOrigins?: string[];
1120
+ }
1121
+
1122
+ declare class AddParticipantDto {
1123
+ username: string;
1124
+ }
1125
+
1113
1126
  declare class CreateChannelDto {
1114
1127
  type: ChannelType;
1115
1128
  participantUsernames: string[];
@@ -1730,6 +1743,7 @@ declare const places: (client: Client) => {
1730
1743
  cities: {
1731
1744
  getAll: (countrySlug: string, options?: ArrayOptions<PlaceCity>) => Promise<ArrayResult<PlaceCity>>;
1732
1745
  get: (countrySlug: string, citySlug: string) => Promise<PlaceCity | ExcludeBase<PlaceCity>>;
1746
+ nearby: (countrySlug: string, citySlug: string, options?: NearbyCitiesOptions) => Promise<ArrayResult<Distance<PlaceCity>>>;
1733
1747
  };
1734
1748
  };
1735
1749
  cities: {
@@ -1995,6 +2009,7 @@ declare class TonightPass {
1995
2009
  cities: {
1996
2010
  getAll: (countrySlug: string, options?: ArrayOptions<PlaceCity>) => Promise<ArrayResult<PlaceCity>>;
1997
2011
  get: (countrySlug: string, citySlug: string) => Promise<PlaceCity | ExcludeBase<PlaceCity>>;
2012
+ nearby: (countrySlug: string, citySlug: string, options?: NearbyCitiesOptions) => Promise<ArrayResult<Distance<PlaceCity>>>;
1998
2013
  };
1999
2014
  };
2000
2015
  cities: {
@@ -2233,4 +2248,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
2233
2248
  client: ChannelWebSocketClient;
2234
2249
  };
2235
2250
 
2236
- 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 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 };
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 };
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
  }
@@ -1014,7 +970,10 @@ type PlaceCity = Base & {
1014
970
  type SearchPlacesOptions = ArrayOptions<PlaceCity> & {
1015
971
  q: string;
1016
972
  };
1017
- type PlaceEndpoints = Endpoint<"GET", "/places/countries", ArrayResult<PlaceCountry>, ArrayOptions<PlaceCountry>> | Endpoint<"GET", "/places/countries/:countrySlug", PlaceCountry> | Endpoint<"GET", "/places/countries/:countrySlug/cities", ArrayResult<PlaceCity>, ArrayOptions<PlaceCity>> | Endpoint<"GET", "/places/countries/:countrySlug/cities/:citySlug", PlaceCity | ExcludeBase<PlaceCity>> | Endpoint<"GET", "/places/cities", ArrayResult<PlaceCity>, ArrayOptions<PlaceCity>> | Endpoint<"GET", "/places/cities/search", ArrayResult<PlaceCity>, SearchPlacesOptions>;
973
+ type NearbyCitiesOptions = ArrayOptions<PlaceCity> & {
974
+ radius?: number;
975
+ };
976
+ type PlaceEndpoints = Endpoint<"GET", "/places/countries", ArrayResult<PlaceCountry>, ArrayOptions<PlaceCountry>> | Endpoint<"GET", "/places/countries/:countrySlug", PlaceCountry> | Endpoint<"GET", "/places/countries/:countrySlug/cities", ArrayResult<PlaceCity>, ArrayOptions<PlaceCity>> | Endpoint<"GET", "/places/countries/:countrySlug/cities/:citySlug", PlaceCity | ExcludeBase<PlaceCity>> | Endpoint<"GET", "/places/countries/:countrySlug/cities/:citySlug/nearby", ArrayResult<Distance<PlaceCity>>, NearbyCitiesOptions> | Endpoint<"GET", "/places/cities", ArrayResult<PlaceCity>, ArrayOptions<PlaceCity>> | Endpoint<"GET", "/places/cities/search", ArrayResult<PlaceCity>, SearchPlacesOptions>;
1018
977
 
1019
978
  declare const ROADMAP_REACTIONS: readonly ["👍", "❤️", "🎉", "👀", "🚀"];
1020
979
  type RoadmapReaction = (typeof ROADMAP_REACTIONS)[number];
@@ -1110,6 +1069,60 @@ type ArrayResult<T> = {
1110
1069
  limit: number;
1111
1070
  };
1112
1071
 
1072
+ type Endpoint<M extends Options["method"], Path extends string, Res, Body = undefined> = {
1073
+ method: M;
1074
+ path: Path;
1075
+ res: Res;
1076
+ body: Body;
1077
+ };
1078
+ type SSEEndpoints = Extract<Endpoints, {
1079
+ method: "GET";
1080
+ }> extends infer E ? E extends {
1081
+ res: ReadableStream<infer _>;
1082
+ path: infer P;
1083
+ } ? P : never : never;
1084
+ type Endpoints = ApiKeyEndpoints | AuthEndpoints | CareerEndpoints | ChannelEndpoints | ChannelMessageEndpoints | CurrenciesEndpoints | FeedEndpoints | HealthEndpoints | OrderEndpoints | OrganizationEndpoints | PlaceEndpoints | ProfileEndpoints | RoadmapEndpoints | UserEndpoints | WebhookEndpoints | NotificationEndpoints;
1085
+
1086
+ declare enum ApiKeyTier {
1087
+ PUBLIC = "public",
1088
+ INTERNAL = "internal"
1089
+ }
1090
+ declare enum ApiKeyType {
1091
+ User = "user",
1092
+ App = "app"
1093
+ }
1094
+ type ApiKey = Base & {
1095
+ key: string;
1096
+ name: string;
1097
+ type: ApiKeyType;
1098
+ tier: ApiKeyTier;
1099
+ rateLimit: number;
1100
+ allowedOrigins: string[];
1101
+ user: UserProfile;
1102
+ lastUsedAt?: Date;
1103
+ isActive: boolean;
1104
+ };
1105
+ 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>;
1106
+
1107
+ declare class CreateApiKeyDto {
1108
+ name: string;
1109
+ type?: ApiKeyType;
1110
+ tier?: ApiKeyTier;
1111
+ allowedOrigins?: string[];
1112
+ }
1113
+
1114
+ declare class UpdateApiKeyDto {
1115
+ name?: string;
1116
+ isActive?: boolean;
1117
+ type?: ApiKeyType;
1118
+ tier?: ApiKeyTier;
1119
+ allowedOrigins?: string[];
1120
+ }
1121
+
1122
+ declare class AddParticipantDto {
1123
+ username: string;
1124
+ }
1125
+
1113
1126
  declare class CreateChannelDto {
1114
1127
  type: ChannelType;
1115
1128
  participantUsernames: string[];
@@ -1730,6 +1743,7 @@ declare const places: (client: Client) => {
1730
1743
  cities: {
1731
1744
  getAll: (countrySlug: string, options?: ArrayOptions<PlaceCity>) => Promise<ArrayResult<PlaceCity>>;
1732
1745
  get: (countrySlug: string, citySlug: string) => Promise<PlaceCity | ExcludeBase<PlaceCity>>;
1746
+ nearby: (countrySlug: string, citySlug: string, options?: NearbyCitiesOptions) => Promise<ArrayResult<Distance<PlaceCity>>>;
1733
1747
  };
1734
1748
  };
1735
1749
  cities: {
@@ -1995,6 +2009,7 @@ declare class TonightPass {
1995
2009
  cities: {
1996
2010
  getAll: (countrySlug: string, options?: ArrayOptions<PlaceCity>) => Promise<ArrayResult<PlaceCity>>;
1997
2011
  get: (countrySlug: string, citySlug: string) => Promise<PlaceCity | ExcludeBase<PlaceCity>>;
2012
+ nearby: (countrySlug: string, citySlug: string, options?: NearbyCitiesOptions) => Promise<ArrayResult<Distance<PlaceCity>>>;
1998
2013
  };
1999
2014
  };
2000
2015
  cities: {
@@ -2233,4 +2248,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
2233
2248
  client: ChannelWebSocketClient;
2234
2249
  };
2235
2250
 
2236
- 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 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 };
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 };