tonightpass 0.0.240 → 0.0.241

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
@@ -1,5 +1,5 @@
1
1
  import * as pathcat from 'pathcat';
2
- import { ParamValue, Query } from 'pathcat';
2
+ import { Query, ParamValue } from 'pathcat';
3
3
  export * from 'pathcat';
4
4
  import { Options, Response as Response$1 } from 'redaxios';
5
5
  import * as Stripe from 'stripe';
@@ -53,7 +53,13 @@ type Endpoint<M extends Options["method"], Path extends string, Res, Body = unde
53
53
  res: Res;
54
54
  body: Body;
55
55
  };
56
- type Endpoints = ApiKeyEndpoints | AuthEndpoints | CareerEndpoints | ChannelEndpoints | ChannelMessageEndpoints | CurrenciesEndpoints | FeedEndpoints | HealthEndpoints | OrderEndpoints | OrganizationEndpoints | ProfileEndpoints | RoadmapEndpoints | UserEndpoints | WebhookEndpoints | NotificationEndpoints;
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;
57
63
 
58
64
  declare enum ApiKeyTier {
59
65
  PUBLIC = "public",
@@ -744,7 +750,14 @@ declare enum OrganizationEventStyleType {
744
750
  }
745
751
  type OrganizationEventStyleEndpoints = Endpoint<"GET", "/organizations/events/styles", OrganizationEventStyle[]> | Endpoint<"GET", "/organizations/events/styles/:styleSlug", OrganizationEventStyle> | Endpoint<"POST", "/organizations/events/styles", OrganizationEventStyle, CreateOrganizationEventStyleDto> | Endpoint<"PUT", "/organizations/events/styles/:styleSlug", OrganizationEventStyle, UpdateOrganizationEventStyleDto> | Endpoint<"DELETE", "/organizations/events/styles/:styleSlug", OrganizationEventStyle[], null>;
746
752
 
747
- type OrganizationEventViewEndpoints = Endpoint<"POST", "/organizations/@:organizationSlug/events/:eventSlug/views", boolean, null>;
753
+ type OrganizationEventViewOptions = {
754
+ events: string | string[];
755
+ };
756
+ type OrganizationEventViewResult = {
757
+ eventId: string;
758
+ viewsCount: number;
759
+ };
760
+ type OrganizationEventViewEndpoints = Endpoint<"POST", "/organizations/@:organizationSlug/events/:eventSlug/views", boolean, null> | Endpoint<"GET", "/organizations/events/views/stream", ReadableStream<OrganizationEventViewResult>, OrganizationEventViewOptions>;
748
761
 
749
762
  type OrganizationEventTicket = Base & {
750
763
  name: string;
@@ -797,6 +810,7 @@ type OrganizationEvent = Base & {
797
810
  sessionsCount: number;
798
811
  totalViewsCount: number;
799
812
  averageViewsPerSessionCount: number;
813
+ hypeCount: number;
800
814
  startAt: Date;
801
815
  endAt: Date;
802
816
  };
@@ -842,6 +856,8 @@ type OrganizationEventArrayOptions = ArrayOptions<OrganizationEvent> & {
842
856
  status?: OrganizationEventStatus | OrganizationEventStatus[];
843
857
  types?: OrganizationEventType | OrganizationEventType[];
844
858
  styles?: string | string[];
859
+ city?: string;
860
+ country?: string;
845
861
  };
846
862
  type SearchOrganizationEventsOptions = ArrayOptions<OrganizationEvent> & {
847
863
  q: string;
@@ -961,6 +977,27 @@ type OrganizationEndpoints = Endpoint<"GET", "/organizations/search", Organizati
961
977
  limit?: number;
962
978
  }> | Endpoint<"GET", "/organizations", ArrayResult<Organization>, ArrayOptions<Organization>> | Endpoint<"GET", "/organizations/@:organizationSlug", Organization> | Endpoint<"POST", "/organizations", Organization, CreateOrganizationDto> | Endpoint<"PUT", "/organizations/@:organizationSlug", Organization, UpdateOrganizationDto> | Endpoint<"DELETE", "/organizations/@:organizationSlug", Organization, undefined> | Endpoint<"POST", "/organizations/@:organizationSlug/files/:organizationFileType", string, FormData> | Endpoint<"GET", "/organizations/@:organizationSlug/billing/account", OrganizationBillingAccount> | Endpoint<"GET", "/organizations/@:organizationSlug/billing/link", void> | Endpoint<"GET", "/organizations/@:organizationSlug/billing/dashboard", void> | OrganizationEventEndpoints | OrganizationMembersEndpoints | OrganizationAnalyticsEndpoints | OrganizationCustomersEndpoints | OrganizationOrdersEndpoints;
963
979
 
980
+ type Place = Base & {
981
+ geonameId: number;
982
+ name: string;
983
+ asciiName: string;
984
+ country: string;
985
+ countryCode: string;
986
+ region: string;
987
+ department: string;
988
+ latitude: number;
989
+ longitude: number;
990
+ population: number;
991
+ timezone: string;
992
+ isCapital: boolean;
993
+ citySlug: string;
994
+ countrySlug: string;
995
+ };
996
+ type SearchPlacesOptions = ArrayOptions<Place> & {
997
+ q: string;
998
+ };
999
+ type PlaceEndpoints = Endpoint<"GET", "/places", ArrayResult<Place>, ArrayOptions<Place>> | Endpoint<"GET", "/places/:countrySlug", ArrayResult<Place>, ArrayOptions<Place>> | Endpoint<"GET", "/places/:countrySlug/:citySlug", Place | ExcludeBase<Place>> | Endpoint<"GET", "/places/search", ArrayResult<Place>, SearchPlacesOptions>;
1000
+
964
1001
  declare const ROADMAP_REACTIONS: readonly ["👍", "❤️", "🎉", "👀", "🚀"];
965
1002
  type RoadmapReaction = (typeof ROADMAP_REACTIONS)[number];
966
1003
  type RoadmapReactionCounts = {
@@ -1183,7 +1220,7 @@ declare class AtLeastOneMediaConstraint implements ValidatorConstraintInterface
1183
1220
  defaultMessage(): string;
1184
1221
  }
1185
1222
  declare function AtLeastOneMedia(validationOptions?: ValidationOptions): (object: object, propertyName: string) => void;
1186
- type CreateOrganizationEventInput = Omit<ExcludeBase<OrganizationEvent>, "slug" | "styles" | "tickets" | "organization" | "status" | "viewsCount" | "sessionsCount" | "totalViewsCount" | "averageViewsPerSessionCount"> & {
1223
+ type CreateOrganizationEventInput = Omit<ExcludeBase<OrganizationEvent>, "slug" | "styles" | "tickets" | "organization" | "status" | "viewsCount" | "sessionsCount" | "totalViewsCount" | "averageViewsPerSessionCount" | "hypeCount"> & {
1187
1224
  slug?: string;
1188
1225
  styles: string[];
1189
1226
  tickets: CreateOrganizationEventTicketInput[];
@@ -1436,7 +1473,7 @@ declare class Client {
1436
1473
  private apiKey?;
1437
1474
  private accessToken?;
1438
1475
  private cacheManager?;
1439
- readonly url: (path: string, params: Record<string, ParamValue>) => string;
1476
+ readonly url: (path: string, params: Query<string>) => string;
1440
1477
  constructor(options: ClientOptions);
1441
1478
  setOptions(options: ClientOptions): void;
1442
1479
  setAccessToken(accessToken: string | undefined): void;
@@ -1639,6 +1676,7 @@ declare const organizations: (client: Client) => {
1639
1676
  };
1640
1677
  views: {
1641
1678
  record: (organizationSlug: string, eventSlug: string) => Promise<boolean>;
1679
+ getStreamUrl: (options: OrganizationEventViewOptions) => string;
1642
1680
  };
1643
1681
  };
1644
1682
  members: {
@@ -1667,6 +1705,13 @@ declare const organizations: (client: Client) => {
1667
1705
  };
1668
1706
  };
1669
1707
 
1708
+ declare const places: (client: Client) => {
1709
+ getAll: (options?: ArrayOptions<Place>) => Promise<ArrayResult<Place>>;
1710
+ getByCountry: (countrySlug: string, options?: ArrayOptions<Place>) => Promise<ArrayResult<Place>>;
1711
+ get: (countrySlug: string, citySlug: string) => Promise<Place | ExcludeBase<Place>>;
1712
+ search: (query: string, options?: ArrayOptions<Place>) => Promise<ArrayResult<Place>>;
1713
+ };
1714
+
1670
1715
  declare const profiles: (client: Client) => {
1671
1716
  getAll: (options?: ArrayOptions<Profile>) => Promise<ArrayResult<Profile>>;
1672
1717
  search: (query: string, options?: ArrayOptions<Profile>) => Promise<ArrayResult<Profile>>;
@@ -1889,6 +1934,7 @@ declare class TonightPass {
1889
1934
  };
1890
1935
  views: {
1891
1936
  record: (organizationSlug: string, eventSlug: string) => Promise<boolean>;
1937
+ getStreamUrl: (options: OrganizationEventViewOptions) => string;
1892
1938
  };
1893
1939
  };
1894
1940
  members: {
@@ -1916,6 +1962,12 @@ declare class TonightPass {
1916
1962
  getAllByEvent: (organizationSlug: string, eventSlug: string) => Promise<ArrayResult<OrganizationOrder>>;
1917
1963
  };
1918
1964
  };
1965
+ readonly places: {
1966
+ getAll: (options?: ArrayOptions<Place>) => Promise<ArrayResult<Place>>;
1967
+ getByCountry: (countrySlug: string, options?: ArrayOptions<Place>) => Promise<ArrayResult<Place>>;
1968
+ get: (countrySlug: string, citySlug: string) => Promise<Place | ExcludeBase<Place>>;
1969
+ search: (query: string, options?: ArrayOptions<Place>) => Promise<ArrayResult<Place>>;
1970
+ };
1919
1971
  readonly profiles: {
1920
1972
  getAll: (options?: ArrayOptions<Profile>) => Promise<ArrayResult<Profile>>;
1921
1973
  search: (query: string, options?: ArrayOptions<Profile>) => Promise<ArrayResult<Profile>>;
@@ -2147,4 +2199,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
2147
2199
  client: ChannelWebSocketClient;
2148
2200
  };
2149
2201
 
2150
- 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, 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 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 SearchOrganizationEventsOptions, 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, profiles, request, roadmap, sdk, users };
2202
+ 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 Place, 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 };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as pathcat from 'pathcat';
2
- import { ParamValue, Query } from 'pathcat';
2
+ import { Query, ParamValue } from 'pathcat';
3
3
  export * from 'pathcat';
4
4
  import { Options, Response as Response$1 } from 'redaxios';
5
5
  import * as Stripe from 'stripe';
@@ -53,7 +53,13 @@ type Endpoint<M extends Options["method"], Path extends string, Res, Body = unde
53
53
  res: Res;
54
54
  body: Body;
55
55
  };
56
- type Endpoints = ApiKeyEndpoints | AuthEndpoints | CareerEndpoints | ChannelEndpoints | ChannelMessageEndpoints | CurrenciesEndpoints | FeedEndpoints | HealthEndpoints | OrderEndpoints | OrganizationEndpoints | ProfileEndpoints | RoadmapEndpoints | UserEndpoints | WebhookEndpoints | NotificationEndpoints;
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;
57
63
 
58
64
  declare enum ApiKeyTier {
59
65
  PUBLIC = "public",
@@ -744,7 +750,14 @@ declare enum OrganizationEventStyleType {
744
750
  }
745
751
  type OrganizationEventStyleEndpoints = Endpoint<"GET", "/organizations/events/styles", OrganizationEventStyle[]> | Endpoint<"GET", "/organizations/events/styles/:styleSlug", OrganizationEventStyle> | Endpoint<"POST", "/organizations/events/styles", OrganizationEventStyle, CreateOrganizationEventStyleDto> | Endpoint<"PUT", "/organizations/events/styles/:styleSlug", OrganizationEventStyle, UpdateOrganizationEventStyleDto> | Endpoint<"DELETE", "/organizations/events/styles/:styleSlug", OrganizationEventStyle[], null>;
746
752
 
747
- type OrganizationEventViewEndpoints = Endpoint<"POST", "/organizations/@:organizationSlug/events/:eventSlug/views", boolean, null>;
753
+ type OrganizationEventViewOptions = {
754
+ events: string | string[];
755
+ };
756
+ type OrganizationEventViewResult = {
757
+ eventId: string;
758
+ viewsCount: number;
759
+ };
760
+ type OrganizationEventViewEndpoints = Endpoint<"POST", "/organizations/@:organizationSlug/events/:eventSlug/views", boolean, null> | Endpoint<"GET", "/organizations/events/views/stream", ReadableStream<OrganizationEventViewResult>, OrganizationEventViewOptions>;
748
761
 
749
762
  type OrganizationEventTicket = Base & {
750
763
  name: string;
@@ -797,6 +810,7 @@ type OrganizationEvent = Base & {
797
810
  sessionsCount: number;
798
811
  totalViewsCount: number;
799
812
  averageViewsPerSessionCount: number;
813
+ hypeCount: number;
800
814
  startAt: Date;
801
815
  endAt: Date;
802
816
  };
@@ -842,6 +856,8 @@ type OrganizationEventArrayOptions = ArrayOptions<OrganizationEvent> & {
842
856
  status?: OrganizationEventStatus | OrganizationEventStatus[];
843
857
  types?: OrganizationEventType | OrganizationEventType[];
844
858
  styles?: string | string[];
859
+ city?: string;
860
+ country?: string;
845
861
  };
846
862
  type SearchOrganizationEventsOptions = ArrayOptions<OrganizationEvent> & {
847
863
  q: string;
@@ -961,6 +977,27 @@ type OrganizationEndpoints = Endpoint<"GET", "/organizations/search", Organizati
961
977
  limit?: number;
962
978
  }> | Endpoint<"GET", "/organizations", ArrayResult<Organization>, ArrayOptions<Organization>> | Endpoint<"GET", "/organizations/@:organizationSlug", Organization> | Endpoint<"POST", "/organizations", Organization, CreateOrganizationDto> | Endpoint<"PUT", "/organizations/@:organizationSlug", Organization, UpdateOrganizationDto> | Endpoint<"DELETE", "/organizations/@:organizationSlug", Organization, undefined> | Endpoint<"POST", "/organizations/@:organizationSlug/files/:organizationFileType", string, FormData> | Endpoint<"GET", "/organizations/@:organizationSlug/billing/account", OrganizationBillingAccount> | Endpoint<"GET", "/organizations/@:organizationSlug/billing/link", void> | Endpoint<"GET", "/organizations/@:organizationSlug/billing/dashboard", void> | OrganizationEventEndpoints | OrganizationMembersEndpoints | OrganizationAnalyticsEndpoints | OrganizationCustomersEndpoints | OrganizationOrdersEndpoints;
963
979
 
980
+ type Place = Base & {
981
+ geonameId: number;
982
+ name: string;
983
+ asciiName: string;
984
+ country: string;
985
+ countryCode: string;
986
+ region: string;
987
+ department: string;
988
+ latitude: number;
989
+ longitude: number;
990
+ population: number;
991
+ timezone: string;
992
+ isCapital: boolean;
993
+ citySlug: string;
994
+ countrySlug: string;
995
+ };
996
+ type SearchPlacesOptions = ArrayOptions<Place> & {
997
+ q: string;
998
+ };
999
+ type PlaceEndpoints = Endpoint<"GET", "/places", ArrayResult<Place>, ArrayOptions<Place>> | Endpoint<"GET", "/places/:countrySlug", ArrayResult<Place>, ArrayOptions<Place>> | Endpoint<"GET", "/places/:countrySlug/:citySlug", Place | ExcludeBase<Place>> | Endpoint<"GET", "/places/search", ArrayResult<Place>, SearchPlacesOptions>;
1000
+
964
1001
  declare const ROADMAP_REACTIONS: readonly ["👍", "❤️", "🎉", "👀", "🚀"];
965
1002
  type RoadmapReaction = (typeof ROADMAP_REACTIONS)[number];
966
1003
  type RoadmapReactionCounts = {
@@ -1183,7 +1220,7 @@ declare class AtLeastOneMediaConstraint implements ValidatorConstraintInterface
1183
1220
  defaultMessage(): string;
1184
1221
  }
1185
1222
  declare function AtLeastOneMedia(validationOptions?: ValidationOptions): (object: object, propertyName: string) => void;
1186
- type CreateOrganizationEventInput = Omit<ExcludeBase<OrganizationEvent>, "slug" | "styles" | "tickets" | "organization" | "status" | "viewsCount" | "sessionsCount" | "totalViewsCount" | "averageViewsPerSessionCount"> & {
1223
+ type CreateOrganizationEventInput = Omit<ExcludeBase<OrganizationEvent>, "slug" | "styles" | "tickets" | "organization" | "status" | "viewsCount" | "sessionsCount" | "totalViewsCount" | "averageViewsPerSessionCount" | "hypeCount"> & {
1187
1224
  slug?: string;
1188
1225
  styles: string[];
1189
1226
  tickets: CreateOrganizationEventTicketInput[];
@@ -1436,7 +1473,7 @@ declare class Client {
1436
1473
  private apiKey?;
1437
1474
  private accessToken?;
1438
1475
  private cacheManager?;
1439
- readonly url: (path: string, params: Record<string, ParamValue>) => string;
1476
+ readonly url: (path: string, params: Query<string>) => string;
1440
1477
  constructor(options: ClientOptions);
1441
1478
  setOptions(options: ClientOptions): void;
1442
1479
  setAccessToken(accessToken: string | undefined): void;
@@ -1639,6 +1676,7 @@ declare const organizations: (client: Client) => {
1639
1676
  };
1640
1677
  views: {
1641
1678
  record: (organizationSlug: string, eventSlug: string) => Promise<boolean>;
1679
+ getStreamUrl: (options: OrganizationEventViewOptions) => string;
1642
1680
  };
1643
1681
  };
1644
1682
  members: {
@@ -1667,6 +1705,13 @@ declare const organizations: (client: Client) => {
1667
1705
  };
1668
1706
  };
1669
1707
 
1708
+ declare const places: (client: Client) => {
1709
+ getAll: (options?: ArrayOptions<Place>) => Promise<ArrayResult<Place>>;
1710
+ getByCountry: (countrySlug: string, options?: ArrayOptions<Place>) => Promise<ArrayResult<Place>>;
1711
+ get: (countrySlug: string, citySlug: string) => Promise<Place | ExcludeBase<Place>>;
1712
+ search: (query: string, options?: ArrayOptions<Place>) => Promise<ArrayResult<Place>>;
1713
+ };
1714
+
1670
1715
  declare const profiles: (client: Client) => {
1671
1716
  getAll: (options?: ArrayOptions<Profile>) => Promise<ArrayResult<Profile>>;
1672
1717
  search: (query: string, options?: ArrayOptions<Profile>) => Promise<ArrayResult<Profile>>;
@@ -1889,6 +1934,7 @@ declare class TonightPass {
1889
1934
  };
1890
1935
  views: {
1891
1936
  record: (organizationSlug: string, eventSlug: string) => Promise<boolean>;
1937
+ getStreamUrl: (options: OrganizationEventViewOptions) => string;
1892
1938
  };
1893
1939
  };
1894
1940
  members: {
@@ -1916,6 +1962,12 @@ declare class TonightPass {
1916
1962
  getAllByEvent: (organizationSlug: string, eventSlug: string) => Promise<ArrayResult<OrganizationOrder>>;
1917
1963
  };
1918
1964
  };
1965
+ readonly places: {
1966
+ getAll: (options?: ArrayOptions<Place>) => Promise<ArrayResult<Place>>;
1967
+ getByCountry: (countrySlug: string, options?: ArrayOptions<Place>) => Promise<ArrayResult<Place>>;
1968
+ get: (countrySlug: string, citySlug: string) => Promise<Place | ExcludeBase<Place>>;
1969
+ search: (query: string, options?: ArrayOptions<Place>) => Promise<ArrayResult<Place>>;
1970
+ };
1919
1971
  readonly profiles: {
1920
1972
  getAll: (options?: ArrayOptions<Profile>) => Promise<ArrayResult<Profile>>;
1921
1973
  search: (query: string, options?: ArrayOptions<Profile>) => Promise<ArrayResult<Profile>>;
@@ -2147,4 +2199,4 @@ declare function channelsWS(options?: Partial<WebSocketClientOptions>): {
2147
2199
  client: ChannelWebSocketClient;
2148
2200
  };
2149
2201
 
2150
- 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, 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 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 SearchOrganizationEventsOptions, 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, profiles, request, roadmap, sdk, users };
2202
+ 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 Place, 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 };