@nvisy/sdk 0.11.0 → 0.12.0
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/CHANGELOG.md +23 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/{client-SOt0c3k7.d.ts → client-C70LS0n6.d.ts} +2 -2
- package/dist/{client-SOt0c3k7.d.ts.map → client-C70LS0n6.d.ts.map} +1 -1
- package/dist/datatypes/index.d.ts +2 -2
- package/dist/error-C_RvXw4Z.js +51 -0
- package/dist/error-C_RvXw4Z.js.map +1 -0
- package/dist/{error-DmkKaDjI.js → errors-BOLD8iC1.js} +2 -49
- package/dist/errors-BOLD8iC1.js.map +1 -0
- package/dist/errors-DEIpR751.d.ts +127 -0
- package/dist/errors-DEIpR751.d.ts.map +1 -0
- package/dist/{index-BAyMQmm6.d.ts → index-DJSrXmm0.d.ts} +70 -29
- package/dist/{index-BAyMQmm6.d.ts.map → index-DJSrXmm0.d.ts.map} +1 -1
- package/dist/index.d.ts +4 -128
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/services/index.d.ts +1 -1
- package/dist/webhooks/index.d.ts +144 -0
- package/dist/webhooks/index.d.ts.map +1 -0
- package/dist/webhooks/index.js +147 -0
- package/dist/webhooks/index.js.map +1 -0
- package/package.json +5 -1
- package/dist/error-DmkKaDjI.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,27 @@ and this project adheres to
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.12.0] - 2026-08-05
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `@nvisy/sdk/webhooks` — utilities for receiving webhooks, built on Web
|
|
16
|
+
Crypto (works in Node, browsers, edge runtimes, and workers):
|
|
17
|
+
- `verifyWebhook()` / `constructEvent()` — verify a signature and parse the
|
|
18
|
+
event from raw values
|
|
19
|
+
- `verifyRequest()` / `constructEventFromRequest()` — accept a standard
|
|
20
|
+
Fetch `Request`, for web-standard frameworks (Hono, Next.js App Router,
|
|
21
|
+
Remix, SvelteKit, Deno, Bun, Cloudflare Workers)
|
|
22
|
+
- `WEBHOOK_HEADERS` constant and `WebhookSignatureError`
|
|
23
|
+
- HMAC-SHA256 verification with constant-time comparison and timestamp
|
|
24
|
+
replay protection
|
|
25
|
+
- `AccountRef` datatype — the public account reference (username, display
|
|
26
|
+
name, avatar) embedded in resources by their creator/trigger fields
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- Regenerated the API schema against the updated platform handlers
|
|
31
|
+
|
|
11
32
|
## [0.11.0] - 2026-08-04
|
|
12
33
|
|
|
13
34
|
### Added
|
|
@@ -278,7 +299,8 @@ and this project adheres to
|
|
|
278
299
|
- Network error handling for timeouts, DNS resolution, and connection issues
|
|
279
300
|
- Configuration validation with detailed error messages
|
|
280
301
|
|
|
281
|
-
[Unreleased]: https://github.com/nvisycom/sdk-ts/compare/v0.
|
|
302
|
+
[Unreleased]: https://github.com/nvisycom/sdk-ts/compare/v0.12.0...HEAD
|
|
303
|
+
[0.12.0]: https://github.com/nvisycom/sdk-ts/compare/v0.11.0...v0.12.0
|
|
282
304
|
[0.11.0]: https://github.com/nvisycom/sdk-ts/compare/v0.10.0...v0.11.0
|
|
283
305
|
[0.10.0]: https://github.com/nvisycom/sdk-ts/compare/v0.9.0...v0.10.0
|
|
284
306
|
[0.9.0]: https://github.com/nvisycom/sdk-ts/compare/v0.8.0...v0.9.0
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ClientConfig } from "../config-BRQp8Cat.js";
|
|
2
|
-
import { Lt as AuthToken, Rt as Login, zt as Signup } from "../index-
|
|
2
|
+
import { Lt as AuthToken, Rt as Login, zt as Signup } from "../index-DJSrXmm0.js";
|
|
3
3
|
//#region src/auth/config.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Configuration options for standalone authentication functions.
|
package/dist/auth/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ClientConfig } from "./config-BRQp8Cat.js";
|
|
2
|
-
import { $t as
|
|
2
|
+
import { $t as UpdateAccount, B as NotificationPage, Bt as ApiToken, Ct as ConnectionPage, D as UpdatePolicy, E as PolicySummaryPage, Et as ConnectionVerification, G as Member, H as UnreadStatus, I as UpdatePipeline, It as UpdateConnection, J as UpdateMember, Jt as ActivityPage, K as MemberPage, Kt as UpdateApiToken, L as CursorPagination, Lt as AuthToken, M as PipelineStatus, O as CreatePipeline, Ot as CreateConnection, P as PipelineSummaryPage, Pt as SyncStatus, Q as InviteCode, Qt as PublicAccount, Rt as Login, S as Policy, Tt as ConnectionSyncPage, U as UpdateNotificationSettings, Ut as ApiTokenWithJWT, V as NotificationSettings, Vt as ApiTokenPage, W as ListMembers, Wt as CreateApiToken, X as GenerateInviteCode, Xt as Account$1, Y as CreateInvite, _ as CreatePipelineRun, _t as UpdateFile, at as ListInvites, b as PipelineRunStatus, c as UpdateWebhook, dt as File, en as paths, et as InvitePage, f as WebhookPage, ft as FilePage, h as AnalyzedDocument, ht as ListFiles, i as WorkspacePage, jt as SyncConnection, k as Pipeline, l as Webhook, lt as Health, n as UpdateWorkspace, nt as InviteSent, o as CreateWebhook, ot as ReplyInvite, p as WebhookResult, r as Workspace, s as TestWebhook, t as CreateWorkspace, tt as InvitePreview, u as WebhookCreated, v as PipelineRun, wt as ConnectionSync, x as CreatePolicy, xt as Connection, y as PipelineRunPage, zt as Signup } from "./index-DJSrXmm0.js";
|
|
3
3
|
import { Client } from "openapi-fetch";
|
|
4
4
|
//#region src/services/account.d.ts
|
|
5
5
|
/**
|
|
@@ -917,4 +917,4 @@ declare class Nvisy {
|
|
|
917
917
|
}
|
|
918
918
|
//#endregion
|
|
919
919
|
export { Activities as _, Syncs as a, Policies as c, Members as d, Invites as f, ApiTokens as g, Auth as h, Webhooks as i, Pipelines as l, Connections as m, Nvisy as n, Status as o, Files as p, Workspaces as r, Runs as s, ApiClient as t, Notifications as u, Account as v };
|
|
920
|
-
//# sourceMappingURL=client-
|
|
920
|
+
//# sourceMappingURL=client-C70LS0n6.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-
|
|
1
|
+
{"version":3,"file":"client-C70LS0n6.d.ts","names":[],"sources":["../src/services/account.ts","../src/services/activities.ts","../src/services/api-tokens.ts","../src/services/auth.ts","../src/services/connections.ts","../src/services/files.ts","../src/services/invites.ts","../src/services/members.ts","../src/services/notifications.ts","../src/services/pipelines.ts","../src/services/policies.ts","../src/services/runs.ts","../src/services/status.ts","../src/services/syncs.ts","../src/services/webhooks.ts","../src/services/workspaces.ts","../src/client.ts"],"mappings":";;;;;;;cAUa;;EAGA,YAAA,KAAK;;;;;;EASX,cAAc,QAAQ;;;;;;;EAWtB,cAAc,SAAS,gBAAgB,QAAQ;;;;;;EAY/C,iBAAiB;;;;;;;EAUjB,iBAAiB,mBAAmB,QAAQ;;;;;;;EAa5C,UAAU,mBAAmB,QAAQ;;;;;;;;EAerC,aAAa,kBAAkB,QAAQ,OAAO,QAAQ;;;;;;;EAsBtD,aAAa,mBAAmB;;;;;;;cCnG1B;;EAGA,YAAA,KAAK;;;;;;;;EAWX,eACL,uBACA,QAAQ,mBACN,QAAQ;;;;;;;cCVC;;EAGA,YAAA,KAAK;;;;;;;EAUX,cAAc,QAAQ,mBAAmB,QAAQ;;;;;;;EAajD,YAAY,kBAAkB,QAAQ;;;;;;;EAatC,eAAe,OAAO,iBAAiB,QAAQ;;;;;;;;EAc/C,eACL,iBACA,SAAS,iBACP,QAAQ;;;;;;;EAcL,eAAe,kBAAkB;;;;;;;cC7E3B;;EAGA,YAAA,KAAK;;;;;;;EAUX,aAAa,aAAa,QAAQ,QAAQ;;;;;;;EAa1C,cAAc,aAAa,SAAS,QAAQ;;;;;;EAY5C,iBAAiB;;;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;MAOR,SAAS;;;;MAOT,YAAY;;;;MAOZ,cAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as InviteExpiration, A as PipelineDefinition, At as S3Credentials, B as NotificationPage, Bt as ApiToken, C as PolicyDefinition, Ct as ConnectionPage, D as UpdatePolicy, Dt as ConnectionsQuery, E as PolicySummaryPage, Et as ConnectionVerification, F as PipelineTriggerType, Ft as SyncTriggerType, G as Member, Gt as TokenExpiration, H as UnreadStatus, Ht as ApiTokenType, I as UpdatePipeline, It as UpdateConnection, J as UpdateMember, Jt as ActivityPage, K as MemberPage, Kt as UpdateApiToken, L as CursorPagination, Lt as AuthToken, M as PipelineStatus, Mt as SyncDeletionPolicy, N as PipelineSummary, Nt as SyncMode, O as CreatePipeline, Ot as CreateConnection, P as PipelineSummaryPage, Pt as SyncStatus, Q as InviteCode, Qt as
|
|
2
|
-
export type { Account, Activity, ActivityPage, ActivityType, AnalyzedDocument, ApiToken, ApiTokenPage, ApiTokenType, ApiTokenWithJWT, Artifact, AuthToken, AzureCredentials, ComponentHealth, Connection, ConnectionConfig, ConnectionPage, ConnectionSync, ConnectionSyncPage, ConnectionVerification, ConnectionsQuery, CreateApiToken, CreateConnection, CreateInvite, CreatePipeline, CreatePipelineRun, CreatePolicy, CreateWebhook, CreateWorkspace, CursorPagination, ErrorResponse, File, FilePage, FileSource, FormatToken, GcsCredentials, GenerateInviteCode, Health, HealthStatus, Invite, InviteCode, InviteExpiration, InvitePage, InvitePreview, InviteSent, InviteSortField, InviteStatus, ListFiles, ListInvites, ListMembers, Login, Member, MemberPage, MemberSortField, ModalityToken, Notification, NotificationEvent, NotificationPage, NotificationSettings, Pipeline, PipelineDefinition, PipelineFilter, PipelineRun, PipelineRunPage, PipelineRunStatus, PipelineStatus, PipelineSummary, PipelineSummaryPage, PipelineTriggerType, Policy, PolicyDefinition, PolicyRule, PolicySummary, PolicySummaryPage, PublicAccount, ReplyInvite, S3Credentials, Signup, SortOrder, SyncConnection, SyncDeletionPolicy, SyncMode, SyncStatus, SyncTriggerType, TestWebhook, TokenExpiration, UnreadStatus, UpdateAccount, UpdateApiToken, UpdateConnection, UpdateFile, UpdateMember, UpdateNotificationSettings, UpdatePipeline, UpdatePolicy, UpdateWebhook, UpdateWorkspace, ValidationErrorDetail, Webhook, WebhookCreated, WebhookEvent, WebhookPage, WebhookResult, WebhookStatus, Workspace, WorkspacePage, WorkspaceRole };
|
|
1
|
+
import { $ as InviteExpiration, $t as UpdateAccount, A as PipelineDefinition, At as S3Credentials, B as NotificationPage, Bt as ApiToken, C as PolicyDefinition, Ct as ConnectionPage, D as UpdatePolicy, Dt as ConnectionsQuery, E as PolicySummaryPage, Et as ConnectionVerification, F as PipelineTriggerType, Ft as SyncTriggerType, G as Member, Gt as TokenExpiration, H as UnreadStatus, Ht as ApiTokenType, I as UpdatePipeline, It as UpdateConnection, J as UpdateMember, Jt as ActivityPage, K as MemberPage, Kt as UpdateApiToken, L as CursorPagination, Lt as AuthToken, M as PipelineStatus, Mt as SyncDeletionPolicy, N as PipelineSummary, Nt as SyncMode, O as CreatePipeline, Ot as CreateConnection, P as PipelineSummaryPage, Pt as SyncStatus, Q as InviteCode, Qt as PublicAccount, R as Notification, Rt as Login, S as Policy, St as ConnectionConfig, T as PolicySummary, Tt as ConnectionSyncPage, U as UpdateNotificationSettings, Ut as ApiTokenWithJWT, V as NotificationSettings, Vt as ApiTokenPage, W as ListMembers, Wt as CreateApiToken, X as GenerateInviteCode, Xt as Account, Y as CreateInvite, Yt as ActivityType, Z as Invite, Zt as AccountRef, _ as CreatePipelineRun, _t as UpdateFile, a as WorkspaceRole, at as ListInvites, b as PipelineRunStatus, bt as AzureCredentials, c as UpdateWebhook, ct as ComponentHealth, d as WebhookEvent, dt as File, et as InvitePage, f as WebhookPage, ft as FilePage, g as Artifact, gt as ModalityToken, h as AnalyzedDocument, ht as ListFiles, i as WorkspacePage, it as InviteStatus, j as PipelineFilter, jt as SyncConnection, k as Pipeline, kt as GcsCredentials, l as Webhook, lt as Health, m as WebhookStatus, mt as FormatToken, n as UpdateWorkspace, nt as InviteSent, o as CreateWebhook, ot as ReplyInvite, p as WebhookResult, pt as FileSource, q as MemberSortField, qt as Activity, r as Workspace, rt as InviteSortField, s as TestWebhook, st as SortOrder, t as CreateWorkspace, tt as InvitePreview, u as WebhookCreated, ut as HealthStatus, v as PipelineRun, vt as ErrorResponse, w as PolicyRule, wt as ConnectionSync, x as CreatePolicy, xt as Connection, y as PipelineRunPage, yt as ValidationErrorDetail, z as NotificationEvent, zt as Signup } from "../index-DJSrXmm0.js";
|
|
2
|
+
export type { Account, AccountRef, Activity, ActivityPage, ActivityType, AnalyzedDocument, ApiToken, ApiTokenPage, ApiTokenType, ApiTokenWithJWT, Artifact, AuthToken, AzureCredentials, ComponentHealth, Connection, ConnectionConfig, ConnectionPage, ConnectionSync, ConnectionSyncPage, ConnectionVerification, ConnectionsQuery, CreateApiToken, CreateConnection, CreateInvite, CreatePipeline, CreatePipelineRun, CreatePolicy, CreateWebhook, CreateWorkspace, CursorPagination, ErrorResponse, File, FilePage, FileSource, FormatToken, GcsCredentials, GenerateInviteCode, Health, HealthStatus, Invite, InviteCode, InviteExpiration, InvitePage, InvitePreview, InviteSent, InviteSortField, InviteStatus, ListFiles, ListInvites, ListMembers, Login, Member, MemberPage, MemberSortField, ModalityToken, Notification, NotificationEvent, NotificationPage, NotificationSettings, Pipeline, PipelineDefinition, PipelineFilter, PipelineRun, PipelineRunPage, PipelineRunStatus, PipelineStatus, PipelineSummary, PipelineSummaryPage, PipelineTriggerType, Policy, PolicyDefinition, PolicyRule, PolicySummary, PolicySummaryPage, PublicAccount, ReplyInvite, S3Credentials, Signup, SortOrder, SyncConnection, SyncDeletionPolicy, SyncMode, SyncStatus, SyncTriggerType, TestWebhook, TokenExpiration, UnreadStatus, UpdateAccount, UpdateApiToken, UpdateConnection, UpdateFile, UpdateMember, UpdateNotificationSettings, UpdatePipeline, UpdatePolicy, UpdateWebhook, UpdateWorkspace, ValidationErrorDetail, Webhook, WebhookCreated, WebhookEvent, WebhookPage, WebhookResult, WebhookStatus, Workspace, WorkspacePage, WorkspaceRole };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { n as NvisyError, t as NvisyApiError } from "./errors-BOLD8iC1.js";
|
|
2
|
+
|
|
3
|
+
//#region src/config.ts
|
|
4
|
+
/**
|
|
5
|
+
* @fileoverview Configuration types and constants for the Nvisy SDK.
|
|
6
|
+
*
|
|
7
|
+
* This module provides configuration interfaces, default values, and environment
|
|
8
|
+
* variable names used throughout the SDK.
|
|
9
|
+
*
|
|
10
|
+
* @module config
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Current SDK version.
|
|
14
|
+
*
|
|
15
|
+
* Used in the default user agent string and for version tracking.
|
|
16
|
+
*/
|
|
17
|
+
const VERSION = "0.3.0";
|
|
18
|
+
/**
|
|
19
|
+
* Default configuration values used when options are not explicitly provided.
|
|
20
|
+
*/
|
|
21
|
+
const DEFAULTS = {
|
|
22
|
+
/**
|
|
23
|
+
* Default base URL for the Nvisy API.
|
|
24
|
+
*/
|
|
25
|
+
BASE_URL: "https://api.nvisy.com",
|
|
26
|
+
/**
|
|
27
|
+
* Default user agent string.
|
|
28
|
+
*/
|
|
29
|
+
USER_AGENT: `@nvisy/sdk v.${VERSION}`
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/middleware/error.ts
|
|
34
|
+
/**
|
|
35
|
+
* Middleware that automatically throws NvisyApiError for error responses.
|
|
36
|
+
* This replaces the need for manual checks in services.
|
|
37
|
+
*/
|
|
38
|
+
const errorMiddleware = {
|
|
39
|
+
async onResponse({ response }) {
|
|
40
|
+
if (!response.ok) throw new NvisyApiError(await response.clone().json(), response.status);
|
|
41
|
+
return response;
|
|
42
|
+
},
|
|
43
|
+
onError({ error }) {
|
|
44
|
+
if (error instanceof Error) throw new NvisyError(error.message);
|
|
45
|
+
throw new NvisyError("An unknown network error occurred");
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { DEFAULTS as n, VERSION as r, errorMiddleware as t };
|
|
51
|
+
//# sourceMappingURL=error-C_RvXw4Z.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-C_RvXw4Z.js","names":[],"sources":["../src/config.ts","../src/middleware/error.ts"],"sourcesContent":["/**\n * @fileoverview Configuration types and constants for the Nvisy SDK.\n *\n * This module provides configuration interfaces, default values, and environment\n * variable names used throughout the SDK.\n *\n * @module config\n */\n\n/**\n * Current SDK version.\n *\n * Used in the default user agent string and for version tracking.\n */\nexport const VERSION = \"0.3.0\";\n\n/**\n * Configuration options for creating a Nvisy client.\n *\n * The `apiToken` field is required for authentication. All other fields are optional\n * and will use sensible defaults when omitted.\n *\n * @example\n * ```typescript\n * const config: ClientConfig = {\n * apiToken: \"your-api-token\",\n * baseUrl: \"https://api.nvisy.com\",\n * headers: { \"X-Custom-Header\": \"value\" },\n * };\n * const client = new Client(config);\n * ```\n */\nexport interface ClientConfig {\n\t/**\n\t * API token for authentication.\n\t *\n\t * Tokens can be obtained from the Nvisy dashboard or via the auth endpoints.\n\t */\n\tapiToken: string;\n\n\t/**\n\t * Base URL for the Nvisy API.\n\t *\n\t * @default \"https://api.nvisy.com\"\n\t */\n\tbaseUrl?: string;\n\n\t/**\n\t * Custom headers to include with every request.\n\t *\n\t * These headers are merged with the default headers (Content-Type, User-Agent,\n\t * and Authorization). Custom headers take precedence over defaults if there\n\t * are conflicts.\n\t */\n\theaders?: Record<string, string>;\n\n\t/**\n\t * Custom user agent string to identify your application.\n\t *\n\t * @default \"@nvisy/sdk v.{version}\"\n\t */\n\tuserAgent?: string;\n\n\t/**\n\t * Enable logging for requests and responses.\n\t *\n\t * When enabled, logs request method, URL, status, and timing to console.\n\t *\n\t * @default false\n\t */\n\twithLogging?: boolean;\n}\n\n/**\n * Default configuration values used when options are not explicitly provided.\n */\nexport const DEFAULTS = {\n\t/**\n\t * Default base URL for the Nvisy API.\n\t */\n\tBASE_URL: \"https://api.nvisy.com\",\n\n\t/**\n\t * Default user agent string.\n\t */\n\tUSER_AGENT: `@nvisy/sdk v.${VERSION}`,\n} as const;\n","import type { Middleware } from \"openapi-fetch\";\nimport type { ErrorResponse } from \"@/datatypes/index.js\";\nimport { NvisyApiError, NvisyError } from \"@/errors.js\";\n\n/**\n * Middleware that automatically throws NvisyApiError for error responses.\n * This replaces the need for manual checks in services.\n */\nexport const errorMiddleware: Middleware = {\n\tasync onResponse({ response }) {\n\t\tif (!response.ok) {\n\t\t\tconst error = (await response.clone().json()) as ErrorResponse;\n\t\t\tthrow new NvisyApiError(error, response.status);\n\t\t}\n\t\treturn response;\n\t},\n\n\tonError({ error }) {\n\t\t// Wrap fetch errors (network failures, CORS, etc.) in NvisyError\n\t\tif (error instanceof Error) {\n\t\t\tthrow new NvisyError(error.message);\n\t\t}\n\t\tthrow new NvisyError(\"An unknown network error occurred\");\n\t},\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAcA,MAAa,UAAU;;;;AA8DvB,MAAa,WAAW;;;;CAIvB,UAAU;;;;CAKV,YAAY,gBAAgB;AAC7B;;;;;;;;AC9EA,MAAa,kBAA8B;CAC1C,MAAM,WAAW,EAAE,YAAY;EAC9B,IAAI,CAAC,SAAS,IAEb,MAAM,IAAI,cAAc,MADH,SAAS,MAAM,CAAC,CAAC,KAAK,GACZ,SAAS,MAAM;EAE/C,OAAO;CACR;CAEA,QAAQ,EAAE,SAAS;EAElB,IAAI,iBAAiB,OACpB,MAAM,IAAI,WAAW,MAAM,OAAO;EAEnC,MAAM,IAAI,WAAW,mCAAmC;CACzD;AACD"}
|
|
@@ -1,33 +1,3 @@
|
|
|
1
|
-
//#region src/config.ts
|
|
2
|
-
/**
|
|
3
|
-
* @fileoverview Configuration types and constants for the Nvisy SDK.
|
|
4
|
-
*
|
|
5
|
-
* This module provides configuration interfaces, default values, and environment
|
|
6
|
-
* variable names used throughout the SDK.
|
|
7
|
-
*
|
|
8
|
-
* @module config
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Current SDK version.
|
|
12
|
-
*
|
|
13
|
-
* Used in the default user agent string and for version tracking.
|
|
14
|
-
*/
|
|
15
|
-
const VERSION = "0.3.0";
|
|
16
|
-
/**
|
|
17
|
-
* Default configuration values used when options are not explicitly provided.
|
|
18
|
-
*/
|
|
19
|
-
const DEFAULTS = {
|
|
20
|
-
/**
|
|
21
|
-
* Default base URL for the Nvisy API.
|
|
22
|
-
*/
|
|
23
|
-
BASE_URL: "https://api.nvisy.com",
|
|
24
|
-
/**
|
|
25
|
-
* Default user agent string.
|
|
26
|
-
*/
|
|
27
|
-
USER_AGENT: `@nvisy/sdk v.${VERSION}`
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
1
|
//#region src/errors.ts
|
|
32
2
|
/**
|
|
33
3
|
* Base error class for all Nvisy SDK errors.
|
|
@@ -178,22 +148,5 @@ var NvisyApiError = class extends NvisyError {
|
|
|
178
148
|
};
|
|
179
149
|
|
|
180
150
|
//#endregion
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
* Middleware that automatically throws NvisyApiError for error responses.
|
|
184
|
-
* This replaces the need for manual checks in services.
|
|
185
|
-
*/
|
|
186
|
-
const errorMiddleware = {
|
|
187
|
-
async onResponse({ response }) {
|
|
188
|
-
if (!response.ok) throw new NvisyApiError(await response.clone().json(), response.status);
|
|
189
|
-
return response;
|
|
190
|
-
},
|
|
191
|
-
onError({ error }) {
|
|
192
|
-
if (error instanceof Error) throw new NvisyError(error.message);
|
|
193
|
-
throw new NvisyError("An unknown network error occurred");
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
//#endregion
|
|
198
|
-
export { VERSION as a, DEFAULTS as i, NvisyApiError as n, NvisyError as r, errorMiddleware as t };
|
|
199
|
-
//# sourceMappingURL=error-DmkKaDjI.js.map
|
|
151
|
+
export { NvisyError as n, NvisyApiError as t };
|
|
152
|
+
//# sourceMappingURL=errors-BOLD8iC1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors-BOLD8iC1.js","names":[],"sources":["../src/errors.ts"],"sourcesContent":["/**\n * @fileoverview Error types for the Nvisy SDK.\n *\n * This module defines the error hierarchy used throughout the SDK:\n * - {@link NvisyError} - Base error class for all SDK errors\n * - {@link NvisyApiError} - Errors returned by the Nvisy API (4xx/5xx responses)\n *\n * @module errors\n */\n\nimport type { ErrorResponse } from \"@/datatypes/index.js\";\n\n// Re-export ErrorResponse type for convenience\nexport type { ErrorResponse } from \"@/datatypes/index.js\";\n\n/**\n * Base error class for all Nvisy SDK errors.\n *\n * This class provides common functionality for all SDK errors.\n * It ensures proper error naming and stack traces.\n *\n * @example\n * ```typescript\n * try {\n * const client = new Client({ apiToken: \"\" });\n * } catch (error) {\n * if (error instanceof NvisyError) {\n * console.log(\"SDK error:\", error.message);\n * }\n * }\n * ```\n */\nexport class NvisyError extends Error {\n\t/**\n\t * The error class name.\n\t */\n\tpublic readonly name: string;\n\n\t/**\n\t * Creates a new NvisyError.\n\t *\n\t * @param message - The error message\n\t */\n\tconstructor(message: string) {\n\t\tsuper(message);\n\t\tthis.name = this.constructor.name;\n\t}\n}\n\n/**\n * Error thrown when the Nvisy API returns an error response.\n *\n * This error class wraps the API's {@link ErrorResponse} format and adds\n * the HTTP status code. It provides helper methods to categorize errors\n * and determine if they are retryable.\n *\n * @example\n * ```typescript\n * try {\n * await client.account.getAccount();\n * } catch (error) {\n * if (error instanceof NvisyApiError) {\n * console.log(`API Error: ${error.message}`);\n * console.log(`Status: ${error.statusCode}`);\n * if (error.isRetryable()) {\n * // Implement retry logic\n * }\n * }\n * }\n * ```\n */\nexport class NvisyApiError extends NvisyError implements ErrorResponse {\n\t/**\n\t * The error type identifier (e.g., \"ValidationError\", \"NotFoundError\").\n\t */\n\tpublic readonly name: string;\n\n\t/**\n\t * Human-readable error message safe for display to end users.\n\t */\n\tpublic readonly message: string;\n\n\t/**\n\t * The resource type that the error relates to (e.g., \"account\", \"project\").\n\t * May be undefined if the error is not resource-specific.\n\t */\n\tpublic readonly resource?: string;\n\n\t/**\n\t * A helpful suggestion for resolving the error.\n\t * May be undefined if no suggestion is available.\n\t */\n\tpublic readonly suggestion?: string;\n\n\t/**\n\t * Field-specific validation errors.\n\t * Present when the error is due to invalid input data.\n\t */\n\tpublic readonly validation?: ErrorResponse[\"validation\"];\n\n\t/**\n\t * HTTP status code of the response (e.g., 400, 404, 500).\n\t */\n\tpublic readonly statusCode: number;\n\n\t/**\n\t * Creates a new NvisyApiError from an API error response.\n\t *\n\t * @param response - The error response from the API\n\t * @param statusCode - The HTTP status code of the response\n\t */\n\tconstructor(response: ErrorResponse, statusCode: number) {\n\t\tsuper(response.message);\n\t\tthis.name = response.name;\n\t\tthis.message = response.message;\n\t\tthis.resource = response.resource;\n\t\tthis.suggestion = response.suggestion;\n\t\tthis.validation = response.validation;\n\t\tthis.statusCode = statusCode;\n\t}\n\n\t/**\n\t * Checks if this is a client error (4xx status code).\n\t *\n\t * Client errors indicate problems with the request itself, such as\n\t * invalid input, missing authentication, or accessing non-existent resources.\n\t *\n\t * @returns True if the status code is in the 4xx range\n\t */\n\tisClientError(): boolean {\n\t\treturn this.statusCode >= 400 && this.statusCode < 500;\n\t}\n\n\t/**\n\t * Checks if this is a server error (5xx status code).\n\t *\n\t * Server errors indicate problems on the API side. These are typically\n\t * transient and may succeed if retried.\n\t *\n\t * @returns True if the status code is in the 5xx range\n\t */\n\tisServerError(): boolean {\n\t\treturn this.statusCode >= 500;\n\t}\n\n\t/**\n\t * Determines if this error is safe to retry.\n\t *\n\t * An error is considered retryable if it's a server error (5xx),\n\t * a request timeout (408), or rate limiting (429).\n\t *\n\t * @returns True if the request may succeed on retry\n\t */\n\tisRetryable(): boolean {\n\t\treturn (\n\t\t\tthis.statusCode >= 500 || // Server errors\n\t\t\tthis.statusCode === 408 || // Request timeout\n\t\t\tthis.statusCode === 429 // Rate limited\n\t\t);\n\t}\n\n\t/**\n\t * Converts the error to a plain {@link ErrorResponse} object.\n\t *\n\t * Useful for serialization or logging.\n\t *\n\t * @returns A plain object representation of the error\n\t */\n\ttoJSON(): ErrorResponse {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tmessage: this.message,\n\t\t\tresource: this.resource,\n\t\t\tsuggestion: this.suggestion,\n\t\t\tvalidation: this.validation,\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAgCA,IAAa,aAAb,cAAgC,MAAM;;;;CAIrC,AAAgB;;;;;;CAOhB,YAAY,SAAiB;EAC5B,MAAM,OAAO;EACb,KAAK,OAAO,KAAK,YAAY;CAC9B;AACD;;;;;;;;;;;;;;;;;;;;;;;AAwBA,IAAa,gBAAb,cAAmC,WAAoC;;;;CAItE,AAAgB;;;;CAKhB,AAAgB;;;;;CAMhB,AAAgB;;;;;CAMhB,AAAgB;;;;;CAMhB,AAAgB;;;;CAKhB,AAAgB;;;;;;;CAQhB,YAAY,UAAyB,YAAoB;EACxD,MAAM,SAAS,OAAO;EACtB,KAAK,OAAO,SAAS;EACrB,KAAK,UAAU,SAAS;EACxB,KAAK,WAAW,SAAS;EACzB,KAAK,aAAa,SAAS;EAC3B,KAAK,aAAa,SAAS;EAC3B,KAAK,aAAa;CACnB;;;;;;;;;CAUA,gBAAyB;EACxB,OAAO,KAAK,cAAc,OAAO,KAAK,aAAa;CACpD;;;;;;;;;CAUA,gBAAyB;EACxB,OAAO,KAAK,cAAc;CAC3B;;;;;;;;;CAUA,cAAuB;EACtB,OACC,KAAK,cAAc,OACnB,KAAK,eAAe,OACpB,KAAK,eAAe;CAEtB;;;;;;;;CASA,SAAwB;EACvB,OAAO;GACN,MAAM,KAAK;GACX,SAAS,KAAK;GACd,UAAU,KAAK;GACf,YAAY,KAAK;GACjB,YAAY,KAAK;EAClB;CACD;AACD"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { vt as ErrorResponse } from "./index-DJSrXmm0.js";
|
|
2
|
+
//#region src/errors.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Base error class for all Nvisy SDK errors.
|
|
5
|
+
*
|
|
6
|
+
* This class provides common functionality for all SDK errors.
|
|
7
|
+
* It ensures proper error naming and stack traces.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* try {
|
|
12
|
+
* const client = new Client({ apiToken: "" });
|
|
13
|
+
* } catch (error) {
|
|
14
|
+
* if (error instanceof NvisyError) {
|
|
15
|
+
* console.log("SDK error:", error.message);
|
|
16
|
+
* }
|
|
17
|
+
* }
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare class NvisyError extends Error {
|
|
21
|
+
/**
|
|
22
|
+
* The error class name.
|
|
23
|
+
*/
|
|
24
|
+
readonly name: string;
|
|
25
|
+
/**
|
|
26
|
+
* Creates a new NvisyError.
|
|
27
|
+
*
|
|
28
|
+
* @param message - The error message
|
|
29
|
+
*/
|
|
30
|
+
constructor(message: string);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Error thrown when the Nvisy API returns an error response.
|
|
34
|
+
*
|
|
35
|
+
* This error class wraps the API's {@link ErrorResponse} format and adds
|
|
36
|
+
* the HTTP status code. It provides helper methods to categorize errors
|
|
37
|
+
* and determine if they are retryable.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```typescript
|
|
41
|
+
* try {
|
|
42
|
+
* await client.account.getAccount();
|
|
43
|
+
* } catch (error) {
|
|
44
|
+
* if (error instanceof NvisyApiError) {
|
|
45
|
+
* console.log(`API Error: ${error.message}`);
|
|
46
|
+
* console.log(`Status: ${error.statusCode}`);
|
|
47
|
+
* if (error.isRetryable()) {
|
|
48
|
+
* // Implement retry logic
|
|
49
|
+
* }
|
|
50
|
+
* }
|
|
51
|
+
* }
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
declare class NvisyApiError extends NvisyError implements ErrorResponse {
|
|
55
|
+
/**
|
|
56
|
+
* The error type identifier (e.g., "ValidationError", "NotFoundError").
|
|
57
|
+
*/
|
|
58
|
+
readonly name: string;
|
|
59
|
+
/**
|
|
60
|
+
* Human-readable error message safe for display to end users.
|
|
61
|
+
*/
|
|
62
|
+
readonly message: string;
|
|
63
|
+
/**
|
|
64
|
+
* The resource type that the error relates to (e.g., "account", "project").
|
|
65
|
+
* May be undefined if the error is not resource-specific.
|
|
66
|
+
*/
|
|
67
|
+
readonly resource?: string;
|
|
68
|
+
/**
|
|
69
|
+
* A helpful suggestion for resolving the error.
|
|
70
|
+
* May be undefined if no suggestion is available.
|
|
71
|
+
*/
|
|
72
|
+
readonly suggestion?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Field-specific validation errors.
|
|
75
|
+
* Present when the error is due to invalid input data.
|
|
76
|
+
*/
|
|
77
|
+
readonly validation?: ErrorResponse["validation"];
|
|
78
|
+
/**
|
|
79
|
+
* HTTP status code of the response (e.g., 400, 404, 500).
|
|
80
|
+
*/
|
|
81
|
+
readonly statusCode: number;
|
|
82
|
+
/**
|
|
83
|
+
* Creates a new NvisyApiError from an API error response.
|
|
84
|
+
*
|
|
85
|
+
* @param response - The error response from the API
|
|
86
|
+
* @param statusCode - The HTTP status code of the response
|
|
87
|
+
*/
|
|
88
|
+
constructor(response: ErrorResponse, statusCode: number);
|
|
89
|
+
/**
|
|
90
|
+
* Checks if this is a client error (4xx status code).
|
|
91
|
+
*
|
|
92
|
+
* Client errors indicate problems with the request itself, such as
|
|
93
|
+
* invalid input, missing authentication, or accessing non-existent resources.
|
|
94
|
+
*
|
|
95
|
+
* @returns True if the status code is in the 4xx range
|
|
96
|
+
*/
|
|
97
|
+
isClientError(): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Checks if this is a server error (5xx status code).
|
|
100
|
+
*
|
|
101
|
+
* Server errors indicate problems on the API side. These are typically
|
|
102
|
+
* transient and may succeed if retried.
|
|
103
|
+
*
|
|
104
|
+
* @returns True if the status code is in the 5xx range
|
|
105
|
+
*/
|
|
106
|
+
isServerError(): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Determines if this error is safe to retry.
|
|
109
|
+
*
|
|
110
|
+
* An error is considered retryable if it's a server error (5xx),
|
|
111
|
+
* a request timeout (408), or rate limiting (429).
|
|
112
|
+
*
|
|
113
|
+
* @returns True if the request may succeed on retry
|
|
114
|
+
*/
|
|
115
|
+
isRetryable(): boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Converts the error to a plain {@link ErrorResponse} object.
|
|
118
|
+
*
|
|
119
|
+
* Useful for serialization or logging.
|
|
120
|
+
*
|
|
121
|
+
* @returns A plain object representation of the error
|
|
122
|
+
*/
|
|
123
|
+
toJSON(): ErrorResponse;
|
|
124
|
+
}
|
|
125
|
+
//#endregion
|
|
126
|
+
export { NvisyError as n, NvisyApiError as t };
|
|
127
|
+
//# sourceMappingURL=errors-DEIpR751.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors-DEIpR751.d.ts","names":[],"sources":["../src/errors.ts"],"mappings":";;;;;;;;;;;;;;;;;;;cAgCa,mBAAmB;;;;WAIf;;;;;;EAOJ,YAAA;;;;;;;;;;;;;;;;;;;;;;;;cA4BA,sBAAsB,sBAAsB;;;;WAIxC;;;;WAKA;;;;;WAMA;;;;;WAMA;;;;;WAMA,aAAa;;;;WAKb;;;;;;;EAQJ,YAAA,UAAU,eAAe;;;;;;;;;EAkBrC;;;;;;;;;EAYA;;;;;;;;;EAYA;;;;;;;;EAeA,UAAU"}
|
|
@@ -7250,12 +7250,25 @@ interface components {
|
|
|
7250
7250
|
/** @description Public handle of the account. */
|
|
7251
7251
|
username: components["schemas"]["Handle"];
|
|
7252
7252
|
};
|
|
7253
|
+
/**
|
|
7254
|
+
* @description Public reference to the account behind a resource — whoever created it,
|
|
7255
|
+
* uploaded it, triggered it, or performed it.
|
|
7256
|
+
*
|
|
7257
|
+
* Reused across resource responses so an account is always presented the same
|
|
7258
|
+
* way: a handle plus an optional avatar.
|
|
7259
|
+
*/
|
|
7260
|
+
AccountRef: {
|
|
7261
|
+
/** @description Serve path of the account's avatar, when set. */
|
|
7262
|
+
avatarUrl?: string;
|
|
7263
|
+
/** @description Human-readable display name, when set. */
|
|
7264
|
+
displayName?: string;
|
|
7265
|
+
/** @description Handle of the account. */
|
|
7266
|
+
username: components["schemas"]["Handle"];
|
|
7267
|
+
};
|
|
7253
7268
|
/** @description Response type for a workspace activity. */
|
|
7254
7269
|
Activity: {
|
|
7255
7270
|
/** @description Type of activity. */
|
|
7256
7271
|
activityType: components["schemas"]["ActivityType"];
|
|
7257
|
-
/** @description Handle of the account that performed the activity, if any. */
|
|
7258
|
-
actorUsername?: components["schemas"]["Handle"];
|
|
7259
7272
|
/**
|
|
7260
7273
|
* Format: date-time
|
|
7261
7274
|
* @description When the activity occurred.
|
|
@@ -7268,6 +7281,8 @@ interface components {
|
|
|
7268
7281
|
* @description Unique activity identifier.
|
|
7269
7282
|
*/
|
|
7270
7283
|
id: string;
|
|
7284
|
+
/** @description Account that performed the activity. */
|
|
7285
|
+
performedBy: components["schemas"]["AccountRef"];
|
|
7271
7286
|
/** @description Handle of the workspace this activity belongs to. */
|
|
7272
7287
|
workspaceSlug: components["schemas"]["Handle"];
|
|
7273
7288
|
};
|
|
@@ -7972,8 +7987,8 @@ interface components {
|
|
|
7972
7987
|
* @description When the connection was created.
|
|
7973
7988
|
*/
|
|
7974
7989
|
createdAt: string;
|
|
7975
|
-
/** @description
|
|
7976
|
-
|
|
7990
|
+
/** @description Account that created this connection. */
|
|
7991
|
+
createdBy: components["schemas"]["AccountRef"];
|
|
7977
7992
|
/** @description How an import reconciles files whose source object was deleted. */
|
|
7978
7993
|
deletionPolicy: components["schemas"]["SyncDeletionPolicy"];
|
|
7979
7994
|
/** @description Human-readable connection display name. */
|
|
@@ -8102,6 +8117,8 @@ interface components {
|
|
|
8102
8117
|
status: components["schemas"]["SyncStatus"];
|
|
8103
8118
|
/** @description How the sync was triggered. */
|
|
8104
8119
|
triggerType: components["schemas"]["SyncTriggerType"];
|
|
8120
|
+
/** @description Account that triggered the sync. */
|
|
8121
|
+
triggeredBy: components["schemas"]["AccountRef"];
|
|
8105
8122
|
};
|
|
8106
8123
|
/**
|
|
8107
8124
|
* @description Generic paginated response wrapper.
|
|
@@ -8597,8 +8614,8 @@ interface components {
|
|
|
8597
8614
|
* @description Last update timestamp.
|
|
8598
8615
|
*/
|
|
8599
8616
|
updatedAt: string;
|
|
8600
|
-
/** @description
|
|
8601
|
-
uploadedBy: components["schemas"]["
|
|
8617
|
+
/** @description Account that uploaded/created the file. */
|
|
8618
|
+
uploadedBy: components["schemas"]["AccountRef"];
|
|
8602
8619
|
/**
|
|
8603
8620
|
* Format: int32
|
|
8604
8621
|
* @description Version number (1 for original, higher for newer versions).
|
|
@@ -9386,6 +9403,8 @@ interface components {
|
|
|
9386
9403
|
};
|
|
9387
9404
|
/** @description Represents a workspace member. */
|
|
9388
9405
|
Member: {
|
|
9406
|
+
/** @description Serve path of the member's avatar, when set. */
|
|
9407
|
+
avatarUrl?: string;
|
|
9389
9408
|
/**
|
|
9390
9409
|
* Format: date-time
|
|
9391
9410
|
* @description Timestamp when the member joined the workspace.
|
|
@@ -9620,8 +9639,8 @@ interface components {
|
|
|
9620
9639
|
* @description Timestamp when the pipeline was created.
|
|
9621
9640
|
*/
|
|
9622
9641
|
createdAt: string;
|
|
9623
|
-
/** @description
|
|
9624
|
-
|
|
9642
|
+
/** @description Account that created this pipeline. */
|
|
9643
|
+
createdBy: components["schemas"]["AccountRef"];
|
|
9625
9644
|
/** @description Detection + redaction configuration. */
|
|
9626
9645
|
definition: components["schemas"]["PipelineDefinition"];
|
|
9627
9646
|
/** @description Pipeline description. */
|
|
@@ -9756,8 +9775,8 @@ interface components {
|
|
|
9756
9775
|
status: components["schemas"]["PipelineRunStatus"];
|
|
9757
9776
|
/** @description How the run was triggered. */
|
|
9758
9777
|
triggerType: components["schemas"]["PipelineTriggerType"];
|
|
9759
|
-
/** @description
|
|
9760
|
-
|
|
9778
|
+
/** @description Account that triggered the run. */
|
|
9779
|
+
triggeredBy: components["schemas"]["AccountRef"];
|
|
9761
9780
|
/** @description Handle of the workspace this run belongs to. */
|
|
9762
9781
|
workspaceSlug: components["schemas"]["Handle"];
|
|
9763
9782
|
};
|
|
@@ -9840,10 +9859,11 @@ interface components {
|
|
|
9840
9859
|
/**
|
|
9841
9860
|
* @description Defines how a pipeline run was initiated.
|
|
9842
9861
|
*
|
|
9843
|
-
* This enumeration corresponds to the `PIPELINE_TRIGGER_TYPE` PostgreSQL enum
|
|
9844
|
-
*
|
|
9862
|
+
* This enumeration corresponds to the `PIPELINE_TRIGGER_TYPE` PostgreSQL enum:
|
|
9863
|
+
* a run is either started directly by a user or automatically by the system
|
|
9864
|
+
* (for example, a file upload that the pipeline auto-redacts).
|
|
9845
9865
|
*/
|
|
9846
|
-
PipelineTriggerType: "
|
|
9866
|
+
PipelineTriggerType: "user" | "system";
|
|
9847
9867
|
/**
|
|
9848
9868
|
* @description Point in a 2-D coordinate space.
|
|
9849
9869
|
*
|
|
@@ -9871,8 +9891,8 @@ interface components {
|
|
|
9871
9891
|
* @description When the policy was created.
|
|
9872
9892
|
*/
|
|
9873
9893
|
createdAt: string;
|
|
9874
|
-
/** @description
|
|
9875
|
-
|
|
9894
|
+
/** @description Account that created this policy. */
|
|
9895
|
+
createdBy: components["schemas"]["AccountRef"];
|
|
9876
9896
|
/** @description The structured policy body consumed by the engine. */
|
|
9877
9897
|
definition: components["schemas"]["PolicyDefinition"];
|
|
9878
9898
|
/** @description Policy description. */
|
|
@@ -9999,8 +10019,8 @@ interface components {
|
|
|
9999
10019
|
* @description When the policy was created.
|
|
10000
10020
|
*/
|
|
10001
10021
|
createdAt: string;
|
|
10002
|
-
/** @description
|
|
10003
|
-
|
|
10022
|
+
/** @description Account that created this policy. */
|
|
10023
|
+
createdBy: components["schemas"]["AccountRef"];
|
|
10004
10024
|
/** @description Policy description. */
|
|
10005
10025
|
description?: string;
|
|
10006
10026
|
/** @description Human-readable policy display name. */
|
|
@@ -11438,13 +11458,18 @@ interface components {
|
|
|
11438
11458
|
Waveform: "sine" | "square";
|
|
11439
11459
|
/** @description Workspace webhook response. */
|
|
11440
11460
|
Webhook: {
|
|
11461
|
+
/**
|
|
11462
|
+
* Format: int32
|
|
11463
|
+
* @description Consecutive failed deliveries since the last success.
|
|
11464
|
+
*/
|
|
11465
|
+
consecutiveFailures: number;
|
|
11441
11466
|
/**
|
|
11442
11467
|
* Format: date-time
|
|
11443
11468
|
* @description Timestamp when this webhook was first created.
|
|
11444
11469
|
*/
|
|
11445
11470
|
createdAt: string;
|
|
11446
|
-
/** @description
|
|
11447
|
-
|
|
11471
|
+
/** @description Account that created this webhook. */
|
|
11472
|
+
createdBy: components["schemas"]["AccountRef"];
|
|
11448
11473
|
/** @description Detailed description of the webhook's purpose. */
|
|
11449
11474
|
description: string;
|
|
11450
11475
|
/** @description Human-readable name for the webhook. */
|
|
@@ -11459,9 +11484,14 @@ interface components {
|
|
|
11459
11484
|
id: components["schemas"]["WebhookId"];
|
|
11460
11485
|
/**
|
|
11461
11486
|
* Format: date-time
|
|
11462
|
-
* @description Timestamp of the most recent
|
|
11487
|
+
* @description Timestamp of the most recent failed delivery.
|
|
11463
11488
|
*/
|
|
11464
|
-
|
|
11489
|
+
lastFailureAt?: string;
|
|
11490
|
+
/**
|
|
11491
|
+
* Format: date-time
|
|
11492
|
+
* @description Timestamp of the most recent successful delivery.
|
|
11493
|
+
*/
|
|
11494
|
+
lastSuccessAt?: string;
|
|
11465
11495
|
/** @description Current status of the webhook. */
|
|
11466
11496
|
status: components["schemas"]["WebhookStatus"];
|
|
11467
11497
|
/**
|
|
@@ -11482,13 +11512,18 @@ interface components {
|
|
|
11482
11512
|
* again. Store it securely.
|
|
11483
11513
|
*/
|
|
11484
11514
|
WebhookCreated: {
|
|
11515
|
+
/**
|
|
11516
|
+
* Format: int32
|
|
11517
|
+
* @description Consecutive failed deliveries since the last success.
|
|
11518
|
+
*/
|
|
11519
|
+
consecutiveFailures: number;
|
|
11485
11520
|
/**
|
|
11486
11521
|
* Format: date-time
|
|
11487
11522
|
* @description Timestamp when this webhook was first created.
|
|
11488
11523
|
*/
|
|
11489
11524
|
createdAt: string;
|
|
11490
|
-
/** @description
|
|
11491
|
-
|
|
11525
|
+
/** @description Account that created this webhook. */
|
|
11526
|
+
createdBy: components["schemas"]["AccountRef"];
|
|
11492
11527
|
/** @description Detailed description of the webhook's purpose. */
|
|
11493
11528
|
description: string;
|
|
11494
11529
|
/** @description Human-readable name for the webhook. */
|
|
@@ -11503,9 +11538,14 @@ interface components {
|
|
|
11503
11538
|
id: components["schemas"]["WebhookId"];
|
|
11504
11539
|
/**
|
|
11505
11540
|
* Format: date-time
|
|
11506
|
-
* @description Timestamp of the most recent
|
|
11541
|
+
* @description Timestamp of the most recent failed delivery.
|
|
11542
|
+
*/
|
|
11543
|
+
lastFailureAt?: string;
|
|
11544
|
+
/**
|
|
11545
|
+
* Format: date-time
|
|
11546
|
+
* @description Timestamp of the most recent successful delivery.
|
|
11507
11547
|
*/
|
|
11508
|
-
|
|
11548
|
+
lastSuccessAt?: string;
|
|
11509
11549
|
/**
|
|
11510
11550
|
* @description HMAC-SHA256 signing secret for webhook verification.
|
|
11511
11551
|
*
|
|
@@ -11586,8 +11626,8 @@ interface components {
|
|
|
11586
11626
|
* @description Timestamp when the workspace was created.
|
|
11587
11627
|
*/
|
|
11588
11628
|
createdAt: string;
|
|
11589
|
-
/** @description
|
|
11590
|
-
|
|
11629
|
+
/** @description Account that created this workspace. */
|
|
11630
|
+
createdBy: components["schemas"]["AccountRef"];
|
|
11591
11631
|
/** @description Description of the workspace. */
|
|
11592
11632
|
description?: string;
|
|
11593
11633
|
/** @description Display name of the workspace. */
|
|
@@ -11669,6 +11709,7 @@ type Schemas$16 = components["schemas"];
|
|
|
11669
11709
|
type Account = Schemas$16["Account"];
|
|
11670
11710
|
type PublicAccount = Schemas$16["PublicAccount"];
|
|
11671
11711
|
type UpdateAccount = Schemas$16["UpdateAccount"];
|
|
11712
|
+
type AccountRef = Schemas$16["AccountRef"];
|
|
11672
11713
|
//#endregion
|
|
11673
11714
|
//#region src/datatypes/activity.d.ts
|
|
11674
11715
|
type Schemas$15 = components["schemas"];
|
|
@@ -11821,5 +11862,5 @@ type UpdateWorkspace = Schemas["UpdateWorkspace"];
|
|
|
11821
11862
|
type WorkspaceRole = Schemas["WorkspaceRole"];
|
|
11822
11863
|
type WorkspacePage = Schemas["WorkspacePage"];
|
|
11823
11864
|
//#endregion
|
|
11824
|
-
export { InviteExpiration as $,
|
|
11825
|
-
//# sourceMappingURL=index-
|
|
11865
|
+
export { InviteExpiration as $, UpdateAccount as $t, PipelineDefinition as A, S3Credentials as At, NotificationPage as B, ApiToken as Bt, PolicyDefinition as C, ConnectionPage as Ct, UpdatePolicy as D, ConnectionsQuery as Dt, PolicySummaryPage as E, ConnectionVerification as Et, PipelineTriggerType as F, SyncTriggerType as Ft, Member as G, TokenExpiration as Gt, UnreadStatus as H, ApiTokenType as Ht, UpdatePipeline as I, UpdateConnection as It, UpdateMember as J, ActivityPage as Jt, MemberPage as K, UpdateApiToken as Kt, CursorPagination as L, AuthToken as Lt, PipelineStatus as M, SyncDeletionPolicy as Mt, PipelineSummary as N, SyncMode as Nt, CreatePipeline as O, CreateConnection as Ot, PipelineSummaryPage as P, SyncStatus as Pt, InviteCode as Q, PublicAccount as Qt, Notification as R, Login as Rt, Policy as S, ConnectionConfig as St, PolicySummary as T, ConnectionSyncPage as Tt, UpdateNotificationSettings as U, ApiTokenWithJWT as Ut, NotificationSettings as V, ApiTokenPage as Vt, ListMembers as W, CreateApiToken as Wt, GenerateInviteCode as X, Account as Xt, CreateInvite as Y, ActivityType as Yt, Invite as Z, AccountRef as Zt, CreatePipelineRun as _, UpdateFile as _t, WorkspaceRole as a, ListInvites as at, PipelineRunStatus as b, AzureCredentials as bt, UpdateWebhook as c, ComponentHealth as ct, WebhookEvent as d, File as dt, paths as en, InvitePage as et, WebhookPage as f, FilePage as ft, Artifact as g, ModalityToken as gt, AnalyzedDocument as h, ListFiles as ht, WorkspacePage as i, InviteStatus as it, PipelineFilter as j, SyncConnection as jt, Pipeline as k, GcsCredentials as kt, Webhook as l, Health as lt, WebhookStatus as m, FormatToken as mt, UpdateWorkspace as n, InviteSent as nt, CreateWebhook as o, ReplyInvite as ot, WebhookResult as p, FileSource as pt, MemberSortField as q, Activity as qt, Workspace as r, InviteSortField as rt, TestWebhook as s, SortOrder as st, CreateWorkspace as t, InvitePreview as tt, WebhookCreated as u, HealthStatus as ut, PipelineRun as v, ErrorResponse as vt, PolicyRule as w, ConnectionSync as wt, CreatePolicy as x, Connection as xt, PipelineRunPage as y, ValidationErrorDetail as yt, NotificationEvent as z, Signup as zt };
|
|
11866
|
+
//# sourceMappingURL=index-DJSrXmm0.d.ts.map
|