@tuturuuu/internal-api 0.0.2 → 0.2.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 (114) hide show
  1. package/dist/ai-memory.d.ts +76 -0
  2. package/dist/ai-memory.d.ts.map +1 -0
  3. package/dist/ai-memory.js +59 -0
  4. package/dist/ai.d.ts +67 -3
  5. package/dist/ai.d.ts.map +1 -1
  6. package/dist/ai.js +121 -0
  7. package/dist/auth.d.ts +143 -1
  8. package/dist/auth.d.ts.map +1 -1
  9. package/dist/auth.js +143 -0
  10. package/dist/calendar.d.ts +60 -1
  11. package/dist/calendar.d.ts.map +1 -1
  12. package/dist/calendar.js +27 -0
  13. package/dist/chat-conversations.d.ts +81 -0
  14. package/dist/chat-conversations.d.ts.map +1 -0
  15. package/dist/chat-conversations.js +384 -0
  16. package/dist/chat-internal.d.ts +11 -0
  17. package/dist/chat-internal.d.ts.map +1 -0
  18. package/dist/chat-internal.js +39 -0
  19. package/dist/chat-legacy.d.ts +23 -0
  20. package/dist/chat-legacy.d.ts.map +1 -0
  21. package/dist/chat-legacy.js +68 -0
  22. package/dist/chat-types.d.ts +262 -0
  23. package/dist/chat-types.d.ts.map +1 -0
  24. package/dist/chat-types.js +2 -0
  25. package/dist/chat.d.ts +3 -45
  26. package/dist/chat.d.ts.map +1 -1
  27. package/dist/chat.js +17 -65
  28. package/dist/client.d.ts +5 -0
  29. package/dist/client.d.ts.map +1 -1
  30. package/dist/client.js +109 -8
  31. package/dist/education.d.ts +288 -2
  32. package/dist/education.d.ts.map +1 -1
  33. package/dist/education.js +176 -0
  34. package/dist/external-project-team.d.ts +51 -0
  35. package/dist/external-project-team.d.ts.map +1 -0
  36. package/dist/external-project-team.js +137 -0
  37. package/dist/external-projects.d.ts +89 -9
  38. package/dist/external-projects.d.ts.map +1 -1
  39. package/dist/external-projects.js +80 -31
  40. package/dist/finance.d.ts +491 -3
  41. package/dist/finance.d.ts.map +1 -1
  42. package/dist/finance.js +611 -1
  43. package/dist/hive.d.ts +739 -0
  44. package/dist/hive.d.ts.map +1 -0
  45. package/dist/hive.js +333 -0
  46. package/dist/index.d.ts +33 -19
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +361 -8
  49. package/dist/infrastructure.d.ts +1085 -1
  50. package/dist/infrastructure.d.ts.map +1 -1
  51. package/dist/infrastructure.js +652 -0
  52. package/dist/inventory.d.ts +355 -0
  53. package/dist/inventory.d.ts.map +1 -0
  54. package/dist/inventory.js +268 -0
  55. package/dist/mail.d.ts +125 -0
  56. package/dist/mail.d.ts.map +1 -1
  57. package/dist/mail.js +112 -1
  58. package/dist/meet.d.ts +54 -0
  59. package/dist/meet.d.ts.map +1 -0
  60. package/dist/meet.js +37 -0
  61. package/dist/mind.d.ts +55 -0
  62. package/dist/mind.d.ts.map +1 -0
  63. package/dist/mind.js +84 -0
  64. package/dist/posts.d.ts +33 -0
  65. package/dist/posts.d.ts.map +1 -1
  66. package/dist/posts.js +42 -0
  67. package/dist/promotions.d.ts +54 -0
  68. package/dist/promotions.d.ts.map +1 -1
  69. package/dist/promotions.js +52 -0
  70. package/dist/settings.d.ts +28 -1
  71. package/dist/settings.d.ts.map +1 -1
  72. package/dist/settings.js +68 -0
  73. package/dist/storage.d.ts +33 -21
  74. package/dist/storage.d.ts.map +1 -1
  75. package/dist/storage.js +53 -32
  76. package/dist/tasks-scheduling.d.ts +29 -0
  77. package/dist/tasks-scheduling.d.ts.map +1 -1
  78. package/dist/tasks-scheduling.js +20 -0
  79. package/dist/tasks.d.ts +239 -4
  80. package/dist/tasks.d.ts.map +1 -1
  81. package/dist/tasks.js +213 -0
  82. package/dist/teach.d.ts +130 -0
  83. package/dist/teach.d.ts.map +1 -0
  84. package/dist/teach.js +110 -0
  85. package/dist/topic-announcements.d.ts +235 -0
  86. package/dist/topic-announcements.d.ts.map +1 -0
  87. package/dist/topic-announcements.js +182 -0
  88. package/dist/tulearn.d.ts +223 -0
  89. package/dist/tulearn.d.ts.map +1 -0
  90. package/dist/tulearn.js +97 -0
  91. package/dist/tutoring.d.ts +152 -0
  92. package/dist/tutoring.d.ts.map +1 -0
  93. package/dist/tutoring.js +58 -0
  94. package/dist/user-group-activity.d.ts +54 -0
  95. package/dist/user-group-activity.d.ts.map +1 -0
  96. package/dist/user-group-activity.js +11 -0
  97. package/dist/user-groups.d.ts +35 -0
  98. package/dist/user-groups.d.ts.map +1 -0
  99. package/dist/user-groups.js +84 -0
  100. package/dist/users.d.ts +101 -1
  101. package/dist/users.d.ts.map +1 -1
  102. package/dist/users.js +178 -0
  103. package/dist/workspace-config-ids.d.ts +9 -0
  104. package/dist/workspace-config-ids.d.ts.map +1 -0
  105. package/dist/workspace-config-ids.js +11 -0
  106. package/dist/workspace-configs.d.ts +1 -7
  107. package/dist/workspace-configs.d.ts.map +1 -1
  108. package/dist/workspace-configs.js +14 -10
  109. package/dist/workspace-user-audit.d.ts +1 -0
  110. package/dist/workspace-user-audit.d.ts.map +1 -1
  111. package/dist/workspaces.d.ts +57 -0
  112. package/dist/workspaces.d.ts.map +1 -1
  113. package/dist/workspaces.js +58 -1
  114. package/package.json +65 -7
@@ -1,3 +1,5 @@
1
+ import type { AIModelUI, AIWhitelistDomain, AIWhitelistEmail } from '@tuturuuu/types';
2
+ import type { ChatMessage } from './chat-types';
1
3
  import { type InternalApiClientOptions } from './client';
