@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,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 kmsRemoveKmsComment(
|
|
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
|
+
}
|
|
@@ -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 kmsUpdateKmsComment(
|
|
30
|
+
client: UnifiedToCore,
|
|
31
|
+
request: operations.UpdateKmsCommentRequest,
|
|
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.UpdateKmsCommentRequest$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: "updateKmsComment",
|
|
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: "PUT",
|
|
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
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -65,8 +65,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "1.0",
|
|
68
|
-
sdkVersion: "2.9.
|
|
69
|
-
genVersion: "2.493.
|
|
68
|
+
sdkVersion: "2.9.23",
|
|
69
|
+
genVersion: "2.493.32",
|
|
70
70
|
userAgent:
|
|
71
|
-
"speakeasy-sdk/typescript 2.9.
|
|
71
|
+
"speakeasy-sdk/typescript 2.9.23 2.493.32 1.0 @unified-api/typescript-sdk",
|
|
72
72
|
} as const;
|
package/src/lib/schemas.ts
CHANGED
|
@@ -57,6 +57,7 @@ export function collectExtraKeys<
|
|
|
57
57
|
>(
|
|
58
58
|
obj: ZodObject<Shape, "strip", Catchall>,
|
|
59
59
|
extrasKey: K,
|
|
60
|
+
optional: boolean,
|
|
60
61
|
): ZodEffects<
|
|
61
62
|
typeof obj,
|
|
62
63
|
& output<ZodObject<Shape, "strict">>
|
|
@@ -81,6 +82,10 @@ export function collectExtraKeys<
|
|
|
81
82
|
delete val[key];
|
|
82
83
|
}
|
|
83
84
|
|
|
85
|
+
if (optional && Object.keys(extras).length === 0) {
|
|
86
|
+
return val;
|
|
87
|
+
}
|
|
88
|
+
|
|
84
89
|
return { ...val, [extrasKey]: extras };
|
|
85
90
|
});
|
|
86
91
|
}
|
package/src/sdk/comment.ts
CHANGED
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { commentCreateKmsComment } from "../funcs/commentCreateKmsComment.js";
|
|
5
6
|
import { commentCreateTaskComment } from "../funcs/commentCreateTaskComment.js";
|
|
7
|
+
import { commentGetKmsComment } from "../funcs/commentGetKmsComment.js";
|
|
6
8
|
import { commentGetTaskComment } from "../funcs/commentGetTaskComment.js";
|
|
9
|
+
import { commentListKmsComments } from "../funcs/commentListKmsComments.js";
|
|
7
10
|
import { commentListTaskComments } from "../funcs/commentListTaskComments.js";
|
|
11
|
+
import { commentPatchKmsComment } from "../funcs/commentPatchKmsComment.js";
|
|
8
12
|
import { commentPatchTaskComment } from "../funcs/commentPatchTaskComment.js";
|
|
13
|
+
import { commentRemoveKmsComment } from "../funcs/commentRemoveKmsComment.js";
|
|
9
14
|
import { commentRemoveTaskComment } from "../funcs/commentRemoveTaskComment.js";
|
|
15
|
+
import { commentUpdateKmsComment } from "../funcs/commentUpdateKmsComment.js";
|
|
10
16
|
import { commentUpdateTaskComment } from "../funcs/commentUpdateTaskComment.js";
|
|
11
17
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
12
18
|
import * as operations from "./models/operations/index.js";
|
|
@@ -14,6 +20,20 @@ import * as shared from "./models/shared/index.js";
|
|
|
14
20
|
import { unwrapAsync } from "./types/fp.js";
|
|
15
21
|
|
|
16
22
|
export class Comment extends ClientSDK {
|
|
23
|
+
/**
|
|
24
|
+
* Create a comment
|
|
25
|
+
*/
|
|
26
|
+
async createKmsComment(
|
|
27
|
+
request: operations.CreateKmsCommentRequest,
|
|
28
|
+
options?: RequestOptions,
|
|
29
|
+
): Promise<shared.KmsComment> {
|
|
30
|
+
return unwrapAsync(commentCreateKmsComment(
|
|
31
|
+
this,
|
|
32
|
+
request,
|
|
33
|
+
options,
|
|
34
|
+
));
|
|
35
|
+
}
|
|
36
|
+
|
|
17
37
|
/**
|
|
18
38
|
* Create a comment
|
|
19
39
|
*/
|
|
@@ -28,6 +48,20 @@ export class Comment extends ClientSDK {
|
|
|
28
48
|
));
|
|
29
49
|
}
|
|
30
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Retrieve a comment
|
|
53
|
+
*/
|
|
54
|
+
async getKmsComment(
|
|
55
|
+
request: operations.GetKmsCommentRequest,
|
|
56
|
+
options?: RequestOptions,
|
|
57
|
+
): Promise<shared.KmsComment> {
|
|
58
|
+
return unwrapAsync(commentGetKmsComment(
|
|
59
|
+
this,
|
|
60
|
+
request,
|
|
61
|
+
options,
|
|
62
|
+
));
|
|
63
|
+
}
|
|
64
|
+
|
|
31
65
|
/**
|
|
32
66
|
* Retrieve a comment
|
|
33
67
|
*/
|
|
@@ -42,6 +76,20 @@ export class Comment extends ClientSDK {
|
|
|
42
76
|
));
|
|
43
77
|
}
|
|
44
78
|
|
|
79
|
+
/**
|
|
80
|
+
* List all comments
|
|
81
|
+
*/
|
|
82
|
+
async listKmsComments(
|
|
83
|
+
request: operations.ListKmsCommentsRequest,
|
|
84
|
+
options?: RequestOptions,
|
|
85
|
+
): Promise<Array<shared.KmsComment>> {
|
|
86
|
+
return unwrapAsync(commentListKmsComments(
|
|
87
|
+
this,
|
|
88
|
+
request,
|
|
89
|
+
options,
|
|
90
|
+
));
|
|
91
|
+
}
|
|
92
|
+
|
|
45
93
|
/**
|
|
46
94
|
* List all comments
|
|
47
95
|
*/
|
|
@@ -56,6 +104,20 @@ export class Comment extends ClientSDK {
|
|
|
56
104
|
));
|
|
57
105
|
}
|
|
58
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Update a comment
|
|
109
|
+
*/
|
|
110
|
+
async patchKmsComment(
|
|
111
|
+
request: operations.PatchKmsCommentRequest,
|
|
112
|
+
options?: RequestOptions,
|
|
113
|
+
): Promise<shared.KmsComment> {
|
|
114
|
+
return unwrapAsync(commentPatchKmsComment(
|
|
115
|
+
this,
|
|
116
|
+
request,
|
|
117
|
+
options,
|
|
118
|
+
));
|
|
119
|
+
}
|
|
120
|
+
|
|
59
121
|
/**
|
|
60
122
|
* Update a comment
|
|
61
123
|
*/
|
|
@@ -70,6 +132,20 @@ export class Comment extends ClientSDK {
|
|
|
70
132
|
));
|
|
71
133
|
}
|
|
72
134
|
|
|
135
|
+
/**
|
|
136
|
+
* Remove a comment
|
|
137
|
+
*/
|
|
138
|
+
async removeKmsComment(
|
|
139
|
+
request: operations.RemoveKmsCommentRequest,
|
|
140
|
+
options?: RequestOptions,
|
|
141
|
+
): Promise<operations.RemoveKmsCommentResponse | undefined> {
|
|
142
|
+
return unwrapAsync(commentRemoveKmsComment(
|
|
143
|
+
this,
|
|
144
|
+
request,
|
|
145
|
+
options,
|
|
146
|
+
));
|
|
147
|
+
}
|
|
148
|
+
|
|
73
149
|
/**
|
|
74
150
|
* Remove a comment
|
|
75
151
|
*/
|
|
@@ -84,6 +160,20 @@ export class Comment extends ClientSDK {
|
|
|
84
160
|
));
|
|
85
161
|
}
|
|
86
162
|
|
|
163
|
+
/**
|
|
164
|
+
* Update a comment
|
|
165
|
+
*/
|
|
166
|
+
async updateKmsComment(
|
|
167
|
+
request: operations.UpdateKmsCommentRequest,
|
|
168
|
+
options?: RequestOptions,
|
|
169
|
+
): Promise<shared.KmsComment> {
|
|
170
|
+
return unwrapAsync(commentUpdateKmsComment(
|
|
171
|
+
this,
|
|
172
|
+
request,
|
|
173
|
+
options,
|
|
174
|
+
));
|
|
175
|
+
}
|
|
176
|
+
|
|
87
177
|
/**
|
|
88
178
|
* Update a comment
|
|
89
179
|
*/
|
package/src/sdk/kms.ts
CHANGED
|
@@ -2,16 +2,22 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { kmsCreateKmsComment } from "../funcs/kmsCreateKmsComment.js";
|
|
5
6
|
import { kmsCreateKmsPage } from "../funcs/kmsCreateKmsPage.js";
|
|
6
7
|
import { kmsCreateKmsSpace } from "../funcs/kmsCreateKmsSpace.js";
|
|
8
|
+
import { kmsGetKmsComment } from "../funcs/kmsGetKmsComment.js";
|
|
7
9
|
import { kmsGetKmsPage } from "../funcs/kmsGetKmsPage.js";
|
|
8
10
|
import { kmsGetKmsSpace } from "../funcs/kmsGetKmsSpace.js";
|
|
11
|
+
import { kmsListKmsComments } from "../funcs/kmsListKmsComments.js";
|
|
9
12
|
import { kmsListKmsPages } from "../funcs/kmsListKmsPages.js";
|
|
10
13
|
import { kmsListKmsSpaces } from "../funcs/kmsListKmsSpaces.js";
|
|
14
|
+
import { kmsPatchKmsComment } from "../funcs/kmsPatchKmsComment.js";
|
|
11
15
|
import { kmsPatchKmsPage } from "../funcs/kmsPatchKmsPage.js";
|
|
12
16
|
import { kmsPatchKmsSpace } from "../funcs/kmsPatchKmsSpace.js";
|
|
17
|
+
import { kmsRemoveKmsComment } from "../funcs/kmsRemoveKmsComment.js";
|
|
13
18
|
import { kmsRemoveKmsPage } from "../funcs/kmsRemoveKmsPage.js";
|
|
14
19
|
import { kmsRemoveKmsSpace } from "../funcs/kmsRemoveKmsSpace.js";
|
|
20
|
+
import { kmsUpdateKmsComment } from "../funcs/kmsUpdateKmsComment.js";
|
|
15
21
|
import { kmsUpdateKmsPage } from "../funcs/kmsUpdateKmsPage.js";
|
|
16
22
|
import { kmsUpdateKmsSpace } from "../funcs/kmsUpdateKmsSpace.js";
|
|
17
23
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
@@ -20,6 +26,20 @@ import * as shared from "./models/shared/index.js";
|
|
|
20
26
|
import { unwrapAsync } from "./types/fp.js";
|
|
21
27
|
|
|
22
28
|
export class Kms extends ClientSDK {
|
|
29
|
+
/**
|
|
30
|
+
* Create a comment
|
|
31
|
+
*/
|
|
32
|
+
async createKmsComment(
|
|
33
|
+
request: operations.CreateKmsCommentRequest,
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): Promise<shared.KmsComment> {
|
|
36
|
+
return unwrapAsync(kmsCreateKmsComment(
|
|
37
|
+
this,
|
|
38
|
+
request,
|
|
39
|
+
options,
|
|
40
|
+
));
|
|
41
|
+
}
|
|
42
|
+
|
|
23
43
|
/**
|
|
24
44
|
* Create a page
|
|
25
45
|
*/
|
|
@@ -48,6 +68,20 @@ export class Kms extends ClientSDK {
|
|
|
48
68
|
));
|
|
49
69
|
}
|
|
50
70
|
|
|
71
|
+
/**
|
|
72
|
+
* Retrieve a comment
|
|
73
|
+
*/
|
|
74
|
+
async getKmsComment(
|
|
75
|
+
request: operations.GetKmsCommentRequest,
|
|
76
|
+
options?: RequestOptions,
|
|
77
|
+
): Promise<shared.KmsComment> {
|
|
78
|
+
return unwrapAsync(kmsGetKmsComment(
|
|
79
|
+
this,
|
|
80
|
+
request,
|
|
81
|
+
options,
|
|
82
|
+
));
|
|
83
|
+
}
|
|
84
|
+
|
|
51
85
|
/**
|
|
52
86
|
* Retrieve a page
|
|
53
87
|
*/
|
|
@@ -76,6 +110,20 @@ export class Kms extends ClientSDK {
|
|
|
76
110
|
));
|
|
77
111
|
}
|
|
78
112
|
|
|
113
|
+
/**
|
|
114
|
+
* List all comments
|
|
115
|
+
*/
|
|
116
|
+
async listKmsComments(
|
|
117
|
+
request: operations.ListKmsCommentsRequest,
|
|
118
|
+
options?: RequestOptions,
|
|
119
|
+
): Promise<Array<shared.KmsComment>> {
|
|
120
|
+
return unwrapAsync(kmsListKmsComments(
|
|
121
|
+
this,
|
|
122
|
+
request,
|
|
123
|
+
options,
|
|
124
|
+
));
|
|
125
|
+
}
|
|
126
|
+
|
|
79
127
|
/**
|
|
80
128
|
* List all pages
|
|
81
129
|
*/
|
|
@@ -104,6 +152,20 @@ export class Kms extends ClientSDK {
|
|
|
104
152
|
));
|
|
105
153
|
}
|
|
106
154
|
|
|
155
|
+
/**
|
|
156
|
+
* Update a comment
|
|
157
|
+
*/
|
|
158
|
+
async patchKmsComment(
|
|
159
|
+
request: operations.PatchKmsCommentRequest,
|
|
160
|
+
options?: RequestOptions,
|
|
161
|
+
): Promise<shared.KmsComment> {
|
|
162
|
+
return unwrapAsync(kmsPatchKmsComment(
|
|
163
|
+
this,
|
|
164
|
+
request,
|
|
165
|
+
options,
|
|
166
|
+
));
|
|
167
|
+
}
|
|
168
|
+
|
|
107
169
|
/**
|
|
108
170
|
* Update a page
|
|
109
171
|
*/
|
|
@@ -132,6 +194,20 @@ export class Kms extends ClientSDK {
|
|
|
132
194
|
));
|
|
133
195
|
}
|
|
134
196
|
|
|
197
|
+
/**
|
|
198
|
+
* Remove a comment
|
|
199
|
+
*/
|
|
200
|
+
async removeKmsComment(
|
|
201
|
+
request: operations.RemoveKmsCommentRequest,
|
|
202
|
+
options?: RequestOptions,
|
|
203
|
+
): Promise<operations.RemoveKmsCommentResponse | undefined> {
|
|
204
|
+
return unwrapAsync(kmsRemoveKmsComment(
|
|
205
|
+
this,
|
|
206
|
+
request,
|
|
207
|
+
options,
|
|
208
|
+
));
|
|
209
|
+
}
|
|
210
|
+
|
|
135
211
|
/**
|
|
136
212
|
* Remove a page
|
|
137
213
|
*/
|
|
@@ -160,6 +236,20 @@ export class Kms extends ClientSDK {
|
|
|
160
236
|
));
|
|
161
237
|
}
|
|
162
238
|
|
|
239
|
+
/**
|
|
240
|
+
* Update a comment
|
|
241
|
+
*/
|
|
242
|
+
async updateKmsComment(
|
|
243
|
+
request: operations.UpdateKmsCommentRequest,
|
|
244
|
+
options?: RequestOptions,
|
|
245
|
+
): Promise<shared.KmsComment> {
|
|
246
|
+
return unwrapAsync(kmsUpdateKmsComment(
|
|
247
|
+
this,
|
|
248
|
+
request,
|
|
249
|
+
options,
|
|
250
|
+
));
|
|
251
|
+
}
|
|
252
|
+
|
|
163
253
|
/**
|
|
164
254
|
* Update a page
|
|
165
255
|
*/
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import * as shared from "../shared/index.js";
|
|
11
|
+
|
|
12
|
+
export type CreateKmsCommentRequest = {
|
|
13
|
+
kmsComment?: shared.KmsComment | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* ID of the connection
|
|
16
|
+
*/
|
|
17
|
+
connectionId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Comma-delimited fields to return
|
|
20
|
+
*/
|
|
21
|
+
fields?: Array<string> | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const CreateKmsCommentRequest$inboundSchema: z.ZodType<
|
|
26
|
+
CreateKmsCommentRequest,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
KmsComment: shared.KmsComment$inboundSchema.optional(),
|
|
31
|
+
connection_id: z.string(),
|
|
32
|
+
fields: z.array(z.string()).optional(),
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
"KmsComment": "kmsComment",
|
|
36
|
+
"connection_id": "connectionId",
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type CreateKmsCommentRequest$Outbound = {
|
|
42
|
+
KmsComment?: shared.KmsComment$Outbound | undefined;
|
|
43
|
+
connection_id: string;
|
|
44
|
+
fields?: Array<string> | undefined;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const CreateKmsCommentRequest$outboundSchema: z.ZodType<
|
|
49
|
+
CreateKmsCommentRequest$Outbound,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
CreateKmsCommentRequest
|
|
52
|
+
> = z.object({
|
|
53
|
+
kmsComment: shared.KmsComment$outboundSchema.optional(),
|
|
54
|
+
connectionId: z.string(),
|
|
55
|
+
fields: z.array(z.string()).optional(),
|
|
56
|
+
}).transform((v) => {
|
|
57
|
+
return remap$(v, {
|
|
58
|
+
kmsComment: "KmsComment",
|
|
59
|
+
connectionId: "connection_id",
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @internal
|
|
65
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
66
|
+
*/
|
|
67
|
+
export namespace CreateKmsCommentRequest$ {
|
|
68
|
+
/** @deprecated use `CreateKmsCommentRequest$inboundSchema` instead. */
|
|
69
|
+
export const inboundSchema = CreateKmsCommentRequest$inboundSchema;
|
|
70
|
+
/** @deprecated use `CreateKmsCommentRequest$outboundSchema` instead. */
|
|
71
|
+
export const outboundSchema = CreateKmsCommentRequest$outboundSchema;
|
|
72
|
+
/** @deprecated use `CreateKmsCommentRequest$Outbound` instead. */
|
|
73
|
+
export type Outbound = CreateKmsCommentRequest$Outbound;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function createKmsCommentRequestToJSON(
|
|
77
|
+
createKmsCommentRequest: CreateKmsCommentRequest,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
CreateKmsCommentRequest$outboundSchema.parse(createKmsCommentRequest),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function createKmsCommentRequestFromJSON(
|
|
85
|
+
jsonString: string,
|
|
86
|
+
): SafeParseResult<CreateKmsCommentRequest, SDKValidationError> {
|
|
87
|
+
return safeParse(
|
|
88
|
+
jsonString,
|
|
89
|
+
(x) => CreateKmsCommentRequest$inboundSchema.parse(JSON.parse(x)),
|
|
90
|
+
`Failed to parse 'CreateKmsCommentRequest' from JSON`,
|
|
91
|
+
);
|
|
92
|
+
}
|