@tuturuuu/internal-api 0.9.0 → 0.10.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/dist/account-delete.d.ts +25 -0
- package/dist/account-delete.d.ts.map +1 -0
- package/dist/account-delete.js +22 -0
- package/dist/ai.d.ts +2 -1
- package/dist/ai.d.ts.map +1 -1
- package/dist/api-keys.d.ts +66 -0
- package/dist/api-keys.d.ts.map +1 -0
- package/dist/api-keys.js +93 -0
- package/dist/auth.d.ts +5 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +9 -0
- package/dist/backend.d.ts +556 -0
- package/dist/backend.d.ts.map +1 -0
- package/dist/backend.js +528 -0
- package/dist/calendar.d.ts +29 -0
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +18 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -0
- package/dist/cron.d.ts +16 -0
- package/dist/cron.d.ts.map +1 -0
- package/dist/cron.js +41 -0
- package/dist/documents.d.ts +38 -0
- package/dist/documents.d.ts.map +1 -0
- package/dist/documents.js +71 -0
- package/dist/education.d.ts +228 -12
- package/dist/education.d.ts.map +1 -1
- package/dist/education.js +229 -0
- package/dist/group-tags.d.ts +87 -0
- package/dist/group-tags.d.ts.map +1 -0
- package/dist/group-tags.js +116 -0
- package/dist/index.d.ts +24 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +164 -14
- package/dist/infrastructure/abuse.d.ts +7 -0
- package/dist/infrastructure/abuse.d.ts.map +1 -0
- package/dist/infrastructure/abuse.js +39 -0
- package/dist/infrastructure/ai.d.ts +53 -0
- package/dist/infrastructure/ai.d.ts.map +1 -0
- package/dist/infrastructure/ai.js +331 -0
- package/dist/infrastructure/apps.d.ts +9 -0
- package/dist/infrastructure/apps.d.ts.map +1 -0
- package/dist/infrastructure/apps.js +49 -0
- package/dist/infrastructure/blocked-ips.d.ts +65 -0
- package/dist/infrastructure/blocked-ips.d.ts.map +1 -0
- package/dist/infrastructure/blocked-ips.js +56 -0
- package/dist/infrastructure/github-bot.d.ts +10 -0
- package/dist/infrastructure/github-bot.d.ts.map +1 -0
- package/dist/infrastructure/github-bot.js +73 -0
- package/dist/infrastructure/index.d.ts +11 -0
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/infrastructure/index.js +26 -0
- package/dist/infrastructure/mobile.d.ts +23 -0
- package/dist/infrastructure/mobile.d.ts.map +1 -0
- package/dist/infrastructure/mobile.js +183 -0
- package/dist/infrastructure/monitoring.d.ts +34 -0
- package/dist/infrastructure/monitoring.d.ts.map +1 -0
- package/dist/infrastructure/monitoring.js +356 -0
- package/dist/infrastructure/realtime.d.ts +55 -0
- package/dist/infrastructure/realtime.d.ts.map +1 -0
- package/dist/infrastructure/realtime.js +29 -0
- package/dist/infrastructure/types.d.ts +1652 -0
- package/dist/infrastructure/types.d.ts.map +1 -0
- package/dist/infrastructure/types.js +2 -0
- package/dist/infrastructure/workspace.d.ts +5 -0
- package/dist/infrastructure/workspace.d.ts.map +1 -0
- package/dist/infrastructure/workspace.js +15 -0
- package/dist/infrastructure.d.ts +10 -1725
- package/dist/infrastructure.d.ts.map +1 -1
- package/dist/infrastructure.js +24 -1019
- package/dist/inventory.d.ts +34 -0
- package/dist/inventory.d.ts.map +1 -1
- package/dist/inventory.js +7 -0
- package/dist/notifications.d.ts +90 -0
- package/dist/notifications.d.ts.map +1 -0
- package/dist/notifications.js +62 -0
- package/dist/promotions.d.ts +3 -0
- package/dist/promotions.d.ts.map +1 -1
- package/dist/promotions.js +8 -0
- package/dist/rate-limits.d.ts +18 -5
- package/dist/rate-limits.d.ts.map +1 -1
- package/dist/task-plans.d.ts +220 -0
- package/dist/task-plans.d.ts.map +1 -0
- package/dist/task-plans.js +153 -0
- package/dist/tasks.d.ts +200 -0
- package/dist/tasks.d.ts.map +1 -1
- package/dist/tasks.js +143 -0
- package/dist/teach.d.ts +67 -0
- package/dist/teach.d.ts.map +1 -1
- package/dist/teach.js +20 -0
- package/dist/templates.d.ts +2 -0
- package/dist/templates.d.ts.map +1 -1
- package/dist/templates.js +8 -0
- package/dist/tulearn.d.ts +46 -0
- package/dist/tulearn.d.ts.map +1 -1
- package/dist/tulearn.js +36 -0
- package/dist/user-group-attendance.d.ts +29 -0
- package/dist/user-group-attendance.d.ts.map +1 -0
- package/dist/user-group-attendance.js +38 -0
- package/dist/user-group-schedule.d.ts +193 -0
- package/dist/user-group-schedule.d.ts.map +1 -0
- package/dist/user-group-schedule.js +84 -0
- package/dist/user-groups.d.ts +18 -0
- package/dist/user-groups.d.ts.map +1 -1
- package/dist/user-groups.js +18 -0
- package/dist/users-server.d.ts +14 -0
- package/dist/users-server.d.ts.map +1 -0
- package/dist/users-server.js +37 -0
- package/dist/users.d.ts +64 -1
- package/dist/users.d.ts.map +1 -1
- package/dist/users.js +78 -6
- package/dist/workspace-config-ids.d.ts +6 -0
- package/dist/workspace-config-ids.d.ts.map +1 -1
- package/dist/workspace-config-ids.js +13 -1
- package/dist/workspace-configs.d.ts +4 -1
- package/dist/workspace-configs.d.ts.map +1 -1
- package/dist/workspace-configs.js +25 -1
- package/package.json +63 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abuse.d.ts","sourceRoot":"","sources":["../../src/infrastructure/abuse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAChF,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,+BAA+B,EAC/B,kCAAkC,EAClC,+BAA+B,EAChC,MAAM,SAAS,CAAC;AAEjB,wBAAsB,4BAA4B,CAChD,MAAM,CAAC,EAAE,kCAAkC,EAC3C,OAAO,CAAC,EAAE,wBAAwB,sCAmBnC;AAED,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,+BAA+B,EACxC,OAAO,CAAC,EAAE,wBAAwB,uCAcnC;AAED,wBAAsB,wBAAwB,CAC5C,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,+BAA+B,EACxC,OAAO,CAAC,EAAE,wBAAwB,uCAgBnC;AAED,mBAAmB,SAAS,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAbuseIntelligenceSnapshot = getAbuseIntelligenceSnapshot;
|
|
4
|
+
exports.createAbuseTrustOverride = createAbuseTrustOverride;
|
|
5
|
+
exports.revokeAbuseTrustOverride = revokeAbuseTrustOverride;
|
|
6
|
+
const client_1 = require("../client");
|
|
7
|
+
async function getAbuseIntelligenceSnapshot(params, options) {
|
|
8
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
9
|
+
const searchParams = new URLSearchParams();
|
|
10
|
+
if (params?.limit != null) {
|
|
11
|
+
searchParams.set('limit', String(params.limit));
|
|
12
|
+
}
|
|
13
|
+
if (params?.signalLimit != null) {
|
|
14
|
+
searchParams.set('signalLimit', String(params.signalLimit));
|
|
15
|
+
}
|
|
16
|
+
return client.json(`/api/v1/infrastructure/abuse-intelligence${searchParams.size > 0 ? `?${searchParams.toString()}` : ''}`, { cache: 'no-store' });
|
|
17
|
+
}
|
|
18
|
+
async function createAbuseTrustOverride(payload, options) {
|
|
19
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
20
|
+
return client.json('/api/v1/infrastructure/abuse-intelligence', {
|
|
21
|
+
body: JSON.stringify(payload),
|
|
22
|
+
cache: 'no-store',
|
|
23
|
+
headers: {
|
|
24
|
+
'Content-Type': 'application/json',
|
|
25
|
+
},
|
|
26
|
+
method: 'POST',
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
async function revokeAbuseTrustOverride(overrideId, payload, options) {
|
|
30
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
31
|
+
return client.json(`/api/v1/infrastructure/abuse-intelligence/overrides/${encodeURIComponent(overrideId)}`, {
|
|
32
|
+
body: JSON.stringify(payload),
|
|
33
|
+
cache: 'no-store',
|
|
34
|
+
headers: {
|
|
35
|
+
'Content-Type': 'application/json',
|
|
36
|
+
},
|
|
37
|
+
method: 'PATCH',
|
|
38
|
+
});
|
|
39
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { AIModelUI } from '@tuturuuu/types';
|
|
2
|
+
import type { ChatMessage } from '../chat-types';
|
|
3
|
+
import { type InternalApiClientOptions } from '../client';
|
|
4
|
+
import type { AIWhitelistDomainResponse, AIWhitelistDomainsResponse, AIWhitelistEmailResponse, AIWhitelistEmailsResponse, AiAgentDeployResponse, AiAgentExternalDraftResponse, AiAgentExternalMessagesResponse, AiAgentExternalSyncResponse, AiAgentExternalThreadsResponse, AiAgentIdentityLink, AiAgentsResponse, AiAgentTestResponse, AiAgentZaloPersonalAction, AiAgentZaloPersonalActionResponse, AiAgentZaloPersonalQrLoginResponse, AiAgentZaloPersonalStatusResponse, AiGatewayModelsPage, CreateAIWhitelistDomainPayload, CreateAIWhitelistEmailPayload, CreateChatIntegrationPayload, CreateChatIntegrationResponse, GatewayModelRow, GatewayModelRowsPage, ListAIWhitelistDomainsParams, ListAIWhitelistEmailsParams, ListAiGatewayModelsPageParams, ListAiGatewayModelsParams, RotateAiAgentChannelSecretResponse, SaveAiAgentIdentityResponse, SaveAiAgentPayload, SaveAiAgentResponse, UpdateAIWhitelistDomainPayload, UpdateAIWhitelistEmailPayload } from './types';
|
|
5
|
+
export declare function listAiGatewayModels(params?: ListAiGatewayModelsParams, options?: InternalApiClientOptions): Promise<AIModelUI[]>;
|
|
6
|
+
export declare function listAiGatewayModelRows(params?: ListAiGatewayModelsParams, options?: InternalApiClientOptions): Promise<GatewayModelRow[]>;
|
|
7
|
+
export declare function listAiGatewayModelsPage(params?: ListAiGatewayModelsPageParams, options?: InternalApiClientOptions): Promise<AiGatewayModelsPage>;
|
|
8
|
+
export declare function listAiGatewayModelRowsPage(params?: ListAiGatewayModelsPageParams, options?: InternalApiClientOptions): Promise<GatewayModelRowsPage>;
|
|
9
|
+
export declare function listAiGatewayModelsLegacy(params?: ListAiGatewayModelsParams, options?: InternalApiClientOptions): Promise<AIModelUI[]>;
|
|
10
|
+
export declare function listAIWhitelistDomains(params?: ListAIWhitelistDomainsParams, options?: InternalApiClientOptions): Promise<AIWhitelistDomainsResponse>;
|
|
11
|
+
export declare function createAIWhitelistDomain(payload: CreateAIWhitelistDomainPayload, options?: InternalApiClientOptions): Promise<AIWhitelistDomainResponse>;
|
|
12
|
+
export declare function updateAIWhitelistDomain(domain: string, payload: UpdateAIWhitelistDomainPayload, options?: InternalApiClientOptions): Promise<{
|
|
13
|
+
success: true;
|
|
14
|
+
}>;
|
|
15
|
+
export declare function deleteAIWhitelistDomain(domain: string, options?: InternalApiClientOptions): Promise<{
|
|
16
|
+
success: true;
|
|
17
|
+
}>;
|
|
18
|
+
export declare function listAIWhitelistEmails(params?: ListAIWhitelistEmailsParams, options?: InternalApiClientOptions): Promise<AIWhitelistEmailsResponse>;
|
|
19
|
+
export declare function createAIWhitelistEmail(payload: CreateAIWhitelistEmailPayload, options?: InternalApiClientOptions): Promise<AIWhitelistEmailResponse>;
|
|
20
|
+
export declare function updateAIWhitelistEmail(email: string, payload: UpdateAIWhitelistEmailPayload, options?: InternalApiClientOptions): Promise<{
|
|
21
|
+
success: true;
|
|
22
|
+
}>;
|
|
23
|
+
export declare function deleteAIWhitelistEmail(email: string, options?: InternalApiClientOptions): Promise<{
|
|
24
|
+
success: true;
|
|
25
|
+
}>;
|
|
26
|
+
export declare function listAiAgents(options?: InternalApiClientOptions): Promise<AiAgentsResponse>;
|
|
27
|
+
export declare function saveAiAgent(payload: SaveAiAgentPayload, options?: InternalApiClientOptions): Promise<SaveAiAgentResponse>;
|
|
28
|
+
export declare function createChatIntegration(payload: CreateChatIntegrationPayload, options?: InternalApiClientOptions): Promise<CreateChatIntegrationResponse>;
|
|
29
|
+
export declare function deployAiAgentChannel(agentId: string, channelId: string, options?: InternalApiClientOptions): Promise<AiAgentDeployResponse>;
|
|
30
|
+
export declare function pauseAiAgentChannel(agentId: string, channelId: string, options?: InternalApiClientOptions): Promise<SaveAiAgentResponse>;
|
|
31
|
+
export declare function testAiAgentChannel(agentId: string, channelId: string, prompt?: string, options?: InternalApiClientOptions): Promise<AiAgentTestResponse>;
|
|
32
|
+
export declare function rotateAiAgentChannelSecret(agentId: string, channelId: string, name: string, value?: string, options?: InternalApiClientOptions): Promise<RotateAiAgentChannelSecretResponse>;
|
|
33
|
+
export declare function getAiAgentZaloPersonalStatus(agentId: string, channelId: string, options?: InternalApiClientOptions): Promise<AiAgentZaloPersonalStatusResponse>;
|
|
34
|
+
export declare function runAiAgentZaloPersonalAction(agentId: string, channelId: string, action: AiAgentZaloPersonalAction, options?: InternalApiClientOptions): Promise<AiAgentZaloPersonalActionResponse>;
|
|
35
|
+
export declare function startAiAgentZaloPersonalQrLogin(agentId: string, channelId: string, options?: InternalApiClientOptions): Promise<AiAgentZaloPersonalQrLoginResponse>;
|
|
36
|
+
export declare function getAiAgentZaloPersonalQrLoginStatus(agentId: string, channelId: string, sessionId: string, options?: InternalApiClientOptions): Promise<AiAgentZaloPersonalQrLoginResponse>;
|
|
37
|
+
export declare function abortAiAgentZaloPersonalQrLogin(agentId: string, channelId: string, sessionId: string, options?: InternalApiClientOptions): Promise<AiAgentZaloPersonalQrLoginResponse>;
|
|
38
|
+
export declare function saveAiAgentIdentityLink(payload: AiAgentIdentityLink, options?: InternalApiClientOptions): Promise<SaveAiAgentIdentityResponse>;
|
|
39
|
+
export declare function listAiAgentExternalThreads(params?: {
|
|
40
|
+
agentId?: string | null;
|
|
41
|
+
channelId?: string | null;
|
|
42
|
+
wsId?: string | null;
|
|
43
|
+
}, options?: InternalApiClientOptions): Promise<AiAgentExternalThreadsResponse>;
|
|
44
|
+
export declare function listAiAgentExternalMessages(threadId: string, params?: {
|
|
45
|
+
limit?: number;
|
|
46
|
+
}, options?: InternalApiClientOptions): Promise<AiAgentExternalMessagesResponse>;
|
|
47
|
+
export declare function syncAiAgentExternalThread(threadId: string, options?: InternalApiClientOptions): Promise<AiAgentExternalSyncResponse>;
|
|
48
|
+
export declare function draftAiAgentExternalResponse(threadId: string, prompt: string, options?: InternalApiClientOptions): Promise<AiAgentExternalDraftResponse>;
|
|
49
|
+
export declare function sendAiAgentExternalResponse(threadId: string, content: string, options?: InternalApiClientOptions): Promise<{
|
|
50
|
+
message: ChatMessage;
|
|
51
|
+
}>;
|
|
52
|
+
export type * from './types';
|
|
53
|
+
//# sourceMappingURL=ai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/infrastructure/ai.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,4BAA4B,EAC5B,+BAA+B,EAC/B,2BAA2B,EAC3B,8BAA8B,EAC9B,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EACzB,iCAAiC,EACjC,kCAAkC,EAClC,iCAAiC,EACjC,mBAAmB,EACnB,8BAA8B,EAC9B,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC7B,eAAe,EACf,oBAAoB,EACpB,4BAA4B,EAC5B,2BAA2B,EAC3B,6BAA6B,EAC7B,yBAAyB,EACzB,kCAAkC,EAClC,2BAA2B,EAC3B,kBAAkB,EAClB,mBAAmB,EACnB,8BAA8B,EAC9B,6BAA6B,EAC9B,MAAM,SAAS,CAAC;AAcjB,wBAAsB,mBAAmB,CACvC,MAAM,CAAC,EAAE,yBAAyB,EAClC,OAAO,CAAC,EAAE,wBAAwB,w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AE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,wBAAwB,+CAanC;AAED,wBAAsB,+BAA+B,CACnD,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,wBAAwB,+CAcnC;AAED,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,mBAAmB,EAC5B,OAAO,CAAC,EAAE,wBAAwB,wCAcnC;AAED,wBAAsB,0BAA0B,CAC9C,MAAM,CAAC,EAAE;IACP,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,EACD,OAAO,CAAC,EAAE,wBAAwB,2CAenC;AAED,wBAAsB,2BAA2B,CAC/C,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3B,OAAO,CAAC,EAAE,wBAAwB,4CAenC;AAED,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,wBAAwB,wCAanC;AAED,wBAAsB,4BAA4B,CAChD,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,wBAAwB,yCAenC;AAED,wBAAsB,2BAA2B,CAC/C,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,wBAAwB;aAIJ,WAAW;GAW1C;AAED,mBAAmB,SAAS,CAAC"}
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listAiGatewayModels = listAiGatewayModels;
|
|
4
|
+
exports.listAiGatewayModelRows = listAiGatewayModelRows;
|
|
5
|
+
exports.listAiGatewayModelsPage = listAiGatewayModelsPage;
|
|
6
|
+
exports.listAiGatewayModelRowsPage = listAiGatewayModelRowsPage;
|
|
7
|
+
exports.listAiGatewayModelsLegacy = listAiGatewayModelsLegacy;
|
|
8
|
+
exports.listAIWhitelistDomains = listAIWhitelistDomains;
|
|
9
|
+
exports.createAIWhitelistDomain = createAIWhitelistDomain;
|
|
10
|
+
exports.updateAIWhitelistDomain = updateAIWhitelistDomain;
|
|
11
|
+
exports.deleteAIWhitelistDomain = deleteAIWhitelistDomain;
|
|
12
|
+
exports.listAIWhitelistEmails = listAIWhitelistEmails;
|
|
13
|
+
exports.createAIWhitelistEmail = createAIWhitelistEmail;
|
|
14
|
+
exports.updateAIWhitelistEmail = updateAIWhitelistEmail;
|
|
15
|
+
exports.deleteAIWhitelistEmail = deleteAIWhitelistEmail;
|
|
16
|
+
exports.listAiAgents = listAiAgents;
|
|
17
|
+
exports.saveAiAgent = saveAiAgent;
|
|
18
|
+
exports.createChatIntegration = createChatIntegration;
|
|
19
|
+
exports.deployAiAgentChannel = deployAiAgentChannel;
|
|
20
|
+
exports.pauseAiAgentChannel = pauseAiAgentChannel;
|
|
21
|
+
exports.testAiAgentChannel = testAiAgentChannel;
|
|
22
|
+
exports.rotateAiAgentChannelSecret = rotateAiAgentChannelSecret;
|
|
23
|
+
exports.getAiAgentZaloPersonalStatus = getAiAgentZaloPersonalStatus;
|
|
24
|
+
exports.runAiAgentZaloPersonalAction = runAiAgentZaloPersonalAction;
|
|
25
|
+
exports.startAiAgentZaloPersonalQrLogin = startAiAgentZaloPersonalQrLogin;
|
|
26
|
+
exports.getAiAgentZaloPersonalQrLoginStatus = getAiAgentZaloPersonalQrLoginStatus;
|
|
27
|
+
exports.abortAiAgentZaloPersonalQrLogin = abortAiAgentZaloPersonalQrLogin;
|
|
28
|
+
exports.saveAiAgentIdentityLink = saveAiAgentIdentityLink;
|
|
29
|
+
exports.listAiAgentExternalThreads = listAiAgentExternalThreads;
|
|
30
|
+
exports.listAiAgentExternalMessages = listAiAgentExternalMessages;
|
|
31
|
+
exports.syncAiAgentExternalThread = syncAiAgentExternalThread;
|
|
32
|
+
exports.draftAiAgentExternalResponse = draftAiAgentExternalResponse;
|
|
33
|
+
exports.sendAiAgentExternalResponse = sendAiAgentExternalResponse;
|
|
34
|
+
const client_1 = require("../client");
|
|
35
|
+
function mapGatewayModel(model) {
|
|
36
|
+
return {
|
|
37
|
+
context: model.context_window ?? undefined,
|
|
38
|
+
description: model.description ?? undefined,
|
|
39
|
+
disabled: !model.is_enabled,
|
|
40
|
+
label: model.name,
|
|
41
|
+
provider: model.provider,
|
|
42
|
+
tags: model.tags ?? undefined,
|
|
43
|
+
value: model.id,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
async function listAiGatewayModels(params, options) {
|
|
47
|
+
return listAiGatewayModelsLegacy(params, options);
|
|
48
|
+
}
|
|
49
|
+
function aiGatewayModelQuery(params, options = { paginated: false }) {
|
|
50
|
+
return {
|
|
51
|
+
enabled: typeof params?.enabled === 'boolean' ? String(params.enabled) : undefined,
|
|
52
|
+
format: options.paginated ? 'paginated' : undefined,
|
|
53
|
+
ids: params?.ids?.join(','),
|
|
54
|
+
limit: options.paginated ? params?.limit : undefined,
|
|
55
|
+
page: options.paginated ? params?.page : undefined,
|
|
56
|
+
provider: params?.provider,
|
|
57
|
+
q: params?.q,
|
|
58
|
+
tag: params?.tag,
|
|
59
|
+
type: params?.type ?? 'language',
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
async function listAiGatewayModelRows(params, options) {
|
|
63
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
64
|
+
return client.json('/api/v1/infrastructure/ai/models', {
|
|
65
|
+
cache: 'no-store',
|
|
66
|
+
query: aiGatewayModelQuery(params),
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
async function listAiGatewayModelsPage(params, options) {
|
|
70
|
+
const response = await listAiGatewayModelRowsPage(params, options);
|
|
71
|
+
return {
|
|
72
|
+
data: response.data.map((row) => mapGatewayModel(row)),
|
|
73
|
+
pagination: response.pagination,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
async function listAiGatewayModelRowsPage(params, options) {
|
|
77
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
78
|
+
return client.json('/api/v1/infrastructure/ai/models', {
|
|
79
|
+
cache: 'no-store',
|
|
80
|
+
query: aiGatewayModelQuery(params, { paginated: true }),
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
async function listAiGatewayModelsLegacy(params, options) {
|
|
84
|
+
const rows = await listAiGatewayModelRows(params, options);
|
|
85
|
+
return rows.map((row) => mapGatewayModel(row));
|
|
86
|
+
}
|
|
87
|
+
async function listAIWhitelistDomains(params, options) {
|
|
88
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
89
|
+
return client.json('/api/v1/infrastructure/ai/whitelist/domains', {
|
|
90
|
+
cache: 'no-store',
|
|
91
|
+
query: {
|
|
92
|
+
page: params?.page,
|
|
93
|
+
pageSize: params?.pageSize,
|
|
94
|
+
q: params?.q,
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
async function createAIWhitelistDomain(payload, options) {
|
|
99
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
100
|
+
return client.json('/api/v1/infrastructure/ai/whitelist/domains', {
|
|
101
|
+
body: JSON.stringify(payload),
|
|
102
|
+
cache: 'no-store',
|
|
103
|
+
headers: {
|
|
104
|
+
'Content-Type': 'application/json',
|
|
105
|
+
},
|
|
106
|
+
method: 'POST',
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
async function updateAIWhitelistDomain(domain, payload, options) {
|
|
110
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
111
|
+
return client.json(`/api/v1/infrastructure/ai/whitelist/domain/${(0, client_1.encodePathSegment)(domain)}`, {
|
|
112
|
+
body: JSON.stringify(payload),
|
|
113
|
+
cache: 'no-store',
|
|
114
|
+
headers: {
|
|
115
|
+
'Content-Type': 'application/json',
|
|
116
|
+
},
|
|
117
|
+
method: 'PUT',
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
async function deleteAIWhitelistDomain(domain, options) {
|
|
121
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
122
|
+
return client.json(`/api/v1/infrastructure/ai/whitelist/domain/${(0, client_1.encodePathSegment)(domain)}`, {
|
|
123
|
+
cache: 'no-store',
|
|
124
|
+
method: 'DELETE',
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
async function listAIWhitelistEmails(params, options) {
|
|
128
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
129
|
+
return client.json('/api/v1/infrastructure/ai/whitelist/emails', {
|
|
130
|
+
cache: 'no-store',
|
|
131
|
+
query: {
|
|
132
|
+
page: params?.page,
|
|
133
|
+
pageSize: params?.pageSize,
|
|
134
|
+
q: params?.q,
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
async function createAIWhitelistEmail(payload, options) {
|
|
139
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
140
|
+
return client.json('/api/v1/infrastructure/ai/whitelist/emails', {
|
|
141
|
+
body: JSON.stringify(payload),
|
|
142
|
+
cache: 'no-store',
|
|
143
|
+
headers: {
|
|
144
|
+
'Content-Type': 'application/json',
|
|
145
|
+
},
|
|
146
|
+
method: 'POST',
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
async function updateAIWhitelistEmail(email, payload, options) {
|
|
150
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
151
|
+
return client.json(`/api/v1/infrastructure/ai/whitelist/${(0, client_1.encodePathSegment)(email)}`, {
|
|
152
|
+
body: JSON.stringify(payload),
|
|
153
|
+
cache: 'no-store',
|
|
154
|
+
headers: {
|
|
155
|
+
'Content-Type': 'application/json',
|
|
156
|
+
},
|
|
157
|
+
method: 'PUT',
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
async function deleteAIWhitelistEmail(email, options) {
|
|
161
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
162
|
+
return client.json(`/api/v1/infrastructure/ai/whitelist/${(0, client_1.encodePathSegment)(email)}`, {
|
|
163
|
+
cache: 'no-store',
|
|
164
|
+
method: 'DELETE',
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
async function listAiAgents(options) {
|
|
168
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
169
|
+
return client.json('/api/v1/infrastructure/ai-agents', {
|
|
170
|
+
cache: 'no-store',
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
async function saveAiAgent(payload, options) {
|
|
174
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
175
|
+
return client.json('/api/v1/infrastructure/ai-agents', {
|
|
176
|
+
body: JSON.stringify(payload),
|
|
177
|
+
cache: 'no-store',
|
|
178
|
+
headers: {
|
|
179
|
+
'Content-Type': 'application/json',
|
|
180
|
+
},
|
|
181
|
+
method: 'POST',
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
async function createChatIntegration(payload, options) {
|
|
185
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
186
|
+
return client.json('/api/v1/infrastructure/ai-agents/chat-integrations', {
|
|
187
|
+
body: JSON.stringify(payload),
|
|
188
|
+
cache: 'no-store',
|
|
189
|
+
headers: {
|
|
190
|
+
'Content-Type': 'application/json',
|
|
191
|
+
},
|
|
192
|
+
method: 'POST',
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
async function deployAiAgentChannel(agentId, channelId, options) {
|
|
196
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
197
|
+
return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/deploy`, {
|
|
198
|
+
body: JSON.stringify({ channelId }),
|
|
199
|
+
cache: 'no-store',
|
|
200
|
+
headers: {
|
|
201
|
+
'Content-Type': 'application/json',
|
|
202
|
+
},
|
|
203
|
+
method: 'POST',
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
async function pauseAiAgentChannel(agentId, channelId, options) {
|
|
207
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
208
|
+
return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/pause`, {
|
|
209
|
+
body: JSON.stringify({ channelId }),
|
|
210
|
+
cache: 'no-store',
|
|
211
|
+
headers: {
|
|
212
|
+
'Content-Type': 'application/json',
|
|
213
|
+
},
|
|
214
|
+
method: 'POST',
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
async function testAiAgentChannel(agentId, channelId, prompt, options) {
|
|
218
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
219
|
+
return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/test`, {
|
|
220
|
+
body: JSON.stringify({ channelId, prompt }),
|
|
221
|
+
cache: 'no-store',
|
|
222
|
+
headers: {
|
|
223
|
+
'Content-Type': 'application/json',
|
|
224
|
+
},
|
|
225
|
+
method: 'POST',
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
async function rotateAiAgentChannelSecret(agentId, channelId, name, value, options) {
|
|
229
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
230
|
+
return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/channels/${(0, client_1.encodePathSegment)(channelId)}/secrets`, {
|
|
231
|
+
body: JSON.stringify({ name, value }),
|
|
232
|
+
cache: 'no-store',
|
|
233
|
+
headers: {
|
|
234
|
+
'Content-Type': 'application/json',
|
|
235
|
+
},
|
|
236
|
+
method: 'POST',
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
async function getAiAgentZaloPersonalStatus(agentId, channelId, options) {
|
|
240
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
241
|
+
return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/channels/${(0, client_1.encodePathSegment)(channelId)}/zalo-personal`, {
|
|
242
|
+
cache: 'no-store',
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
async function runAiAgentZaloPersonalAction(agentId, channelId, action, options) {
|
|
246
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
247
|
+
return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/channels/${(0, client_1.encodePathSegment)(channelId)}/zalo-personal`, {
|
|
248
|
+
body: JSON.stringify({ action }),
|
|
249
|
+
cache: 'no-store',
|
|
250
|
+
headers: {
|
|
251
|
+
'Content-Type': 'application/json',
|
|
252
|
+
},
|
|
253
|
+
method: 'POST',
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
async function startAiAgentZaloPersonalQrLogin(agentId, channelId, options) {
|
|
257
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
258
|
+
return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/channels/${(0, client_1.encodePathSegment)(channelId)}/zalo-personal/qr-login`, {
|
|
259
|
+
cache: 'no-store',
|
|
260
|
+
method: 'POST',
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
async function getAiAgentZaloPersonalQrLoginStatus(agentId, channelId, sessionId, options) {
|
|
264
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
265
|
+
return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/channels/${(0, client_1.encodePathSegment)(channelId)}/zalo-personal/qr-login?sessionId=${encodeURIComponent(sessionId)}`, {
|
|
266
|
+
cache: 'no-store',
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
async function abortAiAgentZaloPersonalQrLogin(agentId, channelId, sessionId, options) {
|
|
270
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
271
|
+
return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/channels/${(0, client_1.encodePathSegment)(channelId)}/zalo-personal/qr-login?sessionId=${encodeURIComponent(sessionId)}`, {
|
|
272
|
+
cache: 'no-store',
|
|
273
|
+
method: 'DELETE',
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
async function saveAiAgentIdentityLink(payload, options) {
|
|
277
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
278
|
+
return client.json('/api/v1/infrastructure/ai-agents/identities', {
|
|
279
|
+
body: JSON.stringify(payload),
|
|
280
|
+
cache: 'no-store',
|
|
281
|
+
headers: {
|
|
282
|
+
'Content-Type': 'application/json',
|
|
283
|
+
},
|
|
284
|
+
method: 'POST',
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
async function listAiAgentExternalThreads(params, options) {
|
|
288
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
289
|
+
return client.json('/api/v1/infrastructure/ai-agents/external-threads', {
|
|
290
|
+
cache: 'no-store',
|
|
291
|
+
query: {
|
|
292
|
+
agentId: params?.agentId ?? undefined,
|
|
293
|
+
channelId: params?.channelId ?? undefined,
|
|
294
|
+
wsId: params?.wsId ?? undefined,
|
|
295
|
+
},
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
async function listAiAgentExternalMessages(threadId, params, options) {
|
|
299
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
300
|
+
return client.json(`/api/v1/infrastructure/ai-agents/external-threads/${(0, client_1.encodePathSegment)(threadId)}/messages`, {
|
|
301
|
+
cache: 'no-store',
|
|
302
|
+
query: {
|
|
303
|
+
limit: params?.limit,
|
|
304
|
+
},
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
async function syncAiAgentExternalThread(threadId, options) {
|
|
308
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
309
|
+
return client.json(`/api/v1/infrastructure/ai-agents/external-threads/${(0, client_1.encodePathSegment)(threadId)}/sync`, {
|
|
310
|
+
cache: 'no-store',
|
|
311
|
+
method: 'POST',
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
async function draftAiAgentExternalResponse(threadId, prompt, options) {
|
|
315
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
316
|
+
return client.json(`/api/v1/infrastructure/ai-agents/external-threads/${(0, client_1.encodePathSegment)(threadId)}/draft`, {
|
|
317
|
+
body: JSON.stringify({ prompt }),
|
|
318
|
+
cache: 'no-store',
|
|
319
|
+
headers: { 'Content-Type': 'application/json' },
|
|
320
|
+
method: 'POST',
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
async function sendAiAgentExternalResponse(threadId, content, options) {
|
|
324
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
325
|
+
return client.json(`/api/v1/infrastructure/ai-agents/external-threads/${(0, client_1.encodePathSegment)(threadId)}/send`, {
|
|
326
|
+
body: JSON.stringify({ content }),
|
|
327
|
+
cache: 'no-store',
|
|
328
|
+
headers: { 'Content-Type': 'application/json' },
|
|
329
|
+
method: 'POST',
|
|
330
|
+
});
|
|
331
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type InternalApiClientOptions } from '../client';
|
|
2
|
+
import type { AppCoordinationSessionPolicy, AppCoordinationSessionPolicyResponse, ExternalAppsResponse, SaveExternalAppPayload, SaveExternalAppResponse } from './types';
|
|
3
|
+
export declare function listExternalApps(options?: InternalApiClientOptions): Promise<ExternalAppsResponse>;
|
|
4
|
+
export declare function saveExternalApp(payload: SaveExternalAppPayload, options?: InternalApiClientOptions): Promise<SaveExternalAppResponse>;
|
|
5
|
+
export declare function rotateExternalAppSecret(appId: string, options?: InternalApiClientOptions): Promise<SaveExternalAppResponse>;
|
|
6
|
+
export declare function getAppCoordinationSessionPolicy(options?: InternalApiClientOptions): Promise<AppCoordinationSessionPolicyResponse>;
|
|
7
|
+
export declare function saveAppCoordinationSessionPolicy(payload: AppCoordinationSessionPolicy, options?: InternalApiClientOptions): Promise<AppCoordinationSessionPolicyResponse>;
|
|
8
|
+
export type * from './types';
|
|
9
|
+
//# sourceMappingURL=apps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/infrastructure/apps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAChF,OAAO,KAAK,EACV,4BAA4B,EAC5B,oCAAoC,EACpC,oBAAoB,EACpB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAEjB,wBAAsB,gBAAgB,CAAC,OAAO,CAAC,EAAE,wBAAwB,iCAQxE;AAED,wBAAsB,eAAe,CACnC,OAAO,EAAE,sBAAsB,EAC/B,OAAO,CAAC,EAAE,wBAAwB,oCAcnC;AAED,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,wBAAwB,oCAUnC;AAED,wBAAsB,+BAA+B,CACnD,OAAO,CAAC,EAAE,wBAAwB,iDASnC;AAED,wBAAsB,gCAAgC,CACpD,OAAO,EAAE,4BAA4B,EACrC,OAAO,CAAC,EAAE,wBAAwB,iDAcnC;AAED,mBAAmB,SAAS,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listExternalApps = listExternalApps;
|
|
4
|
+
exports.saveExternalApp = saveExternalApp;
|
|
5
|
+
exports.rotateExternalAppSecret = rotateExternalAppSecret;
|
|
6
|
+
exports.getAppCoordinationSessionPolicy = getAppCoordinationSessionPolicy;
|
|
7
|
+
exports.saveAppCoordinationSessionPolicy = saveAppCoordinationSessionPolicy;
|
|
8
|
+
const client_1 = require("../client");
|
|
9
|
+
async function listExternalApps(options) {
|
|
10
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
11
|
+
return client.json('/api/v1/infrastructure/external-apps', {
|
|
12
|
+
cache: 'no-store',
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
async function saveExternalApp(payload, options) {
|
|
16
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
17
|
+
return client.json('/api/v1/infrastructure/external-apps', {
|
|
18
|
+
body: JSON.stringify(payload),
|
|
19
|
+
cache: 'no-store',
|
|
20
|
+
headers: {
|
|
21
|
+
'Content-Type': 'application/json',
|
|
22
|
+
},
|
|
23
|
+
method: 'POST',
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
async function rotateExternalAppSecret(appId, options) {
|
|
27
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
28
|
+
return client.json(`/api/v1/infrastructure/external-apps/${encodeURIComponent(appId)}/secrets`, {
|
|
29
|
+
cache: 'no-store',
|
|
30
|
+
method: 'POST',
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
async function getAppCoordinationSessionPolicy(options) {
|
|
34
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
35
|
+
return client.json('/api/v1/infrastructure/app-coordination', {
|
|
36
|
+
cache: 'no-store',
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
async function saveAppCoordinationSessionPolicy(payload, options) {
|
|
40
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
41
|
+
return client.json('/api/v1/infrastructure/app-coordination', {
|
|
42
|
+
body: JSON.stringify(payload),
|
|
43
|
+
cache: 'no-store',
|
|
44
|
+
headers: {
|
|
45
|
+
'Content-Type': 'application/json',
|
|
46
|
+
},
|
|
47
|
+
method: 'PUT',
|
|
48
|
+
});
|
|
49
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type InternalApiClientOptions } from '../client';
|
|
2
|
+
export type BlockedIpReason = 'api_abuse' | 'api_auth_failed' | 'api_rate_limited' | 'manual' | 'mfa_challenge' | 'mfa_verify_failed' | 'otp_limit_reset' | 'otp_send' | 'otp_verify_failed' | 'password_login_failed' | 'reauth_send' | 'reauth_verify_failed';
|
|
3
|
+
export type BlockedIpBlockReason = 'manual' | 'mfa_challenge' | 'mfa_verify_failed' | 'otp_send' | 'otp_verify_failed' | 'password_login_failed' | 'reauth_send' | 'reauth_verify_failed';
|
|
4
|
+
export type BlockedIpBlockLevel = 0 | 1 | 2 | 3 | 4;
|
|
5
|
+
export type BlockedIpStatus = 'active' | 'expired' | 'manually_unblocked';
|
|
6
|
+
export type BlockedIpMetadataValue = BlockedIpMetadataValue[] | boolean | null | number | string | {
|
|
7
|
+
[key: string]: BlockedIpMetadataValue;
|
|
8
|
+
};
|
|
9
|
+
export interface BlockedIpUser {
|
|
10
|
+
display_name: string | null;
|
|
11
|
+
id: string;
|
|
12
|
+
}
|
|
13
|
+
export interface BlockedIpEntry {
|
|
14
|
+
block_level: number;
|
|
15
|
+
blocked_at: string;
|
|
16
|
+
created_at: string;
|
|
17
|
+
expires_at: string;
|
|
18
|
+
id: string;
|
|
19
|
+
ip_address: string;
|
|
20
|
+
metadata: {
|
|
21
|
+
[key: string]: BlockedIpMetadataValue;
|
|
22
|
+
} | null;
|
|
23
|
+
reason: BlockedIpReason;
|
|
24
|
+
status: BlockedIpStatus;
|
|
25
|
+
unblock_reason: string | null;
|
|
26
|
+
unblocked_at: string | null;
|
|
27
|
+
unblocked_by: string | null;
|
|
28
|
+
unblocked_by_user: BlockedIpUser | null;
|
|
29
|
+
updated_at: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ListBlockedIpsParams {
|
|
32
|
+
ip?: string;
|
|
33
|
+
page?: number;
|
|
34
|
+
pageSize?: number;
|
|
35
|
+
q?: string;
|
|
36
|
+
status?: BlockedIpStatus | 'all' | '';
|
|
37
|
+
}
|
|
38
|
+
export interface ListBlockedIpsResponse {
|
|
39
|
+
count: number;
|
|
40
|
+
data: BlockedIpEntry[];
|
|
41
|
+
page: number;
|
|
42
|
+
pageSize: number;
|
|
43
|
+
totalPages: number;
|
|
44
|
+
}
|
|
45
|
+
export interface BlockBlockedIpPayload {
|
|
46
|
+
blockLevel?: BlockedIpBlockLevel;
|
|
47
|
+
ipAddress: string;
|
|
48
|
+
notes?: string;
|
|
49
|
+
reason: BlockedIpBlockReason;
|
|
50
|
+
}
|
|
51
|
+
export interface BlockBlockedIpResponse {
|
|
52
|
+
data: BlockedIpEntry;
|
|
53
|
+
message: string;
|
|
54
|
+
}
|
|
55
|
+
export interface UnblockBlockedIpPayload {
|
|
56
|
+
ipAddress: string;
|
|
57
|
+
reason?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface UnblockBlockedIpResponse {
|
|
60
|
+
message: string;
|
|
61
|
+
}
|
|
62
|
+
export declare function listBlockedIps(params?: ListBlockedIpsParams, options?: InternalApiClientOptions): Promise<ListBlockedIpsResponse>;
|
|
63
|
+
export declare function blockBlockedIp(payload: BlockBlockedIpPayload, options?: InternalApiClientOptions): Promise<BlockBlockedIpResponse>;
|
|
64
|
+
export declare function unblockBlockedIp(payload: UnblockBlockedIpPayload, options?: InternalApiClientOptions): Promise<UnblockBlockedIpResponse>;
|
|
65
|
+
//# sourceMappingURL=blocked-ips.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blocked-ips.d.ts","sourceRoot":"","sources":["../../src/infrastructure/blocked-ips.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAEhF,MAAM,MAAM,eAAe,GACvB,WAAW,GACX,iBAAiB,GACjB,kBAAkB,GAClB,QAAQ,GACR,eAAe,GACf,mBAAmB,GACnB,iBAAiB,GACjB,UAAU,GACV,mBAAmB,GACnB,uBAAuB,GACvB,aAAa,GACb,sBAAsB,CAAC;AAE3B,MAAM,MAAM,oBAAoB,GAC5B,QAAQ,GACR,eAAe,GACf,mBAAmB,GACnB,UAAU,GACV,mBAAmB,GACnB,uBAAuB,GACvB,aAAa,GACb,sBAAsB,CAAC;AAE3B,MAAM,MAAM,mBAAmB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;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;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;CACjB;AAaD,wBAAsB,cAAc,CAClC,MAAM,GAAE,oBAAyB,EACjC,OAAO,CAAC,EAAE,wBAAwB,mCAgBnC;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,qBAAqB,EAC9B,OAAO,CAAC,EAAE,wBAAwB,mCAoBnC;AAED,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,uBAAuB,EAChC,OAAO,CAAC,EAAE,wBAAwB,qCAkBnC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listBlockedIps = listBlockedIps;
|
|
4
|
+
exports.blockBlockedIp = blockBlockedIp;
|
|
5
|
+
exports.unblockBlockedIp = unblockBlockedIp;
|
|
6
|
+
const client_1 = require("../client");
|
|
7
|
+
function normalizeBlockedIpStatus(status) {
|
|
8
|
+
return status ? status : 'all';
|
|
9
|
+
}
|
|
10
|
+
function normalizeBlockedIpFilter(params) {
|
|
11
|
+
const filter = params.ip ?? params.q;
|
|
12
|
+
const normalizedFilter = filter?.trim();
|
|
13
|
+
return normalizedFilter ? normalizedFilter : undefined;
|
|
14
|
+
}
|
|
15
|
+
async function listBlockedIps(params = {}, options) {
|
|
16
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
17
|
+
return client.json('/api/v1/infrastructure/blocked-ips', {
|
|
18
|
+
cache: 'no-store',
|
|
19
|
+
query: {
|
|
20
|
+
ip: normalizeBlockedIpFilter(params),
|
|
21
|
+
page: params.page,
|
|
22
|
+
pageSize: params.pageSize,
|
|
23
|
+
status: normalizeBlockedIpStatus(params.status),
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
async function blockBlockedIp(payload, options) {
|
|
28
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
29
|
+
return client.json('/api/v1/infrastructure/blocked-ips', {
|
|
30
|
+
body: JSON.stringify({
|
|
31
|
+
block_level: payload.blockLevel,
|
|
32
|
+
ip_address: payload.ipAddress,
|
|
33
|
+
notes: payload.notes,
|
|
34
|
+
reason: payload.reason,
|
|
35
|
+
}),
|
|
36
|
+
cache: 'no-store',
|
|
37
|
+
headers: {
|
|
38
|
+
'Content-Type': 'application/json',
|
|
39
|
+
},
|
|
40
|
+
method: 'POST',
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
async function unblockBlockedIp(payload, options) {
|
|
44
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
45
|
+
return client.json('/api/v1/infrastructure/blocked-ips', {
|
|
46
|
+
body: JSON.stringify({
|
|
47
|
+
ip_address: payload.ipAddress,
|
|
48
|
+
reason: payload.reason,
|
|
49
|
+
}),
|
|
50
|
+
cache: 'no-store',
|
|
51
|
+
headers: {
|
|
52
|
+
'Content-Type': 'application/json',
|
|
53
|
+
},
|
|
54
|
+
method: 'DELETE',
|
|
55
|
+
});
|
|
56
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type InternalApiClientOptions } from '../client';
|
|
2
|
+
import type { EnableGitHubBotWatcherAutoPickupResponse, GitHubBotState, IssueGitHubBotWatcherClientPayload, IssueGitHubBotWatcherClientResponse, SaveGitHubBotConfigurationPayload, TestGitHubBotConfigurationResponse } from './types';
|
|
3
|
+
export declare function getGitHubBotState(options?: InternalApiClientOptions): Promise<GitHubBotState>;
|
|
4
|
+
export declare function saveGitHubBotConfiguration(payload: SaveGitHubBotConfigurationPayload, options?: InternalApiClientOptions): Promise<GitHubBotState>;
|
|
5
|
+
export declare function testGitHubBotConfiguration(options?: InternalApiClientOptions): Promise<TestGitHubBotConfigurationResponse>;
|
|
6
|
+
export declare function issueGitHubBotWatcherClient(payload: IssueGitHubBotWatcherClientPayload, options?: InternalApiClientOptions): Promise<IssueGitHubBotWatcherClientResponse>;
|
|
7
|
+
export declare function enableGitHubBotWatcherAutoPickup(options?: InternalApiClientOptions): Promise<EnableGitHubBotWatcherAutoPickupResponse>;
|
|
8
|
+
export declare function revokeGitHubBotWatcherClient(clientId: string, options?: InternalApiClientOptions): Promise<GitHubBotState>;
|
|
9
|
+
export type * from './types';
|
|
10
|
+
//# sourceMappingURL=github-bot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-bot.d.ts","sourceRoot":"","sources":["../../src/infrastructure/github-bot.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EACV,wCAAwC,EACxC,cAAc,EACd,kCAAkC,EAClC,mCAAmC,EACnC,iCAAiC,EACjC,kCAAkC,EACnC,MAAM,SAAS,CAAC;AAUjB,wBAAsB,iBAAiB,CAAC,OAAO,CAAC,EAAE,wBAAwB,2BAKzE;AAED,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,iCAAiC,EAC1C,OAAO,CAAC,EAAE,wBAAwB,2BAWnC;AAED,wBAAsB,0BAA0B,CAC9C,OAAO,CAAC,EAAE,wBAAwB,+CAcnC;AAED,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,kCAAkC,EAC3C,OAAO,CAAC,EAAE,wBAAwB,gDAcnC;AAED,wBAAsB,gCAAgC,CACpD,OAAO,CAAC,EAAE,wBAAwB,qDAcnC;AAED,wBAAsB,4BAA4B,CAChD,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,wBAAwB,2BAWnC;AAED,mBAAmB,SAAS,CAAC"}
|