@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.
Files changed (118) hide show
  1. package/dist/account-delete.d.ts +25 -0
  2. package/dist/account-delete.d.ts.map +1 -0
  3. package/dist/account-delete.js +22 -0
  4. package/dist/ai.d.ts +2 -1
  5. package/dist/ai.d.ts.map +1 -1
  6. package/dist/api-keys.d.ts +66 -0
  7. package/dist/api-keys.d.ts.map +1 -0
  8. package/dist/api-keys.js +93 -0
  9. package/dist/auth.d.ts +5 -0
  10. package/dist/auth.d.ts.map +1 -1
  11. package/dist/auth.js +9 -0
  12. package/dist/backend.d.ts +556 -0
  13. package/dist/backend.d.ts.map +1 -0
  14. package/dist/backend.js +528 -0
  15. package/dist/calendar.d.ts +29 -0
  16. package/dist/calendar.d.ts.map +1 -1
  17. package/dist/calendar.js +18 -0
  18. package/dist/client.d.ts.map +1 -1
  19. package/dist/client.js +2 -0
  20. package/dist/cron.d.ts +16 -0
  21. package/dist/cron.d.ts.map +1 -0
  22. package/dist/cron.js +41 -0
  23. package/dist/documents.d.ts +38 -0
  24. package/dist/documents.d.ts.map +1 -0
  25. package/dist/documents.js +71 -0
  26. package/dist/education.d.ts +228 -12
  27. package/dist/education.d.ts.map +1 -1
  28. package/dist/education.js +229 -0
  29. package/dist/group-tags.d.ts +87 -0
  30. package/dist/group-tags.d.ts.map +1 -0
  31. package/dist/group-tags.js +116 -0
  32. package/dist/index.d.ts +24 -14
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +164 -14
  35. package/dist/infrastructure/abuse.d.ts +7 -0
  36. package/dist/infrastructure/abuse.d.ts.map +1 -0
  37. package/dist/infrastructure/abuse.js +39 -0
  38. package/dist/infrastructure/ai.d.ts +53 -0
  39. package/dist/infrastructure/ai.d.ts.map +1 -0
  40. package/dist/infrastructure/ai.js +331 -0
  41. package/dist/infrastructure/apps.d.ts +9 -0
  42. package/dist/infrastructure/apps.d.ts.map +1 -0
  43. package/dist/infrastructure/apps.js +49 -0
  44. package/dist/infrastructure/blocked-ips.d.ts +65 -0
  45. package/dist/infrastructure/blocked-ips.d.ts.map +1 -0
  46. package/dist/infrastructure/blocked-ips.js +56 -0
  47. package/dist/infrastructure/github-bot.d.ts +10 -0
  48. package/dist/infrastructure/github-bot.d.ts.map +1 -0
  49. package/dist/infrastructure/github-bot.js +73 -0
  50. package/dist/infrastructure/index.d.ts +11 -0
  51. package/dist/infrastructure/index.d.ts.map +1 -0
  52. package/dist/infrastructure/index.js +26 -0
  53. package/dist/infrastructure/mobile.d.ts +23 -0
  54. package/dist/infrastructure/mobile.d.ts.map +1 -0
  55. package/dist/infrastructure/mobile.js +183 -0
  56. package/dist/infrastructure/monitoring.d.ts +34 -0
  57. package/dist/infrastructure/monitoring.d.ts.map +1 -0
  58. package/dist/infrastructure/monitoring.js +356 -0
  59. package/dist/infrastructure/realtime.d.ts +55 -0
  60. package/dist/infrastructure/realtime.d.ts.map +1 -0
  61. package/dist/infrastructure/realtime.js +29 -0
  62. package/dist/infrastructure/types.d.ts +1652 -0
  63. package/dist/infrastructure/types.d.ts.map +1 -0
  64. package/dist/infrastructure/types.js +2 -0
  65. package/dist/infrastructure/workspace.d.ts +5 -0
  66. package/dist/infrastructure/workspace.d.ts.map +1 -0
  67. package/dist/infrastructure/workspace.js +15 -0
  68. package/dist/infrastructure.d.ts +10 -1725
  69. package/dist/infrastructure.d.ts.map +1 -1
  70. package/dist/infrastructure.js +24 -1019
  71. package/dist/inventory.d.ts +34 -0
  72. package/dist/inventory.d.ts.map +1 -1
  73. package/dist/inventory.js +7 -0
  74. package/dist/notifications.d.ts +90 -0
  75. package/dist/notifications.d.ts.map +1 -0
  76. package/dist/notifications.js +62 -0
  77. package/dist/promotions.d.ts +3 -0
  78. package/dist/promotions.d.ts.map +1 -1
  79. package/dist/promotions.js +8 -0
  80. package/dist/rate-limits.d.ts +18 -5
  81. package/dist/rate-limits.d.ts.map +1 -1
  82. package/dist/task-plans.d.ts +220 -0
  83. package/dist/task-plans.d.ts.map +1 -0
  84. package/dist/task-plans.js +153 -0
  85. package/dist/tasks.d.ts +200 -0
  86. package/dist/tasks.d.ts.map +1 -1
  87. package/dist/tasks.js +143 -0
  88. package/dist/teach.d.ts +67 -0
  89. package/dist/teach.d.ts.map +1 -1
  90. package/dist/teach.js +20 -0
  91. package/dist/templates.d.ts +2 -0
  92. package/dist/templates.d.ts.map +1 -1
  93. package/dist/templates.js +8 -0
  94. package/dist/tulearn.d.ts +46 -0
  95. package/dist/tulearn.d.ts.map +1 -1
  96. package/dist/tulearn.js +36 -0
  97. package/dist/user-group-attendance.d.ts +29 -0
  98. package/dist/user-group-attendance.d.ts.map +1 -0
  99. package/dist/user-group-attendance.js +38 -0
  100. package/dist/user-group-schedule.d.ts +193 -0
  101. package/dist/user-group-schedule.d.ts.map +1 -0
  102. package/dist/user-group-schedule.js +84 -0
  103. package/dist/user-groups.d.ts +18 -0
  104. package/dist/user-groups.d.ts.map +1 -1
  105. package/dist/user-groups.js +18 -0
  106. package/dist/users-server.d.ts +14 -0
  107. package/dist/users-server.d.ts.map +1 -0
  108. package/dist/users-server.js +37 -0
  109. package/dist/users.d.ts +64 -1
  110. package/dist/users.d.ts.map +1 -1
  111. package/dist/users.js +78 -6
  112. package/dist/workspace-config-ids.d.ts +6 -0
  113. package/dist/workspace-config-ids.d.ts.map +1 -1
  114. package/dist/workspace-config-ids.js +13 -1
  115. package/dist/workspace-configs.d.ts +4 -1
  116. package/dist/workspace-configs.d.ts.map +1 -1
  117. package/dist/workspace-configs.js +25 -1
  118. package/package.json +63 -8
