@interware/content-generator 0.7.2 → 0.8.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 (45) hide show
  1. package/dist/_chunks/{App-CTh6owSM.mjs → App-DD1MzaWm.mjs} +2 -2
  2. package/dist/_chunks/{App-ugsCmlsC.js → App-DspaMfyW.js} +2 -2
  3. package/dist/_chunks/{ImageStudioTabs-Umf3GODW.mjs → ImageStudioTabs-DwaLxRjl.mjs} +308 -16
  4. package/dist/_chunks/{ImageStudioTabs-BFEF9ggK.js → ImageStudioTabs-uXSBkFeu.js} +306 -14
  5. package/dist/_chunks/{Settings-CdGW2O8h.mjs → Settings-C6TbUrgU.mjs} +170 -2
  6. package/dist/_chunks/{Settings-Sk78JUBS.js → Settings-ps0o7-fC.js} +169 -1
  7. package/dist/_chunks/{StudioApp-CrGn-9Gg.mjs → StudioApp-B5I1OfGw.mjs} +2 -2
  8. package/dist/_chunks/{StudioApp-DoC0z4eh.js → StudioApp-B7kGpqqo.js} +2 -2
  9. package/dist/_chunks/{index-C2s9Jhcc.js → index-BudahdfX.js} +3 -3
  10. package/dist/_chunks/{index-D6UAvh53.mjs → index-zenHkX-p.mjs} +3 -3
  11. package/dist/admin/index.js +1 -1
  12. package/dist/admin/index.mjs +1 -1
  13. package/dist/admin/src/components/settings/DriveSettings.d.ts +77 -0
  14. package/dist/admin/src/features/drive/DriveTab.d.ts +42 -0
  15. package/dist/admin/src/features/image-studio/ImageStudioTabs.d.ts +3 -0
  16. package/dist/admin/src/features/library/FileCard.d.ts +5 -2
  17. package/dist/admin/src/features/library/driveSync.d.ts +41 -0
  18. package/dist/admin/src/features/templates/export/templateOrigin.d.ts +10 -0
  19. package/dist/admin/src/lib/use-cases/drive/index.d.ts +3 -0
  20. package/dist/server/index.js +1411 -49
  21. package/dist/server/index.mjs +1409 -47
  22. package/dist/server/src/bootstrap.d.ts +2 -0
  23. package/dist/server/src/content-types/drive-link/index.d.ts +62 -0
  24. package/dist/server/src/content-types/drive-link/schema.d.ts +68 -0
  25. package/dist/server/src/content-types/drive-op/index.d.ts +46 -0
  26. package/dist/server/src/content-types/drive-op/schema.d.ts +49 -0
  27. package/dist/server/src/content-types/index.d.ts +106 -0
  28. package/dist/server/src/controllers/drive.d.ts +30 -0
  29. package/dist/server/src/controllers/index.d.ts +130 -0
  30. package/dist/server/src/drive/client.d.ts +32 -0
  31. package/dist/server/src/drive/clientConfig.d.ts +27 -0
  32. package/dist/server/src/drive/common.d.ts +6 -0
  33. package/dist/server/src/drive/fakes.d.ts +104 -0
  34. package/dist/server/src/drive/files.d.ts +136 -0
  35. package/dist/server/src/drive/lifecycles.d.ts +7 -0
  36. package/dist/server/src/drive/links.d.ts +23 -0
  37. package/dist/server/src/drive/model.d.ts +99 -0
  38. package/dist/server/src/drive/oauth.d.ts +47 -0
  39. package/dist/server/src/drive/pull.d.ts +23 -0
  40. package/dist/server/src/drive/strapiPorts.d.ts +10 -0
  41. package/dist/server/src/drive/sync.d.ts +40 -0
  42. package/dist/server/src/index.d.ts +294 -0
  43. package/dist/server/src/services/drive.d.ts +141 -0
  44. package/dist/server/src/services/index.d.ts +55 -0
  45. package/package.json +1 -1
@@ -1,6 +1,8 @@
1
1
  import type { Core } from '@strapi/strapi';
2
2
  /** Tarea que publica los artículos programados (E6, D4). */
3
3
  export declare const SCHEDULE_CRON = "content-generator-publicar-programados";
4
+ /** Ciclo de la sincronización con Google Drive (E7, S7.3). */
5
+ export declare const DRIVE_CRON = "content-generator-drive";
4
6
  declare const bootstrap: ({ strapi }: {
5
7
  strapi: Core.Strapi;
6
8
  }) => Promise<void>;