2
4
  export interface MobilePlatformVersionPolicyPayload {
3
5
  effectiveVersion: string | null;
@@ -10,6 +12,373 @@ export interface MobileVersionPoliciesPayload {
10
12
  ios: MobilePlatformVersionPolicyPayload;
11
13
  webOtpEnabled: boolean;
12
14
  }
15
+ export interface ExternalAppRegistration {
16
+ allowedScopes: string[];
17
+ createdAt: string | null;
18
+ createdBy: string | null;
19
+ displayName: string;
20
+ enabled: boolean;
21
+ id: string;
22
+ origins: string[];
23
+ secretIssuedAt: string | null;
24
+ secretLastFour: string | null;
25
+ updatedAt: string | null;
26
+ updatedBy: string | null;
27
+ }
28
+ export interface ExternalAppsResponse {
29
+ apps: ExternalAppRegistration[];
30
+ }
31
+ export type AiAgentAdapter = 'discord' | 'zalo';
32
+ export type AiAgentChannelStatus = 'draft' | 'deployed' | 'error' | 'paused';
33
+ export type AiAgentZaloAccountMode = 'official' | 'personal';
34
+ export interface AiAgentSecretDescriptor {
35
+ configured: boolean;
36
+ lastFour: string | null;
37
+ name: string;
38
+ }
39
+ export interface AiAgentChannelConfig {
40
+ adapter: AiAgentAdapter;
41
+ displayName: string;
42
+ enabled: boolean;
43
+ id: string;
44
+ lastDeployedAt: string | null;
45
+ lastError: string | null;
46
+ lastEventAt: string | null;
47
+ mentionRoleIds: string[];
48
+ secrets: AiAgentSecretDescriptor[];
49
+ status: AiAgentChannelStatus;
50
+ webhookUrl: string | null;
51
+ workspaceId: string;
52
+ autoRespond?: boolean;
53
+ discordGuildId?: string | null;
54
+ externalChannelId?: string | null;
55
+ historySyncEnabled?: boolean;
56
+ zaloAccountMode?: AiAgentZaloAccountMode;
57
+ zaloOfficialAccountId?: string | null;
58
+ zaloPersonalOwnId?: string | null;
59
+ }
60
+ export interface AiAgentDefinition {
61
+ channels: AiAgentChannelConfig[];
62
+ createdAt: string | null;
63
+ enabled: boolean;
64
+ id: string;
65
+ instructions: string;
66
+ modelId: string;
67
+ name: string;
68
+ temperature: number | null;
69
+ tools: string[];
70
+ updatedAt: string | null;
71
+ }
72
+ export interface AiAgentIdentityLink {
73
+ externalUserId: string;
74
+ platformUserId: string;
75
+ provider: 'zalo';
76
+ providerAccountId: string;
77
+ workspaceId: string;
78
+ }
79
+ export interface AiAgentsResponse {
80
+ agents: AiAgentDefinition[];
81
+ identities: AiAgentIdentityLink[];
82
+ }
83
+ export interface AiAgentExternalThread {
84
+ adapter: AiAgentAdapter;
85
+ agentId: string;
86
+ channelId: string;
87
+ conversationId: string;
88
+ createdAt: string;
89
+ externalChannelId: string | null;
90
+ externalThreadId: string;
91
+ id: string;
92
+ lastEventAt: string | null;
93
+ lastSyncedAt: string | null;
94
+ latestMessage: ChatMessage | null;
95
+ messageCount: number;
96
+ metadata: Record<string, unknown>;
97
+ title: string | null;
98
+ updatedAt: string;
99
+ wsId: string;
100
+ }
101
+ export interface AiAgentExternalThreadsResponse {
102
+ threads: AiAgentExternalThread[];
103
+ }
104
+ export interface AiAgentExternalMessagesResponse {
105
+ messages: ChatMessage[];
106
+ }
107
+ export interface AiAgentExternalSyncResponse {
108
+ message: string | null;
109
+ ok: boolean;
110
+ synced: number;
111
+ }
112
+ export interface AiAgentExternalDraftResponse {
113
+ draft: string;
114
+ sourceMessages: number;
115
+ }
116
+ export interface InternalAppSessionPolicyOverride {
117
+ internalAppAccessTtlSeconds?: number;
118
+ internalAppRefreshEarlySeconds?: number;
119
+ internalAppRefreshTtlSeconds?: number;
120
+ }
121
+ export interface AppCoordinationSessionPolicy {
122
+ browserRefreshReplayGraceSeconds: number;
123
+ cliAccessTtlSeconds: number;
124
+ cliRefreshTtlSeconds: number;
125
+ externalAppBearerTtlSeconds: number;
126
+ internalAppAccessTtlSeconds: number;
127
+ internalAppOverrides: Record<string, InternalAppSessionPolicyOverride>;
128
+ internalAppRefreshEarlySeconds: number;
129
+ internalAppRefreshTtlSeconds: number;
130
+ }
131
+ export interface AppCoordinationSessionPolicyResponse {
132
+ policy: AppCoordinationSessionPolicy;
133
+ source: 'default' | 'environment' | 'secret';
134
+ }
135
+ export interface AIWhitelistDomainsResponse {
136
+ count: number;
137
+ data: AIWhitelistDomain[];
138
+ }
139
+ export interface AIWhitelistDomainResponse {
140
+ data: AIWhitelistDomain;
141
+ }
142
+ export interface AIWhitelistEmailsResponse {
143
+ count: number;
144
+ data: AIWhitelistEmail[];
145
+ }
146
+ export interface AIWhitelistEmailResponse {
147
+ data: AIWhitelistEmail;
148
+ }
149
+ export interface ListAiGatewayModelsParams {
150
+ enabled?: boolean;
151
+ ids?: string[];
152
+ q?: string;
153
+ provider?: string;
154
+ tag?: string;
155
+ type?: 'all' | 'embedding' | 'image' | 'language';
156
+ }
157
+ export interface ListAiGatewayModelsPageParams extends ListAiGatewayModelsParams {
158
+ limit?: number | string;
159
+ page?: number | string;
160
+ }
161
+ export interface AiGatewayModelsPage {
162
+ data: AIModelUI[];
163
+ pagination: {
164
+ limit: number;
165
+ page: number;
166
+ total: number;
167
+ };
168
+ }
169
+ export interface ResolveInfrastructureWorkspaceIdResponse {
170
+ workspaceId: string | null;
171
+ }
172
+ export interface ListAIWhitelistDomainsParams {
173
+ page?: number | string;
174
+ pageSize?: number | string;
175
+ q?: string;
176
+ }
177
+ export interface ListAIWhitelistEmailsParams {
178
+ page?: number | string;
179
+ pageSize?: number | string;
180
+ q?: string;
181
+ }
182
+ export type CreateAIWhitelistDomainPayload = Pick<AIWhitelistDomain, 'description' | 'domain'> & Partial<Pick<AIWhitelistDomain, 'enabled'>>;
183
+ export type UpdateAIWhitelistDomainPayload = Pick<AIWhitelistDomain, 'enabled'>;
184
+ export type CreateAIWhitelistEmailPayload = Pick<AIWhitelistEmail, 'email'> & Partial<Pick<AIWhitelistEmail, 'enabled'>>;
185
+ export type UpdateAIWhitelistEmailPayload = Pick<AIWhitelistEmail, 'enabled'>;
186
+ export interface SaveExternalAppPayload {
187
+ allowedScopes?: string[];
188
+ displayName: string;
189
+ enabled: boolean;
190
+ id: string;
191
+ issueSecret?: boolean;
192
+ origins: string[];
193
+ }
194
+ export interface SaveExternalAppResponse {
195
+ app: ExternalAppRegistration;
196
+ secret: string | null;
197
+ }
198
+ export interface SaveAiAgentPayload {
199
+ channels?: Array<{
200
+ adapter: AiAgentAdapter;
201
+ displayName?: string;
202
+ enabled?: boolean;
203
+ id: string;
204
+ mentionRoleIds?: string[];
205
+ secrets?: Record<string, string | null | undefined>;
206
+ status?: AiAgentChannelStatus;
207
+ workspaceId: string;
208
+ autoRespond?: boolean;
209
+ discordGuildId?: string | null;
210
+ externalChannelId?: string | null;
211
+ historySyncEnabled?: boolean;
212
+ zaloAccountMode?: AiAgentZaloAccountMode;
213
+ zaloOfficialAccountId?: string | null;
214
+ zaloPersonalOwnId?: string | null;
215
+ }>;
216
+ enabled?: boolean;
217
+ id: string;
218
+ instructions?: string;
219
+ modelId?: string;
220
+ name: string;
221
+ temperature?: number | null;
222
+ tools?: string[];
223
+ }
224
+ export interface SaveAiAgentResponse {
225
+ agent: AiAgentDefinition;
226
+ }
227
+ export interface AiAgentDeployResponse {
228
+ agent: AiAgentDefinition;
229
+ channel: AiAgentChannelConfig;
230
+ missing: string[];
231
+ ok: boolean;
232
+ webhookUrl: string;
233
+ }
234
+ export interface AiAgentDiagnosticCheck {
235
+ detail?: string | null;
236
+ id: string;
237
+ label: string;
238
+ ok: boolean;
239
+ }
240
+ export interface AiAgentTestResponse {
241
+ checks?: AiAgentDiagnosticCheck[];
242
+ ok: boolean;
243
+ response: string;
244
+ }
245
+ export interface AiAgentZaloPersonalStatus {
246
+ channelId: string;
247
+ connected: boolean;
248
+ enabled: boolean;
249
+ lastError: string | null;
250
+ lastEventAt: string | null;
251
+ mode: AiAgentZaloAccountMode;
252
+ ownId: string | null;
253
+ running: boolean;
254
+ startedAt: string | null;
255
+ }
256
+ export interface AiAgentZaloPersonalStatusResponse {
257
+ status: AiAgentZaloPersonalStatus;
258
+ }
259
+ export type AiAgentZaloPersonalAction = 'start' | 'stop' | 'validate';
260
+ export interface RotateAiAgentChannelSecretResponse {
261
+ secret: {
262
+ lastFour: string;
263
+ name: string;
264
+ value: string;
265
+ };
266
+ }
267
+ export interface SaveAiAgentIdentityResponse {
268
+ identity: AiAgentIdentityLink;
269
+ }
270
+ export type AbuseRiskTier = 'challenge_required' | 'restricted' | 'standard' | 'trusted' | 'watch';
271
+ export type AbuseReputationSubjectType = 'api_key' | 'cidr' | 'ip' | 'session' | 'user' | 'user_location';
272
+ export type AbuseSignalType = 'auth_failure' | 'automation_client' | 'challenge_failed' | 'challenge_issued' | 'challenge_passed' | 'client_error' | 'manual_override' | 'missing_user_agent' | 'organic_activity' | 'payload_abuse' | 'rate_limit_hit' | 'scripted_client';
273
+ export type AbuseChallengeStatus = 'expired' | 'failed' | 'issued' | 'passed';
274
+ export interface AbuseReputationSubject {
275
+ api_key_id: string | null;
276
+ cidr: string | null;
277
+ confidence_score: number;
278
+ created_at: string;
279
+ id: string;
280
+ ip_address: string | null;
281
+ last_negative_signal_at: string | null;
282
+ last_positive_signal_at: string | null;
283
+ last_seen_at: string;
284
+ metadata: Record<string, unknown>;
285
+ negative_signal_count: number;
286
+ positive_signal_count: number;
287
+ reputation_score: number;
288
+ subject_key: string;
289
+ subject_type: AbuseReputationSubjectType;
290
+ tier: AbuseRiskTier;
291
+ trust_multiplier: number;
292
+ updated_at: string;
293
+ user_id: string | null;
294
+ workspace_id: string | null;
295
+ }
296
+ export interface AbuseActivitySignal {
297
+ api_key_id: string | null;
298
+ confidence_delta: number;
299
+ created_at: string;
300
+ id: string;
301
+ ip_address: string | null;
302
+ metadata: Record<string, unknown>;
303
+ method: string | null;
304
+ reason_code: string | null;
305
+ risk_tier: AbuseRiskTier;
306
+ route: string | null;
307
+ score_delta: number;
308
+ signal_type: AbuseSignalType;
309
+ subject_key: string;
310
+ subject_type: AbuseReputationSubjectType;
311
+ user_id: string | null;
312
+ workspace_id: string | null;
313
+ }
314
+ export interface AbuseStepUpChallenge {
315
+ challenge_type: string;
316
+ completed_at: string | null;
317
+ created_at: string;
318
+ expires_at: string;
319
+ id: string;
320
+ ip_address: string | null;
321
+ metadata: Record<string, unknown>;
322
+ risk_tier: AbuseRiskTier;
323
+ route: string | null;
324
+ status: AbuseChallengeStatus;
325
+ subject_key: string;
326
+ updated_at: string;
327
+ user_id: string | null;
328
+ }
329
+ export interface AbuseTrustOverride {
330
+ created_at: string;
331
+ created_by: string | null;
332
+ expires_at: string | null;
333
+ id: string;
334
+ metadata: Record<string, unknown>;
335
+ reason: string;
336
+ revoke_reason: string | null;
337
+ revoked_at: string | null;
338
+ revoked_by: string | null;
339
+ subject_key: string;
340
+ subject_type: AbuseReputationSubjectType;
341
+ tier: AbuseRiskTier;
342
+ trust_multiplier: number;
343
+ updated_at: string;
344
+ }
345
+ export interface AbuseIntelligenceSummary {
346
+ activeOverrideCount: number;
347
+ challengePassRate: number | null;
348
+ recentSignalCount: number;
349
+ restrictedSubjectCount: number;
350
+ tierCounts: Record<string, number>;
351
+ totalSubjectCount: number;
352
+ trustedSubjectCount: number;
353
+ watchedSubjectCount: number;
354
+ }
355
+ export interface AbuseIntelligenceSnapshot {
356
+ challenges: AbuseStepUpChallenge[];
357
+ overrides: AbuseTrustOverride[];
358
+ signals: AbuseActivitySignal[];
359
+ subjects: AbuseReputationSubject[];
360
+ summary: AbuseIntelligenceSummary;
361
+ topRiskySubjects: AbuseReputationSubject[];
362
+ }
363
+ export interface GetAbuseIntelligenceSnapshotParams {
364
+ limit?: number;
365
+ signalLimit?: number;
366
+ }
367
+ export interface CreateAbuseTrustOverridePayload {
368
+ expiresAt?: string | null;
369
+ metadata?: Record<string, unknown>;
370
+ reason: string;
371
+ subjectKey: string;
372
+ subjectType: AbuseReputationSubjectType;
373
+ tier: AbuseRiskTier;
374
+ trustMultiplier?: number;
375
+ }
376
+ export interface AbuseTrustOverrideResponse {
377
+ override: AbuseTrustOverride;
378
+ }
379
+ export interface RevokeAbuseTrustOverridePayload {
380
+ reason: string;
381
+ }
13
382
  export type InfrastructurePushAppFlavor = 'development' | 'production' | 'staging';
14
383
  export type InfrastructurePushDeliveryKind = 'data_only' | 'notification';
15
384
  export type InfrastructurePushPlatform = 'all' | 'android' | 'ios';
@@ -55,12 +424,37 @@ export interface BlueGreenMonitoringServiceHealth {
55
424
  serviceName: string;
56
425
  status: string | null;
57
426
  }
427
+ export type BlueGreenDeploymentStageStatus = 'failed' | 'queued' | 'running' | 'skipped' | 'succeeded';
428
+ export type BlueGreenDeploymentTarget = 'hive' | 'proxy' | 'support' | 'web';
429
+ export interface BlueGreenDeploymentStage {
430
+ buildServices: string[];
431
+ color: string | null;
432
+ durationMs: number | null;
433
+ failureReason: string | null;
434
+ finishedAt: number | null;
435
+ id: string;
436
+ serviceNames: string[];
437
+ skippedReason: string | null;
438
+ startedAt: number | null;
439
+ status: BlueGreenDeploymentStageStatus;
440
+ target: BlueGreenDeploymentTarget;
441
+ }
442
+ export interface BlueGreenTargetRuntime {
443
+ activeColor: string | null;
444
+ commitHash: string | null;
445
+ commitShortHash: string | null;
446
+ deploymentStamp: string | null;
447
+ health: string;
448
+ lastPromotedAt: number | null;
449
+ standbyColor: string | null;
450
+ }
58
451
  export interface BlueGreenMonitoringDeployment {
59
452
  activatedAt?: number | null;
60
453
  averageLatencyMs?: number | null;
61
454
  activeColor?: string | null;
62
455
  averageRequestsPerMinute?: number | null;
63
456
  buildDurationMs?: number | null;
457
+ cancellationReason?: string | null;
64
458
  commitHash?: string | null;
65
459
  commitShortHash?: string | null;
66
460
  commitSubject?: string | null;
@@ -71,6 +465,7 @@ export interface BlueGreenMonitoringDeployment {
71
465
  deploymentStamp?: string | null;
72
466
  endedAt?: number | null;
73
467
  errorCount?: number | null;
468
+ failureReason?: string | null;
74
469
  finishedAt?: number | null;
75
470
  firstRequestAt?: number | null;
76
471
  imageTag?: string | null;
@@ -81,6 +476,23 @@ export interface BlueGreenMonitoringDeployment {
81
476
  runtimeState?: 'active' | 'standby' | null;
82
477
  startedAt?: number | null;
83
478
  status?: string | null;
479
+ stages?: BlueGreenDeploymentStage[];
480
+ }
481
+ export interface BlueGreenBuildCacheHistoryEntry {
482
+ buildServices: string[];
483
+ commitHash: string | null;
484
+ commitShortHash: string | null;
485
+ commitSubject: string | null;
486
+ deploymentKind: string | null;
487
+ deploymentStamp: string | null;
488
+ serviceHashes: Record<string, string>;
489
+ targetColor: string | null;
490
+ updatedAt: string | null;
491
+ }
492
+ export interface BlueGreenBuildCache {
493
+ current: Record<string, string>;
494
+ history: BlueGreenBuildCacheHistoryEntry[];
495
+ total: number;
84
496
  }
85
497
  export interface BlueGreenDeploymentPin {
86
498
  activeColor: string | null;
@@ -99,6 +511,39 @@ export interface BlueGreenInstantRolloutRequest {
99
511
  requestedBy: string;
100
512
  requestedByEmail: string | null;
101
513
  }
514
+ export interface BlueGreenWatcherRecoveryRequest {
515
+ kind: 'watcher-recovery';
516
+ projectBranch: string | null;
517
+ projectId: string;
518
+ reason: string;
519
+ requestedAt: string;
520
+ requestedBy: string;
521
+ requestedByEmail: string | null;
522
+ watcherBranch: string | null;
523
+ watcherHealth: string | null;
524
+ }
525
+ export interface BlueGreenDockerRecoveryCommand {
526
+ args: string[];
527
+ command: string;
528
+ cwd: string | null;
529
+ }
530
+ export interface BlueGreenDockerRecoverySettings {
531
+ dockerRecoveryPollMs: number;
532
+ dockerRecoveryTimeoutMs: number | null;
533
+ dockerRestartAfterMs: number | null;
534
+ dockerRestartCommand: string[] | null;
535
+ dockerRestartCooldownMs: number;
536
+ dockerRestartDisabled: boolean;
537
+ emailAlertCooldownMs: number;
538
+ emailAlertRecipients: string[];
539
+ emailAlertsEnabled: boolean;
540
+ kind: 'docker-recovery-settings';
541
+ postRestartCommandTimeoutMs: number;
542
+ postRestartCommands: BlueGreenDockerRecoveryCommand[];
543
+ updatedAt: string | null;
544
+ updatedBy: string | null;
545
+ updatedByEmail: string | null;
546
+ }
102
547
  export interface BlueGreenMonitoringPeriodMetric {
103
548
  averageLatencyMs: number | null;
104
549
  bucketLabel: string;
@@ -117,6 +562,7 @@ export interface BlueGreenMonitoringPeriodMetric {
117
562
  };
118
563
  }
119
564
  export interface BlueGreenMonitoringRequestLog {
565
+ consoleLogs?: BlueGreenMonitoringRequestConsoleLog[];
120
566
  deploymentColor: string | null;
121
567
  deploymentKey: string | null;
122
568
  deploymentStamp: string | null;
@@ -125,9 +571,18 @@ export interface BlueGreenMonitoringRequestLog {
125
571
  method: string | null;
126
572
  path: string;
127
573
  requestTimeMs: number | null;
574
+ relatedLogs?: BlueGreenMonitoringWatcherLog[];
128
575
  status: number | null;
129
576
  time: number;
130
577
  }
578
+ export interface BlueGreenMonitoringRequestConsoleLog {
579
+ containerId: string | null;
580
+ deploymentColor: string | null;
581
+ level: string;
582
+ message: string;
583
+ source: string;
584
+ time: number;
585
+ }
131
586
  export interface BlueGreenMonitoringRouteSummary {
132
587
  averageLatencyMs: number | null;
133
588
  errorCount: number;
@@ -158,10 +613,116 @@ export interface BlueGreenMonitoringWatcherLog {
158
613
  deploymentKind: string | null;
159
614
  deploymentStamp: string | null;
160
615
  deploymentStatus: string | null;
616
+ eventId?: string | null;
617
+ eventType?: string | null;
618
+ incidentId?: string | null;
619
+ metadata?: Record<string, unknown>;
620
+ level: string;
621
+ message: string;
622
+ time: number;
623
+ }
624
+ export type CronExecutionStatus = 'failed' | 'skipped' | 'success' | 'timeout';
625
+ export type CronExecutionSource = 'manual' | 'scheduled';
626
+ export type CronMonitoringStatus = 'live' | 'missing' | 'stale';
627
+ export type CronRunStatus = 'failed' | 'processing' | 'queued' | 'skipped' | 'success' | 'timeout';
628
+ export interface CronExecutionConsoleLog {
629
+ containerId: string | null;
630
+ deploymentColor: string | null;
161
631
  level: string;
162
632
  message: string;
633
+ source: string;
163
634
  time: number;
164
635
  }
636
+ export interface CronExecutionRecord {
637
+ consoleLogs: CronExecutionConsoleLog[];
638
+ description: string;
639
+ durationMs: number;
640
+ endedAt: number;
641
+ error: string | null;
642
+ httpStatus: number | null;
643
+ id: string;
644
+ jobId: string;
645
+ path: string;
646
+ response: string | null;
647
+ schedule: string;
648
+ scheduledAt: number | null;
649
+ source: CronExecutionSource;
650
+ startedAt: number;
651
+ status: CronExecutionStatus;
652
+ triggerId: string | null;
653
+ }
654
+ export interface CronRunRecord {
655
+ consoleLogs: CronExecutionConsoleLog[];
656
+ description: string;
657
+ durationMs: number | null;
658
+ endedAt: number | null;
659
+ error: string | null;
660
+ executionId: string | null;
661
+ httpStatus: number | null;
662
+ id: string;
663
+ jobId: string;
664
+ path: string;
665
+ requestedAt: number;
666
+ requestedBy: string | null;
667
+ requestedByEmail: string | null;
668
+ response: string | null;
669
+ schedule: string;
670
+ source: CronExecutionSource;
671
+ startedAt: number | null;
672
+ status: CronRunStatus;
673
+ updatedAt: number;
674
+ }
675
+ export interface CronMonitoringJob {
676
+ configuredEnabled: boolean;
677
+ controlEnabled: boolean | null;
678
+ description: string;
679
+ enabled: boolean;
680
+ failureStreak: number;
681
+ id: string;
682
+ lastExecution: CronExecutionRecord | null;
683
+ lastScheduledAt: number | null;
684
+ nextRunAt: number | null;
685
+ path: string;
686
+ schedule: string;
687
+ }
688
+ export interface CronMonitoringControl {
689
+ enabled: boolean;
690
+ jobs: Record<string, {
691
+ enabled: boolean;
692
+ updatedAt: number;
693
+ updatedBy: string | null;
694
+ updatedByEmail: string | null;
695
+ }>;
696
+ updatedAt: number | null;
697
+ updatedBy: string | null;
698
+ updatedByEmail: string | null;
699
+ }
700
+ export interface CronMonitoringSnapshot {
701
+ control: CronMonitoringControl;
702
+ enabled: boolean;
703
+ jobs: CronMonitoringJob[];
704
+ lastExecution: CronExecutionRecord | null;
705
+ nextRunAt: number | null;
706
+ overview: {
707
+ enabledJobs: number;
708
+ failedExecutions: number;
709
+ failedJobs: number;
710
+ processingRuns: number;
711
+ queuedRuns: number;
712
+ retainedExecutions: number;
713
+ totalJobs: number;
714
+ };
715
+ retainedExecutionCount: number;
716
+ runs: CronRunRecord[];
717
+ source: {
718
+ configAvailable: boolean;
719
+ controlAvailable: boolean;
720
+ runtimeDirAvailable: boolean;
721
+ statusAvailable: boolean;
722
+ };
723
+ status: CronMonitoringStatus;
724
+ updatedAt: number | null;
725
+ }
165
726
  export interface BlueGreenMonitoringArchiveWindow {
166
727
  newestAt: number | null;
167
728
  oldestAt: number | null;
@@ -215,9 +776,11 @@ export interface BlueGreenMonitoringSnapshot {
215
776
  };
216
777
  control: {
217
778
  deploymentPin: BlueGreenDeploymentPin | null;
779
+ dockerRecoverySettings: BlueGreenDockerRecoverySettings;
218
780
  instantRolloutRequest: BlueGreenInstantRolloutRequest | null;
219
781
  };
220
782
  deployments: BlueGreenMonitoringDeployment[];
783
+ buildCache: BlueGreenBuildCache;
221
784
  recoveryCache: {
222
785
  deployments: BlueGreenMonitoringDeployment[];
223
786
  limit: number;
@@ -260,6 +823,7 @@ export interface BlueGreenMonitoringSnapshot {
260
823
  serviceContainers: Record<string, string>;
261
824
  standbyColor: string | null;
262
825
  state: string;
826
+ targets: Record<'hive' | 'web', BlueGreenTargetRuntime>;
263
827
  };
264
828
  source: {
265
829
  historyAvailable: boolean;
@@ -300,6 +864,22 @@ export interface RequestBlueGreenInstantRolloutResponse {
300
864
  message: string;
301
865
  request: BlueGreenInstantRolloutRequest;
302
866
  }
867
+ export interface RequestBlueGreenWatcherRecoveryPayload {
868
+ projectBranch?: string | null;
869
+ projectId: string;
870
+ reason: string;
871
+ watcherBranch?: string | null;
872
+ watcherHealth?: string | null;
873
+ }
874
+ export interface RequestBlueGreenWatcherRecoveryResponse {
875
+ message: string;
876
+ request: BlueGreenWatcherRecoveryRequest;
877
+ }
878
+ export type UpdateBlueGreenDockerRecoverySettingsPayload = Omit<BlueGreenDockerRecoverySettings, 'dockerRestartCommand' | 'kind' | 'postRestartCommands' | 'updatedAt' | 'updatedBy' | 'updatedByEmail'>;
879
+ export interface UpdateBlueGreenDockerRecoverySettingsResponse {
880
+ message: string;
881
+ settings: BlueGreenDockerRecoverySettings;
882
+ }
303
883
  export interface PinBlueGreenDeploymentPayload {
304
884
  commitHash: string;
305
885
  }
@@ -340,15 +920,519 @@ export interface GetBlueGreenMonitoringArchiveParams {
340
920
  pageSize?: number;
341
921
  timeframeDays?: number;
342
922
  }
923
+ export interface GetCronMonitoringExecutionArchiveParams {
924
+ jobId?: string;
925
+ page?: number;
926
+ pageSize?: number;
927
+ }
928
+ export interface QueueCronRunPayload {
929
+ jobId: string;
930
+ }
931
+ export interface QueueCronRunResponse {
932
+ message: string;
933
+ request: {
934
+ id: string;
935
+ jobId: string;
936
+ requestedAt: number;
937
+ requestedBy: string;
938
+ requestedByEmail: string | null;
939
+ };
940
+ }
941
+ export interface UpdateCronMonitoringControlPayload {
942
+ enabled: boolean;
943
+ jobId?: string;
944
+ }
945
+ export interface UpdateCronMonitoringControlResponse {
946
+ control: CronMonitoringControl;
947
+ message: string;
948
+ }
949
+ export type ObservabilityLogLevel = 'debug' | 'error' | 'info' | 'warn';
950
+ export type ObservabilitySource = 'api' | 'cron' | 'server';
951
+ export type ObservabilityDashboardMode = 'analytics' | 'cron' | 'deployments' | 'logs' | 'observability' | 'overview' | 'projects' | 'requests' | 'resources';
952
+ export interface InfrastructureProjectBranch {
953
+ commitHash: string | null;
954
+ commitShortHash: string | null;
955
+ commitSubject: string | null;
956
+ committedAt: number | null;
957
+ defaultBranch: boolean;
958
+ lastSyncedAt: number;
959
+ name: string;
960
+ protected: boolean;
961
+ }
962
+ export interface InfrastructureProject {
963
+ addons: {
964
+ cron: boolean;
965
+ logDrain: boolean;
966
+ nginx: boolean;
967
+ redis: boolean;
968
+ };
969
+ appRoot: string;
970
+ autoDeployEnabled: boolean;
971
+ branches: InfrastructureProjectBranch[];
972
+ createdAt: number;
973
+ deploymentStatus: string;
974
+ environment: string;
975
+ hostnames: string[];
976
+ id: string;
977
+ isBuiltin: boolean;
978
+ lastDeployedAt: number | null;
979
+ latestCommitHash: string | null;
980
+ latestCommitShortHash: string | null;
981
+ latestCommitSubject: string | null;
982
+ latestSyncedAt: number | null;
983
+ name: string;
984
+ port: number;
985
+ preset: string;
986
+ repo: {
987
+ owner: string;
988
+ repo: string;
989
+ url: string;
990
+ };
991
+ selectedBranch: string;
992
+ updatedAt: number;
993
+ }
994
+ export interface CreateInfrastructureProjectPayload {
995
+ appRoot?: string;
996
+ hostnames?: string[];
997
+ repoUrl: string;
998
+ selectedBranch?: string;
999
+ }
1000
+ export interface UpdateInfrastructureProjectPayload {
1001
+ appRoot?: string;
1002
+ autoDeployEnabled?: boolean;
1003
+ cronEnabled?: boolean;
1004
+ hostnames?: string[];
1005
+ logDrainEnabled?: boolean;
1006
+ name?: string;
1007
+ redisEnabled?: boolean;
1008
+ selectedBranch?: string;
1009
+ }
1010
+ export interface InfrastructureProjectResponse {
1011
+ project: InfrastructureProject;
1012
+ }
1013
+ export interface InfrastructureProjectsResponse {
1014
+ projects: InfrastructureProject[];
1015
+ }
1016
+ export interface ObservabilityDeployment {
1017
+ color: string | null;
1018
+ commitHash: string | null;
1019
+ commitShortHash: string | null;
1020
+ commitSubject: string | null;
1021
+ deploymentKind: string | null;
1022
+ deploymentStamp: string | null;
1023
+ durationMs: number | null;
1024
+ errorCount: number;
1025
+ failureReason: string | null;
1026
+ imageTag: string | null;
1027
+ lastRequestAt: number | null;
1028
+ runtimeState: 'active' | 'standby' | null;
1029
+ requestCount: number;
1030
+ startedAt: number | null;
1031
+ status: string;
1032
+ stageSummary: {
1033
+ blockedTargets: BlueGreenDeploymentTarget[];
1034
+ cacheHitCount: number;
1035
+ failedStageCount: number;
1036
+ promotedTargets: BlueGreenDeploymentTarget[];
1037
+ rebuildCount: number;
1038
+ runningStageCount: number;
1039
+ skippedStageCount: number;
1040
+ totalStageCount: number;
1041
+ };
1042
+ stages: BlueGreenDeploymentStage[];
1043
+ synthesizedStages: boolean;
1044
+ supportBuildCacheHits: number;
1045
+ supportBuildServiceCount: number;
1046
+ supportBuildServices: string[];
1047
+ targetStates: Record<'hive' | 'web', BlueGreenTargetRuntime>;
1048
+ }
1049
+ export interface ObservabilityLogEvent {
1050
+ createdAt: number;
1051
+ deploymentColor: string | null;
1052
+ deploymentStamp: string | null;
1053
+ durationMs: number | null;
1054
+ errorName: string | null;
1055
+ errorStack: string | null;
1056
+ id: string;
1057
+ ipAddress: string | null;
1058
+ level: ObservabilityLogLevel;
1059
+ message: string;
1060
+ metadata: Record<string, unknown>;
1061
+ requestId: string | null;
1062
+ route: string | null;
1063
+ source: ObservabilitySource;
1064
+ status: number | null;
1065
+ userAgent: string | null;
1066
+ }
1067
+ export interface ObservabilityLogFacet {
1068
+ count: number;
1069
+ errorCount: number;
1070
+ value: string;
1071
+ }
1072
+ export interface ObservabilityLogFacets {
1073
+ levels: ObservabilityLogFacet[];
1074
+ routes: ObservabilityLogFacet[];
1075
+ sources: ObservabilityLogFacet[];
1076
+ statuses: ObservabilityLogFacet[];
1077
+ }
1078
+ export interface ObservabilityLogGroup {
1079
+ createdAt: number;
1080
+ deploymentColor: string | null;
1081
+ deploymentStamp: string | null;
1082
+ durationMs: number | null;
1083
+ errorName: string | null;
1084
+ errorStack: string | null;
1085
+ eventCount: number;
1086
+ events: ObservabilityLogEvent[];
1087
+ firstEventAt: number;
1088
+ id: string;
1089
+ ipAddress: string | null;
1090
+ level: ObservabilityLogLevel;
1091
+ message: string;
1092
+ metadata: Record<string, unknown>;
1093
+ requestId: string | null;
1094
+ route: string | null;
1095
+ source: ObservabilitySource;
1096
+ status: number | null;
1097
+ userAgent: string | null;
1098
+ }
1099
+ export interface ObservabilityLogsResult extends ObservabilityPaginatedResult<ObservabilityLogGroup> {
1100
+ facets: ObservabilityLogFacets;
1101
+ }
1102
+ export interface ObservabilityRequest {
1103
+ cronJobId: string | null;
1104
+ deploymentColor: string | null;
1105
+ deploymentStamp: string | null;
1106
+ durationMs: number | null;
1107
+ endedAt: number;
1108
+ errorMessage: string | null;
1109
+ id: string;
1110
+ ipAddress: string | null;
1111
+ logCount: number;
1112
+ method: string | null;
1113
+ path: string | null;
1114
+ relatedLogs: ObservabilityLogEvent[];
1115
+ source: ObservabilitySource;
1116
+ startedAt: number;
1117
+ status: number | null;
1118
+ userAgent: string | null;
1119
+ }
1120
+ export interface ObservabilityCronRun {
1121
+ durationMs: number | null;
1122
+ endedAt: number;
1123
+ errorMessage: string | null;
1124
+ httpStatus: number | null;
1125
+ id: string;
1126
+ jobId: string;
1127
+ path: string;
1128
+ requestId: string | null;
1129
+ startedAt: number;
1130
+ status: string;
1131
+ }
1132
+ export interface ObservabilityOverview {
1133
+ cronFailureRate: number;
1134
+ errorRate: number;
1135
+ lastEventAt: number | null;
1136
+ p95DurationMs: number | null;
1137
+ recentErrors: ObservabilityLogEvent[];
1138
+ requestCount: number;
1139
+ serverErrorCount: number;
1140
+ slowRequestCount: number;
1141
+ sourceCounts: Record<string, number>;
1142
+ topRoutes: Array<{
1143
+ averageDurationMs: number | null;
1144
+ errorCount: number;
1145
+ path: string;
1146
+ requestCount: number;
1147
+ }>;
1148
+ }
1149
+ export interface ObservabilityAnalyticsBucket {
1150
+ bucketStart: number;
1151
+ cronRuns: number;
1152
+ errors: number;
1153
+ requests: number;
1154
+ serverErrors: number;
1155
+ }
1156
+ export interface ObservabilityAnalytics {
1157
+ buckets: ObservabilityAnalyticsBucket[];
1158
+ statusFamilies: {
1159
+ clientError: number;
1160
+ redirect: number;
1161
+ serverError: number;
1162
+ success: number;
1163
+ unknown: number;
1164
+ };
1165
+ topCronJobs: Array<{
1166
+ failureCount: number;
1167
+ jobId: string;
1168
+ runCount: number;
1169
+ }>;
1170
+ topRoutes: ObservabilityOverview['topRoutes'];
1171
+ }
1172
+ export interface ObservabilityResourceBucket {
1173
+ bucketStart: number;
1174
+ cpuPercent: number | null;
1175
+ hasLiveSample?: boolean;
1176
+ memoryBytes: number | null;
1177
+ rxBytes: number | null;
1178
+ sampleCount?: number;
1179
+ txBytes: number | null;
1180
+ }
1181
+ export type ObservabilityResourceSamplingStatus = 'gapped' | 'healthy' | 'live-only' | 'stale';
1182
+ export interface ObservabilityResourceSampling {
1183
+ bucketCount: number;
1184
+ expectedIntervalMs: number;
1185
+ gapBucketCount: number;
1186
+ latestSampleAgeMs: number | null;
1187
+ latestSampleAt: number | null;
1188
+ sampledBucketCount: number;
1189
+ status: ObservabilityResourceSamplingStatus;
1190
+ }
1191
+ export interface ObservabilityBuildProcess {
1192
+ commitShortHash: string | null;
1193
+ deploymentKind: string | null;
1194
+ id: string;
1195
+ name: string;
1196
+ source: 'watcher';
1197
+ startedAt: number | null;
1198
+ status: string | null;
1199
+ }
1200
+ export interface ObservabilityBuildResources {
1201
+ activeBuilds: ObservabilityBuildProcess[];
1202
+ containers: BlueGreenMonitoringDockerContainer[];
1203
+ state: string;
1204
+ totalCpuPercent: number;
1205
+ totalMemoryBytes: number;
1206
+ totalRxBytes: number;
1207
+ totalTxBytes: number;
1208
+ }
1209
+ export interface ObservabilityResources {
1210
+ buildBuckets: ObservabilityResourceBucket[];
1211
+ buildResources: ObservabilityBuildResources;
1212
+ buckets: ObservabilityResourceBucket[];
1213
+ dockerResources: BlueGreenMonitoringSnapshot['dockerResources'];
1214
+ sampling: {
1215
+ build: ObservabilityResourceSampling;
1216
+ runtime: ObservabilityResourceSampling;
1217
+ };
1218
+ }
1219
+ export interface ObservabilityPaginatedResult<T> {
1220
+ hasNextPage: boolean;
1221
+ items: T[];
1222
+ page: number;
1223
+ pageSize: number;
1224
+ total: number;
1225
+ }
1226
+ export interface GetObservabilityParams {
1227
+ deploymentStamp?: string;
1228
+ level?: ObservabilityLogLevel | 'all';
1229
+ page?: number;
1230
+ pageSize?: number;
1231
+ projectId?: string;
1232
+ q?: string;
1233
+ requestId?: string;
1234
+ route?: string;
1235
+ since?: number;
1236
+ source?: ObservabilitySource | 'all';
1237
+ status?: string;
1238
+ timeframeHours?: number;
1239
+ until?: number;
1240
+ }
1241
+ export interface GetBlueGreenMonitoringRequestArchiveParams extends GetBlueGreenMonitoringArchiveParams {
1242
+ q?: string;
1243
+ render?: 'all' | 'document' | 'rsc';
1244
+ route?: string;
1245
+ since?: number;
1246
+ status?: string;
1247
+ traffic?: 'all' | 'external' | 'internal';
1248
+ until?: number;
1249
+ }
1250
+ export type InfrastructureStressTestStatus = 'aborted' | 'completed' | 'failed' | 'queued' | 'running';
1251
+ export type InfrastructureStressTestProfileId = 'smoke' | 'spike' | 'steady' | 'ramp';
1252
+ export interface InfrastructureStressTestTarget {
1253
+ baseUrl: string;
1254
+ defaultPath: string;
1255
+ description: string | null;
1256
+ id: string;
1257
+ label: string;
1258
+ }
1259
+ export interface InfrastructureStressTestProfile {
1260
+ concurrency: number;
1261
+ durationSeconds: number;
1262
+ id: InfrastructureStressTestProfileId;
1263
+ label: string;
1264
+ maxRequestsPerSecond: number;
1265
+ rampSeconds: number;
1266
+ }
1267
+ export interface InfrastructureStressTestSummary {
1268
+ averageRequestsPerSecond: number | null;
1269
+ capacityJudgement: string | null;
1270
+ errorRate: number | null;
1271
+ estimatedSteadyUsers: number | null;
1272
+ failureMode: string | null;
1273
+ peakRequestsPerSecond: number | null;
1274
+ safeRequestsPerSecond: number | null;
1275
+ saturationPoint: string | null;
1276
+ totalRequests: number;
1277
+ latency: {
1278
+ p50Ms: number | null;
1279
+ p95Ms: number | null;
1280
+ p99Ms: number | null;
1281
+ };
1282
+ }
1283
+ export interface InfrastructureStressTestResourceSpike {
1284
+ baseline: number | null;
1285
+ delta: number | null;
1286
+ metric: 'cpu' | 'memory' | 'rx' | 'tx';
1287
+ peak: number | null;
1288
+ recoveryMs: number | null;
1289
+ timeToPeakMs: number | null;
1290
+ unit: 'bytes' | 'percent';
1291
+ }
1292
+ export interface InfrastructureStressTestSample {
1293
+ activeRequests: number;
1294
+ cpuPercent: number | null;
1295
+ errorRate: number | null;
1296
+ latencyP50Ms: number | null;
1297
+ latencyP95Ms: number | null;
1298
+ latencyP99Ms: number | null;
1299
+ memoryBytes: number | null;
1300
+ requestsPerSecond: number;
1301
+ rxBytes: number | null;
1302
+ sampledAt: number;
1303
+ statusCodes: Record<string, number>;
1304
+ txBytes: number | null;
1305
+ virtualUsers: number;
1306
+ }
1307
+ export interface InfrastructureStressTestRun {
1308
+ abortReason: string | null;
1309
+ abortRequestedAt: number | null;
1310
+ createdAt: number;
1311
+ endedAt: number | null;
1312
+ errorMessage: string | null;
1313
+ id: string;
1314
+ profile: InfrastructureStressTestProfile;
1315
+ queuedAt: number;
1316
+ requestedBy: string | null;
1317
+ requestedByEmail: string | null;
1318
+ resourceSpikes: InfrastructureStressTestResourceSpike[];
1319
+ resultNotes: string | null;
1320
+ samples: InfrastructureStressTestSample[];
1321
+ startedAt: number | null;
1322
+ status: InfrastructureStressTestStatus;
1323
+ summary: InfrastructureStressTestSummary;
1324
+ target: InfrastructureStressTestTarget;
1325
+ updatedAt: number;
1326
+ }
1327
+ export interface InfrastructureStressTestSnapshot {
1328
+ activeRun: InfrastructureStressTestRun | null;
1329
+ canManage: boolean;
1330
+ profiles: InfrastructureStressTestProfile[];
1331
+ recentRuns: InfrastructureStressTestRun[];
1332
+ targets: InfrastructureStressTestTarget[];
1333
+ }
1334
+ export interface QueueInfrastructureStressTestPayload {
1335
+ concurrency?: number;
1336
+ durationSeconds?: number;
1337
+ maxRequestsPerSecond?: number;
1338
+ path?: string;
1339
+ profileId: InfrastructureStressTestProfileId;
1340
+ rampSeconds?: number;
1341
+ targetId: string;
1342
+ }
1343
+ export interface QueueInfrastructureStressTestResponse {
1344
+ message: string;
1345
+ run: InfrastructureStressTestRun;
1346
+ }
1347
+ export interface AbortInfrastructureStressTestPayload {
1348
+ reason?: string;
1349
+ }
1350
+ export interface AbortInfrastructureStressTestResponse {
1351
+ message: string;
1352
+ run: InfrastructureStressTestRun;
1353
+ }
343
1354
  export declare function sendInfrastructurePushTest(payload: SendInfrastructurePushTestPayload, options?: InternalApiClientOptions): Promise<SendInfrastructurePushTestResponse>;
344
1355
  export declare function updateMobileVersionPolicies(payload: MobileVersionPoliciesPayload, options?: InternalApiClientOptions): Promise<{
345
1356
  data: MobileVersionPoliciesPayload;
346
1357
  message: string;
347
1358
  }>;
1359
+ export declare function listAiGatewayModels(params?: ListAiGatewayModelsParams, options?: InternalApiClientOptions): Promise<AIModelUI[]>;
1360
+ export declare function listAiGatewayModelsPage(params?: ListAiGatewayModelsPageParams, options?: InternalApiClientOptions): Promise<AiGatewayModelsPage>;
1361
+ export declare function listAiGatewayModelsLegacy(params?: ListAiGatewayModelsParams, options?: InternalApiClientOptions): Promise<AIModelUI[]>;
1362
+ export declare function resolveInfrastructureWorkspaceId(wsId: string, options?: InternalApiClientOptions): Promise<ResolveInfrastructureWorkspaceIdResponse>;
1363
+ export declare function listAIWhitelistDomains(params?: ListAIWhitelistDomainsParams, options?: InternalApiClientOptions): Promise<AIWhitelistDomainsResponse>;
1364
+ export declare function createAIWhitelistDomain(payload: CreateAIWhitelistDomainPayload, options?: InternalApiClientOptions): Promise<AIWhitelistDomainResponse>;
1365
+ export declare function updateAIWhitelistDomain(domain: string, payload: UpdateAIWhitelistDomainPayload, options?: InternalApiClientOptions): Promise<{
1366
+ success: true;
1367
+ }>;
1368
+ export declare function deleteAIWhitelistDomain(domain: string, options?: InternalApiClientOptions): Promise<{
1369
+ success: true;
1370
+ }>;
1371
+ export declare function listAIWhitelistEmails(params?: ListAIWhitelistEmailsParams, options?: InternalApiClientOptions): Promise<AIWhitelistEmailsResponse>;
1372
+ export declare function createAIWhitelistEmail(payload: CreateAIWhitelistEmailPayload, options?: InternalApiClientOptions): Promise<AIWhitelistEmailResponse>;
1373
+ export declare function updateAIWhitelistEmail(email: string, payload: UpdateAIWhitelistEmailPayload, options?: InternalApiClientOptions): Promise<{
1374
+ success: true;
1375
+ }>;
1376
+ export declare function deleteAIWhitelistEmail(email: string, options?: InternalApiClientOptions): Promise<{
1377
+ success: true;
1378
+ }>;
1379
+ export declare function listExternalApps(options?: InternalApiClientOptions): Promise<ExternalAppsResponse>;
1380
+ export declare function saveExternalApp(payload: SaveExternalAppPayload, options?: InternalApiClientOptions): Promise<SaveExternalAppResponse>;
1381
+ export declare function rotateExternalAppSecret(appId: string, options?: InternalApiClientOptions): Promise<SaveExternalAppResponse>;
1382
+ export declare function listAiAgents(options?: InternalApiClientOptions): Promise<AiAgentsResponse>;
1383
+ export declare function saveAiAgent(payload: SaveAiAgentPayload, options?: InternalApiClientOptions): Promise<SaveAiAgentResponse>;
1384
+ export declare function deployAiAgentChannel(agentId: string, channelId: string, options?: InternalApiClientOptions): Promise<AiAgentDeployResponse>;
1385
+ export declare function pauseAiAgentChannel(agentId: string, channelId: string, options?: InternalApiClientOptions): Promise<SaveAiAgentResponse>;
1386
+ export declare function testAiAgentChannel(agentId: string, channelId: string, prompt?: string, options?: InternalApiClientOptions): Promise<AiAgentTestResponse>;
1387
+ export declare function rotateAiAgentChannelSecret(agentId: string, channelId: string, name: string, value?: string, options?: InternalApiClientOptions): Promise<RotateAiAgentChannelSecretResponse>;
1388
+ export declare function getAiAgentZaloPersonalStatus(agentId: string, channelId: string, options?: InternalApiClientOptions): Promise<AiAgentZaloPersonalStatusResponse>;
1389
+ export declare function runAiAgentZaloPersonalAction(agentId: string, channelId: string, action: AiAgentZaloPersonalAction, options?: InternalApiClientOptions): Promise<AiAgentZaloPersonalStatusResponse>;
1390
+ export declare function saveAiAgentIdentityLink(payload: AiAgentIdentityLink, options?: InternalApiClientOptions): Promise<SaveAiAgentIdentityResponse>;
1391
+ export declare function listAiAgentExternalThreads(params?: {
1392
+ agentId?: string | null;
1393
+ channelId?: string | null;
1394
+ wsId?: string | null;
1395
+ }, options?: InternalApiClientOptions): Promise<AiAgentExternalThreadsResponse>;
1396
+ export declare function listAiAgentExternalMessages(threadId: string, params?: {
1397
+ limit?: number;
1398
+ }, options?: InternalApiClientOptions): Promise<AiAgentExternalMessagesResponse>;
1399
+ export declare function syncAiAgentExternalThread(threadId: string, options?: InternalApiClientOptions): Promise<AiAgentExternalSyncResponse>;
1400
+ export declare function draftAiAgentExternalResponse(threadId: string, prompt: string, options?: InternalApiClientOptions): Promise<AiAgentExternalDraftResponse>;
1401
+ export declare function sendAiAgentExternalResponse(threadId: string, content: string, options?: InternalApiClientOptions): Promise<{
1402
+ message: ChatMessage;
1403
+ }>;
1404
+ export declare function getAppCoordinationSessionPolicy(options?: InternalApiClientOptions): Promise<AppCoordinationSessionPolicyResponse>;
1405
+ export declare function saveAppCoordinationSessionPolicy(payload: AppCoordinationSessionPolicy, options?: InternalApiClientOptions): Promise<AppCoordinationSessionPolicyResponse>;
1406
+ export declare function getAbuseIntelligenceSnapshot(params?: GetAbuseIntelligenceSnapshotParams, options?: InternalApiClientOptions): Promise<AbuseIntelligenceSnapshot>;
1407
+ export declare function createAbuseTrustOverride(payload: CreateAbuseTrustOverridePayload, options?: InternalApiClientOptions): Promise<AbuseTrustOverrideResponse>;
1408
+ export declare function revokeAbuseTrustOverride(overrideId: string, payload: RevokeAbuseTrustOverridePayload, options?: InternalApiClientOptions): Promise<AbuseTrustOverrideResponse>;
348
1409
  export declare function getBlueGreenMonitoringSnapshot(params?: GetBlueGreenMonitoringSnapshotParams, options?: InternalApiClientOptions): Promise<BlueGreenMonitoringSnapshot>;
349
- export declare function getBlueGreenMonitoringRequestArchive(params?: GetBlueGreenMonitoringArchiveParams, options?: InternalApiClientOptions): Promise<BlueGreenMonitoringRequestArchive>;
1410
+ export declare function getBlueGreenMonitoringRequestArchive(params?: GetBlueGreenMonitoringRequestArchiveParams, options?: InternalApiClientOptions): Promise<BlueGreenMonitoringRequestArchive>;
350
1411
  export declare function getBlueGreenMonitoringWatcherLogArchive(params?: GetBlueGreenMonitoringArchiveParams, options?: InternalApiClientOptions): Promise<BlueGreenMonitoringPaginatedResult<BlueGreenMonitoringWatcherLog>>;
1412
+ export declare function getCronMonitoringSnapshot(options?: InternalApiClientOptions): Promise<CronMonitoringSnapshot>;
1413
+ export declare function getCronMonitoringExecutionArchive(params?: GetCronMonitoringExecutionArchiveParams, options?: InternalApiClientOptions): Promise<BlueGreenMonitoringPaginatedResult<CronExecutionRecord>>;
1414
+ export declare function queueCronRun(payload: QueueCronRunPayload, options?: InternalApiClientOptions): Promise<QueueCronRunResponse>;
1415
+ export declare function updateCronMonitoringControl(payload: UpdateCronMonitoringControlPayload, options?: InternalApiClientOptions): Promise<UpdateCronMonitoringControlResponse>;
1416
+ export declare function getInfrastructureStressTestSnapshot(options?: InternalApiClientOptions): Promise<InfrastructureStressTestSnapshot>;
1417
+ export declare function queueInfrastructureStressTest(payload: QueueInfrastructureStressTestPayload, options?: InternalApiClientOptions): Promise<QueueInfrastructureStressTestResponse>;
1418
+ export declare function getInfrastructureStressTestRun(runId: string, options?: InternalApiClientOptions): Promise<InfrastructureStressTestRun>;
1419
+ export declare function abortInfrastructureStressTest(runId: string, payload?: AbortInfrastructureStressTestPayload, options?: InternalApiClientOptions): Promise<AbortInfrastructureStressTestResponse>;
1420
+ export declare function getObservabilityOverview(params?: Pick<GetObservabilityParams, 'projectId' | 'timeframeHours'>, options?: InternalApiClientOptions): Promise<ObservabilityOverview>;
1421
+ export declare function getObservabilityDeployments(params?: GetObservabilityParams, options?: InternalApiClientOptions): Promise<ObservabilityPaginatedResult<ObservabilityDeployment>>;
1422
+ export declare function getObservabilityLogs(params?: GetObservabilityParams, options?: InternalApiClientOptions): Promise<ObservabilityLogsResult>;
1423
+ export declare function getObservabilityRequests(params?: GetObservabilityParams, options?: InternalApiClientOptions): Promise<ObservabilityPaginatedResult<ObservabilityRequest>>;
1424
+ export declare function getObservabilityAnalytics(params?: Pick<GetObservabilityParams, 'projectId' | 'timeframeHours'>, options?: InternalApiClientOptions): Promise<ObservabilityAnalytics>;
1425
+ export declare function getObservabilityCronRuns(params?: GetObservabilityParams, options?: InternalApiClientOptions): Promise<ObservabilityPaginatedResult<ObservabilityCronRun>>;
1426
+ export declare function getObservabilityResources(params?: Pick<GetObservabilityParams, 'projectId' | 'timeframeHours'>, options?: InternalApiClientOptions): Promise<ObservabilityResources>;
1427
+ export declare function getInfrastructureProjects(options?: InternalApiClientOptions): Promise<InfrastructureProjectsResponse>;
1428
+ export declare function createInfrastructureProject(payload: CreateInfrastructureProjectPayload, options?: InternalApiClientOptions): Promise<InfrastructureProjectResponse>;
1429
+ export declare function updateInfrastructureProject(projectId: string, payload: UpdateInfrastructureProjectPayload, options?: InternalApiClientOptions): Promise<InfrastructureProjectResponse>;
1430
+ export declare function deleteInfrastructureProject(projectId: string, options?: InternalApiClientOptions): Promise<InfrastructureProjectResponse>;
1431
+ export declare function syncInfrastructureProject(projectId: string, options?: InternalApiClientOptions): Promise<InfrastructureProjectResponse>;
1432
+ export declare function queueInfrastructureProjectDeploy(projectId: string, options?: InternalApiClientOptions): Promise<InfrastructureProjectResponse>;
351
1433
  export declare function requestBlueGreenInstantRollout(options?: InternalApiClientOptions): Promise<RequestBlueGreenInstantRolloutResponse>;
1434
+ export declare function requestBlueGreenWatcherRecovery(payload: RequestBlueGreenWatcherRecoveryPayload, options?: InternalApiClientOptions): Promise<RequestBlueGreenWatcherRecoveryResponse>;
1435
+ export declare function updateBlueGreenDockerRecoverySettings(payload: UpdateBlueGreenDockerRecoverySettingsPayload, options?: InternalApiClientOptions): Promise<UpdateBlueGreenDockerRecoverySettingsResponse>;
352
1436
  export declare function pinBlueGreenDeployment(payload: PinBlueGreenDeploymentPayload, options?: InternalApiClientOptions): Promise<PinBlueGreenDeploymentResponse>;
353
1437
  export declare function clearBlueGreenDeploymentPin(options?: InternalApiClientOptions): Promise<ClearBlueGreenDeploymentPinResponse>;
354
1438
  //# sourceMappingURL=infrastructure.d.ts.map