@unified-api/typescript-sdk 2.85.35 → 2.85.37
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/README.md +2 -0
- package/dist/commonjs/funcs/hrisListHrisTimeoffs.js +1 -0
- package/dist/commonjs/funcs/hrisListHrisTimeoffs.js.map +1 -1
- package/dist/commonjs/funcs/unifiedListUnifiedNotifications.d.ts +15 -0
- package/dist/commonjs/funcs/unifiedListUnifiedNotifications.d.ts.map +1 -0
- package/dist/commonjs/funcs/unifiedListUnifiedNotifications.js +120 -0
- package/dist/commonjs/funcs/unifiedListUnifiedNotifications.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/sdk/models/operations/index.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/index.js +1 -0
- package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/listhristimeoffs.d.ts +2 -0
- package/dist/commonjs/sdk/models/operations/listhristimeoffs.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/listhristimeoffs.js +1 -0
- package/dist/commonjs/sdk/models/operations/listhristimeoffs.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/listunifiednotifications.d.ts +23 -0
- package/dist/commonjs/sdk/models/operations/listunifiednotifications.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/listunifiednotifications.js +58 -0
- package/dist/commonjs/sdk/models/operations/listunifiednotifications.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/hristaxonomy.d.ts +1 -0
- package/dist/commonjs/sdk/models/shared/hristaxonomy.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/hristaxonomy.js +1 -0
- package/dist/commonjs/sdk/models/shared/hristaxonomy.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/index.d.ts +1 -0
- package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/index.js +1 -0
- package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/notification.d.ts +52 -0
- package/dist/commonjs/sdk/models/shared/notification.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/notification.js +106 -0
- package/dist/commonjs/sdk/models/shared/notification.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/secretsmanager.d.ts +6 -0
- package/dist/commonjs/sdk/models/shared/secretsmanager.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/secretsmanager.js +6 -0
- package/dist/commonjs/sdk/models/shared/secretsmanager.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/storagefile.d.ts +3 -0
- package/dist/commonjs/sdk/models/shared/storagefile.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/storagefile.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/webhook.d.ts +5 -5
- package/dist/commonjs/sdk/models/shared/webhook.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/webhook.js +6 -6
- package/dist/commonjs/sdk/models/shared/webhook.js.map +1 -1
- package/dist/commonjs/sdk/notification.d.ts +10 -0
- package/dist/commonjs/sdk/notification.d.ts.map +1 -0
- package/dist/commonjs/sdk/notification.js +19 -0
- package/dist/commonjs/sdk/notification.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/unified.d.ts +4 -0
- package/dist/commonjs/sdk/unified.d.ts.map +1 -1
- package/dist/commonjs/sdk/unified.js +7 -0
- package/dist/commonjs/sdk/unified.js.map +1 -1
- package/dist/esm/funcs/hrisListHrisTimeoffs.js +1 -0
- package/dist/esm/funcs/hrisListHrisTimeoffs.js.map +1 -1
- package/dist/esm/funcs/unifiedListUnifiedNotifications.d.ts +15 -0
- package/dist/esm/funcs/unifiedListUnifiedNotifications.d.ts.map +1 -0
- package/dist/esm/funcs/unifiedListUnifiedNotifications.js +84 -0
- package/dist/esm/funcs/unifiedListUnifiedNotifications.js.map +1 -0
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/sdk/models/operations/index.d.ts +1 -0
- package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/index.js +1 -0
- package/dist/esm/sdk/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/models/operations/listhristimeoffs.d.ts +2 -0
- package/dist/esm/sdk/models/operations/listhristimeoffs.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/listhristimeoffs.js +1 -0
- package/dist/esm/sdk/models/operations/listhristimeoffs.js.map +1 -1
- package/dist/esm/sdk/models/operations/listunifiednotifications.d.ts +23 -0
- package/dist/esm/sdk/models/operations/listunifiednotifications.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/listunifiednotifications.js +21 -0
- package/dist/esm/sdk/models/operations/listunifiednotifications.js.map +1 -0
- package/dist/esm/sdk/models/shared/hristaxonomy.d.ts +1 -0
- package/dist/esm/sdk/models/shared/hristaxonomy.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/hristaxonomy.js +1 -0
- package/dist/esm/sdk/models/shared/hristaxonomy.js.map +1 -1
- package/dist/esm/sdk/models/shared/index.d.ts +1 -0
- package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/index.js +1 -0
- package/dist/esm/sdk/models/shared/index.js.map +1 -1
- package/dist/esm/sdk/models/shared/notification.d.ts +52 -0
- package/dist/esm/sdk/models/shared/notification.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/notification.js +69 -0
- package/dist/esm/sdk/models/shared/notification.js.map +1 -0
- package/dist/esm/sdk/models/shared/secretsmanager.d.ts +6 -0
- package/dist/esm/sdk/models/shared/secretsmanager.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/secretsmanager.js +6 -0
- package/dist/esm/sdk/models/shared/secretsmanager.js.map +1 -1
- package/dist/esm/sdk/models/shared/storagefile.d.ts +3 -0
- package/dist/esm/sdk/models/shared/storagefile.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/storagefile.js.map +1 -1
- package/dist/esm/sdk/models/shared/webhook.d.ts +5 -5
- package/dist/esm/sdk/models/shared/webhook.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/webhook.js +5 -5
- package/dist/esm/sdk/models/shared/webhook.js.map +1 -1
- package/dist/esm/sdk/notification.d.ts +10 -0
- package/dist/esm/sdk/notification.d.ts.map +1 -0
- package/dist/esm/sdk/notification.js +15 -0
- package/dist/esm/sdk/notification.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/unified.d.ts +4 -0
- package/dist/esm/sdk/unified.d.ts.map +1 -1
- package/dist/esm/sdk/unified.js +7 -0
- package/dist/esm/sdk/unified.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/hrisListHrisTimeoffs.ts +1 -0
- package/src/funcs/unifiedListUnifiedNotifications.ts +169 -0
- package/src/lib/config.ts +3 -3
- package/src/sdk/models/operations/index.ts +1 -0
- package/src/sdk/models/operations/listhristimeoffs.ts +3 -0
- package/src/sdk/models/operations/listunifiednotifications.ts +53 -0
- package/src/sdk/models/shared/hristaxonomy.ts +1 -0
- package/src/sdk/models/shared/index.ts +1 -0
- package/src/sdk/models/shared/notification.ts +108 -0
- package/src/sdk/models/shared/secretsmanager.ts +6 -0
- package/src/sdk/models/shared/storagefile.ts +3 -0
- package/src/sdk/models/shared/webhook.ts +15 -9
- package/src/sdk/notification.ts +25 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/unified.ts +15 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { UnifiedToCore } from "../core.js";
|
|
7
|
+
import { encodeFormQuery } 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 {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
22
|
+
import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
24
|
+
import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
|
|
25
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
26
|
+
import * as shared from "../sdk/models/shared/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../sdk/types/async.js";
|
|
28
|
+
import { Result } from "../sdk/types/fp.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* List event notifications
|
|
32
|
+
*/
|
|
33
|
+
export function unifiedListUnifiedNotifications(
|
|
34
|
+
client: UnifiedToCore,
|
|
35
|
+
request: operations.ListUnifiedNotificationsRequest,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): APIPromise<
|
|
38
|
+
Result<
|
|
39
|
+
Array<shared.Notification>,
|
|
40
|
+
| UnifiedToError
|
|
41
|
+
| ResponseValidationError
|
|
42
|
+
| ConnectionError
|
|
43
|
+
| RequestAbortedError
|
|
44
|
+
| RequestTimeoutError
|
|
45
|
+
| InvalidRequestError
|
|
46
|
+
| UnexpectedClientError
|
|
47
|
+
| SDKValidationError
|
|
48
|
+
>
|
|
49
|
+
> {
|
|
50
|
+
return new APIPromise($do(
|
|
51
|
+
client,
|
|
52
|
+
request,
|
|
53
|
+
options,
|
|
54
|
+
));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function $do(
|
|
58
|
+
client: UnifiedToCore,
|
|
59
|
+
request: operations.ListUnifiedNotificationsRequest,
|
|
60
|
+
options?: RequestOptions,
|
|
61
|
+
): Promise<
|
|
62
|
+
[
|
|
63
|
+
Result<
|
|
64
|
+
Array<shared.Notification>,
|
|
65
|
+
| UnifiedToError
|
|
66
|
+
| ResponseValidationError
|
|
67
|
+
| ConnectionError
|
|
68
|
+
| RequestAbortedError
|
|
69
|
+
| RequestTimeoutError
|
|
70
|
+
| InvalidRequestError
|
|
71
|
+
| UnexpectedClientError
|
|
72
|
+
| SDKValidationError
|
|
73
|
+
>,
|
|
74
|
+
APICall,
|
|
75
|
+
]
|
|
76
|
+
> {
|
|
77
|
+
const parsed = safeParse(
|
|
78
|
+
request,
|
|
79
|
+
(value) =>
|
|
80
|
+
operations.ListUnifiedNotificationsRequest$outboundSchema.parse(value),
|
|
81
|
+
"Input validation failed",
|
|
82
|
+
);
|
|
83
|
+
if (!parsed.ok) {
|
|
84
|
+
return [parsed, { status: "invalid" }];
|
|
85
|
+
}
|
|
86
|
+
const payload = parsed.value;
|
|
87
|
+
const body = null;
|
|
88
|
+
|
|
89
|
+
const path = pathToFunc("/unified/notification")();
|
|
90
|
+
|
|
91
|
+
const query = encodeFormQuery({
|
|
92
|
+
"limit": payload.limit,
|
|
93
|
+
"offset": payload.offset,
|
|
94
|
+
"order": payload.order,
|
|
95
|
+
"sort": payload.sort,
|
|
96
|
+
"updated_gte": payload.updated_gte,
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const headers = new Headers(compactMap({
|
|
100
|
+
Accept: "application/json",
|
|
101
|
+
}));
|
|
102
|
+
|
|
103
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
104
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
105
|
+
|
|
106
|
+
const context = {
|
|
107
|
+
options: client._options,
|
|
108
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
109
|
+
operationID: "listUnifiedNotifications",
|
|
110
|
+
oAuth2Scopes: null,
|
|
111
|
+
|
|
112
|
+
resolvedSecurity: requestSecurity,
|
|
113
|
+
|
|
114
|
+
securitySource: client._options.security,
|
|
115
|
+
retryConfig: options?.retries
|
|
116
|
+
|| client._options.retryConfig
|
|
117
|
+
|| { strategy: "none" },
|
|
118
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const requestRes = client._createRequest(context, {
|
|
122
|
+
security: requestSecurity,
|
|
123
|
+
method: "GET",
|
|
124
|
+
baseURL: options?.serverURL,
|
|
125
|
+
path: path,
|
|
126
|
+
headers: headers,
|
|
127
|
+
query: query,
|
|
128
|
+
body: body,
|
|
129
|
+
userAgent: client._options.userAgent,
|
|
130
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
131
|
+
}, options);
|
|
132
|
+
if (!requestRes.ok) {
|
|
133
|
+
return [requestRes, { status: "invalid" }];
|
|
134
|
+
}
|
|
135
|
+
const req = requestRes.value;
|
|
136
|
+
|
|
137
|
+
const doResult = await client._do(req, {
|
|
138
|
+
context,
|
|
139
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
140
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
141
|
+
retryConfig: context.retryConfig,
|
|
142
|
+
retryCodes: context.retryCodes,
|
|
143
|
+
});
|
|
144
|
+
if (!doResult.ok) {
|
|
145
|
+
return [doResult, { status: "request-error", request: req }];
|
|
146
|
+
}
|
|
147
|
+
const response = doResult.value;
|
|
148
|
+
|
|
149
|
+
const [result] = await M.match<
|
|
150
|
+
Array<shared.Notification>,
|
|
151
|
+
| UnifiedToError
|
|
152
|
+
| ResponseValidationError
|
|
153
|
+
| ConnectionError
|
|
154
|
+
| RequestAbortedError
|
|
155
|
+
| RequestTimeoutError
|
|
156
|
+
| InvalidRequestError
|
|
157
|
+
| UnexpectedClientError
|
|
158
|
+
| SDKValidationError
|
|
159
|
+
>(
|
|
160
|
+
M.json(200, z.array(shared.Notification$inboundSchema)),
|
|
161
|
+
M.fail("4XX"),
|
|
162
|
+
M.fail("5XX"),
|
|
163
|
+
)(response, req);
|
|
164
|
+
if (!result.ok) {
|
|
165
|
+
return [result, { status: "complete", request: req, response }];
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return [result, { status: "complete", request: req, response }];
|
|
169
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
73
73
|
export const SDK_METADATA = {
|
|
74
74
|
language: "typescript",
|
|
75
75
|
openapiDocVersion: "1.0",
|
|
76
|
-
sdkVersion: "2.85.
|
|
77
|
-
genVersion: "2.
|
|
76
|
+
sdkVersion: "2.85.37",
|
|
77
|
+
genVersion: "2.932.9",
|
|
78
78
|
userAgent:
|
|
79
|
-
"speakeasy-sdk/typescript 2.85.
|
|
79
|
+
"speakeasy-sdk/typescript 2.85.37 2.932.9 1.0 @unified-api/typescript-sdk",
|
|
80
80
|
} as const;
|
|
@@ -455,6 +455,7 @@ export * from "./listunifiedconnections.js";
|
|
|
455
455
|
export * from "./listunifiedintegrations.js";
|
|
456
456
|
export * from "./listunifiedintegrationworkspaces.js";
|
|
457
457
|
export * from "./listunifiedissues.js";
|
|
458
|
+
export * from "./listunifiednotifications.js";
|
|
458
459
|
export * from "./listunifiedwebhooks.js";
|
|
459
460
|
export * from "./listunifiedworkspacesecretsmanagers.js";
|
|
460
461
|
export * from "./listverificationpackages.js";
|
|
@@ -62,6 +62,7 @@ export type ListHrisTimeoffsRequest = {
|
|
|
62
62
|
* The start date to filter by (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
|
|
63
63
|
*/
|
|
64
64
|
startGte?: string | undefined;
|
|
65
|
+
status?: string | undefined;
|
|
65
66
|
type?: string | undefined;
|
|
66
67
|
/**
|
|
67
68
|
* Return only results whose updated date is equal or greater to this value (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
|
|
@@ -91,6 +92,7 @@ export type ListHrisTimeoffsRequest$Outbound = {
|
|
|
91
92
|
raw?: string | undefined;
|
|
92
93
|
sort?: string | undefined;
|
|
93
94
|
start_gte?: string | undefined;
|
|
95
|
+
status?: string | undefined;
|
|
94
96
|
type?: string | undefined;
|
|
95
97
|
updated_gte?: string | undefined;
|
|
96
98
|
user_id?: string | undefined;
|
|
@@ -113,6 +115,7 @@ export const ListHrisTimeoffsRequest$outboundSchema: z.ZodType<
|
|
|
113
115
|
raw: z.string().optional(),
|
|
114
116
|
sort: z.string().optional(),
|
|
115
117
|
startGte: z.string().optional(),
|
|
118
|
+
status: z.string().optional(),
|
|
116
119
|
type: z.string().optional(),
|
|
117
120
|
updatedGte: z.string().optional(),
|
|
118
121
|
userId: z.string().optional(),
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
+
|
|
8
|
+
export type ListUnifiedNotificationsRequest = {
|
|
9
|
+
limit?: number | undefined;
|
|
10
|
+
offset?: number | undefined;
|
|
11
|
+
order?: string | undefined;
|
|
12
|
+
sort?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Return only results whose updated date is equal or greater to this value (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
|
|
15
|
+
*/
|
|
16
|
+
updatedGte?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type ListUnifiedNotificationsRequest$Outbound = {
|
|
21
|
+
limit?: number | undefined;
|
|
22
|
+
offset?: number | undefined;
|
|
23
|
+
order?: string | undefined;
|
|
24
|
+
sort?: string | undefined;
|
|
25
|
+
updated_gte?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const ListUnifiedNotificationsRequest$outboundSchema: z.ZodType<
|
|
30
|
+
ListUnifiedNotificationsRequest$Outbound,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
ListUnifiedNotificationsRequest
|
|
33
|
+
> = z.object({
|
|
34
|
+
limit: z.number().optional(),
|
|
35
|
+
offset: z.number().optional(),
|
|
36
|
+
order: z.string().optional(),
|
|
37
|
+
sort: z.string().optional(),
|
|
38
|
+
updatedGte: z.string().optional(),
|
|
39
|
+
}).transform((v) => {
|
|
40
|
+
return remap$(v, {
|
|
41
|
+
updatedGte: "updated_gte",
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export function listUnifiedNotificationsRequestToJSON(
|
|
46
|
+
listUnifiedNotificationsRequest: ListUnifiedNotificationsRequest,
|
|
47
|
+
): string {
|
|
48
|
+
return JSON.stringify(
|
|
49
|
+
ListUnifiedNotificationsRequest$outboundSchema.parse(
|
|
50
|
+
listUnifiedNotificationsRequest,
|
|
51
|
+
),
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -249,6 +249,7 @@ export * from "./messagingmessage.js";
|
|
|
249
249
|
export * from "./messagingreaction.js";
|
|
250
250
|
export * from "./messagingreference.js";
|
|
251
251
|
export * from "./metadatametadata.js";
|
|
252
|
+
export * from "./notification.js";
|
|
252
253
|
export * from "./paymentallocation.js";
|
|
253
254
|
export * from "./paymentlineitem.js";
|
|
254
255
|
export * from "./paymentlink.js";
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../../types/enums.js";
|
|
9
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
10
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
export const Event = {
|
|
14
|
+
UserCreated: "USER_CREATED",
|
|
15
|
+
UserDeleted: "USER_DELETED",
|
|
16
|
+
ConnectionHealthy: "CONNECTION_HEALTHY",
|
|
17
|
+
ConnectionUnhealthy: "CONNECTION_UNHEALTHY",
|
|
18
|
+
ConnectionCreated: "CONNECTION_CREATED",
|
|
19
|
+
ConnectionUpdated: "CONNECTION_UPDATED",
|
|
20
|
+
ConnectionDeleted: "CONNECTION_DELETED",
|
|
21
|
+
ConnectionPaused: "CONNECTION_PAUSED",
|
|
22
|
+
ConnectionUnpaused: "CONNECTION_UNPAUSED",
|
|
23
|
+
IntegrationActivated: "INTEGRATION_ACTIVATED",
|
|
24
|
+
IntegrationDeactivated: "INTEGRATION_DEACTIVATED",
|
|
25
|
+
IntegrationUpdated: "INTEGRATION_UPDATED",
|
|
26
|
+
WorkspaceUpdated: "WORKSPACE_UPDATED",
|
|
27
|
+
WorkspaceOverLimit: "WORKSPACE_OVER_LIMIT",
|
|
28
|
+
Workspace80PercentLimit: "WORKSPACE_80PERCENT_LIMIT",
|
|
29
|
+
WebhookCreated: "WEBHOOK_CREATED",
|
|
30
|
+
WebhookDeleted: "WEBHOOK_DELETED",
|
|
31
|
+
WebhookUnhealthy: "WEBHOOK_UNHEALTHY",
|
|
32
|
+
WebhookPaused: "WEBHOOK_PAUSED",
|
|
33
|
+
WebhookUnpaused: "WEBHOOK_UNPAUSED",
|
|
34
|
+
} as const;
|
|
35
|
+
export type Event = OpenEnum<typeof Event>;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* A notification of an event that occurred in you account.
|
|
39
|
+
*/
|
|
40
|
+
export type Notification = {
|
|
41
|
+
connectionId?: string | undefined;
|
|
42
|
+
createdAt?: Date | undefined;
|
|
43
|
+
description?: string | undefined;
|
|
44
|
+
event?: Event | undefined;
|
|
45
|
+
id?: string | undefined;
|
|
46
|
+
integrationName?: string | undefined;
|
|
47
|
+
integrationType?: string | undefined;
|
|
48
|
+
sentAt?: Date | undefined;
|
|
49
|
+
updatedAt?: Date | undefined;
|
|
50
|
+
userId?: string | undefined;
|
|
51
|
+
userName?: string | undefined;
|
|
52
|
+
webhookId?: string | undefined;
|
|
53
|
+
workspaceId?: string | undefined;
|
|
54
|
+
workspaceName?: string | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const Event$inboundSchema: z.ZodType<Event, z.ZodTypeDef, unknown> =
|
|
59
|
+
openEnums.inboundSchema(Event);
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const Notification$inboundSchema: z.ZodType<
|
|
63
|
+
Notification,
|
|
64
|
+
z.ZodTypeDef,
|
|
65
|
+
unknown
|
|
66
|
+
> = z.object({
|
|
67
|
+
connection_id: z.string().optional(),
|
|
68
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
69
|
+
.optional(),
|
|
70
|
+
description: z.string().optional(),
|
|
71
|
+
event: Event$inboundSchema.optional(),
|
|
72
|
+
id: z.string().optional(),
|
|
73
|
+
integration_name: z.string().optional(),
|
|
74
|
+
integration_type: z.string().optional(),
|
|
75
|
+
sent_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
76
|
+
.optional(),
|
|
77
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
78
|
+
.optional(),
|
|
79
|
+
user_id: z.string().optional(),
|
|
80
|
+
user_name: z.string().optional(),
|
|
81
|
+
webhook_id: z.string().optional(),
|
|
82
|
+
workspace_id: z.string().optional(),
|
|
83
|
+
workspace_name: z.string().optional(),
|
|
84
|
+
}).transform((v) => {
|
|
85
|
+
return remap$(v, {
|
|
86
|
+
"connection_id": "connectionId",
|
|
87
|
+
"created_at": "createdAt",
|
|
88
|
+
"integration_name": "integrationName",
|
|
89
|
+
"integration_type": "integrationType",
|
|
90
|
+
"sent_at": "sentAt",
|
|
91
|
+
"updated_at": "updatedAt",
|
|
92
|
+
"user_id": "userId",
|
|
93
|
+
"user_name": "userName",
|
|
94
|
+
"webhook_id": "webhookId",
|
|
95
|
+
"workspace_id": "workspaceId",
|
|
96
|
+
"workspace_name": "workspaceName",
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
export function notificationFromJSON(
|
|
101
|
+
jsonString: string,
|
|
102
|
+
): SafeParseResult<Notification, SDKValidationError> {
|
|
103
|
+
return safeParse(
|
|
104
|
+
jsonString,
|
|
105
|
+
(x) => Notification$inboundSchema.parse(JSON.parse(x)),
|
|
106
|
+
`Failed to parse 'Notification' from JSON`,
|
|
107
|
+
);
|
|
108
|
+
}
|
|
@@ -16,6 +16,12 @@ export const SecretsManagerType = {
|
|
|
16
16
|
Gcp: "gcp",
|
|
17
17
|
Hashicorp: "hashicorp",
|
|
18
18
|
Composio: "composio",
|
|
19
|
+
Onepassword: "1password",
|
|
20
|
+
Bitwarden: "bitwarden",
|
|
21
|
+
Doppler: "doppler",
|
|
22
|
+
Akeyless: "akeyless",
|
|
23
|
+
Pipedream: "pipedream",
|
|
24
|
+
Alibabacloud: "alibabacloud",
|
|
19
25
|
} as const;
|
|
20
26
|
export type SecretsManagerType = OpenEnum<typeof SecretsManagerType>;
|
|
21
27
|
|
|
@@ -42,6 +42,9 @@ export type StorageFile = {
|
|
|
42
42
|
raw?: { [k: string]: any } | undefined;
|
|
43
43
|
references?: Array<StorageReference> | undefined;
|
|
44
44
|
size?: number | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* labels
|
|
47
|
+
*/
|
|
45
48
|
tags?: Array<string> | undefined;
|
|
46
49
|
type?: StorageFileType | undefined;
|
|
47
50
|
updatedAt?: Date | undefined;
|
|
@@ -21,12 +21,12 @@ export const DbType = {
|
|
|
21
21
|
} as const;
|
|
22
22
|
export type DbType = OpenEnum<typeof DbType>;
|
|
23
23
|
|
|
24
|
-
export const
|
|
24
|
+
export const WebhookEvent = {
|
|
25
25
|
Updated: "updated",
|
|
26
26
|
Created: "created",
|
|
27
27
|
Deleted: "deleted",
|
|
28
28
|
} as const;
|
|
29
|
-
export type
|
|
29
|
+
export type WebhookEvent = OpenEnum<typeof WebhookEvent>;
|
|
30
30
|
|
|
31
31
|
export const WebhookObjectType = {
|
|
32
32
|
AccountingAccount: "accounting_account",
|
|
@@ -218,7 +218,7 @@ export type Webhook = {
|
|
|
218
218
|
dbType?: DbType | undefined;
|
|
219
219
|
dbUrl?: string | undefined;
|
|
220
220
|
environment?: string | undefined;
|
|
221
|
-
event:
|
|
221
|
+
event: WebhookEvent;
|
|
222
222
|
fields?: string | undefined;
|
|
223
223
|
filters?: { [k: string]: string } | undefined;
|
|
224
224
|
hookUrl?: string | undefined;
|
|
@@ -247,11 +247,17 @@ export const DbType$outboundSchema: z.ZodType<string, z.ZodTypeDef, DbType> =
|
|
|
247
247
|
openEnums.outboundSchema(DbType);
|
|
248
248
|
|
|
249
249
|
/** @internal */
|
|
250
|
-
export const
|
|
251
|
-
|
|
250
|
+
export const WebhookEvent$inboundSchema: z.ZodType<
|
|
251
|
+
WebhookEvent,
|
|
252
|
+
z.ZodTypeDef,
|
|
253
|
+
unknown
|
|
254
|
+
> = openEnums.inboundSchema(WebhookEvent);
|
|
252
255
|
/** @internal */
|
|
253
|
-
export const
|
|
254
|
-
|
|
256
|
+
export const WebhookEvent$outboundSchema: z.ZodType<
|
|
257
|
+
string,
|
|
258
|
+
z.ZodTypeDef,
|
|
259
|
+
WebhookEvent
|
|
260
|
+
> = openEnums.outboundSchema(WebhookEvent);
|
|
255
261
|
|
|
256
262
|
/** @internal */
|
|
257
263
|
export const WebhookObjectType$inboundSchema: z.ZodType<
|
|
@@ -294,7 +300,7 @@ export const Webhook$inboundSchema: z.ZodType<Webhook, z.ZodTypeDef, unknown> =
|
|
|
294
300
|
db_type: DbType$inboundSchema.optional(),
|
|
295
301
|
db_url: z.string().optional(),
|
|
296
302
|
environment: z.string().default("Production"),
|
|
297
|
-
event:
|
|
303
|
+
event: WebhookEvent$inboundSchema,
|
|
298
304
|
fields: z.string().optional(),
|
|
299
305
|
filters: z.record(z.string()).optional(),
|
|
300
306
|
hook_url: z.string().optional(),
|
|
@@ -375,7 +381,7 @@ export const Webhook$outboundSchema: z.ZodType<
|
|
|
375
381
|
dbType: DbType$outboundSchema.optional(),
|
|
376
382
|
dbUrl: z.string().optional(),
|
|
377
383
|
environment: z.string().default("Production"),
|
|
378
|
-
event:
|
|
384
|
+
event: WebhookEvent$outboundSchema,
|
|
379
385
|
fields: z.string().optional(),
|
|
380
386
|
filters: z.record(z.string()).optional(),
|
|
381
387
|
hookUrl: z.string().optional(),
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { unifiedListUnifiedNotifications } from "../funcs/unifiedListUnifiedNotifications.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as operations from "./models/operations/index.js";
|
|
8
|
+
import * as shared from "./models/shared/index.js";
|
|
9
|
+
import { unwrapAsync } from "./types/fp.js";
|
|
10
|
+
|
|
11
|
+
export class Notification extends ClientSDK {
|
|
12
|
+
/**
|
|
13
|
+
* List event notifications
|
|
14
|
+
*/
|
|
15
|
+
async listUnifiedNotifications(
|
|
16
|
+
request: operations.ListUnifiedNotificationsRequest,
|
|
17
|
+
options?: RequestOptions,
|
|
18
|
+
): Promise<Array<shared.Notification>> {
|
|
19
|
+
return unwrapAsync(unifiedListUnifiedNotifications(
|
|
20
|
+
this,
|
|
21
|
+
request,
|
|
22
|
+
options,
|
|
23
|
+
));
|
|
24
|
+
}
|
|
25
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -102,6 +102,7 @@ import { Messaging } from "./messaging.js";
|
|
|
102
102
|
import { Metadata } from "./metadata.js";
|
|
103
103
|
import { Model } from "./model.js";
|
|
104
104
|
import { Note } from "./note.js";
|
|
105
|
+
import { Notification } from "./notification.js";
|
|
105
106
|
import { Order } from "./order.js";
|
|
106
107
|
import { Organization } from "./organization.js";
|
|
107
108
|
import { Package } from "./package.js";
|
|
@@ -1007,6 +1008,11 @@ export class UnifiedTo extends ClientSDK {
|
|
|
1007
1008
|
return (this._issue ??= new Issue(this._options));
|
|
1008
1009
|
}
|
|
1009
1010
|
|
|
1011
|
+
private _notification?: Notification;
|
|
1012
|
+
get notification(): Notification {
|
|
1013
|
+
return (this._notification ??= new Notification(this._options));
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1010
1016
|
private _webhook?: Webhook;
|
|
1011
1017
|
get webhook(): Webhook {
|
|
1012
1018
|
return (this._webhook ??= new Webhook(this._options));
|
package/src/sdk/unified.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { unifiedListUnifiedEnvironments } from "../funcs/unifiedListUnifiedEnvir
|
|
|
18
18
|
import { unifiedListUnifiedIntegrations } from "../funcs/unifiedListUnifiedIntegrations.js";
|
|
19
19
|
import { unifiedListUnifiedIntegrationWorkspaces } from "../funcs/unifiedListUnifiedIntegrationWorkspaces.js";
|
|
20
20
|
import { unifiedListUnifiedIssues } from "../funcs/unifiedListUnifiedIssues.js";
|
|
21
|
+
import { unifiedListUnifiedNotifications } from "../funcs/unifiedListUnifiedNotifications.js";
|
|
21
22
|
import { unifiedListUnifiedWebhooks } from "../funcs/unifiedListUnifiedWebhooks.js";
|
|
22
23
|
import { unifiedListUnifiedWorkspaceSecretsmanagers } from "../funcs/unifiedListUnifiedWorkspaceSecretsmanagers.js";
|
|
23
24
|
import { unifiedPatchUnifiedConnection } from "../funcs/unifiedPatchUnifiedConnection.js";
|
|
@@ -270,6 +271,20 @@ export class Unified extends ClientSDK {
|
|
|
270
271
|
));
|
|
271
272
|
}
|
|
272
273
|
|
|
274
|
+
/**
|
|
275
|
+
* List event notifications
|
|
276
|
+
*/
|
|
277
|
+
async listUnifiedNotifications(
|
|
278
|
+
request: operations.ListUnifiedNotificationsRequest,
|
|
279
|
+
options?: RequestOptions,
|
|
280
|
+
): Promise<Array<shared.Notification>> {
|
|
281
|
+
return unwrapAsync(unifiedListUnifiedNotifications(
|
|
282
|
+
this,
|
|
283
|
+
request,
|
|
284
|
+
options,
|
|
285
|
+
));
|
|
286
|
+
}
|
|
287
|
+
|
|
273
288
|
/**
|
|
274
289
|
* Returns all registered webhooks
|
|
275
290
|
*/
|