@crowdin/app-project-module 3.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/modules/integration/handlers/user-error-detail.d.ts +2 -0
- package/out/modules/integration/handlers/user-error-detail.js +48 -0
- package/out/modules/integration/handlers/user-errors.d.ts +6 -0
- package/out/modules/integration/handlers/user-errors.js +39 -17
- package/out/modules/integration/index.js +8 -0
- package/out/static/ui/main.bundle.js +116 -55
- package/out/static/ui/main.bundle.js.map +1 -1
- package/out/storage/drizzle/d1/index.js +2 -1
- package/out/storage/drizzle/d1/migrations/user-errors-indexes.d.ts +7 -0
- package/out/storage/drizzle/d1/migrations/user-errors-indexes.js +27 -0
- package/out/storage/drizzle/index.d.ts +8 -1
- package/out/storage/drizzle/index.js +75 -4
- package/out/storage/drizzle/postgresql/migrations/0003_user_errors_pagination_index.sql +5 -0
- package/out/storage/drizzle/postgresql/migrations/meta/0003_snapshot.json +646 -0
- package/out/storage/drizzle/postgresql/migrations/meta/_journal.json +7 -0
- package/out/storage/drizzle/sqlite/migrations/0002_user_errors_indexes.sql +4 -0
- package/out/storage/drizzle/sqlite/migrations/meta/0002_snapshot.json +687 -0
- package/out/storage/drizzle/sqlite/migrations/meta/_journal.json +7 -0
- package/out/storage/types.d.ts +30 -0
- package/package.json +1 -1
package/out/storage/types.d.ts
CHANGED
|
@@ -13,6 +13,27 @@ export interface UserErrors {
|
|
|
13
13
|
crowdinId: string;
|
|
14
14
|
integrationId?: string;
|
|
15
15
|
}
|
|
16
|
+
export interface UserErrorListItem {
|
|
17
|
+
id: number;
|
|
18
|
+
action: string;
|
|
19
|
+
message: string;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
}
|
|
22
|
+
export interface UserErrorsFilter {
|
|
23
|
+
crowdinId: string;
|
|
24
|
+
integrationId?: string;
|
|
25
|
+
search?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface GetUserErrorsParams extends UserErrorsFilter {
|
|
28
|
+
limit: number;
|
|
29
|
+
offset: number;
|
|
30
|
+
orderDirection?: 'asc' | 'desc';
|
|
31
|
+
}
|
|
32
|
+
export interface GetUserErrorParams {
|
|
33
|
+
id: number;
|
|
34
|
+
crowdinId: string;
|
|
35
|
+
integrationId?: string;
|
|
36
|
+
}
|
|
16
37
|
export type DB_TYPE = 'sqlite' | 'postgresql' | 'd1';
|
|
17
38
|
export type DRIZZLE_DB = SQLITE_DB | POSTGRESQL_DB | D1_DB;
|
|
18
39
|
export interface Storage {
|
|
@@ -48,7 +69,16 @@ export interface Storage {
|
|
|
48
69
|
getWebhooks(fileId: string, integrationId: string, crowdinId: string, provider: Provider): Promise<IntegrationWebhooks | undefined>;
|
|
49
70
|
saveWebhooks(fileId: string, integrationId: string, crowdinId: string, provider: Provider): Promise<void>;
|
|
50
71
|
deleteWebhooks(fileIds: string[], integrationId: string, crowdinId: string, provider: Provider): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* @deprecated loads every error log together with its full `data` payload, which can
|
|
74
|
+
* exhaust memory on large tables. Use {@link Storage.getUserErrors} together with
|
|
75
|
+
* {@link Storage.countUserErrors} for the list and {@link Storage.getUserError} for a
|
|
76
|
+
* single record.
|
|
77
|
+
*/
|
|
51
78
|
getAllUserErrors(crowdinId: string, integrationId?: string): Promise<UserErrors[] | undefined>;
|
|
79
|
+
getUserErrors(params: GetUserErrorsParams): Promise<UserErrorListItem[]>;
|
|
80
|
+
countUserErrors(params: UserErrorsFilter): Promise<number>;
|
|
81
|
+
getUserError(params: GetUserErrorParams): Promise<UserErrors | undefined>;
|
|
52
82
|
saveUserError(action: string, message: string, data: string, createdAt: string, crowdinId: string, integrationId?: string): Promise<void>;
|
|
53
83
|
deleteUserErrors(date: string, crowdinId: string, integrationId?: string): Promise<void>;
|
|
54
84
|
deleteAllUsersErrorsOlderThan(date: string): Promise<void>;
|
package/package.json
CHANGED