@freeticket/cli 0.15.0 → 0.16.0

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.
Files changed (3) hide show
  1. package/README.md +5 -1
  2. package/dist/index.js +1622 -41
  3. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // package.json
4
4
  var package_default = {
5
5
  name: "@freeticket/cli",
6
- version: "0.15.0",
6
+ version: "0.16.0",
7
7
  description: "Official FreeTicket CLI \u2014 consumes the B2B REST API for events, sales, tickets, memberships, venues, staff, and reports.",
8
8
  keywords: [
9
9
  "freeticket",
@@ -37,7 +37,7 @@ var package_default = {
37
37
  scripts: {
38
38
  build: "tsup",
39
39
  dev: "tsup --watch",
40
- generate: "openapi-ts && openapi-ts -f openapi-ts.admin.config.ts",
40
+ generate: "openapi-ts && openapi-ts -f openapi-ts.admin.config.ts && tsx scripts/gen-routes.ts",
41
41
  "sync-openapi": "tsx scripts/sync-openapi.ts",
42
42
  "sync-openapi:admin": "FT_OPENAPI_URL=${FT_ADMIN_OPENAPI_URL:-https://admin.appfreeticket.com/api/admin/openapi.json} FT_OPENAPI_OUT=admin-openapi.json tsx scripts/sync-openapi.ts",
43
43
  lint: "biome check .",
@@ -164,6 +164,42 @@ var client = createClient(createConfig({
164
164
  }));
165
165
 
166
166
  // src/client/sdk.gen.ts
167
+ var getEventsIdDates = (options) => {
168
+ return (options.client ?? client).get({
169
+ security: [
170
+ {
171
+ name: "Authorization",
172
+ type: "apiKey"
173
+ },
174
+ {
175
+ name: "x-api-key",
176
+ type: "apiKey"
177
+ }
178
+ ],
179
+ url: "/events/{id}/dates",
180
+ ...options
181
+ });
182
+ };
183
+ var postEventsIdDates = (options) => {
184
+ return (options.client ?? client).post({
185
+ security: [
186
+ {
187
+ name: "Authorization",
188
+ type: "apiKey"
189
+ },
190
+ {
191
+ name: "x-api-key",
192
+ type: "apiKey"
193
+ }
194
+ ],
195
+ url: "/events/{id}/dates",
196
+ ...options,
197
+ headers: {
198
+ "Content-Type": "application/json",
199
+ ...options?.headers
200
+ }
201
+ });
202
+ };
167
203
  var postAuthDeviceCode = (options) => {
168
204
  return (options?.client ?? client).post({
169
205
  url: "/auth/device/code",
@@ -346,42 +382,6 @@ var postEventsIdCancel = (options) => {
346
382
  ...options
347
383
  });
348
384
  };
349
- var getEventsIdDates = (options) => {
350
- return (options.client ?? client).get({
351
- security: [
352
- {
353
- name: "Authorization",
354
- type: "apiKey"
355
- },
356
- {
357
- name: "x-api-key",
358
- type: "apiKey"
359
- }
360
- ],
361
- url: "/events/{id}/dates",
362
- ...options
363
- });
364
- };
365
- var postEventsIdDates = (options) => {
366
- return (options.client ?? client).post({
367
- security: [
368
- {
369
- name: "Authorization",
370
- type: "apiKey"
371
- },
372
- {
373
- name: "x-api-key",
374
- type: "apiKey"
375
- }
376
- ],
377
- url: "/events/{id}/dates",
378
- ...options,
379
- headers: {
380
- "Content-Type": "application/json",
381
- ...options?.headers
382
- }
383
- });
384
- };
385
385
  var deleteEventsIdDatesDateId = (options) => {
386
386
  return (options.client ?? client).delete({
387
387
  security: [
@@ -1642,6 +1642,22 @@ var postMerchProductsImagesUploadUrl = (options) => {
1642
1642
  }
1643
1643
  });
1644
1644
  };
1645
+ var getRafflesSlug = (options) => {
1646
+ return (options.client ?? client).get({
1647
+ security: [
1648
+ {
1649
+ name: "Authorization",
1650
+ type: "apiKey"
1651
+ },
1652
+ {
1653
+ name: "x-api-key",
1654
+ type: "apiKey"
1655
+ }
1656
+ ],
1657
+ url: "/raffles/{slug}",
1658
+ ...options
1659
+ });
1660
+ };
1645
1661
 
1646
1662
  // src/commands/account.ts
1647
1663
  import chalk4 from "chalk";
@@ -4263,6 +4279,1565 @@ function flagKey(flag) {
4263
4279
  return long.replace(/^--/, "").replace(/-([a-z])/g, (_, c2) => c2.toUpperCase());
4264
4280
  }
4265
4281
 
4282
+ // src/client/routes.gen.ts
4283
+ var CONTRACT_VERSION = "1.63.0";
4284
+ var ROUTES = [
4285
+ {
4286
+ "method": "GET",
4287
+ "path": "/api-keys",
4288
+ "operationId": "getApiKeys",
4289
+ "summary": "List my API keys"
4290
+ },
4291
+ {
4292
+ "method": "POST",
4293
+ "path": "/api-keys",
4294
+ "operationId": "postApiKeys",
4295
+ "summary": "Mint an API key (returns the plaintext exactly once)"
4296
+ },
4297
+ {
4298
+ "method": "DELETE",
4299
+ "path": "/api-keys/{id}",
4300
+ "operationId": "deleteApiKeysId",
4301
+ "summary": "Revoke one of my API keys"
4302
+ },
4303
+ {
4304
+ "method": "POST",
4305
+ "path": "/api/customer-auth/enterprise-exchange",
4306
+ "operationId": "postApiCustomerAuthEnterpriseExchange",
4307
+ "summary": "Exchange the headless SSO one-time token for a session token"
4308
+ },
4309
+ {
4310
+ "method": "GET",
4311
+ "path": "/artists",
4312
+ "operationId": "getArtists",
4313
+ "summary": "Search registered artists"
4314
+ },
4315
+ {
4316
+ "method": "POST",
4317
+ "path": "/auth/device/code",
4318
+ "operationId": "postAuthDeviceCode",
4319
+ "summary": "Start the Device Authorization Grant (RFC 8628)"
4320
+ },
4321
+ {
4322
+ "method": "POST",
4323
+ "path": "/auth/device/token",
4324
+ "operationId": "postAuthDeviceToken",
4325
+ "summary": "CLI poll: exchanges the device_code for an API key once approved"
4326
+ },
4327
+ {
4328
+ "method": "POST",
4329
+ "path": "/auth/signup",
4330
+ "operationId": "postAuthSignup",
4331
+ "summary": "Headless sign-up: creates the unverified account and sends the email"
4332
+ },
4333
+ {
4334
+ "method": "GET",
4335
+ "path": "/content/channels",
4336
+ "operationId": "getContentChannels",
4337
+ "summary": "List the community channels"
4338
+ },
4339
+ {
4340
+ "method": "POST",
4341
+ "path": "/content/channels",
4342
+ "operationId": "postContentChannels",
4343
+ "summary": "Create a community channel"
4344
+ },
4345
+ {
4346
+ "method": "PATCH",
4347
+ "path": "/content/channels/{id}",
4348
+ "operationId": "patchContentChannelsId",
4349
+ "summary": "Update a community channel"
4350
+ },
4351
+ {
4352
+ "method": "POST",
4353
+ "path": "/content/channels/{id}/archive",
4354
+ "operationId": "postContentChannelsIdArchive",
4355
+ "summary": "Archive a community channel"
4356
+ },
4357
+ {
4358
+ "method": "PUT",
4359
+ "path": "/content/channels/order",
4360
+ "operationId": "putContentChannelsOrder",
4361
+ "summary": "Reorder the community channels"
4362
+ },
4363
+ {
4364
+ "method": "DELETE",
4365
+ "path": "/content/comments/{id}",
4366
+ "operationId": "deleteContentCommentsId",
4367
+ "summary": "Delete a community comment (moderation)"
4368
+ },
4369
+ {
4370
+ "method": "GET",
4371
+ "path": "/content/lives",
4372
+ "operationId": "getContentLives",
4373
+ "summary": "List the organization's live streams"
4374
+ },
4375
+ {
4376
+ "method": "POST",
4377
+ "path": "/content/lives",
4378
+ "operationId": "postContentLives",
4379
+ "summary": "Create a live stream"
4380
+ },
4381
+ {
4382
+ "method": "DELETE",
4383
+ "path": "/content/lives/{id}",
4384
+ "operationId": "deleteContentLivesId",
4385
+ "summary": "Delete a live stream"
4386
+ },
4387
+ {
4388
+ "method": "GET",
4389
+ "path": "/content/lives/{id}",
4390
+ "operationId": "getContentLivesId",
4391
+ "summary": "Live stream status"
4392
+ },
4393
+ {
4394
+ "method": "PATCH",
4395
+ "path": "/content/lives/{id}",
4396
+ "operationId": "patchContentLivesId",
4397
+ "summary": "Update a live stream's schedule or audience"
4398
+ },
4399
+ {
4400
+ "method": "GET",
4401
+ "path": "/content/lives/{id}/chat",
4402
+ "operationId": "getContentLivesIdChat",
4403
+ "summary": "Chat history of a live stream"
4404
+ },
4405
+ {
4406
+ "method": "POST",
4407
+ "path": "/content/lives/{id}/reset-key",
4408
+ "operationId": "postContentLivesIdResetKey",
4409
+ "summary": "Rotate a live stream's stream key"
4410
+ },
4411
+ {
4412
+ "method": "GET",
4413
+ "path": "/content/meetups",
4414
+ "operationId": "getContentMeetups",
4415
+ "summary": "List community meetups"
4416
+ },
4417
+ {
4418
+ "method": "POST",
4419
+ "path": "/content/meetups",
4420
+ "operationId": "postContentMeetups",
4421
+ "summary": "Create a community meetup (draft)"
4422
+ },
4423
+ {
4424
+ "method": "GET",
4425
+ "path": "/content/meetups/{id}",
4426
+ "operationId": "getContentMeetupsId",
4427
+ "summary": "Get a community meetup with its attendees and requests"
4428
+ },
4429
+ {
4430
+ "method": "PATCH",
4431
+ "path": "/content/meetups/{id}",
4432
+ "operationId": "patchContentMeetupsId",
4433
+ "summary": "Update a community meetup"
4434
+ },
4435
+ {
4436
+ "method": "PUT",
4437
+ "path": "/content/meetups/{id}/attendance",
4438
+ "operationId": "putContentMeetupsIdAttendance",
4439
+ "summary": "Mark or unmark a meetup attendee as checked in"
4440
+ },
4441
+ {
4442
+ "method": "POST",
4443
+ "path": "/content/meetups/{id}/cancel",
4444
+ "operationId": "postContentMeetupsIdCancel",
4445
+ "summary": "Cancel a community meetup"
4446
+ },
4447
+ {
4448
+ "method": "POST",
4449
+ "path": "/content/meetups/{id}/publish",
4450
+ "operationId": "postContentMeetupsIdPublish",
4451
+ "summary": "Publish a draft community meetup"
4452
+ },
4453
+ {
4454
+ "method": "PATCH",
4455
+ "path": "/content/meetups/{id}/rsvps/{rsvpId}",
4456
+ "operationId": "patchContentMeetupsIdRsvpsRsvpId",
4457
+ "summary": "Approve or reject a meetup RSVP request"
4458
+ },
4459
+ {
4460
+ "method": "DELETE",
4461
+ "path": "/content/members/{id}/ban",
4462
+ "operationId": "deleteContentMembersIdBan",
4463
+ "summary": "Lift a member's community ban"
4464
+ },
4465
+ {
4466
+ "method": "POST",
4467
+ "path": "/content/members/{id}/ban",
4468
+ "operationId": "postContentMembersIdBan",
4469
+ "summary": "Ban a member from the community"
4470
+ },
4471
+ {
4472
+ "method": "GET",
4473
+ "path": "/content/moderation/bans",
4474
+ "operationId": "getContentModerationBans",
4475
+ "summary": "List members banned from the community"
4476
+ },
4477
+ {
4478
+ "method": "POST",
4479
+ "path": "/content/moderation/comments/{id}/hide",
4480
+ "operationId": "postContentModerationCommentsIdHide",
4481
+ "summary": "Hide a community comment"
4482
+ },
4483
+ {
4484
+ "method": "POST",
4485
+ "path": "/content/moderation/comments/{id}/ignore-reports",
4486
+ "operationId": "postContentModerationCommentsIdIgnoreReports",
4487
+ "summary": "Dismiss the open reports of a community comment"
4488
+ },
4489
+ {
4490
+ "method": "POST",
4491
+ "path": "/content/moderation/comments/{id}/unhide",
4492
+ "operationId": "postContentModerationCommentsIdUnhide",
4493
+ "summary": "Show a hidden community comment again"
4494
+ },
4495
+ {
4496
+ "method": "GET",
4497
+ "path": "/content/moderation/member-posts",
4498
+ "operationId": "getContentModerationMemberPosts",
4499
+ "summary": "List member posts awaiting review (or recently published)"
4500
+ },
4501
+ {
4502
+ "method": "POST",
4503
+ "path": "/content/moderation/member-posts/{id}/approve",
4504
+ "operationId": "postContentModerationMemberPostsIdApprove",
4505
+ "summary": "Approve a pending member post"
4506
+ },
4507
+ {
4508
+ "method": "POST",
4509
+ "path": "/content/moderation/member-posts/{id}/reject",
4510
+ "operationId": "postContentModerationMemberPostsIdReject",
4511
+ "summary": "Reject a pending member post"
4512
+ },
4513
+ {
4514
+ "method": "POST",
4515
+ "path": "/content/moderation/member-posts/{id}/remove",
4516
+ "operationId": "postContentModerationMemberPostsIdRemove",
4517
+ "summary": "Remove a published member post"
4518
+ },
4519
+ {
4520
+ "method": "GET",
4521
+ "path": "/content/moderation/queue",
4522
+ "operationId": "getContentModerationQueue",
4523
+ "summary": "List reported community comments (moderation queue)"
4524
+ },
4525
+ {
4526
+ "method": "POST",
4527
+ "path": "/content/playback-token",
4528
+ "operationId": "postContentPlaybackToken",
4529
+ "summary": "Signed token to play a video or a live stream"
4530
+ },
4531
+ {
4532
+ "method": "GET",
4533
+ "path": "/content/posts",
4534
+ "operationId": "getContentPosts",
4535
+ "summary": "List the organization's community feed"
4536
+ },
4537
+ {
4538
+ "method": "POST",
4539
+ "path": "/content/posts",
4540
+ "operationId": "postContentPosts",
4541
+ "summary": "Publish community content (including articles)"
4542
+ },
4543
+ {
4544
+ "method": "DELETE",
4545
+ "path": "/content/posts/{id}",
4546
+ "operationId": "deleteContentPostsId",
4547
+ "summary": "Delete a community post"
4548
+ },
4549
+ {
4550
+ "method": "PATCH",
4551
+ "path": "/content/posts/{id}",
4552
+ "operationId": "patchContentPostsId",
4553
+ "summary": "Update a community post or article"
4554
+ },
4555
+ {
4556
+ "method": "PUT",
4557
+ "path": "/content/posts/{id}/pin",
4558
+ "operationId": "putContentPostsIdPin",
4559
+ "summary": "Pin or unpin a community post"
4560
+ },
4561
+ {
4562
+ "method": "GET",
4563
+ "path": "/content/series",
4564
+ "operationId": "getContentSeries",
4565
+ "summary": "List the video series"
4566
+ },
4567
+ {
4568
+ "method": "POST",
4569
+ "path": "/content/series",
4570
+ "operationId": "postContentSeries",
4571
+ "summary": "Create a video series"
4572
+ },
4573
+ {
4574
+ "method": "DELETE",
4575
+ "path": "/content/series/{id}",
4576
+ "operationId": "deleteContentSeriesId",
4577
+ "summary": "Delete a video series"
4578
+ },
4579
+ {
4580
+ "method": "PATCH",
4581
+ "path": "/content/series/{id}",
4582
+ "operationId": "patchContentSeriesId",
4583
+ "summary": "Update a video series"
4584
+ },
4585
+ {
4586
+ "method": "PUT",
4587
+ "path": "/content/series/{id}/published",
4588
+ "operationId": "putContentSeriesIdPublished",
4589
+ "summary": "Publish or unpublish a video series"
4590
+ },
4591
+ {
4592
+ "method": "GET",
4593
+ "path": "/content/videos",
4594
+ "operationId": "getContentVideos",
4595
+ "summary": "List the organization's published videos"
4596
+ },
4597
+ {
4598
+ "method": "DELETE",
4599
+ "path": "/content/videos/{id}",
4600
+ "operationId": "deleteContentVideosId",
4601
+ "summary": "Delete an on-demand video"
4602
+ },
4603
+ {
4604
+ "method": "PATCH",
4605
+ "path": "/content/videos/{id}",
4606
+ "operationId": "patchContentVideosId",
4607
+ "summary": "Update an on-demand video"
4608
+ },
4609
+ {
4610
+ "method": "PUT",
4611
+ "path": "/content/videos/{id}/published",
4612
+ "operationId": "putContentVideosIdPublished",
4613
+ "summary": "Publish or unpublish an on-demand video"
4614
+ },
4615
+ {
4616
+ "method": "PUT",
4617
+ "path": "/content/videos/{id}/series",
4618
+ "operationId": "putContentVideosIdSeries",
4619
+ "summary": "Move a video into a series or out of it"
4620
+ },
4621
+ {
4622
+ "method": "POST",
4623
+ "path": "/courtesy-requests",
4624
+ "operationId": "postCourtesyRequests",
4625
+ "summary": "Request a courtesy invitation from an enterprise landing"
4626
+ },
4627
+ {
4628
+ "method": "GET",
4629
+ "path": "/customer/addresses",
4630
+ "operationId": "getCustomerAddresses",
4631
+ "summary": "Buyer's saved shipping addresses"
4632
+ },
4633
+ {
4634
+ "method": "POST",
4635
+ "path": "/customer/addresses",
4636
+ "operationId": "postCustomerAddresses",
4637
+ "summary": "Save a shipping address for the buyer"
4638
+ },
4639
+ {
4640
+ "method": "DELETE",
4641
+ "path": "/customer/addresses/{id}",
4642
+ "operationId": "deleteCustomerAddressesId",
4643
+ "summary": "Delete one of the buyer's addresses"
4644
+ },
4645
+ {
4646
+ "method": "PATCH",
4647
+ "path": "/customer/addresses/{id}",
4648
+ "operationId": "patchCustomerAddressesId",
4649
+ "summary": "Update one of the buyer's addresses"
4650
+ },
4651
+ {
4652
+ "method": "POST",
4653
+ "path": "/customer/auth/request",
4654
+ "operationId": "postCustomerAuthRequest",
4655
+ "summary": "Request an access code to sign in (or create an account)"
4656
+ },
4657
+ {
4658
+ "method": "POST",
4659
+ "path": "/customer/auth/verify",
4660
+ "operationId": "postCustomerAuthVerify",
4661
+ "summary": "Exchange the access code for a buyer session"
4662
+ },
4663
+ {
4664
+ "method": "GET",
4665
+ "path": "/customer/community/channels",
4666
+ "operationId": "getCustomerCommunityChannels",
4667
+ "summary": "Community channels for a buyer"
4668
+ },
4669
+ {
4670
+ "method": "DELETE",
4671
+ "path": "/customer/community/comments/{id}",
4672
+ "operationId": "deleteCustomerCommunityCommentsId",
4673
+ "summary": "Delete the buyer's own community comment"
4674
+ },
4675
+ {
4676
+ "method": "POST",
4677
+ "path": "/customer/community/comments/{id}/report",
4678
+ "operationId": "postCustomerCommunityCommentsIdReport",
4679
+ "summary": "Report a community comment"
4680
+ },
4681
+ {
4682
+ "method": "GET",
4683
+ "path": "/customer/community/feed",
4684
+ "operationId": "getCustomerCommunityFeed",
4685
+ "summary": "Community feed for a buyer"
4686
+ },
4687
+ {
4688
+ "method": "GET",
4689
+ "path": "/customer/community/me",
4690
+ "operationId": "getCustomerCommunityMe",
4691
+ "summary": "Buyer's state in the community"
4692
+ },
4693
+ {
4694
+ "method": "GET",
4695
+ "path": "/customer/community/meetups",
4696
+ "operationId": "getCustomerCommunityMeetups",
4697
+ "summary": "Upcoming community meetups for a buyer"
4698
+ },
4699
+ {
4700
+ "method": "GET",
4701
+ "path": "/customer/community/meetups/{id}",
4702
+ "operationId": "getCustomerCommunityMeetupsId",
4703
+ "summary": "Community meetup for a buyer"
4704
+ },
4705
+ {
4706
+ "method": "DELETE",
4707
+ "path": "/customer/community/meetups/{id}/rsvp",
4708
+ "operationId": "deleteCustomerCommunityMeetupsIdRsvp",
4709
+ "summary": "Cancel the buyer's RSVP to a community meetup"
4710
+ },
4711
+ {
4712
+ "method": "POST",
4713
+ "path": "/customer/community/meetups/{id}/rsvp",
4714
+ "operationId": "postCustomerCommunityMeetupsIdRsvp",
4715
+ "summary": "RSVP to a community meetup"
4716
+ },
4717
+ {
4718
+ "method": "GET",
4719
+ "path": "/customer/community/posts/{id}",
4720
+ "operationId": "getCustomerCommunityPostsId",
4721
+ "summary": "Community post permalink"
4722
+ },
4723
+ {
4724
+ "method": "GET",
4725
+ "path": "/customer/community/posts/{id}/comments",
4726
+ "operationId": "getCustomerCommunityPostsIdComments",
4727
+ "summary": "Visible comments of a community post"
4728
+ },
4729
+ {
4730
+ "method": "POST",
4731
+ "path": "/customer/community/posts/{id}/comments",
4732
+ "operationId": "postCustomerCommunityPostsIdComments",
4733
+ "summary": "Comment on a community post"
4734
+ },
4735
+ {
4736
+ "method": "DELETE",
4737
+ "path": "/customer/community/posts/{id}/reactions",
4738
+ "operationId": "deleteCustomerCommunityPostsIdReactions",
4739
+ "summary": "Remove the buyer's reaction from a community post"
4740
+ },
4741
+ {
4742
+ "method": "POST",
4743
+ "path": "/customer/community/posts/{id}/reactions",
4744
+ "operationId": "postCustomerCommunityPostsIdReactions",
4745
+ "summary": "React to a community post"
4746
+ },
4747
+ {
4748
+ "method": "POST",
4749
+ "path": "/customer/community/posts/{id}/report",
4750
+ "operationId": "postCustomerCommunityPostsIdReport",
4751
+ "summary": "Report another member's community post"
4752
+ },
4753
+ {
4754
+ "method": "GET",
4755
+ "path": "/customer/lives/{id}/chat",
4756
+ "operationId": "getCustomerLivesIdChat",
4757
+ "summary": "Recent chat messages of a live stream"
4758
+ },
4759
+ {
4760
+ "method": "POST",
4761
+ "path": "/customer/lives/{id}/chat/messages",
4762
+ "operationId": "postCustomerLivesIdChatMessages",
4763
+ "summary": "Post a message in a live stream's chat"
4764
+ },
4765
+ {
4766
+ "method": "POST",
4767
+ "path": "/customer/lives/{id}/chat/token",
4768
+ "operationId": "postCustomerLivesIdChatToken",
4769
+ "summary": "Read-only Realtime token for a live stream's chat"
4770
+ },
4771
+ {
4772
+ "method": "POST",
4773
+ "path": "/customer/logout",
4774
+ "operationId": "postCustomerLogout",
4775
+ "summary": "Sign out the buyer session"
4776
+ },
4777
+ {
4778
+ "method": "GET",
4779
+ "path": "/customer/me",
4780
+ "operationId": "getCustomerMe",
4781
+ "summary": "Authenticated buyer identity"
4782
+ },
4783
+ {
4784
+ "method": "GET",
4785
+ "path": "/customer/membership",
4786
+ "operationId": "getCustomerMembership",
4787
+ "summary": "Buyer membership status in a workspace"
4788
+ },
4789
+ {
4790
+ "method": "GET",
4791
+ "path": "/customer/merch-orders",
4792
+ "operationId": "getCustomerMerchOrders",
4793
+ "summary": "Buyer's merch orders in the key's store"
4794
+ },
4795
+ {
4796
+ "method": "DELETE",
4797
+ "path": "/customer/newsletter",
4798
+ "operationId": "deleteCustomerNewsletter",
4799
+ "summary": "Unsubscribe the buyer from the workspace newsletter"
4800
+ },
4801
+ {
4802
+ "method": "GET",
4803
+ "path": "/customer/newsletter",
4804
+ "operationId": "getCustomerNewsletter",
4805
+ "summary": "Buyer newsletter subscription status in a workspace"
4806
+ },
4807
+ {
4808
+ "method": "POST",
4809
+ "path": "/customer/newsletter",
4810
+ "operationId": "postCustomerNewsletter",
4811
+ "summary": "Subscribe the buyer to the workspace newsletter"
4812
+ },
4813
+ {
4814
+ "method": "GET",
4815
+ "path": "/customer/orders",
4816
+ "operationId": "getCustomerOrders",
4817
+ "summary": "The purchase the buyer left unfinished for this event date"
4818
+ },
4819
+ {
4820
+ "method": "POST",
4821
+ "path": "/customer/orders",
4822
+ "operationId": "postCustomerOrders",
4823
+ "summary": "Create the ticket reservation (step 1 of the headless purchase)"
4824
+ },
4825
+ {
4826
+ "method": "GET",
4827
+ "path": "/customer/orders/{id}",
4828
+ "operationId": "getCustomerOrdersId",
4829
+ "summary": "Status of a headless purchase (and its tickets, once paid)"
4830
+ },
4831
+ {
4832
+ "method": "POST",
4833
+ "path": "/customer/orders/{id}/payment",
4834
+ "operationId": "postCustomerOrdersIdPayment",
4835
+ "summary": "Open payment for a reservation (Bold or MercadoPago, depending on the event)"
4836
+ },
4837
+ {
4838
+ "method": "POST",
4839
+ "path": "/customer/orders/{id}/payment/card",
4840
+ "operationId": "postCustomerOrdersIdPaymentCard",
4841
+ "summary": "Charge with the MercadoPago Payment Brick token"
4842
+ },
4843
+ {
4844
+ "method": "POST",
4845
+ "path": "/customer/orders/{id}/payment/pse",
4846
+ "operationId": "postCustomerOrdersIdPaymentPse",
4847
+ "summary": "Open a PSE payment through MercadoPago (redirect)"
4848
+ },
4849
+ {
4850
+ "method": "POST",
4851
+ "path": "/customer/orders/{id}/release",
4852
+ "operationId": "postCustomerOrdersIdRelease",
4853
+ "summary": "Release a reservation the buyer will not pay for"
4854
+ },
4855
+ {
4856
+ "method": "GET",
4857
+ "path": "/customer/profile",
4858
+ "operationId": "getCustomerProfile",
4859
+ "summary": "Buyer profile (name and phone)"
4860
+ },
4861
+ {
4862
+ "method": "PATCH",
4863
+ "path": "/customer/profile",
4864
+ "operationId": "patchCustomerProfile",
4865
+ "summary": "Update the buyer profile"
4866
+ },
4867
+ {
4868
+ "method": "POST",
4869
+ "path": "/customer/purchase-sessions",
4870
+ "operationId": "postCustomerPurchaseSessions",
4871
+ "summary": "Open the purchase session (only one live per buyer)"
4872
+ },
4873
+ {
4874
+ "method": "GET",
4875
+ "path": "/customer/purchase-sessions/{id}",
4876
+ "operationId": "getCustomerPurchaseSessionsId",
4877
+ "summary": "Purchase session status"
4878
+ },
4879
+ {
4880
+ "method": "POST",
4881
+ "path": "/customer/purchase-sessions/{id}/release",
4882
+ "operationId": "postCustomerPurchaseSessionsIdRelease",
4883
+ "summary": "Release the seats of a purchase session"
4884
+ },
4885
+ {
4886
+ "method": "POST",
4887
+ "path": "/customer/subscriptions",
4888
+ "operationId": "postCustomerSubscriptions",
4889
+ "summary": "Start a membership sign-up (returns the payment URL)"
4890
+ },
4891
+ {
4892
+ "method": "POST",
4893
+ "path": "/customer/subscriptions/cancel",
4894
+ "operationId": "postCustomerSubscriptionsCancel",
4895
+ "summary": "Cancel the buyer's own membership"
4896
+ },
4897
+ {
4898
+ "method": "GET",
4899
+ "path": "/customer/tickets",
4900
+ "operationId": "getCustomerTickets",
4901
+ "summary": "Buyer's tickets"
4902
+ },
4903
+ {
4904
+ "method": "GET",
4905
+ "path": "/customer/tickets/{id}",
4906
+ "operationId": "getCustomerTicketsId",
4907
+ "summary": "Detail of a buyer's ticket (deep link)"
4908
+ },
4909
+ {
4910
+ "method": "POST",
4911
+ "path": "/customer/tickets/{id}/cancel",
4912
+ "operationId": "postCustomerTicketsIdCancel",
4913
+ "summary": "Cancel the buyer's own purchase (only if not yet paid)"
4914
+ },
4915
+ {
4916
+ "method": "GET",
4917
+ "path": "/discounts",
4918
+ "operationId": "getDiscounts",
4919
+ "summary": "List workspace discount codes"
4920
+ },
4921
+ {
4922
+ "method": "POST",
4923
+ "path": "/discounts",
4924
+ "operationId": "postDiscounts",
4925
+ "summary": "Create a discount code"
4926
+ },
4927
+ {
4928
+ "method": "DELETE",
4929
+ "path": "/discounts/{id}",
4930
+ "operationId": "deleteDiscountsId",
4931
+ "summary": "Delete a discount code (soft delete)"
4932
+ },
4933
+ {
4934
+ "method": "PATCH",
4935
+ "path": "/discounts/{id}",
4936
+ "operationId": "patchDiscountsId",
4937
+ "summary": "Update a discount code"
4938
+ },
4939
+ {
4940
+ "method": "GET",
4941
+ "path": "/event-dates/{id}/access-close",
4942
+ "operationId": "getEventDatesIdAccessClose",
4943
+ "summary": "Live entry count and access-close status of an event date"
4944
+ },
4945
+ {
4946
+ "method": "POST",
4947
+ "path": "/event-dates/{id}/access-close",
4948
+ "operationId": "postEventDatesIdAccessClose",
4949
+ "summary": "Sign the access-close record of an event date (irreversible)"
4950
+ },
4951
+ {
4952
+ "method": "GET",
4953
+ "path": "/event-dates/{id}/courtesy-seats",
4954
+ "operationId": "getEventDatesIdCourtesySeats",
4955
+ "summary": "List blocked seats that can be issued as courtesies"
4956
+ },
4957
+ {
4958
+ "method": "GET",
4959
+ "path": "/events",
4960
+ "operationId": "getEvents",
4961
+ "summary": "List workspace events"
4962
+ },
4963
+ {
4964
+ "method": "POST",
4965
+ "path": "/events",
4966
+ "operationId": "postEvents",
4967
+ "summary": "Create an event"
4968
+ },
4969
+ {
4970
+ "method": "DELETE",
4971
+ "path": "/events/{id}",
4972
+ "operationId": "deleteEventsId",
4973
+ "summary": "Delete an event (soft delete)"
4974
+ },
4975
+ {
4976
+ "method": "GET",
4977
+ "path": "/events/{id}",
4978
+ "operationId": "getEventsId",
4979
+ "summary": "Get an event"
4980
+ },
4981
+ {
4982
+ "method": "PATCH",
4983
+ "path": "/events/{id}",
4984
+ "operationId": "patchEventsId",
4985
+ "summary": "Update an event"
4986
+ },
4987
+ {
4988
+ "method": "GET",
4989
+ "path": "/events/{id}/artist-invitations",
4990
+ "operationId": "getEventsIdArtistInvitations",
4991
+ "summary": "List artist invitations of an event"
4992
+ },
4993
+ {
4994
+ "method": "DELETE",
4995
+ "path": "/events/{id}/artist-invitations/{invitationId}",
4996
+ "operationId": "deleteEventsIdArtistInvitationsInvitationId",
4997
+ "summary": "Cancel an artist invitation"
4998
+ },
4999
+ {
5000
+ "method": "POST",
5001
+ "path": "/events/{id}/artist-invitations/{invitationId}/resend",
5002
+ "operationId": "postEventsIdArtistInvitationsInvitationIdResend",
5003
+ "summary": "Resend an artist invitation"
5004
+ },
5005
+ {
5006
+ "method": "PUT",
5007
+ "path": "/events/{id}/artists",
5008
+ "operationId": "putEventsIdArtists",
5009
+ "summary": "Replace the event lineup"
5010
+ },
5011
+ {
5012
+ "method": "DELETE",
5013
+ "path": "/events/{id}/artists/{organizationId}",
5014
+ "operationId": "deleteEventsIdArtistsOrganizationId",
5015
+ "summary": "Unlink an artist from an event"
5016
+ },
5017
+ {
5018
+ "method": "POST",
5019
+ "path": "/events/{id}/cancel",
5020
+ "operationId": "postEventsIdCancel",
5021
+ "summary": "Cancel an event (keeps the record and its sales)"
5022
+ },
5023
+ {
5024
+ "method": "GET",
5025
+ "path": "/events/{id}/dates",
5026
+ "operationId": "getEventsIdDates",
5027
+ "summary": "List an event's dates"
5028
+ },
5029
+ {
5030
+ "method": "POST",
5031
+ "path": "/events/{id}/dates",
5032
+ "operationId": "postEventsIdDates",
5033
+ "summary": "Add a date to an event"
5034
+ },
5035
+ {
5036
+ "method": "DELETE",
5037
+ "path": "/events/{id}/dates/{dateId}",
5038
+ "operationId": "deleteEventsIdDatesDateId",
5039
+ "summary": "Delete an event date"
5040
+ },
5041
+ {
5042
+ "method": "PATCH",
5043
+ "path": "/events/{id}/dates/{dateId}",
5044
+ "operationId": "patchEventsIdDatesDateId",
5045
+ "summary": "Update an event date"
5046
+ },
5047
+ {
5048
+ "method": "POST",
5049
+ "path": "/events/{id}/publish",
5050
+ "operationId": "postEventsIdPublish",
5051
+ "summary": "Publish an event"
5052
+ },
5053
+ {
5054
+ "method": "DELETE",
5055
+ "path": "/events/{id}/schedule",
5056
+ "operationId": "deleteEventsIdSchedule",
5057
+ "summary": "Cancel a scheduled publication"
5058
+ },
5059
+ {
5060
+ "method": "POST",
5061
+ "path": "/events/{id}/schedule",
5062
+ "operationId": "postEventsIdSchedule",
5063
+ "summary": "Schedule a draft event"
5064
+ },
5065
+ {
5066
+ "method": "GET",
5067
+ "path": "/events/{id}/validators",
5068
+ "operationId": "getEventsIdValidators",
5069
+ "summary": "List the ticket validators of an event"
5070
+ },
5071
+ {
5072
+ "method": "POST",
5073
+ "path": "/events/{id}/validators",
5074
+ "operationId": "postEventsIdValidators",
5075
+ "summary": "Add a ticket validator to an event"
5076
+ },
5077
+ {
5078
+ "method": "GET",
5079
+ "path": "/events/{id}/viewers",
5080
+ "operationId": "getEventsIdViewers",
5081
+ "summary": "List read-only viewers of an event"
5082
+ },
5083
+ {
5084
+ "method": "POST",
5085
+ "path": "/events/{id}/viewers",
5086
+ "operationId": "postEventsIdViewers",
5087
+ "summary": "Grant read-only access to an event's statistics"
5088
+ },
5089
+ {
5090
+ "method": "DELETE",
5091
+ "path": "/events/{id}/viewers/{viewerId}",
5092
+ "operationId": "deleteEventsIdViewersViewerId",
5093
+ "summary": "Revoke a read-only viewer of an event"
5094
+ },
5095
+ {
5096
+ "method": "GET",
5097
+ "path": "/master-qrs",
5098
+ "operationId": "getMasterQrs",
5099
+ "summary": "List the master box-office QR codes"
5100
+ },
5101
+ {
5102
+ "method": "POST",
5103
+ "path": "/master-qrs",
5104
+ "operationId": "postMasterQrs",
5105
+ "summary": "Create a master box-office QR code"
5106
+ },
5107
+ {
5108
+ "method": "DELETE",
5109
+ "path": "/master-qrs/{id}",
5110
+ "operationId": "deleteMasterQrsId",
5111
+ "summary": "Delete a master box-office QR code"
5112
+ },
5113
+ {
5114
+ "method": "PATCH",
5115
+ "path": "/master-qrs/{id}",
5116
+ "operationId": "patchMasterQrsId",
5117
+ "summary": "Update a master box-office QR code"
5118
+ },
5119
+ {
5120
+ "method": "PUT",
5121
+ "path": "/master-qrs/{id}/active",
5122
+ "operationId": "putMasterQrsIdActive",
5123
+ "summary": "Activate or deactivate a master box-office QR code"
5124
+ },
5125
+ {
5126
+ "method": "GET",
5127
+ "path": "/me",
5128
+ "operationId": "getMe",
5129
+ "summary": "Authenticated user, role and accessible workspaces"
5130
+ },
5131
+ {
5132
+ "method": "GET",
5133
+ "path": "/membership-plans",
5134
+ "operationId": "getMembershipPlans",
5135
+ "summary": "List the workspace's membership plans"
5136
+ },
5137
+ {
5138
+ "method": "POST",
5139
+ "path": "/membership-plans",
5140
+ "operationId": "postMembershipPlans",
5141
+ "summary": "Create a membership plan"
5142
+ },
5143
+ {
5144
+ "method": "DELETE",
5145
+ "path": "/membership-plans/{id}",
5146
+ "operationId": "deleteMembershipPlansId",
5147
+ "summary": "Delete a membership plan (soft delete)"
5148
+ },
5149
+ {
5150
+ "method": "GET",
5151
+ "path": "/membership-plans/{id}",
5152
+ "operationId": "getMembershipPlansId",
5153
+ "summary": "Get a membership plan"
5154
+ },
5155
+ {
5156
+ "method": "PATCH",
5157
+ "path": "/membership-plans/{id}",
5158
+ "operationId": "patchMembershipPlansId",
5159
+ "summary": "Update a membership plan"
5160
+ },
5161
+ {
5162
+ "method": "GET",
5163
+ "path": "/membership-plans/{id}/subscribers",
5164
+ "operationId": "getMembershipPlansIdSubscribers",
5165
+ "summary": "List subscribers of a membership plan"
5166
+ },
5167
+ {
5168
+ "method": "GET",
5169
+ "path": "/merch/catalog",
5170
+ "operationId": "getMerchCatalog",
5171
+ "summary": "Merch store catalog of the key's brand"
5172
+ },
5173
+ {
5174
+ "method": "POST",
5175
+ "path": "/merch/discount-codes/preview",
5176
+ "operationId": "postMerchDiscountCodesPreview",
5177
+ "summary": "Preview what a merch discount code takes off"
5178
+ },
5179
+ {
5180
+ "method": "POST",
5181
+ "path": "/merch/orders",
5182
+ "operationId": "postMerchOrders",
5183
+ "summary": "Create a merch order and reserve its stock"
5184
+ },
5185
+ {
5186
+ "method": "POST",
5187
+ "path": "/merch/orders/{code}/payment/card",
5188
+ "operationId": "postMerchOrdersCodePaymentCard",
5189
+ "summary": "Charge a merch order with the Payment Brick token"
5190
+ },
5191
+ {
5192
+ "method": "POST",
5193
+ "path": "/merch/orders/lookup",
5194
+ "operationId": "postMerchOrdersLookup",
5195
+ "summary": "Look up one of the session buyer's merch orders by code"
5196
+ },
5197
+ {
5198
+ "method": "GET",
5199
+ "path": "/merch/products",
5200
+ "operationId": "getMerchProducts",
5201
+ "summary": "List the merch store's products (all statuses)"
5202
+ },
5203
+ {
5204
+ "method": "POST",
5205
+ "path": "/merch/products",
5206
+ "operationId": "postMerchProducts",
5207
+ "summary": "Create a merch product with its options and variants"
5208
+ },
5209
+ {
5210
+ "method": "PUT",
5211
+ "path": "/merch/products/{id}/images",
5212
+ "operationId": "putMerchProductsIdImages",
5213
+ "summary": "Set the ordered photos of a merch product"
5214
+ },
5215
+ {
5216
+ "method": "PATCH",
5217
+ "path": "/merch/products/{id}/status",
5218
+ "operationId": "patchMerchProductsIdStatus",
5219
+ "summary": "Publish or unpublish a merch product"
5220
+ },
5221
+ {
5222
+ "method": "POST",
5223
+ "path": "/merch/products/images/upload-url",
5224
+ "operationId": "postMerchProductsImagesUploadUrl",
5225
+ "summary": "Get a signed upload URL for a merch product photo"
5226
+ },
5227
+ {
5228
+ "method": "PATCH",
5229
+ "path": "/organization",
5230
+ "operationId": "patchOrganization",
5231
+ "summary": "Update the organization's public identity"
5232
+ },
5233
+ {
5234
+ "method": "PATCH",
5235
+ "path": "/organization/analytics",
5236
+ "operationId": "patchOrganizationAnalytics",
5237
+ "summary": "Set the organization's GA4 property"
5238
+ },
5239
+ {
5240
+ "method": "GET",
5241
+ "path": "/organization/profile",
5242
+ "operationId": "getOrganizationProfile",
5243
+ "summary": "Get the workspace profile"
5244
+ },
5245
+ {
5246
+ "method": "PATCH",
5247
+ "path": "/organization/profile",
5248
+ "operationId": "patchOrganizationProfile",
5249
+ "summary": "Update the workspace profile"
5250
+ },
5251
+ {
5252
+ "method": "GET",
5253
+ "path": "/payment-intents",
5254
+ "operationId": "getPaymentIntents",
5255
+ "summary": "Purchase intents of an event (checkout funnel and abandoned journeys)"
5256
+ },
5257
+ {
5258
+ "method": "DELETE",
5259
+ "path": "/presale-windows/{id}",
5260
+ "operationId": "deletePresaleWindowsId",
5261
+ "summary": "Delete a presale window"
5262
+ },
5263
+ {
5264
+ "method": "PATCH",
5265
+ "path": "/presale-windows/{id}",
5266
+ "operationId": "patchPresaleWindowsId",
5267
+ "summary": "Update a presale window"
5268
+ },
5269
+ {
5270
+ "method": "GET",
5271
+ "path": "/products",
5272
+ "operationId": "getProducts",
5273
+ "summary": "List digital products and courses"
5274
+ },
5275
+ {
5276
+ "method": "POST",
5277
+ "path": "/products",
5278
+ "operationId": "postProducts",
5279
+ "summary": "Create a digital product or course"
5280
+ },
5281
+ {
5282
+ "method": "DELETE",
5283
+ "path": "/products/{id}",
5284
+ "operationId": "deleteProductsId",
5285
+ "summary": "Delete a digital product or course"
5286
+ },
5287
+ {
5288
+ "method": "GET",
5289
+ "path": "/products/{id}",
5290
+ "operationId": "getProductsId",
5291
+ "summary": "Get a digital product or course"
5292
+ },
5293
+ {
5294
+ "method": "PATCH",
5295
+ "path": "/products/{id}",
5296
+ "operationId": "patchProductsId",
5297
+ "summary": "Update a digital product or course"
5298
+ },
5299
+ {
5300
+ "method": "POST",
5301
+ "path": "/products/{id}/status",
5302
+ "operationId": "postProductsIdStatus",
5303
+ "summary": "Publish or unpublish a digital product or course"
5304
+ },
5305
+ {
5306
+ "method": "GET",
5307
+ "path": "/raffles/{slug}",
5308
+ "operationId": "getRafflesSlug",
5309
+ "summary": "Raffle form definition for an enterprise landing"
5310
+ },
5311
+ {
5312
+ "method": "POST",
5313
+ "path": "/raffles/{slug}/entries",
5314
+ "operationId": "postRafflesSlugEntries",
5315
+ "summary": "Enter a raffle from an enterprise landing (anonymous)"
5316
+ },
5317
+ {
5318
+ "method": "GET",
5319
+ "path": "/reports/by-event",
5320
+ "operationId": "getReportsByEvent",
5321
+ "summary": "Sales KPIs per workspace event"
5322
+ },
5323
+ {
5324
+ "method": "GET",
5325
+ "path": "/reports/exports/attendees",
5326
+ "operationId": "getReportsExportsAttendees",
5327
+ "summary": "Export attendees per ticket, with filters (max 5000)"
5328
+ },
5329
+ {
5330
+ "method": "GET",
5331
+ "path": "/reports/exports/buyers",
5332
+ "operationId": "getReportsExportsBuyers",
5333
+ "summary": "Export buyers, with filters (max 5000)"
5334
+ },
5335
+ {
5336
+ "method": "GET",
5337
+ "path": "/reports/exports/reconciliation",
5338
+ "operationId": "getReportsExportsReconciliation",
5339
+ "summary": "CSV export of the CFO financial reconciliation"
5340
+ },
5341
+ {
5342
+ "method": "GET",
5343
+ "path": "/reports/exports/subscribers",
5344
+ "operationId": "getReportsExportsSubscribers",
5345
+ "summary": "Export subscribers (max 5000)"
5346
+ },
5347
+ {
5348
+ "method": "GET",
5349
+ "path": "/reports/financials",
5350
+ "operationId": "getReportsFinancials",
5351
+ "summary": "Financial statement per event date: gross, costs, and net payable"
5352
+ },
5353
+ {
5354
+ "method": "GET",
5355
+ "path": "/reports/inventory",
5356
+ "operationId": "getReportsInventory",
5357
+ "summary": "Inventory aggregated by event/date/ticket type (capacity, sold, available)"
5358
+ },
5359
+ {
5360
+ "method": "GET",
5361
+ "path": "/reports/live-attendance",
5362
+ "operationId": "getReportsLiveAttendance",
5363
+ "summary": "Events happening right now, with check-in progress"
5364
+ },
5365
+ {
5366
+ "method": "GET",
5367
+ "path": "/reports/reconciliation",
5368
+ "operationId": "getReportsReconciliation",
5369
+ "summary": "CFO financial reconciliation (MP \u2194 sale \u2194 Siigo invoice)"
5370
+ },
5371
+ {
5372
+ "method": "GET",
5373
+ "path": "/reports/summary",
5374
+ "operationId": "getReportsSummary",
5375
+ "summary": "Workspace KPIs (revenue, tickets, sales, memberships)"
5376
+ },
5377
+ {
5378
+ "method": "GET",
5379
+ "path": "/reports/timeseries",
5380
+ "operationId": "getReportsTimeseries",
5381
+ "summary": "Time series of CONFIRMED sales per bucket (day|week|month)"
5382
+ },
5383
+ {
5384
+ "method": "GET",
5385
+ "path": "/sales",
5386
+ "operationId": "getSales",
5387
+ "summary": "List workspace sales"
5388
+ },
5389
+ {
5390
+ "method": "POST",
5391
+ "path": "/sales",
5392
+ "operationId": "postSales",
5393
+ "summary": "Create a sale/order (complimentary tickets and programmatic sales)"
5394
+ },
5395
+ {
5396
+ "method": "GET",
5397
+ "path": "/sales/{id}",
5398
+ "operationId": "getSalesId",
5399
+ "summary": "Get a sale with its items"
5400
+ },
5401
+ {
5402
+ "method": "POST",
5403
+ "path": "/sales/{id}/abandon",
5404
+ "operationId": "postSalesIdAbandon",
5405
+ "summary": "Mark a pending sale as abandoned (releases its stock)"
5406
+ },
5407
+ {
5408
+ "method": "GET",
5409
+ "path": "/sales/{id}/attempts",
5410
+ "operationId": "getSalesIdAttempts",
5411
+ "summary": "List a sale's payment attempt history"
5412
+ },
5413
+ {
5414
+ "method": "POST",
5415
+ "path": "/sales/{id}/cancel",
5416
+ "operationId": "postSalesIdCancel",
5417
+ "summary": "Cancel a sale (blocked if someone already checked in or the payment is still open)"
5418
+ },
5419
+ {
5420
+ "method": "POST",
5421
+ "path": "/sales/{id}/items/{itemId}/transfer",
5422
+ "operationId": "postSalesIdItemsItemIdTransfer",
5423
+ "summary": "Transfer one ticket of a sale to another person (destructive)"
5424
+ },
5425
+ {
5426
+ "method": "PATCH",
5427
+ "path": "/sales/{id}/recipient",
5428
+ "operationId": "patchSalesIdRecipient",
5429
+ "summary": "Correct the recipient of a courtesy sale and resend its tickets"
5430
+ },
5431
+ {
5432
+ "method": "POST",
5433
+ "path": "/sales/{id}/refund",
5434
+ "operationId": "postSalesIdRefund",
5435
+ "summary": "Refund a sale (moving the funds depends on the payment gateway)"
5436
+ },
5437
+ {
5438
+ "method": "GET",
5439
+ "path": "/sales/{id}/tickets",
5440
+ "operationId": "getSalesIdTickets",
5441
+ "summary": "List the individual tickets of a sale"
5442
+ },
5443
+ {
5444
+ "method": "GET",
5445
+ "path": "/settlements",
5446
+ "operationId": "getSettlements",
5447
+ "summary": "Workspace settlements (payouts to the organizer)"
5448
+ },
5449
+ {
5450
+ "method": "GET",
5451
+ "path": "/settlements/{id}",
5452
+ "operationId": "getSettlementsId",
5453
+ "summary": "Get a settlement"
5454
+ },
5455
+ {
5456
+ "method": "GET",
5457
+ "path": "/settlements/{id}/document",
5458
+ "operationId": "getSettlementsIdDocument",
5459
+ "summary": "Download a settlement PDF"
5460
+ },
5461
+ {
5462
+ "method": "GET",
5463
+ "path": "/settlements/{id}/proofs/{fileName}",
5464
+ "operationId": "getSettlementsIdProofsFileName",
5465
+ "summary": "Download a settlement payment proof"
5466
+ },
5467
+ {
5468
+ "method": "GET",
5469
+ "path": "/site",
5470
+ "operationId": "getSite",
5471
+ "summary": "Get the workspace's own headless site configuration"
5472
+ },
5473
+ {
5474
+ "method": "GET",
5475
+ "path": "/staff",
5476
+ "operationId": "getStaff",
5477
+ "summary": "List staff with access to the workspace"
5478
+ },
5479
+ {
5480
+ "method": "POST",
5481
+ "path": "/staff",
5482
+ "operationId": "postStaff",
5483
+ "summary": "Create a staff user in the workspace"
5484
+ },
5485
+ {
5486
+ "method": "DELETE",
5487
+ "path": "/staff/{id}",
5488
+ "operationId": "deleteStaffId",
5489
+ "summary": "Revoke a staff member's access to this workspace"
5490
+ },
5491
+ {
5492
+ "method": "GET",
5493
+ "path": "/staff/{id}",
5494
+ "operationId": "getStaffId",
5495
+ "summary": "Get a staff member"
5496
+ },
5497
+ {
5498
+ "method": "PUT",
5499
+ "path": "/staff/{id}/access",
5500
+ "operationId": "putStaffIdAccess",
5501
+ "summary": "Replace a staff member's access in this workspace"
5502
+ },
5503
+ {
5504
+ "method": "POST",
5505
+ "path": "/staff/{id}/resend-invite",
5506
+ "operationId": "postStaffIdResendInvite",
5507
+ "summary": "Resend a staff member's invitation email"
5508
+ },
5509
+ {
5510
+ "method": "PATCH",
5511
+ "path": "/staff/{id}/role",
5512
+ "operationId": "patchStaffIdRole",
5513
+ "summary": "Change a staff user's role"
5514
+ },
5515
+ {
5516
+ "method": "POST",
5517
+ "path": "/subscriptions/{id}/cancel",
5518
+ "operationId": "postSubscriptionsIdCancel",
5519
+ "summary": "Cancel a membership subscription"
5520
+ },
5521
+ {
5522
+ "method": "GET",
5523
+ "path": "/ticket-templates",
5524
+ "operationId": "getTicketTemplates",
5525
+ "summary": "List the ticket templates"
5526
+ },
5527
+ {
5528
+ "method": "POST",
5529
+ "path": "/ticket-templates",
5530
+ "operationId": "postTicketTemplates",
5531
+ "summary": "Create a ticket template"
5532
+ },
5533
+ {
5534
+ "method": "DELETE",
5535
+ "path": "/ticket-templates/{id}",
5536
+ "operationId": "deleteTicketTemplatesId",
5537
+ "summary": "Delete a ticket template"
5538
+ },
5539
+ {
5540
+ "method": "PATCH",
5541
+ "path": "/ticket-templates/{id}",
5542
+ "operationId": "patchTicketTemplatesId",
5543
+ "summary": "Update a ticket template"
5544
+ },
5545
+ {
5546
+ "method": "POST",
5547
+ "path": "/ticket-templates/{id}/instantiate",
5548
+ "operationId": "postTicketTemplatesIdInstantiate",
5549
+ "summary": "Create a ticket type from a template"
5550
+ },
5551
+ {
5552
+ "method": "GET",
5553
+ "path": "/ticket-types",
5554
+ "operationId": "getTicketTypes",
5555
+ "summary": "List workspace ticket types"
5556
+ },
5557
+ {
5558
+ "method": "POST",
5559
+ "path": "/ticket-types",
5560
+ "operationId": "postTicketTypes",
5561
+ "summary": "Create a ticket type"
5562
+ },
5563
+ {
5564
+ "method": "DELETE",
5565
+ "path": "/ticket-types/{id}",
5566
+ "operationId": "deleteTicketTypesId",
5567
+ "summary": "Delete a ticket type (soft delete)"
5568
+ },
5569
+ {
5570
+ "method": "GET",
5571
+ "path": "/ticket-types/{id}",
5572
+ "operationId": "getTicketTypesId",
5573
+ "summary": "Get a ticket type"
5574
+ },
5575
+ {
5576
+ "method": "PATCH",
5577
+ "path": "/ticket-types/{id}",
5578
+ "operationId": "patchTicketTypesId",
5579
+ "summary": "Update a ticket type"
5580
+ },
5581
+ {
5582
+ "method": "GET",
5583
+ "path": "/ticket-types/{id}/presale-windows",
5584
+ "operationId": "getTicketTypesIdPresaleWindows",
5585
+ "summary": "List a ticket type's presale windows"
5586
+ },
5587
+ {
5588
+ "method": "POST",
5589
+ "path": "/ticket-types/{id}/presale-windows",
5590
+ "operationId": "postTicketTypesIdPresaleWindows",
5591
+ "summary": "Create a presale window"
5592
+ },
5593
+ {
5594
+ "method": "PATCH",
5595
+ "path": "/tickets/{ticketCode}",
5596
+ "operationId": "patchTicketsTicketCode",
5597
+ "summary": "Reassign a sold ticket to another date or ticket type"
5598
+ },
5599
+ {
5600
+ "method": "GET",
5601
+ "path": "/tickets/{ticketCode}/access",
5602
+ "operationId": "getTicketsTicketCodeAccess",
5603
+ "summary": "Check a ticket's validity without consuming it"
5604
+ },
5605
+ {
5606
+ "method": "DELETE",
5607
+ "path": "/tickets/{ticketCode}/checkin",
5608
+ "operationId": "deleteTicketsTicketCodeCheckin",
5609
+ "summary": "Undo a ticket check-in (destructive)"
5610
+ },
5611
+ {
5612
+ "method": "POST",
5613
+ "path": "/tickets/{ticketCode}/checkin",
5614
+ "operationId": "postTicketsTicketCodeCheckin",
5615
+ "summary": "Check in a ticket at the door"
5616
+ },
5617
+ {
5618
+ "method": "POST",
5619
+ "path": "/tickets/{ticketCode}/resend",
5620
+ "operationId": "postTicketsTicketCodeResend",
5621
+ "summary": "Resend the confirmation email with the ticket"
5622
+ },
5623
+ {
5624
+ "method": "GET",
5625
+ "path": "/venues",
5626
+ "operationId": "getVenues",
5627
+ "summary": "List workspace venues"
5628
+ },
5629
+ {
5630
+ "method": "POST",
5631
+ "path": "/venues",
5632
+ "operationId": "postVenues",
5633
+ "summary": "Create a venue"
5634
+ },
5635
+ {
5636
+ "method": "DELETE",
5637
+ "path": "/venues/{id}",
5638
+ "operationId": "deleteVenuesId",
5639
+ "summary": "Delete a venue (soft delete)"
5640
+ },
5641
+ {
5642
+ "method": "GET",
5643
+ "path": "/venues/{id}",
5644
+ "operationId": "getVenuesId",
5645
+ "summary": "Get a venue"
5646
+ },
5647
+ {
5648
+ "method": "PATCH",
5649
+ "path": "/venues/{id}",
5650
+ "operationId": "patchVenuesId",
5651
+ "summary": "Update a venue"
5652
+ },
5653
+ {
5654
+ "method": "GET",
5655
+ "path": "/waitlist",
5656
+ "operationId": "getWaitlist",
5657
+ "summary": "List the waitlist entries of the workspace"
5658
+ },
5659
+ {
5660
+ "method": "POST",
5661
+ "path": "/waitlist",
5662
+ "operationId": "postWaitlist",
5663
+ "summary": "Join the per-city waitlist of an enterprise landing"
5664
+ },
5665
+ {
5666
+ "method": "GET",
5667
+ "path": "/webhooks",
5668
+ "operationId": "getWebhooks",
5669
+ "summary": "List workspace webhooks"
5670
+ },
5671
+ {
5672
+ "method": "POST",
5673
+ "path": "/webhooks",
5674
+ "operationId": "postWebhooks",
5675
+ "summary": "Create a webhook (returns the signingSecret only once)"
5676
+ },
5677
+ {
5678
+ "method": "DELETE",
5679
+ "path": "/webhooks/{id}",
5680
+ "operationId": "deleteWebhooksId",
5681
+ "summary": "Delete a workspace webhook"
5682
+ },
5683
+ {
5684
+ "method": "PATCH",
5685
+ "path": "/webhooks/{id}",
5686
+ "operationId": "patchWebhooksId",
5687
+ "summary": "Edit a webhook without rotating its signing secret"
5688
+ },
5689
+ {
5690
+ "method": "GET",
5691
+ "path": "/website",
5692
+ "operationId": "getWebsite",
5693
+ "summary": "Get the workspace website configuration"
5694
+ },
5695
+ {
5696
+ "method": "PUT",
5697
+ "path": "/website",
5698
+ "operationId": "putWebsite",
5699
+ "summary": "Save the workspace website configuration"
5700
+ },
5701
+ {
5702
+ "method": "PUT",
5703
+ "path": "/website/published",
5704
+ "operationId": "putWebsitePublished",
5705
+ "summary": "Publish or unpublish the public profile"
5706
+ },
5707
+ {
5708
+ "method": "POST",
5709
+ "path": "/workspaces",
5710
+ "operationId": "postWorkspaces",
5711
+ "summary": "Create your own workspace/tenant (self-serve)"
5712
+ }
5713
+ ];
5714
+
5715
+ // src/commands/api.ts
5716
+ function templateRegex(template) {
5717
+ const body = template.split(/\{[^}]+\}/).map((part) => part.replace(/[.*+?^$()|[\]\\]/g, "\\$&")).join("[^/]+");
5718
+ return new RegExp(`^${body}$`);
5719
+ }
5720
+ function specificity(template) {
5721
+ return template.split("/").map((seg) => seg.startsWith("{") ? "1" : "0").join("");
5722
+ }
5723
+ function matchRoute(method, path, routes = ROUTES) {
5724
+ const hits = routes.filter((r) => templateRegex(r.path).test(path)).sort((a, b) => specificity(a.path).localeCompare(specificity(b.path)));
5725
+ const best = hits[0]?.path;
5726
+ const sameTemplate = hits.filter((r) => r.path === best);
5727
+ return {
5728
+ route: sameTemplate.find((r) => r.method === method),
5729
+ allowed: sameTemplate.map((r) => r.method)
5730
+ };
5731
+ }
5732
+ function splitPath(input) {
5733
+ const [rawPath = "", rawQuery = ""] = input.split("?", 2);
5734
+ let path = rawPath.startsWith("/") ? rawPath : `/${rawPath}`;
5735
+ path = path.replace(/^\/api\/v1(?=\/)/, "").replace(/\/+$/, "") || "/";
5736
+ return { path, query: new URLSearchParams(rawQuery) };
5737
+ }
5738
+ function collect(value, previous = []) {
5739
+ return [...previous, value];
5740
+ }
5741
+ function parsePair(raw, sep, flag) {
5742
+ const i = raw.indexOf(sep);
5743
+ if (i <= 0) fail(`Invalid ${flag} "${raw}". Use name${sep}value.`);
5744
+ return [raw.slice(0, i).trim(), raw.slice(i + 1).trim()];
5745
+ }
5746
+ function printRoutes(filter, json) {
5747
+ const needle = filter?.toLowerCase();
5748
+ const rows = ROUTES.filter(
5749
+ (r) => !needle || `${r.method} ${r.path} ${r.operationId} ${r.summary}`.toLowerCase().includes(needle)
5750
+ );
5751
+ print(
5752
+ rows.map(({ method, path, operationId }) => ({
5753
+ method,
5754
+ path,
5755
+ operationId
5756
+ })),
5757
+ { json }
5758
+ );
5759
+ console.error(
5760
+ `(B2B contract ${CONTRACT_VERSION}: ${rows.length} operations)`
5761
+ );
5762
+ }
5763
+ function registerApi(program2) {
5764
+ program2.command("api").description(
5765
+ "Call any operation of the B2B contract (/api/v1) with your credentials"
5766
+ ).argument("[method]", "GET, POST, PUT, PATCH or DELETE").argument("[path]", "path under /api/v1, e.g. /raffles/my-raffle").option("--list", "list the contract's operations ([method] filters them)").option("-q, --query <name=value>", "query parameter (repeatable)", collect).option(
5767
+ "-H, --header <name:value>",
5768
+ "extra header, e.g. Idempotency-Key or X-Customer-Session (repeatable)",
5769
+ collect
5770
+ ).option("-d, --data <json>", "JSON body: inline or @path/to/file.json").option("--workspace <id>", "act on this workspace").option("--yes", "skip the confirmation for writes").option("--json", "JSON output for --list (responses are always JSON)").addHelpText(
5771
+ "after",
5772
+ `
5773
+ Examples:
5774
+ ft api --list raffles
5775
+ ft api GET /raffles/my-raffle
5776
+ ft api GET /sales -q status=CONFIRMED -q limit=50
5777
+ ft api POST /venues -d '{"name":"Teatro","address":"Cra 7","city":"Bogot\xE1","country":"CO"}'
5778
+
5779
+ Prints the response body as JSON (text bodies such as CSV as-is). A 302 to a
5780
+ signed download prints { "url": \u2026 }. Errors exit 1 with the API's code.`
5781
+ ).action(
5782
+ async (methodArg, pathArg, opts) => {
5783
+ if (opts.list) return printRoutes(methodArg, opts.json);
5784
+ if (!methodArg || !pathArg)
5785
+ fail(
5786
+ "Usage: ft api <method> <path>",
5787
+ "See every operation with `ft api --list [filter]`."
5788
+ );
5789
+ const method = methodArg.toUpperCase();
5790
+ const { path, query } = splitPath(pathArg);
5791
+ for (const q of opts.query ?? []) {
5792
+ const [k, v] = parsePair(q, "=", "--query");
5793
+ query.append(k, v);
5794
+ }
5795
+ const { route, allowed } = matchRoute(method, path);
5796
+ if (!route)
5797
+ fail(
5798
+ allowed.length ? `${path} does not accept ${method} (it accepts ${allowed.join(", ")}).` : `${method} ${path} is not in the B2B contract ${CONTRACT_VERSION}.`,
5799
+ "See every operation with `ft api --list [filter]`."
5800
+ );
5801
+ const body = opts.data !== void 0 ? parseData(opts.data) : void 0;
5802
+ const headers = {};
5803
+ for (const h of opts.header ?? []) {
5804
+ const [k, v] = parsePair(h, ":", "--header");
5805
+ headers[k] = v;
5806
+ }
5807
+ configureClient(opts.workspace);
5808
+ const cfg = client.getConfig();
5809
+ const ws = cfg.headers?.["X-Workspace-Id"];
5810
+ if (method !== "GET")
5811
+ await confirmOrExit(
5812
+ `${method} ${path} (${route.operationId})${ws ? ` on workspace ${ws}` : ""}?`,
5813
+ opts.yes
5814
+ );
5815
+ const qs = query.toString();
5816
+ const res = await fetch(`${cfg.baseUrl}${path}${qs ? `?${qs}` : ""}`, {
5817
+ method,
5818
+ redirect: "manual",
5819
+ headers: {
5820
+ ...cfg.headers,
5821
+ ...body !== void 0 ? { "Content-Type": "application/json" } : {},
5822
+ ...headers
5823
+ },
5824
+ body: body !== void 0 ? JSON.stringify(body) : void 0
5825
+ });
5826
+ const location = res.headers.get("location");
5827
+ if (res.status >= 300 && res.status < 400 && location)
5828
+ return print({ url: location }, { json: true });
5829
+ const text = await res.text();
5830
+ const isJson = res.headers.get("content-type")?.includes("json");
5831
+ const parsed = isJson && text ? JSON.parse(text) : void 0;
5832
+ if (!res.ok) unwrap({ data: void 0, error: parsed, response: res });
5833
+ if (parsed !== void 0) print(parsed, { json: true });
5834
+ else if (text)
5835
+ process.stdout.write(text.endsWith("\n") ? text : `${text}
5836
+ `);
5837
+ }
5838
+ );
5839
+ }
5840
+
4266
5841
  // src/commands/api-keys.ts
4267
5842
  import chalk8 from "chalk";
4268
5843
  var COLUMNS = [
@@ -4745,7 +6320,7 @@ function summarize(p) {
4745
6320
  price: prices.length === 0 ? null : min === max ? min : `${min}-${max}`
4746
6321
  };
4747
6322
  }
4748
- var collect = (value, prev = []) => [...prev, value];
6323
+ var collect2 = (value, prev = []) => [...prev, value];
4749
6324
  function intFlag(name) {
4750
6325
  return (value) => {
4751
6326
  const n = Number(value);
@@ -4787,7 +6362,7 @@ function registerMerch(program2, deps = sdkDeps) {
4787
6362
  ).option("--slug <slug>", "URL slug (default: from the name)").option(
4788
6363
  "--image <path>",
4789
6364
  "local photo, repeatable (first = cover)",
4790
- collect
6365
+ collect2
4791
6366
  ).option("--publish", "publish right after creating").option("--from-json <file>", "create several products from a JSON file").option("--workspace <id>", "workspace override").option("--json", "raw JSON output").action(async (opts) => {
4792
6367
  let specs;
4793
6368
  try {
@@ -4845,7 +6420,7 @@ ${failed.map((f) => ` \xB7 [${f.step}] ${f.error}`).join("\n")}`
4845
6420
  ).requiredOption(
4846
6421
  "--image <path>",
4847
6422
  "local photo, repeatable (first = cover)",
4848
- collect
6423
+ collect2
4849
6424
  ).option("--workspace <id>", "workspace override").option("--json", "raw JSON output").action(async (id, opts) => {
4850
6425
  const paths = opts.image;
4851
6426
  try {
@@ -5765,11 +7340,17 @@ registerResource(program, {
5765
7340
  describe: "Courtesy invitation requests of an enterprise landing",
5766
7341
  create: postCourtesyRequests
5767
7342
  });
7343
+ registerResource(program, {
7344
+ name: "raffles",
7345
+ describe: "Raffle and sign-up form definitions of an enterprise landing",
7346
+ get: (opts) => getRafflesSlug({ path: { slug: opts.path.id } })
7347
+ });
5768
7348
  registerMerch(program);
5769
7349
  registerTickets(program);
5770
7350
  registerReports(program);
5771
7351
  registerApiKeys(program);
5772
7352
  registerAdmin(program);
7353
+ registerApi(program);
5773
7354
  function addAccountOption(cmd) {
5774
7355
  if (cmd.name() === "admin") return;
5775
7356
  const longs = cmd.options.map((o) => o.long);