@djangocfg/api 1.4.27 → 1.4.29
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/index.cjs +4125 -3718
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +687 -41
- package/dist/index.d.ts +687 -41
- package/dist/index.mjs +4042 -3323
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/contexts/index.ts +3 -0
- package/src/cfg/contexts/knowbase/index.ts +3 -0
- package/src/cfg/generated/_utils/fetchers/cfg__accounts.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__auth.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__accounts__user_profile.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_auth.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_api_zones.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_charts.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_commands.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_config.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_overview.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_statistics.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_system.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__db.ts +552 -0
- package/src/cfg/generated/_utils/fetchers/cfg__endpoints.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_api_keys.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_charts.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_configuration.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_monitoring.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_proto_files.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_services.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__grpc__grpc_testing.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__health.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__knowbase.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__leads.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__leads__lead_submission.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__bulk_email.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__campaigns.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__logs.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__newsletters.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__subscriptions.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__newsletter__testing.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_jobs.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_monitoring.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_queues.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_registries.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_schedules.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_testing.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__rq__rq_workers.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/cfg__support.ts +2 -0
- package/src/cfg/generated/_utils/fetchers/index.ts +1 -0
- package/src/cfg/generated/_utils/hooks/cfg__accounts.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__accounts__auth.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__accounts__user_profile.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_admin_api.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_auth.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_monitoring.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__centrifugo__centrifugo_testing.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_activity.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_api_zones.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_charts.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_commands.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_config.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_overview.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_statistics.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_system.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__db.ts +151 -0
- package/src/cfg/generated/_utils/hooks/cfg__endpoints.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_api_keys.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_charts.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_configuration.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_monitoring.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_proto_files.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_services.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__grpc__grpc_testing.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__health.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__knowbase.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__leads.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__leads__lead_submission.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__newsletter.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__bulk_email.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__campaigns.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__logs.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__newsletters.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__subscriptions.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__newsletter__testing.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__payments.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_jobs.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_monitoring.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_queues.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_registries.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_schedules.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_testing.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__rq__rq_workers.ts +2 -0
- package/src/cfg/generated/_utils/hooks/cfg__support.ts +2 -0
- package/src/cfg/generated/_utils/hooks/index.ts +3 -0
- package/src/cfg/generated/_utils/schemas/BackupRecord.schema.ts +43 -0
- package/src/cfg/generated/_utils/schemas/BackupRecordList.schema.ts +28 -0
- package/src/cfg/generated/_utils/schemas/PaginatedBackupRecordListList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/PaginatedRestoreRecordList.schema.ts +24 -0
- package/src/cfg/generated/_utils/schemas/RestoreRecord.schema.ts +30 -0
- package/src/cfg/generated/_utils/schemas/index.ts +5 -0
- package/src/cfg/generated/cfg__accounts/models.ts +2 -2
- package/src/cfg/generated/cfg__db/client.ts +117 -0
- package/src/cfg/generated/cfg__db/index.ts +2 -0
- package/src/cfg/generated/cfg__db/models.ts +181 -0
- package/src/cfg/generated/cfg__leads/client.ts +12 -6
- package/src/cfg/generated/client.ts +5 -0
- package/src/cfg/generated/enums.ts +83 -0
- package/src/cfg/generated/index.ts +5 -0
- package/src/cfg/generated/schema.json +803 -69
- package/src/cfg/generated/storage.ts +2 -0
- package/src/cfg/generated/validation-events.ts +2 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schema for RestoreRecord
|
|
3
|
+
*
|
|
4
|
+
* This schema provides runtime validation and type inference.
|
|
5
|
+
* * Serializer for restore records.
|
|
6
|
+
* */
|
|
7
|
+
import { z } from 'zod'
|
|
8
|
+
import * as Enums from '../../enums'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Serializer for restore records.
|
|
12
|
+
*/
|
|
13
|
+
export const RestoreRecordSchema = z.object({
|
|
14
|
+
id: z.uuid(),
|
|
15
|
+
backup: z.uuid().nullable(),
|
|
16
|
+
backup_filename: z.string(),
|
|
17
|
+
target_database_alias: z.string(),
|
|
18
|
+
status: z.nativeEnum(Enums.RestoreRecordStatus),
|
|
19
|
+
error_message: z.string(),
|
|
20
|
+
started_at: z.iso.datetime().nullable(),
|
|
21
|
+
completed_at: z.iso.datetime().nullable(),
|
|
22
|
+
duration_seconds: z.number().nullable(),
|
|
23
|
+
created_at: z.iso.datetime(),
|
|
24
|
+
created_by: z.string(),
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Infer TypeScript type from Zod schema
|
|
29
|
+
*/
|
|
30
|
+
export type RestoreRecord = z.infer<typeof RestoreRecordSchema>
|
|
@@ -35,6 +35,8 @@ export * from './ArchiveSearchRequestRequest.schema'
|
|
|
35
35
|
export * from './ArchiveSearchResult.schema'
|
|
36
36
|
export * from './ArchiveStatistics.schema'
|
|
37
37
|
export * from './AxesConfig.schema'
|
|
38
|
+
export * from './BackupRecord.schema'
|
|
39
|
+
export * from './BackupRecordList.schema'
|
|
38
40
|
export * from './Balance.schema'
|
|
39
41
|
export * from './BulkEmailRequest.schema'
|
|
40
42
|
export * from './BulkEmailResponse.schema'
|
|
@@ -170,6 +172,7 @@ export * from './PaginatedApiKeyList.schema'
|
|
|
170
172
|
export * from './PaginatedArchiveItemChunkList.schema'
|
|
171
173
|
export * from './PaginatedArchiveItemList.schema'
|
|
172
174
|
export * from './PaginatedArchiveSearchResultList.schema'
|
|
175
|
+
export * from './PaginatedBackupRecordListList.schema'
|
|
173
176
|
export * from './PaginatedChatResponseList.schema'
|
|
174
177
|
export * from './PaginatedChatSessionList.schema'
|
|
175
178
|
export * from './PaginatedDocumentArchiveListList.schema'
|
|
@@ -187,6 +190,7 @@ export * from './PaginatedPublicCategoryList.schema'
|
|
|
187
190
|
export * from './PaginatedPublicDocumentListList.schema'
|
|
188
191
|
export * from './PaginatedPublishList.schema'
|
|
189
192
|
export * from './PaginatedRecentRequestList.schema'
|
|
193
|
+
export * from './PaginatedRestoreRecordList.schema'
|
|
190
194
|
export * from './PaginatedScheduledJobList.schema'
|
|
191
195
|
export * from './PaginatedServiceSummaryList.schema'
|
|
192
196
|
export * from './PaginatedTicketList.schema'
|
|
@@ -232,6 +236,7 @@ export * from './RequestVolumeChart.schema'
|
|
|
232
236
|
export * from './RequestVolumeDataPoint.schema'
|
|
233
237
|
export * from './ResponseTimeChart.schema'
|
|
234
238
|
export * from './ResponseTimeDataPoint.schema'
|
|
239
|
+
export * from './RestoreRecord.schema'
|
|
235
240
|
export * from './RunDemoRequestRequest.schema'
|
|
236
241
|
export * from './ScheduleActionResponse.schema'
|
|
237
242
|
export * from './ScheduleCreateRequest.schema'
|
|
@@ -13,7 +13,7 @@ export interface OTPRequestRequest {
|
|
|
13
13
|
* `email` - Email
|
|
14
14
|
* `phone` - Phone */
|
|
15
15
|
channel?: Enums.OTPRequestRequestChannel;
|
|
16
|
-
/** Source URL for tracking registration (e.g., https://
|
|
16
|
+
/** Source URL for tracking registration (e.g., https://my.djangocfg.com) */
|
|
17
17
|
source_url?: string;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -51,7 +51,7 @@ export interface OTPVerifyRequest {
|
|
|
51
51
|
* `email` - Email
|
|
52
52
|
* `phone` - Phone */
|
|
53
53
|
channel?: Enums.OTPVerifyRequestChannel;
|
|
54
|
-
/** Source URL for tracking login (e.g., https://
|
|
54
|
+
/** Source URL for tracking login (e.g., https://my.djangocfg.com) */
|
|
55
55
|
source_url?: string;
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as Models from "./models";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* API endpoints for Db.
|
|
6
|
+
*/
|
|
7
|
+
export class CfgDb {
|
|
8
|
+
private client: any;
|
|
9
|
+
|
|
10
|
+
constructor(client: any) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async backupsList(page?: number, page_size?: number): Promise<Models.PaginatedBackupRecordListList>;
|
|
15
|
+
async backupsList(params?: { page?: number; page_size?: number }): Promise<Models.PaginatedBackupRecordListList>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* API ViewSet for database backups. Provides endpoints for: - List backups
|
|
19
|
+
* (GET /api/db/backups/) - Get backup details (GET /api/db/backups/{id}/)
|
|
20
|
+
* - Create backup (POST /api/db/backups/create/) - List databases (GET
|
|
21
|
+
* /api/db/backups/databases/) - Cleanup old backups (POST
|
|
22
|
+
* /api/db/backups/cleanup/)
|
|
23
|
+
*/
|
|
24
|
+
async backupsList(...args: any[]): Promise<Models.PaginatedBackupRecordListList> {
|
|
25
|
+
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
26
|
+
|
|
27
|
+
let params;
|
|
28
|
+
if (isParamsObject) {
|
|
29
|
+
params = args[0];
|
|
30
|
+
} else {
|
|
31
|
+
params = { page: args[0], page_size: args[1] };
|
|
32
|
+
}
|
|
33
|
+
const response = await this.client.request('GET', "/cfg/db/backups/", { params });
|
|
34
|
+
return response;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* API ViewSet for database backups. Provides endpoints for: - List backups
|
|
39
|
+
* (GET /api/db/backups/) - Get backup details (GET /api/db/backups/{id}/)
|
|
40
|
+
* - Create backup (POST /api/db/backups/create/) - List databases (GET
|
|
41
|
+
* /api/db/backups/databases/) - Cleanup old backups (POST
|
|
42
|
+
* /api/db/backups/cleanup/)
|
|
43
|
+
*/
|
|
44
|
+
async backupsRetrieve(id: string): Promise<Models.BackupRecord> {
|
|
45
|
+
const response = await this.client.request('GET', `/cfg/db/backups/${id}/`);
|
|
46
|
+
return response;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Restore database from this backup. Request body: target_database_alias:
|
|
51
|
+
* Target database (optional, defaults to original) Returns: RestoreRecord
|
|
52
|
+
* details
|
|
53
|
+
*/
|
|
54
|
+
async backupsRestoreCreate(id: string): Promise<Models.BackupRecord> {
|
|
55
|
+
const response = await this.client.request('POST', `/cfg/db/backups/${id}/restore/`);
|
|
56
|
+
return response;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Clean up old backups according to retention policy. Returns: Success
|
|
61
|
+
* message
|
|
62
|
+
*/
|
|
63
|
+
async backupsCleanupCreate(): Promise<Models.BackupRecord> {
|
|
64
|
+
const response = await this.client.request('POST', "/cfg/db/backups/cleanup/");
|
|
65
|
+
return response;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Create a new database backup. Request body: database_alias: Database
|
|
70
|
+
* alias to backup (default: "default") Returns: BackupRecord details
|
|
71
|
+
*/
|
|
72
|
+
async backupsCreateBackupCreate(): Promise<Models.BackupRecord> {
|
|
73
|
+
const response = await this.client.request('POST', "/cfg/db/backups/create_backup/");
|
|
74
|
+
return response;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* List configured databases with backup info. Returns: List of databases
|
|
79
|
+
* with last backup info
|
|
80
|
+
*/
|
|
81
|
+
async backupsDatabasesRetrieve(): Promise<Models.BackupRecord> {
|
|
82
|
+
const response = await this.client.request('GET', "/cfg/db/backups/databases/");
|
|
83
|
+
return response;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
async restoresList(page?: number, page_size?: number): Promise<Models.PaginatedRestoreRecordList>;
|
|
87
|
+
async restoresList(params?: { page?: number; page_size?: number }): Promise<Models.PaginatedRestoreRecordList>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* API ViewSet for database restores. Provides endpoints for: - List
|
|
91
|
+
* restores (GET /api/db/restores/) - Get restore details (GET
|
|
92
|
+
* /api/db/restores/{id}/)
|
|
93
|
+
*/
|
|
94
|
+
async restoresList(...args: any[]): Promise<Models.PaginatedRestoreRecordList> {
|
|
95
|
+
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
96
|
+
|
|
97
|
+
let params;
|
|
98
|
+
if (isParamsObject) {
|
|
99
|
+
params = args[0];
|
|
100
|
+
} else {
|
|
101
|
+
params = { page: args[0], page_size: args[1] };
|
|
102
|
+
}
|
|
103
|
+
const response = await this.client.request('GET', "/cfg/db/restores/", { params });
|
|
104
|
+
return response;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* API ViewSet for database restores. Provides endpoints for: - List
|
|
109
|
+
* restores (GET /api/db/restores/) - Get restore details (GET
|
|
110
|
+
* /api/db/restores/{id}/)
|
|
111
|
+
*/
|
|
112
|
+
async restoresRetrieve(id: string): Promise<Models.RestoreRecord> {
|
|
113
|
+
const response = await this.client.request('GET', `/cfg/db/restores/${id}/`);
|
|
114
|
+
return response;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import * as Enums from "../enums";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* Response model (includes read-only fields).
|
|
6
|
+
*/
|
|
7
|
+
export interface PaginatedBackupRecordListList {
|
|
8
|
+
/** Total number of items across all pages */
|
|
9
|
+
count: number;
|
|
10
|
+
/** Current page number (1-based) */
|
|
11
|
+
page: number;
|
|
12
|
+
/** Total number of pages */
|
|
13
|
+
pages: number;
|
|
14
|
+
/** Number of items per page */
|
|
15
|
+
page_size: number;
|
|
16
|
+
/** Whether there is a next page */
|
|
17
|
+
has_next: boolean;
|
|
18
|
+
/** Whether there is a previous page */
|
|
19
|
+
has_previous: boolean;
|
|
20
|
+
/** Next page number (null if no next page) */
|
|
21
|
+
next_page?: number | null;
|
|
22
|
+
/** Previous page number (null if no previous page) */
|
|
23
|
+
previous_page?: number | null;
|
|
24
|
+
/** Array of items for current page */
|
|
25
|
+
results: Array<BackupRecordList>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Serializer for backup records.
|
|
30
|
+
*
|
|
31
|
+
* Response model (includes read-only fields).
|
|
32
|
+
*/
|
|
33
|
+
export interface BackupRecord {
|
|
34
|
+
id: string;
|
|
35
|
+
/** Django database alias */
|
|
36
|
+
database_alias: string;
|
|
37
|
+
/** Actual database name */
|
|
38
|
+
database_name: string;
|
|
39
|
+
/** Database engine type
|
|
40
|
+
|
|
41
|
+
* `postgresql` - PostgreSQL
|
|
42
|
+
* `mysql` - MySQL
|
|
43
|
+
* `sqlite` - SQLite
|
|
44
|
+
* `unknown` - Unknown */
|
|
45
|
+
database_engine: Enums.BackupRecordDatabaseEngine;
|
|
46
|
+
/** Backup filename */
|
|
47
|
+
filename: string;
|
|
48
|
+
/** Full path or S3 key to backup file */
|
|
49
|
+
file_path: string;
|
|
50
|
+
/** Backup file size in bytes */
|
|
51
|
+
file_size?: number | null;
|
|
52
|
+
/** Return human-readable file size. */
|
|
53
|
+
file_size_human: string;
|
|
54
|
+
/** Compression algorithm used */
|
|
55
|
+
compression: string;
|
|
56
|
+
/** Whether backup is encrypted */
|
|
57
|
+
encrypted: boolean;
|
|
58
|
+
/** Storage backend type
|
|
59
|
+
|
|
60
|
+
* `local` - Local
|
|
61
|
+
* `s3` - S3 */
|
|
62
|
+
storage_backend: Enums.BackupRecordStorageBackend;
|
|
63
|
+
/** S3 bucket name (if S3 storage) */
|
|
64
|
+
storage_bucket: string;
|
|
65
|
+
/** Backup status
|
|
66
|
+
|
|
67
|
+
* `pending` - Pending
|
|
68
|
+
* `running` - Running
|
|
69
|
+
* `completed` - Completed
|
|
70
|
+
* `failed` - Failed
|
|
71
|
+
* `deleted` - Deleted */
|
|
72
|
+
status: Enums.BackupRecordStatus;
|
|
73
|
+
/** Error message if failed */
|
|
74
|
+
error_message: string;
|
|
75
|
+
/** When backup started */
|
|
76
|
+
started_at?: string | null;
|
|
77
|
+
/** When backup completed */
|
|
78
|
+
completed_at?: string | null;
|
|
79
|
+
/** Backup duration in seconds */
|
|
80
|
+
duration_seconds?: number | null;
|
|
81
|
+
/** Return human-readable duration. */
|
|
82
|
+
duration_human: string;
|
|
83
|
+
created_at: string;
|
|
84
|
+
/** Whether backup was created by scheduler */
|
|
85
|
+
is_scheduled: boolean;
|
|
86
|
+
/** Whether backup was created manually */
|
|
87
|
+
is_manual: boolean;
|
|
88
|
+
/** Number of tables backed up */
|
|
89
|
+
tables_count?: number | null;
|
|
90
|
+
/** Approximate number of rows backed up */
|
|
91
|
+
rows_count?: number | null;
|
|
92
|
+
/** SHA256 checksum of backup file */
|
|
93
|
+
checksum: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
*
|
|
98
|
+
* Response model (includes read-only fields).
|
|
99
|
+
*/
|
|
100
|
+
export interface PaginatedRestoreRecordList {
|
|
101
|
+
/** Total number of items across all pages */
|
|
102
|
+
count: number;
|
|
103
|
+
/** Current page number (1-based) */
|
|
104
|
+
page: number;
|
|
105
|
+
/** Total number of pages */
|
|
106
|
+
pages: number;
|
|
107
|
+
/** Number of items per page */
|
|
108
|
+
page_size: number;
|
|
109
|
+
/** Whether there is a next page */
|
|
110
|
+
has_next: boolean;
|
|
111
|
+
/** Whether there is a previous page */
|
|
112
|
+
has_previous: boolean;
|
|
113
|
+
/** Next page number (null if no next page) */
|
|
114
|
+
next_page?: number | null;
|
|
115
|
+
/** Previous page number (null if no previous page) */
|
|
116
|
+
previous_page?: number | null;
|
|
117
|
+
/** Array of items for current page */
|
|
118
|
+
results: Array<RestoreRecord>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Serializer for restore records.
|
|
123
|
+
*
|
|
124
|
+
* Response model (includes read-only fields).
|
|
125
|
+
*/
|
|
126
|
+
export interface RestoreRecord {
|
|
127
|
+
id: string;
|
|
128
|
+
/** Source backup record */
|
|
129
|
+
backup?: string | null;
|
|
130
|
+
backup_filename: string;
|
|
131
|
+
/** Target Django database alias */
|
|
132
|
+
target_database_alias: string;
|
|
133
|
+
/** * `pending` - Pending
|
|
134
|
+
* `running` - Running
|
|
135
|
+
* `completed` - Completed
|
|
136
|
+
* `failed` - Failed */
|
|
137
|
+
status: Enums.RestoreRecordStatus;
|
|
138
|
+
error_message: string;
|
|
139
|
+
started_at?: string | null;
|
|
140
|
+
completed_at?: string | null;
|
|
141
|
+
duration_seconds?: number | null;
|
|
142
|
+
created_at: string;
|
|
143
|
+
/** User or system that initiated restore */
|
|
144
|
+
created_by: string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Lightweight serializer for backup list.
|
|
149
|
+
*
|
|
150
|
+
* Response model (includes read-only fields).
|
|
151
|
+
*/
|
|
152
|
+
export interface BackupRecordList {
|
|
153
|
+
id: string;
|
|
154
|
+
/** Django database alias */
|
|
155
|
+
database_alias: string;
|
|
156
|
+
/** Database engine type
|
|
157
|
+
|
|
158
|
+
* `postgresql` - PostgreSQL
|
|
159
|
+
* `mysql` - MySQL
|
|
160
|
+
* `sqlite` - SQLite
|
|
161
|
+
* `unknown` - Unknown */
|
|
162
|
+
database_engine?: Enums.BackupRecordListDatabaseEngine;
|
|
163
|
+
/** Backup filename */
|
|
164
|
+
filename: string;
|
|
165
|
+
/** Return human-readable file size. */
|
|
166
|
+
file_size_human: string;
|
|
167
|
+
/** Backup status
|
|
168
|
+
|
|
169
|
+
* `pending` - Pending
|
|
170
|
+
* `running` - Running
|
|
171
|
+
* `completed` - Completed
|
|
172
|
+
* `failed` - Failed
|
|
173
|
+
* `deleted` - Deleted */
|
|
174
|
+
status?: Enums.BackupRecordListStatus;
|
|
175
|
+
/** Return human-readable duration. */
|
|
176
|
+
duration_human: string;
|
|
177
|
+
created_at: string;
|
|
178
|
+
/** Whether backup was created by scheduler */
|
|
179
|
+
is_scheduled?: boolean;
|
|
180
|
+
}
|
|
181
|
+
|
|
@@ -16,7 +16,8 @@ export class CfgLeads {
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* ViewSet for Lead model. Provides only submission functionality for leads
|
|
19
|
-
* from frontend forms.
|
|
19
|
+
* from frontend forms. Uses PublicAPIMixin for open CORS and no
|
|
20
|
+
* authentication.
|
|
20
21
|
*/
|
|
21
22
|
async list(...args: any[]): Promise<Models.PaginatedLeadSubmissionList> {
|
|
22
23
|
const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
|
|
@@ -33,7 +34,8 @@ export class CfgLeads {
|
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* ViewSet for Lead model. Provides only submission functionality for leads
|
|
36
|
-
* from frontend forms.
|
|
37
|
+
* from frontend forms. Uses PublicAPIMixin for open CORS and no
|
|
38
|
+
* authentication.
|
|
37
39
|
*/
|
|
38
40
|
async create(data: Models.LeadSubmissionRequest): Promise<Models.LeadSubmission> {
|
|
39
41
|
const response = await this.client.request('POST', "/cfg/leads/", { body: data });
|
|
@@ -42,7 +44,8 @@ export class CfgLeads {
|
|
|
42
44
|
|
|
43
45
|
/**
|
|
44
46
|
* ViewSet for Lead model. Provides only submission functionality for leads
|
|
45
|
-
* from frontend forms.
|
|
47
|
+
* from frontend forms. Uses PublicAPIMixin for open CORS and no
|
|
48
|
+
* authentication.
|
|
46
49
|
*/
|
|
47
50
|
async retrieve(id: number): Promise<Models.LeadSubmission> {
|
|
48
51
|
const response = await this.client.request('GET', `/cfg/leads/${id}/`);
|
|
@@ -51,7 +54,8 @@ export class CfgLeads {
|
|
|
51
54
|
|
|
52
55
|
/**
|
|
53
56
|
* ViewSet for Lead model. Provides only submission functionality for leads
|
|
54
|
-
* from frontend forms.
|
|
57
|
+
* from frontend forms. Uses PublicAPIMixin for open CORS and no
|
|
58
|
+
* authentication.
|
|
55
59
|
*/
|
|
56
60
|
async update(id: number, data: Models.LeadSubmissionRequest): Promise<Models.LeadSubmission> {
|
|
57
61
|
const response = await this.client.request('PUT', `/cfg/leads/${id}/`, { body: data });
|
|
@@ -60,7 +64,8 @@ export class CfgLeads {
|
|
|
60
64
|
|
|
61
65
|
/**
|
|
62
66
|
* ViewSet for Lead model. Provides only submission functionality for leads
|
|
63
|
-
* from frontend forms.
|
|
67
|
+
* from frontend forms. Uses PublicAPIMixin for open CORS and no
|
|
68
|
+
* authentication.
|
|
64
69
|
*/
|
|
65
70
|
async partialUpdate(id: number, data?: Models.PatchedLeadSubmissionRequest): Promise<Models.LeadSubmission> {
|
|
66
71
|
const response = await this.client.request('PATCH', `/cfg/leads/${id}/`, { body: data });
|
|
@@ -69,7 +74,8 @@ export class CfgLeads {
|
|
|
69
74
|
|
|
70
75
|
/**
|
|
71
76
|
* ViewSet for Lead model. Provides only submission functionality for leads
|
|
72
|
-
* from frontend forms.
|
|
77
|
+
* from frontend forms. Uses PublicAPIMixin for open CORS and no
|
|
78
|
+
* authentication.
|
|
73
79
|
*/
|
|
74
80
|
async destroy(id: number): Promise<void> {
|
|
75
81
|
const response = await this.client.request('DELETE', `/cfg/leads/${id}/`);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
1
3
|
import { CfgAuth } from "./cfg__accounts__auth";
|
|
2
4
|
import { CfgBulkEmail } from "./cfg__newsletter__bulk_email";
|
|
3
5
|
import { CfgCampaigns } from "./cfg__newsletter__campaigns";
|
|
@@ -27,6 +29,7 @@ import { CfgSubscriptions } from "./cfg__newsletter__subscriptions";
|
|
|
27
29
|
import { CfgTesting } from "./cfg__newsletter__testing";
|
|
28
30
|
import { CfgUserProfile } from "./cfg__accounts__user_profile";
|
|
29
31
|
import { CfgAccounts } from "./cfg__accounts";
|
|
32
|
+
import { CfgDb } from "./cfg__db";
|
|
30
33
|
import { CfgEndpoints } from "./cfg__endpoints";
|
|
31
34
|
import { CfgGrpcApiKeys } from "./cfg__grpc__grpc_api_keys";
|
|
32
35
|
import { CfgGrpcCharts } from "./cfg__grpc__grpc_charts";
|
|
@@ -98,6 +101,7 @@ export class APIClient {
|
|
|
98
101
|
public cfg_testing: CfgTesting;
|
|
99
102
|
public cfg_user_profile: CfgUserProfile;
|
|
100
103
|
public cfg_accounts: CfgAccounts;
|
|
104
|
+
public cfg_db: CfgDb;
|
|
101
105
|
public cfg_endpoints: CfgEndpoints;
|
|
102
106
|
public cfg_grpc_api_keys: CfgGrpcApiKeys;
|
|
103
107
|
public cfg_grpc_charts: CfgGrpcCharts;
|
|
@@ -164,6 +168,7 @@ export class APIClient {
|
|
|
164
168
|
this.cfg_testing = new CfgTesting(this);
|
|
165
169
|
this.cfg_user_profile = new CfgUserProfile(this);
|
|
166
170
|
this.cfg_accounts = new CfgAccounts(this);
|
|
171
|
+
this.cfg_db = new CfgDb(this);
|
|
167
172
|
this.cfg_endpoints = new CfgEndpoints(this);
|
|
168
173
|
this.cfg_grpc_api_keys = new CfgGrpcApiKeys(this);
|
|
169
174
|
this.cfg_grpc_charts = new CfgGrpcCharts(this);
|
|
@@ -122,6 +122,76 @@ export enum ArchiveSearchRequestRequestChunkTypesItems {
|
|
|
122
122
|
LIST = "list",
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Database engine type
|
|
127
|
+
* * `postgresql` - PostgreSQL
|
|
128
|
+
* * `mysql` - MySQL
|
|
129
|
+
* * `sqlite` - SQLite
|
|
130
|
+
* * `unknown` - Unknown
|
|
131
|
+
*/
|
|
132
|
+
export enum BackupRecordDatabaseEngine {
|
|
133
|
+
POSTGRESQL = "postgresql",
|
|
134
|
+
MYSQL = "mysql",
|
|
135
|
+
SQLITE = "sqlite",
|
|
136
|
+
UNKNOWN = "unknown",
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Storage backend type
|
|
141
|
+
* * `local` - Local
|
|
142
|
+
* * `s3` - S3
|
|
143
|
+
*/
|
|
144
|
+
export enum BackupRecordStorageBackend {
|
|
145
|
+
LOCAL = "local",
|
|
146
|
+
S3 = "s3",
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Backup status
|
|
151
|
+
* * `pending` - Pending
|
|
152
|
+
* * `running` - Running
|
|
153
|
+
* * `completed` - Completed
|
|
154
|
+
* * `failed` - Failed
|
|
155
|
+
* * `deleted` - Deleted
|
|
156
|
+
*/
|
|
157
|
+
export enum BackupRecordStatus {
|
|
158
|
+
PENDING = "pending",
|
|
159
|
+
RUNNING = "running",
|
|
160
|
+
COMPLETED = "completed",
|
|
161
|
+
FAILED = "failed",
|
|
162
|
+
DELETED = "deleted",
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Database engine type
|
|
167
|
+
* * `postgresql` - PostgreSQL
|
|
168
|
+
* * `mysql` - MySQL
|
|
169
|
+
* * `sqlite` - SQLite
|
|
170
|
+
* * `unknown` - Unknown
|
|
171
|
+
*/
|
|
172
|
+
export enum BackupRecordListDatabaseEngine {
|
|
173
|
+
POSTGRESQL = "postgresql",
|
|
174
|
+
MYSQL = "mysql",
|
|
175
|
+
SQLITE = "sqlite",
|
|
176
|
+
UNKNOWN = "unknown",
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Backup status
|
|
181
|
+
* * `pending` - Pending
|
|
182
|
+
* * `running` - Running
|
|
183
|
+
* * `completed` - Completed
|
|
184
|
+
* * `failed` - Failed
|
|
185
|
+
* * `deleted` - Deleted
|
|
186
|
+
*/
|
|
187
|
+
export enum BackupRecordListStatus {
|
|
188
|
+
PENDING = "pending",
|
|
189
|
+
RUNNING = "running",
|
|
190
|
+
COMPLETED = "completed",
|
|
191
|
+
FAILED = "failed",
|
|
192
|
+
DELETED = "deleted",
|
|
193
|
+
}
|
|
194
|
+
|
|
125
195
|
/**
|
|
126
196
|
* Message sender role
|
|
127
197
|
* * `user` - User
|
|
@@ -407,6 +477,19 @@ export enum QuickActionColor {
|
|
|
407
477
|
DEFAULT = "default",
|
|
408
478
|
}
|
|
409
479
|
|
|
480
|
+
/**
|
|
481
|
+
* * `pending` - Pending
|
|
482
|
+
* * `running` - Running
|
|
483
|
+
* * `completed` - Completed
|
|
484
|
+
* * `failed` - Failed
|
|
485
|
+
*/
|
|
486
|
+
export enum RestoreRecordStatus {
|
|
487
|
+
PENDING = "pending",
|
|
488
|
+
RUNNING = "running",
|
|
489
|
+
COMPLETED = "completed",
|
|
490
|
+
FAILED = "failed",
|
|
491
|
+
}
|
|
492
|
+
|
|
410
493
|
/**
|
|
411
494
|
* Demo scenario to run
|
|
412
495
|
* * `success` - success
|
|
@@ -71,6 +71,7 @@ import { CfgSubscriptions } from "./cfg__newsletter__subscriptions/client";
|
|
|
71
71
|
import { CfgTesting } from "./cfg__newsletter__testing/client";
|
|
72
72
|
import { CfgUserProfile } from "./cfg__accounts__user_profile/client";
|
|
73
73
|
import { CfgAccounts } from "./cfg__accounts/client";
|
|
74
|
+
import { CfgDb } from "./cfg__db/client";
|
|
74
75
|
import { CfgEndpoints } from "./cfg__endpoints/client";
|
|
75
76
|
import { CfgGrpcApiKeys } from "./cfg__grpc__grpc_api_keys/client";
|
|
76
77
|
import { CfgGrpcCharts } from "./cfg__grpc__grpc_charts/client";
|
|
@@ -114,6 +115,7 @@ export * as CfgSubscriptionsTypes from "./cfg__newsletter__subscriptions/models"
|
|
|
114
115
|
export * as CfgTestingTypes from "./cfg__newsletter__testing/models";
|
|
115
116
|
export * as CfgUserProfileTypes from "./cfg__accounts__user_profile/models";
|
|
116
117
|
export * as CfgAccountsTypes from "./cfg__accounts/models";
|
|
118
|
+
export * as CfgDbTypes from "./cfg__db/models";
|
|
117
119
|
export * as CfgEndpointsTypes from "./cfg__endpoints/models";
|
|
118
120
|
export * as CfgGrpcApiKeysTypes from "./cfg__grpc__grpc_api_keys/models";
|
|
119
121
|
export * as CfgGrpcChartsTypes from "./cfg__grpc__grpc_charts/models";
|
|
@@ -226,6 +228,7 @@ export class API {
|
|
|
226
228
|
public cfg_testing!: CfgTesting;
|
|
227
229
|
public cfg_user_profile!: CfgUserProfile;
|
|
228
230
|
public cfg_accounts!: CfgAccounts;
|
|
231
|
+
public cfg_db!: CfgDb;
|
|
229
232
|
public cfg_endpoints!: CfgEndpoints;
|
|
230
233
|
public cfg_grpc_api_keys!: CfgGrpcApiKeys;
|
|
231
234
|
public cfg_grpc_charts!: CfgGrpcCharts;
|
|
@@ -292,6 +295,7 @@ export class API {
|
|
|
292
295
|
this.cfg_testing = this._client.cfg_testing;
|
|
293
296
|
this.cfg_user_profile = this._client.cfg_user_profile;
|
|
294
297
|
this.cfg_accounts = this._client.cfg_accounts;
|
|
298
|
+
this.cfg_db = this._client.cfg_db;
|
|
295
299
|
this.cfg_endpoints = this._client.cfg_endpoints;
|
|
296
300
|
this.cfg_grpc_api_keys = this._client.cfg_grpc_api_keys;
|
|
297
301
|
this.cfg_grpc_charts = this._client.cfg_grpc_charts;
|
|
@@ -352,6 +356,7 @@ export class API {
|
|
|
352
356
|
this.cfg_testing = this._client.cfg_testing;
|
|
353
357
|
this.cfg_user_profile = this._client.cfg_user_profile;
|
|
354
358
|
this.cfg_accounts = this._client.cfg_accounts;
|
|
359
|
+
this.cfg_db = this._client.cfg_db;
|
|
355
360
|
this.cfg_endpoints = this._client.cfg_endpoints;
|
|
356
361
|
this.cfg_grpc_api_keys = this._client.cfg_grpc_api_keys;
|
|
357
362
|
this.cfg_grpc_charts = this._client.cfg_grpc_charts;
|