@@ -0,0 +1,62 @@
1
+ declare const _default: {
2
+ schema: {
3
+ kind: string;
4
+ collectionName: string;
5
+ info: {
6
+ singularName: string;
7
+ pluralName: string;
8
+ displayName: string;
9
+ description: string;
10
+ };
11
+ options: {
12
+ draftAndPublish: boolean;
13
+ };
14
+ pluginOptions: {
15
+ 'content-manager': {
16
+ visible: boolean;
17
+ };
18
+ 'content-type-builder': {
19
+ visible: boolean;
20
+ };
21
+ };
22
+ attributes: {
23
+ cmsType: {
24
+ type: string;
25
+ enum: string[];
26
+ required: boolean;
27
+ };
28
+ cmsId: {
29
+ type: string;
30
+ required: boolean;
31
+ };
32
+ driveId: {
33
+ type: string;
34
+ };
35
+ root: {
36
+ type: string;
37
+ default: boolean;
38
+ };
39
+ name: {
40
+ type: string;
41
+ };
42
+ parentCmsId: {
43
+ type: string;
44
+ };
45
+ version: {
46
+ type: string;
47
+ };
48
+ driveRev: {
49
+ type: string;
50
+ };
51
+ status: {
52
+ type: string;
53
+ enum: string[];
54
+ default: string;
55
+ };
56
+ error: {
57
+ type: string;
58
+ };
59
+ };
60
+ };
61
+ };
62
+ export default _default;
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Vínculo entre un archivo o carpeta de la Biblioteca y su par en Drive (ADR-010, S7.3). Solo existe para lo
3
+ * sincronizado. Oculto en Content Manager y en Content-Type Builder, como `template`.
4
+ */
5
+ declare const _default: {
6
+ kind: string;
7
+ collectionName: string;
8
+ info: {
9
+ singularName: string;
10
+ pluralName: string;
11
+ displayName: string;
12
+ description: string;
13
+ };
14
+ options: {
15
+ draftAndPublish: boolean;
16
+ };
17
+ pluginOptions: {
18
+ 'content-manager': {
19
+ visible: boolean;
20
+ };
21
+ 'content-type-builder': {
22
+ visible: boolean;
23
+ };
24
+ };
25
+ attributes: {
26
+ cmsType: {
27
+ type: string;
28
+ enum: string[];
29
+ required: boolean;
30
+ };
31
+ cmsId: {
32
+ type: string;
33
+ required: boolean;
34
+ };
35
+ /** Vacío mientras el archivo espera su primera subida. */
36
+ driveId: {
37
+ type: string;
38
+ };
39
+ /** Lo marcó el usuario; los demás vínculos son contenido o ancestros de algo marcado. */
40
+ root: {
41
+ type: string;
42
+ default: boolean;
43
+ };
44
+ name: {
45
+ type: string;
46
+ };
47
+ parentCmsId: {
48
+ type: string;
49
+ };
50
+ /** Archivo: `url|size` de la última subida. */
51
+ version: {
52
+ type: string;
53
+ };
54
+ /** `md5Checksum` de Drive de la última versión sincronizada (S7.4). */
55
+ driveRev: {
56
+ type: string;
57
+ };
58
+ status: {
59
+ type: string;
60
+ enum: string[];
61
+ default: string;
62
+ };
63
+ error: {
64
+ type: string;
65
+ };
66
+ };
67
+ };
68
+ export default _default;
@@ -0,0 +1,46 @@
1
+ declare const _default: {
2
+ schema: {
3
+ kind: string;
4
+ collectionName: string;
5
+ info: {
6
+ singularName: string;
7
+ pluralName: string;
8
+ displayName: string;
9
+ description: string;
10
+ };
11
+ options: {
12
+ draftAndPublish: boolean;
13
+ };
14
+ pluginOptions: {
15
+ 'content-manager': {
16
+ visible: boolean;
17
+ };
18
+ 'content-type-builder': {
19
+ visible: boolean;
20
+ };
21
+ };
22
+ attributes: {
23
+ cmsType: {
24
+ type: string;
25
+ enum: string[];
26
+ required: boolean;
27
+ };
28
+ cmsId: {
29
+ type: string;
30
+ required: boolean;
31
+ };
32
+ attempts: {
33
+ type: string;
34
+ default: number;
35
+ };
36
+ runAfter: {
37
+ type: string;
38
+ default: string;
39
+ };
40
+ error: {
41
+ type: string;
42
+ };
43
+ };
44
+ };
45
+ };
46
+ export default _default;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Cola de la sincronización con Drive (ADR-009, S7.3): «revisa este elemento». Qué hacer se decide al
3
+ * procesar, comparando contra su vínculo; encolar dos veces no cambia el resultado.
4
+ */
5
+ declare const _default: {
6
+ kind: string;
7
+ collectionName: string;
8
+ info: {
9
+ singularName: string;
10
+ pluralName: string;
11
+ displayName: string;
12
+ description: string;
13
+ };
14
+ options: {
15
+ draftAndPublish: boolean;
16
+ };
17
+ pluginOptions: {
18
+ 'content-manager': {
19
+ visible: boolean;
20
+ };
21
+ 'content-type-builder': {
22
+ visible: boolean;
23
+ };
24
+ };
25
+ attributes: {
26
+ cmsType: {
27
+ type: string;
28
+ enum: string[];
29
+ required: boolean;
30
+ };
31
+ cmsId: {
32
+ type: string;
33
+ required: boolean;
34
+ };
35
+ attempts: {
36
+ type: string;
37
+ default: number;
38
+ };
39
+ /** Epoch en ms: no se procesa antes (espera creciente tras un error). */
40
+ runAfter: {
41
+ type: string;
42
+ default: string;
43
+ };
44
+ error: {
45
+ type: string;
46
+ };
47
+ };
48
+ };
49
+ export default _default;
@@ -63,5 +63,111 @@ declare const _default: {
63
63
  };
