@trycomp/compound-sdk 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FUNCTIONS.md +9 -4
- package/README.md +49 -17
- package/esm/funcs/{integrations-list-for-org.d.ts → auth-get-active-org.d.ts} +3 -3
- package/esm/funcs/auth-get-active-org.d.ts.map +1 -0
- package/esm/funcs/auth-get-active-org.js +81 -0
- package/esm/funcs/auth-get-active-org.js.map +1 -0
- package/esm/funcs/{integrations-google-workspace-connect-handle-callback.d.ts → integrations-google-workspace-connect-complete-callback.d.ts} +3 -3
- package/esm/funcs/integrations-google-workspace-connect-complete-callback.d.ts.map +1 -0
- package/esm/funcs/{integrations-google-workspace-connect-handle-callback.js → integrations-google-workspace-connect-complete-callback.js} +7 -7
- package/esm/funcs/integrations-google-workspace-connect-complete-callback.js.map +1 -0
- package/esm/funcs/integrations-list-list-for-org.d.ts +15 -0
- package/esm/funcs/integrations-list-list-for-org.d.ts.map +1 -0
- package/esm/funcs/{integrations-list-for-org.js → integrations-list-list-for-org.js} +7 -7
- package/esm/funcs/integrations-list-list-for-org.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.d.ts.map +1 -1
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/models/index.d.ts +6 -4
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +6 -4
- package/esm/models/index.js.map +1 -1
- package/esm/models/request-auth-get-active-org.d.ts +18 -0
- package/esm/models/request-auth-get-active-org.d.ts.map +1 -0
- package/esm/models/request-auth-get-active-org.js +17 -0
- package/esm/models/request-auth-get-active-org.js.map +1 -0
- package/esm/models/request-integrations-google-workspace-connect-complete-callback.d.ts +26 -0
- package/esm/models/request-integrations-google-workspace-connect-complete-callback.d.ts.map +1 -0
- package/esm/models/request-integrations-google-workspace-connect-complete-callback.js +23 -0
- package/esm/models/request-integrations-google-workspace-connect-complete-callback.js.map +1 -0
- package/esm/models/request-integrations-list-list-for-org.d.ts +22 -0
- package/esm/models/request-integrations-list-list-for-org.d.ts.map +1 -0
- package/esm/models/request-integrations-list-list-for-org.js +19 -0
- package/esm/models/request-integrations-list-list-for-org.js.map +1 -0
- package/esm/models/response-auth-get-active-org.d.ts +25 -0
- package/esm/models/response-auth-get-active-org.d.ts.map +1 -0
- package/esm/models/response-auth-get-active-org.js +29 -0
- package/esm/models/response-auth-get-active-org.js.map +1 -0
- package/esm/models/response-integrations-google-workspace-connect-complete-callback.d.ts +25 -0
- package/esm/models/response-integrations-google-workspace-connect-complete-callback.d.ts.map +1 -0
- package/esm/models/response-integrations-google-workspace-connect-complete-callback.js +31 -0
- package/esm/models/response-integrations-google-workspace-connect-complete-callback.js.map +1 -0
- package/esm/models/response-integrations-list-list-for-org.d.ts +25 -0
- package/esm/models/response-integrations-list-list-for-org.d.ts.map +1 -0
- package/esm/models/response-integrations-list-list-for-org.js +31 -0
- package/esm/models/response-integrations-list-list-for-org.js.map +1 -0
- package/esm/sdk/auth.d.ts +4 -0
- package/esm/sdk/auth.d.ts.map +1 -1
- package/esm/sdk/auth.js +7 -0
- package/esm/sdk/auth.js.map +1 -1
- package/esm/sdk/code-security.d.ts +8 -8
- package/esm/sdk/code-security.d.ts.map +1 -1
- package/esm/sdk/code-security.js +12 -12
- package/esm/sdk/code-security.js.map +1 -1
- package/esm/sdk/compliance.d.ts +2 -2
- package/esm/sdk/compliance.d.ts.map +1 -1
- package/esm/sdk/compliance.js +4 -4
- package/esm/sdk/compliance.js.map +1 -1
- package/esm/sdk/github.d.ts +6 -6
- package/esm/sdk/github.d.ts.map +1 -1
- package/esm/sdk/github.js +10 -10
- package/esm/sdk/github.js.map +1 -1
- package/esm/sdk/google-workspace-connect.d.ts +2 -2
- package/esm/sdk/google-workspace-connect.d.ts.map +1 -1
- package/esm/sdk/google-workspace-connect.js +4 -4
- package/esm/sdk/google-workspace-connect.js.map +1 -1
- package/esm/sdk/integrations.d.ts +2 -2
- package/esm/sdk/integrations.d.ts.map +1 -1
- package/esm/sdk/integrations.js +4 -4
- package/esm/sdk/integrations.js.map +1 -1
- package/esm/sdk/list.d.ts +2 -2
- package/esm/sdk/list.d.ts.map +1 -1
- package/esm/sdk/list.js +4 -4
- package/esm/sdk/list.js.map +1 -1
- package/esm/sdk/people.d.ts +10 -10
- package/esm/sdk/people.d.ts.map +1 -1
- package/esm/sdk/people.js +18 -18
- package/esm/sdk/people.js.map +1 -1
- package/esm/sdk/sdk.d.ts +18 -18
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +33 -33
- package/esm/sdk/sdk.js.map +1 -1
- package/examples/{adminListOrganizations.example.ts → activityAddComment.example.ts} +8 -3
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/{integrations-list-for-org.ts → auth-get-active-org.ts} +11 -12
- package/src/funcs/{integrations-google-workspace-connect-handle-callback.ts → integrations-google-workspace-connect-complete-callback.ts} +11 -11
- package/src/funcs/integrations-list-list-for-org.ts +171 -0
- package/src/lib/config.ts +3 -3
- package/src/models/index.ts +6 -4
- package/src/models/request-auth-get-active-org.ts +51 -0
- package/src/models/request-integrations-google-workspace-connect-complete-callback.ts +72 -0
- package/src/models/request-integrations-list-list-for-org.ts +60 -0
- package/src/models/response-auth-get-active-org.ts +73 -0
- package/src/models/response-integrations-google-workspace-connect-complete-callback.ts +96 -0
- package/src/models/response-integrations-list-list-for-org.ts +78 -0
- package/src/sdk/auth.ts +15 -0
- package/src/sdk/code-security.ts +12 -12
- package/src/sdk/compliance.ts +5 -5
- package/src/sdk/github.ts +11 -11
- package/src/sdk/google-workspace-connect.ts +8 -6
- package/src/sdk/integrations.ts +5 -5
- package/src/sdk/list.ts +6 -6
- package/src/sdk/people.ts +21 -21
- package/src/sdk/sdk.ts +37 -37
- package/esm/funcs/integrations-google-workspace-connect-handle-callback.d.ts.map +0 -1
- package/esm/funcs/integrations-google-workspace-connect-handle-callback.js.map +0 -1
- package/esm/funcs/integrations-list-for-org.d.ts.map +0 -1
- package/esm/funcs/integrations-list-for-org.js.map +0 -1
- package/esm/models/request-integrations-google-workspace-connect-handle-callback.d.ts +0 -26
- package/esm/models/request-integrations-google-workspace-connect-handle-callback.d.ts.map +0 -1
- package/esm/models/request-integrations-google-workspace-connect-handle-callback.js +0 -23
- package/esm/models/request-integrations-google-workspace-connect-handle-callback.js.map +0 -1
- package/esm/models/request-integrations-list-for-org.d.ts +0 -22
- package/esm/models/request-integrations-list-for-org.d.ts.map +0 -1
- package/esm/models/request-integrations-list-for-org.js +0 -19
- package/esm/models/request-integrations-list-for-org.js.map +0 -1
- package/esm/models/response-integrations-google-workspace-connect-handle-callback.d.ts +0 -25
- package/esm/models/response-integrations-google-workspace-connect-handle-callback.d.ts.map +0 -1
- package/esm/models/response-integrations-google-workspace-connect-handle-callback.js +0 -31
- package/esm/models/response-integrations-google-workspace-connect-handle-callback.js.map +0 -1
- package/esm/models/response-integrations-list-for-org.d.ts +0 -25
- package/esm/models/response-integrations-list-for-org.d.ts.map +0 -1
- package/esm/models/response-integrations-list-for-org.js +0 -29
- package/esm/models/response-integrations-list-for-org.js.map +0 -1
- package/src/models/request-integrations-google-workspace-connect-handle-callback.ts +0 -70
- package/src/models/request-integrations-list-for-org.ts +0 -59
- package/src/models/response-integrations-google-workspace-connect-handle-callback.ts +0 -95
- package/src/models/response-integrations-list-for-org.ts +0 -79
|
@@ -28,15 +28,15 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
28
28
|
import { Result } from "../types/fp.js";
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* Calls a query at the path
|
|
31
|
+
* Calls a query at the path auth.js:getActiveOrg
|
|
32
32
|
*/
|
|
33
|
-
export function
|
|
33
|
+
export function authGetActiveOrg(
|
|
34
34
|
client: CompaiCore,
|
|
35
|
-
request: models.
|
|
35
|
+
request: models.RequestAuthGetActiveOrg,
|
|
36
36
|
options?: RequestOptions,
|
|
37
37
|
): APIPromise<
|
|
38
38
|
Result<
|
|
39
|
-
models.
|
|
39
|
+
models.ResponseAuthGetActiveOrg,
|
|
40
40
|
| errors.FailedResponseError
|
|
41
41
|
| CompaiError
|
|
42
42
|
| ResponseValidationError
|
|
@@ -57,12 +57,12 @@ export function integrationsListForOrg(
|
|
|
57
57
|
|
|
58
58
|
async function $do(
|
|
59
59
|
client: CompaiCore,
|
|
60
|
-
request: models.
|
|
60
|
+
request: models.RequestAuthGetActiveOrg,
|
|
61
61
|
options?: RequestOptions,
|
|
62
62
|
): Promise<
|
|
63
63
|
[
|
|
64
64
|
Result<
|
|
65
|
-
models.
|
|
65
|
+
models.ResponseAuthGetActiveOrg,
|
|
66
66
|
| errors.FailedResponseError
|
|
67
67
|
| CompaiError
|
|
68
68
|
| ResponseValidationError
|
|
@@ -78,8 +78,7 @@ async function $do(
|
|
|
78
78
|
> {
|
|
79
79
|
const parsed = safeParse(
|
|
80
80
|
request,
|
|
81
|
-
(value) =>
|
|
82
|
-
z.parse(models.RequestIntegrationsListForOrg$outboundSchema, value),
|
|
81
|
+
(value) => z.parse(models.RequestAuthGetActiveOrg$outboundSchema, value),
|
|
83
82
|
"Input validation failed",
|
|
84
83
|
);
|
|
85
84
|
if (!parsed.ok) {
|
|
@@ -88,7 +87,7 @@ async function $do(
|
|
|
88
87
|
const payload = parsed.value;
|
|
89
88
|
const body = encodeJSON("body", payload, { explode: true });
|
|
90
89
|
|
|
91
|
-
const path = pathToFunc("/api/run/
|
|
90
|
+
const path = pathToFunc("/api/run/auth/getActiveOrg")();
|
|
92
91
|
|
|
93
92
|
const headers = new Headers(compactMap({
|
|
94
93
|
"Content-Type": "application/json",
|
|
@@ -102,7 +101,7 @@ async function $do(
|
|
|
102
101
|
const context = {
|
|
103
102
|
options: client._options,
|
|
104
103
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
105
|
-
operationID: "
|
|
104
|
+
operationID: "auth_getActiveOrg",
|
|
106
105
|
oAuth2Scopes: null,
|
|
107
106
|
|
|
108
107
|
resolvedSecurity: requestSecurity,
|
|
@@ -146,7 +145,7 @@ async function $do(
|
|
|
146
145
|
};
|
|
147
146
|
|
|
148
147
|
const [result] = await M.match<
|
|
149
|
-
models.
|
|
148
|
+
models.ResponseAuthGetActiveOrg,
|
|
150
149
|
| errors.FailedResponseError
|
|
151
150
|
| CompaiError
|
|
152
151
|
| ResponseValidationError
|
|
@@ -157,7 +156,7 @@ async function $do(
|
|
|
157
156
|
| UnexpectedClientError
|
|
158
157
|
| SDKValidationError
|
|
159
158
|
>(
|
|
160
|
-
M.json(200, models.
|
|
159
|
+
M.json(200, models.ResponseAuthGetActiveOrg$inboundSchema),
|
|
161
160
|
M.jsonErr(400, errors.FailedResponseError$inboundSchema),
|
|
162
161
|
M.jsonErr(500, errors.FailedResponseError$inboundSchema),
|
|
163
162
|
M.fail("4XX"),
|
|
@@ -28,15 +28,15 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
28
28
|
import { Result } from "../types/fp.js";
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* Calls a action at the path integrations/googleWorkspace/connect.js:
|
|
31
|
+
* Calls a action at the path integrations/googleWorkspace/connect.js:completeCallback
|
|
32
32
|
*/
|
|
33
|
-
export function
|
|
33
|
+
export function integrationsGoogleWorkspaceConnectCompleteCallback(
|
|
34
34
|
client: CompaiCore,
|
|
35
|
-
request: models.
|
|
35
|
+
request: models.RequestIntegrationsGoogleWorkspaceConnectCompleteCallback,
|
|
36
36
|
options?: RequestOptions,
|
|
37
37
|
): APIPromise<
|
|
38
38
|
Result<
|
|
39
|
-
models.
|
|
39
|
+
models.ResponseIntegrationsGoogleWorkspaceConnectCompleteCallback,
|
|
40
40
|
| errors.FailedResponseError
|
|
41
41
|
| CompaiError
|
|
42
42
|
| ResponseValidationError
|
|
@@ -57,12 +57,12 @@ export function integrationsGoogleWorkspaceConnectHandleCallback(
|
|
|
57
57
|
|
|
58
58
|
async function $do(
|
|
59
59
|
client: CompaiCore,
|
|
60
|
-
request: models.
|
|
60
|
+
request: models.RequestIntegrationsGoogleWorkspaceConnectCompleteCallback,
|
|
61
61
|
options?: RequestOptions,
|
|
62
62
|
): Promise<
|
|
63
63
|
[
|
|
64
64
|
Result<
|
|
65
|
-
models.
|
|
65
|
+
models.ResponseIntegrationsGoogleWorkspaceConnectCompleteCallback,
|
|
66
66
|
| errors.FailedResponseError
|
|
67
67
|
| CompaiError
|
|
68
68
|
| ResponseValidationError
|
|
@@ -81,7 +81,7 @@ async function $do(
|
|
|
81
81
|
(value) =>
|
|
82
82
|
z.parse(
|
|
83
83
|
models
|
|
84
|
-
.
|
|
84
|
+
.RequestIntegrationsGoogleWorkspaceConnectCompleteCallback$outboundSchema,
|
|
85
85
|
value,
|
|
86
86
|
),
|
|
87
87
|
"Input validation failed",
|
|
@@ -93,7 +93,7 @@ async function $do(
|
|
|
93
93
|
const body = encodeJSON("body", payload, { explode: true });
|
|
94
94
|
|
|
95
95
|
const path = pathToFunc(
|
|
96
|
-
"/api/run/integrations/googleWorkspace/connect/
|
|
96
|
+
"/api/run/integrations/googleWorkspace/connect/completeCallback",
|
|
97
97
|
)();
|
|
98
98
|
|
|
99
99
|
const headers = new Headers(compactMap({
|
|
@@ -108,7 +108,7 @@ async function $do(
|
|
|
108
108
|
const context = {
|
|
109
109
|
options: client._options,
|
|
110
110
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
111
|
-
operationID: "
|
|
111
|
+
operationID: "integrations_googleWorkspace_connect_completeCallback",
|
|
112
112
|
oAuth2Scopes: null,
|
|
113
113
|
|
|
114
114
|
resolvedSecurity: requestSecurity,
|
|
@@ -152,7 +152,7 @@ async function $do(
|
|
|
152
152
|
};
|
|
153
153
|
|
|
154
154
|
const [result] = await M.match<
|
|
155
|
-
models.
|
|
155
|
+
models.ResponseIntegrationsGoogleWorkspaceConnectCompleteCallback,
|
|
156
156
|
| errors.FailedResponseError
|
|
157
157
|
| CompaiError
|
|
158
158
|
| ResponseValidationError
|
|
@@ -166,7 +166,7 @@ async function $do(
|
|
|
166
166
|
M.json(
|
|
167
167
|
200,
|
|
168
168
|
models
|
|
169
|
-
.
|
|
169
|
+
.ResponseIntegrationsGoogleWorkspaceConnectCompleteCallback$inboundSchema,
|
|
170
170
|
),
|
|
171
171
|
M.jsonErr(400, errors.FailedResponseError$inboundSchema),
|
|
172
172
|
M.jsonErr(500, errors.FailedResponseError$inboundSchema),
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { CompaiCore } from "../core.js";
|
|
7
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
8
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
9
|
+
import * as M from "../lib/matchers.js";
|
|
10
|
+
import { compactMap } from "../lib/primitives.js";
|
|
11
|
+
import { safeParse } from "../lib/schemas.js";
|
|
12
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
13
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
14
|
+
import { pathToFunc } from "../lib/url.js";
|
|
15
|
+
import { CompaiError } from "../models/errors/compai-error.js";
|
|
16
|
+
import {
|
|
17
|
+
ConnectionError,
|
|
18
|
+
InvalidRequestError,
|
|
19
|
+
RequestAbortedError,
|
|
20
|
+
RequestTimeoutError,
|
|
21
|
+
UnexpectedClientError,
|
|
22
|
+
} from "../models/errors/http-client-errors.js";
|
|
23
|
+
import * as errors from "../models/errors/index.js";
|
|
24
|
+
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
|
|
26
|
+
import * as models from "../models/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
28
|
+
import { Result } from "../types/fp.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Calls a query at the path integrations/list.js:listForOrg
|
|
32
|
+
*/
|
|
33
|
+
export function integrationsListListForOrg(
|
|
34
|
+
client: CompaiCore,
|
|
35
|
+
request: models.RequestIntegrationsListListForOrg,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): APIPromise<
|
|
38
|
+
Result<
|
|
39
|
+
models.ResponseIntegrationsListListForOrg,
|
|
40
|
+
| errors.FailedResponseError
|
|
41
|
+
| CompaiError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
request,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: CompaiCore,
|
|
60
|
+
request: models.RequestIntegrationsListListForOrg,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
models.ResponseIntegrationsListListForOrg,
|
|
66
|
+
| errors.FailedResponseError
|
|
67
|
+
| CompaiError
|
|
68
|
+
| ResponseValidationError
|
|
69
|
+
| ConnectionError
|
|
70
|
+
| RequestAbortedError
|
|
71
|
+
| RequestTimeoutError
|
|
72
|
+
| InvalidRequestError
|
|
73
|
+
| UnexpectedClientError
|
|
74
|
+
| SDKValidationError
|
|
75
|
+
>,
|
|
76
|
+
APICall,
|
|
77
|
+
]
|
|
78
|
+
> {
|
|
79
|
+
const parsed = safeParse(
|
|
80
|
+
request,
|
|
81
|
+
(value) =>
|
|
82
|
+
z.parse(models.RequestIntegrationsListListForOrg$outboundSchema, value),
|
|
83
|
+
"Input validation failed",
|
|
84
|
+
);
|
|
85
|
+
if (!parsed.ok) {
|
|
86
|
+
return [parsed, { status: "invalid" }];
|
|
87
|
+
}
|
|
88
|
+
const payload = parsed.value;
|
|
89
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
90
|
+
|
|
91
|
+
const path = pathToFunc("/api/run/integrations/list/listForOrg")();
|
|
92
|
+
|
|
93
|
+
const headers = new Headers(compactMap({
|
|
94
|
+
"Content-Type": "application/json",
|
|
95
|
+
Accept: "application/json",
|
|
96
|
+
}));
|
|
97
|
+
|
|
98
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
99
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
100
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
101
|
+
|
|
102
|
+
const context = {
|
|
103
|
+
options: client._options,
|
|
104
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
105
|
+
operationID: "integrations_list_listForOrg",
|
|
106
|
+
oAuth2Scopes: null,
|
|
107
|
+
|
|
108
|
+
resolvedSecurity: requestSecurity,
|
|
109
|
+
|
|
110
|
+
securitySource: client._options.bearerAuth,
|
|
111
|
+
retryConfig: options?.retries
|
|
112
|
+
|| client._options.retryConfig
|
|
113
|
+
|| { strategy: "none" },
|
|
114
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const requestRes = client._createRequest(context, {
|
|
118
|
+
security: requestSecurity,
|
|
119
|
+
method: "POST",
|
|
120
|
+
baseURL: options?.serverURL,
|
|
121
|
+
path: path,
|
|
122
|
+
headers: headers,
|
|
123
|
+
body: body,
|
|
124
|
+
userAgent: client._options.userAgent,
|
|
125
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
126
|
+
}, options);
|
|
127
|
+
if (!requestRes.ok) {
|
|
128
|
+
return [requestRes, { status: "invalid" }];
|
|
129
|
+
}
|
|
130
|
+
const req = requestRes.value;
|
|
131
|
+
|
|
132
|
+
const doResult = await client._do(req, {
|
|
133
|
+
context,
|
|
134
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
135
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
136
|
+
retryConfig: context.retryConfig,
|
|
137
|
+
retryCodes: context.retryCodes,
|
|
138
|
+
});
|
|
139
|
+
if (!doResult.ok) {
|
|
140
|
+
return [doResult, { status: "request-error", request: req }];
|
|
141
|
+
}
|
|
142
|
+
const response = doResult.value;
|
|
143
|
+
|
|
144
|
+
const responseFields = {
|
|
145
|
+
HttpMeta: { Response: response, Request: req },
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const [result] = await M.match<
|
|
149
|
+
models.ResponseIntegrationsListListForOrg,
|
|
150
|
+
| errors.FailedResponseError
|
|
151
|
+
| CompaiError
|
|
152
|
+
| ResponseValidationError
|
|
153
|
+
| ConnectionError
|
|
154
|
+
| RequestAbortedError
|
|
155
|
+
| RequestTimeoutError
|
|
156
|
+
| InvalidRequestError
|
|
157
|
+
| UnexpectedClientError
|
|
158
|
+
| SDKValidationError
|
|
159
|
+
>(
|
|
160
|
+
M.json(200, models.ResponseIntegrationsListListForOrg$inboundSchema),
|
|
161
|
+
M.jsonErr(400, errors.FailedResponseError$inboundSchema),
|
|
162
|
+
M.jsonErr(500, errors.FailedResponseError$inboundSchema),
|
|
163
|
+
M.fail("4XX"),
|
|
164
|
+
M.fail("5XX"),
|
|
165
|
+
)(response, req, { extraFields: responseFields });
|
|
166
|
+
if (!result.ok) {
|
|
167
|
+
return [result, { status: "complete", request: req, response }];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return [result, { status: "complete", request: req, response }];
|
|
171
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { Params, pathToFunc } from "./url.js";
|
|
|
11
11
|
* Contains the list of servers available to the SDK
|
|
12
12
|
*/
|
|
13
13
|
export const ServerList = [
|
|
14
|
-
"
|
|
14
|
+
"https://fleet-sparrow-75.convex.cloud",
|
|
15
15
|
] as const;
|
|
16
16
|
|
|
17
17
|
export type SDKOptions = {
|
|
@@ -58,8 +58,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
58
58
|
export const SDK_METADATA = {
|
|
59
59
|
language: "typescript",
|
|
60
60
|
openapiDocVersion: "0.0.0",
|
|
61
|
-
sdkVersion: "0.1.
|
|
61
|
+
sdkVersion: "0.1.2",
|
|
62
62
|
genVersion: "2.884.11",
|
|
63
63
|
userAgent:
|
|
64
|
-
"speakeasy-sdk/typescript 0.1.
|
|
64
|
+
"speakeasy-sdk/typescript 0.1.2 2.884.11 0.0.0 @trycomp/compound-sdk",
|
|
65
65
|
} as const;
|
package/src/models/index.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from "./request-admin-get-org-by-id.js";
|
|
|
10
10
|
export * from "./request-admin-is-current-user-admin.js";
|
|
11
11
|
export * from "./request-admin-list-invoices-for-org.js";
|
|
12
12
|
export * from "./request-admin-list-organizations.js";
|
|
13
|
+
export * from "./request-auth-get-active-org.js";
|
|
13
14
|
export * from "./request-auth-get-current-user.js";
|
|
14
15
|
export * from "./request-compliance-library-get-framework-by-slug.js";
|
|
15
16
|
export * from "./request-compliance-library-get-policy-template-by-slug.js";
|
|
@@ -41,10 +42,10 @@ export * from "./request-integrations-github-mutations-disconnect.js";
|
|
|
41
42
|
export * from "./request-integrations-github-mutations-set-repository-scope.js";
|
|
42
43
|
export * from "./request-integrations-github-mutations-update-config.js";
|
|
43
44
|
export * from "./request-integrations-github-queries-get-for-org.js";
|
|
44
|
-
export * from "./request-integrations-google-workspace-connect-
|
|
45
|
+
export * from "./request-integrations-google-workspace-connect-complete-callback.js";
|
|
45
46
|
export * from "./request-integrations-google-workspace-connect-start-o-auth.js";
|
|
46
47
|
export * from "./request-integrations-google-workspace-queries-get-for-org.js";
|
|
47
|
-
export * from "./request-integrations-list-for-org.js";
|
|
48
|
+
export * from "./request-integrations-list-list-for-org.js";
|
|
48
49
|
export * from "./request-modules-api-keys-list-for-org.js";
|
|
49
50
|
export * from "./request-modules-code-security-autofix-create-fix-pull-request.js";
|
|
50
51
|
export * from "./request-modules-code-security-deep-security-audit-latest-for-repo.js";
|
|
@@ -167,6 +168,7 @@ export * from "./response-admin-get-org-by-id.js";
|
|
|
167
168
|
export * from "./response-admin-is-current-user-admin.js";
|
|
168
169
|
export * from "./response-admin-list-invoices-for-org.js";
|
|
169
170
|
export * from "./response-admin-list-organizations.js";
|
|
171
|
+
export * from "./response-auth-get-active-org.js";
|
|
170
172
|
export * from "./response-auth-get-current-user.js";
|
|
171
173
|
export * from "./response-compliance-library-get-framework-by-slug.js";
|
|
172
174
|
export * from "./response-compliance-library-get-policy-template-by-slug.js";
|
|
@@ -198,10 +200,10 @@ export * from "./response-integrations-github-mutations-disconnect.js";
|
|
|
198
200
|
export * from "./response-integrations-github-mutations-set-repository-scope.js";
|
|
199
201
|
export * from "./response-integrations-github-mutations-update-config.js";
|
|
200
202
|
export * from "./response-integrations-github-queries-get-for-org.js";
|
|
201
|
-
export * from "./response-integrations-google-workspace-connect-
|
|
203
|
+
export * from "./response-integrations-google-workspace-connect-complete-callback.js";
|
|
202
204
|
export * from "./response-integrations-google-workspace-connect-start-o-auth.js";
|
|
203
205
|
export * from "./response-integrations-google-workspace-queries-get-for-org.js";
|
|
204
|
-
export * from "./response-integrations-list-for-org.js";
|
|
206
|
+
export * from "./response-integrations-list-list-for-org.js";
|
|
205
207
|
export * from "./response-modules-api-keys-list-for-org.js";
|
|
206
208
|
export * from "./response-modules-code-security-autofix-create-fix-pull-request.js";
|
|
207
209
|
export * from "./response-modules-code-security-deep-security-audit-latest-for-repo.js";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export type RequestAuthGetActiveOrgArgs = {};
|
|
8
|
+
|
|
9
|
+
export type RequestAuthGetActiveOrg = {
|
|
10
|
+
args: RequestAuthGetActiveOrgArgs;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/** @internal */
|
|
14
|
+
export type RequestAuthGetActiveOrgArgs$Outbound = {};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const RequestAuthGetActiveOrgArgs$outboundSchema: z.ZodMiniType<
|
|
18
|
+
RequestAuthGetActiveOrgArgs$Outbound,
|
|
19
|
+
RequestAuthGetActiveOrgArgs
|
|
20
|
+
> = z.object({});
|
|
21
|
+
|
|
22
|
+
export function requestAuthGetActiveOrgArgsToJSON(
|
|
23
|
+
requestAuthGetActiveOrgArgs: RequestAuthGetActiveOrgArgs,
|
|
24
|
+
): string {
|
|
25
|
+
return JSON.stringify(
|
|
26
|
+
RequestAuthGetActiveOrgArgs$outboundSchema.parse(
|
|
27
|
+
requestAuthGetActiveOrgArgs,
|
|
28
|
+
),
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export type RequestAuthGetActiveOrg$Outbound = {
|
|
34
|
+
args: RequestAuthGetActiveOrgArgs$Outbound;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const RequestAuthGetActiveOrg$outboundSchema: z.ZodMiniType<
|
|
39
|
+
RequestAuthGetActiveOrg$Outbound,
|
|
40
|
+
RequestAuthGetActiveOrg
|
|
41
|
+
> = z.object({
|
|
42
|
+
args: z.lazy(() => RequestAuthGetActiveOrgArgs$outboundSchema),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export function requestAuthGetActiveOrgToJSON(
|
|
46
|
+
requestAuthGetActiveOrg: RequestAuthGetActiveOrg,
|
|
47
|
+
): string {
|
|
48
|
+
return JSON.stringify(
|
|
49
|
+
RequestAuthGetActiveOrg$outboundSchema.parse(requestAuthGetActiveOrg),
|
|
50
|
+
);
|
|
51
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export type RequestIntegrationsGoogleWorkspaceConnectCompleteCallbackArgs = {
|
|
8
|
+
code: string;
|
|
9
|
+
orgId: string;
|
|
10
|
+
redirectUri: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type RequestIntegrationsGoogleWorkspaceConnectCompleteCallback = {
|
|
14
|
+
args: RequestIntegrationsGoogleWorkspaceConnectCompleteCallbackArgs;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export type RequestIntegrationsGoogleWorkspaceConnectCompleteCallbackArgs$Outbound =
|
|
19
|
+
{
|
|
20
|
+
code: string;
|
|
21
|
+
orgId: string;
|
|
22
|
+
redirectUri: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const RequestIntegrationsGoogleWorkspaceConnectCompleteCallbackArgs$outboundSchema:
|
|
27
|
+
z.ZodMiniType<
|
|
28
|
+
RequestIntegrationsGoogleWorkspaceConnectCompleteCallbackArgs$Outbound,
|
|
29
|
+
RequestIntegrationsGoogleWorkspaceConnectCompleteCallbackArgs
|
|
30
|
+
> = z.object({
|
|
31
|
+
code: z.string(),
|
|
32
|
+
orgId: z.string(),
|
|
33
|
+
redirectUri: z.string(),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export function requestIntegrationsGoogleWorkspaceConnectCompleteCallbackArgsToJSON(
|
|
37
|
+
requestIntegrationsGoogleWorkspaceConnectCompleteCallbackArgs:
|
|
38
|
+
RequestIntegrationsGoogleWorkspaceConnectCompleteCallbackArgs,
|
|
39
|
+
): string {
|
|
40
|
+
return JSON.stringify(
|
|
41
|
+
RequestIntegrationsGoogleWorkspaceConnectCompleteCallbackArgs$outboundSchema
|
|
42
|
+
.parse(requestIntegrationsGoogleWorkspaceConnectCompleteCallbackArgs),
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export type RequestIntegrationsGoogleWorkspaceConnectCompleteCallback$Outbound =
|
|
48
|
+
{
|
|
49
|
+
args:
|
|
50
|
+
RequestIntegrationsGoogleWorkspaceConnectCompleteCallbackArgs$Outbound;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const RequestIntegrationsGoogleWorkspaceConnectCompleteCallback$outboundSchema:
|
|
55
|
+
z.ZodMiniType<
|
|
56
|
+
RequestIntegrationsGoogleWorkspaceConnectCompleteCallback$Outbound,
|
|
57
|
+
RequestIntegrationsGoogleWorkspaceConnectCompleteCallback
|
|
58
|
+
> = z.object({
|
|
59
|
+
args: z.lazy(() =>
|
|
60
|
+
RequestIntegrationsGoogleWorkspaceConnectCompleteCallbackArgs$outboundSchema
|
|
61
|
+
),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export function requestIntegrationsGoogleWorkspaceConnectCompleteCallbackToJSON(
|
|
65
|
+
requestIntegrationsGoogleWorkspaceConnectCompleteCallback:
|
|
66
|
+
RequestIntegrationsGoogleWorkspaceConnectCompleteCallback,
|
|
67
|
+
): string {
|
|
68
|
+
return JSON.stringify(
|
|
69
|
+
RequestIntegrationsGoogleWorkspaceConnectCompleteCallback$outboundSchema
|
|
70
|
+
.parse(requestIntegrationsGoogleWorkspaceConnectCompleteCallback),
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export type RequestIntegrationsListListForOrgArgs = {
|
|
8
|
+
orgId: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type RequestIntegrationsListListForOrg = {
|
|
12
|
+
args: RequestIntegrationsListListForOrgArgs;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export type RequestIntegrationsListListForOrgArgs$Outbound = {
|
|
17
|
+
orgId: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const RequestIntegrationsListListForOrgArgs$outboundSchema:
|
|
22
|
+
z.ZodMiniType<
|
|
23
|
+
RequestIntegrationsListListForOrgArgs$Outbound,
|
|
24
|
+
RequestIntegrationsListListForOrgArgs
|
|
25
|
+
> = z.object({
|
|
26
|
+
orgId: z.string(),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function requestIntegrationsListListForOrgArgsToJSON(
|
|
30
|
+
requestIntegrationsListListForOrgArgs: RequestIntegrationsListListForOrgArgs,
|
|
31
|
+
): string {
|
|
32
|
+
return JSON.stringify(
|
|
33
|
+
RequestIntegrationsListListForOrgArgs$outboundSchema.parse(
|
|
34
|
+
requestIntegrationsListListForOrgArgs,
|
|
35
|
+
),
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type RequestIntegrationsListListForOrg$Outbound = {
|
|
41
|
+
args: RequestIntegrationsListListForOrgArgs$Outbound;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const RequestIntegrationsListListForOrg$outboundSchema: z.ZodMiniType<
|
|
46
|
+
RequestIntegrationsListListForOrg$Outbound,
|
|
47
|
+
RequestIntegrationsListListForOrg
|
|
48
|
+
> = z.object({
|
|
49
|
+
args: z.lazy(() => RequestIntegrationsListListForOrgArgs$outboundSchema),
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export function requestIntegrationsListListForOrgToJSON(
|
|
53
|
+
requestIntegrationsListListForOrg: RequestIntegrationsListListForOrg,
|
|
54
|
+
): string {
|
|
55
|
+
return JSON.stringify(
|
|
56
|
+
RequestIntegrationsListListForOrg$outboundSchema.parse(
|
|
57
|
+
requestIntegrationsListListForOrg,
|
|
58
|
+
),
|
|
59
|
+
);
|
|
60
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
import { OpenEnum } from "../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
+
import * as types from "../types/primitives.js";
|
|
11
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
12
|
+
|
|
13
|
+
export const ResponseAuthGetActiveOrgStatus = {
|
|
14
|
+
Success: "success",
|
|
15
|
+
Error: "error",
|
|
16
|
+
} as const;
|
|
17
|
+
export type ResponseAuthGetActiveOrgStatus = OpenEnum<
|
|
18
|
+
typeof ResponseAuthGetActiveOrgStatus
|
|
19
|
+
>;
|
|
20
|
+
|
|
21
|
+
export type ResponseAuthGetActiveOrgErrorData = {};
|
|
22
|
+
|
|
23
|
+
export type ResponseAuthGetActiveOrg = {
|
|
24
|
+
status: ResponseAuthGetActiveOrgStatus;
|
|
25
|
+
errorMessage?: string | undefined;
|
|
26
|
+
errorData?: ResponseAuthGetActiveOrgErrorData | undefined;
|
|
27
|
+
value?: any | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const ResponseAuthGetActiveOrgStatus$inboundSchema: z.ZodMiniType<
|
|
32
|
+
ResponseAuthGetActiveOrgStatus,
|
|
33
|
+
unknown
|
|
34
|
+
> = openEnums.inboundSchema(ResponseAuthGetActiveOrgStatus);
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const ResponseAuthGetActiveOrgErrorData$inboundSchema: z.ZodMiniType<
|
|
38
|
+
ResponseAuthGetActiveOrgErrorData,
|
|
39
|
+
unknown
|
|
40
|
+
> = z.object({});
|
|
41
|
+
|
|
42
|
+
export function responseAuthGetActiveOrgErrorDataFromJSON(
|
|
43
|
+
jsonString: string,
|
|
44
|
+
): SafeParseResult<ResponseAuthGetActiveOrgErrorData, SDKValidationError> {
|
|
45
|
+
return safeParse(
|
|
46
|
+
jsonString,
|
|
47
|
+
(x) => ResponseAuthGetActiveOrgErrorData$inboundSchema.parse(JSON.parse(x)),
|
|
48
|
+
`Failed to parse 'ResponseAuthGetActiveOrgErrorData' from JSON`,
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const ResponseAuthGetActiveOrg$inboundSchema: z.ZodMiniType<
|
|
54
|
+
ResponseAuthGetActiveOrg,
|
|
55
|
+
unknown
|
|
56
|
+
> = z.object({
|
|
57
|
+
status: ResponseAuthGetActiveOrgStatus$inboundSchema,
|
|
58
|
+
errorMessage: types.optional(types.string()),
|
|
59
|
+
errorData: types.optional(
|
|
60
|
+
z.lazy(() => ResponseAuthGetActiveOrgErrorData$inboundSchema),
|
|
61
|
+
),
|
|
62
|
+
value: types.optional(z.any()),
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
export function responseAuthGetActiveOrgFromJSON(
|
|
66
|
+
jsonString: string,
|
|
67
|
+
): SafeParseResult<ResponseAuthGetActiveOrg, SDKValidationError> {
|
|
68
|
+
return safeParse(
|
|
69
|
+
jsonString,
|
|
70
|
+
(x) => ResponseAuthGetActiveOrg$inboundSchema.parse(JSON.parse(x)),
|
|
71
|
+
`Failed to parse 'ResponseAuthGetActiveOrg' from JSON`,
|
|
72
|
+
);
|
|
73
|
+
}
|