@tuturuuu/internal-api 0.9.0 → 0.11.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 +42 -0
- package/dist/cron.d.ts.map +1 -0
- package/dist/cron.js +76 -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 +27 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +200 -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/cron.d.ts +39 -0
- package/dist/infrastructure/cron.d.ts.map +1 -0
- package/dist/infrastructure/cron.js +47 -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 +13 -0
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/infrastructure/index.js +28 -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/native-settings.d.ts +51 -0
- package/dist/infrastructure/native-settings.d.ts.map +1 -0
- package/dist/infrastructure/native-settings.js +28 -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 +1655 -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 +12 -1725
- package/dist/infrastructure.d.ts.map +1 -1
- package/dist/infrastructure.js +26 -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-limit-appeals.d.ts +119 -0
- package/dist/rate-limit-appeals.d.ts.map +1 -0
- package/dist/rate-limit-appeals.js +62 -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/task-progress-types.d.ts +216 -0
- package/dist/task-progress-types.d.ts.map +1 -0
- package/dist/task-progress-types.js +2 -0
- package/dist/task-progress.d.ts +44 -0
- package/dist/task-progress.d.ts.map +1 -0
- package/dist/task-progress.js +102 -0
- package/dist/tasks.d.ts +213 -1
- package/dist/tasks.d.ts.map +1 -1
- package/dist/tasks.js +150 -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 +70 -1
- package/dist/users.d.ts.map +1 -1
- package/dist/users.js +90 -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/dist/workspaces.d.ts +11 -0
- package/dist/workspaces.d.ts.map +1 -1
- package/dist/workspaces.js +14 -0
- package/package.json +73 -8
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBlueGreenMonitoringSnapshot = getBlueGreenMonitoringSnapshot;
|
|
4
|
+
exports.getBlueGreenMonitoringRequestArchive = getBlueGreenMonitoringRequestArchive;
|
|
5
|
+
exports.getBlueGreenMonitoringWatcherLogArchive = getBlueGreenMonitoringWatcherLogArchive;
|
|
6
|
+
exports.getCronMonitoringSnapshot = getCronMonitoringSnapshot;
|
|
7
|
+
exports.getCronMonitoringExecutionArchive = getCronMonitoringExecutionArchive;
|
|
8
|
+
exports.queueCronRun = queueCronRun;
|
|
9
|
+
exports.updateCronMonitoringControl = updateCronMonitoringControl;
|
|
10
|
+
exports.getInfrastructureStressTestSnapshot = getInfrastructureStressTestSnapshot;
|
|
11
|
+
exports.queueInfrastructureStressTest = queueInfrastructureStressTest;
|
|
12
|
+
exports.getInfrastructureStressTestRun = getInfrastructureStressTestRun;
|
|
13
|
+
exports.abortInfrastructureStressTest = abortInfrastructureStressTest;
|
|
14
|
+
exports.getObservabilityOverview = getObservabilityOverview;
|
|
15
|
+
exports.getObservabilityDeployments = getObservabilityDeployments;
|
|
16
|
+
exports.getObservabilityLogs = getObservabilityLogs;
|
|
17
|
+
exports.getObservabilityRequests = getObservabilityRequests;
|
|
18
|
+
exports.getObservabilityAnalytics = getObservabilityAnalytics;
|
|
19
|
+
exports.getObservabilityCronRuns = getObservabilityCronRuns;
|
|
20
|
+
exports.getObservabilityResources = getObservabilityResources;
|
|
21
|
+
exports.getInfrastructureProjects = getInfrastructureProjects;
|
|
22
|
+
exports.createInfrastructureProject = createInfrastructureProject;
|
|
23
|
+
exports.updateInfrastructureProject = updateInfrastructureProject;
|
|
24
|
+
exports.deleteInfrastructureProject = deleteInfrastructureProject;
|
|
25
|
+
exports.syncInfrastructureProject = syncInfrastructureProject;
|
|
26
|
+
exports.queueInfrastructureProjectDeploy = queueInfrastructureProjectDeploy;
|
|
27
|
+
exports.requestBlueGreenInstantRollout = requestBlueGreenInstantRollout;
|
|
28
|
+
exports.requestBlueGreenDeploymentRevert = requestBlueGreenDeploymentRevert;
|
|
29
|
+
exports.requestBlueGreenWatcherRecovery = requestBlueGreenWatcherRecovery;
|
|
30
|
+
exports.updateBlueGreenDockerRecoverySettings = updateBlueGreenDockerRecoverySettings;
|
|
31
|
+
exports.pinBlueGreenDeployment = pinBlueGreenDeployment;
|
|
32
|
+
exports.clearBlueGreenDeploymentPin = clearBlueGreenDeploymentPin;
|
|
33
|
+
const client_1 = require("../client");
|
|
34
|
+
async function getBlueGreenMonitoringSnapshot(params, options) {
|
|
35
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
36
|
+
const searchParams = new URLSearchParams();
|
|
37
|
+
if (params?.requestPreviewLimit != null) {
|
|
38
|
+
searchParams.set('requestPreviewLimit', String(params.requestPreviewLimit));
|
|
39
|
+
}
|
|
40
|
+
if (params?.watcherLogLimit != null) {
|
|
41
|
+
searchParams.set('watcherLogLimit', String(params.watcherLogLimit));
|
|
42
|
+
}
|
|
43
|
+
return client.json(`/api/v1/infrastructure/monitoring/blue-green${searchParams.size > 0 ? `?${searchParams.toString()}` : ''}`, {
|
|
44
|
+
cache: 'no-store',
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
async function getBlueGreenMonitoringRequestArchive(params, options) {
|
|
48
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
49
|
+
const searchParams = new URLSearchParams();
|
|
50
|
+
if (params?.page != null) {
|
|
51
|
+
searchParams.set('page', String(params.page));
|
|
52
|
+
}
|
|
53
|
+
if (params?.pageSize != null) {
|
|
54
|
+
searchParams.set('pageSize', String(params.pageSize));
|
|
55
|
+
}
|
|
56
|
+
if (params?.timeframeDays != null) {
|
|
57
|
+
searchParams.set('timeframeDays', String(params.timeframeDays));
|
|
58
|
+
}
|
|
59
|
+
if (params?.q) {
|
|
60
|
+
searchParams.set('q', params.q);
|
|
61
|
+
}
|
|
62
|
+
if (params?.status && params.status !== 'all') {
|
|
63
|
+
searchParams.set('status', params.status);
|
|
64
|
+
}
|
|
65
|
+
if (params?.route && params.route !== 'all') {
|
|
66
|
+
searchParams.set('route', params.route);
|
|
67
|
+
}
|
|
68
|
+
if (params?.since != null) {
|
|
69
|
+
searchParams.set('since', String(params.since));
|
|
70
|
+
}
|
|
71
|
+
if (params?.render && params.render !== 'all') {
|
|
72
|
+
searchParams.set('render', params.render);
|
|
73
|
+
}
|
|
74
|
+
if (params?.traffic && params.traffic !== 'all') {
|
|
75
|
+
searchParams.set('traffic', params.traffic);
|
|
76
|
+
}
|
|
77
|
+
if (params?.until != null) {
|
|
78
|
+
searchParams.set('until', String(params.until));
|
|
79
|
+
}
|
|
80
|
+
return client.json(`/api/v1/infrastructure/monitoring/blue-green/requests${searchParams.size > 0 ? `?${searchParams.toString()}` : ''}`, {
|
|
81
|
+
cache: 'no-store',
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
async function getBlueGreenMonitoringWatcherLogArchive(params, options) {
|
|
85
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
86
|
+
const searchParams = new URLSearchParams();
|
|
87
|
+
if (params?.page != null) {
|
|
88
|
+
searchParams.set('page', String(params.page));
|
|
89
|
+
}
|
|
90
|
+
if (params?.pageSize != null) {
|
|
91
|
+
searchParams.set('pageSize', String(params.pageSize));
|
|
92
|
+
}
|
|
93
|
+
return client.json(`/api/v1/infrastructure/monitoring/blue-green/watcher-logs${searchParams.size > 0 ? `?${searchParams.toString()}` : ''}`, {
|
|
94
|
+
cache: 'no-store',
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
async function getCronMonitoringSnapshot(options) {
|
|
98
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
99
|
+
return client.json('/api/v1/infrastructure/monitoring/cron', {
|
|
100
|
+
cache: 'no-store',
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
async function getCronMonitoringExecutionArchive(params, options) {
|
|
104
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
105
|
+
const searchParams = new URLSearchParams();
|
|
106
|
+
if (params?.page != null) {
|
|
107
|
+
searchParams.set('page', String(params.page));
|
|
108
|
+
}
|
|
109
|
+
if (params?.pageSize != null) {
|
|
110
|
+
searchParams.set('pageSize', String(params.pageSize));
|
|
111
|
+
}
|
|
112
|
+
if (params?.jobId) {
|
|
113
|
+
searchParams.set('jobId', params.jobId);
|
|
114
|
+
}
|
|
115
|
+
return client.json(`/api/v1/infrastructure/monitoring/cron/executions${searchParams.size > 0 ? `?${searchParams.toString()}` : ''}`, {
|
|
116
|
+
cache: 'no-store',
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
async function queueCronRun(payload, options) {
|
|
120
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
121
|
+
return client.json('/api/v1/infrastructure/monitoring/cron/run', {
|
|
122
|
+
body: JSON.stringify(payload),
|
|
123
|
+
cache: 'no-store',
|
|
124
|
+
headers: {
|
|
125
|
+
'Content-Type': 'application/json',
|
|
126
|
+
},
|
|
127
|
+
method: 'POST',
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
async function updateCronMonitoringControl(payload, options) {
|
|
131
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
132
|
+
return client.json('/api/v1/infrastructure/monitoring/cron/control', {
|
|
133
|
+
body: JSON.stringify(payload),
|
|
134
|
+
cache: 'no-store',
|
|
135
|
+
headers: {
|
|
136
|
+
'Content-Type': 'application/json',
|
|
137
|
+
},
|
|
138
|
+
method: 'PUT',
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
async function getInfrastructureStressTestSnapshot(options) {
|
|
142
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
143
|
+
return client.json('/api/v1/infrastructure/monitoring/stress-tests', {
|
|
144
|
+
cache: 'no-store',
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
async function queueInfrastructureStressTest(payload, options) {
|
|
148
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
149
|
+
return client.json('/api/v1/infrastructure/monitoring/stress-tests', {
|
|
150
|
+
body: JSON.stringify(payload),
|
|
151
|
+
cache: 'no-store',
|
|
152
|
+
headers: {
|
|
153
|
+
'Content-Type': 'application/json',
|
|
154
|
+
},
|
|
155
|
+
method: 'POST',
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
async function getInfrastructureStressTestRun(runId, options) {
|
|
159
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
160
|
+
return client.json(`/api/v1/infrastructure/monitoring/stress-tests/${(0, client_1.encodePathSegment)(runId)}`, {
|
|
161
|
+
cache: 'no-store',
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
async function abortInfrastructureStressTest(runId, payload = {}, options) {
|
|
165
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
166
|
+
return client.json(`/api/v1/infrastructure/monitoring/stress-tests/${(0, client_1.encodePathSegment)(runId)}/abort`, {
|
|
167
|
+
body: JSON.stringify(payload),
|
|
168
|
+
cache: 'no-store',
|
|
169
|
+
headers: {
|
|
170
|
+
'Content-Type': 'application/json',
|
|
171
|
+
},
|
|
172
|
+
method: 'POST',
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function appendObservabilitySearchParams(searchParams, params) {
|
|
176
|
+
if (params?.page != null) {
|
|
177
|
+
searchParams.set('page', String(params.page));
|
|
178
|
+
}
|
|
179
|
+
if (params?.pageSize != null) {
|
|
180
|
+
searchParams.set('pageSize', String(params.pageSize));
|
|
181
|
+
}
|
|
182
|
+
if (params?.projectId) {
|
|
183
|
+
searchParams.set('projectId', params.projectId);
|
|
184
|
+
}
|
|
185
|
+
if (params?.timeframeHours != null) {
|
|
186
|
+
searchParams.set('timeframeHours', String(params.timeframeHours));
|
|
187
|
+
}
|
|
188
|
+
if (params?.q) {
|
|
189
|
+
searchParams.set('q', params.q);
|
|
190
|
+
}
|
|
191
|
+
if (params?.route && params.route !== 'all') {
|
|
192
|
+
searchParams.set('route', params.route);
|
|
193
|
+
}
|
|
194
|
+
if (params?.requestId) {
|
|
195
|
+
searchParams.set('requestId', params.requestId);
|
|
196
|
+
}
|
|
197
|
+
if (params?.user) {
|
|
198
|
+
searchParams.set('user', params.user);
|
|
199
|
+
}
|
|
200
|
+
if (params?.deploymentStamp) {
|
|
201
|
+
searchParams.set('deploymentStamp', params.deploymentStamp);
|
|
202
|
+
}
|
|
203
|
+
if (params?.since != null) {
|
|
204
|
+
searchParams.set('since', String(params.since));
|
|
205
|
+
}
|
|
206
|
+
if (params?.until != null) {
|
|
207
|
+
searchParams.set('until', String(params.until));
|
|
208
|
+
}
|
|
209
|
+
if (params?.level && params.level !== 'all') {
|
|
210
|
+
searchParams.set('level', params.level);
|
|
211
|
+
}
|
|
212
|
+
if (params?.source && params.source !== 'all') {
|
|
213
|
+
searchParams.set('source', params.source);
|
|
214
|
+
}
|
|
215
|
+
if (params?.status && params.status !== 'all') {
|
|
216
|
+
searchParams.set('status', params.status);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
function getObservabilityPath(path, params) {
|
|
220
|
+
const searchParams = new URLSearchParams();
|
|
221
|
+
appendObservabilitySearchParams(searchParams, params);
|
|
222
|
+
return `/api/v1/infrastructure/observability/${path}${searchParams.size > 0 ? `?${searchParams.toString()}` : ''}`;
|
|
223
|
+
}
|
|
224
|
+
async function getObservabilityOverview(params, options) {
|
|
225
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
226
|
+
return client.json(getObservabilityPath('overview', params), { cache: 'no-store' });
|
|
227
|
+
}
|
|
228
|
+
async function getObservabilityDeployments(params, options) {
|
|
229
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
230
|
+
return client.json(getObservabilityPath('deployments', params), { cache: 'no-store' });
|
|
231
|
+
}
|
|
232
|
+
async function getObservabilityLogs(params, options) {
|
|
233
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
234
|
+
return client.json(getObservabilityPath('logs', params), { cache: 'no-store' });
|
|
235
|
+
}
|
|
236
|
+
async function getObservabilityRequests(params, options) {
|
|
237
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
238
|
+
return client.json(getObservabilityPath('requests', params), { cache: 'no-store' });
|
|
239
|
+
}
|
|
240
|
+
async function getObservabilityAnalytics(params, options) {
|
|
241
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
242
|
+
return client.json(getObservabilityPath('analytics', params), { cache: 'no-store' });
|
|
243
|
+
}
|
|
244
|
+
async function getObservabilityCronRuns(params, options) {
|
|
245
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
246
|
+
return client.json(getObservabilityPath('cron-runs', params), { cache: 'no-store' });
|
|
247
|
+
}
|
|
248
|
+
async function getObservabilityResources(params, options) {
|
|
249
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
250
|
+
return client.json(getObservabilityPath('resources', params), { cache: 'no-store' });
|
|
251
|
+
}
|
|
252
|
+
async function getInfrastructureProjects(options) {
|
|
253
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
254
|
+
return client.json('/api/v1/infrastructure/projects', { cache: 'no-store' });
|
|
255
|
+
}
|
|
256
|
+
async function createInfrastructureProject(payload, options) {
|
|
257
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
258
|
+
return client.json('/api/v1/infrastructure/projects', {
|
|
259
|
+
body: JSON.stringify(payload),
|
|
260
|
+
cache: 'no-store',
|
|
261
|
+
headers: {
|
|
262
|
+
'Content-Type': 'application/json',
|
|
263
|
+
},
|
|
264
|
+
method: 'POST',
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
async function updateInfrastructureProject(projectId, payload, options) {
|
|
268
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
269
|
+
return client.json(`/api/v1/infrastructure/projects/${encodeURIComponent(projectId)}`, {
|
|
270
|
+
body: JSON.stringify(payload),
|
|
271
|
+
cache: 'no-store',
|
|
272
|
+
headers: {
|
|
273
|
+
'Content-Type': 'application/json',
|
|
274
|
+
},
|
|
275
|
+
method: 'PATCH',
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
async function deleteInfrastructureProject(projectId, options) {
|
|
279
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
280
|
+
return client.json(`/api/v1/infrastructure/projects/${encodeURIComponent(projectId)}`, {
|
|
281
|
+
cache: 'no-store',
|
|
282
|
+
method: 'DELETE',
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
async function syncInfrastructureProject(projectId, options) {
|
|
286
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
287
|
+
return client.json(`/api/v1/infrastructure/projects/${encodeURIComponent(projectId)}/sync`, {
|
|
288
|
+
cache: 'no-store',
|
|
289
|
+
method: 'POST',
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
async function queueInfrastructureProjectDeploy(projectId, options) {
|
|
293
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
294
|
+
return client.json(`/api/v1/infrastructure/projects/${encodeURIComponent(projectId)}/deploy`, {
|
|
295
|
+
cache: 'no-store',
|
|
296
|
+
method: 'POST',
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
async function requestBlueGreenInstantRollout(options) {
|
|
300
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
301
|
+
return client.json('/api/v1/infrastructure/monitoring/blue-green/instant-rollout', {
|
|
302
|
+
cache: 'no-store',
|
|
303
|
+
method: 'POST',
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
async function requestBlueGreenDeploymentRevert(payload, options) {
|
|
307
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
308
|
+
return client.json('/api/v1/infrastructure/monitoring/blue-green/deployment-revert', {
|
|
309
|
+
body: JSON.stringify(payload),
|
|
310
|
+
cache: 'no-store',
|
|
311
|
+
headers: {
|
|
312
|
+
'Content-Type': 'application/json',
|
|
313
|
+
},
|
|
314
|
+
method: 'POST',
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
async function requestBlueGreenWatcherRecovery(payload, options) {
|
|
318
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
319
|
+
return client.json('/api/v1/infrastructure/monitoring/blue-green/watcher-recovery', {
|
|
320
|
+
body: JSON.stringify(payload),
|
|
321
|
+
cache: 'no-store',
|
|
322
|
+
headers: {
|
|
323
|
+
'Content-Type': 'application/json',
|
|
324
|
+
},
|
|
325
|
+
method: 'POST',
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
async function updateBlueGreenDockerRecoverySettings(payload, options) {
|
|
329
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
330
|
+
return client.json('/api/v1/infrastructure/monitoring/blue-green/recovery-settings', {
|
|
331
|
+
body: JSON.stringify(payload),
|
|
332
|
+
cache: 'no-store',
|
|
333
|
+
headers: {
|
|
334
|
+
'Content-Type': 'application/json',
|
|
335
|
+
},
|
|
336
|
+
method: 'PATCH',
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
async function pinBlueGreenDeployment(payload, options) {
|
|
340
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
341
|
+
return client.json('/api/v1/infrastructure/monitoring/blue-green/deployment-pin', {
|
|
342
|
+
body: JSON.stringify(payload),
|
|
343
|
+
cache: 'no-store',
|
|
344
|
+
headers: {
|
|
345
|
+
'Content-Type': 'application/json',
|
|
346
|
+
},
|
|
347
|
+
method: 'POST',
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
async function clearBlueGreenDeploymentPin(options) {
|
|
351
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
352
|
+
return client.json('/api/v1/infrastructure/monitoring/blue-green/deployment-pin', {
|
|
353
|
+
cache: 'no-store',
|
|
354
|
+
method: 'DELETE',
|
|
355
|
+
});
|
|
356
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type InternalApiClientOptions } from '../client';
|
|
2
|
+
export type NativeSettingsMetric = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: number | string;
|
|
5
|
+
};
|
|
6
|
+
export type CalendarSyncSettingsSnapshot = {
|
|
7
|
+
logs: Record<string, unknown>[];
|
|
8
|
+
metrics: NativeSettingsMetric[];
|
|
9
|
+
totalCount: number;
|
|
10
|
+
};
|
|
11
|
+
export type DevboxSettingsSnapshot = {
|
|
12
|
+
caches: Record<string, unknown>[];
|
|
13
|
+
events: Record<string, unknown>[];
|
|
14
|
+
leases: Record<string, unknown>[];
|
|
15
|
+
metrics: Record<string, number>;
|
|
16
|
+
runners: Record<string, unknown>[];
|
|
17
|
+
runs: Record<string, unknown>[];
|
|
18
|
+
};
|
|
19
|
+
export type EmailAuditSettingsSnapshot = {
|
|
20
|
+
count: number;
|
|
21
|
+
data: Record<string, unknown>[];
|
|
22
|
+
stats: {
|
|
23
|
+
failed: number;
|
|
24
|
+
rateLimited: number;
|
|
25
|
+
sent: number;
|
|
26
|
+
total: number;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export type EntityCreationLimitsSettingsSnapshot = {
|
|
30
|
+
availableTables: Record<string, unknown>[];
|
|
31
|
+
tableGroups: Record<string, unknown>[];
|
|
32
|
+
};
|
|
33
|
+
export type PushNotificationsSettingsSnapshot = {
|
|
34
|
+
canManagePush: boolean;
|
|
35
|
+
config: {
|
|
36
|
+
message: string;
|
|
37
|
+
projectId: string | null;
|
|
38
|
+
source: string;
|
|
39
|
+
state: string;
|
|
40
|
+
};
|
|
41
|
+
coverage: Record<string, Record<string, number>>;
|
|
42
|
+
recentBatches: Record<string, unknown>[];
|
|
43
|
+
recentDevices: Record<string, unknown>[];
|
|
44
|
+
summary: Record<string, number>;
|
|
45
|
+
};
|
|
46
|
+
export declare function getCalendarSyncSettingsSnapshot(workspaceId: string, options?: InternalApiClientOptions): Promise<CalendarSyncSettingsSnapshot>;
|
|
47
|
+
export declare function getDevboxSettingsSnapshot(options?: InternalApiClientOptions): Promise<DevboxSettingsSnapshot>;
|
|
48
|
+
export declare function getEmailAuditSettingsSnapshot(workspaceId: string, options?: InternalApiClientOptions): Promise<EmailAuditSettingsSnapshot>;
|
|
49
|
+
export declare function getEntityCreationLimitsSettingsSnapshot(options?: InternalApiClientOptions): Promise<EntityCreationLimitsSettingsSnapshot>;
|
|
50
|
+
export declare function getPushNotificationsSettingsSnapshot(options?: InternalApiClientOptions): Promise<PushNotificationsSettingsSnapshot>;
|
|
51
|
+
//# sourceMappingURL=native-settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-settings.d.ts","sourceRoot":"","sources":["../../src/infrastructure/native-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,WAAW,CAAC;AAEnB,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAChC,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAClC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAClC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,0BAA0B,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EAAE,wBAAwB,iDAQnC;AAED,wBAAsB,oCAAoC,CACxD,OAAO,CAAC,EAAE,wBAAwB,8CAQnC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCalendarSyncSettingsSnapshot = getCalendarSyncSettingsSnapshot;
|
|
4
|
+
exports.getDevboxSettingsSnapshot = getDevboxSettingsSnapshot;
|
|
5
|
+
exports.getEmailAuditSettingsSnapshot = getEmailAuditSettingsSnapshot;
|
|
6
|
+
exports.getEntityCreationLimitsSettingsSnapshot = getEntityCreationLimitsSettingsSnapshot;
|
|
7
|
+
exports.getPushNotificationsSettingsSnapshot = getPushNotificationsSettingsSnapshot;
|
|
8
|
+
const client_1 = require("../client");
|
|
9
|
+
async function getCalendarSyncSettingsSnapshot(workspaceId, options) {
|
|
10
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
11
|
+
return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/settings/calendar-sync`, { cache: 'no-store' });
|
|
12
|
+
}
|
|
13
|
+
async function getDevboxSettingsSnapshot(options) {
|
|
14
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
15
|
+
return client.json('/api/v1/infrastructure/devboxes', { cache: 'no-store' });
|
|
16
|
+
}
|
|
17
|
+
async function getEmailAuditSettingsSnapshot(workspaceId, options) {
|
|
18
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
19
|
+
return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(workspaceId)}/settings/email-audit`, { cache: 'no-store' });
|
|
20
|
+
}
|
|
21
|
+
async function getEntityCreationLimitsSettingsSnapshot(options) {
|
|
22
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
23
|
+
return client.json('/api/v1/infrastructure/entity-creation-limits', { cache: 'no-store' });
|
|
24
|
+
}
|
|
25
|
+
async function getPushNotificationsSettingsSnapshot(options) {
|
|
26
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
27
|
+
return client.json('/api/v1/infrastructure/push-notifications', { cache: 'no-store' });
|
|
28
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type InternalApiClientOptions } from '../client';
|
|
2
|
+
export type RealtimeAnalyticsMetric = 'requests' | 'users';
|
|
3
|
+
export type RealtimeAnalyticsViewMode = 'daily' | 'hourly';
|
|
4
|
+
export type RealtimeAnalyticsQuery = {
|
|
5
|
+
channelId?: string;
|
|
6
|
+
endDate: string;
|
|
7
|
+
metric?: RealtimeAnalyticsMetric;
|
|
8
|
+
startDate: string;
|
|
9
|
+
viewMode?: RealtimeAnalyticsViewMode;
|
|
10
|
+
workspaceId?: string;
|
|
11
|
+
};
|
|
12
|
+
export type RealtimeAnalyticsRow = {
|
|
13
|
+
time_bucket: string;
|
|
14
|
+
total_count: number;
|
|
15
|
+
user_id: string | null;
|
|
16
|
+
};
|
|
17
|
+
export type RealtimeAnalyticsResponse = {
|
|
18
|
+
data: RealtimeAnalyticsRow[];
|
|
19
|
+
metric: RealtimeAnalyticsMetric;
|
|
20
|
+
};
|
|
21
|
+
export type RealtimeAnalyticsSummary = {
|
|
22
|
+
avgRequestsPerHour: number;
|
|
23
|
+
errorRate: number;
|
|
24
|
+
peakHour: null | string;
|
|
25
|
+
peakHourCount: number;
|
|
26
|
+
requestsByKind: Record<string, number>;
|
|
27
|
+
totalErrors: number;
|
|
28
|
+
totalRequests: number;
|
|
29
|
+
uniqueChannels: number;
|
|
30
|
+
uniqueUsers: number;
|
|
31
|
+
uniqueWorkspaces: number;
|
|
32
|
+
};
|
|
33
|
+
export type RealtimeConsumer = {
|
|
34
|
+
errorRate: number;
|
|
35
|
+
errors: number;
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
requests: number;
|
|
39
|
+
};
|
|
40
|
+
export type RealtimeErrorBreakdown = {
|
|
41
|
+
errorRate: number;
|
|
42
|
+
errors: number;
|
|
43
|
+
kind: string;
|
|
44
|
+
total: number;
|
|
45
|
+
};
|
|
46
|
+
export type RealtimeAnalyticsSummaryResponse = {
|
|
47
|
+
errorBreakdown: RealtimeErrorBreakdown[];
|
|
48
|
+
summary: RealtimeAnalyticsSummary;
|
|
49
|
+
topChannels: RealtimeConsumer[];
|
|
50
|
+
topUsers: RealtimeConsumer[];
|
|
51
|
+
topWorkspaces: RealtimeConsumer[];
|
|
52
|
+
};
|
|
53
|
+
export declare function getWorkspaceRealtimeAnalytics(wsId: string, query: RealtimeAnalyticsQuery, options?: InternalApiClientOptions): Promise<RealtimeAnalyticsResponse>;
|
|
54
|
+
export declare function getWorkspaceRealtimeAnalyticsSummary(wsId: string, query: Omit<RealtimeAnalyticsQuery, 'metric' | 'viewMode'>, options?: InternalApiClientOptions): Promise<RealtimeAnalyticsSummaryResponse>;
|
|
55
|
+
//# sourceMappingURL=realtime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime.d.ts","sourceRoot":"","sources":["../../src/infrastructure/realtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,wBAAwB,EAE9B,MAAM,WAAW,CAAC;AAEnB,MAAM,MAAM,uBAAuB,GAAG,UAAU,GAAG,OAAO,CAAC;AAC3D,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE3D,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;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ED,wBAAsB,oCAAoC,CACxD,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,IAAI,CAAC,sBAAsB,EAAE,QAAQ,GAAG,UAAU,CAAC,EAC1D,OAAO,CAAC,EAAE,wBAAwB,6CAWnC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWorkspaceRealtimeAnalytics = getWorkspaceRealtimeAnalytics;
|
|
4
|
+
exports.getWorkspaceRealtimeAnalyticsSummary = getWorkspaceRealtimeAnalyticsSummary;
|
|
5
|
+
const client_1 = require("../client");
|
|
6
|
+
function realtimeAnalyticsQuery(query) {
|
|
7
|
+
return {
|
|
8
|
+
channelId: query.channelId || undefined,
|
|
9
|
+
endDate: query.endDate,
|
|
10
|
+
metric: query.metric,
|
|
11
|
+
startDate: query.startDate,
|
|
12
|
+
viewMode: query.viewMode,
|
|
13
|
+
workspaceId: query.workspaceId || undefined,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
async function getWorkspaceRealtimeAnalytics(wsId, query, options) {
|
|
17
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
18
|
+
return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(wsId)}/infrastructure/realtime/analytics`, {
|
|
19
|
+
cache: 'no-store',
|
|
20
|
+
query: realtimeAnalyticsQuery(query),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
async function getWorkspaceRealtimeAnalyticsSummary(wsId, query, options) {
|
|
24
|
+
const client = (0, client_1.getInternalApiClient)(options);
|
|
25
|
+
return client.json(`/api/v1/workspaces/${(0, client_1.encodePathSegment)(wsId)}/infrastructure/realtime/analytics/summary`, {
|
|
26
|
+
cache: 'no-store',
|
|
27
|
+
query: realtimeAnalyticsQuery(query),
|
|
28
|
+
});
|
|
29
|
+
}
|