64
64
  };
65
65
  };
66
+ 'drive-link': {
67
+ schema: {
68
+ kind: string;
69
+ collectionName: string;
70
+ info: {
71
+ singularName: string;
72
+ pluralName: string;
73
+ displayName: string;
74
+ description: string;
75
+ };
76
+ options: {
77
+ draftAndPublish: boolean;
78
+ };
79
+ pluginOptions: {
80
+ 'content-manager': {
81
+ visible: boolean;
82
+ };
83
+ 'content-type-builder': {
84
+ visible: boolean;
85
+ };
86
+ };
87
+ attributes: {
88
+ cmsType: {
89
+ type: string;
90
+ enum: string[];
91
+ required: boolean;
92
+ };
93
+ cmsId: {
94
+ type: string;
95
+ required: boolean;
96
+ };
97
+ driveId: {
98
+ type: string;
99
+ };
100
+ root: {
101
+ type: string;
102
+ default: boolean;
103
+ };
104
+ name: {
105
+ type: string;
106
+ };
107
+ parentCmsId: {
108
+ type: string;
109
+ };
110
+ version: {
111
+ type: string;
112
+ };
113
+ driveRev: {
114
+ type: string;
115
+ };
116
+ status: {
117
+ type: string;
118
+ enum: string[];
119
+ default: string;
120
+ };
121
+ error: {
122
+ type: string;
123
+ };
124
+ };
125
+ };
126
+ };
127
+ 'drive-op': {
128
+ schema: {
129
+ kind: string;
130
+ collectionName: string;
131
+ info: {
132
+ singularName: string;
133
+ pluralName: string;
134
+ displayName: string;
135
+ description: string;
136
+ };
137
+ options: {
138
+ draftAndPublish: boolean;
139
+ };
140
+ pluginOptions: {
141
+ 'content-manager': {
142
+ visible: boolean;
143
+ };
144
+ 'content-type-builder': {
145
+ visible: boolean;
146
+ };
147
+ };
148
+ attributes: {
149
+ cmsType: {
150
+ type: string;
151
+ enum: string[];
152
+ required: boolean;
153
+ };
154
+ cmsId: {
155
+ type: string;
156
+ required: boolean;
157
+ };
158
+ attempts: {
159
+ type: string;
160
+ default: number;
161
+ };
162
+ runAfter: {
163
+ type: string;
164
+ default: string;
165
+ };
166
+ error: {
167
+ type: string;
168
+ };
169
+ };
170
+ };
171
+ };
66
172
  };
67
173
  export default _default;
