tonightpass 0.0.24 → 0.0.26

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > tonightpass@0.0.24 build /home/runner/work/tonightpass/tonightpass/packages/node
2
+ > tonightpass@0.0.26 build /home/runner/work/tonightpass/tonightpass/packages/node
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -9,13 +9,13 @@
9
9
  CLI Target: esnext
10
10
  CJS Build start
11
11
  ESM Build start
12
- ESM dist/index.mjs 11.19 KB
13
- ESM dist/index.mjs.map 34.56 KB
14
- ESM ⚡️ Build success in 422ms
15
- CJS dist/index.js 12.94 KB
16
- CJS dist/index.js.map 34.56 KB
17
- CJS ⚡️ Build success in 422ms
12
+ ESM dist/index.mjs 12.87 KB
13
+ ESM dist/index.mjs.map 42.87 KB
14
+ ESM ⚡️ Build success in 317ms
15
+ CJS dist/index.js 14.72 KB
16
+ CJS dist/index.js.map 42.87 KB
17
+ CJS ⚡️ Build success in 318ms
18
18
  DTS Build start
19
- DTS ⚡️ Build success in 4041ms
20
- DTS dist/index.d.ts 26.77 KB
21
- DTS dist/index.d.mts 26.77 KB
19
+ DTS ⚡️ Build success in 3680ms
20
+ DTS dist/index.d.ts 33.16 KB
21
+ DTS dist/index.d.mts 33.16 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # tonightpass
2
2
 
