tonightpass 0.0.85 → 0.0.87
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/.turbo/turbo-build.log +9 -9
- package/CHANGELOG.md +12 -0
- package/dist/index.d.mts +152 -132
- package/dist/index.d.ts +152 -132
- package/dist/index.js +3 -3
- 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/src/rest/client.ts +15 -10
- package/src/rest/types/index.ts +0 -1
- package/src/rest/types/organizations/members/index.ts +1 -1
- package/src/rest/types/users/bookings/index.ts +11 -1
- package/src/rest/types/users/index.ts +1 -0
- package/src/rest/types/{token → users/tokens}/index.ts +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as pathcat from 'pathcat';
|
|
2
2
|
import { ParamValue, Query } from 'pathcat';
|
|
3
3
|
export * from 'pathcat';
|
|
4
|
-
import Stripe from 'stripe';
|
|
4
|
+
import * as Stripe from 'stripe';
|
|
5
|
+
import Stripe__default from 'stripe';
|
|
5
6
|
import { Options, Response as Response$1 } from 'redaxios';
|
|
6
7
|
import { HealthCheckResult, HealthIndicatorResult } from '@nestjs/terminus';
|
|
7
8
|
|
|
@@ -30,17 +31,40 @@ type Endpoint<M extends Options["method"], Path extends string, Res, Body = unde
|
|
|
30
31
|
type Endpoints = AuthEndpoints | CareersEndpoints | HealthEndpoints | OrderEndpoints | OrganizationEndpoints | ProfileEndpoints | UserEndpoints | WebhookEndpoints | NotificationsEndpoints;
|
|
31
32
|
|
|
32
33
|
type Order = Base & {
|
|
33
|
-
invoice:
|
|
34
|
+
invoice: Stripe__default.Invoice;
|
|
34
35
|
user: User;
|
|
35
36
|
};
|
|
36
37
|
type OrderEndpoints = Endpoint<"GET", "/orders", ArrayResult<Order>, ArrayOptions<Order>> | Endpoint<"GET", "/orders/:orderId", Order>;
|
|
37
38
|
|
|
38
|
-
type
|
|
39
|
+
type UserBookingTicket = Base & {
|
|
40
|
+
booking: UserBooking;
|
|
39
41
|
ticket: OrganizationEventTicket;
|
|
42
|
+
token: UserToken;
|
|
43
|
+
useCount: number;
|
|
44
|
+
};
|
|
45
|
+
type UserBooking = Base & {
|
|
46
|
+
tickets: OrganizationEventTicket;
|
|
40
47
|
order: Order;
|
|
48
|
+
user: User;
|
|
41
49
|
};
|
|
42
50
|
type UserBookingEndpoints = Endpoint<"GET", "/users/bookings", ArrayResult<UserBooking>, ArrayOptions<UserBooking>> | Endpoint<"GET", "/users/@me/bookings", ArrayResult<UserBooking>, ArrayOptions<UserBooking>> | Endpoint<"GET", "/users/bookings/:bookingId", UserBooking>;
|
|
43
51
|
|
|
52
|
+
type UserToken = {
|
|
53
|
+
type: UserTokenType;
|
|
54
|
+
value: string;
|
|
55
|
+
createdAt: Date;
|
|
56
|
+
expiresAt: Date;
|
|
57
|
+
user?: User;
|
|
58
|
+
identifier?: string;
|
|
59
|
+
};
|
|
60
|
+
declare enum UserTokenType {
|
|
61
|
+
Authentication = "authentication",
|
|
62
|
+
OrganizationInvite = "organization_invite",
|
|
63
|
+
PasswordRecovery = "password_recovery",
|
|
64
|
+
EmailValidation = "email_validation",
|
|
65
|
+
PhoneValidation = "phone_validation"
|
|
66
|
+
}
|
|
67
|
+
|
|
44
68
|
type User = Base & {
|
|
45
69
|
identifier: UserIdentifier;
|
|
46
70
|
password: string;
|
|
@@ -213,8 +237,8 @@ type OrganizationEventStyleEndpoints = Endpoint<"GET", "/organizations/events/st
|
|
|
213
237
|
type OrganizationEventTicket = Base & {
|
|
214
238
|
name: string;
|
|
215
239
|
description?: string;
|
|
216
|
-
price:
|
|
217
|
-
product:
|
|
240
|
+
price: Stripe__default.Price;
|
|
241
|
+
product: Stripe__default.Product;
|
|
218
242
|
fee: number;
|
|
219
243
|
quantity: number;
|
|
220
244
|
type: OrganizationEventTicketType;
|
|
@@ -296,22 +320,6 @@ declare class UpdateOrganizationMemberDto {
|
|
|
296
320
|
role: OrganizationMemberRole;
|
|
297
321
|
}
|
|
298
322
|
|
|
299
|
-
type UserToken = {
|
|
300
|
-
type: UserTokenType;
|
|
301
|
-
value: string;
|
|
302
|
-
createdAt: Date;
|
|
303
|
-
expiresAt: Date;
|
|
304
|
-
user?: User;
|
|
305
|
-
identifier?: string;
|
|
306
|
-
};
|
|
307
|
-
declare enum UserTokenType {
|
|
308
|
-
Authentication = "authentication",
|
|
309
|
-
OrganizationInvite = "organization_invite",
|
|
310
|
-
PasswordRecovery = "password_recovery",
|
|
311
|
-
EmailValidation = "email_validation",
|
|
312
|
-
PhoneValidation = "phone_validation"
|
|
313
|
-
}
|
|
314
|
-
|
|
315
323
|
type OrganizationMember = Base & {
|
|
316
324
|
organization: Organization;
|
|
317
325
|
role: OrganizationMemberRole;
|
|
@@ -345,7 +353,7 @@ type Organization = Base & {
|
|
|
345
353
|
type OrganizationBilling = {
|
|
346
354
|
account: string;
|
|
347
355
|
};
|
|
348
|
-
type OrganizationBillingAccount =
|
|
356
|
+
type OrganizationBillingAccount = Stripe__default.Account;
|
|
349
357
|
type OrganizationIdentity = OrganizationProfile & {
|
|
350
358
|
socialLinks: OrganizationSocialLink[];
|
|
351
359
|
};
|
|
@@ -405,7 +413,7 @@ type OrganizationProfileMetadata = BaseProfileMetadata & {
|
|
|
405
413
|
type ProfileMetadata = UserProfileMetadata | OrganizationProfileMetadata;
|
|
406
414
|
type ProfileEndpoints = Endpoint<"GET", "/profiles/:username", UserIdentity | OrganizationIdentity> | Endpoint<"POST", "/profiles/:username/relationships/follow", boolean, null> | Endpoint<"POST", "/profiles/:username/relationships/unfollow", boolean, null>;
|
|
407
415
|
|
|
408
|
-
type WebhookEndpoints = Endpoint<"POST", "/webhooks/stripe", boolean,
|
|
416
|
+
type WebhookEndpoints = Endpoint<"POST", "/webhooks/stripe", boolean, Stripe__default.Event>;
|
|
409
417
|
|
|
410
418
|
type NotificationsEndpoints = Endpoint<"POST", "/notifications/subscribe/beta", null, {
|
|
411
419
|
email: string;
|
|
@@ -599,9 +607,6 @@ declare class UpdateUserIdentityDto implements Partial<Pick<UserIdentity, "first
|
|
|
599
607
|
birthDate?: Date;
|
|
600
608
|
}
|
|
601
609
|
|
|
602
|
-
type PathsFor<M extends Options["method"]> = Extract<Endpoints, {
|
|
603
|
-
method: M;
|
|
604
|
-
}>["path"];
|
|
605
610
|
type SuccessfulAPIResponse<T> = {
|
|
606
611
|
success: true;
|
|
607
612
|
data: T;
|
|
@@ -615,6 +620,13 @@ type ErroredAPIResponse = {
|
|
|
615
620
|
};
|
|
616
621
|
type APIResponse<T> = SuccessfulAPIResponse<T> | ErroredAPIResponse;
|
|
617
622
|
type PromisedAPIResponse<T> = Promise<APIResponse<T>>;
|
|
623
|
+
type PathsFor<M extends Options["method"]> = Extract<Endpoints, {
|
|
624
|
+
method: M;
|
|
625
|
+
}>["path"];
|
|
626
|
+
type ResponseFor<M extends Options["method"], P extends PathsFor<M>> = Extract<Endpoints, {
|
|
627
|
+
method: M;
|
|
628
|
+
path: P;
|
|
629
|
+
}>["res"];
|
|
618
630
|
type Response<M extends Options["method"], P extends PathsFor<M>> = APIResponse<Extract<Endpoints, {
|
|
619
631
|
method: M;
|
|
620
632
|
path: P;
|
|
@@ -649,11 +661,11 @@ declare class Client {
|
|
|
649
661
|
readonly url: (path: string, params: Record<string, ParamValue>) => string;
|
|
650
662
|
constructor(options: ClientOptions);
|
|
651
663
|
setOptions(options: ClientOptions): void;
|
|
652
|
-
get<Path extends PathsFor<"GET">>(path: Path, query?: Query<Path>, options?: APIRequestOptions): Promise<
|
|
653
|
-
post<Path extends PathsFor<"POST">>(path: Path, body: Body<"POST", Path>, query?: Query<Path>, options?: APIRequestOptions): Promise<
|
|
654
|
-
put<Path extends PathsFor<"PUT">>(path: Path, body: Body<"PUT", Path>, query?: Query<Path>, options?: APIRequestOptions): Promise<
|
|
655
|
-
patch<Path extends PathsFor<"PATCH">>(path: Path, body: Body<"PATCH", Path>, query?: Query<Path>, options?: APIRequestOptions): Promise<
|
|
656
|
-
delete<Path extends PathsFor<"DELETE">>(path: Path, body: Body<"DELETE", Path>, query?: Query<Path>, options?: APIRequestOptions): Promise<
|
|
664
|
+
get<Path extends PathsFor<"GET">>(path: Path, query?: Query<Path>, options?: APIRequestOptions): Promise<ResponseFor<"GET", Path>>;
|
|
665
|
+
post<Path extends PathsFor<"POST">>(path: Path, body: Body<"POST", Path>, query?: Query<Path>, options?: APIRequestOptions): Promise<ResponseFor<"POST", Path>>;
|
|
666
|
+
put<Path extends PathsFor<"PUT">>(path: Path, body: Body<"PUT", Path>, query?: Query<Path>, options?: APIRequestOptions): Promise<ResponseFor<"PUT", Path>>;
|
|
667
|
+
patch<Path extends PathsFor<"PATCH">>(path: Path, body: Body<"PATCH", Path>, query?: Query<Path>, options?: APIRequestOptions): Promise<never>;
|
|
668
|
+
delete<Path extends PathsFor<"DELETE">>(path: Path, body: Body<"DELETE", Path>, query?: Query<Path>, options?: APIRequestOptions): Promise<ResponseFor<"DELETE", Path>>;
|
|
657
669
|
private requester;
|
|
658
670
|
}
|
|
659
671
|
|
|
@@ -662,10 +674,10 @@ interface APIRequestOptions extends Options {
|
|
|
662
674
|
declare const request: <T>(url: string, options?: Options) => Promise<Response$1<APIResponse<T>>>;
|
|
663
675
|
|
|
664
676
|
declare const auth: (client: Client) => {
|
|
665
|
-
signIn: (data: SignInUserDto) => Promise<
|
|
666
|
-
signUp: (data: CreateUserDto) => Promise<
|
|
667
|
-
signOut: () => Promise<
|
|
668
|
-
refreshToken: () => Promise<
|
|
677
|
+
signIn: (data: SignInUserDto) => Promise<User>;
|
|
678
|
+
signUp: (data: CreateUserDto) => Promise<User>;
|
|
679
|
+
signOut: () => Promise<null>;
|
|
680
|
+
refreshToken: () => Promise<null>;
|
|
669
681
|
oauth2: {
|
|
670
682
|
google: {
|
|
671
683
|
connect: (params?: Record<string, ParamValue>) => void;
|
|
@@ -681,108 +693,112 @@ declare const auth: (client: Client) => {
|
|
|
681
693
|
|
|
682
694
|
declare const careers: (client: Client) => {
|
|
683
695
|
categories: {
|
|
684
|
-
getAll: (query?: Query<"/careers/categories">) => Promise<
|
|
696
|
+
getAll: (query?: Query<"/careers/categories">) => Promise<CareersCategory[]>;
|
|
685
697
|
};
|
|
686
698
|
employmentTypes: {
|
|
687
|
-
getAll: (query?: Query<"/careers/employmentTypes">) => Promise<
|
|
699
|
+
getAll: (query?: Query<"/careers/employmentTypes">) => Promise<CareersEmploymentType[]>;
|
|
688
700
|
};
|
|
689
701
|
jobs: {
|
|
690
|
-
getAll: (query?: Query<"/careers/jobs">) => Promise<
|
|
691
|
-
get: (jobId: number) => Promise<
|
|
702
|
+
getAll: (query?: Query<"/careers/jobs">) => Promise<CareersJob[]>;
|
|
703
|
+
get: (jobId: number) => Promise<CareersJob>;
|
|
692
704
|
};
|
|
693
705
|
offices: {
|
|
694
|
-
getAll: (query?: Query<"/careers/offices">) => Promise<
|
|
706
|
+
getAll: (query?: Query<"/careers/offices">) => Promise<CareersOffice[]>;
|
|
695
707
|
};
|
|
696
708
|
};
|
|
697
709
|
|
|
698
710
|
declare function sdk<T>(builder: (client: Client) => T): (client: Client) => T;
|
|
699
711
|
|
|
700
712
|
declare const health: (client: Client) => {
|
|
701
|
-
getAll: () => Promise<
|
|
702
|
-
database: () => Promise<
|
|
703
|
-
api: () => Promise<
|
|
704
|
-
app: () => Promise<
|
|
713
|
+
getAll: () => Promise<Health<"database" | "app" | "api">>;
|
|
714
|
+
database: () => Promise<Health<"database">>;
|
|
715
|
+
api: () => Promise<Health<"api">>;
|
|
716
|
+
app: () => Promise<Health<"app">>;
|
|
705
717
|
};
|
|
706
718
|
|
|
707
719
|
declare const orders: (client: Client) => {
|
|
708
|
-
getAll: (options?: ArrayOptions<Order>) => Promise<
|
|
709
|
-
get: (orderId: string) => Promise<
|
|
720
|
+
getAll: (options?: ArrayOptions<Order>) => Promise<ArrayResult<Order>>;
|
|
721
|
+
get: (orderId: string) => Promise<Order>;
|
|
710
722
|
};
|
|
711
723
|
|
|
712
724
|
declare const organizations: (client: Client) => {
|
|
713
|
-
getAll: () => Promise<
|
|
714
|
-
get: (organizationSlug: string) => Promise<
|
|
715
|
-
create: (data: CreateOrganizationDto) => Promise<
|
|
716
|
-
update: (organizationSlug: string, data: UpdateOrganizationDto) => Promise<
|
|
717
|
-
delete: (organizationSlug: string) => Promise<
|
|
725
|
+
getAll: () => Promise<ArrayResult<Organization>>;
|
|
726
|
+
get: (organizationSlug: string) => Promise<Organization>;
|
|
727
|
+
create: (data: CreateOrganizationDto) => Promise<Organization>;
|
|
728
|
+
update: (organizationSlug: string, data: UpdateOrganizationDto) => Promise<Organization>;
|
|
729
|
+
delete: (organizationSlug: string) => Promise<Organization>;
|
|
718
730
|
billing: {
|
|
719
|
-
account: (organizationSlug: string) => Promise<
|
|
731
|
+
account: (organizationSlug: string) => Promise<Stripe.Stripe.Account>;
|
|
720
732
|
link: (organizationSlug: string) => void;
|
|
721
733
|
dashboard: (organizationSlug: string) => void;
|
|
722
734
|
};
|
|
723
735
|
events: {
|
|
724
|
-
getAll: (organizationSlug?: string, options?: ArrayOptions<OrganizationEvent>) => Promise<
|
|
725
|
-
getSuggestions: (options?: ArrayOptions<OrganizationEvent>) => Promise<
|
|
736
|
+
getAll: (organizationSlug?: string, options?: ArrayOptions<OrganizationEvent>) => Promise<ArrayResult<OrganizationEvent>>;
|
|
737
|
+
getSuggestions: (options?: ArrayOptions<OrganizationEvent>) => Promise<ArrayResult<OrganizationEvent>>;
|
|
726
738
|
getNearby: (options: ArrayOptions<OrganizationEvent> & {
|
|
727
739
|
latitude: number;
|
|
728
740
|
longitude: number;
|
|
729
741
|
radius?: number;
|
|
730
|
-
}) => Promise<
|
|
731
|
-
get: (organizationSlug: string, eventSlug: string) => Promise<
|
|
732
|
-
create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<
|
|
733
|
-
update: (organizationSlug: string, eventSlug: string, data: UpdateOrganizationEventDto) => Promise<
|
|
734
|
-
delete: (organizationSlug: string, eventSlug: string) => Promise<
|
|
742
|
+
}) => Promise<ArrayResult<OrganizationEvent>>;
|
|
743
|
+
get: (organizationSlug: string, eventSlug: string) => Promise<OrganizationEvent>;
|
|
744
|
+
create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
745
|
+
update: (organizationSlug: string, eventSlug: string, data: UpdateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
746
|
+
delete: (organizationSlug: string, eventSlug: string) => Promise<OrganizationEvent>;
|
|
735
747
|
orders: {
|
|
736
|
-
create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventOrderDto) => Promise<
|
|
748
|
+
create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventOrderDto) => Promise<Order>;
|
|
737
749
|
};
|
|
738
750
|
styles: {
|
|
739
|
-
getAll: () => Promise<
|
|
740
|
-
get: (styleSlug: string) => Promise<
|
|
741
|
-
create: (data: CreateOrganizationEventStyleDto) => Promise<
|
|
742
|
-
update: (styleSlug: string, data: UpdateOrganizationEventStyleDto) => Promise<
|
|
743
|
-
delete: (styleSlug: string) => Promise<
|
|
751
|
+
getAll: () => Promise<OrganizationEventStyle[]>;
|
|
752
|
+
get: (styleSlug: string) => Promise<OrganizationEventStyle>;
|
|
753
|
+
create: (data: CreateOrganizationEventStyleDto) => Promise<OrganizationEventStyle>;
|
|
754
|
+
update: (styleSlug: string, data: UpdateOrganizationEventStyleDto) => Promise<OrganizationEventStyle>;
|
|
755
|
+
delete: (styleSlug: string) => Promise<OrganizationEventStyle[]>;
|
|
744
756
|
};
|
|
745
757
|
tickets: {
|
|
746
|
-
getAll: (organizationSlug: string, eventSlug: string) => Promise<
|
|
747
|
-
get: (organizationSlug: string, eventSlug: string, ticketId: string) => Promise<
|
|
748
|
-
create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventTicketDto) => Promise<
|
|
749
|
-
update: (organizationSlug: string, eventSlug: string, ticketId: string, data: UpdateOrganizationEventTicketDto) => Promise<
|
|
750
|
-
delete: (organizationSlug: string, eventSlug: string, ticketId: string) => Promise<
|
|
758
|
+
getAll: (organizationSlug: string, eventSlug: string) => Promise<OrganizationEventTicket[]>;
|
|
759
|
+
get: (organizationSlug: string, eventSlug: string, ticketId: string) => Promise<OrganizationEventTicket>;
|
|
760
|
+
create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventTicketDto) => Promise<OrganizationEventTicket>;
|
|
761
|
+
update: (organizationSlug: string, eventSlug: string, ticketId: string, data: UpdateOrganizationEventTicketDto) => Promise<OrganizationEventTicket>;
|
|
762
|
+
delete: (organizationSlug: string, eventSlug: string, ticketId: string) => Promise<OrganizationEventTicket[]>;
|
|
751
763
|
};
|
|
752
764
|
};
|
|
753
765
|
members: {
|
|
754
|
-
getAll: () => Promise<
|
|
755
|
-
delete: (memberId: string) => Promise<
|
|
766
|
+
getAll: () => Promise<ArrayResult<OrganizationMember>>;
|
|
767
|
+
delete: (memberId: string) => Promise<OrganizationMember[]>;
|
|
756
768
|
};
|
|
757
769
|
};
|
|
758
770
|
|
|
759
771
|
declare const profiles: (client: Client) => {
|
|
760
|
-
get: (username: string) => Promise<
|
|
772
|
+
get: (username: string) => Promise<UserIdentity | OrganizationIdentity>;
|
|
761
773
|
relationships: {
|
|
762
|
-
follow: (username: string) => Promise<
|
|
763
|
-
unfollow: (username: string) => Promise<
|
|
774
|
+
follow: (username: string) => Promise<boolean>;
|
|
775
|
+
unfollow: (username: string) => Promise<boolean>;
|
|
764
776
|
};
|
|
765
777
|
};
|
|
766
778
|
|
|
767
779
|
declare const users: (client: Client) => {
|
|
768
|
-
getAll: () => Promise<
|
|
769
|
-
get: (userId: string) => Promise<
|
|
770
|
-
me: () => Promise<
|
|
771
|
-
check: (identifier: string, suggestions?: boolean) => Promise<
|
|
772
|
-
|
|
780
|
+
getAll: () => Promise<User[]>;
|
|
781
|
+
get: (userId: string) => Promise<User>;
|
|
782
|
+
me: () => Promise<User>;
|
|
783
|
+
check: (identifier: string, suggestions?: boolean) => Promise<{
|
|
784
|
+
exists: boolean;
|
|
785
|
+
identifier: Partial<UserIdentifier>;
|
|
786
|
+
suggestions?: string[];
|
|
787
|
+
}>;
|
|
788
|
+
update: (userId: string, data: UpdateUserDto) => Promise<User>;
|
|
773
789
|
};
|
|
774
790
|
|
|
775
791
|
declare const notifications: (client: Client) => {
|
|
776
|
-
registerToBeta: (email: string) => Promise<
|
|
792
|
+
registerToBeta: (email: string) => Promise<null>;
|
|
777
793
|
};
|
|
778
794
|
|
|
779
795
|
declare class TonightPass {
|
|
780
796
|
readonly client: Client;
|
|
781
797
|
readonly auth: {
|
|
782
|
-
signIn: (data: SignInUserDto) => Promise<
|
|
783
|
-
signUp: (data: CreateUserDto) => Promise<
|
|
784
|
-
signOut: () => Promise<
|
|
785
|
-
refreshToken: () => Promise<
|
|
798
|
+
signIn: (data: SignInUserDto) => Promise<User>;
|
|
799
|
+
signUp: (data: CreateUserDto) => Promise<User>;
|
|
800
|
+
signOut: () => Promise<null>;
|
|
801
|
+
refreshToken: () => Promise<null>;
|
|
786
802
|
oauth2: {
|
|
787
803
|
google: {
|
|
788
804
|
connect: (params?: Record<string, pathcat.ParamValue>) => void;
|
|
@@ -797,95 +813,99 @@ declare class TonightPass {
|
|
|
797
813
|
};
|
|
798
814
|
readonly careers: {
|
|
799
815
|
categories: {
|
|
800
|
-
getAll: (query?: pathcat.Query<"/careers/categories">) => Promise<
|
|
816
|
+
getAll: (query?: pathcat.Query<"/careers/categories">) => Promise<CareersCategory[]>;
|
|
801
817
|
};
|
|
802
818
|
employmentTypes: {
|
|
803
|
-
getAll: (query?: pathcat.Query<"/careers/employmentTypes">) => Promise<
|
|
819
|
+
getAll: (query?: pathcat.Query<"/careers/employmentTypes">) => Promise<CareersEmploymentType[]>;
|
|
804
820
|
};
|
|
805
821
|
jobs: {
|
|
806
|
-
getAll: (query?: pathcat.Query<"/careers/jobs">) => Promise<
|
|
807
|
-
get: (jobId: number) => Promise<
|
|
822
|
+
getAll: (query?: pathcat.Query<"/careers/jobs">) => Promise<CareersJob[]>;
|
|
823
|
+
get: (jobId: number) => Promise<CareersJob>;
|
|
808
824
|
};
|
|
809
825
|
offices: {
|
|
810
|
-
getAll: (query?: pathcat.Query<"/careers/offices">) => Promise<
|
|
826
|
+
getAll: (query?: pathcat.Query<"/careers/offices">) => Promise<CareersOffice[]>;
|
|
811
827
|
};
|
|
812
828
|
};
|
|
813
829
|
readonly health: {
|
|
814
|
-
getAll: () => Promise<
|
|
815
|
-
database: () => Promise<
|
|
816
|
-
api: () => Promise<
|
|
817
|
-
app: () => Promise<
|
|
830
|
+
getAll: () => Promise<Health<"database" | "app" | "api">>;
|
|
831
|
+
database: () => Promise<Health<"database">>;
|
|
832
|
+
api: () => Promise<Health<"api">>;
|
|
833
|
+
app: () => Promise<Health<"app">>;
|
|
818
834
|
};
|
|
819
835
|
readonly orders: {
|
|
820
|
-
getAll: (options?: ArrayOptions<Order>) => Promise<
|
|
821
|
-
get: (orderId: string) => Promise<
|
|
836
|
+
getAll: (options?: ArrayOptions<Order>) => Promise<ArrayResult<Order>>;
|
|
837
|
+
get: (orderId: string) => Promise<Order>;
|
|
822
838
|
};
|
|
823
839
|
readonly organizations: {
|
|
824
|
-
getAll: () => Promise<
|
|
825
|
-
get: (organizationSlug: string) => Promise<
|
|
826
|
-
create: (data: CreateOrganizationDto) => Promise<
|
|
827
|
-
update: (organizationSlug: string, data: UpdateOrganizationDto) => Promise<
|
|
828
|
-
delete: (organizationSlug: string) => Promise<
|
|
840
|
+
getAll: () => Promise<ArrayResult<Organization>>;
|
|
841
|
+
get: (organizationSlug: string) => Promise<Organization>;
|
|
842
|
+
create: (data: CreateOrganizationDto) => Promise<Organization>;
|
|
843
|
+
update: (organizationSlug: string, data: UpdateOrganizationDto) => Promise<Organization>;
|
|
844
|
+
delete: (organizationSlug: string) => Promise<Organization>;
|
|
829
845
|
billing: {
|
|
830
|
-
account: (organizationSlug: string) => Promise<
|
|
846
|
+
account: (organizationSlug: string) => Promise<Stripe.Stripe.Account>;
|
|
831
847
|
link: (organizationSlug: string) => void;
|
|
832
848
|
dashboard: (organizationSlug: string) => void;
|
|
833
849
|
};
|
|
834
850
|
events: {
|
|
835
|
-
getAll: (organizationSlug?: string, options?: ArrayOptions<OrganizationEvent>) => Promise<
|
|
836
|
-
getSuggestions: (options?: ArrayOptions<OrganizationEvent>) => Promise<
|
|
851
|
+
getAll: (organizationSlug?: string, options?: ArrayOptions<OrganizationEvent>) => Promise<ArrayResult<OrganizationEvent>>;
|
|
852
|
+
getSuggestions: (options?: ArrayOptions<OrganizationEvent>) => Promise<ArrayResult<OrganizationEvent>>;
|
|
837
853
|
getNearby: (options: ArrayOptions<OrganizationEvent> & {
|
|
838
854
|
latitude: number;
|
|
839
855
|
longitude: number;
|
|
840
856
|
radius?: number;
|
|
841
|
-
}) => Promise<
|
|
842
|
-
get: (organizationSlug: string, eventSlug: string) => Promise<
|
|
843
|
-
create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<
|
|
844
|
-
update: (organizationSlug: string, eventSlug: string, data: UpdateOrganizationEventDto) => Promise<
|
|
845
|
-
delete: (organizationSlug: string, eventSlug: string) => Promise<
|
|
857
|
+
}) => Promise<ArrayResult<OrganizationEvent>>;
|
|
858
|
+
get: (organizationSlug: string, eventSlug: string) => Promise<OrganizationEvent>;
|
|
859
|
+
create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
860
|
+
update: (organizationSlug: string, eventSlug: string, data: UpdateOrganizationEventDto) => Promise<OrganizationEvent>;
|
|
861
|
+
delete: (organizationSlug: string, eventSlug: string) => Promise<OrganizationEvent>;
|
|
846
862
|
orders: {
|
|
847
|
-
create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventOrderDto) => Promise<
|
|
863
|
+
create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventOrderDto) => Promise<Order>;
|
|
848
864
|
};
|
|
849
865
|
styles: {
|
|
850
|
-
getAll: () => Promise<
|
|
851
|
-
get: (styleSlug: string) => Promise<
|
|
852
|
-
create: (data: CreateOrganizationEventStyleDto) => Promise<
|
|
853
|
-
update: (styleSlug: string, data: UpdateOrganizationEventStyleDto) => Promise<
|
|
854
|
-
delete: (styleSlug: string) => Promise<
|
|
866
|
+
getAll: () => Promise<OrganizationEventStyle[]>;
|
|
867
|
+
get: (styleSlug: string) => Promise<OrganizationEventStyle>;
|
|
868
|
+
create: (data: CreateOrganizationEventStyleDto) => Promise<OrganizationEventStyle>;
|
|
869
|
+
update: (styleSlug: string, data: UpdateOrganizationEventStyleDto) => Promise<OrganizationEventStyle>;
|
|
870
|
+
delete: (styleSlug: string) => Promise<OrganizationEventStyle[]>;
|
|
855
871
|
};
|
|
856
872
|
tickets: {
|
|
857
|
-
getAll: (organizationSlug: string, eventSlug: string) => Promise<
|
|
858
|
-
get: (organizationSlug: string, eventSlug: string, ticketId: string) => Promise<
|
|
859
|
-
create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventTicketDto) => Promise<
|
|
860
|
-
update: (organizationSlug: string, eventSlug: string, ticketId: string, data: UpdateOrganizationEventTicketDto) => Promise<
|
|
861
|
-
delete: (organizationSlug: string, eventSlug: string, ticketId: string) => Promise<
|
|
873
|
+
getAll: (organizationSlug: string, eventSlug: string) => Promise<OrganizationEventTicket[]>;
|
|
874
|
+
get: (organizationSlug: string, eventSlug: string, ticketId: string) => Promise<OrganizationEventTicket>;
|
|
875
|
+
create: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventTicketDto) => Promise<OrganizationEventTicket>;
|
|
876
|
+
update: (organizationSlug: string, eventSlug: string, ticketId: string, data: UpdateOrganizationEventTicketDto) => Promise<OrganizationEventTicket>;
|
|
877
|
+
delete: (organizationSlug: string, eventSlug: string, ticketId: string) => Promise<OrganizationEventTicket[]>;
|
|
862
878
|
};
|
|
863
879
|
};
|
|
864
880
|
members: {
|
|
865
|
-
getAll: () => Promise<
|
|
866
|
-
delete: (memberId: string) => Promise<
|
|
881
|
+
getAll: () => Promise<ArrayResult<OrganizationMember>>;
|
|
882
|
+
delete: (memberId: string) => Promise<OrganizationMember[]>;
|
|
867
883
|
};
|
|
868
884
|
};
|
|
869
885
|
readonly profiles: {
|
|
870
|
-
get: (username: string) => Promise<
|
|
886
|
+
get: (username: string) => Promise<UserIdentity | OrganizationIdentity>;
|
|
871
887
|
relationships: {
|
|
872
|
-
follow: (username: string) => Promise<
|
|
873
|
-
unfollow: (username: string) => Promise<
|
|
888
|
+
follow: (username: string) => Promise<boolean>;
|
|
889
|
+
unfollow: (username: string) => Promise<boolean>;
|
|
874
890
|
};
|
|
875
891
|
};
|
|
876
892
|
readonly users: {
|
|
877
|
-
getAll: () => Promise<
|
|
878
|
-
get: (userId: string) => Promise<
|
|
879
|
-
me: () => Promise<
|
|
880
|
-
check: (identifier: string, suggestions?: boolean) => Promise<
|
|
881
|
-
|
|
893
|
+
getAll: () => Promise<User[]>;
|
|
894
|
+
get: (userId: string) => Promise<User>;
|
|
895
|
+
me: () => Promise<User>;
|
|
896
|
+
check: (identifier: string, suggestions?: boolean) => Promise<{
|
|
897
|
+
exists: boolean;
|
|
898
|
+
identifier: Partial<UserIdentifier>;
|
|
899
|
+
suggestions?: string[];
|
|
900
|
+
}>;
|
|
901
|
+
update: (userId: string, data: UpdateUserDto) => Promise<User>;
|
|
882
902
|
};
|
|
883
903
|
readonly notifications: {
|
|
884
|
-
registerToBeta: (email: string) => Promise<
|
|
904
|
+
registerToBeta: (email: string) => Promise<null>;
|
|
885
905
|
};
|
|
886
906
|
constructor(options: ClientOptions);
|
|
887
907
|
}
|
|
888
908
|
|
|
889
909
|
declare const isBrowser: boolean;
|
|
890
910
|
|
|
891
|
-
export { type APIRequestOptions, type APIResponse, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, type AuthEndpoints, type Base, type BaseProfile, type BaseProfileMetadata, type Body, type CareersCategory, type CareersEmploymentType, type CareersEndpoints, type CareersJob, type CareersOffice, Client, type ClientOptions, CreateOrganizationDto, CreateOrganizationEventDto, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateUserDto, CreateUserIdentityDto, Currency, DEFAULT_API_URL, type Endpoint, type Endpoints, type ErroredAPIResponse, type ExcludeBase, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationsEndpoints, type Order, type OrderEndpoints, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventOrderEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationSocialLink, OrganizationSocialType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, type Response, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type User, type UserBooking, type UserBookingEndpoints, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, type WebhookEndpoints, auth, careers, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
|
|
911
|
+
export { type APIRequestOptions, type APIResponse, type ArrayFilterOptions, type ArrayOptions, type ArrayPaginationOptions, type ArrayResult, type ArraySortOptions, type AuthEndpoints, type Base, type BaseProfile, type BaseProfileMetadata, type Body, type CareersCategory, type CareersEmploymentType, type CareersEndpoints, type CareersJob, type CareersOffice, Client, type ClientOptions, CreateOrganizationDto, CreateOrganizationEventDto, CreateOrganizationEventOrderDto, CreateOrganizationEventStyleDto, CreateOrganizationEventTicketDto, CreateOrganizationIdentityDto, CreateOrganizationMemberDto, CreateUserDto, CreateUserIdentityDto, Currency, DEFAULT_API_URL, type Endpoint, type Endpoints, type ErroredAPIResponse, type ExcludeBase, type Health, type HealthEndpoints, Language, type Location$1 as Location, type NotificationsEndpoints, type Order, type OrderEndpoints, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventOrderEndpoints, type OrganizationEventStyle, type OrganizationEventStyleEndpoints, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, OrganizationEventTicketType, OrganizationEventType, OrganizationEventVisibilityType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationProfile, type OrganizationProfileMetadata, type OrganizationSocialLink, OrganizationSocialType, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, ProfileType, type PromisedAPIResponse, type PromisedResponse, type QueryParams, REGEX, type Response, type ResponseFor, SignInUserDto, type StringifiedQuery, type StringifiedQueryValue, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventStyleDto, UpdateOrganizationEventTicketDto, UpdateOrganizationIdentityDto, UpdateOrganizationMemberDto, UpdateUserDto, type User, type UserBooking, type UserBookingEndpoints, type UserBookingTicket, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, type UserIdentifier, type UserIdentity, UserIdentityGender, type UserPreferences, type UserProfile, type UserProfileMetadata, UserRole, type UserToken, UserTokenType, type WebhookEndpoints, auth, careers, health, isBrowser, notifications, orders, organizations, profiles, request, sdk, users };
|