@@ -0,0 +1,30 @@
1
+ import type { Core } from '@strapi/strapi';
2
+ type Ctx = {
3
+ request: {
4
+ body?: Record<string, unknown>;
5
+ };
6
+ query: Record<string, unknown>;
7
+ params?: Record<string, string>;
8
+ status: number;
9
+ body: unknown;
10
+ };
11
+ /** Rutas de la conexión con Google Drive (S7.1): 400 entrada inválida, 500 el resto. */
12
+ declare const _default: ({ strapi }: {
13
+ strapi: Core.Strapi;
14
+ }) => {
15
+ status: (ctx: Ctx) => Promise<void>;
16
+ saveClient: (ctx: Ctx) => Promise<void>;
17
+ removeClient: (ctx: Ctx) => Promise<void>;
18
+ authorizationUrl: (ctx: Ctx) => Promise<void>;
19
+ exchange: (ctx: Ctx) => Promise<void>;
20
+ disconnect: (ctx: Ctx) => Promise<void>;
21
+ links: (ctx: Ctx) => Promise<void>;
22
+ mark: (ctx: Ctx) => Promise<void>;
23
+ unmark: (ctx: Ctx) => Promise<void>;
24
+ syncNow: (ctx: Ctx) => Promise<void>;
25
+ browse: (ctx: Ctx) => Promise<void>;
26
+ count: (ctx: Ctx) => Promise<void>;
27
+ trash: (ctx: Ctx) => Promise<void>;
28
+ origin: (ctx: Ctx) => Promise<void>;
29
+ };
30
+ export default _default;
@@ -143,6 +143,136 @@ declare const _default: {
143
143
  body: unknown;
144
144
  }) => Promise<void>;
145
145
  };
