@unified-api/typescript-sdk 2.9.21 → 2.9.23
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 +1 -1
- package/README.md +20 -8
- package/docs/sdks/account/README.md +12 -12
- package/docs/sdks/accounting/README.md +76 -76
- package/docs/sdks/activity/README.md +12 -12
- package/docs/sdks/application/README.md +12 -12
- package/docs/sdks/applicationstatus/README.md +2 -2
- package/docs/sdks/ats/README.md +90 -90
- package/docs/sdks/auth/README.md +4 -4
- package/docs/sdks/call/README.md +2 -2
- package/docs/sdks/candidate/README.md +12 -12
- package/docs/sdks/channel/README.md +4 -4
- package/docs/sdks/collection/README.md +12 -12
- package/docs/sdks/comment/README.md +494 -0
- package/docs/sdks/commerce/README.md +48 -48
- package/docs/sdks/company/README.md +30 -30
- package/docs/sdks/contact/README.md +36 -36
- package/docs/sdks/crm/README.md +72 -72
- package/docs/sdks/customer/README.md +12 -12
- package/docs/sdks/deal/README.md +12 -12
- package/docs/sdks/document/README.md +12 -12
- package/docs/sdks/employee/README.md +12 -12
- package/docs/sdks/enrich/README.md +4 -4
- package/docs/sdks/event/README.md +12 -12
- package/docs/sdks/file/README.md +12 -12
- package/docs/sdks/genai/README.md +4 -4
- package/docs/sdks/group/README.md +12 -12
- package/docs/sdks/hris/README.md +56 -56
- package/docs/sdks/integration/README.md +4 -4
- package/docs/sdks/interview/README.md +12 -12
- package/docs/sdks/inventory/README.md +12 -12
- package/docs/sdks/invoice/README.md +12 -12
- package/docs/sdks/item/README.md +12 -12
- package/docs/sdks/job/README.md +12 -12
- package/docs/sdks/journal/README.md +12 -12
- package/docs/sdks/kms/README.md +518 -24
- package/docs/sdks/lead/README.md +12 -12
- package/docs/sdks/link/README.md +12 -12
- package/docs/sdks/list/README.md +12 -12
- package/docs/sdks/location/README.md +24 -24
- package/docs/sdks/login/README.md +2 -2
- package/docs/sdks/martech/README.md +24 -24
- package/docs/sdks/member/README.md +12 -12
- package/docs/sdks/message/README.md +12 -12
- package/docs/sdks/messaging/README.md +16 -16
- package/docs/sdks/model/README.md +2 -2
- package/docs/sdks/note/README.md +12 -12
- package/docs/sdks/organization/README.md +4 -4
- package/docs/sdks/page/README.md +12 -12
- package/docs/sdks/passthrough/README.md +28 -28
- package/docs/sdks/payment/README.md +32 -32
- package/docs/sdks/payout/README.md +4 -4
- package/docs/sdks/payslip/README.md +4 -4
- package/docs/sdks/person/README.md +2 -2
- package/docs/sdks/pipeline/README.md +12 -12
- package/docs/sdks/project/README.md +12 -12
- package/docs/sdks/prompt/README.md +2 -2
- package/docs/sdks/refund/README.md +4 -4
- package/docs/sdks/scorecard/README.md +12 -12
- package/docs/sdks/space/README.md +12 -12
- package/docs/sdks/storage/README.md +12 -12
- package/docs/sdks/task/README.md +24 -24
- package/docs/sdks/taxrate/README.md +12 -12
- package/docs/sdks/ticket/README.md +12 -12
- package/docs/sdks/ticketing/README.md +36 -36
- package/docs/sdks/timeoff/README.md +4 -4
- package/docs/sdks/transaction/README.md +12 -12
- package/docs/sdks/uc/README.md +14 -14
- package/docs/sdks/unified/README.md +4 -4
- package/funcs/commentCreateKmsComment.d.ts +13 -0
- package/funcs/commentCreateKmsComment.d.ts.map +1 -0
- package/funcs/commentCreateKmsComment.js +104 -0
- package/funcs/commentCreateKmsComment.js.map +1 -0
- package/funcs/commentGetKmsComment.d.ts +13 -0
- package/funcs/commentGetKmsComment.d.ts.map +1 -0
- package/funcs/commentGetKmsComment.js +107 -0
- package/funcs/commentGetKmsComment.js.map +1 -0
- package/funcs/commentListKmsComments.d.ts +13 -0
- package/funcs/commentListKmsComments.d.ts.map +1 -0
- package/funcs/commentListKmsComments.js +113 -0
- package/funcs/commentListKmsComments.js.map +1 -0
- package/funcs/commentPatchKmsComment.d.ts +13 -0
- package/funcs/commentPatchKmsComment.d.ts.map +1 -0
- package/funcs/commentPatchKmsComment.js +108 -0
- package/funcs/commentPatchKmsComment.js.map +1 -0
- package/funcs/commentRemoveKmsComment.d.ts +12 -0
- package/funcs/commentRemoveKmsComment.d.ts.map +1 -0
- package/funcs/commentRemoveKmsComment.js +105 -0
- package/funcs/commentRemoveKmsComment.js.map +1 -0
- package/funcs/commentUpdateKmsComment.d.ts +13 -0
- package/funcs/commentUpdateKmsComment.d.ts.map +1 -0
- package/funcs/commentUpdateKmsComment.js +108 -0
- package/funcs/commentUpdateKmsComment.js.map +1 -0
- package/funcs/kmsCreateKmsComment.d.ts +13 -0
- package/funcs/kmsCreateKmsComment.d.ts.map +1 -0
- package/funcs/kmsCreateKmsComment.js +104 -0
- package/funcs/kmsCreateKmsComment.js.map +1 -0
- package/funcs/kmsGetKmsComment.d.ts +13 -0
- package/funcs/kmsGetKmsComment.d.ts.map +1 -0
- package/funcs/kmsGetKmsComment.js +107 -0
- package/funcs/kmsGetKmsComment.js.map +1 -0
- package/funcs/kmsListKmsComments.d.ts +13 -0
- package/funcs/kmsListKmsComments.d.ts.map +1 -0
- package/funcs/kmsListKmsComments.js +113 -0
- package/funcs/kmsListKmsComments.js.map +1 -0
- package/funcs/kmsPatchKmsComment.d.ts +13 -0
- package/funcs/kmsPatchKmsComment.d.ts.map +1 -0
- package/funcs/kmsPatchKmsComment.js +108 -0
- package/funcs/kmsPatchKmsComment.js.map +1 -0
- package/funcs/kmsRemoveKmsComment.d.ts +12 -0
- package/funcs/kmsRemoveKmsComment.d.ts.map +1 -0
- package/funcs/kmsRemoveKmsComment.js +105 -0
- package/funcs/kmsRemoveKmsComment.js.map +1 -0
- package/funcs/kmsUpdateKmsComment.d.ts +13 -0
- package/funcs/kmsUpdateKmsComment.d.ts.map +1 -0
- package/funcs/kmsUpdateKmsComment.js +108 -0
- package/funcs/kmsUpdateKmsComment.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/schemas.d.ts +1 -1
- package/lib/schemas.d.ts.map +1 -1
- package/lib/schemas.js +4 -1
- package/lib/schemas.js.map +1 -1
- package/package.json +1 -1
- package/sdk/comment.d.ts +24 -0
- package/sdk/comment.d.ts.map +1 -1
- package/sdk/comment.js +42 -0
- package/sdk/comment.js.map +1 -1
- package/sdk/kms.d.ts +24 -0
- package/sdk/kms.d.ts.map +1 -1
- package/sdk/kms.js +42 -0
- package/sdk/kms.js.map +1 -1
- package/sdk/models/operations/createkmscomment.d.ts +40 -0
- package/sdk/models/operations/createkmscomment.d.ts.map +1 -0
- package/sdk/models/operations/createkmscomment.js +75 -0
- package/sdk/models/operations/createkmscomment.js.map +1 -0
- package/sdk/models/operations/getkmscomment.d.ts +42 -0
- package/sdk/models/operations/getkmscomment.d.ts.map +1 -0
- package/sdk/models/operations/getkmscomment.js +72 -0
- package/sdk/models/operations/getkmscomment.js.map +1 -0
- package/sdk/models/operations/index.d.ts +6 -0
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +6 -0
- package/sdk/models/operations/index.js.map +1 -1
- package/sdk/models/operations/listkmscomments.d.ts +61 -0
- package/sdk/models/operations/listkmscomments.d.ts.map +1 -0
- package/sdk/models/operations/listkmscomments.js +95 -0
- package/sdk/models/operations/listkmscomments.js.map +1 -0
- package/sdk/models/operations/patchkmscomment.d.ts +45 -0
- package/sdk/models/operations/patchkmscomment.d.ts.map +1 -0
- package/sdk/models/operations/patchkmscomment.js +77 -0
- package/sdk/models/operations/patchkmscomment.js.map +1 -0
- package/sdk/models/operations/removekmscomment.d.ts +66 -0
- package/sdk/models/operations/removekmscomment.d.ts.map +1 -0
- package/sdk/models/operations/removekmscomment.js +105 -0
- package/sdk/models/operations/removekmscomment.js.map +1 -0
- package/sdk/models/operations/updatekmscomment.d.ts +45 -0
- package/sdk/models/operations/updatekmscomment.d.ts.map +1 -0
- package/sdk/models/operations/updatekmscomment.js +77 -0
- package/sdk/models/operations/updatekmscomment.js.map +1 -0
- package/sdk/models/shared/index.d.ts +1 -0
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +1 -0
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/integrationsupport.d.ts +32 -0
- package/sdk/models/shared/integrationsupport.d.ts.map +1 -1
- package/sdk/models/shared/integrationsupport.js +34 -5
- package/sdk/models/shared/integrationsupport.js.map +1 -1
- package/sdk/models/shared/kmscomment.d.ts +105 -0
- package/sdk/models/shared/kmscomment.d.ts.map +1 -0
- package/sdk/models/shared/kmscomment.js +138 -0
- package/sdk/models/shared/kmscomment.js.map +1 -0
- package/sdk/models/shared/kmspagemetadata.d.ts +2 -6
- package/sdk/models/shared/kmspagemetadata.d.ts.map +1 -1
- package/sdk/models/shared/kmspagemetadata.js +2 -2
- package/sdk/models/shared/kmspagemetadata.js.map +1 -1
- package/sdk/models/shared/repoorganization.d.ts +5 -0
- package/sdk/models/shared/repoorganization.d.ts.map +1 -1
- package/sdk/models/shared/repoorganization.js +4 -0
- package/sdk/models/shared/repoorganization.js.map +1 -1
- package/sdk/models/shared/webhook.d.ts +3 -0
- package/sdk/models/shared/webhook.d.ts.map +1 -1
- package/sdk/models/shared/webhook.js +1 -0
- package/sdk/models/shared/webhook.js.map +1 -1
- package/sdk/sdk.d.ts +2 -2
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +3 -3
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/commentCreateKmsComment.ts +135 -0
- package/src/funcs/commentGetKmsComment.ts +138 -0
- package/src/funcs/commentListKmsComments.ts +144 -0
- package/src/funcs/commentPatchKmsComment.ts +139 -0
- package/src/funcs/commentRemoveKmsComment.ts +141 -0
- package/src/funcs/commentUpdateKmsComment.ts +139 -0
- package/src/funcs/kmsCreateKmsComment.ts +135 -0
- package/src/funcs/kmsGetKmsComment.ts +138 -0
- package/src/funcs/kmsListKmsComments.ts +144 -0
- package/src/funcs/kmsPatchKmsComment.ts +139 -0
- package/src/funcs/kmsRemoveKmsComment.ts +141 -0
- package/src/funcs/kmsUpdateKmsComment.ts +139 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/schemas.ts +5 -0
- package/src/sdk/comment.ts +90 -0
- package/src/sdk/kms.ts +90 -0
- package/src/sdk/models/operations/createkmscomment.ts +92 -0
- package/src/sdk/models/operations/getkmscomment.ts +92 -0
- package/src/sdk/models/operations/index.ts +6 -0
- package/src/sdk/models/operations/listkmscomments.ts +134 -0
- package/src/sdk/models/operations/patchkmscomment.ts +99 -0
- package/src/sdk/models/operations/removekmscomment.ts +151 -0
- package/src/sdk/models/operations/updatekmscomment.ts +99 -0
- package/src/sdk/models/shared/index.ts +1 -0
- package/src/sdk/models/shared/integrationsupport.ts +38 -0
- package/src/sdk/models/shared/kmscomment.ts +173 -0
- package/src/sdk/models/shared/kmspagemetadata.ts +4 -4
- package/src/sdk/models/shared/repoorganization.ts +9 -0
- package/src/sdk/models/shared/webhook.ts +1 -0
- package/src/sdk/sdk.ts +5 -5
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { UnifiedToCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
20
|
+
import { SDKError } from "../sdk/models/errors/sdkerror.js";
|
|
21
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
22
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
23
|
+
import * as shared from "../sdk/models/shared/index.js";
|
|
24
|
+
import { Result } from "../sdk/types/fp.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Create a comment
|
|
28
|
+
*/
|
|
29
|
+
export async function commentCreateKmsComment(
|
|
30
|
+
client: UnifiedToCore,
|
|
31
|
+
request: operations.CreateKmsCommentRequest,
|
|
32
|
+
options?: RequestOptions,
|
|
33
|
+
): Promise<
|
|
34
|
+
Result<
|
|
35
|
+
shared.KmsComment,
|
|
36
|
+
| SDKError
|
|
37
|
+
| SDKValidationError
|
|
38
|
+
| UnexpectedClientError
|
|
39
|
+
| InvalidRequestError
|
|
40
|
+
| RequestAbortedError
|
|
41
|
+
| RequestTimeoutError
|
|
42
|
+
| ConnectionError
|
|
43
|
+
>
|
|
44
|
+
> {
|
|
45
|
+
const parsed = safeParse(
|
|
46
|
+
request,
|
|
47
|
+
(value) => operations.CreateKmsCommentRequest$outboundSchema.parse(value),
|
|
48
|
+
"Input validation failed",
|
|
49
|
+
);
|
|
50
|
+
if (!parsed.ok) {
|
|
51
|
+
return parsed;
|
|
52
|
+
}
|
|
53
|
+
const payload = parsed.value;
|
|
54
|
+
const body = encodeJSON("body", payload.KmsComment, { explode: true });
|
|
55
|
+
|
|
56
|
+
const pathParams = {
|
|
57
|
+
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
58
|
+
explode: false,
|
|
59
|
+
charEncoding: "percent",
|
|
60
|
+
}),
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const path = pathToFunc("/kms/{connection_id}/comment")(pathParams);
|
|
64
|
+
|
|
65
|
+
const query = encodeFormQuery({
|
|
66
|
+
"fields": payload.fields,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const headers = new Headers(compactMap({
|
|
70
|
+
"Content-Type": "application/json",
|
|
71
|
+
Accept: "application/json",
|
|
72
|
+
}));
|
|
73
|
+
|
|
74
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
75
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
76
|
+
|
|
77
|
+
const context = {
|
|
78
|
+
operationID: "createKmsComment",
|
|
79
|
+
oAuth2Scopes: [],
|
|
80
|
+
|
|
81
|
+
resolvedSecurity: requestSecurity,
|
|
82
|
+
|
|
83
|
+
securitySource: client._options.security,
|
|
84
|
+
retryConfig: options?.retries
|
|
85
|
+
|| client._options.retryConfig
|
|
86
|
+
|| { strategy: "none" },
|
|
87
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const requestRes = client._createRequest(context, {
|
|
91
|
+
security: requestSecurity,
|
|
92
|
+
method: "POST",
|
|
93
|
+
baseURL: options?.serverURL,
|
|
94
|
+
path: path,
|
|
95
|
+
headers: headers,
|
|
96
|
+
query: query,
|
|
97
|
+
body: body,
|
|
98
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
99
|
+
}, options);
|
|
100
|
+
if (!requestRes.ok) {
|
|
101
|
+
return requestRes;
|
|
102
|
+
}
|
|
103
|
+
const req = requestRes.value;
|
|
104
|
+
|
|
105
|
+
const doResult = await client._do(req, {
|
|
106
|
+
context,
|
|
107
|
+
errorCodes: ["4XX", "5XX"],
|
|
108
|
+
retryConfig: context.retryConfig,
|
|
109
|
+
retryCodes: context.retryCodes,
|
|
110
|
+
});
|
|
111
|
+
if (!doResult.ok) {
|
|
112
|
+
return doResult;
|
|
113
|
+
}
|
|
114
|
+
const response = doResult.value;
|
|
115
|
+
|
|
116
|
+
const [result] = await M.match<
|
|
117
|
+
shared.KmsComment,
|
|
118
|
+
| SDKError
|
|
119
|
+
| SDKValidationError
|
|
120
|
+
| UnexpectedClientError
|
|
121
|
+
| InvalidRequestError
|
|
122
|
+
| RequestAbortedError
|
|
123
|
+
| RequestTimeoutError
|
|
124
|
+
| ConnectionError
|
|
125
|
+
>(
|
|
126
|
+
M.json(200, shared.KmsComment$inboundSchema),
|
|
127
|
+
M.fail("4XX"),
|
|
128
|
+
M.fail("5XX"),
|
|
129
|
+
)(response);
|
|
130
|
+
if (!result.ok) {
|
|
131
|
+
return result;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return result;
|
|
135
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { UnifiedToCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
20
|
+
import { SDKError } from "../sdk/models/errors/sdkerror.js";
|
|
21
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
22
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
23
|
+
import * as shared from "../sdk/models/shared/index.js";
|
|
24
|
+
import { Result } from "../sdk/types/fp.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Retrieve a comment
|
|
28
|
+
*/
|
|
29
|
+
export async function commentGetKmsComment(
|
|
30
|
+
client: UnifiedToCore,
|
|
31
|
+
request: operations.GetKmsCommentRequest,
|
|
32
|
+
options?: RequestOptions,
|
|
33
|
+
): Promise<
|
|
34
|
+
Result<
|
|
35
|
+
shared.KmsComment,
|
|
36
|
+
| SDKError
|
|
37
|
+
| SDKValidationError
|
|
38
|
+
| UnexpectedClientError
|
|
39
|
+
| InvalidRequestError
|
|
40
|
+
| RequestAbortedError
|
|
41
|
+
| RequestTimeoutError
|
|
42
|
+
| ConnectionError
|
|
43
|
+
>
|
|
44
|
+
> {
|
|
45
|
+
const parsed = safeParse(
|
|
46
|
+
request,
|
|
47
|
+
(value) => operations.GetKmsCommentRequest$outboundSchema.parse(value),
|
|
48
|
+
"Input validation failed",
|
|
49
|
+
);
|
|
50
|
+
if (!parsed.ok) {
|
|
51
|
+
return parsed;
|
|
52
|
+
}
|
|
53
|
+
const payload = parsed.value;
|
|
54
|
+
const body = null;
|
|
55
|
+
|
|
56
|
+
const pathParams = {
|
|
57
|
+
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
58
|
+
explode: false,
|
|
59
|
+
charEncoding: "percent",
|
|
60
|
+
}),
|
|
61
|
+
id: encodeSimple("id", payload.id, {
|
|
62
|
+
explode: false,
|
|
63
|
+
charEncoding: "percent",
|
|
64
|
+
}),
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const path = pathToFunc("/kms/{connection_id}/comment/{id}")(pathParams);
|
|
68
|
+
|
|
69
|
+
const query = encodeFormQuery({
|
|
70
|
+
"fields": payload.fields,
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
const headers = new Headers(compactMap({
|
|
74
|
+
Accept: "application/json",
|
|
75
|
+
}));
|
|
76
|
+
|
|
77
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
78
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
79
|
+
|
|
80
|
+
const context = {
|
|
81
|
+
operationID: "getKmsComment",
|
|
82
|
+
oAuth2Scopes: [],
|
|
83
|
+
|
|
84
|
+
resolvedSecurity: requestSecurity,
|
|
85
|
+
|
|
86
|
+
securitySource: client._options.security,
|
|
87
|
+
retryConfig: options?.retries
|
|
88
|
+
|| client._options.retryConfig
|
|
89
|
+
|| { strategy: "none" },
|
|
90
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const requestRes = client._createRequest(context, {
|
|
94
|
+
security: requestSecurity,
|
|
95
|
+
method: "GET",
|
|
96
|
+
baseURL: options?.serverURL,
|
|
97
|
+
path: path,
|
|
98
|
+
headers: headers,
|
|
99
|
+
query: query,
|
|
100
|
+
body: body,
|
|
101
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
102
|
+
}, options);
|
|
103
|
+
if (!requestRes.ok) {
|
|
104
|
+
return requestRes;
|
|
105
|
+
}
|
|
106
|
+
const req = requestRes.value;
|
|
107
|
+
|
|
108
|
+
const doResult = await client._do(req, {
|
|
109
|
+
context,
|
|
110
|
+
errorCodes: ["4XX", "5XX"],
|
|
111
|
+
retryConfig: context.retryConfig,
|
|
112
|
+
retryCodes: context.retryCodes,
|
|
113
|
+
});
|
|
114
|
+
if (!doResult.ok) {
|
|
115
|
+
return doResult;
|
|
116
|
+
}
|
|
117
|
+
const response = doResult.value;
|
|
118
|
+
|
|
119
|
+
const [result] = await M.match<
|
|
120
|
+
shared.KmsComment,
|
|
121
|
+
| SDKError
|
|
122
|
+
| SDKValidationError
|
|
123
|
+
| UnexpectedClientError
|
|
124
|
+
| InvalidRequestError
|
|
125
|
+
| RequestAbortedError
|
|
126
|
+
| RequestTimeoutError
|
|
127
|
+
| ConnectionError
|
|
128
|
+
>(
|
|
129
|
+
M.json(200, shared.KmsComment$inboundSchema),
|
|
130
|
+
M.fail("4XX"),
|
|
131
|
+
M.fail("5XX"),
|
|
132
|
+
)(response);
|
|
133
|
+
if (!result.ok) {
|
|
134
|
+
return result;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return result;
|
|
138
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { UnifiedToCore } from "../core.js";
|
|
7
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
21
|
+
import { SDKError } from "../sdk/models/errors/sdkerror.js";
|
|
22
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
23
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
24
|
+
import * as shared from "../sdk/models/shared/index.js";
|
|
25
|
+
import { Result } from "../sdk/types/fp.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* List all comments
|
|
29
|
+
*/
|
|
30
|
+
export async function commentListKmsComments(
|
|
31
|
+
client: UnifiedToCore,
|
|
32
|
+
request: operations.ListKmsCommentsRequest,
|
|
33
|
+
options?: RequestOptions,
|
|
34
|
+
): Promise<
|
|
35
|
+
Result<
|
|
36
|
+
Array<shared.KmsComment>,
|
|
37
|
+
| SDKError
|
|
38
|
+
| SDKValidationError
|
|
39
|
+
| UnexpectedClientError
|
|
40
|
+
| InvalidRequestError
|
|
41
|
+
| RequestAbortedError
|
|
42
|
+
| RequestTimeoutError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
>
|
|
45
|
+
> {
|
|
46
|
+
const parsed = safeParse(
|
|
47
|
+
request,
|
|
48
|
+
(value) => operations.ListKmsCommentsRequest$outboundSchema.parse(value),
|
|
49
|
+
"Input validation failed",
|
|
50
|
+
);
|
|
51
|
+
if (!parsed.ok) {
|
|
52
|
+
return parsed;
|
|
53
|
+
}
|
|
54
|
+
const payload = parsed.value;
|
|
55
|
+
const body = null;
|
|
56
|
+
|
|
57
|
+
const pathParams = {
|
|
58
|
+
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
59
|
+
explode: false,
|
|
60
|
+
charEncoding: "percent",
|
|
61
|
+
}),
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const path = pathToFunc("/kms/{connection_id}/comment")(pathParams);
|
|
65
|
+
|
|
66
|
+
const query = encodeFormQuery({
|
|
67
|
+
"fields": payload.fields,
|
|
68
|
+
"limit": payload.limit,
|
|
69
|
+
"offset": payload.offset,
|
|
70
|
+
"order": payload.order,
|
|
71
|
+
"page_id": payload.page_id,
|
|
72
|
+
"parent_id": payload.parent_id,
|
|
73
|
+
"query": payload.query,
|
|
74
|
+
"sort": payload.sort,
|
|
75
|
+
"type": payload.type,
|
|
76
|
+
"updated_gte": payload.updated_gte,
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const headers = new Headers(compactMap({
|
|
80
|
+
Accept: "application/json",
|
|
81
|
+
}));
|
|
82
|
+
|
|
83
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
84
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
85
|
+
|
|
86
|
+
const context = {
|
|
87
|
+
operationID: "listKmsComments",
|
|
88
|
+
oAuth2Scopes: [],
|
|
89
|
+
|
|
90
|
+
resolvedSecurity: requestSecurity,
|
|
91
|
+
|
|
92
|
+
securitySource: client._options.security,
|
|
93
|
+
retryConfig: options?.retries
|
|
94
|
+
|| client._options.retryConfig
|
|
95
|
+
|| { strategy: "none" },
|
|
96
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const requestRes = client._createRequest(context, {
|
|
100
|
+
security: requestSecurity,
|
|
101
|
+
method: "GET",
|
|
102
|
+
baseURL: options?.serverURL,
|
|
103
|
+
path: path,
|
|
104
|
+
headers: headers,
|
|
105
|
+
query: query,
|
|
106
|
+
body: body,
|
|
107
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
108
|
+
}, options);
|
|
109
|
+
if (!requestRes.ok) {
|
|
110
|
+
return requestRes;
|
|
111
|
+
}
|
|
112
|
+
const req = requestRes.value;
|
|
113
|
+
|
|
114
|
+
const doResult = await client._do(req, {
|
|
115
|
+
context,
|
|
116
|
+
errorCodes: ["4XX", "5XX"],
|
|
117
|
+
retryConfig: context.retryConfig,
|
|
118
|
+
retryCodes: context.retryCodes,
|
|
119
|
+
});
|
|
120
|
+
if (!doResult.ok) {
|
|
121
|
+
return doResult;
|
|
122
|
+
}
|
|
123
|
+
const response = doResult.value;
|
|
124
|
+
|
|
125
|
+
const [result] = await M.match<
|
|
126
|
+
Array<shared.KmsComment>,
|
|
127
|
+
| SDKError
|
|
128
|
+
| SDKValidationError
|
|
129
|
+
| UnexpectedClientError
|
|
130
|
+
| InvalidRequestError
|
|
131
|
+
| RequestAbortedError
|
|
132
|
+
| RequestTimeoutError
|
|
133
|
+
| ConnectionError
|
|
134
|
+
>(
|
|
135
|
+
M.json(200, z.array(shared.KmsComment$inboundSchema)),
|
|
136
|
+
M.fail("4XX"),
|
|
137
|
+
M.fail("5XX"),
|
|
138
|
+
)(response);
|
|
139
|
+
if (!result.ok) {
|
|
140
|
+
return result;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return result;
|
|
144
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { UnifiedToCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
20
|
+
import { SDKError } from "../sdk/models/errors/sdkerror.js";
|
|
21
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
22
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
23
|
+
import * as shared from "../sdk/models/shared/index.js";
|
|
24
|
+
import { Result } from "../sdk/types/fp.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Update a comment
|
|
28
|
+
*/
|
|
29
|
+
export async function commentPatchKmsComment(
|
|
30
|
+
client: UnifiedToCore,
|
|
31
|
+
request: operations.PatchKmsCommentRequest,
|
|
32
|
+
options?: RequestOptions,
|
|
33
|
+
): Promise<
|
|
34
|
+
Result<
|
|
35
|
+
shared.KmsComment,
|
|
36
|
+
| SDKError
|
|
37
|
+
| SDKValidationError
|
|
38
|
+
| UnexpectedClientError
|
|
39
|
+
| InvalidRequestError
|
|
40
|
+
| RequestAbortedError
|
|
41
|
+
| RequestTimeoutError
|
|
42
|
+
| ConnectionError
|
|
43
|
+
>
|
|
44
|
+
> {
|
|
45
|
+
const parsed = safeParse(
|
|
46
|
+
request,
|
|
47
|
+
(value) => operations.PatchKmsCommentRequest$outboundSchema.parse(value),
|
|
48
|
+
"Input validation failed",
|
|
49
|
+
);
|
|
50
|
+
if (!parsed.ok) {
|
|
51
|
+
return parsed;
|
|
52
|
+
}
|
|
53
|
+
const payload = parsed.value;
|
|
54
|
+
const body = encodeJSON("body", payload.KmsComment, { explode: true });
|
|
55
|
+
|
|
56
|
+
const pathParams = {
|
|
57
|
+
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
58
|
+
explode: false,
|
|
59
|
+
charEncoding: "percent",
|
|
60
|
+
}),
|
|
61
|
+
id: encodeSimple("id", payload.id, {
|
|
62
|
+
explode: false,
|
|
63
|
+
charEncoding: "percent",
|
|
64
|
+
}),
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const path = pathToFunc("/kms/{connection_id}/comment/{id}")(pathParams);
|
|
68
|
+
|
|
69
|
+
const query = encodeFormQuery({
|
|
70
|
+
"fields": payload.fields,
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
const headers = new Headers(compactMap({
|
|
74
|
+
"Content-Type": "application/json",
|
|
75
|
+
Accept: "application/json",
|
|
76
|
+
}));
|
|
77
|
+
|
|
78
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
79
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
80
|
+
|
|
81
|
+
const context = {
|
|
82
|
+
operationID: "patchKmsComment",
|
|
83
|
+
oAuth2Scopes: [],
|
|
84
|
+
|
|
85
|
+
resolvedSecurity: requestSecurity,
|
|
86
|
+
|
|
87
|
+
securitySource: client._options.security,
|
|
88
|
+
retryConfig: options?.retries
|
|
89
|
+
|| client._options.retryConfig
|
|
90
|
+
|| { strategy: "none" },
|
|
91
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const requestRes = client._createRequest(context, {
|
|
95
|
+
security: requestSecurity,
|
|
96
|
+
method: "PATCH",
|
|
97
|
+
baseURL: options?.serverURL,
|
|
98
|
+
path: path,
|
|
99
|
+
headers: headers,
|
|
100
|
+
query: query,
|
|
101
|
+
body: body,
|
|
102
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
103
|
+
}, options);
|
|
104
|
+
if (!requestRes.ok) {
|
|
105
|
+
return requestRes;
|
|
106
|
+
}
|
|
107
|
+
const req = requestRes.value;
|
|
108
|
+
|
|
109
|
+
const doResult = await client._do(req, {
|
|
110
|
+
context,
|
|
111
|
+
errorCodes: ["4XX", "5XX"],
|
|
112
|
+
retryConfig: context.retryConfig,
|
|
113
|
+
retryCodes: context.retryCodes,
|
|
114
|
+
});
|
|
115
|
+
if (!doResult.ok) {
|
|
116
|
+
return doResult;
|
|
117
|
+
}
|
|
118
|
+
const response = doResult.value;
|
|
119
|
+
|
|
120
|
+
const [result] = await M.match<
|
|
121
|
+
shared.KmsComment,
|
|
122
|
+
| SDKError
|
|
123
|
+
| SDKValidationError
|
|
124
|
+
| UnexpectedClientError
|
|
125
|
+
| InvalidRequestError
|
|
126
|
+
| RequestAbortedError
|
|
127
|
+
| RequestTimeoutError
|
|
128
|
+
| ConnectionError
|
|
129
|
+
>(
|
|
130
|
+
M.json(200, shared.KmsComment$inboundSchema),
|
|
131
|
+
M.fail("4XX"),
|
|
132
|
+
M.fail("5XX"),
|
|
133
|
+
)(response);
|
|
134
|
+
if (!result.ok) {
|
|
135
|
+
return result;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return result;
|
|
139
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { UnifiedToCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
20
|
+
import { SDKError } from "../sdk/models/errors/sdkerror.js";
|
|
21
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
22
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
23
|
+
import { Result } from "../sdk/types/fp.js";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Remove a comment
|
|
27
|
+
*/
|
|
28
|
+
export async function commentRemoveKmsComment(
|
|
29
|
+
client: UnifiedToCore,
|
|
30
|
+
request: operations.RemoveKmsCommentRequest,
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): Promise<
|
|
33
|
+
Result<
|
|
34
|
+
operations.RemoveKmsCommentResponse | undefined,
|
|
35
|
+
| SDKError
|
|
36
|
+
| SDKValidationError
|
|
37
|
+
| UnexpectedClientError
|
|
38
|
+
| InvalidRequestError
|
|
39
|
+
| RequestAbortedError
|
|
40
|
+
| RequestTimeoutError
|
|
41
|
+
| ConnectionError
|
|
42
|
+
>
|
|
43
|
+
> {
|
|
44
|
+
const parsed = safeParse(
|
|
45
|
+
request,
|
|
46
|
+
(value) => operations.RemoveKmsCommentRequest$outboundSchema.parse(value),
|
|
47
|
+
"Input validation failed",
|
|
48
|
+
);
|
|
49
|
+
if (!parsed.ok) {
|
|
50
|
+
return parsed;
|
|
51
|
+
}
|
|
52
|
+
const payload = parsed.value;
|
|
53
|
+
const body = null;
|
|
54
|
+
|
|
55
|
+
const pathParams = {
|
|
56
|
+
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
57
|
+
explode: false,
|
|
58
|
+
charEncoding: "percent",
|
|
59
|
+
}),
|
|
60
|
+
id: encodeSimple("id", payload.id, {
|
|
61
|
+
explode: false,
|
|
62
|
+
charEncoding: "percent",
|
|
63
|
+
}),
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const path = pathToFunc("/kms/{connection_id}/comment/{id}")(pathParams);
|
|
67
|
+
|
|
68
|
+
const headers = new Headers(compactMap({
|
|
69
|
+
Accept: "*/*",
|
|
70
|
+
}));
|
|
71
|
+
|
|
72
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
73
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
74
|
+
|
|
75
|
+
const context = {
|
|
76
|
+
operationID: "removeKmsComment",
|
|
77
|
+
oAuth2Scopes: [],
|
|
78
|
+
|
|
79
|
+
resolvedSecurity: requestSecurity,
|
|
80
|
+
|
|
81
|
+
securitySource: client._options.security,
|
|
82
|
+
retryConfig: options?.retries
|
|
83
|
+
|| client._options.retryConfig
|
|
84
|
+
|| { strategy: "none" },
|
|
85
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const requestRes = client._createRequest(context, {
|
|
89
|
+
security: requestSecurity,
|
|
90
|
+
method: "DELETE",
|
|
91
|
+
baseURL: options?.serverURL,
|
|
92
|
+
path: path,
|
|
93
|
+
headers: headers,
|
|
94
|
+
body: body,
|
|
95
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
96
|
+
}, options);
|
|
97
|
+
if (!requestRes.ok) {
|
|
98
|
+
return requestRes;
|
|
99
|
+
}
|
|
100
|
+
const req = requestRes.value;
|
|
101
|
+
|
|
102
|
+
const doResult = await client._do(req, {
|
|
103
|
+
context,
|
|
104
|
+
errorCodes: ["4XX", "5XX"],
|
|
105
|
+
retryConfig: context.retryConfig,
|
|
106
|
+
retryCodes: context.retryCodes,
|
|
107
|
+
});
|
|
108
|
+
if (!doResult.ok) {
|
|
109
|
+
return doResult;
|
|
110
|
+
}
|
|
111
|
+
const response = doResult.value;
|
|
112
|
+
|
|
113
|
+
const responseFields = {
|
|
114
|
+
HttpMeta: { Response: response, Request: req },
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const [result] = await M.match<
|
|
118
|
+
operations.RemoveKmsCommentResponse | undefined,
|
|
119
|
+
| SDKError
|
|
120
|
+
| SDKValidationError
|
|
121
|
+
| UnexpectedClientError
|
|
122
|
+
| InvalidRequestError
|
|
123
|
+
| RequestAbortedError
|
|
124
|
+
| RequestTimeoutError
|
|
125
|
+
| ConnectionError
|
|
126
|
+
>(
|
|
127
|
+
M.nil(200, operations.RemoveKmsCommentResponse$inboundSchema.optional()),
|
|
128
|
+
M.fail("4XX"),
|
|
129
|
+
M.fail("5XX"),
|
|
130
|
+
M.nil(
|
|
131
|
+
"default",
|
|
132
|
+
operations.RemoveKmsCommentResponse$inboundSchema.optional(),
|
|
133
|
+
{ hdrs: true },
|
|
134
|
+
),
|
|
135
|
+
)(response, { extraFields: responseFields });
|
|
136
|
+
if (!result.ok) {
|
|
137
|
+
return result;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return result;
|
|
141
|
+
}
|