@dazl/api-client 1.0.9 → 1.0.10

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.
@@ -515,6 +515,25 @@ export type Workspace = {
515
515
  createdAt: string;
516
516
  };
517
517
 
518
+ export type CreateSessionAuthorized = {
519
+ status: 'authorized';
520
+ url: string;
521
+ headers?: {
522
+ [key: string]: string;
523
+ };
524
+ };
525
+
526
+ export type CreateSessionUnauthorized = {
527
+ status: 'unauthorized';
528
+ };
529
+
530
+ export type IntegrationName = 'confluence' | 'figma' | 'google-docs' | 'google-sheets' | 'google-slides' | 'jira' | 'linear' | 'miro' | 'notion';
531
+
532
+ export type ConnectionStatus = {
533
+ integrationName: IntegrationName;
534
+ isConnected: boolean;
535
+ };
536
+
518
537
  export type EnsureMyUserData = {
519
538
  body?: {
520
539
  name?: string;
@@ -7461,3 +7480,237 @@ export type OverrideAllResponses = {
7461
7480
  };
7462
7481
 
7463
7482
  export type OverrideAllResponse = OverrideAllResponses[keyof OverrideAllResponses];
7483
+
7484
+ export type CreateSessionData = {
7485
+ body: {
7486
+ integrationName: IntegrationName;
7487
+ };
7488
+ path?: never;
7489
+ query?: never;
7490
+ url: '/mcp/create-session';
7491
+ };
7492
+
7493
+ export type CreateSessionErrors = {
7494
+ /**
7495
+ * Bad request - Invalid parameters or malformed JSON
7496
+ */
7497
+ 400: {
7498
+ message: string;
7499
+ issues?: string;
7500
+ };
7501
+ /**
7502
+ * Unauthorized
7503
+ */
7504
+ 401: ErrorResponse;
7505
+ /**
7506
+ * Forbidden
7507
+ */
7508
+ 403: ErrorResponse;
7509
+ /**
7510
+ * Not Found
7511
+ */
7512
+ 404: ErrorResponse;
7513
+ /**
7514
+ * Conflict
7515
+ */
7516
+ 409: ErrorResponse;
7517
+ /**
7518
+ * Internal server error
7519
+ */
7520
+ 500: ErrorResponse;
7521
+ /**
7522
+ * Service Unavailable
7523
+ */
7524
+ 503: ErrorResponse;
7525
+ };
7526
+
7527
+ export type CreateSessionError = CreateSessionErrors[keyof CreateSessionErrors];
7528
+
7529
+ export type CreateSessionResponses = {
7530
+ /**
7531
+ * An authorized MCP session (real url + headers) or an unauthorized marker
7532
+ */
7533
+ 200: ({
7534
+ status: 'authorized';
7535
+ } & CreateSessionAuthorized) | ({
7536
+ status: 'unauthorized';
7537
+ } & CreateSessionUnauthorized);
7538
+ };
7539
+
7540
+ export type CreateSessionResponse = CreateSessionResponses[keyof CreateSessionResponses];
7541
+
7542
+ export type InitiateConnectionData = {
7543
+ body: {
7544
+ integrationName: IntegrationName;
7545
+ /**
7546
+ * Where the browser lands after OAuth; built by the caller
7547
+ */
7548
+ callbackUrl: string;
7549
+ };
7550
+ path?: never;
7551
+ query?: never;
7552
+ url: '/mcp/connections';
7553
+ };
7554
+
7555
+ export type InitiateConnectionErrors = {
7556
+ /**
7557
+ * Bad request - Invalid parameters or malformed JSON
7558
+ */
7559
+ 400: {
7560
+ message: string;
7561
+ issues?: string;
7562
+ };
7563
+ /**
7564
+ * Unauthorized
7565
+ */
7566
+ 401: ErrorResponse;
7567
+ /**
7568
+ * Forbidden
7569
+ */
7570
+ 403: ErrorResponse;
7571
+ /**
7572
+ * Not Found
7573
+ */
7574
+ 404: ErrorResponse;
7575
+ /**
7576
+ * Conflict
7577
+ */
7578
+ 409: ErrorResponse;
7579
+ /**
7580
+ * Internal server error
7581
+ */
7582
+ 500: ErrorResponse;
7583
+ /**
7584
+ * Service Unavailable
7585
+ */
7586
+ 503: ErrorResponse;
7587
+ };
7588
+
7589
+ export type InitiateConnectionError = InitiateConnectionErrors[keyof InitiateConnectionErrors];
7590
+
7591
+ export type InitiateConnectionResponses = {
7592
+ /**
7593
+ * The OAuth connection request id and the redirect URL to send the user to
7594
+ */
7595
+ 200: {
7596
+ connectionRequestId: string;
7597
+ redirectUrl: string;
7598
+ };
7599
+ };
7600
+
7601
+ export type InitiateConnectionResponse = InitiateConnectionResponses[keyof InitiateConnectionResponses];
7602
+
7603
+ export type FinalizeConnectionData = {
7604
+ body: {
7605
+ integrationName: IntegrationName;
7606
+ };
7607
+ path: {
7608
+ connectionRequestId: string;
7609
+ };
7610
+ query?: never;
7611
+ url: '/mcp/connections/{connectionRequestId}/finalize';
7612
+ };
7613
+
7614
+ export type FinalizeConnectionErrors = {
7615
+ /**
7616
+ * Bad request - Invalid parameters or malformed JSON
7617
+ */
7618
+ 400: {
7619
+ message: string;
7620
+ issues?: string;
7621
+ };
7622
+ /**
7623
+ * Unauthorized
7624
+ */
7625
+ 401: ErrorResponse;
7626
+ /**
7627
+ * Forbidden
7628
+ */
7629
+ 403: ErrorResponse;
7630
+ /**
7631
+ * Not Found
7632
+ */
7633
+ 404: ErrorResponse;
7634
+ /**
7635
+ * Conflict
7636
+ */
7637
+ 409: ErrorResponse;
7638
+ /**
7639
+ * Internal server error
7640
+ */
7641
+ 500: ErrorResponse;
7642
+ /**
7643
+ * Service Unavailable
7644
+ */
7645
+ 503: ErrorResponse;
7646
+ };
7647
+
7648
+ export type FinalizeConnectionError = FinalizeConnectionErrors[keyof FinalizeConnectionErrors];
7649
+
7650
+ export type FinalizeConnectionResponses = {
7651
+ /**
7652
+ * The persisted connected-account id (ca_...)
7653
+ */
7654
+ 200: {
7655
+ connectionId: string;
7656
+ };
7657
+ };
7658
+
7659
+ export type FinalizeConnectionResponse = FinalizeConnectionResponses[keyof FinalizeConnectionResponses];
7660
+
7661
+ export type GetConnectionStatusData = {
7662
+ body?: never;
7663
+ path?: never;
7664
+ query?: {
7665
+ /**
7666
+ * If omitted, returns status for all integrations
7667
+ */
7668
+ integrationName?: 'confluence' | 'figma' | 'google-docs' | 'google-sheets' | 'google-slides' | 'jira' | 'linear' | 'miro' | 'notion';
7669
+ };
7670
+ url: '/mcp/connections/status';
7671
+ };
7672
+
7673
+ export type GetConnectionStatusErrors = {
7674
+ /**
7675
+ * Bad request - Invalid parameters or malformed JSON
7676
+ */
7677
+ 400: {
7678
+ message: string;
7679
+ issues?: string;
7680
+ };
7681
+ /**
7682
+ * Unauthorized
7683
+ */
7684
+ 401: ErrorResponse;
7685
+ /**
7686
+ * Forbidden
7687
+ */
7688
+ 403: ErrorResponse;
7689
+ /**
7690
+ * Not Found
7691
+ */
7692
+ 404: ErrorResponse;
7693
+ /**
7694
+ * Conflict
7695
+ */
7696
+ 409: ErrorResponse;
7697
+ /**
7698
+ * Internal server error
7699
+ */
7700
+ 500: ErrorResponse;
7701
+ /**
7702
+ * Service Unavailable
7703
+ */
7704
+ 503: ErrorResponse;
7705
+ };
7706
+
7707
+ export type GetConnectionStatusError = GetConnectionStatusErrors[keyof GetConnectionStatusErrors];
7708
+
7709
+ export type GetConnectionStatusResponses = {
7710
+ /**
7711
+ * Active-connection status for the requested integration(s)
7712
+ */
7713
+ 200: Array<ConnectionStatus>;
7714
+ };
7715
+
7716
+ export type GetConnectionStatusResponse = GetConnectionStatusResponses[keyof GetConnectionStatusResponses];
@@ -1,4 +1,4 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
- export { EnvConfig, type Options, Ping, User, UserSettings, Workspace as Workspace2 } from './sdk.gen.ts';
4
- export type { ClientOptions, CreateWorkspaceData, CreateWorkspaceError, CreateWorkspaceErrors, CreateWorkspaceResponse, CreateWorkspaceResponses, EnsureMyUserData, EnsureMyUserError, EnsureMyUserErrors, EnsureMyUserResponse, EnsureMyUserResponses, ErrorResponse, FeatureToggle, GetAllData, GetAllError, GetAllErrors, GetAllResponse, GetAllResponses, GetAllWorkspacesData, GetAllWorkspacesError, GetAllWorkspacesErrors, GetAllWorkspacesResponse, GetAllWorkspacesResponses, GetFeatureTogglesData, GetFeatureTogglesError, GetFeatureTogglesErrors, GetFeatureTogglesResponse, GetFeatureTogglesResponses, GetMyUserData, GetMyUserError, GetMyUserErrors, GetMyUserResponse, GetMyUserResponses, GetPingData, GetPingError, GetPingErrors, GetPingResponse, GetPingResponses, OverrideAllData, OverrideAllError, OverrideAllErrors, OverrideAllResponse, OverrideAllResponses, UpdateMyUserData, UpdateMyUserError, UpdateMyUserErrors, UpdateMyUserResponse, UpdateMyUserResponses, UserRaw, Workspace } from './types.gen.ts';
3
+ export { EnvConfig, Mcp, type Options, Ping, User, UserSettings, Workspace as Workspace2 } from './sdk.gen.ts';
4
+ export type { ClientOptions, ConnectionStatus, CreateSessionAuthorized, CreateSessionData, CreateSessionError, CreateSessionErrors, CreateSessionResponse, CreateSessionResponses, CreateSessionUnauthorized, CreateWorkspaceData, CreateWorkspaceError, CreateWorkspaceErrors, CreateWorkspaceResponse, CreateWorkspaceResponses, EnsureMyUserData, EnsureMyUserError, EnsureMyUserErrors, EnsureMyUserResponse, EnsureMyUserResponses, ErrorResponse, FeatureToggle, FinalizeConnectionData, FinalizeConnectionError, FinalizeConnectionErrors, FinalizeConnectionResponse, FinalizeConnectionResponses, GetAllData, GetAllError, GetAllErrors, GetAllResponse, GetAllResponses, GetAllWorkspacesData, GetAllWorkspacesError, GetAllWorkspacesErrors, GetAllWorkspacesResponse, GetAllWorkspacesResponses, GetConnectionStatusData, GetConnectionStatusError, GetConnectionStatusErrors, GetConnectionStatusResponse, GetConnectionStatusResponses, GetFeatureTogglesData, GetFeatureTogglesError, GetFeatureTogglesErrors, GetFeatureTogglesResponse, GetFeatureTogglesResponses, GetMyUserData, GetMyUserError, GetMyUserErrors, GetMyUserResponse, GetMyUserResponses, GetPingData, GetPingError, GetPingErrors, GetPingResponse, GetPingResponses, InitiateConnectionData, InitiateConnectionError, InitiateConnectionErrors, InitiateConnectionResponse, InitiateConnectionResponses, IntegrationName, OverrideAllData, OverrideAllError, OverrideAllErrors, OverrideAllResponse, OverrideAllResponses, UpdateMyUserData, UpdateMyUserError, UpdateMyUserErrors, UpdateMyUserResponse, UpdateMyUserResponses, UserRaw, Workspace } from './types.gen.ts';
@@ -1,7 +1,7 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
3
  import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.ts';
4
- import type { CreateWorkspaceData, CreateWorkspaceErrors, CreateWorkspaceResponses, EnsureMyUserData, EnsureMyUserErrors, EnsureMyUserResponses, GetAllData, GetAllErrors, GetAllResponses, GetAllWorkspacesData, GetAllWorkspacesErrors, GetAllWorkspacesResponses, GetFeatureTogglesData, GetFeatureTogglesErrors, GetFeatureTogglesResponses, GetMyUserData, GetMyUserErrors, GetMyUserResponses, GetPingData, GetPingErrors, GetPingResponses, OverrideAllData, OverrideAllErrors, OverrideAllResponses, UpdateMyUserData, UpdateMyUserErrors, UpdateMyUserResponses } from './types.gen.ts';
4
+ import type { CreateSessionData, CreateSessionErrors, CreateSessionResponses, CreateWorkspaceData, CreateWorkspaceErrors, CreateWorkspaceResponses, EnsureMyUserData, EnsureMyUserErrors, EnsureMyUserResponses, FinalizeConnectionData, FinalizeConnectionErrors, FinalizeConnectionResponses, GetAllData, GetAllErrors, GetAllResponses, GetAllWorkspacesData, GetAllWorkspacesErrors, GetAllWorkspacesResponses, GetConnectionStatusData, GetConnectionStatusErrors, GetConnectionStatusResponses, GetFeatureTogglesData, GetFeatureTogglesErrors, GetFeatureTogglesResponses, GetMyUserData, GetMyUserErrors, GetMyUserResponses, GetPingData, GetPingErrors, GetPingResponses, InitiateConnectionData, InitiateConnectionErrors, InitiateConnectionResponses, OverrideAllData, OverrideAllErrors, OverrideAllResponses, UpdateMyUserData, UpdateMyUserErrors, UpdateMyUserResponses } from './types.gen.ts';
5
5
 
6
6
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
7
7
  /**
@@ -86,6 +86,45 @@ export class UserSettings {
86
86
  }
87
87
  }
88
88
 
89
+ export class Mcp {
90
+ public static createSession<ThrowOnError extends boolean = false>(options: Options<CreateSessionData, ThrowOnError>): RequestResult<CreateSessionResponses, CreateSessionErrors, ThrowOnError> {
91
+ return options.client.post<CreateSessionResponses, CreateSessionErrors, ThrowOnError>({
92
+ url: '/mcp/create-session',
93
+ ...options,
94
+ headers: {
95
+ 'Content-Type': 'application/json',
96
+ ...options.headers
97
+ }
98
+ });
99
+ }
100
+
101
+ public static initiateConnection<ThrowOnError extends boolean = false>(options: Options<InitiateConnectionData, ThrowOnError>): RequestResult<InitiateConnectionResponses, InitiateConnectionErrors, ThrowOnError> {
102
+ return options.client.post<InitiateConnectionResponses, InitiateConnectionErrors, ThrowOnError>({
103
+ url: '/mcp/connections',
104
+ ...options,
105
+ headers: {
106
+ 'Content-Type': 'application/json',
107
+ ...options.headers
108
+ }
109
+ });
110
+ }
111
+
112
+ public static finalizeConnection<ThrowOnError extends boolean = false>(options: Options<FinalizeConnectionData, ThrowOnError>): RequestResult<FinalizeConnectionResponses, FinalizeConnectionErrors, ThrowOnError> {
113
+ return options.client.post<FinalizeConnectionResponses, FinalizeConnectionErrors, ThrowOnError>({
114
+ url: '/mcp/connections/{connectionRequestId}/finalize',
115
+ ...options,
116
+ headers: {
117
+ 'Content-Type': 'application/json',
118
+ ...options.headers
119
+ }
120
+ });
121
+ }
122
+
123
+ public static getConnectionStatus<ThrowOnError extends boolean = false>(options: Options<GetConnectionStatusData, ThrowOnError>): RequestResult<GetConnectionStatusResponses, GetConnectionStatusErrors, ThrowOnError> {
124
+ return options.client.get<GetConnectionStatusResponses, GetConnectionStatusErrors, ThrowOnError>({ url: '/mcp/connections/status', ...options });
125
+ }
126
+ }
127
+
89
128
  export class Ping {
90
129
  /**
91
130
  * Ping endpoint for test
@@ -37,6 +37,25 @@ export type Workspace = {
37
37
  createdAt: string;
38
38
  };
39
39
 
40
+ export type CreateSessionAuthorized = {
41
+ status: 'authorized';
42
+ url: string;
43
+ headers?: {
44
+ [key: string]: string;
45
+ };
46
+ };
47
+
48
+ export type CreateSessionUnauthorized = {
49
+ status: 'unauthorized';
50
+ };
51
+
52
+ export type IntegrationName = 'confluence' | 'figma' | 'google-docs' | 'google-sheets' | 'google-slides' | 'jira' | 'linear' | 'miro' | 'notion';
53
+
54
+ export type ConnectionStatus = {
55
+ integrationName: IntegrationName;
56
+ isConnected: boolean;
57
+ };
58
+
40
59
  export type EnsureMyUserData = {
41
60
  body?: {
42
61
  name?: string;
@@ -488,6 +507,240 @@ export type OverrideAllResponses = {
488
507
 
489
508
  export type OverrideAllResponse = OverrideAllResponses[keyof OverrideAllResponses];
490
509
 
510
+ export type CreateSessionData = {
511
+ body: {
512
+ integrationName: IntegrationName;
513
+ };
514
+ path?: never;
515
+ query?: never;
516
+ url: '/mcp/create-session';
517
+ };
518
+
519
+ export type CreateSessionErrors = {
520
+ /**
521
+ * Bad request - Invalid parameters or malformed JSON
522
+ */
523
+ 400: {
524
+ message: string;
525
+ issues?: string;
526
+ };
527
+ /**
528
+ * Unauthorized
529
+ */
530
+ 401: ErrorResponse;
531
+ /**
532
+ * Forbidden
533
+ */
534
+ 403: ErrorResponse;
535
+ /**
536
+ * Not Found
537
+ */
538
+ 404: ErrorResponse;
539
+ /**
540
+ * Conflict
541
+ */
542
+ 409: ErrorResponse;
543
+ /**
544
+ * Internal server error
545
+ */
546
+ 500: ErrorResponse;
547
+ /**
548
+ * Service Unavailable
549
+ */
550
+ 503: ErrorResponse;
551
+ };
552
+
553
+ export type CreateSessionError = CreateSessionErrors[keyof CreateSessionErrors];
554
+
555
+ export type CreateSessionResponses = {
556
+ /**
557
+ * An authorized MCP session (real url + headers) or an unauthorized marker
558
+ */
559
+ 200: ({
560
+ status: 'authorized';
561
+ } & CreateSessionAuthorized) | ({
562
+ status: 'unauthorized';
563
+ } & CreateSessionUnauthorized);
564
+ };
565
+
566
+ export type CreateSessionResponse = CreateSessionResponses[keyof CreateSessionResponses];
567
+
568
+ export type InitiateConnectionData = {
569
+ body: {
570
+ integrationName: IntegrationName;
571
+ /**
572
+ * Where the browser lands after OAuth; built by the caller
573
+ */
574
+ callbackUrl: string;
575
+ };
576
+ path?: never;
577
+ query?: never;
578
+ url: '/mcp/connections';
579
+ };
580
+
581
+ export type InitiateConnectionErrors = {
582
+ /**
583
+ * Bad request - Invalid parameters or malformed JSON
584
+ */
585
+ 400: {
586
+ message: string;
587
+ issues?: string;
588
+ };
589
+ /**
590
+ * Unauthorized
591
+ */
592
+ 401: ErrorResponse;
593
+ /**
594
+ * Forbidden
595
+ */
596
+ 403: ErrorResponse;
597
+ /**
598
+ * Not Found
599
+ */
600
+ 404: ErrorResponse;
601
+ /**
602
+ * Conflict
603
+ */
604
+ 409: ErrorResponse;
605
+ /**
606
+ * Internal server error
607
+ */
608
+ 500: ErrorResponse;
609
+ /**
610
+ * Service Unavailable
611
+ */
612
+ 503: ErrorResponse;
613
+ };
614
+
615
+ export type InitiateConnectionError = InitiateConnectionErrors[keyof InitiateConnectionErrors];
616
+
617
+ export type InitiateConnectionResponses = {
618
+ /**
619
+ * The OAuth connection request id and the redirect URL to send the user to
620
+ */
621
+ 200: {
622
+ connectionRequestId: string;
623
+ redirectUrl: string;
624
+ };
625
+ };
626
+
627
+ export type InitiateConnectionResponse = InitiateConnectionResponses[keyof InitiateConnectionResponses];
628
+
629
+ export type FinalizeConnectionData = {
630
+ body: {
631
+ integrationName: IntegrationName;
632
+ };
633
+ path: {
634
+ connectionRequestId: string;
635
+ };
636
+ query?: never;
637
+ url: '/mcp/connections/{connectionRequestId}/finalize';
638
+ };
639
+
640
+ export type FinalizeConnectionErrors = {
641
+ /**
642
+ * Bad request - Invalid parameters or malformed JSON
643
+ */
644
+ 400: {
645
+ message: string;
646
+ issues?: string;
647
+ };
648
+ /**
649
+ * Unauthorized
650
+ */
651
+ 401: ErrorResponse;
652
+ /**
653
+ * Forbidden
654
+ */
655
+ 403: ErrorResponse;
656
+ /**
657
+ * Not Found
658
+ */
659
+ 404: ErrorResponse;
660
+ /**
661
+ * Conflict
662
+ */
663
+ 409: ErrorResponse;
664
+ /**
665
+ * Internal server error
666
+ */
667
+ 500: ErrorResponse;
668
+ /**
669
+ * Service Unavailable
670
+ */
671
+ 503: ErrorResponse;
672
+ };
673
+
674
+ export type FinalizeConnectionError = FinalizeConnectionErrors[keyof FinalizeConnectionErrors];
675
+
676
+ export type FinalizeConnectionResponses = {
677
+ /**
678
+ * The persisted connected-account id (ca_...)
679
+ */
680
+ 200: {
681
+ connectionId: string;
682
+ };
683
+ };
684
+
685
+ export type FinalizeConnectionResponse = FinalizeConnectionResponses[keyof FinalizeConnectionResponses];
686
+
687
+ export type GetConnectionStatusData = {
688
+ body?: never;
689
+ path?: never;
690
+ query?: {
691
+ /**
692
+ * If omitted, returns status for all integrations
693
+ */
694
+ integrationName?: 'confluence' | 'figma' | 'google-docs' | 'google-sheets' | 'google-slides' | 'jira' | 'linear' | 'miro' | 'notion';
695
+ };
696
+ url: '/mcp/connections/status';
697
+ };
698
+
699
+ export type GetConnectionStatusErrors = {
700
+ /**
701
+ * Bad request - Invalid parameters or malformed JSON
702
+ */
703
+ 400: {
704
+ message: string;
705
+ issues?: string;
706
+ };
707
+ /**
708
+ * Unauthorized
709
+ */
710
+ 401: ErrorResponse;
711
+ /**
712
+ * Forbidden
713
+ */
714
+ 403: ErrorResponse;
715
+ /**
716
+ * Not Found
717
+ */
718
+ 404: ErrorResponse;
719
+ /**
720
+ * Conflict
721
+ */
722
+ 409: ErrorResponse;
723
+ /**
724
+ * Internal server error
725
+ */
726
+ 500: ErrorResponse;
727
+ /**
728
+ * Service Unavailable
729
+ */
730
+ 503: ErrorResponse;
731
+ };
732
+
733
+ export type GetConnectionStatusError = GetConnectionStatusErrors[keyof GetConnectionStatusErrors];
734
+
735
+ export type GetConnectionStatusResponses = {
736
+ /**
737
+ * Active-connection status for the requested integration(s)
738
+ */
739
+ 200: Array<ConnectionStatus>;
740
+ };
741
+
742
+ export type GetConnectionStatusResponse = GetConnectionStatusResponses[keyof GetConnectionStatusResponses];
743
+
491
744
  export type GetPingData = {
492
745
  body?: never;
493
746
  path?: never;