146
+ drive: ({ strapi }: {
147
+ strapi: import("@strapi/types/dist/core").Strapi;
148
+ }) => {
149
+ status: (ctx: {
150
+ request: {
151
+ body?: Record<string, unknown>;
152
+ };
153
+ query: Record<string, unknown>;
154
+ params?: Record<string, string>;
155
+ status: number;
156
+ body: unknown;
157
+ }) => Promise<void>;
158
+ saveClient: (ctx: {
159
+ request: {
160
+ body?: Record<string, unknown>;
161
+ };
162
+ query: Record<string, unknown>;
163
+ params?: Record<string, string>;
164
+ status: number;
165
+ body: unknown;
166
+ }) => Promise<void>;
167
+ removeClient: (ctx: {
168
+ request: {
169
+ body?: Record<string, unknown>;
170
+ };
171
+ query: Record<string, unknown>;
172
+ params?: Record<string, string>;
173
+ status: number;
174
+ body: unknown;
175
+ }) => Promise<void>;
176
+ authorizationUrl: (ctx: {
177
+ request: {
178
+ body?: Record<string, unknown>;
179
+ };
180
+ query: Record<string, unknown>;
181
+ params?: Record<string, string>;
182
+ status: number;
183
+ body: unknown;
184
+ }) => Promise<void>;
185
+ exchange: (ctx: {
186
+ request: {
187
+ body?: Record<string, unknown>;
188
+ };
189
+ query: Record<string, unknown>;
190
+ params?: Record<string, string>;
191
+ status: number;
192
+ body: unknown;
193
+ }) => Promise<void>;
194
+ disconnect: (ctx: {
195
+ request: {
196
+ body?: Record<string, unknown>;
197
+ };
198
+ query: Record<string, unknown>;
199
+ params?: Record<string, string>;
200
+ status: number;
201
+ body: unknown;
202
+ }) => Promise<void>;
203
+ links: (ctx: {
204
+ request: {
205
+ body?: Record<string, unknown>;
206
+ };
207
+ query: Record<string, unknown>;
208
+ params?: Record<string, string>;
209
+ status: number;
210
+ body: unknown;
211
+ }) => Promise<void>;
212
+ mark: (ctx: {
213
+ request: {
214
+ body?: Record<string, unknown>;
215
+ };
216
+ query: Record<string, unknown>;
217
+ params?: Record<string, string>;
218
+ status: number;
219
+ body: unknown;
220
+ }) => Promise<void>;
221
+ unmark: (ctx: {
222
+ request: {
223
+ body?: Record<string, unknown>;
224
+ };
225
+ query: Record<string, unknown>;
226
+ params?: Record<string, string>;
227
+ status: number;
228
+ body: unknown;
229
+ }) => Promise<void>;
230
+ syncNow: (ctx: {
231
+ request: {
232
+ body?: Record<string, unknown>;
233
+ };
234
+ query: Record<string, unknown>;
235
+ params?: Record<string, string>;
236
+ status: number;
237
+ body: unknown;
238
+ }) => Promise<void>;
239
+ browse: (ctx: {
240
+ request: {
241
+ body?: Record<string, unknown>;
242
+ };
243
+ query: Record<string, unknown>;
244
+ params?: Record<string, string>;
245
+ status: number;
246
+ body: unknown;
247
+ }) => Promise<void>;
248
+ count: (ctx: {
249
+ request: {
250
+ body?: Record<string, unknown>;
251
+ };
252
+ query: Record<string, unknown>;
253
+ params?: Record<string, string>;
254
+ status: number;
255
+ body: unknown;
256
+ }) => Promise<void>;
257
+ trash: (ctx: {
258
+ request: {
259
+ body?: Record<string, unknown>;
260
+ };
261
+ query: Record<string, unknown>;
262
+ params?: Record<string, string>;
263
+ status: number;
264
+ body: unknown;
265
+ }) => Promise<void>;
266
+ origin: (ctx: {
267
+ request: {
268
+ body?: Record<string, unknown>;
269
+ };
270
+ query: Record<string, unknown>;
271
+ params?: Record<string, string>;
272
+ status: number;
273
+ body: unknown;
274
+ }) => Promise<void>;
275
+ };
146
276
  articles: ({ strapi }: {
147
277
  strapi: import("@strapi/types/dist/core").Strapi;
148
278
  }) => {
@@ -0,0 +1,32 @@
1
+ import type { DriveClient } from './clientConfig';
2
+ import type { Fetch } from './oauth';
3
+ export interface DriveCredentials {
4
+ client: DriveClient;
5
+ refreshToken: string;
6
+ }
7
+ export interface DriveAbout {
8
+ email: string;
9
+ usage: number;
10
+ /** `null` si la cuenta no tiene tope de espacio. */
11
+ limit: number | null;
12
+ }
13
+ /** No hay cliente guardado o la cuenta no se ha conectado. */
14
+ export declare class DriveNotConnectedError extends Error {
15
+ constructor();
16
+ }
17
+ export declare class DriveApiError extends Error {
18
+ readonly status: number;
19
+ constructor(status: number, message: string);
20
+ }
21
+ export declare const createDriveClient: ({ getCredentials, fetch: fetchFn, sleep, now, }: {
22
+ getCredentials: () => Promise<DriveCredentials | null>;
23
+ fetch: Fetch;
24
+ sleep?: (ms: number) => Promise<void>;
25
+ now?: () => number;
26
+ }) => {
27
+ request: <T = unknown>(path: string, init?: RequestInit) => Promise<T>;
28
+ download: (path: string) => Promise<Uint8Array>;
29
+ about: () => Promise<DriveAbout>;
30
+ reset: () => any;
31
+ };
32
+ export type DriveHttpClient = ReturnType<typeof createDriveClient>;
@@ -0,0 +1,27 @@
1
+ /** Clave del cliente OAuth en el plugin store. */
2
+ export declare const DRIVE_CLIENT_KEY = "DRIVE_CLIENT";
3
+ export interface DriveClient {
4
+ clientId: string;
5
+ clientSecret: string;
6
+ redirectUris: string[];
7
+ }
8
+ export type ClientParseResult = {
9
+ ok: true;
10
+ client: DriveClient;
11
+ } | {
12
+ ok: false;
13
+ message: string;
14
+ };
15
+ /** Estado público para `GET /drive/status`: el Client ID y los últimos 4 del secreto. */
16
+ export interface PublicDriveClient {
17
+ configured: boolean;
18
+ clientId: string | null;
19
+ last4: string | null;
20
+ }
21
+ /** Valida el JSON de Google Cloud y que autorice `redirectUri`, la URL de Ajustes desde la que se carga. */
22
+ export declare const parseClientConfig: (value: unknown, redirectUri: string) => ClientParseResult;
23
+ /** JSON mínimo que se guarda en el store, con la misma forma que el de Google. */
24
+ export declare const storedClient: (client: DriveClient) => string;
25
+ /** Cliente guardado, o `null` si no hay o está dañado. */
26
+ export declare const loadClient: (stored: unknown) => DriveClient | null;
27
+ export declare const publicClient: (stored: unknown) => PublicDriveClient;
@@ -0,0 +1,6 @@
1
+ import type { CmsFile } from './model';
2
+ export declare const MAX_FILE_BYTES: number;
3
+ export declare const withoutEcho: <T>(work: () => Promise<T>) => Promise<T>;
4
+ export declare const isEcho: () => boolean;
5
+ /** Versión de un archivo: reemplazarlo en Strapi cambia su URL (diseño D4). */
6
+ export declare const versionOf: (file: CmsFile) => string;
@@ -0,0 +1,104 @@
1
+ import type { DriveChange, UploadInput } from './files';
2
+ import type { Cms, CmsWriter, DriveLink, DriveOp, LinkRepo, OpQueue } from './model';
3
+ type FolderSeed = {
4
+ id: number;
5
+ name: string;
6
+ parentId: number | null;
7
+ };
8
+ type FileSeed = {
9
+ id: number;
10
+ name: string;
11
+ folderId: number | null;
12
+ url?: string;
13
+ size?: number;
14
+ mime?: string;
15
+ };
16
+ /** Biblioteca en memoria. `pathId` = `id` para simplificar; las rutas se calculan como en Strapi. */
17
+ export declare const fakeCms: (folderSeeds: FolderSeed[], fileSeeds?: FileSeed[]) => {
18
+ cms: Cms;
19
+ writer: CmsWriter;
20
+ folders: Map<number, FolderSeed>;
21
+ files: Map<number, FileSeed>;
22
+ contents: Map<number, Uint8Array>;
23
+ };
24
+ export interface FakeDriveItem {
25
+ id: string;
26
+ name: string;
27
+ parent: string;
28
+ folder: boolean;
29
+ trashed: boolean;
30
+ content?: string;
31
+ description?: string;
32
+ mimeType?: string;
33
+ revisions: number;
34
+ }
35
+ /**
36
+ * Drive en memoria con las operaciones del puerto `DriveOps` y un registro de cambios como el de
37
+ * `changes.list`. `external` simula lo que alguien hace directo en Drive.
38
+ */
39
+ export declare const fakeDrive: () => {
40
+ ops: {
41
+ findChild: (parentId: string, name: string) => Promise<import("./files").DriveFile>;
42
+ createFolder: (parentId: string, name: string) => Promise<string>;
43
+ uploadFile: (parentId: string, file: UploadInput) => Promise<import("./files").Uploaded>;
44
+ updateContent: (driveId: string, file: UploadInput) => Promise<import("./files").Uploaded>;
45
+ updateMeta: (driveId: string, change: {
46
+ name?: string;
47
+ from?: string;
48
+ to?: string;
49
+ }) => Promise<void>;
50
+ trash: (driveId: string) => Promise<void>;
51
+ download: (driveId: string) => Promise<Uint8Array>;
52
+ startPageToken: () => Promise<string>;
53
+ rootId: () => Promise<string>;
54
+ listChildren: (parentId: string, pageToken?: string) => Promise<{
55
+ items: import("./files").DriveEntry[];
56
+ nextPageToken: string;
57
+ }>;
58
+ getFile: (id: string) => Promise<import("./files").DriveEntry>;
59
+ getMeta: (id: string) => Promise<{
60
+ id: string;
61
+ name: string;
62
+ mimeType: string;
63
+ parents?: string[];
64
+ trashed?: boolean;
65
+ md5Checksum?: string;
66
+ size?: string;
67
+ }>;
68
+ countTree: (folderId: string) => Promise<{
69
+ files: number;
70
+ folders: number;
71
+ truncated: boolean;
72
+ }>;
73
+ listChanges: (pageToken: string) => Promise<{
74
+ changes?: DriveChange[];
75
+ nextPageToken?: string;
76
+ newStartPageToken?: string;
77
+ }>;
78
+ };
79
+ items: Map<string, FakeDriveItem>;
80
+ add: (parent: string, name: string, folder: boolean, extra?: Partial<FakeDriveItem>) => string;
81
+ external: {
82
+ /** Como `rename`, pero sin dejar rastro en `changes.list` (cambios previos al punto de partida). */
83
+ renameUnlogged: (id: string, name: string) => void;
84
+ trashUnlogged: (id: string) => void;
85
+ add: (parent: string, name: string, content: string, mimeType?: string) => string;
86
+ addFolder: (parent: string, name: string) => string;
87
+ edit: (id: string, content: string) => void;
88
+ rename: (id: string, name: string) => void;
89
+ move: (id: string, parent: string) => void;
90
+ trash: (id: string) => void;
91
+ };
92
+ log: DriveChange[];
93
+ pathOf: (id: string) => string;
94
+ live: () => string[];
95
+ };
96
+ export declare const memoryLinks: () => {
97
+ repo: LinkRepo;
98
+ rows: Map<number, DriveLink>;
99
+ };
100
+ export declare const memoryOps: () => {
101
+ queue: OpQueue;
102
+ rows: Map<number, DriveOp>;
103
+ };
104
+ export {};