@go-labs-sg/gosh 0.1.0 → 0.3.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 (2) hide show
  1. package/dist/index.js +566 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -14950,7 +14950,7 @@ var logoutCliSession = async ({
14950
14950
  };
14951
14951
  // src/api-client.ts
14952
14952
  import {
14953
- createTRPCUntypedClient,
14953
+ createTRPCProxyClient,
14954
14954
  httpBatchLink,
14955
14955
  httpSubscriptionLink,
14956
14956
  loggerLink,
@@ -15325,7 +15325,7 @@ var createGoshClient = ({
15325
15325
  "x-trpc-source": "gosh-cli",
15326
15326
  ...accessToken ? { Authorization: `Bearer ${accessToken}` } : {}
15327
15327
  });
15328
- const client = createTRPCUntypedClient({
15328
+ return createTRPCProxyClient({
15329
15329
  links: [
15330
15330
  loggerLink({
15331
15331
  enabled: () => debug && !quiet,
@@ -15352,17 +15352,573 @@ var createGoshClient = ({
15352
15352
  })
15353
15353
  ]
15354
15354
  });
15355
- return {
15356
- mutation: (path2, input) => client.mutation(path2, input),
15357
- query: (path2, input) => client.query(path2, input),
15358
- subscription: (path2, input, observer) => client.subscription(path2, input, {
15355
+ };
15356
+
15357
+ // src/registry/typed-operations.ts
15358
+ var typedOperations = {
15359
+ "health.status": {
15360
+ kind: "query",
15361
+ invoke: (client, input) => client.health.status.query(input)
15362
+ },
15363
+ "user.getProfile": {
15364
+ kind: "query",
15365
+ invoke: (client, input) => client.user.getProfile.query(input)
15366
+ },
15367
+ "organization.listMine": {
15368
+ kind: "query",
15369
+ invoke: (client, input) => client.organization.listMine.query(input)
15370
+ },
15371
+ "organization.getById": {
15372
+ kind: "query",
15373
+ invoke: (client, input) => client.organization.getById.query(input)
15374
+ },
15375
+ "organization.listMembers": {
15376
+ kind: "query",
15377
+ invoke: (client, input) => client.organization.listMembers.query(input)
15378
+ },
15379
+ "event.list": {
15380
+ kind: "query",
15381
+ invoke: (client, input) => client.event.list.query(input)
15382
+ },
15383
+ "event.getById": {
15384
+ kind: "query",
15385
+ invoke: (client, input) => client.event.getById.query(input)
15386
+ },
15387
+ "event.getAdminSetup": {
15388
+ kind: "query",
15389
+ invoke: (client, input) => client.event.getAdminSetup.query(input)
15390
+ },
15391
+ "event.getAdminParticipants": {
15392
+ kind: "query",
15393
+ invoke: (client, input) => client.event.getAdminParticipants.query(input)
15394
+ },
15395
+ "event.getAdminStationsWorkspace": {
15396
+ kind: "query",
15397
+ invoke: (client, input) => client.event.getAdminStationsWorkspace.query(input)
15398
+ },
15399
+ "event.getAdminTeams": {
15400
+ kind: "query",
15401
+ invoke: (client, input) => client.event.getAdminTeams.query(input)
15402
+ },
15403
+ "event.listSubmissionReviewQueue": {
15404
+ kind: "query",
15405
+ invoke: (client, input) => client.event.listSubmissionReviewQueue.query(input)
15406
+ },
15407
+ "event.requestSubmissionImageExport": {
15408
+ kind: "mutation",
15409
+ invoke: (client, input) => client.event.requestSubmissionImageExport.mutate(input)
15410
+ },
15411
+ "event.listSubmissionImageExports": {
15412
+ kind: "query",
15413
+ invoke: (client, input) => client.event.listSubmissionImageExports.query(input)
15414
+ },
15415
+ "event.getSubmissionImageExportDownload": {
15416
+ kind: "mutation",
15417
+ invoke: (client, input) => client.event.getSubmissionImageExportDownload.mutate(input)
15418
+ },
15419
+ "event.listCompletionAnalytics": {
15420
+ kind: "query",
15421
+ invoke: (client, input) => client.event.listCompletionAnalytics.query(input)
15422
+ },
15423
+ "event.listActivityTimeline": {
15424
+ kind: "query",
15425
+ invoke: (client, input) => client.event.listActivityTimeline.query(input)
15426
+ },
15427
+ "event.listBroadcasts": {
15428
+ kind: "query",
15429
+ invoke: (client, input) => client.event.listBroadcasts.query(input)
15430
+ },
15431
+ "event.listRewards": {
15432
+ kind: "query",
15433
+ invoke: (client, input) => client.event.listRewards.query(input)
15434
+ },
15435
+ "event.listScoreAdjustments": {
15436
+ kind: "query",
15437
+ invoke: (client, input) => client.event.listScoreAdjustments.query(input)
15438
+ },
15439
+ "event.listEventVersions": {
15440
+ kind: "query",
15441
+ invoke: (client, input) => client.event.listEventVersions.query(input)
15442
+ },
15443
+ "event.listResultsExport": {
15444
+ kind: "query",
15445
+ invoke: (client, input) => client.event.listResultsExport.query(input)
15446
+ },
15447
+ "event.create": {
15448
+ kind: "mutation",
15449
+ invoke: (client, input) => client.event.create.mutate(input)
15450
+ },
15451
+ "event.createFromTemplate": {
15452
+ kind: "mutation",
15453
+ invoke: (client, input) => client.event.createFromTemplate.mutate(input)
15454
+ },
15455
+ "event.update": {
15456
+ kind: "mutation",
15457
+ invoke: (client, input) => client.event.update.mutate(input)
15458
+ },
15459
+ "event.updateStatus": {
15460
+ kind: "mutation",
15461
+ invoke: (client, input) => client.event.updateStatus.mutate(input)
15462
+ },
15463
+ "event.addParticipant": {
15464
+ kind: "mutation",
15465
+ invoke: (client, input) => client.event.addParticipant.mutate(input)
15466
+ },
15467
+ "event.addParticipants": {
15468
+ kind: "mutation",
15469
+ invoke: (client, input) => client.event.addParticipants.mutate(input)
15470
+ },
15471
+ "event.deleteParticipants": {
15472
+ kind: "mutation",
15473
+ invoke: (client, input) => client.event.deleteParticipants.mutate(input)
15474
+ },
15475
+ "event.sendParticipantMagicLink": {
15476
+ kind: "mutation",
15477
+ invoke: (client, input) => client.event.sendParticipantMagicLink.mutate(input)
15478
+ },
15479
+ "event.sendParticipantMagicLinks": {
15480
+ kind: "mutation",
15481
+ invoke: (client, input) => client.event.sendParticipantMagicLinks.mutate(input)
15482
+ },
15483
+ "event.upsertCollaborator": {
15484
+ kind: "mutation",
15485
+ invoke: (client, input) => client.event.upsertCollaborator.mutate(input)
15486
+ },
15487
+ "event.removeCollaborator": {
15488
+ kind: "mutation",
15489
+ invoke: (client, input) => client.event.removeCollaborator.mutate(input)
15490
+ },
15491
+ "event.createEventVersion": {
15492
+ kind: "mutation",
15493
+ invoke: (client, input) => client.event.createEventVersion.mutate(input)
15494
+ },
15495
+ "event.rollbackEventVersion": {
15496
+ kind: "mutation",
15497
+ invoke: (client, input) => client.event.rollbackEventVersion.mutate(input)
15498
+ },
15499
+ "event.createStation": {
15500
+ kind: "mutation",
15501
+ invoke: (client, input) => client.event.createStation.mutate(input)
15502
+ },
15503
+ "event.updateStation": {
15504
+ kind: "mutation",
15505
+ invoke: (client, input) => client.event.updateStation.mutate(input)
15506
+ },
15507
+ "event.cloneStation": {
15508
+ kind: "mutation",
15509
+ invoke: (client, input) => client.event.cloneStation.mutate(input)
15510
+ },
15511
+ "event.archiveStation": {
15512
+ kind: "mutation",
15513
+ invoke: (client, input) => client.event.archiveStation.mutate(input)
15514
+ },
15515
+ "event.reorderStations": {
15516
+ kind: "mutation",
15517
+ invoke: (client, input) => client.event.reorderStations.mutate(input)
15518
+ },
15519
+ "event.createMission": {
15520
+ kind: "mutation",
15521
+ invoke: (client, input) => client.event.createMission.mutate(input)
15522
+ },
15523
+ "event.updateMission": {
15524
+ kind: "mutation",
15525
+ invoke: (client, input) => client.event.updateMission.mutate(input)
15526
+ },
15527
+ "event.archiveMission": {
15528
+ kind: "mutation",
15529
+ invoke: (client, input) => client.event.archiveMission.mutate(input)
15530
+ },
15531
+ "event.reorderMissions": {
15532
+ kind: "mutation",
15533
+ invoke: (client, input) => client.event.reorderMissions.mutate(input)
15534
+ },
15535
+ "team.list": {
15536
+ kind: "query",
15537
+ invoke: (client, input) => client.team.list.query(input)
15538
+ },
15539
+ "team.create": {
15540
+ kind: "mutation",
15541
+ invoke: (client, input) => client.team.create.mutate(input)
15542
+ },
15543
+ "team.update": {
15544
+ kind: "mutation",
15545
+ invoke: (client, input) => client.team.update.mutate(input)
15546
+ },
15547
+ "team.assignMember": {
15548
+ kind: "mutation",
15549
+ invoke: (client, input) => client.team.assignMember.mutate(input)
15550
+ },
15551
+ "team.removeMember": {
15552
+ kind: "mutation",
15553
+ invoke: (client, input) => client.team.removeMember.mutate(input)
15554
+ },
15555
+ "team.setPlayMode": {
15556
+ kind: "mutation",
15557
+ invoke: (client, input) => client.team.setPlayMode.mutate(input)
15558
+ },
15559
+ "team.setSubmissionAccess": {
15560
+ kind: "mutation",
15561
+ invoke: (client, input) => client.team.setSubmissionAccess.mutate(input)
15562
+ },
15563
+ "template.list": {
15564
+ kind: "query",
15565
+ invoke: (client, input) => client.template.list.query(input)
15566
+ },
15567
+ "template.getById": {
15568
+ kind: "query",
15569
+ invoke: (client, input) => client.template.getById.query(input)
15570
+ },
15571
+ "template.create": {
15572
+ kind: "mutation",
15573
+ invoke: (client, input) => client.template.create.mutate(input)
15574
+ },
15575
+ "template.update": {
15576
+ kind: "mutation",
15577
+ invoke: (client, input) => client.template.update.mutate(input)
15578
+ },
15579
+ "template.updateMetadata": {
15580
+ kind: "mutation",
15581
+ invoke: (client, input) => client.template.updateMetadata.mutate(input)
15582
+ },
15583
+ "template.delete": {
15584
+ kind: "mutation",
15585
+ invoke: (client, input) => client.template.delete.mutate(input)
15586
+ },
15587
+ "event.createBroadcast": {
15588
+ kind: "mutation",
15589
+ invoke: (client, input) => client.event.createBroadcast.mutate(input)
15590
+ },
15591
+ "event.cancelBroadcast": {
15592
+ kind: "mutation",
15593
+ invoke: (client, input) => client.event.cancelBroadcast.mutate(input)
15594
+ },
15595
+ "event.deleteBroadcast": {
15596
+ kind: "mutation",
15597
+ invoke: (client, input) => client.event.deleteBroadcast.mutate(input)
15598
+ },
15599
+ "event.deliverDueBroadcasts": {
15600
+ kind: "mutation",
15601
+ invoke: (client, input) => client.event.deliverDueBroadcasts.mutate(input)
15602
+ },
15603
+ "event.createReward": {
15604
+ kind: "mutation",
15605
+ invoke: (client, input) => client.event.createReward.mutate(input)
15606
+ },
15607
+ "event.updateReward": {
15608
+ kind: "mutation",
15609
+ invoke: (client, input) => client.event.updateReward.mutate(input)
15610
+ },
15611
+ "event.createScoreAdjustment": {
15612
+ kind: "mutation",
15613
+ invoke: (client, input) => client.event.createScoreAdjustment.mutate(input)
15614
+ },
15615
+ "event.reviewSubmission": {
15616
+ kind: "mutation",
15617
+ invoke: (client, input) => client.event.reviewSubmission.mutate(input)
15618
+ },
15619
+ "event.regenerateResultsPortalShare": {
15620
+ kind: "mutation",
15621
+ invoke: (client, input) => client.event.regenerateResultsPortalShare.mutate(input)
15622
+ },
15623
+ "event.revokeResultsPortalShare": {
15624
+ kind: "mutation",
15625
+ invoke: (client, input) => client.event.revokeResultsPortalShare.mutate(input)
15626
+ },
15627
+ "event.getAdminAnalyticsShell": {
15628
+ kind: "query",
15629
+ invoke: (client, input) => client.event.getAdminAnalyticsShell.query(input)
15630
+ },
15631
+ "event.getAdminCollaborators": {
15632
+ kind: "query",
15633
+ invoke: (client, input) => client.event.getAdminCollaborators.query(input)
15634
+ },
15635
+ "event.getAdminEventHeader": {
15636
+ kind: "query",
15637
+ invoke: (client, input) => client.event.getAdminEventHeader.query(input)
15638
+ },
15639
+ "event.getAdminLaunch": {
15640
+ kind: "query",
15641
+ invoke: (client, input) => client.event.getAdminLaunch.query(input)
15642
+ },
15643
+ "event.getAdminLeaderboard": {
15644
+ kind: "query",
15645
+ invoke: (client, input) => client.event.getAdminLeaderboard.query(input)
15646
+ },
15647
+ "event.getAdminMissionShell": {
15648
+ kind: "query",
15649
+ invoke: (client, input) => client.event.getAdminMissionShell.query(input)
15650
+ },
15651
+ "event.getAdminParticipantImport": {
15652
+ kind: "query",
15653
+ invoke: (client, input) => client.event.getAdminParticipantImport.query(input)
15654
+ },
15655
+ "event.getAdminPreview": {
15656
+ kind: "query",
15657
+ invoke: (client, input) => client.event.getAdminPreview.query(input)
15658
+ },
15659
+ "event.getAdminStationCreate": {
15660
+ kind: "query",
15661
+ invoke: (client, input) => client.event.getAdminStationCreate.query(input)
15662
+ },
15663
+ "event.getAdminStationEditor": {
15664
+ kind: "query",
15665
+ invoke: (client, input) => client.event.getAdminStationEditor.query(input)
15666
+ },
15667
+ "event.getAdminSubmissionFilters": {
15668
+ kind: "query",
15669
+ invoke: (client, input) => client.event.getAdminSubmissionFilters.query(input)
15670
+ },
15671
+ "event.getResultsPortalShare": {
15672
+ kind: "query",
15673
+ invoke: (client, input) => client.event.getResultsPortalShare.query(input)
15674
+ },
15675
+ "event.updateAccess": {
15676
+ kind: "mutation",
15677
+ invoke: (client, input) => client.event.updateAccess.mutate(input)
15678
+ },
15679
+ "event.updateBranding": {
15680
+ kind: "mutation",
15681
+ invoke: (client, input) => client.event.updateBranding.mutate(input)
15682
+ },
15683
+ "event.updateStationAvailability": {
15684
+ kind: "mutation",
15685
+ invoke: (client, input) => client.event.updateStationAvailability.mutate(input)
15686
+ },
15687
+ "event.updateStationImage": {
15688
+ kind: "mutation",
15689
+ invoke: (client, input) => client.event.updateStationImage.mutate(input)
15690
+ },
15691
+ "event.updateStationLocation": {
15692
+ kind: "mutation",
15693
+ invoke: (client, input) => client.event.updateStationLocation.mutate(input)
15694
+ },
15695
+ "event.saveAsTemplate": {
15696
+ kind: "mutation",
15697
+ invoke: (client, input) => client.event.saveAsTemplate.mutate(input)
15698
+ },
15699
+ "event.getJoinDetails": {
15700
+ kind: "query",
15701
+ invoke: (client, input) => client.event.getJoinDetails.query(input)
15702
+ },
15703
+ "event.getPaginatedPlayerLeaderboard": {
15704
+ kind: "query",
15705
+ invoke: (client, input) => client.event.getPaginatedPlayerLeaderboard.query(input)
15706
+ },
15707
+ "event.getPlayerLeaderboard": {
15708
+ kind: "query",
15709
+ invoke: (client, input) => client.event.getPlayerLeaderboard.query(input)
15710
+ },
15711
+ "event.getPlayerMap": {
15712
+ kind: "query",
15713
+ invoke: (client, input) => client.event.getPlayerMap.query(input)
15714
+ },
15715
+ "event.getPlayerShell": {
15716
+ kind: "query",
15717
+ invoke: (client, input) => client.event.getPlayerShell.query(input)
15718
+ },
15719
+ "event.getPlayerStation": {
15720
+ kind: "query",
15721
+ invoke: (client, input) => client.event.getPlayerStation.query(input)
15722
+ },
15723
+ "event.listJoined": {
15724
+ kind: "query",
15725
+ invoke: (client, input) => client.event.listJoined.query(input)
15726
+ },
15727
+ "event.listPlayerBroadcasts": {
15728
+ kind: "query",
15729
+ invoke: (client, input) => client.event.listPlayerBroadcasts.query(input)
15730
+ },
15731
+ "event.getPlayerBroadcast": {
15732
+ kind: "query",
15733
+ invoke: (client, input) => client.event.getPlayerBroadcast.query(input)
15734
+ },
15735
+ "event.listPlayerRewards": {
15736
+ kind: "query",
15737
+ invoke: (client, input) => client.event.listPlayerRewards.query(input)
15738
+ },
15739
+ "event.join": {
15740
+ kind: "mutation",
15741
+ invoke: (client, input) => client.event.join.mutate(input)
15742
+ },
15743
+ "team.join": {
15744
+ kind: "mutation",
15745
+ invoke: (client, input) => client.team.join.mutate(input)
15746
+ },
15747
+ "event.markPlayerBroadcastsRead": {
15748
+ kind: "mutation",
15749
+ invoke: (client, input) => client.event.markPlayerBroadcastsRead.mutate(input)
15750
+ },
15751
+ "event.submitUserReview": {
15752
+ kind: "mutation",
15753
+ invoke: (client, input) => client.event.submitUserReview.mutate(input)
15754
+ },
15755
+ "event.updatePlayerDisplayName": {
15756
+ kind: "mutation",
15757
+ invoke: (client, input) => client.event.updatePlayerDisplayName.mutate(input)
15758
+ },
15759
+ "event.resolveJoinCode": {
15760
+ kind: "mutation",
15761
+ invoke: (client, input) => client.event.resolveJoinCode.mutate(input)
15762
+ },
15763
+ "event.createStationCheckInProof": {
15764
+ kind: "mutation",
15765
+ invoke: (client, input) => client.event.createStationCheckInProof.mutate(input)
15766
+ },
15767
+ "event.submitMission": {
15768
+ kind: "mutation",
15769
+ invoke: (client, input) => client.event.submitMission.mutate(input)
15770
+ },
15771
+ "event.getPublicLoginDetails": {
15772
+ kind: "query",
15773
+ invoke: (client, input) => client.event.getPublicLoginDetails.query(input)
15774
+ },
15775
+ "event.getResultsPortal": {
15776
+ kind: "query",
15777
+ invoke: (client, input) => client.event.getResultsPortal.query(input)
15778
+ },
15779
+ "event.requestLoginEmailOtp": {
15780
+ kind: "mutation",
15781
+ invoke: (client, input) => client.event.requestLoginEmailOtp.mutate(input)
15782
+ },
15783
+ "event.requestBrandingAssetUpload": {
15784
+ kind: "mutation",
15785
+ invoke: (client, input) => client.event.requestBrandingAssetUpload.mutate(input)
15786
+ },
15787
+ "event.requestSetupImageUpload": {
15788
+ kind: "mutation",
15789
+ invoke: (client, input) => client.event.requestSetupImageUpload.mutate(input)
15790
+ },
15791
+ "user.requestProfileImageUpload": {
15792
+ kind: "mutation",
15793
+ invoke: (client, input) => client.user.requestProfileImageUpload.mutate(input)
15794
+ },
15795
+ "event.requestMissionMediaUpload": {
15796
+ kind: "mutation",
15797
+ invoke: (client, input) => client.event.requestMissionMediaUpload.mutate(input)
15798
+ },
15799
+ "event.completeMissionMediaMultipartUpload": {
15800
+ kind: "mutation",
15801
+ invoke: (client, input) => client.event.completeMissionMediaMultipartUpload.mutate(input)
15802
+ },
15803
+ "event.abortMissionMediaMultipartUpload": {
15804
+ kind: "mutation",
15805
+ invoke: (client, input) => client.event.abortMissionMediaMultipartUpload.mutate(input)
15806
+ },
15807
+ "event.onPlayerEventChanged": {
15808
+ kind: "subscription",
15809
+ subscribe: (client, input, observer) => client.event.onPlayerEventChanged.subscribe(input, {
15359
15810
  onComplete: observer.complete,
15360
15811
  onData: observer.next,
15361
15812
  onError: observer.error
15362
15813
  })
15363
- };
15814
+ },
15815
+ "event.onSubmissionReviewQueueChanged": {
15816
+ kind: "subscription",
15817
+ subscribe: (client, input, observer) => client.event.onSubmissionReviewQueueChanged.subscribe(input, {
15818
+ onComplete: observer.complete,
15819
+ onData: observer.next,
15820
+ onError: observer.error
15821
+ })
15822
+ },
15823
+ "organization.create": {
15824
+ kind: "mutation",
15825
+ invoke: (client, input) => client.organization.create.mutate(input)
15826
+ },
15827
+ "organization.update": {
15828
+ kind: "mutation",
15829
+ invoke: (client, input) => client.organization.update.mutate(input)
15830
+ },
15831
+ "organization.checkSlug": {
15832
+ kind: "mutation",
15833
+ invoke: (client, input) => client.organization.checkSlug.mutate(input)
15834
+ },
15835
+ "organization.checkOrganizationAccess": {
15836
+ kind: "query",
15837
+ invoke: (client, input) => client.organization.checkOrganizationAccess.query(input)
15838
+ },
15839
+ "organization.getOnboardingState": {
15840
+ kind: "query",
15841
+ invoke: (client, input) => client.organization.getOnboardingState.query(input)
15842
+ },
15843
+ "organization.getInvitation": {
15844
+ kind: "query",
15845
+ invoke: (client, input) => client.organization.getInvitation.query(input)
15846
+ },
15847
+ "organization.acceptInvitation": {
15848
+ kind: "mutation",
15849
+ invoke: (client, input) => client.organization.acceptInvitation.mutate(input)
15850
+ },
15851
+ "organization.rejectInvitation": {
15852
+ kind: "mutation",
15853
+ invoke: (client, input) => client.organization.rejectInvitation.mutate(input)
15854
+ },
15855
+ "organization.cancelInvitation": {
15856
+ kind: "mutation",
15857
+ invoke: (client, input) => client.organization.cancelInvitation.mutate(input)
15858
+ },
15859
+ "organization.inviteMember": {
15860
+ kind: "mutation",
15861
+ invoke: (client, input) => client.organization.inviteMember.mutate(input)
15862
+ },
15863
+ "organization.removeMember": {
15864
+ kind: "mutation",
15865
+ invoke: (client, input) => client.organization.removeMember.mutate(input)
15866
+ },
15867
+ "organization.updateMemberRole": {
15868
+ kind: "mutation",
15869
+ invoke: (client, input) => client.organization.updateMemberRole.mutate(input)
15870
+ },
15871
+ "organization.listAllForAdmin": {
15872
+ kind: "query",
15873
+ invoke: (client, input) => client.organization.listAllForAdmin.query(input)
15874
+ },
15875
+ "template.createSystem": {
15876
+ kind: "mutation",
15877
+ invoke: (client, input) => client.template.createSystem.mutate(input)
15878
+ },
15879
+ "user.listAdmin": {
15880
+ kind: "query",
15881
+ invoke: (client, input) => client.user.listAdmin.query(input)
15882
+ },
15883
+ "user.updateGlobalRole": {
15884
+ kind: "mutation",
15885
+ invoke: (client, input) => client.user.updateGlobalRole.mutate(input)
15886
+ },
15887
+ "user.ban": {
15888
+ kind: "mutation",
15889
+ invoke: (client, input) => client.user.ban.mutate(input)
15890
+ },
15891
+ "user.unban": {
15892
+ kind: "mutation",
15893
+ invoke: (client, input) => client.user.unban.mutate(input)
15894
+ }
15364
15895
  };
15365
15896
 
15897
+ // src/command-client.ts
15898
+ var createGoshCommandClient = (client) => ({
15899
+ mutation: (path2, input) => {
15900
+ const operation = typedOperations[path2];
15901
+ if (operation.kind !== "mutation") {
15902
+ throw new Error(`Expected mutation procedure, received ${path2}.`);
15903
+ }
15904
+ return operation.invoke(client, input);
15905
+ },
15906
+ query: (path2, input) => {
15907
+ const operation = typedOperations[path2];
15908
+ if (operation.kind !== "query") {
15909
+ throw new Error(`Expected query procedure, received ${path2}.`);
15910
+ }
15911
+ return operation.invoke(client, input);
15912
+ },
15913
+ subscription: (path2, input, observer) => {
15914
+ const operation = typedOperations[path2];
15915
+ if (operation.kind !== "subscription") {
15916
+ throw new Error(`Expected subscription procedure, received ${path2}.`);
15917
+ }
15918
+ return operation.subscribe(client, input, observer);
15919
+ }
15920
+ });
15921
+
15366
15922
  // src/parse-args.ts
15367
15923
  var parseArgs = (argv) => {
15368
15924
  const flags = {};
@@ -16002,13 +16558,13 @@ Waiting for approval\u2026
16002
16558
  apiBaseUrl,
16003
16559
  store: credentialStore
16004
16560
  }) : undefined;
16005
- const clientFactory = dependencies.createClient ?? createGoshClient;
16006
- const client = clientFactory({
16561
+ const clientOptions = {
16007
16562
  accessToken,
16008
16563
  apiBaseUrl,
16009
16564
  debug: flags.debug === true,
16010
16565
  quiet: flags.quiet === true
16011
- });
16566
+ };
16567
+ const client = dependencies.createClient ? dependencies.createClient(clientOptions) : createGoshCommandClient(createGoshClient(clientOptions));
16012
16568
  if (command.operation === "subscription") {
16013
16569
  const invocation = {
16014
16570
  apiBaseUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-labs-sg/gosh",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "GOSH CLI for organizers and AI agents — manage organizations, events, teams, stations, missions, templates, and live operations through the GOSH API.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",