@wacht/backend 1.0.0-beta.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/LICENSE.md +19 -0
- package/README.md +94 -0
- package/dist/api/ai.d.ts +157 -0
- package/dist/api/ai.d.ts.map +1 -0
- package/dist/api/ai.js +300 -0
- package/dist/api/ai.js.map +1 -0
- package/dist/api/analytics.d.ts +21 -0
- package/dist/api/analytics.d.ts.map +1 -0
- package/dist/api/analytics.js +40 -0
- package/dist/api/analytics.js.map +1 -0
- package/dist/api/api-keys.d.ts +43 -0
- package/dist/api/api-keys.d.ts.map +1 -0
- package/dist/api/api-keys.js +84 -0
- package/dist/api/api-keys.js.map +1 -0
- package/dist/api/gateway.d.ts +66 -0
- package/dist/api/gateway.d.ts.map +1 -0
- package/dist/api/gateway.js +177 -0
- package/dist/api/gateway.js.map +1 -0
- package/dist/api/health.d.ts +8 -0
- package/dist/api/health.d.ts.map +1 -0
- package/dist/api/health.js +12 -0
- package/dist/api/health.js.map +1 -0
- package/dist/api/invitations.d.ts +35 -0
- package/dist/api/invitations.d.ts.map +1 -0
- package/dist/api/invitations.js +76 -0
- package/dist/api/invitations.js.map +1 -0
- package/dist/api/notifications.d.ts +27 -0
- package/dist/api/notifications.d.ts.map +1 -0
- package/dist/api/notifications.js +56 -0
- package/dist/api/notifications.js.map +1 -0
- package/dist/api/organizations.d.ts +59 -0
- package/dist/api/organizations.d.ts.map +1 -0
- package/dist/api/organizations.js +125 -0
- package/dist/api/organizations.js.map +1 -0
- package/dist/api/segments.d.ts +64 -0
- package/dist/api/segments.d.ts.map +1 -0
- package/dist/api/segments.js +101 -0
- package/dist/api/segments.js.map +1 -0
- package/dist/api/settings.d.ts +98 -0
- package/dist/api/settings.d.ts.map +1 -0
- package/dist/api/settings.js +132 -0
- package/dist/api/settings.js.map +1 -0
- package/dist/api/users.d.ts +67 -0
- package/dist/api/users.d.ts.map +1 -0
- package/dist/api/users.js +135 -0
- package/dist/api/users.js.map +1 -0
- package/dist/api/utility.d.ts +9 -0
- package/dist/api/utility.d.ts.map +1 -0
- package/dist/api/utility.js +19 -0
- package/dist/api/utility.js.map +1 -0
- package/dist/api/webhooks.d.ts +106 -0
- package/dist/api/webhooks.d.ts.map +1 -0
- package/dist/api/webhooks.js +209 -0
- package/dist/api/webhooks.js.map +1 -0
- package/dist/api/workspaces.d.ts +57 -0
- package/dist/api/workspaces.d.ts.map +1 -0
- package/dist/api/workspaces.js +122 -0
- package/dist/api/workspaces.js.map +1 -0
- package/dist/client.d.ts +148 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +299 -0
- package/dist/client.js.map +1 -0
- package/dist/error.d.ts +63 -0
- package/dist/error.d.ts.map +1 -0
- package/dist/error.js +117 -0
- package/dist/error.js.map +1 -0
- package/dist/index.d.ts +98 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +116 -0
- package/dist/index.js.map +1 -0
- package/dist/jwt.d.ts +1 -0
- package/dist/jwt.d.ts.map +1 -0
- package/dist/jwt.js +2 -0
- package/dist/jwt.js.map +1 -0
- package/dist/models/ai.d.ts +218 -0
- package/dist/models/ai.d.ts.map +1 -0
- package/dist/models/ai.js +3 -0
- package/dist/models/ai.js.map +1 -0
- package/dist/models/analytics.d.ts +33 -0
- package/dist/models/analytics.d.ts.map +1 -0
- package/dist/models/analytics.js +3 -0
- package/dist/models/analytics.js.map +1 -0
- package/dist/models/api-key.d.ts +161 -0
- package/dist/models/api-key.d.ts.map +1 -0
- package/dist/models/api-key.js +3 -0
- package/dist/models/api-key.js.map +1 -0
- package/dist/models/b2b-settings.d.ts +54 -0
- package/dist/models/b2b-settings.d.ts.map +1 -0
- package/dist/models/b2b-settings.js +3 -0
- package/dist/models/b2b-settings.js.map +1 -0
- package/dist/models/deployment-restrictions.d.ts +60 -0
- package/dist/models/deployment-restrictions.d.ts.map +1 -0
- package/dist/models/deployment-restrictions.js +3 -0
- package/dist/models/deployment-restrictions.js.map +1 -0
- package/dist/models/index.d.ts +51 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +32 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/jwt-template.d.ts +49 -0
- package/dist/models/jwt-template.d.ts.map +1 -0
- package/dist/models/jwt-template.js +3 -0
- package/dist/models/jwt-template.js.map +1 -0
- package/dist/models/notification.d.ts +58 -0
- package/dist/models/notification.d.ts.map +1 -0
- package/dist/models/notification.js +3 -0
- package/dist/models/notification.js.map +1 -0
- package/dist/models/organization.d.ts +93 -0
- package/dist/models/organization.d.ts.map +1 -0
- package/dist/models/organization.js +3 -0
- package/dist/models/organization.js.map +1 -0
- package/dist/models/segment.d.ts +44 -0
- package/dist/models/segment.d.ts.map +1 -0
- package/dist/models/segment.js +3 -0
- package/dist/models/segment.js.map +1 -0
- package/dist/models/user.d.ts +177 -0
- package/dist/models/user.d.ts.map +1 -0
- package/dist/models/user.js +3 -0
- package/dist/models/user.js.map +1 -0
- package/dist/models/webhook.d.ts +194 -0
- package/dist/models/webhook.d.ts.map +1 -0
- package/dist/models/webhook.js +3 -0
- package/dist/models/webhook.js.map +1 -0
- package/dist/models/workspace.d.ts +93 -0
- package/dist/models/workspace.d.ts.map +1 -0
- package/dist/models/workspace.js +3 -0
- package/dist/models/workspace.js.map +1 -0
- package/dist/server-auth.d.ts +84 -0
- package/dist/server-auth.d.ts.map +1 -0
- package/dist/server-auth.js +405 -0
- package/dist/server-auth.js.map +1 -0
- package/package.json +45 -0
package/dist/error.js
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServerError = exports.RateLimitError = exports.ConflictError = exports.NotFoundError = exports.AuthorizationError = exports.AuthenticationError = exports.ValidationError = exports.WachtError = void 0;
|
|
4
|
+
exports.parseApiError = parseApiError;
|
|
5
|
+
/**
|
|
6
|
+
* Custom error class for Wacht SDK errors
|
|
7
|
+
*/
|
|
8
|
+
class WachtError extends Error {
|
|
9
|
+
constructor(message, statusCode, details) {
|
|
10
|
+
super(message);
|
|
11
|
+
this.statusCode = statusCode;
|
|
12
|
+
this.details = details;
|
|
13
|
+
this.name = 'WachtError';
|
|
14
|
+
if (typeof Error.captureStackTrace === 'function') {
|
|
15
|
+
Error.captureStackTrace(this, this.constructor);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.WachtError = WachtError;
|
|
20
|
+
/**
|
|
21
|
+
* Validation error for request parameters
|
|
22
|
+
*/
|
|
23
|
+
class ValidationError extends WachtError {
|
|
24
|
+
constructor(message, details) {
|
|
25
|
+
super(message, 400, details);
|
|
26
|
+
this.name = 'ValidationError';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.ValidationError = ValidationError;
|
|
30
|
+
/**
|
|
31
|
+
* Authentication error
|
|
32
|
+
*/
|
|
33
|
+
class AuthenticationError extends WachtError {
|
|
34
|
+
constructor(message = 'Authentication failed') {
|
|
35
|
+
super(message, 401);
|
|
36
|
+
this.name = 'AuthenticationError';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.AuthenticationError = AuthenticationError;
|
|
40
|
+
/**
|
|
41
|
+
* Authorization error
|
|
42
|
+
*/
|
|
43
|
+
class AuthorizationError extends WachtError {
|
|
44
|
+
constructor(message = 'Authorization failed') {
|
|
45
|
+
super(message, 403);
|
|
46
|
+
this.name = 'AuthorizationError';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.AuthorizationError = AuthorizationError;
|
|
50
|
+
/**
|
|
51
|
+
* Not found error
|
|
52
|
+
*/
|
|
53
|
+
class NotFoundError extends WachtError {
|
|
54
|
+
constructor(message = 'Resource not found') {
|
|
55
|
+
super(message, 404);
|
|
56
|
+
this.name = 'NotFoundError';
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.NotFoundError = NotFoundError;
|
|
60
|
+
/**
|
|
61
|
+
* Conflict error
|
|
62
|
+
*/
|
|
63
|
+
class ConflictError extends WachtError {
|
|
64
|
+
constructor(message) {
|
|
65
|
+
super(message, 409);
|
|
66
|
+
this.name = 'ConflictError';
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.ConflictError = ConflictError;
|
|
70
|
+
/**
|
|
71
|
+
* Rate limit error
|
|
72
|
+
*/
|
|
73
|
+
class RateLimitError extends WachtError {
|
|
74
|
+
constructor(message = 'Rate limit exceeded') {
|
|
75
|
+
super(message, 429);
|
|
76
|
+
this.name = 'RateLimitError';
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.RateLimitError = RateLimitError;
|
|
80
|
+
/**
|
|
81
|
+
* Server error
|
|
82
|
+
*/
|
|
83
|
+
class ServerError extends WachtError {
|
|
84
|
+
constructor(message = 'Internal server error') {
|
|
85
|
+
super(message, 500);
|
|
86
|
+
this.name = 'ServerError';
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.ServerError = ServerError;
|
|
90
|
+
/**
|
|
91
|
+
* Parse an API error and return the appropriate WachtError
|
|
92
|
+
*/
|
|
93
|
+
function parseApiError(statusCode, data) {
|
|
94
|
+
const apiError = data;
|
|
95
|
+
const message = apiError.message || 'An error occurred';
|
|
96
|
+
switch (statusCode) {
|
|
97
|
+
case 400:
|
|
98
|
+
return new ValidationError(message, apiError.details);
|
|
99
|
+
case 401:
|
|
100
|
+
return new AuthenticationError(message);
|
|
101
|
+
case 403:
|
|
102
|
+
return new AuthorizationError(message);
|
|
103
|
+
case 404:
|
|
104
|
+
return new NotFoundError(message);
|
|
105
|
+
case 409:
|
|
106
|
+
return new ConflictError(message);
|
|
107
|
+
case 429:
|
|
108
|
+
return new RateLimitError(message);
|
|
109
|
+
case 500:
|
|
110
|
+
case 502:
|
|
111
|
+
case 503:
|
|
112
|
+
return new ServerError(message);
|
|
113
|
+
default:
|
|
114
|
+
return new WachtError(message, statusCode, apiError.details);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";;;AAmGA,sCAwBC;AA3HD;;GAEG;AACH,MAAa,UAAW,SAAQ,KAAK;IACnC,YACE,OAAe,EACR,UAAmB,EACnB,OAAiB;QAExB,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,eAAU,GAAV,UAAU,CAAS;QACnB,YAAO,GAAP,OAAO,CAAU;QAGxB,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;QACzB,IAAI,OAAO,KAAK,CAAC,iBAAiB,KAAK,UAAU,EAAE,CAAC;YAClD,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;CACF;AAZD,gCAYC;AAWD;;GAEG;AACH,MAAa,eAAgB,SAAQ,UAAU;IAC7C,YAAY,OAAe,EAAE,OAAiB;QAC5C,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AALD,0CAKC;AAED;;GAEG;AACH,MAAa,mBAAoB,SAAQ,UAAU;IACjD,YAAY,UAAkB,uBAAuB;QACnD,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;IACpC,CAAC;CACF;AALD,kDAKC;AAED;;GAEG;AACH,MAAa,kBAAmB,SAAQ,UAAU;IAChD,YAAY,UAAkB,sBAAsB;QAClD,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;CACF;AALD,gDAKC;AAED;;GAEG;AACH,MAAa,aAAc,SAAQ,UAAU;IAC3C,YAAY,UAAkB,oBAAoB;QAChD,KAAK,CA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AG;YACN,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;QACrC,KAAK,GAAG,CAAC;QACT,KAAK,GAAG,CAAC;QACT,KAAK,GAAG;YACN,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;QAClC;YACE,OAAO,IAAI,UAAU,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IACjE,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wacht SDK for JavaScript/TypeScript
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```typescript
|
|
6
|
+
* import { initClient, users } from '@wacht/backend';
|
|
7
|
+
*
|
|
8
|
+
* // Initialize the client
|
|
9
|
+
* initClient({ apiKey: 'your-api-key' });
|
|
10
|
+
*
|
|
11
|
+
* // Create a user
|
|
12
|
+
* const user = await users.createUser({
|
|
13
|
+
* first_name: 'John',
|
|
14
|
+
* last_name: 'Doe',
|
|
15
|
+
* email_address: 'john@example.com'
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
import { createClientStore, createClientStore as createWachtClientStore, getClient, initClient, isClientInitialized, WachtClient, WachtClientStore } from "./client";
|
|
20
|
+
import { WachtError, parseApiError } from "./error";
|
|
21
|
+
import { authenticateRequest, authFromHeaders, getAuth, getAuthFromToken, parseFrontendApiUrlFromPublishableKey, requireAuth, requireAuthFromToken, toSessionPrincipalIdentity, toSessionPrincipalMetadata, verifyAuthToken, WachtAuthError } from "./server-auth";
|
|
22
|
+
import { ValidationError, AuthenticationError, AuthorizationError, NotFoundError, ConflictError, RateLimitError, ServerError } from "./error";
|
|
23
|
+
import type { WachtConfig, PaginatedResponse, ListOptions } from "./client";
|
|
24
|
+
import type { JWTPayload, PermissionCheck, ProtectOptions, SessionPrincipalIdentity, SessionPrincipalMetadata, WachtAuth, WachtServerOptions } from "./server-auth";
|
|
25
|
+
import type { DeploymentRestrictionsUpdates, CountryRestrictions, MultiSessionSupport } from "./models/deployment-restrictions";
|
|
26
|
+
import type { DeploymentB2bSettingsUpdates } from "./models/b2b-settings";
|
|
27
|
+
import type { JwtTemplate, CreateJwtTemplateRequest, UpdateJwtTemplateRequest, CustomSigningKey } from "./models/jwt-template";
|
|
28
|
+
import type { User, CreateUserRequest, UpdateUserRequest, UpdatePasswordRequest } from "./models/user";
|
|
29
|
+
import type { UserEmail, AddEmailRequest, UpdateEmailRequest } from "./models/user";
|
|
30
|
+
import type { UserPhone, AddPhoneRequest, UpdatePhoneRequest } from "./models/user";
|
|
31
|
+
import type { DeploymentInvitation, DeploymentWaitlistUser, InviteUserRequest, UserSocialConnection, SessionTicketResponse, CreateSessionTicketRequest } from "./models/user";
|
|
32
|
+
import type { Organization, CreateOrganizationRequest, UpdateOrganizationRequest } from "./models/organization";
|
|
33
|
+
import type { OrganizationMember, AddOrganizationMemberRequest, UpdateOrganizationMemberRequest } from "./models/organization";
|
|
34
|
+
import type { OrganizationRole, CreateOrganizationRoleRequest, UpdateOrganizationRoleRequest } from "./models/organization";
|
|
35
|
+
import type { Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest } from "./models/workspace";
|
|
36
|
+
import type { WorkspaceMember, AddWorkspaceMemberRequest, UpdateWorkspaceMemberRequest } from "./models/workspace";
|
|
37
|
+
import type { WorkspaceRole, CreateWorkspaceRoleRequest, UpdateWorkspaceRoleRequest } from "./models/workspace";
|
|
38
|
+
import type { AiAgent, CreateAiAgentRequest, UpdateAiAgentRequest, AgentIntegration, CreateAgentIntegrationRequest, UpdateAgentIntegrationRequest, AiKnowledgeBaseDocument, ExecuteAgentRequest, ExecuteAgentResponse } from "./models/ai";
|
|
39
|
+
import type { AiTool, CreateAiToolRequest, UpdateAiToolRequest } from "./models/ai";
|
|
40
|
+
import type { AiKnowledgeBase, CreateAiKnowledgeBaseRequest, UpdateAiKnowledgeBaseRequest } from "./models/ai";
|
|
41
|
+
import type { AiExecutionContext, CreateAiExecutionContextRequest, UpdateAiExecutionContextRequest } from "./models/ai";
|
|
42
|
+
import type { Notification, CreateNotificationRequest, CallToAction, NotificationSeverity, NotificationStats } from "./models/notification";
|
|
43
|
+
import type { ApiAuthApp, CreateApiAuthAppRequest, UpdateApiAuthAppRequest } from "./models/api-key";
|
|
44
|
+
import type { ApiKey, ApiKeyWithSecret, CreateApiKeyRequest, RevokeApiKeyRequest, RotateApiKeyRequest } from "./models/api-key";
|
|
45
|
+
import type { RateLimit, AuthzPrincipalType, AuthzDenyReason, AuthzPrincipal, AuthzCheckRequest, AuthzIdentity, AuthzMetadata, AuthzApiKeyIdentity, AuthzOauthAccessTokenIdentity, ResolvedAuthzIdentity, AuthzRateLimitState, AuthzCheckResponse } from "./models/api-key";
|
|
46
|
+
import type { WebhookApp, CreateWebhookAppRequest, UpdateWebhookAppRequest, TriggerWebhookRequest, WebhookEndpoint, WebhookDelivery, WebhookAppEvent, WebhookDeliveryDetails, WebhookTimeseriesData, CreateWebhookEndpointRequest, UpdateWebhookEndpointRequest, WebhookAnalytics } from "./models/webhook";
|
|
47
|
+
import type { Segment, CreateSegmentRequest, UpdateSegmentRequest, SegmentFilter, SegmentEvaluationResult } from "./models/segment";
|
|
48
|
+
import type { EmailTemplate, SocialConnection, SmtpConfigRequest, SmtpConfigResponse, SmtpVerifyResponse } from "./models";
|
|
49
|
+
import type { AnalyticsStats, RecentSignup, RecentSignupOrganization } from "./models/analytics";
|
|
50
|
+
import * as users from "./api/users";
|
|
51
|
+
import * as organizations from "./api/organizations";
|
|
52
|
+
import * as workspaces from "./api/workspaces";
|
|
53
|
+
import * as apiKeys from "./api/api-keys";
|
|
54
|
+
import * as settings from "./api/settings";
|
|
55
|
+
import * as notifications from "./api/notifications";
|
|
56
|
+
import * as webhooks from "./api/webhooks";
|
|
57
|
+
import * as ai from "./api/ai";
|
|
58
|
+
import * as segments from "./api/segments";
|
|
59
|
+
import * as invitations from "./api/invitations";
|
|
60
|
+
import * as analytics from "./api/analytics";
|
|
61
|
+
import * as utility from "./api/utility";
|
|
62
|
+
import * as health from "./api/health";
|
|
63
|
+
import * as gateway from "./api/gateway";
|
|
64
|
+
export { initClient, getClient, isClientInitialized, WachtClient, WachtClientStore, createClientStore, createWachtClientStore, };
|
|
65
|
+
export type { WachtConfig, PaginatedResponse, ListOptions };
|
|
66
|
+
export { authenticateRequest, authFromHeaders, getAuth, getAuthFromToken, parseFrontendApiUrlFromPublishableKey, requireAuth, requireAuthFromToken, toSessionPrincipalIdentity, toSessionPrincipalMetadata, verifyAuthToken, WachtAuthError, };
|
|
67
|
+
export type { JWTPayload, PermissionCheck, ProtectOptions, SessionPrincipalIdentity, SessionPrincipalMetadata, WachtAuth, WachtServerOptions, };
|
|
68
|
+
export { WachtError, parseApiError };
|
|
69
|
+
export { ValidationError, AuthenticationError, AuthorizationError, NotFoundError, ConflictError, RateLimitError, ServerError, };
|
|
70
|
+
export type { DeploymentRestrictionsUpdates, CountryRestrictions, MultiSessionSupport, };
|
|
71
|
+
export type { DeploymentB2bSettingsUpdates };
|
|
72
|
+
export type { JwtTemplate, CreateJwtTemplateRequest, UpdateJwtTemplateRequest, CustomSigningKey, };
|
|
73
|
+
export type { User, CreateUserRequest, UpdateUserRequest, UpdatePasswordRequest, };
|
|
74
|
+
export type { UserEmail, AddEmailRequest, UpdateEmailRequest };
|
|
75
|
+
export type { UserPhone, AddPhoneRequest, UpdatePhoneRequest };
|
|
76
|
+
export type { Organization, CreateOrganizationRequest, UpdateOrganizationRequest, };
|
|
77
|
+
export type { OrganizationMember, AddOrganizationMemberRequest, UpdateOrganizationMemberRequest, };
|
|
78
|
+
export type { OrganizationRole, CreateOrganizationRoleRequest, UpdateOrganizationRoleRequest, };
|
|
79
|
+
export type { Workspace, CreateWorkspaceRequest, UpdateWorkspaceRequest };
|
|
80
|
+
export type { WorkspaceMember, AddWorkspaceMemberRequest, UpdateWorkspaceMemberRequest, };
|
|
81
|
+
export type { WorkspaceRole, CreateWorkspaceRoleRequest, UpdateWorkspaceRoleRequest, };
|
|
82
|
+
export type { AiAgent, CreateAiAgentRequest, UpdateAiAgentRequest };
|
|
83
|
+
export type { AiTool, CreateAiToolRequest, UpdateAiToolRequest };
|
|
84
|
+
export type { AiKnowledgeBase, CreateAiKnowledgeBaseRequest, UpdateAiKnowledgeBaseRequest, };
|
|
85
|
+
export type { AiExecutionContext, CreateAiExecutionContextRequest, UpdateAiExecutionContextRequest, };
|
|
86
|
+
export type { AgentIntegration, CreateAgentIntegrationRequest, UpdateAgentIntegrationRequest, AiKnowledgeBaseDocument, ExecuteAgentRequest, ExecuteAgentResponse, };
|
|
87
|
+
export type { Notification, CreateNotificationRequest, CallToAction, NotificationSeverity, NotificationStats, };
|
|
88
|
+
export type { ApiAuthApp, CreateApiAuthAppRequest, UpdateApiAuthAppRequest };
|
|
89
|
+
export type { ApiKey, ApiKeyWithSecret, CreateApiKeyRequest, RevokeApiKeyRequest, RotateApiKeyRequest, };
|
|
90
|
+
export type { RateLimit, AuthzPrincipalType, AuthzDenyReason, AuthzPrincipal, AuthzCheckRequest, AuthzIdentity, AuthzMetadata, AuthzApiKeyIdentity, AuthzOauthAccessTokenIdentity, ResolvedAuthzIdentity, AuthzRateLimitState, AuthzCheckResponse, };
|
|
91
|
+
export type { WebhookApp, CreateWebhookAppRequest, UpdateWebhookAppRequest, TriggerWebhookRequest, };
|
|
92
|
+
export type { WebhookEndpoint, WebhookDelivery, WebhookAppEvent, WebhookDeliveryDetails, WebhookTimeseriesData, CreateWebhookEndpointRequest, UpdateWebhookEndpointRequest, WebhookAnalytics, };
|
|
93
|
+
export type { Segment, CreateSegmentRequest, UpdateSegmentRequest, SegmentFilter, SegmentEvaluationResult, };
|
|
94
|
+
export type { DeploymentInvitation, DeploymentWaitlistUser, InviteUserRequest, UserSocialConnection, SessionTicketResponse, CreateSessionTicketRequest, };
|
|
95
|
+
export type { EmailTemplate, SocialConnection, SmtpConfigRequest, SmtpConfigResponse, SmtpVerifyResponse, };
|
|
96
|
+
export type { AnalyticsStats, RecentSignup, RecentSignupOrganization };
|
|
97
|
+
export { users, organizations, workspaces, apiKeys, settings, notifications, webhooks, ai, segments, invitations, analytics, utility, health, gateway, };
|
|
98
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,EACL,iBAAiB,EACjB,iBAAiB,IAAI,sBAAsB,EAC3C,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,UAAU,EACV,aAAa,EACd,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,qCAAqC,EACrC,WAAW,EACX,oBAAoB,EACpB,0BAA0B,EAC1B,0BAA0B,EAC1B,eAAe,EACf,cAAc,EACf,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,cAAc,EACd,WAAW,EACZ,MAAM,SAAS,CAAC;AAGjB,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5E,OAAO,KAAK,EACV,UAAU,EACV,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,SAAS,EACT,kBAAkB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,6BAA6B,EAC7B,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,KAAK,EACV,WAAW,EACX,wBAAwB,EACxB,wBAAwB,EACxB,gBAA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BAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,GACpB,CAAC;AACF,YAAY,EACV,SAAS,EACT,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,mBAAmB,EACnB,6BAA6B,EAC7B,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,GACnB,CAAC;AACF,YAAY,EACV,UAAU,EACV,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,GACtB,CAAC;AACF,YAAY,EACV,eAAe,EACf,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,4BAA4B,EAC5B,4BAA4B,EAC5B,gBAAgB,GACjB,CAAC;AACF,YAAY,EACV,OAAO,EACP,oBAAoB,EACpB,oBAAoB,EACpB,aAAa,EACb,uBAAuB,GACxB,CAAC;AACF,YAAY,EACV,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,GAC3B,CAAC;AACF,YAAY,EACV,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GACnB,CAAC;AACF,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,wBAAwB,EAAE,CAAC;AAGvE,OAAO,EACL,KAAK,EACL,aAAa,EACb,UAAU,EACV,OAAO,EACP,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,EAAE,EACF,QAAQ,EACR,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,EACN,OAAO,GACR,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Wacht SDK for JavaScript/TypeScript
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* import { initClient, users } from '@wacht/backend';
|
|
8
|
+
*
|
|
9
|
+
* // Initialize the client
|
|
10
|
+
* initClient({ apiKey: 'your-api-key' });
|
|
11
|
+
*
|
|
12
|
+
* // Create a user
|
|
13
|
+
* const user = await users.createUser({
|
|
14
|
+
* first_name: 'John',
|
|
15
|
+
* last_name: 'Doe',
|
|
16
|
+
* email_address: 'john@example.com'
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25
|
+
}
|
|
26
|
+
Object.defineProperty(o, k2, desc);
|
|
27
|
+
}) : (function(o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
}));
|
|
31
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
32
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
33
|
+
}) : function(o, v) {
|
|
34
|
+
o["default"] = v;
|
|
35
|
+
});
|
|
36
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
37
|
+
var ownKeys = function(o) {
|
|
38
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
39
|
+
var ar = [];
|
|
40
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
41
|
+
return ar;
|
|
42
|
+
};
|
|
43
|
+
return ownKeys(o);
|
|
44
|
+
};
|
|
45
|
+
return function (mod) {
|
|
46
|
+
if (mod && mod.__esModule) return mod;
|
|
47
|
+
var result = {};
|
|
48
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
49
|
+
__setModuleDefault(result, mod);
|
|
50
|
+
return result;
|
|
51
|
+
};
|
|
52
|
+
})();
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.gateway = exports.health = exports.utility = exports.analytics = exports.invitations = exports.segments = exports.ai = exports.webhooks = exports.notifications = exports.settings = exports.apiKeys = exports.workspaces = exports.organizations = exports.users = exports.ServerError = exports.RateLimitError = exports.ConflictError = exports.NotFoundError = exports.AuthorizationError = exports.AuthenticationError = exports.ValidationError = exports.parseApiError = exports.WachtError = exports.WachtAuthError = exports.verifyAuthToken = exports.toSessionPrincipalMetadata = exports.toSessionPrincipalIdentity = exports.requireAuthFromToken = exports.requireAuth = exports.parseFrontendApiUrlFromPublishableKey = exports.getAuthFromToken = exports.getAuth = exports.authFromHeaders = exports.authenticateRequest = exports.createWachtClientStore = exports.createClientStore = exports.WachtClientStore = exports.WachtClient = exports.isClientInitialized = exports.getClient = exports.initClient = void 0;
|
|
55
|
+
// Direct imports for proper ESM export
|
|
56
|
+
const client_1 = require("./client");
|
|
57
|
+
Object.defineProperty(exports, "createClientStore", { enumerable: true, get: function () { return client_1.createClientStore; } });
|
|
58
|
+
Object.defineProperty(exports, "createWachtClientStore", { enumerable: true, get: function () { return client_1.createClientStore; } });
|
|
59
|
+
Object.defineProperty(exports, "getClient", { enumerable: true, get: function () { return client_1.getClient; } });
|
|
60
|
+
Object.defineProperty(exports, "initClient", { enumerable: true, get: function () { return client_1.initClient; } });
|
|
61
|
+
Object.defineProperty(exports, "isClientInitialized", { enumerable: true, get: function () { return client_1.isClientInitialized; } });
|
|
62
|
+
Object.defineProperty(exports, "WachtClient", { enumerable: true, get: function () { return client_1.WachtClient; } });
|
|
63
|
+
Object.defineProperty(exports, "WachtClientStore", { enumerable: true, get: function () { return client_1.WachtClientStore; } });
|
|
64
|
+
const error_1 = require("./error");
|
|
65
|
+
Object.defineProperty(exports, "WachtError", { enumerable: true, get: function () { return error_1.WachtError; } });
|
|
66
|
+
Object.defineProperty(exports, "parseApiError", { enumerable: true, get: function () { return error_1.parseApiError; } });
|
|
67
|
+
const server_auth_1 = require("./server-auth");
|
|
68
|
+
Object.defineProperty(exports, "authenticateRequest", { enumerable: true, get: function () { return server_auth_1.authenticateRequest; } });
|
|
69
|
+
Object.defineProperty(exports, "authFromHeaders", { enumerable: true, get: function () { return server_auth_1.authFromHeaders; } });
|
|
70
|
+
Object.defineProperty(exports, "getAuth", { enumerable: true, get: function () { return server_auth_1.getAuth; } });
|
|
71
|
+
Object.defineProperty(exports, "getAuthFromToken", { enumerable: true, get: function () { return server_auth_1.getAuthFromToken; } });
|
|
72
|
+
Object.defineProperty(exports, "parseFrontendApiUrlFromPublishableKey", { enumerable: true, get: function () { return server_auth_1.parseFrontendApiUrlFromPublishableKey; } });
|
|
73
|
+
Object.defineProperty(exports, "requireAuth", { enumerable: true, get: function () { return server_auth_1.requireAuth; } });
|
|
74
|
+
Object.defineProperty(exports, "requireAuthFromToken", { enumerable: true, get: function () { return server_auth_1.requireAuthFromToken; } });
|
|
75
|
+
Object.defineProperty(exports, "toSessionPrincipalIdentity", { enumerable: true, get: function () { return server_auth_1.toSessionPrincipalIdentity; } });
|
|
76
|
+
Object.defineProperty(exports, "toSessionPrincipalMetadata", { enumerable: true, get: function () { return server_auth_1.toSessionPrincipalMetadata; } });
|
|
77
|
+
Object.defineProperty(exports, "verifyAuthToken", { enumerable: true, get: function () { return server_auth_1.verifyAuthToken; } });
|
|
78
|
+
Object.defineProperty(exports, "WachtAuthError", { enumerable: true, get: function () { return server_auth_1.WachtAuthError; } });
|
|
79
|
+
const error_2 = require("./error");
|
|
80
|
+
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return error_2.ValidationError; } });
|
|
81
|
+
Object.defineProperty(exports, "AuthenticationError", { enumerable: true, get: function () { return error_2.AuthenticationError; } });
|
|
82
|
+
Object.defineProperty(exports, "AuthorizationError", { enumerable: true, get: function () { return error_2.AuthorizationError; } });
|
|
83
|
+
Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return error_2.NotFoundError; } });
|
|
84
|
+
Object.defineProperty(exports, "ConflictError", { enumerable: true, get: function () { return error_2.ConflictError; } });
|
|
85
|
+
Object.defineProperty(exports, "RateLimitError", { enumerable: true, get: function () { return error_2.RateLimitError; } });
|
|
86
|
+
Object.defineProperty(exports, "ServerError", { enumerable: true, get: function () { return error_2.ServerError; } });
|
|
87
|
+
// API modules - namespace exports
|
|
88
|
+
const users = __importStar(require("./api/users"));
|
|
89
|
+
exports.users = users;
|
|
90
|
+
const organizations = __importStar(require("./api/organizations"));
|
|
91
|
+
exports.organizations = organizations;
|
|
92
|
+
const workspaces = __importStar(require("./api/workspaces"));
|
|
93
|
+
exports.workspaces = workspaces;
|
|
94
|
+
const apiKeys = __importStar(require("./api/api-keys"));
|
|
95
|
+
exports.apiKeys = apiKeys;
|
|
96
|
+
const settings = __importStar(require("./api/settings"));
|
|
97
|
+
exports.settings = settings;
|
|
98
|
+
const notifications = __importStar(require("./api/notifications"));
|
|
99
|
+
exports.notifications = notifications;
|
|
100
|
+
const webhooks = __importStar(require("./api/webhooks"));
|
|
101
|
+
exports.webhooks = webhooks;
|
|
102
|
+
const ai = __importStar(require("./api/ai"));
|
|
103
|
+
exports.ai = ai;
|
|
104
|
+
const segments = __importStar(require("./api/segments"));
|
|
105
|
+
exports.segments = segments;
|
|
106
|
+
const invitations = __importStar(require("./api/invitations"));
|
|
107
|
+
exports.invitations = invitations;
|
|
108
|
+
const analytics = __importStar(require("./api/analytics"));
|
|
109
|
+
exports.analytics = analytics;
|
|
110
|
+
const utility = __importStar(require("./api/utility"));
|
|
111
|
+
exports.utility = utility;
|
|
112
|
+
const health = __importStar(require("./api/health"));
|
|
113
|
+
exports.health = health;
|
|
114
|
+
const gateway = __importStar(require("./api/gateway"));
|
|
115
|
+
exports.gateway = gateway;
|
|
116
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.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;AAtMJ,yDAA2C;AAuMzC,4BAAQ;AAtMV,+DAAiD;AAuM/C,kCAAW;AAtMb,2DAA6C;AAuM3C,8BAAS;AAtMX,uDAAyC;AAuMvC,0BAAO;AAtMT,qDAAuC;AAuMrC,wBAAM;AAtMR,uDAAyC;AAuMvC,0BAAO"}
|
package/dist/jwt.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=jwt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwt.d.ts","sourceRoot":"","sources":["../src/jwt.ts"],"names":[],"mappings":""}
|
package/dist/jwt.js
ADDED
package/dist/jwt.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jwt.js","sourceRoot":"","sources":["../src/jwt.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Agent model
|
|
3
|
+
* Generated from OpenAPI - matches Rust SDK exactly
|
|
4
|
+
*/
|
|
5
|
+
export interface AiAgent {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
deployment_id: string;
|
|
10
|
+
configuration: Record<string, unknown>;
|
|
11
|
+
created_at: string;
|
|
12
|
+
updated_at: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Request to create an AI agent
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateAiAgentRequest {
|
|
18
|
+
name: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
configuration?: Record<string, unknown>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Request to update an AI agent
|
|
24
|
+
*/
|
|
25
|
+
export interface UpdateAiAgentRequest {
|
|
26
|
+
name?: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
status?: string;
|
|
29
|
+
configuration?: Record<string, unknown>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* AI Tool model
|
|
33
|
+
*/
|
|
34
|
+
export interface AiTool {
|
|
35
|
+
id?: string;
|
|
36
|
+
name?: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
tool_type?: AiToolType;
|
|
39
|
+
config?: Record<string, unknown>;
|
|
40
|
+
is_active?: boolean;
|
|
41
|
+
created_at?: string;
|
|
42
|
+
updated_at?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* AI Tool Type enum
|
|
46
|
+
*/
|
|
47
|
+
export type AiToolType = 'api' | 'platform_event' | 'platform_function' | 'internal' | 'use_external_service';
|
|
48
|
+
/**
|
|
49
|
+
* Request to create an AI tool
|
|
50
|
+
*/
|
|
51
|
+
export interface CreateAiToolRequest {
|
|
52
|
+
name: string;
|
|
53
|
+
description?: string;
|
|
54
|
+
tool_type: string;
|
|
55
|
+
configuration: Record<string, unknown>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Request to update an AI tool
|
|
59
|
+
*/
|
|
60
|
+
export interface UpdateAiToolRequest {
|
|
61
|
+
name?: string;
|
|
62
|
+
description?: string;
|
|
63
|
+
tool_type?: string;
|
|
64
|
+
configuration?: Record<string, unknown>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* AI Knowledge Base model
|
|
68
|
+
*/
|
|
69
|
+
export interface AiKnowledgeBase {
|
|
70
|
+
id: string;
|
|
71
|
+
name: string;
|
|
72
|
+
description?: string;
|
|
73
|
+
deployment_id: string;
|
|
74
|
+
configuration: Record<string, unknown>;
|
|
75
|
+
created_at: string;
|
|
76
|
+
updated_at: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Request to create an AI knowledge base
|
|
80
|
+
*/
|
|
81
|
+
export interface CreateAiKnowledgeBaseRequest {
|
|
82
|
+
name: string;
|
|
83
|
+
description?: string;
|
|
84
|
+
configuration?: Record<string, unknown>;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Request to update an AI knowledge base
|
|
88
|
+
*/
|
|
89
|
+
export interface UpdateAiKnowledgeBaseRequest {
|
|
90
|
+
name?: string;
|
|
91
|
+
description?: string;
|
|
92
|
+
configuration?: Record<string, unknown>;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* AI Execution Context model
|
|
96
|
+
*/
|
|
97
|
+
export type ExecutionContextStatus = 'idle' | 'running' | 'waiting_for_input' | 'interrupted' | 'completed' | 'failed';
|
|
98
|
+
export interface AiExecutionContext {
|
|
99
|
+
id: string;
|
|
100
|
+
created_at: string;
|
|
101
|
+
updated_at: string;
|
|
102
|
+
deployment_id: string;
|
|
103
|
+
title: string;
|
|
104
|
+
system_instructions?: string;
|
|
105
|
+
context_group?: string;
|
|
106
|
+
last_activity_at: string;
|
|
107
|
+
completed_at?: string;
|
|
108
|
+
execution_state?: Record<string, unknown>;
|
|
109
|
+
status: ExecutionContextStatus;
|
|
110
|
+
source?: string;
|
|
111
|
+
external_context_id?: string;
|
|
112
|
+
external_resource_metadata?: Record<string, unknown>;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Request to create an AI execution context
|
|
116
|
+
*/
|
|
117
|
+
export interface CreateAiExecutionContextRequest {
|
|
118
|
+
title?: string;
|
|
119
|
+
system_instructions?: string;
|
|
120
|
+
context_group?: string;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Request to update an AI execution context
|
|
124
|
+
*/
|
|
125
|
+
export interface UpdateAiExecutionContextRequest {
|
|
126
|
+
title?: string;
|
|
127
|
+
system_instructions?: string;
|
|
128
|
+
context_group?: string;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Agent Integration model
|
|
132
|
+
*/
|
|
133
|
+
export interface AgentIntegration {
|
|
134
|
+
id: string;
|
|
135
|
+
created_at: string;
|
|
136
|
+
updated_at: string;
|
|
137
|
+
deployment_id: string;
|
|
138
|
+
agent_id: string;
|
|
139
|
+
integration_type: IntegrationType;
|
|
140
|
+
name: string;
|
|
141
|
+
config?: Record<string, unknown>;
|
|
142
|
+
webhook_url?: string;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Integration Type enum
|
|
146
|
+
*/
|
|
147
|
+
export type IntegrationType = 'teams' | 'slack' | 'whatsapp' | 'discord' | 'clickup';
|
|
148
|
+
/**
|
|
149
|
+
* Request to create an agent integration
|
|
150
|
+
*/
|
|
151
|
+
export interface CreateAgentIntegrationRequest {
|
|
152
|
+
integration_type: IntegrationType;
|
|
153
|
+
name: string;
|
|
154
|
+
config?: Record<string, unknown>;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Request to update an agent integration
|
|
158
|
+
*/
|
|
159
|
+
export interface UpdateAgentIntegrationRequest {
|
|
160
|
+
name?: string;
|
|
161
|
+
config?: Record<string, unknown>;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* AI Knowledge Base Document model
|
|
165
|
+
*/
|
|
166
|
+
export interface AiKnowledgeBaseDocument {
|
|
167
|
+
id: string;
|
|
168
|
+
created_at: string;
|
|
169
|
+
updated_at: string;
|
|
170
|
+
title: string;
|
|
171
|
+
description?: string;
|
|
172
|
+
file_name: string;
|
|
173
|
+
file_size: number;
|
|
174
|
+
file_type: string;
|
|
175
|
+
file_url: string;
|
|
176
|
+
knowledge_base_id: string;
|
|
177
|
+
processing_metadata?: Record<string, unknown>;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Request to upload a document to knowledge base
|
|
181
|
+
*/
|
|
182
|
+
export interface UploadKnowledgeBaseDocumentRequest {
|
|
183
|
+
file: File;
|
|
184
|
+
title?: string;
|
|
185
|
+
description?: string;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Execute agent request
|
|
189
|
+
*/
|
|
190
|
+
export interface ExecuteAgentRequest {
|
|
191
|
+
agent_name?: string;
|
|
192
|
+
execution_type: {
|
|
193
|
+
new_message?: {
|
|
194
|
+
message: string;
|
|
195
|
+
files?: Array<{
|
|
196
|
+
filename: string;
|
|
197
|
+
mime_type: string;
|
|
198
|
+
data: string;
|
|
199
|
+
}>;
|
|
200
|
+
};
|
|
201
|
+
user_input_response?: {
|
|
202
|
+
message: string;
|
|
203
|
+
};
|
|
204
|
+
platform_function_result?: {
|
|
205
|
+
execution_id: string;
|
|
206
|
+
result: Record<string, unknown>;
|
|
207
|
+
};
|
|
208
|
+
cancel?: Record<string, never>;
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Execute agent response
|
|
213
|
+
*/
|
|
214
|
+
export interface ExecuteAgentResponse {
|
|
215
|
+
status: string;
|
|
216
|
+
conversation_id?: string;
|
|
217
|
+
}
|
|
218
|
+
//# sourceMappingURL=ai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/models/ai.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC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MAAM,EAAE,OAAO,CAAC,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE;QACd,WAAW,CAAC,EAAE;YACZ,OAAO,EAAE,MAAM,CAAC;YAChB,KAAK,CAAC,EAAE,KAAK,CAAC;gBACZ,QAAQ,EAAE,MAAM,CAAC;gBACjB,SAAS,EAAE,MAAM,CAAC;gBAClB,IAAI,EAAE,MAAM,CAAC;aACd,CAAC,CAAC;SACJ,CAAC;QACF,mBAAmB,CAAC,EAAE;YACpB,OAAO,EAAE,MAAM,CAAC;SACjB,CAAC;QACF,wBAAwB,CAAC,EAAE;YACzB,YAAY,EAAE,MAAM,CAAC;YACrB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SACjC,CAAC;QACF,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;KAChC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../../src/models/ai.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Analytics stats summary
|
|
3
|
+
*/
|
|
4
|
+
export interface AnalyticsStats {
|
|
5
|
+
total_users: number;
|
|
6
|
+
active_users: number;
|
|
7
|
+
total_organizations: number;
|
|
8
|
+
total_workspaces: number;
|
|
9
|
+
new_users_today: number;
|
|
10
|
+
new_users_this_week: number;
|
|
11
|
+
new_users_this_month: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Recent signup
|
|
15
|
+
*/
|
|
16
|
+
export interface RecentSignup {
|
|
17
|
+
id: string;
|
|
18
|
+
user_id: string;
|
|
19
|
+
first_name: string;
|
|
20
|
+
last_name: string;
|
|
21
|
+
email_address?: string;
|
|
22
|
+
phone_number?: string;
|
|
23
|
+
created_at: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Recent signup organization
|
|
27
|
+
*/
|
|
28
|
+
export interface RecentSignupOrganization {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
created_at: string;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/models/analytics.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../../src/models/analytics.ts"],"names":[],"mappings":""}
|