@tuturuuu/internal-api 0.0.2 → 0.1.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/ai-memory.d.ts +76 -0
- package/dist/ai-memory.d.ts.map +1 -0
- package/dist/ai-memory.js +59 -0
- package/dist/ai.d.ts +67 -3
- package/dist/ai.d.ts.map +1 -1
- package/dist/ai.js +121 -0
- package/dist/auth.d.ts +121 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +111 -0
- package/dist/calendar.d.ts +17 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +9 -0
- package/dist/chat-conversations.d.ts +81 -0
- package/dist/chat-conversations.d.ts.map +1 -0
- package/dist/chat-conversations.js +384 -0
- package/dist/chat-internal.d.ts +11 -0
- package/dist/chat-internal.d.ts.map +1 -0
- package/dist/chat-internal.js +39 -0
- package/dist/chat-legacy.d.ts +23 -0
- package/dist/chat-legacy.d.ts.map +1 -0
- package/dist/chat-legacy.js +68 -0
- package/dist/chat-types.d.ts +262 -0
- package/dist/chat-types.d.ts.map +1 -0
- package/dist/chat-types.js +2 -0
- package/dist/chat.d.ts +3 -45
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +17 -65
- package/dist/client.d.ts +5 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +50 -5
- package/dist/education.d.ts +288 -2
- package/dist/education.d.ts.map +1 -1
- package/dist/education.js +176 -0
- package/dist/external-project-team.d.ts +51 -0
- package/dist/external-project-team.d.ts.map +1 -0
- package/dist/external-project-team.js +137 -0
- package/dist/external-projects.d.ts +98 -10
- package/dist/external-projects.d.ts.map +1 -1
- package/dist/external-projects.js +92 -33
- package/dist/finance.d.ts +491 -3
- package/dist/finance.d.ts.map +1 -1
- package/dist/finance.js +611 -1
- package/dist/hive.d.ts +739 -0
- package/dist/hive.d.ts.map +1 -0
- package/dist/hive.js +333 -0
- package/dist/index.d.ts +31 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +350 -8
- package/dist/infrastructure.d.ts +955 -1
- package/dist/infrastructure.d.ts.map +1 -1
- package/dist/infrastructure.js +595 -0
- package/dist/inventory.d.ts +355 -0
- package/dist/inventory.d.ts.map +1 -0
- package/dist/inventory.js +268 -0
- package/dist/mail.d.ts +125 -0
- package/dist/mail.d.ts.map +1 -1
- package/dist/mail.js +112 -1
- package/dist/meet.d.ts +54 -0
- package/dist/meet.d.ts.map +1 -0
- package/dist/meet.js +37 -0
- package/dist/mind.d.ts +55 -0
- package/dist/mind.d.ts.map +1 -0
- package/dist/mind.js +84 -0
- package/dist/posts.d.ts +33 -0
- package/dist/posts.d.ts.map +1 -1
- package/dist/posts.js +42 -0
- package/dist/promotions.d.ts +54 -0
- package/dist/promotions.d.ts.map +1 -1
- package/dist/promotions.js +52 -0
- package/dist/settings.d.ts +28 -1
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +68 -0
- package/dist/storage.d.ts +32 -21
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +52 -32
- package/dist/tasks.d.ts +222 -4
- package/dist/tasks.d.ts.map +1 -1
- package/dist/tasks.js +202 -0
- package/dist/teach.d.ts +130 -0
- package/dist/teach.d.ts.map +1 -0
- package/dist/teach.js +110 -0
- package/dist/topic-announcements.d.ts +235 -0
- package/dist/topic-announcements.d.ts.map +1 -0
- package/dist/topic-announcements.js +182 -0
- package/dist/tulearn.d.ts +223 -0
- package/dist/tulearn.d.ts.map +1 -0
- package/dist/tulearn.js +97 -0
- package/dist/tutoring.d.ts +152 -0
- package/dist/tutoring.d.ts.map +1 -0
- package/dist/tutoring.js +58 -0
- package/dist/user-group-activity.d.ts +54 -0
- package/dist/user-group-activity.d.ts.map +1 -0
- package/dist/user-group-activity.js +11 -0
- package/dist/user-groups.d.ts +35 -0
- package/dist/user-groups.d.ts.map +1 -0
- package/dist/user-groups.js +84 -0
- package/dist/users.d.ts +83 -1
- package/dist/users.d.ts.map +1 -1
- package/dist/users.js +137 -0
- package/dist/workspace-configs.d.ts +2 -0
- package/dist/workspace-configs.d.ts.map +1 -1
- package/dist/workspace-configs.js +3 -1
- package/dist/workspace-user-audit.d.ts +1 -0
- package/dist/workspace-user-audit.d.ts.map +1 -1
- package/dist/workspaces.d.ts +57 -0
- package/dist/workspaces.d.ts.map +1 -1
- package/dist/workspaces.js +58 -1
- package/package.json +59 -6
package/dist/infrastructure.js
CHANGED
|
@@ -2,13 +2,75 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sendInfrastructurePushTest = sendInfrastructurePushTest;
|
|
4
4
|
exports.updateMobileVersionPolicies = updateMobileVersionPolicies;
|
|
5
|
+
exports.listAiGatewayModels = listAiGatewayModels;
|
|
6
|
+
exports.listAiGatewayModelsPage = listAiGatewayModelsPage;
|
|
7
|
+
exports.listAiGatewayModelsLegacy = listAiGatewayModelsLegacy;
|
|
8
|
+
exports.resolveInfrastructureWorkspaceId = resolveInfrastructureWorkspaceId;
|
|
9
|
+
exports.listAIWhitelistDomains = listAIWhitelistDomains;
|
|
10
|
+
exports.createAIWhitelistDomain = createAIWhitelistDomain;
|
|
11
|
+
exports.updateAIWhitelistDomain = updateAIWhitelistDomain;
|
|
12
|
+
exports.deleteAIWhitelistDomain = deleteAIWhitelistDomain;
|
|
13
|
+
exports.listAIWhitelistEmails = listAIWhitelistEmails;
|
|
14
|
+
exports.createAIWhitelistEmail = createAIWhitelistEmail;
|
|
15
|
+
exports.updateAIWhitelistEmail = updateAIWhitelistEmail;
|
|
16
|
+
exports.deleteAIWhitelistEmail = deleteAIWhitelistEmail;
|
|
17
|
+
exports.listExternalApps = listExternalApps;
|
|
18
|
+
exports.saveExternalApp = saveExternalApp;
|
|
19
|
+
exports.rotateExternalAppSecret = rotateExternalAppSecret;
|
|
20
|
+
exports.listAiAgents = listAiAgents;
|
|
21
|
+
exports.saveAiAgent = saveAiAgent;
|
|
22
|
+
exports.deployAiAgentChannel = deployAiAgentChannel;
|
|
23
|
+
exports.pauseAiAgentChannel = pauseAiAgentChannel;
|
|
24
|
+
exports.testAiAgentChannel = testAiAgentChannel;
|
|
25
|
+
exports.rotateAiAgentChannelSecret = rotateAiAgentChannelSecret;
|
|
26
|
+
exports.saveAiAgentIdentityLink = saveAiAgentIdentityLink;
|
|
27
|
+
exports.listAiAgentExternalThreads = listAiAgentExternalThreads;
|
|
28
|
+
exports.listAiAgentExternalMessages = listAiAgentExternalMessages;
|
|
29
|
+
exports.syncAiAgentExternalThread = syncAiAgentExternalThread;
|
|
30
|
+
exports.draftAiAgentExternalResponse = draftAiAgentExternalResponse;
|
|
31
|
+
exports.sendAiAgentExternalResponse = sendAiAgentExternalResponse;
|
|
32
|
+
exports.getAppCoordinationSessionPolicy = getAppCoordinationSessionPolicy;
|
|
33
|
+
exports.saveAppCoordinationSessionPolicy = saveAppCoordinationSessionPolicy;
|
|
34
|
+
exports.getAbuseIntelligenceSnapshot = getAbuseIntelligenceSnapshot;
|
|
35
|
+
exports.createAbuseTrustOverride = createAbuseTrustOverride;
|
|
36
|
+
exports.revokeAbuseTrustOverride = revokeAbuseTrustOverride;
|
|
5
37
|
exports.getBlueGreenMonitoringSnapshot = getBlueGreenMonitoringSnapshot;
|
|
6
38
|
exports.getBlueGreenMonitoringRequestArchive = getBlueGreenMonitoringRequestArchive;
|
|
7
39
|
exports.getBlueGreenMonitoringWatcherLogArchive = getBlueGreenMonitoringWatcherLogArchive;
|
|
40
|
+
exports.getCronMonitoringSnapshot = getCronMonitoringSnapshot;
|
|
41
|
+
exports.getCronMonitoringExecutionArchive = getCronMonitoringExecutionArchive;
|
|
42
|
+
exports.queueCronRun = queueCronRun;
|
|
43
|
+
exports.updateCronMonitoringControl = updateCronMonitoringControl;
|
|
44
|
+
exports.getObservabilityOverview = getObservabilityOverview;
|
|
45
|
+
exports.getObservabilityDeployments = getObservabilityDeployments;
|
|
46
|
+
exports.getObservabilityLogs = getObservabilityLogs;
|
|
47
|
+
exports.getObservabilityRequests = getObservabilityRequests;
|
|
48
|
+
exports.getObservabilityAnalytics = getObservabilityAnalytics;
|
|
49
|
+
exports.getObservabilityCronRuns = getObservabilityCronRuns;
|
|
50
|
+
exports.getObservabilityResources = getObservabilityResources;
|
|
51
|
+
exports.getInfrastructureProjects = getInfrastructureProjects;
|
|
52
|
+
exports.createInfrastructureProject = createInfrastructureProject;
|
|
53
|
+
exports.updateInfrastructureProject = updateInfrastructureProject;
|
|
54
|
+
exports.deleteInfrastructureProject = deleteInfrastructureProject;
|
|
55
|
+
exports.syncInfrastructureProject = syncInfrastructureProject;
|
|
56
|
+
exports.queueInfrastructureProjectDeploy = queueInfrastructureProjectDeploy;
|
|
8
57
|
exports.requestBlueGreenInstantRollout = requestBlueGreenInstantRollout;
|
|
58
|
+
exports.requestBlueGreenWatcherRecovery = requestBlueGreenWatcherRecovery;
|
|
59
|
+
exports.updateBlueGreenDockerRecoverySettings = updateBlueGreenDockerRecoverySettings;
|
|
9
60
|
exports.pinBlueGreenDeployment = pinBlueGreenDeployment;
|
|
10
61
|
exports.clearBlueGreenDeploymentPin = clearBlueGreenDeploymentPin;
|
|
11
62
|
const client_1 = require("./client");
|
|
63
|
+
function mapGatewayModel(model) {
|
|
64
|
+
return {
|
|
65
|
+
context: model.context_window ?? undefined,
|
|
66
|
+
description: model.description ?? undefined,
|
|
67
|
+
disabled: !model.is_enabled,
|
|
68
|
+
label: model.name,
|
|
69
|
+
provider: model.provider,
|
|
70
|
+
tags: model.tags ?? undefined,
|
|
71
|
+
value: model.id,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
12
74
|
async function sendInfrastructurePushTest(payload, options) {
|
|
13
75
|
const client = (0, client_1.getInternalApiClient)(options);
|
|
14
76
|
return client.json('/api/v1/infrastructure/push-notifications/test', {
|
|
@@ -31,6 +93,331 @@ async function updateMobileVersionPolicies(payload, options) {
|
|
|
31
93
|
method: 'PUT',
|
|
32
94
|
});
|
|
33
95
|
}
|
|
96
|
+
async function listAiGatewayModels(params, options) {
|
|
97
|
+
return listAiGatewayModelsLegacy(params, options);
|
|
98
|
+
}
|
|
99
|
+
async function listAiGatewayModelsPage(params, options) {
|
|
100
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
101
|
+
const response = await client.json('/api/v1/infrastructure/ai/models', {
|
|
102
|
+
cache: 'no-store',
|
|
103
|
+
query: {
|
|
104
|
+
enabled: typeof params?.enabled === 'boolean'
|
|
105
|
+
? String(params.enabled)
|
|
106
|
+
: undefined,
|
|
107
|
+
format: 'paginated',
|
|
108
|
+
ids: params?.ids?.join(','),
|
|
109
|
+
limit: params?.limit,
|
|
110
|
+
page: params?.page,
|
|
111
|
+
provider: params?.provider,
|
|
112
|
+
q: params?.q,
|
|
113
|
+
tag: params?.tag,
|
|
114
|
+
type: params?.type ?? 'language',
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
return {
|
|
118
|
+
data: response.data.map((row) => mapGatewayModel(row)),
|
|
119
|
+
pagination: response.pagination,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
async function listAiGatewayModelsLegacy(params, options) {
|
|
123
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
124
|
+
const rows = await client.json('/api/v1/infrastructure/ai/models', {
|
|
125
|
+
cache: 'no-store',
|
|
126
|
+
query: {
|
|
127
|
+
enabled: typeof params?.enabled === 'boolean'
|
|
128
|
+
? String(params.enabled)
|
|
129
|
+
: undefined,
|
|
130
|
+
ids: params?.ids?.join(','),
|
|
131
|
+
provider: params?.provider,
|
|
132
|
+
q: params?.q,
|
|
133
|
+
tag: params?.tag,
|
|
134
|
+
type: params?.type ?? 'language',
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
return rows.map((row) => mapGatewayModel(row));
|
|
138
|
+
}
|
|
139
|
+
async function resolveInfrastructureWorkspaceId(wsId, options) {
|
|
140
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
141
|
+
return client.json('/api/v1/infrastructure/resolve-workspace-id', {
|
|
142
|
+
body: JSON.stringify({ wsId }),
|
|
143
|
+
cache: 'no-store',
|
|
144
|
+
headers: {
|
|
145
|
+
'Content-Type': 'application/json',
|
|
146
|
+
},
|
|
147
|
+
method: 'POST',
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
async function listAIWhitelistDomains(params, options) {
|
|
151
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
152
|
+
return client.json('/api/v1/infrastructure/ai/whitelist/domains', {
|
|
153
|
+
cache: 'no-store',
|
|
154
|
+
query: {
|
|
155
|
+
page: params?.page,
|
|
156
|
+
pageSize: params?.pageSize,
|
|
157
|
+
q: params?.q,
|
|
158
|
+
},
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
async function createAIWhitelistDomain(payload, options) {
|
|
162
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
163
|
+
return client.json('/api/v1/infrastructure/ai/whitelist/domains', {
|
|
164
|
+
body: JSON.stringify(payload),
|
|
165
|
+
cache: 'no-store',
|
|
166
|
+
headers: {
|
|
167
|
+
'Content-Type': 'application/json',
|
|
168
|
+
},
|
|
169
|
+
method: 'POST',
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
async function updateAIWhitelistDomain(domain, payload, options) {
|
|
173
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
174
|
+
return client.json(`/api/v1/infrastructure/ai/whitelist/domain/${(0, client_1.encodePathSegment)(domain)}`, {
|
|
175
|
+
body: JSON.stringify(payload),
|
|
176
|
+
cache: 'no-store',
|
|
177
|
+
headers: {
|
|
178
|
+
'Content-Type': 'application/json',
|
|
179
|
+
},
|
|
180
|
+
method: 'PUT',
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
async function deleteAIWhitelistDomain(domain, options) {
|
|
184
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
185
|
+
return client.json(`/api/v1/infrastructure/ai/whitelist/domain/${(0, client_1.encodePathSegment)(domain)}`, {
|
|
186
|
+
cache: 'no-store',
|
|
187
|
+
method: 'DELETE',
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
async function listAIWhitelistEmails(params, options) {
|
|
191
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
192
|
+
return client.json('/api/v1/infrastructure/ai/whitelist/emails', {
|
|
193
|
+
cache: 'no-store',
|
|
194
|
+
query: {
|
|
195
|
+
page: params?.page,
|
|
196
|
+
pageSize: params?.pageSize,
|
|
197
|
+
q: params?.q,
|
|
198
|
+
},
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
async function createAIWhitelistEmail(payload, options) {
|
|
202
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
203
|
+
return client.json('/api/v1/infrastructure/ai/whitelist/emails', {
|
|
204
|
+
body: JSON.stringify(payload),
|
|
205
|
+
cache: 'no-store',
|
|
206
|
+
headers: {
|
|
207
|
+
'Content-Type': 'application/json',
|
|
208
|
+
},
|
|
209
|
+
method: 'POST',
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
async function updateAIWhitelistEmail(email, payload, options) {
|
|
213
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
214
|
+
return client.json(`/api/v1/infrastructure/ai/whitelist/${(0, client_1.encodePathSegment)(email)}`, {
|
|
215
|
+
body: JSON.stringify(payload),
|
|
216
|
+
cache: 'no-store',
|
|
217
|
+
headers: {
|
|
218
|
+
'Content-Type': 'application/json',
|
|
219
|
+
},
|
|
220
|
+
method: 'PUT',
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
async function deleteAIWhitelistEmail(email, options) {
|
|
224
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
225
|
+
return client.json(`/api/v1/infrastructure/ai/whitelist/${(0, client_1.encodePathSegment)(email)}`, {
|
|
226
|
+
cache: 'no-store',
|
|
227
|
+
method: 'DELETE',
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
async function listExternalApps(options) {
|
|
231
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
232
|
+
return client.json('/api/v1/infrastructure/external-apps', {
|
|
233
|
+
cache: 'no-store',
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
async function saveExternalApp(payload, options) {
|
|
237
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
238
|
+
return client.json('/api/v1/infrastructure/external-apps', {
|
|
239
|
+
body: JSON.stringify(payload),
|
|
240
|
+
cache: 'no-store',
|
|
241
|
+
headers: {
|
|
242
|
+
'Content-Type': 'application/json',
|
|
243
|
+
},
|
|
244
|
+
method: 'POST',
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
async function rotateExternalAppSecret(appId, options) {
|
|
248
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
249
|
+
return client.json(`/api/v1/infrastructure/external-apps/${encodeURIComponent(appId)}/secrets`, {
|
|
250
|
+
cache: 'no-store',
|
|
251
|
+
method: 'POST',
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
async function listAiAgents(options) {
|
|
255
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
256
|
+
return client.json('/api/v1/infrastructure/ai-agents', {
|
|
257
|
+
cache: 'no-store',
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
async function saveAiAgent(payload, options) {
|
|
261
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
262
|
+
return client.json('/api/v1/infrastructure/ai-agents', {
|
|
263
|
+
body: JSON.stringify(payload),
|
|
264
|
+
cache: 'no-store',
|
|
265
|
+
headers: {
|
|
266
|
+
'Content-Type': 'application/json',
|
|
267
|
+
},
|
|
268
|
+
method: 'POST',
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
async function deployAiAgentChannel(agentId, channelId, options) {
|
|
272
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
273
|
+
return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/deploy`, {
|
|
274
|
+
body: JSON.stringify({ channelId }),
|
|
275
|
+
cache: 'no-store',
|
|
276
|
+
headers: {
|
|
277
|
+
'Content-Type': 'application/json',
|
|
278
|
+
},
|
|
279
|
+
method: 'POST',
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
async function pauseAiAgentChannel(agentId, channelId, options) {
|
|
283
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
284
|
+
return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/pause`, {
|
|
285
|
+
body: JSON.stringify({ channelId }),
|
|
286
|
+
cache: 'no-store',
|
|
287
|
+
headers: {
|
|
288
|
+
'Content-Type': 'application/json',
|
|
289
|
+
},
|
|
290
|
+
method: 'POST',
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
async function testAiAgentChannel(agentId, channelId, prompt, options) {
|
|
294
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
295
|
+
return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/test`, {
|
|
296
|
+
body: JSON.stringify({ channelId, prompt }),
|
|
297
|
+
cache: 'no-store',
|
|
298
|
+
headers: {
|
|
299
|
+
'Content-Type': 'application/json',
|
|
300
|
+
},
|
|
301
|
+
method: 'POST',
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
async function rotateAiAgentChannelSecret(agentId, channelId, name, value, options) {
|
|
305
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
306
|
+
return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/channels/${(0, client_1.encodePathSegment)(channelId)}/secrets`, {
|
|
307
|
+
body: JSON.stringify({ name, value }),
|
|
308
|
+
cache: 'no-store',
|
|
309
|
+
headers: {
|
|
310
|
+
'Content-Type': 'application/json',
|
|
311
|
+
},
|
|
312
|
+
method: 'POST',
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
async function saveAiAgentIdentityLink(payload, options) {
|
|
316
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
317
|
+
return client.json('/api/v1/infrastructure/ai-agents/identities', {
|
|
318
|
+
body: JSON.stringify(payload),
|
|
319
|
+
cache: 'no-store',
|
|
320
|
+
headers: {
|
|
321
|
+
'Content-Type': 'application/json',
|
|
322
|
+
},
|
|
323
|
+
method: 'POST',
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
async function listAiAgentExternalThreads(params, options) {
|
|
327
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
328
|
+
return client.json('/api/v1/infrastructure/ai-agents/external-threads', {
|
|
329
|
+
cache: 'no-store',
|
|
330
|
+
query: {
|
|
331
|
+
agentId: params?.agentId ?? undefined,
|
|
332
|
+
channelId: params?.channelId ?? undefined,
|
|
333
|
+
wsId: params?.wsId ?? undefined,
|
|
334
|
+
},
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
async function listAiAgentExternalMessages(threadId, params, options) {
|
|
338
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
339
|
+
return client.json(`/api/v1/infrastructure/ai-agents/external-threads/${(0, client_1.encodePathSegment)(threadId)}/messages`, {
|
|
340
|
+
cache: 'no-store',
|
|
341
|
+
query: {
|
|
342
|
+
limit: params?.limit,
|
|
343
|
+
},
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
async function syncAiAgentExternalThread(threadId, options) {
|
|
347
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
348
|
+
return client.json(`/api/v1/infrastructure/ai-agents/external-threads/${(0, client_1.encodePathSegment)(threadId)}/sync`, {
|
|
349
|
+
cache: 'no-store',
|
|
350
|
+
method: 'POST',
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
async function draftAiAgentExternalResponse(threadId, prompt, options) {
|
|
354
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
355
|
+
return client.json(`/api/v1/infrastructure/ai-agents/external-threads/${(0, client_1.encodePathSegment)(threadId)}/draft`, {
|
|
356
|
+
body: JSON.stringify({ prompt }),
|
|
357
|
+
cache: 'no-store',
|
|
358
|
+
headers: { 'Content-Type': 'application/json' },
|
|
359
|
+
method: 'POST',
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
async function sendAiAgentExternalResponse(threadId, content, options) {
|
|
363
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
364
|
+
return client.json(`/api/v1/infrastructure/ai-agents/external-threads/${(0, client_1.encodePathSegment)(threadId)}/send`, {
|
|
365
|
+
body: JSON.stringify({ content }),
|
|
366
|
+
cache: 'no-store',
|
|
367
|
+
headers: { 'Content-Type': 'application/json' },
|
|
368
|
+
method: 'POST',
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
async function getAppCoordinationSessionPolicy(options) {
|
|
372
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
373
|
+
return client.json('/api/v1/infrastructure/app-coordination', {
|
|
374
|
+
cache: 'no-store',
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
async function saveAppCoordinationSessionPolicy(payload, options) {
|
|
378
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
379
|
+
return client.json('/api/v1/infrastructure/app-coordination', {
|
|
380
|
+
body: JSON.stringify(payload),
|
|
381
|
+
cache: 'no-store',
|
|
382
|
+
headers: {
|
|
383
|
+
'Content-Type': 'application/json',
|
|
384
|
+
},
|
|
385
|
+
method: 'PUT',
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
async function getAbuseIntelligenceSnapshot(params, options) {
|
|
389
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
390
|
+
const searchParams = new URLSearchParams();
|
|
391
|
+
if (params?.limit != null) {
|
|
392
|
+
searchParams.set('limit', String(params.limit));
|
|
393
|
+
}
|
|
394
|
+
if (params?.signalLimit != null) {
|
|
395
|
+
searchParams.set('signalLimit', String(params.signalLimit));
|
|
396
|
+
}
|
|
397
|
+
return client.json(`/api/v1/infrastructure/abuse-intelligence${searchParams.size > 0 ? `?${searchParams.toString()}` : ''}`, { cache: 'no-store' });
|
|
398
|
+
}
|
|
399
|
+
async function createAbuseTrustOverride(payload, options) {
|
|
400
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
401
|
+
return client.json('/api/v1/infrastructure/abuse-intelligence', {
|
|
402
|
+
body: JSON.stringify(payload),
|
|
403
|
+
cache: 'no-store',
|
|
404
|
+
headers: {
|
|
405
|
+
'Content-Type': 'application/json',
|
|
406
|
+
},
|
|
407
|
+
method: 'POST',
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
async function revokeAbuseTrustOverride(overrideId, payload, options) {
|
|
411
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
412
|
+
return client.json(`/api/v1/infrastructure/abuse-intelligence/overrides/${encodeURIComponent(overrideId)}`, {
|
|
413
|
+
body: JSON.stringify(payload),
|
|
414
|
+
cache: 'no-store',
|
|
415
|
+
headers: {
|
|
416
|
+
'Content-Type': 'application/json',
|
|
417
|
+
},
|
|
418
|
+
method: 'PATCH',
|
|
419
|
+
});
|
|
420
|
+
}
|
|
34
421
|
async function getBlueGreenMonitoringSnapshot(params, options) {
|
|
35
422
|
const client = (0, client_1.getInternalApiClient)(options);
|
|
36
423
|
const searchParams = new URLSearchParams();
|
|
@@ -56,6 +443,27 @@ async function getBlueGreenMonitoringRequestArchive(params, options) {
|
|
|
56
443
|
if (params?.timeframeDays != null) {
|
|
57
444
|
searchParams.set('timeframeDays', String(params.timeframeDays));
|
|
58
445
|
}
|
|
446
|
+
if (params?.q) {
|
|
447
|
+
searchParams.set('q', params.q);
|
|
448
|
+
}
|
|
449
|
+
if (params?.status && params.status !== 'all') {
|
|
450
|
+
searchParams.set('status', params.status);
|
|
451
|
+
}
|
|
452
|
+
if (params?.route && params.route !== 'all') {
|
|
453
|
+
searchParams.set('route', params.route);
|
|
454
|
+
}
|
|
455
|
+
if (params?.since != null) {
|
|
456
|
+
searchParams.set('since', String(params.since));
|
|
457
|
+
}
|
|
458
|
+
if (params?.render && params.render !== 'all') {
|
|
459
|
+
searchParams.set('render', params.render);
|
|
460
|
+
}
|
|
461
|
+
if (params?.traffic && params.traffic !== 'all') {
|
|
462
|
+
searchParams.set('traffic', params.traffic);
|
|
463
|
+
}
|
|
464
|
+
if (params?.until != null) {
|
|
465
|
+
searchParams.set('until', String(params.until));
|
|
466
|
+
}
|
|
59
467
|
return client.json(`/api/v1/infrastructure/monitoring/blue-green/requests${searchParams.size > 0 ? `?${searchParams.toString()}` : ''}`, {
|
|
60
468
|
cache: 'no-store',
|
|
61
469
|
});
|
|
@@ -73,6 +481,171 @@ async function getBlueGreenMonitoringWatcherLogArchive(params, options) {
|
|
|
73
481
|
cache: 'no-store',
|
|
74
482
|
});
|
|
75
483
|
}
|
|
484
|
+
async function getCronMonitoringSnapshot(options) {
|
|
485
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
486
|
+
return client.json('/api/v1/infrastructure/monitoring/cron', {
|
|
487
|
+
cache: 'no-store',
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
async function getCronMonitoringExecutionArchive(params, options) {
|
|
491
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
492
|
+
const searchParams = new URLSearchParams();
|
|
493
|
+
if (params?.page != null) {
|
|
494
|
+
searchParams.set('page', String(params.page));
|
|
495
|
+
}
|
|
496
|
+
if (params?.pageSize != null) {
|
|
497
|
+
searchParams.set('pageSize', String(params.pageSize));
|
|
498
|
+
}
|
|
499
|
+
if (params?.jobId) {
|
|
500
|
+
searchParams.set('jobId', params.jobId);
|
|
501
|
+
}
|
|
502
|
+
return client.json(`/api/v1/infrastructure/monitoring/cron/executions${searchParams.size > 0 ? `?${searchParams.toString()}` : ''}`, {
|
|
503
|
+
cache: 'no-store',
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
async function queueCronRun(payload, options) {
|
|
507
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
508
|
+
return client.json('/api/v1/infrastructure/monitoring/cron/run', {
|
|
509
|
+
body: JSON.stringify(payload),
|
|
510
|
+
cache: 'no-store',
|
|
511
|
+
headers: {
|
|
512
|
+
'Content-Type': 'application/json',
|
|
513
|
+
},
|
|
514
|
+
method: 'POST',
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
async function updateCronMonitoringControl(payload, options) {
|
|
518
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
519
|
+
return client.json('/api/v1/infrastructure/monitoring/cron/control', {
|
|
520
|
+
body: JSON.stringify(payload),
|
|
521
|
+
cache: 'no-store',
|
|
522
|
+
headers: {
|
|
523
|
+
'Content-Type': 'application/json',
|
|
524
|
+
},
|
|
525
|
+
method: 'PUT',
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
function appendObservabilitySearchParams(searchParams, params) {
|
|
529
|
+
if (params?.page != null) {
|
|
530
|
+
searchParams.set('page', String(params.page));
|
|
531
|
+
}
|
|
532
|
+
if (params?.pageSize != null) {
|
|
533
|
+
searchParams.set('pageSize', String(params.pageSize));
|
|
534
|
+
}
|
|
535
|
+
if (params?.projectId) {
|
|
536
|
+
searchParams.set('projectId', params.projectId);
|
|
537
|
+
}
|
|
538
|
+
if (params?.timeframeHours != null) {
|
|
539
|
+
searchParams.set('timeframeHours', String(params.timeframeHours));
|
|
540
|
+
}
|
|
541
|
+
if (params?.q) {
|
|
542
|
+
searchParams.set('q', params.q);
|
|
543
|
+
}
|
|
544
|
+
if (params?.route && params.route !== 'all') {
|
|
545
|
+
searchParams.set('route', params.route);
|
|
546
|
+
}
|
|
547
|
+
if (params?.requestId) {
|
|
548
|
+
searchParams.set('requestId', params.requestId);
|
|
549
|
+
}
|
|
550
|
+
if (params?.deploymentStamp) {
|
|
551
|
+
searchParams.set('deploymentStamp', params.deploymentStamp);
|
|
552
|
+
}
|
|
553
|
+
if (params?.since != null) {
|
|
554
|
+
searchParams.set('since', String(params.since));
|
|
555
|
+
}
|
|
556
|
+
if (params?.until != null) {
|
|
557
|
+
searchParams.set('until', String(params.until));
|
|
558
|
+
}
|
|
559
|
+
if (params?.level && params.level !== 'all') {
|
|
560
|
+
searchParams.set('level', params.level);
|
|
561
|
+
}
|
|
562
|
+
if (params?.source && params.source !== 'all') {
|
|
563
|
+
searchParams.set('source', params.source);
|
|
564
|
+
}
|
|
565
|
+
if (params?.status && params.status !== 'all') {
|
|
566
|
+
searchParams.set('status', params.status);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
function getObservabilityPath(path, params) {
|
|
570
|
+
const searchParams = new URLSearchParams();
|
|
571
|
+
appendObservabilitySearchParams(searchParams, params);
|
|
572
|
+
return `/api/v1/infrastructure/observability/${path}${searchParams.size > 0 ? `?${searchParams.toString()}` : ''}`;
|
|
573
|
+
}
|
|
574
|
+
async function getObservabilityOverview(params, options) {
|
|
575
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
576
|
+
return client.json(getObservabilityPath('overview', params), { cache: 'no-store' });
|
|
577
|
+
}
|
|
578
|
+
async function getObservabilityDeployments(params, options) {
|
|
579
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
580
|
+
return client.json(getObservabilityPath('deployments', params), { cache: 'no-store' });
|
|
581
|
+
}
|
|
582
|
+
async function getObservabilityLogs(params, options) {
|
|
583
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
584
|
+
return client.json(getObservabilityPath('logs', params), { cache: 'no-store' });
|
|
585
|
+
}
|
|
586
|
+
async function getObservabilityRequests(params, options) {
|
|
587
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
588
|
+
return client.json(getObservabilityPath('requests', params), { cache: 'no-store' });
|
|
589
|
+
}
|
|
590
|
+
async function getObservabilityAnalytics(params, options) {
|
|
591
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
592
|
+
return client.json(getObservabilityPath('analytics', params), { cache: 'no-store' });
|
|
593
|
+
}
|
|
594
|
+
async function getObservabilityCronRuns(params, options) {
|
|
595
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
596
|
+
return client.json(getObservabilityPath('cron-runs', params), { cache: 'no-store' });
|
|
597
|
+
}
|
|
598
|
+
async function getObservabilityResources(params, options) {
|
|
599
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
600
|
+
return client.json(getObservabilityPath('resources', params), { cache: 'no-store' });
|
|
601
|
+
}
|
|
602
|
+
async function getInfrastructureProjects(options) {
|
|
603
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
604
|
+
return client.json('/api/v1/infrastructure/projects', { cache: 'no-store' });
|
|
605
|
+
}
|
|
606
|
+
async function createInfrastructureProject(payload, options) {
|
|
607
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
608
|
+
return client.json('/api/v1/infrastructure/projects', {
|
|
609
|
+
body: JSON.stringify(payload),
|
|
610
|
+
cache: 'no-store',
|
|
611
|
+
headers: {
|
|
612
|
+
'Content-Type': 'application/json',
|
|
613
|
+
},
|
|
614
|
+
method: 'POST',
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
async function updateInfrastructureProject(projectId, payload, options) {
|
|
618
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
619
|
+
return client.json(`/api/v1/infrastructure/projects/${encodeURIComponent(projectId)}`, {
|
|
620
|
+
body: JSON.stringify(payload),
|
|
621
|
+
cache: 'no-store',
|
|
622
|
+
headers: {
|
|
623
|
+
'Content-Type': 'application/json',
|
|
624
|
+
},
|
|
625
|
+
method: 'PATCH',
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
async function deleteInfrastructureProject(projectId, options) {
|
|
629
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
630
|
+
return client.json(`/api/v1/infrastructure/projects/${encodeURIComponent(projectId)}`, {
|
|
631
|
+
cache: 'no-store',
|
|
632
|
+
method: 'DELETE',
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
async function syncInfrastructureProject(projectId, options) {
|
|
636
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
637
|
+
return client.json(`/api/v1/infrastructure/projects/${encodeURIComponent(projectId)}/sync`, {
|
|
638
|
+
cache: 'no-store',
|
|
639
|
+
method: 'POST',
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
async function queueInfrastructureProjectDeploy(projectId, options) {
|
|
643
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
644
|
+
return client.json(`/api/v1/infrastructure/projects/${encodeURIComponent(projectId)}/deploy`, {
|
|
645
|
+
cache: 'no-store',
|
|
646
|
+
method: 'POST',
|
|
647
|
+
});
|
|
648
|
+
}
|
|
76
649
|
async function requestBlueGreenInstantRollout(options) {
|
|
77
650
|
const client = (0, client_1.getInternalApiClient)(options);
|
|
78
651
|
return client.json('/api/v1/infrastructure/monitoring/blue-green/instant-rollout', {
|
|
@@ -80,6 +653,28 @@ async function requestBlueGreenInstantRollout(options) {
|
|
|
80
653
|
method: 'POST',
|
|
81
654
|
});
|
|
82
655
|
}
|
|
656
|
+
async function requestBlueGreenWatcherRecovery(payload, options) {
|
|
657
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
658
|
+
return client.json('/api/v1/infrastructure/monitoring/blue-green/watcher-recovery', {
|
|
659
|
+
body: JSON.stringify(payload),
|
|
660
|
+
cache: 'no-store',
|
|
661
|
+
headers: {
|
|
662
|
+
'Content-Type': 'application/json',
|
|
663
|
+
},
|
|
664
|
+
method: 'POST',
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
async function updateBlueGreenDockerRecoverySettings(payload, options) {
|
|
668
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
669
|
+
return client.json('/api/v1/infrastructure/monitoring/blue-green/recovery-settings', {
|
|
670
|
+
body: JSON.stringify(payload),
|
|
671
|
+
cache: 'no-store',
|
|
672
|
+
headers: {
|
|
673
|
+
'Content-Type': 'application/json',
|
|
674
|
+
},
|
|
675
|
+
method: 'PATCH',
|
|
676
|
+
});
|
|
677
|
+
}
|
|
83
678
|
async function pinBlueGreenDeployment(payload, options) {
|
|
84
679
|
const client = (0, client_1.getInternalApiClient)(options);
|
|
85
680
|
return client.json('/api/v1/infrastructure/monitoring/blue-green/deployment-pin', {
|