@@ -1,1021 +1,26 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sendInfrastructurePushTest = sendInfrastructurePushTest;
4
- exports.updateMobileVersionPolicies = updateMobileVersionPolicies;
5
- exports.getMobileDeploymentState = getMobileDeploymentState;
6
- exports.replaceMobileDeploymentEnvFile = replaceMobileDeploymentEnvFile;
7
- exports.saveMobileDeploymentEnvKeyValue = saveMobileDeploymentEnvKeyValue;
8
- exports.clearMobileDeploymentEnvKeyValue = clearMobileDeploymentEnvKeyValue;
9
- exports.saveMobileDeploymentScalarValue = saveMobileDeploymentScalarValue;
10
- exports.clearMobileDeploymentScalarValue = clearMobileDeploymentScalarValue;
11
- exports.saveMobileDeploymentSecret = saveMobileDeploymentSecret;
12
- exports.clearMobileDeploymentSecret = clearMobileDeploymentSecret;
13
- exports.uploadMobileDeploymentFileResource = uploadMobileDeploymentFileResource;
14
- exports.activateMobileDeploymentDraft = activateMobileDeploymentDraft;
15
- exports.rollbackMobileDeploymentVersion = rollbackMobileDeploymentVersion;
16
- exports.issueMobileDeploymentCiToken = issueMobileDeploymentCiToken;
17
- exports.revokeMobileDeploymentCiToken = revokeMobileDeploymentCiToken;
18
- exports.getGitHubBotState = getGitHubBotState;
19
- exports.saveGitHubBotConfiguration = saveGitHubBotConfiguration;
20
- exports.testGitHubBotConfiguration = testGitHubBotConfiguration;
21
- exports.issueGitHubBotWatcherClient = issueGitHubBotWatcherClient;
22
- exports.enableGitHubBotWatcherAutoPickup = enableGitHubBotWatcherAutoPickup;
23
- exports.revokeGitHubBotWatcherClient = revokeGitHubBotWatcherClient;
24
- exports.listAiGatewayModels = listAiGatewayModels;
25
- exports.listAiGatewayModelsPage = listAiGatewayModelsPage;
26
- exports.listAiGatewayModelsLegacy = listAiGatewayModelsLegacy;
27
- exports.resolveInfrastructureWorkspaceId = resolveInfrastructureWorkspaceId;
28
- exports.listAIWhitelistDomains = listAIWhitelistDomains;
29
- exports.createAIWhitelistDomain = createAIWhitelistDomain;
30
- exports.updateAIWhitelistDomain = updateAIWhitelistDomain;
31
- exports.deleteAIWhitelistDomain = deleteAIWhitelistDomain;
32
- exports.listAIWhitelistEmails = listAIWhitelistEmails;
33
- exports.createAIWhitelistEmail = createAIWhitelistEmail;
34
- exports.updateAIWhitelistEmail = updateAIWhitelistEmail;
35
- exports.deleteAIWhitelistEmail = deleteAIWhitelistEmail;
36
- exports.listExternalApps = listExternalApps;
37
- exports.saveExternalApp = saveExternalApp;
38
- exports.rotateExternalAppSecret = rotateExternalAppSecret;
39
- exports.listAiAgents = listAiAgents;
40
- exports.saveAiAgent = saveAiAgent;
41
- exports.createChatIntegration = createChatIntegration;
42
- exports.deployAiAgentChannel = deployAiAgentChannel;
43
- exports.pauseAiAgentChannel = pauseAiAgentChannel;
44
- exports.testAiAgentChannel = testAiAgentChannel;
45
- exports.rotateAiAgentChannelSecret = rotateAiAgentChannelSecret;
46
- exports.getAiAgentZaloPersonalStatus = getAiAgentZaloPersonalStatus;
47
- exports.runAiAgentZaloPersonalAction = runAiAgentZaloPersonalAction;
48
- exports.startAiAgentZaloPersonalQrLogin = startAiAgentZaloPersonalQrLogin;
49
- exports.getAiAgentZaloPersonalQrLoginStatus = getAiAgentZaloPersonalQrLoginStatus;
50
- exports.abortAiAgentZaloPersonalQrLogin = abortAiAgentZaloPersonalQrLogin;
51
- exports.saveAiAgentIdentityLink = saveAiAgentIdentityLink;
52
- exports.listAiAgentExternalThreads = listAiAgentExternalThreads;
53
- exports.listAiAgentExternalMessages = listAiAgentExternalMessages;
54
- exports.syncAiAgentExternalThread = syncAiAgentExternalThread;
55
- exports.draftAiAgentExternalResponse = draftAiAgentExternalResponse;
56
- exports.sendAiAgentExternalResponse = sendAiAgentExternalResponse;
57
- exports.getAppCoordinationSessionPolicy = getAppCoordinationSessionPolicy;
58
- exports.saveAppCoordinationSessionPolicy = saveAppCoordinationSessionPolicy;
59
- exports.getAbuseIntelligenceSnapshot = getAbuseIntelligenceSnapshot;
60
- exports.createAbuseTrustOverride = createAbuseTrustOverride;
61
- exports.revokeAbuseTrustOverride = revokeAbuseTrustOverride;
62
- exports.getBlueGreenMonitoringSnapshot = getBlueGreenMonitoringSnapshot;
63
- exports.getBlueGreenMonitoringRequestArchive = getBlueGreenMonitoringRequestArchive;
64
- exports.getBlueGreenMonitoringWatcherLogArchive = getBlueGreenMonitoringWatcherLogArchive;
65
- exports.getCronMonitoringSnapshot = getCronMonitoringSnapshot;
66
- exports.getCronMonitoringExecutionArchive = getCronMonitoringExecutionArchive;
67
- exports.queueCronRun = queueCronRun;
68
- exports.updateCronMonitoringControl = updateCronMonitoringControl;
69
- exports.getInfrastructureStressTestSnapshot = getInfrastructureStressTestSnapshot;
70
- exports.queueInfrastructureStressTest = queueInfrastructureStressTest;
71
- exports.getInfrastructureStressTestRun = getInfrastructureStressTestRun;
72
- exports.abortInfrastructureStressTest = abortInfrastructureStressTest;
73
- exports.getObservabilityOverview = getObservabilityOverview;
74
- exports.getObservabilityDeployments = getObservabilityDeployments;
75
- exports.getObservabilityLogs = getObservabilityLogs;
76
- exports.getObservabilityRequests = getObservabilityRequests;
77
- exports.getObservabilityAnalytics = getObservabilityAnalytics;
78
- exports.getObservabilityCronRuns = getObservabilityCronRuns;
79
- exports.getObservabilityResources = getObservabilityResources;
80
- exports.getInfrastructureProjects = getInfrastructureProjects;
81
- exports.createInfrastructureProject = createInfrastructureProject;
82
- exports.updateInfrastructureProject = updateInfrastructureProject;
83
- exports.deleteInfrastructureProject = deleteInfrastructureProject;
84
- exports.syncInfrastructureProject = syncInfrastructureProject;
85
- exports.queueInfrastructureProjectDeploy = queueInfrastructureProjectDeploy;
86
- exports.requestBlueGreenInstantRollout = requestBlueGreenInstantRollout;
87
- exports.requestBlueGreenDeploymentRevert = requestBlueGreenDeploymentRevert;
88
- exports.requestBlueGreenWatcherRecovery = requestBlueGreenWatcherRecovery;
89
- exports.updateBlueGreenDockerRecoverySettings = updateBlueGreenDockerRecoverySettings;
90
- exports.pinBlueGreenDeployment = pinBlueGreenDeployment;
91
- exports.clearBlueGreenDeploymentPin = clearBlueGreenDeploymentPin;
92
- const client_1 = require("./client");
93
- function mapGatewayModel(model) {
94
- return {
95
- context: model.context_window ?? undefined,
96
- description: model.description ?? undefined,
97
- disabled: !model.is_enabled,
98
- label: model.name,
99
- provider: model.provider,
100
- tags: model.tags ?? undefined,
101
- value: model.id,
102
- };
103
- }
104
- async function sendInfrastructurePushTest(payload, options) {
105
- const client = (0, client_1.getInternalApiClient)(options);
106
- return client.json('/api/v1/infrastructure/push-notifications/test', {
107
- method: 'POST',
108
- headers: {
109
- 'Content-Type': 'application/json',
110
- },
111
- body: JSON.stringify(payload),
112
- cache: 'no-store',
113
- });
114
- }
115
- async function updateMobileVersionPolicies(payload, options) {
116
- const client = (0, client_1.getInternalApiClient)(options);
117
- return client.json('/api/v1/infrastructure/mobile-versions', {
118
- body: JSON.stringify(payload),
119
- cache: 'no-store',
120
- headers: {
121
- 'Content-Type': 'application/json',
122
- },
123
- method: 'PUT',
124
- });
125
- }
126
- const MOBILE_DEPLOYMENT_CSRF_HEADER = 'x-tuturuuu-mobile-deployment-action';
127
- const GITHUB_BOT_CSRF_HEADER = 'x-tuturuuu-github-bot-action';
128
- function mobileDeploymentMutationHeaders(extra) {
129
- const headers = new Headers(extra);
130
- headers.set(MOBILE_DEPLOYMENT_CSRF_HEADER, '1');
131
- return headers;
132
- }
133
- function githubBotMutationHeaders(extra) {
134
- const headers = new Headers(extra);
135
- headers.set(GITHUB_BOT_CSRF_HEADER, '1');
136
- return headers;
137
- }
138
- async function getMobileDeploymentState(options) {
139
- const client = (0, client_1.getInternalApiClient)(options);
140
- return client.json('/api/v1/mobile-deployment', {
141
- cache: 'no-store',
142
- });
143
- }
144
- async function replaceMobileDeploymentEnvFile(envFile, options) {
145
- const client = (0, client_1.getInternalApiClient)(options);
146
- return client.json('/api/v1/mobile-deployment', {
147
- body: JSON.stringify({ action: 'replace_env', envFile }),
148
- cache: 'no-store',
149
- headers: mobileDeploymentMutationHeaders({
150
- 'Content-Type': 'application/json',
151
- }),
152
- method: 'PUT',
153
- });
154
- }
155
- async function saveMobileDeploymentEnvKeyValue(name, value, previousNameOrOptions, options) {
156
- const previousName = typeof previousNameOrOptions === 'string'
157
- ? previousNameOrOptions
158
- : undefined;
159
- const clientOptions = typeof previousNameOrOptions === 'string' ? options : previousNameOrOptions;
160
- return saveMobileDeploymentSecret({
161
- kind: 'env',
162
- name,
163
- previousName,
164
- value,
165
- }, clientOptions);
166
- }
167
- async function clearMobileDeploymentEnvKeyValue(name, options) {
168
- return clearMobileDeploymentSecret({ kind: 'env', name }, options);
169
- }
170
- async function saveMobileDeploymentScalarValue(name, value, options) {
171
- return saveMobileDeploymentSecret({
172
- kind: 'scalar',
173
- name,
174
- value,
175
- }, options);
176
- }
177
- async function clearMobileDeploymentScalarValue(name, options) {
178
- return clearMobileDeploymentSecret({ kind: 'scalar', name }, options);
179
- }
180
- async function saveMobileDeploymentSecret(payload, options) {
181
- const client = (0, client_1.getInternalApiClient)(options);
182
- return client.json('/api/v1/mobile-deployment', {
183
- body: JSON.stringify({ action: 'save_secret', ...payload }),
184
- cache: 'no-store',
185
- headers: mobileDeploymentMutationHeaders({
186
- 'Content-Type': 'application/json',
187
- }),
188
- method: 'PUT',
189
- });
190
- }
191
- async function clearMobileDeploymentSecret(payload, options) {
192
- const client = (0, client_1.getInternalApiClient)(options);
193
- return client.json('/api/v1/mobile-deployment', {
194
- body: JSON.stringify({ action: 'clear_secret', ...payload }),
195
- cache: 'no-store',
196
- headers: mobileDeploymentMutationHeaders({
197
- 'Content-Type': 'application/json',
198
- }),
199
- method: 'PUT',
200
- });
201
- }
202
- async function uploadMobileDeploymentFileResource(kind, file, options) {
203
- const formData = new FormData();
204
- formData.set('file', file);
205
- const client = (0, client_1.getInternalApiClient)(options);
206
- const response = await client.fetch(`/api/v1/mobile-deployment/files/${kind}`, {
207
- body: formData,
208
- cache: 'no-store',
209
- headers: mobileDeploymentMutationHeaders(),
210
- method: 'POST',
211
- });
212
- if (!response.ok) {
213
- let code;
214
- let message = `Internal API request failed: ${response.status}`;
215
- try {
216
- const data = (await response.json());
217
- code = data.code;
218
- message = data.message || data.error || message;
219
- }
220
- catch {
221
- // Keep the status fallback when the response is not JSON.
222
- }
223
- throw new client_1.InternalApiError(message, response.status, code);
224
- }
225
- return (await response.json());
226
- }
227
- async function activateMobileDeploymentDraft(options) {
228
- const client = (0, client_1.getInternalApiClient)(options);
229
- return client.json('/api/v1/mobile-deployment/activate', {
230
- body: '{}',
231
- cache: 'no-store',
232
- headers: mobileDeploymentMutationHeaders({
233
- 'Content-Type': 'application/json',
234
- }),
235
- method: 'POST',
236
- });
237
- }
238
- async function rollbackMobileDeploymentVersion(options) {
239
- const client = (0, client_1.getInternalApiClient)(options);
240
- return client.json('/api/v1/mobile-deployment/rollback', {
241
- body: '{}',
242
- cache: 'no-store',
243
- headers: mobileDeploymentMutationHeaders({
244
- 'Content-Type': 'application/json',
245
- }),
246
- method: 'POST',
247
- });
248
- }
249
- async function issueMobileDeploymentCiToken(payload, options) {
250
- const client = (0, client_1.getInternalApiClient)(options);
251
- return client.json('/api/v1/mobile-deployment/tokens', {
252
- body: JSON.stringify(payload),
253
- cache: 'no-store',
254
- headers: mobileDeploymentMutationHeaders({
255
- 'Content-Type': 'application/json',
256
- }),
257
- method: 'POST',
258
- });
259
- }
260
- async function revokeMobileDeploymentCiToken(tokenId, options) {
261
- const client = (0, client_1.getInternalApiClient)(options);
262
- return client.json(`/api/v1/mobile-deployment/tokens/${(0, client_1.encodePathSegment)(tokenId)}`, {
263
- cache: 'no-store',
264
- headers: mobileDeploymentMutationHeaders(),
265
- method: 'DELETE',
266
- });
267
- }
268
- async function getGitHubBotState(options) {
269
- const client = (0, client_1.getInternalApiClient)(options);
270
- return client.json('/api/v1/infrastructure/github-bot', {
271
- cache: 'no-store',
272
- });
273
- }
274
- async function saveGitHubBotConfiguration(payload, options) {
275
- const client = (0, client_1.getInternalApiClient)(options);
276
- return client.json('/api/v1/infrastructure/github-bot', {
277
- body: JSON.stringify(payload),
278
- cache: 'no-store',
279
- headers: githubBotMutationHeaders({
280
- 'Content-Type': 'application/json',
281
- }),
282
- method: 'PUT',
283
- });
284
- }
285
- async function testGitHubBotConfiguration(options) {
286
- const client = (0, client_1.getInternalApiClient)(options);
287
- return client.json('/api/v1/infrastructure/github-bot/test', {
288
- body: '{}',
289
- cache: 'no-store',
290
- headers: githubBotMutationHeaders({
291
- 'Content-Type': 'application/json',
292
- }),
293
- method: 'POST',
294
- });
295
- }
296
- async function issueGitHubBotWatcherClient(payload, options) {
297
- const client = (0, client_1.getInternalApiClient)(options);
298
- return client.json('/api/v1/infrastructure/github-bot/clients', {
299
- body: JSON.stringify(payload),
300
- cache: 'no-store',
301
- headers: githubBotMutationHeaders({
302
- 'Content-Type': 'application/json',
303
- }),
304
- method: 'POST',
305
- });
306
- }
307
- async function enableGitHubBotWatcherAutoPickup(options) {
308
- const client = (0, client_1.getInternalApiClient)(options);
309
- return client.json('/api/v1/infrastructure/github-bot/auto-pickup', {
310
- body: '{}',
311
- cache: 'no-store',
312
- headers: githubBotMutationHeaders({
313
- 'Content-Type': 'application/json',
314
- }),
315
- method: 'POST',
316
- });
317
- }
318
- async function revokeGitHubBotWatcherClient(clientId, options) {
319
- const client = (0, client_1.getInternalApiClient)(options);
320
- return client.json(`/api/v1/infrastructure/github-bot/clients/${(0, client_1.encodePathSegment)(clientId)}`, {
321
- cache: 'no-store',
322
- headers: githubBotMutationHeaders(),
323
- method: 'DELETE',
324
- });
325
- }
326
- async function listAiGatewayModels(params, options) {
327
- return listAiGatewayModelsLegacy(params, options);
328
- }
329
- async function listAiGatewayModelsPage(params, options) {
330
- const client = (0, client_1.getInternalApiClient)(options);
331
- const response = await client.json('/api/v1/infrastructure/ai/models', {
332
- cache: 'no-store',
333
- query: {
334
- enabled: typeof params?.enabled === 'boolean'
335
- ? String(params.enabled)
336
- : undefined,
337
- format: 'paginated',
338
- ids: params?.ids?.join(','),
339
- limit: params?.limit,
340
- page: params?.page,
341
- provider: params?.provider,
342
- q: params?.q,
343
- tag: params?.tag,
344
- type: params?.type ?? 'language',
345
- },
346
- });
347
- return {
348
- data: response.data.map((row) => mapGatewayModel(row)),
349
- pagination: response.pagination,
350
- };
351
- }
352
- async function listAiGatewayModelsLegacy(params, options) {
353
- const client = (0, client_1.getInternalApiClient)(options);
354
- const rows = await client.json('/api/v1/infrastructure/ai/models', {
355
- cache: 'no-store',
356
- query: {
357
- enabled: typeof params?.enabled === 'boolean'
358
- ? String(params.enabled)
359
- : undefined,
360
- ids: params?.ids?.join(','),
361
- provider: params?.provider,
362
- q: params?.q,
363
- tag: params?.tag,
364
- type: params?.type ?? 'language',
365
- },
366
- });
367
- return rows.map((row) => mapGatewayModel(row));
368
- }
369
- async function resolveInfrastructureWorkspaceId(wsId, options) {
370
- const client = (0, client_1.getInternalApiClient)(options);
371
- return client.json('/api/v1/infrastructure/resolve-workspace-id', {
372
- body: JSON.stringify({ wsId }),
373
- cache: 'no-store',
374
- headers: {
375
- 'Content-Type': 'application/json',
376
- },
377
- method: 'POST',
378
- });
379
- }
380
- async function listAIWhitelistDomains(params, options) {
381
- const client = (0, client_1.getInternalApiClient)(options);
382
- return client.json('/api/v1/infrastructure/ai/whitelist/domains', {
383
- cache: 'no-store',
384
- query: {
385
- page: params?.page,
386
- pageSize: params?.pageSize,
387
- q: params?.q,
388
- },
389
- });
390
- }
391
- async function createAIWhitelistDomain(payload, options) {
392
- const client = (0, client_1.getInternalApiClient)(options);
393
- return client.json('/api/v1/infrastructure/ai/whitelist/domains', {
394
- body: JSON.stringify(payload),
395
- cache: 'no-store',
396
- headers: {
397
- 'Content-Type': 'application/json',
398
- },
399
- method: 'POST',
400
- });
401
- }
402
- async function updateAIWhitelistDomain(domain, payload, options) {
403
- const client = (0, client_1.getInternalApiClient)(options);
404
- return client.json(`/api/v1/infrastructure/ai/whitelist/domain/${(0, client_1.encodePathSegment)(domain)}`, {
405
- body: JSON.stringify(payload),
406
- cache: 'no-store',
407
- headers: {
408
- 'Content-Type': 'application/json',
409
- },
410
- method: 'PUT',
411
- });
412
- }
413
- async function deleteAIWhitelistDomain(domain, options) {
414
- const client = (0, client_1.getInternalApiClient)(options);
415
- return client.json(`/api/v1/infrastructure/ai/whitelist/domain/${(0, client_1.encodePathSegment)(domain)}`, {
416
- cache: 'no-store',
417
- method: 'DELETE',
418
- });
419
- }
420
- async function listAIWhitelistEmails(params, options) {
421
- const client = (0, client_1.getInternalApiClient)(options);
422
- return client.json('/api/v1/infrastructure/ai/whitelist/emails', {
423
- cache: 'no-store',
424
- query: {
425
- page: params?.page,
426
- pageSize: params?.pageSize,
427
- q: params?.q,
428
- },
429
- });
430
- }
431
- async function createAIWhitelistEmail(payload, options) {
432
- const client = (0, client_1.getInternalApiClient)(options);
433
- return client.json('/api/v1/infrastructure/ai/whitelist/emails', {
434
- body: JSON.stringify(payload),
435
- cache: 'no-store',
436
- headers: {
437
- 'Content-Type': 'application/json',
438
- },
439
- method: 'POST',
440
- });
441
- }
442
- async function updateAIWhitelistEmail(email, payload, options) {
443
- const client = (0, client_1.getInternalApiClient)(options);
444
- return client.json(`/api/v1/infrastructure/ai/whitelist/${(0, client_1.encodePathSegment)(email)}`, {
445
- body: JSON.stringify(payload),
446
- cache: 'no-store',
447
- headers: {
448
- 'Content-Type': 'application/json',
449
- },
450
- method: 'PUT',
451
- });
452
- }
453
- async function deleteAIWhitelistEmail(email, options) {
454
- const client = (0, client_1.getInternalApiClient)(options);
455
- return client.json(`/api/v1/infrastructure/ai/whitelist/${(0, client_1.encodePathSegment)(email)}`, {
456
- cache: 'no-store',
457
- method: 'DELETE',
458
- });
459
- }
460
- async function listExternalApps(options) {
461
- const client = (0, client_1.getInternalApiClient)(options);
462
- return client.json('/api/v1/infrastructure/external-apps', {
463
- cache: 'no-store',
464
- });
465
- }
466
- async function saveExternalApp(payload, options) {
467
- const client = (0, client_1.getInternalApiClient)(options);
468
- return client.json('/api/v1/infrastructure/external-apps', {
469
- body: JSON.stringify(payload),
470
- cache: 'no-store',
471
- headers: {
472
- 'Content-Type': 'application/json',
473
- },
474
- method: 'POST',
475
- });
476
- }
477
- async function rotateExternalAppSecret(appId, options) {
478
- const client = (0, client_1.getInternalApiClient)(options);
479
- return client.json(`/api/v1/infrastructure/external-apps/${encodeURIComponent(appId)}/secrets`, {
480
- cache: 'no-store',
481
- method: 'POST',
482
- });
483
- }
484
- async function listAiAgents(options) {
485
- const client = (0, client_1.getInternalApiClient)(options);
486
- return client.json('/api/v1/infrastructure/ai-agents', {
487
- cache: 'no-store',
488
- });
489
- }
490
- async function saveAiAgent(payload, options) {
491
- const client = (0, client_1.getInternalApiClient)(options);
492
- return client.json('/api/v1/infrastructure/ai-agents', {
493
- body: JSON.stringify(payload),
494
- cache: 'no-store',
495
- headers: {
496
- 'Content-Type': 'application/json',
497
- },
498
- method: 'POST',
499
- });
500
- }
501
- async function createChatIntegration(payload, options) {
502
- const client = (0, client_1.getInternalApiClient)(options);
503
- return client.json('/api/v1/infrastructure/ai-agents/chat-integrations', {
504
- body: JSON.stringify(payload),
505
- cache: 'no-store',
506
- headers: {
507
- 'Content-Type': 'application/json',
508
- },
509
- method: 'POST',
510
- });
511
- }
512
- async function deployAiAgentChannel(agentId, channelId, options) {
513
- const client = (0, client_1.getInternalApiClient)(options);
514
- return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/deploy`, {
515
- body: JSON.stringify({ channelId }),
516
- cache: 'no-store',
517
- headers: {
518
- 'Content-Type': 'application/json',
519
- },
520
- method: 'POST',
521
- });
522
- }
523
- async function pauseAiAgentChannel(agentId, channelId, options) {
524
- const client = (0, client_1.getInternalApiClient)(options);
525
- return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/pause`, {
526
- body: JSON.stringify({ channelId }),
527
- cache: 'no-store',
528
- headers: {
529
- 'Content-Type': 'application/json',
530
- },
531
- method: 'POST',
532
- });
533
- }
534
- async function testAiAgentChannel(agentId, channelId, prompt, options) {
535
- const client = (0, client_1.getInternalApiClient)(options);
536
- return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/test`, {
537
- body: JSON.stringify({ channelId, prompt }),
538
- cache: 'no-store',
539
- headers: {
540
- 'Content-Type': 'application/json',
541
- },
542
- method: 'POST',
543
- });
544
- }
545
- async function rotateAiAgentChannelSecret(agentId, channelId, name, value, options) {
546
- const client = (0, client_1.getInternalApiClient)(options);
547
- return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/channels/${(0, client_1.encodePathSegment)(channelId)}/secrets`, {
548
- body: JSON.stringify({ name, value }),
549
- cache: 'no-store',
550
- headers: {
551
- 'Content-Type': 'application/json',
552
- },
553
- method: 'POST',
554
- });
555
- }
556
- async function getAiAgentZaloPersonalStatus(agentId, channelId, options) {
557
- const client = (0, client_1.getInternalApiClient)(options);
558
- return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/channels/${(0, client_1.encodePathSegment)(channelId)}/zalo-personal`, {
559
- cache: 'no-store',
560
- });
561
- }
562
- async function runAiAgentZaloPersonalAction(agentId, channelId, action, options) {
563
- const client = (0, client_1.getInternalApiClient)(options);
564
- return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/channels/${(0, client_1.encodePathSegment)(channelId)}/zalo-personal`, {
565
- body: JSON.stringify({ action }),
566
- cache: 'no-store',
567
- headers: {
568
- 'Content-Type': 'application/json',
569
- },
570
- method: 'POST',
571
- });
572
- }
573
- async function startAiAgentZaloPersonalQrLogin(agentId, channelId, options) {
574
- const client = (0, client_1.getInternalApiClient)(options);
575
- return client.json(`/api/v1/infrastructure/ai-agents/${(0, client_1.encodePathSegment)(agentId)}/channels/${(0, client_1.encodePathSegment)(channelId)}/zalo-personal/qr-login`, {
576
- cache: 'no-store',
577
- method: 'POST',
578
- });
579
- }
580
- async function getAiAgentZaloPersonalQrLoginStatus(agentId, channelId, sessionId, options) {
581
- const client = (0, client_1.getInternalApiClient)(options);
582
- 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)}`, {
583
- cache: 'no-store',
584
- });
585
- }
586
- async function abortAiAgentZaloPersonalQrLogin(agentId, channelId, sessionId, options) {
587
- const client = (0, client_1.getInternalApiClient)(options);
588
- 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)}`, {
589
- cache: 'no-store',
590
- method: 'DELETE',
591
- });
592
- }
593
- async function saveAiAgentIdentityLink(payload, options) {
594
- const client = (0, client_1.getInternalApiClient)(options);
595
- return client.json('/api/v1/infrastructure/ai-agents/identities', {
596
- body: JSON.stringify(payload),
597
- cache: 'no-store',
598
- headers: {
599
- 'Content-Type': 'application/json',
600
- },
601
- method: 'POST',
602
- });
603
- }
604
- async function listAiAgentExternalThreads(params, options) {
605
- const client = (0, client_1.getInternalApiClient)(options);
606
- return client.json('/api/v1/infrastructure/ai-agents/external-threads', {
607
- cache: 'no-store',
608
- query: {
609
- agentId: params?.agentId ?? undefined,
610
- channelId: params?.channelId ?? undefined,
611
- wsId: params?.wsId ?? undefined,
612
- },
613
- });
614
- }
615
- async function listAiAgentExternalMessages(threadId, params, options) {
616
- const client = (0, client_1.getInternalApiClient)(options);
617
- return client.json(`/api/v1/infrastructure/ai-agents/external-threads/${(0, client_1.encodePathSegment)(threadId)}/messages`, {
618
- cache: 'no-store',
619
- query: {
620
- limit: params?.limit,
621
- },
622
- });
623
- }
624
- async function syncAiAgentExternalThread(threadId, options) {
625
- const client = (0, client_1.getInternalApiClient)(options);
626
- return client.json(`/api/v1/infrastructure/ai-agents/external-threads/${(0, client_1.encodePathSegment)(threadId)}/sync`, {
627
- cache: 'no-store',
628
- method: 'POST',
629
- });
630
- }
631
- async function draftAiAgentExternalResponse(threadId, prompt, options) {
632
- const client = (0, client_1.getInternalApiClient)(options);
633
- return client.json(`/api/v1/infrastructure/ai-agents/external-threads/${(0, client_1.encodePathSegment)(threadId)}/draft`, {
634
- body: JSON.stringify({ prompt }),
635
- cache: 'no-store',
636
- headers: { 'Content-Type': 'application/json' },
637
- method: 'POST',
638
- });
639
- }
640
- async function sendAiAgentExternalResponse(threadId, content, options) {
641
- const client = (0, client_1.getInternalApiClient)(options);
642
- return client.json(`/api/v1/infrastructure/ai-agents/external-threads/${(0, client_1.encodePathSegment)(threadId)}/send`, {
643
- body: JSON.stringify({ content }),
644
- cache: 'no-store',
645
- headers: { 'Content-Type': 'application/json' },
646
- method: 'POST',
647
- });
648
- }
649
- async function getAppCoordinationSessionPolicy(options) {
650
- const client = (0, client_1.getInternalApiClient)(options);
651
- return client.json('/api/v1/infrastructure/app-coordination', {
652
- cache: 'no-store',
653
- });
654
- }
655
- async function saveAppCoordinationSessionPolicy(payload, options) {
656
- const client = (0, client_1.getInternalApiClient)(options);
657
- return client.json('/api/v1/infrastructure/app-coordination', {
658
- body: JSON.stringify(payload),
659
- cache: 'no-store',
660
- headers: {
661
- 'Content-Type': 'application/json',
662
- },
663
- method: 'PUT',
664
- });
665
- }
666
- async function getAbuseIntelligenceSnapshot(params, options) {
667
- const client = (0, client_1.getInternalApiClient)(options);
668
- const searchParams = new URLSearchParams();
669
- if (params?.limit != null) {
670
- searchParams.set('limit', String(params.limit));
671
- }
672
- if (params?.signalLimit != null) {
673
- searchParams.set('signalLimit', String(params.signalLimit));
674
- }
675
- return client.json(`/api/v1/infrastructure/abuse-intelligence${searchParams.size > 0 ? `?${searchParams.toString()}` : ''}`, { cache: 'no-store' });
676
- }
677
- async function createAbuseTrustOverride(payload, options) {
678
- const client = (0, client_1.getInternalApiClient)(options);
679
- return client.json('/api/v1/infrastructure/abuse-intelligence', {
680
- body: JSON.stringify(payload),
681
- cache: 'no-store',
682
- headers: {
683
- 'Content-Type': 'application/json',
684
- },
685
- method: 'POST',
686
- });
687
- }
688
- async function revokeAbuseTrustOverride(overrideId, payload, options) {
689
- const client = (0, client_1.getInternalApiClient)(options);
690
- return client.json(`/api/v1/infrastructure/abuse-intelligence/overrides/${encodeURIComponent(overrideId)}`, {
691
- body: JSON.stringify(payload),
692
- cache: 'no-store',
693
- headers: {
694
- 'Content-Type': 'application/json',
695
- },
696
- method: 'PATCH',
697
- });
698
- }
699
- async function getBlueGreenMonitoringSnapshot(params, options) {
700
- const client = (0, client_1.getInternalApiClient)(options);
701
- const searchParams = new URLSearchParams();
702
- if (params?.requestPreviewLimit != null) {
703
- searchParams.set('requestPreviewLimit', String(params.requestPreviewLimit));
704
- }
705
- if (params?.watcherLogLimit != null) {
706
- searchParams.set('watcherLogLimit', String(params.watcherLogLimit));
707
- }
708
- return client.json(`/api/v1/infrastructure/monitoring/blue-green${searchParams.size > 0 ? `?${searchParams.toString()}` : ''}`, {
709
- cache: 'no-store',
710
- });
711
- }
712
- async function getBlueGreenMonitoringRequestArchive(params, options) {
713
- const client = (0, client_1.getInternalApiClient)(options);
714
- const searchParams = new URLSearchParams();
715
- if (params?.page != null) {
716
- searchParams.set('page', String(params.page));
717
- }
718
- if (params?.pageSize != null) {
719
- searchParams.set('pageSize', String(params.pageSize));
720
- }
721
- if (params?.timeframeDays != null) {
722
- searchParams.set('timeframeDays', String(params.timeframeDays));
723
- }
724
- if (params?.q) {
725
- searchParams.set('q', params.q);
726
- }
727
- if (params?.status && params.status !== 'all') {
728
- searchParams.set('status', params.status);
729
- }
730
- if (params?.route && params.route !== 'all') {
731
- searchParams.set('route', params.route);
732
- }
733
- if (params?.since != null) {
734
- searchParams.set('since', String(params.since));
735
- }
736
- if (params?.render && params.render !== 'all') {
737
- searchParams.set('render', params.render);
738
- }
739
- if (params?.traffic && params.traffic !== 'all') {
740
- searchParams.set('traffic', params.traffic);
741
- }
742
- if (params?.until != null) {
743
- searchParams.set('until', String(params.until));
744
- }
745
- return client.json(`/api/v1/infrastructure/monitoring/blue-green/requests${searchParams.size > 0 ? `?${searchParams.toString()}` : ''}`, {
746
- cache: 'no-store',
747
- });
748
- }
749
- async function getBlueGreenMonitoringWatcherLogArchive(params, options) {
750
- const client = (0, client_1.getInternalApiClient)(options);
751
- const searchParams = new URLSearchParams();
752
- if (params?.page != null) {
753
- searchParams.set('page', String(params.page));
754
- }
755
- if (params?.pageSize != null) {
756
- searchParams.set('pageSize', String(params.pageSize));
757
- }
758
- return client.json(`/api/v1/infrastructure/monitoring/blue-green/watcher-logs${searchParams.size > 0 ? `?${searchParams.toString()}` : ''}`, {
759
- cache: 'no-store',
760
- });
761
- }
762
- async function getCronMonitoringSnapshot(options) {
763
- const client = (0, client_1.getInternalApiClient)(options);
764
- return client.json('/api/v1/infrastructure/monitoring/cron', {
765
- cache: 'no-store',
766
- });
767
- }
768
- async function getCronMonitoringExecutionArchive(params, options) {
769
- const client = (0, client_1.getInternalApiClient)(options);
770
- const searchParams = new URLSearchParams();
771
- if (params?.page != null) {
772
- searchParams.set('page', String(params.page));
773
- }
774
- if (params?.pageSize != null) {
775
- searchParams.set('pageSize', String(params.pageSize));
776
- }
777
- if (params?.jobId) {
778
- searchParams.set('jobId', params.jobId);
779
- }
780
- return client.json(`/api/v1/infrastructure/monitoring/cron/executions${searchParams.size > 0 ? `?${searchParams.toString()}` : ''}`, {
781
- cache: 'no-store',
782
- });
783
- }
784
- async function queueCronRun(payload, options) {
785
- const client = (0, client_1.getInternalApiClient)(options);
786
- return client.json('/api/v1/infrastructure/monitoring/cron/run', {
787
- body: JSON.stringify(payload),
788
- cache: 'no-store',
789
- headers: {
790
- 'Content-Type': 'application/json',
791
- },
792
- method: 'POST',
793
- });
794
- }
795
- async function updateCronMonitoringControl(payload, options) {
796
- const client = (0, client_1.getInternalApiClient)(options);
797
- return client.json('/api/v1/infrastructure/monitoring/cron/control', {
798
- body: JSON.stringify(payload),
799
- cache: 'no-store',
800
- headers: {
801
- 'Content-Type': 'application/json',
802
- },
803
- method: 'PUT',
804
- });
805
- }
806
- async function getInfrastructureStressTestSnapshot(options) {
807
- const client = (0, client_1.getInternalApiClient)(options);
808
- return client.json('/api/v1/infrastructure/monitoring/stress-tests', {
809
- cache: 'no-store',
810
- });
811
- }
812
- async function queueInfrastructureStressTest(payload, options) {
813
- const client = (0, client_1.getInternalApiClient)(options);
814
- return client.json('/api/v1/infrastructure/monitoring/stress-tests', {
815
- body: JSON.stringify(payload),
816
- cache: 'no-store',
817
- headers: {
818
- 'Content-Type': 'application/json',
819
- },
820
- method: 'POST',
821
- });
822
- }
823
- async function getInfrastructureStressTestRun(runId, options) {
824
- const client = (0, client_1.getInternalApiClient)(options);
825
- return client.json(`/api/v1/infrastructure/monitoring/stress-tests/${(0, client_1.encodePathSegment)(runId)}`, {
826
- cache: 'no-store',
827
- });
828
- }
829
- async function abortInfrastructureStressTest(runId, payload = {}, options) {
830
- const client = (0, client_1.getInternalApiClient)(options);
831
- return client.json(`/api/v1/infrastructure/monitoring/stress-tests/${(0, client_1.encodePathSegment)(runId)}/abort`, {
832
- body: JSON.stringify(payload),
833
- cache: 'no-store',
834
- headers: {
835
- 'Content-Type': 'application/json',
836
- },
837
- method: 'POST',
838
- });
839
- }
840
- function appendObservabilitySearchParams(searchParams, params) {
841
- if (params?.page != null) {
842
- searchParams.set('page', String(params.page));
843
- }
844
- if (params?.pageSize != null) {
845
- searchParams.set('pageSize', String(params.pageSize));
846
- }
847
- if (params?.projectId) {
848
- searchParams.set('projectId', params.projectId);
849
- }
850
- if (params?.timeframeHours != null) {
851
- searchParams.set('timeframeHours', String(params.timeframeHours));
852
- }
853
- if (params?.q) {
854
- searchParams.set('q', params.q);
855
- }
856
- if (params?.route && params.route !== 'all') {
857
- searchParams.set('route', params.route);
858
- }
859
- if (params?.requestId) {
860
- searchParams.set('requestId', params.requestId);
861
- }
862
- if (params?.user) {
863
- searchParams.set('user', params.user);
864
- }
865
- if (params?.deploymentStamp) {
866
- searchParams.set('deploymentStamp', params.deploymentStamp);
867
- }
868
- if (params?.since != null) {
869
- searchParams.set('since', String(params.since));
870
- }
871
- if (params?.until != null) {
872
- searchParams.set('until', String(params.until));
873
- }
874
- if (params?.level && params.level !== 'all') {
875
- searchParams.set('level', params.level);
876
- }
877
- if (params?.source && params.source !== 'all') {
878
- searchParams.set('source', params.source);
879
- }
880
- if (params?.status && params.status !== 'all') {
881
- searchParams.set('status', params.status);
882
- }
883
- }
884
- function getObservabilityPath(path, params) {
885
- const searchParams = new URLSearchParams();
886
- appendObservabilitySearchParams(searchParams, params);
887
- return `/api/v1/infrastructure/observability/${path}${searchParams.size > 0 ? `?${searchParams.toString()}` : ''}`;
888
- }
889
- async function getObservabilityOverview(params, options) {
890
- const client = (0, client_1.getInternalApiClient)(options);
891
- return client.json(getObservabilityPath('overview', params), { cache: 'no-store' });
892
- }
893
- async function getObservabilityDeployments(params, options) {
894
- const client = (0, client_1.getInternalApiClient)(options);
895
- return client.json(getObservabilityPath('deployments', params), { cache: 'no-store' });
896
- }
897
- async function getObservabilityLogs(params, options) {
898
- const client = (0, client_1.getInternalApiClient)(options);
899
- return client.json(getObservabilityPath('logs', params), { cache: 'no-store' });
900
- }
901
- async function getObservabilityRequests(params, options) {
902
- const client = (0, client_1.getInternalApiClient)(options);
903
- return client.json(getObservabilityPath('requests', params), { cache: 'no-store' });
904
- }
905
- async function getObservabilityAnalytics(params, options) {
906
- const client = (0, client_1.getInternalApiClient)(options);
907
- return client.json(getObservabilityPath('analytics', params), { cache: 'no-store' });
908
- }
909
- async function getObservabilityCronRuns(params, options) {
910
- const client = (0, client_1.getInternalApiClient)(options);
911
- return client.json(getObservabilityPath('cron-runs', params), { cache: 'no-store' });
912
- }
913
- async function getObservabilityResources(params, options) {
914
- const client = (0, client_1.getInternalApiClient)(options);
915
- return client.json(getObservabilityPath('resources', params), { cache: 'no-store' });
916
- }
917
- async function getInfrastructureProjects(options) {
918
- const client = (0, client_1.getInternalApiClient)(options);
919
- return client.json('/api/v1/infrastructure/projects', { cache: 'no-store' });
920
- }
921
- async function createInfrastructureProject(payload, options) {
922
- const client = (0, client_1.getInternalApiClient)(options);
923
- return client.json('/api/v1/infrastructure/projects', {
924
- body: JSON.stringify(payload),
925
- cache: 'no-store',
926
- headers: {
927
- 'Content-Type': 'application/json',
928
- },
929
- method: 'POST',
930
- });
931
- }
932
- async function updateInfrastructureProject(projectId, payload, options) {
933
- const client = (0, client_1.getInternalApiClient)(options);
934
- return client.json(`/api/v1/infrastructure/projects/${encodeURIComponent(projectId)}`, {
935
- body: JSON.stringify(payload),
936
- cache: 'no-store',
937
- headers: {
938
- 'Content-Type': 'application/json',
939
- },
940
- method: 'PATCH',
941
- });
942
- }
943
- async function deleteInfrastructureProject(projectId, options) {
944
- const client = (0, client_1.getInternalApiClient)(options);
945
- return client.json(`/api/v1/infrastructure/projects/${encodeURIComponent(projectId)}`, {
946
- cache: 'no-store',
947
- method: 'DELETE',
948
- });
949
- }
950
- async function syncInfrastructureProject(projectId, options) {
951
- const client = (0, client_1.getInternalApiClient)(options);
952
- return client.json(`/api/v1/infrastructure/projects/${encodeURIComponent(projectId)}/sync`, {
953
- cache: 'no-store',
954
- method: 'POST',
955
- });
956
- }
957
- async function queueInfrastructureProjectDeploy(projectId, options) {
958
- const client = (0, client_1.getInternalApiClient)(options);
959
- return client.json(`/api/v1/infrastructure/projects/${encodeURIComponent(projectId)}/deploy`, {
960
- cache: 'no-store',
961
- method: 'POST',
962
- });
963
- }
964
- async function requestBlueGreenInstantRollout(options) {
965
- const client = (0, client_1.getInternalApiClient)(options);
966
- return client.json('/api/v1/infrastructure/monitoring/blue-green/instant-rollout', {
967
- cache: 'no-store',
968
- method: 'POST',
969
- });
970
- }
971
- async function requestBlueGreenDeploymentRevert(payload, options) {
972
- const client = (0, client_1.getInternalApiClient)(options);
973
- return client.json('/api/v1/infrastructure/monitoring/blue-green/deployment-revert', {
974
- body: JSON.stringify(payload),
975
- cache: 'no-store',
976
- headers: {
977
- 'Content-Type': 'application/json',
978
- },
979
- method: 'POST',
980
- });
981
- }
982
- async function requestBlueGreenWatcherRecovery(payload, options) {
983
- const client = (0, client_1.getInternalApiClient)(options);
984
- return client.json('/api/v1/infrastructure/monitoring/blue-green/watcher-recovery', {
985
- body: JSON.stringify(payload),
986
- cache: 'no-store',
987
- headers: {
988
- 'Content-Type': 'application/json',
989
- },
990
- method: 'POST',
991
- });
992
- }
993
- async function updateBlueGreenDockerRecoverySettings(payload, options) {
994
- const client = (0, client_1.getInternalApiClient)(options);
995
- return client.json('/api/v1/infrastructure/monitoring/blue-green/recovery-settings', {
996
- body: JSON.stringify(payload),
997
- cache: 'no-store',
998
- headers: {
999
- 'Content-Type': 'application/json',
1000
- },
1001
- method: 'PATCH',
1002
- });
1003
- }
1004
- async function pinBlueGreenDeployment(payload, options) {
1005
- const client = (0, client_1.getInternalApiClient)(options);
1006
- return client.json('/api/v1/infrastructure/monitoring/blue-green/deployment-pin', {
1007
- body: JSON.stringify(payload),
1008
- cache: 'no-store',
1009
- headers: {
1010
- 'Content-Type': 'application/json',
1011
- },
1012
- method: 'POST',
1013
- });
1014
- }
1015
- async function clearBlueGreenDeploymentPin(options) {
1016
- const client = (0, client_1.getInternalApiClient)(options);
1017
- return client.json('/api/v1/infrastructure/monitoring/blue-green/deployment-pin', {
1018
- cache: 'no-store',
1019
- method: 'DELETE',
1020
- });
1021
- }
17
+ __exportStar(require("./infrastructure/abuse"), exports);
18
+ __exportStar(require("./infrastructure/ai"), exports);
19
+ __exportStar(require("./infrastructure/apps"), exports);
20
+ __exportStar(require("./infrastructure/blocked-ips"), exports);
21
+ __exportStar(require("./infrastructure/github-bot"), exports);
22
+ __exportStar(require("./infrastructure/mobile"), exports);
23
+ __exportStar(require("./infrastructure/monitoring"), exports);
24
+ __exportStar(require("./infrastructure/realtime"), exports);
25
+ __exportStar(require("./infrastructure/types"), exports);
26
+ __exportStar(require("./infrastructure/workspace"), exports);