3
+ ## 0.0.26
4
+
5
+ ### Patch Changes
6
+
7
+ - [#272](https://github.com/tonightpass/tonightpass/pull/272) [`b18f698`](https://github.com/tonightpass/tonightpass/commit/b18f698d929e0f37e662b8db6df0e49155339f65) Thanks [@AntoineKM](https://github.com/AntoineKM)! - Add organization events endpoints, dtos and sdk
8
+
9
+ ## 0.0.25
10
+
11
+ ### Patch Changes
12
+
13
+ - [`3e3e46a`](https://github.com/tonightpass/tonightpass/commit/3e3e46aca54e867b6b88d7a57c2515fd3c0bf6f5) Thanks [@jerembdn](https://github.com/jerembdn)! - Add PromisedAPIResponse
14
+
3
15
  ## 0.0.24
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -27,6 +27,7 @@ type ErroredAPIResponse = {
27
27
  };
28
28
  };
29
29
  type APIResponse<T> = SuccessfulAPIResponse<T> | ErroredAPIResponse;
30
+ type PromisedAPIResponse<T> = Promise<APIResponse<T>>;
30
31
  type Endpoint<M extends Options["method"], Path extends string, Res, Body = undefined> = {
31
32
  method: M;
32
33
  path: Path;
@@ -41,7 +42,7 @@ type User = {
41
42
  password: string;
42
43
  identity: UserIdentity;
43
44
  role: UserRole;
44
- addresses: Location[];
45
+ addresses: Location$1[];
45
46
  preferences: UserPreferences;
46
47
  connections: UserConnection[];
47
48
  verified: boolean;
@@ -177,15 +178,28 @@ type CareersEndpoints = Endpoint<"GET", "/careers/categories", CareersCategory[]
177
178
  cityNameLike?: string;
178
179
  }>;
179
180
 
180
- type EventTicket = {
181
+ type Health<Key extends string> = {
182
+ status: string;
183
+ details: {
184
+ [key in Key]: {
185
+ status: string;
186
+ details: {
187
+ status: string;
188
+ };
189
+ };
190
+ };
191
+ };
192
+ type HealthEndpoints = Endpoint<"GET", "/health", [Health<"app">, Health<"database">]> | Endpoint<"GET", "/health/database", Health<"database">> | Endpoint<"GET", "/health/http", Health<"app">>;
193
+
194
+ type OrganizationEventTicket = {
181
195
  id: string;
182
196
  name: string;
183
197
  description?: string;
184
198
  price: number;
185
199
  displayPrice: number;
186
200
  quantity: number;
187
- type: EventTicketType;
188
- category: EventTicketCategory;
201
+ type: OrganizationEventTicketType;
202
+ category: OrganizationEventTicketCategory;
189
203
  currency: Currency;
190
204
  vatRate: number;
191
205
  externalId?: string;
@@ -196,8 +210,8 @@ type EventTicket = {
196
210
  updatedAt: Date;
197
211
  createdAt: Date;
198
212
  };
199
- type EventTicketType = "e-ticket" | "other";
200
- declare enum EventTicketCategory {
213
+ type OrganizationEventTicketType = "e-ticket" | "other";
214
+ declare enum OrganizationEventTicketCategory {
201
215
  Entry = "entry",
202
216
  Package = "package",
203
217
  Meal = "meal",
@@ -209,88 +223,26 @@ declare enum EventTicketCategory {
209
223
  Shuttle = "shuttle",
210
224
  Other = "other"
211
225
  }
226
+ type OrganizationEventTicketEndpoints = Endpoint<"GET", "/organizations/:slug/events/:eventSlug/tickets", OrganizationEventTicket[]> | Endpoint<"GET", "/organizations/:slug/events/:eventSlug/tickets/:ticketId", OrganizationEventTicket> | Endpoint<"POST", "/organizations/:slug/events/:eventSlug/tickets", OrganizationEventTicket, CreateOrganizationEventTicketDto> | Endpoint<"PUT", "/organizations/:slug/events/:eventSlug/tickets/:ticketId", OrganizationEventTicket, UpdateOrganizationEventTicketDto> | Endpoint<"DELETE", "/organizations/:slug/events/:eventSlug/tickets/:ticketId", OrganizationEventTicket[], null>;
212
227
 
213
- declare class UpdateOrganizationMemberDto {
214
- role: OrganizationMemberRole;
215
- }
216
-
217
- type Organization = {
218
- id: string;
219
- slug: string;
220
- identity: OrganizationIdentity;
221
- members: OrganizationMember[];
222
- location?: Location;
223
- events: Event[];
224
- savedTickets: EventTicket[];
225
- verified: boolean;
226
- billing: OrganizationBilling;
227
- updatedAt: Date;
228
- createdAt: Date;
229
- };
230
- type OrganizationBilling = {
231
- account: string;
232
- };
233
- type OrganizationBillingAccount = stripe__default.Account;
234
- type OrganizationIdentity = Profile & {
235
- socialLinks: OrganizationSocialLink[];
236
- metadata: ProfileMetadata & {
237
- eventsCount: number;
238
- viewsCount: number;
239
- membersCount: number;
240
- };
241
- };
242
- type OrganizationSocialLink = {
243
- type: OrganizationSocialType;
244
- url: string;
245
- };
246
- declare enum OrganizationSocialType {
247
- Facebook = "facebook",
248
- Twitter = "twitter",
249
- Instagram = "instagram",
250
- Linkedin = "linkedin",
251
- Youtube = "youtube",
252
- Website = "website"
253
- }
254
- type OrganizationMember = {
255
- organization: Organization;
256
- role: OrganizationMemberRole;
257
- status: OrganizationMemberStatus;
258
- updatedAt: Date;
259
- createdAt: Date;
260
- user?: User;
261
- token?: UserToken;
262
- };
263
- declare enum OrganizationMemberStatus {
264
- Pending = "pending",
265
- Accepted = "accepted",
266
- Rejected = "rejected"
267
- }
268
- declare enum OrganizationMemberRole {
269
- Member = "member",
270
- Manager = "manager",
271
- Admin = "admin",
272
- Owner = "owner"
273
- }
274
- type OrganizationEndpoints = Endpoint<"GET", "/organizations", Organization[]> | Endpoint<"GET", "/organizations/:slug", Organization> | Endpoint<"POST", "/organizations", Organization, CreateOrganizationDto> | Endpoint<"PUT", "/organizations/:slug", Organization, UpdateOrganizationDto> | Endpoint<"DELETE", "/organizations/:slug", boolean, null> | Endpoint<"GET", "/organizations/members", OrganizationMember[]> | Endpoint<"DELETE", "/organizations/members/:id", OrganizationMember[], null> | Endpoint<"GET", "/organizations/:slug/members", OrganizationMember[]> | Endpoint<"POST", "/organizations/:slug/members", OrganizationMember, OrganizationMemberDto> | Endpoint<"PUT", "/organizations/:organizationSlug/members/:userId", OrganizationMember, UpdateOrganizationMemberDto> | Endpoint<"DELETE", "/organizations/:organizationSlug/members/:userId", OrganizationMember[], null> | Endpoint<"GET", "/organizations/:slug/billing/account", OrganizationBillingAccount> | Endpoint<"GET", "/organizations/:slug/billing/link", void> | Endpoint<"GET", "/organizations/:slug/billing/dashboard", void>;
275
-
276
- type Event = {
228
+ type OrganizationEvent = {
277
229
  title: string;
278
230
  description: string;
279
231
  slug: string;
280
232
  organization: Organization;
281
- type: EventType;
233
+ type: OrganizationEventType;
282
234
  public: boolean;
283
235
  flyers: string[];
284
236
  trailers: string[];
285
- location: Location;
286
- tickets: EventTicket[];
287
- styles: EventStyle[];
237
+ location: Location$1;
238
+ tickets: OrganizationEventTicket[];
239
+ styles: OrganizationEventStyle[];
288
240
  startAt: Date;
289
241
  endAt: Date;
290
242
  updatedAt: Date;
291
243
  createdAt: Date;
292
244
  };
293
- declare enum EventType {
245
+ declare enum OrganizationEventType {
294
246
  Clubbing = "clubbing",
295
247
  Concert = "concert",
296
248
  Afterwork = "afterwork",
@@ -312,31 +264,23 @@ declare enum EventType {
312
264
  ConsumerShow = "consumer_show",
313
265
  Membership = "membership"
314
266
  }
315
- type EventStyle = {
316
- type: EventStyleType;
267
+ type OrganizationEventStyle = {
268
+ type: OrganizationEventStyleType;
317
269
  emoji: string;
318
270
  name: string;
319
271
  };
320
- declare enum EventStyleType {
272
+ declare enum OrganizationEventStyleType {
321
273
  Music = "music",
322
274
  Dress = "dress",
323
275
  Sport = "sport",
324
276
  Food = "food",
325
277
  Art = "art"
326
278
  }
279
+ type OrganizationEventEndpoints = Endpoint<"GET", "/organizations/:organizationSlug/events", Event[]> | Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug", Event> | Endpoint<"POST", "/organizations/:organizationSlug/events", Event, CreateOrganizationEventDto> | Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug", Event, UpdateOrganizationEventDto> | Endpoint<"DELETE", "/organizations/:organizationSlug/events/:eventSlug", Event, null> | OrganizationEventTicketEndpoints;
327
280
 
328
- type Health<Key extends string> = {
329
- status: string;
330
- details: {
331
- [key in Key]: {
332
- status: string;
333
- details: {
334
- status: string;
335
- };
336
- };
337
- };
338
- };
339
- type HealthEndpoints = Endpoint<"GET", "/health", [Health<"app">, Health<"database">]> | Endpoint<"GET", "/health/database", Health<"database">> | Endpoint<"GET", "/health/http", Health<"app">>;
281
+ declare class UpdateOrganizationMemberDto {
282
+ role: OrganizationMemberRole;
283
+ }
340
284
 
341
285
  type UserToken = {
342
286
  id: string;
@@ -355,6 +299,67 @@ declare enum UserTokenType {
355
299
  PhoneValidation = "phone_validation"
356
300
  }
357
301
 
302
+ type OrganizationMember = {
303
+ organization: Organization;
304
+ role: OrganizationMemberRole;
305
+ status: OrganizationMemberStatus;
306
+ updatedAt: Date;
307
+ createdAt: Date;
308
+ user?: User;
309
+ token?: UserToken;
310
+ };
311
+ declare enum OrganizationMemberStatus {
312
+ Pending = "pending",
313
+ Accepted = "accepted",
314
+ Rejected = "rejected"
315
+ }
316
+ declare enum OrganizationMemberRole {
317
+ Member = "member",
318
+ Manager = "manager",
319
+ Admin = "admin",
320
+ Owner = "owner"
321
+ }
322
+ type OrganizationMembersEndpoints = Endpoint<"GET", "/organizations/members", OrganizationMember[]> | Endpoint<"DELETE", "/organizations/members/:id", OrganizationMember[], null> | Endpoint<"GET", "/organizations/:slug/members", OrganizationMember[]> | Endpoint<"POST", "/organizations/:slug/members", OrganizationMember, OrganizationMemberDto> | Endpoint<"PUT", "/organizations/:organizationSlug/members/:userId", OrganizationMember, UpdateOrganizationMemberDto> | Endpoint<"DELETE", "/organizations/:organizationSlug/members/:userId", OrganizationMember[], null>;
323
+
324
+ type Organization = {
325
+ id: string;
326
+ slug: string;
327
+ identity: OrganizationIdentity;
328
+ members: OrganizationMember[];
329
+ location?: Location$1;
330
+ events: OrganizationEvent[];
331
+ savedTickets: OrganizationEventTicket[];
332
+ verified: boolean;
333
+ billing: OrganizationBilling;
334
+ updatedAt: Date;
335
+ createdAt: Date;
336
+ };
337
+ type OrganizationBilling = {
338
+ account: string;
339
+ };
340
+ type OrganizationBillingAccount = stripe__default.Account;
341
+ type OrganizationIdentity = Profile & {
342
+ socialLinks: OrganizationSocialLink[];
343
+ metadata: ProfileMetadata & {
344
+ eventsCount: number;
345
+ viewsCount: number;
346
+ membersCount: number;
347
+ };
348
+ };
349
+ type OrganizationSocialLink = {
350
+ type: OrganizationSocialType;
351
+ url: string;
352
+ };
353
+ declare enum OrganizationSocialType {
354
+ Facebook = "facebook",
355
+ Twitter = "twitter",
356
+ Instagram = "instagram",
357
+ Linkedin = "linkedin",
358
+ Youtube = "youtube",
359
+ Website = "website"
360
+ }
361
+ type OrganizationEndpoints = Endpoint<"GET", "/organizations", Organization[]> | Endpoint<"GET", "/organizations/:slug", Organization> | Endpoint<"POST", "/organizations", Organization, CreateOrganizationDto> | Endpoint<"PUT", "/organizations/:slug", Organization, UpdateOrganizationDto> | Endpoint<"DELETE", "/organizations/:slug", Organization, null> | Endpoint<"GET", "/organizations/:slug/billing/account", OrganizationBillingAccount> | Endpoint<"GET", "/organizations/:slug/billing/link", void> | Endpoint<"GET", "/organizations/:slug/billing/dashboard", void> | OrganizationEventEndpoints | OrganizationMembersEndpoints;
362
+
358
363
  declare enum OrderStatus {
359
364
  Created = "created",
360
365
  Cancelled = "cancelled",
@@ -368,7 +373,7 @@ declare enum OrderStatus {
368
373
  }
369
374
  type OrderItem = {
370
375
  id: string;
371
- ticket: EventTicket;
376
+ ticket: OrganizationEventTicket;
372
377
  isUsed: boolean;
373
378
  updatedAt: Date;
374
379
  createdAt: Date;
@@ -378,7 +383,7 @@ type Order = {
378
383
  owner: User;
379
384
  members: User[];
380
385
  status: OrderStatus;
381
- event: Event;
386
+ event: OrganizationEvent;
382
387
  items: OrderItem[];
383
388
  promoCode?: PromoCode;
384
389
  total: number;
@@ -412,7 +417,7 @@ interface ProfileMetadata {
412
417
  }
413
418
  type ProfileEndpoints = Endpoint<"GET", "/profiles/:username", UserIdentity | OrganizationIdentity>;
414
419
 
415
- type Location = {
420
+ type Location$1 = {
416
421
  name?: string;
417
422
  address: string;
418
423
  zipCode: string;
@@ -437,7 +442,7 @@ declare class CreateOrganizationDto {
437
442
  slug?: string;
438
443
  identity: CreateOrganizationIdentityDto;
439
444
  members: OrganizationMemberDto[];
440
- location?: Location;
445
+ location?: Location$1;
441
446
  }
442
447
  declare class CreateOrganizationIdentityDto {
443
448
  displayName: string;
@@ -454,11 +459,45 @@ declare class OrganizationMemberDto {
454
459
  declare class UpdateOrganizationDto extends CreateOrganizationDto {
455
460
  }
456
461
 
462
+ declare class CreateOrganizationEventTicketDto {
463
+ id: string;
464
+ name: string;
465
+ description?: string;
466
+ price: number;
467
+ quantity: number;
468
+ type: OrganizationEventTicketType;
469
+ category: OrganizationEventTicketCategory;
470
+ currency: Currency;
471
+ isVisible: boolean;
472
+ isFeesIncluded: boolean;
473
+ startAt: Date;
474
+ endAt: Date;
475
+ }
476
+
477
+ declare class UpdateOrganizationEventTicketDto extends CreateOrganizationEventTicketDto {
478
+ }
479
+
480
+ declare class CreateOrganizationEventDto {
481
+ slug: string;
482
+ type: OrganizationEventType;
483
+ public: boolean;
484
+ flyers: string[];
485
+ trailers: string[];
486
+ location: Location;
487
+ tickets: CreateOrganizationEventTicketDto[];
488
+ styles: OrganizationEventStyle[];
489
+ startAt: Date;
490
+ endAt: Date;
491
+ }
492
+
493
+ declare class UpdateOrganizationEventDto extends CreateOrganizationEventDto {
494
+ }
495
+
457
496
  declare class CreateUserDto {
458
497
  identifier: UserIdentifier;
459
498
  password: string;
460
499
  identity: CreateUserIdentituDto;
461
- addresses: Location[];
500
+ addresses: Location$1[];
462
501
  }
463
502
  declare class CreateUserIdentituDto {
464
503
  firstName: string;
@@ -580,19 +619,31 @@ declare class Client {
580
619
  }> | Extract<Endpoint<"GET", "/organizations/:slug", Organization>, {
581
620
  path: Path;
582
621
  method: "GET";
583
- }> | Extract<Endpoint<"GET", "/organizations/members", OrganizationMember[]>, {
622
+ }> | Extract<Endpoint<"GET", "/organizations/:slug/billing/account", stripe.Stripe.Account>, {
584
623
  path: Path;
585
624
  method: "GET";
586
- }> | Extract<Endpoint<"GET", "/organizations/:slug/members", OrganizationMember[]>, {
625
+ }> | Extract<Endpoint<"GET", "/organizations/:slug/billing/link", void>, {
587
626
  path: Path;
588
627
  method: "GET";
589
- }> | Extract<Endpoint<"GET", "/organizations/:slug/billing/account", stripe.Stripe.Account>, {
628
+ }> | Extract<Endpoint<"GET", "/organizations/:slug/billing/dashboard", void>, {
590
629
  path: Path;
591
630
  method: "GET";
592
- }> | Extract<Endpoint<"GET", "/organizations/:slug/billing/link", void>, {
631
+ }> | Extract<Endpoint<"GET", "/organizations/:organizationSlug/events", Event[]>, {
593
632
  path: Path;
594
633
  method: "GET";
595
- }> | Extract<Endpoint<"GET", "/organizations/:slug/billing/dashboard", void>, {
634
+ }> | Extract<Endpoint<"GET", "/organizations/:organizationSlug/events/:eventSlug", Event>, {
635
+ path: Path;
636
+ method: "GET";
637
+ }> | Extract<Endpoint<"GET", "/organizations/:slug/events/:eventSlug/tickets", OrganizationEventTicket[]>, {
638
+ path: Path;
639
+ method: "GET";
640
+ }> | Extract<Endpoint<"GET", "/organizations/:slug/events/:eventSlug/tickets/:ticketId", OrganizationEventTicket>, {
641
+ path: Path;
642
+ method: "GET";
643
+ }> | Extract<Endpoint<"GET", "/organizations/members", OrganizationMember[]>, {
644
+ path: Path;
645
+ method: "GET";
646
+ }> | Extract<Endpoint<"GET", "/organizations/:slug/members", OrganizationMember[]>, {
596
647
  path: Path;
597
648
  method: "GET";
598
649
  }> | Extract<ProfileEndpoints, {
@@ -640,6 +691,12 @@ declare class Client {
640
691
  }> | Extract<Endpoint<"POST", "/organizations", Organization, CreateOrganizationDto>, {
641
692
  path: Path;
642
693
  method: "POST";
694
+ }> | Extract<Endpoint<"POST", "/organizations/:organizationSlug/events", Event, CreateOrganizationEventDto>, {
695
+ path: Path;
696
+ method: "POST";
697
+ }> | Extract<Endpoint<"POST", "/organizations/:slug/events/:eventSlug/tickets", OrganizationEventTicket, CreateOrganizationEventTicketDto>, {
698
+ path: Path;
699
+ method: "POST";
643
700
  }> | Extract<Endpoint<"POST", "/organizations/:slug/members", OrganizationMember, OrganizationMemberDto>, {
644
701
  path: Path;
645
702
  method: "POST";
@@ -652,6 +709,12 @@ declare class Client {
652
709
  }>["body"], query?: Query<Path>, options?: APIRequestOptions): Promise<(Extract<Endpoint<"PUT", "/organizations/:slug", Organization, UpdateOrganizationDto>, {
653
710
  path: Path;
654
711
  method: "PUT";
712
+ }> | Extract<Endpoint<"PUT", "/organizations/:organizationSlug/events/:eventSlug", Event, UpdateOrganizationEventDto>, {
713
+ path: Path;
714
+ method: "PUT";
715
+ }> | Extract<Endpoint<"PUT", "/organizations/:slug/events/:eventSlug/tickets/:ticketId", OrganizationEventTicket, UpdateOrganizationEventTicketDto>, {
716
+ path: Path;
717
+ method: "PUT";
655
718
  }> | Extract<Endpoint<"PUT", "/organizations/:organizationSlug/members/:userId", OrganizationMember, UpdateOrganizationMemberDto>, {
656
719
  path: Path;
657
720
  method: "PUT";
@@ -670,7 +733,13 @@ declare class Client {
670
733
  }>["path"]>(path: Path, body: Extract<Endpoints, {
671
734
  path: Path;
672
735
  method: "DELETE";
673
- }>["body"], query?: Query<Path>, options?: APIRequestOptions): Promise<(Extract<Endpoint<"DELETE", "/organizations/:slug", boolean, null>, {
736
+ }>["body"], query?: Query<Path>, options?: APIRequestOptions): Promise<(Extract<Endpoint<"DELETE", "/organizations/:slug", Organization, null>, {
737
+ path: Path;
738
+ method: "DELETE";
739
+ }> | Extract<Endpoint<"DELETE", "/organizations/:organizationSlug/events/:eventSlug", Event, null>, {
740
+ path: Path;
741
+ method: "DELETE";
742
+ }> | Extract<Endpoint<"DELETE", "/organizations/:slug/events/:eventSlug/tickets/:ticketId", OrganizationEventTicket[], null>, {
674
743
  path: Path;
675
744
  method: "DELETE";
676
745
  }> | Extract<Endpoint<"DELETE", "/organizations/members/:id", OrganizationMember[], null>, {
@@ -727,11 +796,25 @@ declare const organizations: (client: Client) => {
727
796
  get: (slug: string) => Promise<Organization>;
728
797
  create: (data: CreateOrganizationDto) => Promise<Organization>;
729
798
  update: (slug: string, data: UpdateOrganizationDto) => Promise<Organization>;
730
- delete: (slug: string) => Promise<boolean>;
799
+ delete: (slug: string) => Promise<Organization>;
731
800
  members: {
732
801
  getAll: () => Promise<OrganizationMember[]>;
733
802
  delete: (id: string) => Promise<OrganizationMember[]>;
734
803
  };
804
+ events: {
805
+ getAll: (organizationSlug: string) => Promise<Event[]>;
806
+ get: (organizationSlug: string, eventSlug: string) => Promise<Event>;
807
+ create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<Event>;
808
+ update: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventDto) => Promise<Event>;
809
+ delete: (organizationSlug: string, eventSlug: string) => Promise<Event>;
810
+ tickets: {
811
+ getAll: (slug: string, eventSlug: string) => Promise<OrganizationEventTicket[]>;
812
+ get: (slug: string, eventSlug: string, ticketId: string) => Promise<OrganizationEventTicket>;
813
+ create: (slug: string, eventSlug: string, data: CreateOrganizationEventTicketDto) => Promise<OrganizationEventTicket>;
814
+ update: (slug: string, eventSlug: string, ticketId: string, data: UpdateOrganizationEventTicketDto) => Promise<OrganizationEventTicket>;
815
+ delete: (slug: string, eventSlug: string, ticketId: string) => Promise<OrganizationEventTicket[]>;
816
+ };
817
+ };
735
818
  billing: {
736
819
  account: (slug: string) => Promise<stripe.Stripe.Account>;
737
820
  link: (slug: string) => void;
@@ -796,11 +879,25 @@ declare class TonightPass {
796
879
  get: (slug: string) => Promise<Organization>;
797
880
  create: (data: CreateOrganizationDto) => Promise<Organization>;
798
881
  update: (slug: string, data: UpdateOrganizationDto) => Promise<Organization>;
799
- delete: (slug: string) => Promise<boolean>;
882
+ delete: (slug: string) => Promise<Organization>;
800
883
  members: {
801
884
  getAll: () => Promise<OrganizationMember[]>;
802
885
  delete: (id: string) => Promise<OrganizationMember[]>;
803
886
  };
887
+ events: {
888
+ getAll: (organizationSlug: string) => Promise<Event[]>;
889
+ get: (organizationSlug: string, eventSlug: string) => Promise<Event>;
890
+ create: (organizationSlug: string, data: CreateOrganizationEventDto) => Promise<Event>;
891
+ update: (organizationSlug: string, eventSlug: string, data: CreateOrganizationEventDto) => Promise<Event>;
892
+ delete: (organizationSlug: string, eventSlug: string) => Promise<Event>;
893
+ tickets: {
894
+ getAll: (slug: string, eventSlug: string) => Promise<OrganizationEventTicket[]>;
895
+ get: (slug: string, eventSlug: string, ticketId: string) => Promise<OrganizationEventTicket>;
896
+ create: (slug: string, eventSlug: string, data: CreateOrganizationEventTicketDto) => Promise<OrganizationEventTicket>;
897
+ update: (slug: string, eventSlug: string, ticketId: string, data: UpdateOrganizationEventTicketDto) => Promise<OrganizationEventTicket>;
898
+ delete: (slug: string, eventSlug: string, ticketId: string) => Promise<OrganizationEventTicket[]>;
899
+ };
900
+ };
804
901
  billing: {
805
902
  account: (slug: string) => Promise<stripe.Stripe.Account>;
806
903
  link: (slug: string) => void;
@@ -826,4 +923,4 @@ declare class TonightPass {
826
923
 
827
924
  declare const isBrowser: boolean;
828
925
 
829
- export { type APIRequestOptions, type APIResponse, type AuthEndpoints, BCRYPT_HASH, type CareersCategory, type CareersEmploymentType, type CareersEndpoints, type CareersJob, type CareersOffice, Client, type ClientOptions, CreateOrganizationDto, CreateOrganizationIdentityDto, CreateUserDto, Currency, DEFAULT_API_URL, EMAIL_REGEX, type Endpoint, type Endpoints, type ErroredAPIResponse, type Event, type EventStyle, EventStyleType, type EventTicket, EventTicketCategory, type EventTicketType, EventType, type Health, type HealthEndpoints, IMAGE_URL_REGEX, Language, type Location, NAME_REGEX, type Order, type OrderItem, OrderStatus, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationIdentity, type OrganizationMember, OrganizationMemberDto, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationSocialLink, OrganizationSocialType, PASSWORD_REGEX, PHONE_NUMBER_REGEX, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, type PromoCode, SLUG_REGEX, SignInUserDto, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateOrganizationDto, UpdateUserDto, type User, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, type UserIdentifier, type UserIdentity, type UserIdentityGender, type UserPreferences, UserRole, type UserToken, UserTokenType, auth, careers, health, isBrowser, organizations, profiles, request, sdk, users };
926
+ export { type APIRequestOptions, type APIResponse, type AuthEndpoints, BCRYPT_HASH, type CareersCategory, type CareersEmploymentType, type CareersEndpoints, type CareersJob, type CareersOffice, Client, type ClientOptions, CreateOrganizationDto, CreateOrganizationEventDto, CreateOrganizationEventTicketDto, CreateOrganizationIdentityDto, CreateUserDto, Currency, DEFAULT_API_URL, EMAIL_REGEX, type Endpoint, type Endpoints, type ErroredAPIResponse, type Health, type HealthEndpoints, IMAGE_URL_REGEX, Language, type Location$1 as Location, NAME_REGEX, type Order, type OrderItem, OrderStatus, type Organization, type OrganizationBilling, type OrganizationBillingAccount, type OrganizationEndpoints, type OrganizationEvent, type OrganizationEventEndpoints, type OrganizationEventStyle, OrganizationEventStyleType, type OrganizationEventTicket, OrganizationEventTicketCategory, type OrganizationEventTicketEndpoints, type OrganizationEventTicketType, OrganizationEventType, type OrganizationIdentity, type OrganizationMember, OrganizationMemberDto, OrganizationMemberRole, OrganizationMemberStatus, type OrganizationMembersEndpoints, type OrganizationSocialLink, OrganizationSocialType, PASSWORD_REGEX, PHONE_NUMBER_REGEX, type PathsFor, type Profile, type ProfileEndpoints, type ProfileMetadata, type PromisedAPIResponse, type PromoCode, SLUG_REGEX, SignInUserDto, type SuccessfulAPIResponse, TonightPass, TonightPassAPIError, UpdateOrganizationDto, UpdateOrganizationEventDto, UpdateOrganizationEventTicketDto, UpdateUserDto, type User, type UserConnection, type UserConnectionClient, type UserConnectionDevice, type UserConnectionOS, type UserEndpoints, type UserIdentifier, type UserIdentity, type UserIdentityGender, type UserPreferences, UserRole, type UserToken, UserTokenType, auth, careers, health, isBrowser, organizations, profiles, request, sdk, users };