@tanglemedia/svelte-starter-toolbelt 1.0.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 (95) hide show
  1. package/README.md +58 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.js +2 -0
  4. package/dist/server/index.d.ts +2 -0
  5. package/dist/server/index.js +1 -0
  6. package/dist/server/proxy/proxy.handle.d.ts +25 -0
  7. package/dist/server/proxy/proxy.handle.js +134 -0
  8. package/dist/service/index.d.ts +2 -0
  9. package/dist/service/index.js +2 -0
  10. package/dist/service/provider/create-directus-service.provider.d.ts +751 -0
  11. package/dist/service/provider/create-directus-service.provider.js +40 -0
  12. package/dist/service/service.factory.d.ts +34 -0
  13. package/dist/service/service.factory.js +49 -0
  14. package/dist/types/api-types.d.ts +40 -0
  15. package/dist/types/api-types.js +1 -0
  16. package/dist/types/helper-types.d.ts +8 -0
  17. package/dist/types/helper-types.js +1 -0
  18. package/dist/types/index.d.ts +2 -0
  19. package/dist/types/index.js +1 -0
  20. package/dist/utility/deep-merge.d.ts +10 -0
  21. package/dist/utility/deep-merge.js +27 -0
  22. package/dist/utility/error/index.d.ts +1 -0
  23. package/dist/utility/error/index.js +1 -0
  24. package/dist/utility/error/server-error.d.ts +19 -0
  25. package/dist/utility/error/server-error.js +68 -0
  26. package/dist/utility/file/basename.d.ts +1 -0
  27. package/dist/utility/file/basename.js +9 -0
  28. package/dist/utility/file/file-to-base64.d.ts +1 -0
  29. package/dist/utility/file/file-to-base64.js +11 -0
  30. package/dist/utility/file/index.d.ts +3 -0
  31. package/dist/utility/file/index.js +3 -0
  32. package/dist/utility/file/url-to-base64.d.ts +1 -0
  33. package/dist/utility/file/url-to-base64.js +17 -0
  34. package/dist/utility/helper/is-writable.d.ts +3 -0
  35. package/dist/utility/helper/is-writable.js +6 -0
  36. package/dist/utility/index.d.ts +6 -0
  37. package/dist/utility/index.js +7 -0
  38. package/dist/utility/mutation/create-delete-mutation.d.ts +26 -0
  39. package/dist/utility/mutation/create-delete-mutation.js +35 -0
  40. package/dist/utility/mutation/create-insert-mutation.d.ts +12 -0
  41. package/dist/utility/mutation/create-insert-mutation.js +22 -0
  42. package/dist/utility/mutation/create-update-mutation.d.ts +12 -0
  43. package/dist/utility/mutation/create-update-mutation.js +23 -0
  44. package/dist/utility/mutation/index.d.ts +4 -0
  45. package/dist/utility/mutation/index.js +4 -0
  46. package/dist/utility/mutation/invalidate-collection-query.d.ts +2 -0
  47. package/dist/utility/mutation/invalidate-collection-query.js +12 -0
  48. package/dist/utility/persisted-store.d.ts +6 -0
  49. package/dist/utility/persisted-store.js +27 -0
  50. package/dist/utility/query/create-find-infinite-query.svelte.d.ts +10 -0
  51. package/dist/utility/query/create-find-infinite-query.svelte.js +37 -0
  52. package/dist/utility/query/create-find-one-query.svelte.d.ts +10 -0
  53. package/dist/utility/query/create-find-one-query.svelte.js +23 -0
  54. package/dist/utility/query/create-find-query.svelte.d.ts +17 -0
  55. package/dist/utility/query/create-find-query.svelte.js +32 -0
  56. package/dist/utility/query/index.d.ts +3 -0
  57. package/dist/utility/query/index.js +3 -0
  58. package/dist/utility/query-factory.d.ts +18 -0
  59. package/dist/utility/query-factory.js +34 -0
  60. package/package.json +79 -0
  61. package/src/app.d.ts +13 -0
  62. package/src/app.html +12 -0
  63. package/src/demo.spec.ts +7 -0
  64. package/src/index.ts +1 -0
  65. package/src/lib/index.ts +3 -0
  66. package/src/lib/server/index.ts +2 -0
  67. package/src/lib/server/proxy/proxy.handle.ts +210 -0
  68. package/src/lib/service/index.ts +2 -0
  69. package/src/lib/service/provider/create-directus-service.provider.ts +75 -0
  70. package/src/lib/service/service.factory.ts +93 -0
  71. package/src/lib/types/api-types.ts +56 -0
  72. package/src/lib/types/helper-types.ts +12 -0
  73. package/src/lib/types/index.ts +2 -0
  74. package/src/lib/utility/deep-merge.ts +37 -0
  75. package/src/lib/utility/error/index.ts +1 -0
  76. package/src/lib/utility/error/server-error.ts +105 -0
  77. package/src/lib/utility/file/basename.ts +10 -0
  78. package/src/lib/utility/file/file-to-base64.ts +11 -0
  79. package/src/lib/utility/file/index.ts +3 -0
  80. package/src/lib/utility/file/url-to-base64.ts +20 -0
  81. package/src/lib/utility/helper/is-writable.ts +9 -0
  82. package/src/lib/utility/index.ts +7 -0
  83. package/src/lib/utility/mutation/create-delete-mutation.ts +71 -0
  84. package/src/lib/utility/mutation/create-insert-mutation.ts +46 -0
  85. package/src/lib/utility/mutation/create-update-mutation.ts +47 -0
  86. package/src/lib/utility/mutation/index.ts +4 -0
  87. package/src/lib/utility/mutation/invalidate-collection-query.ts +19 -0
  88. package/src/lib/utility/persisted-store.ts +31 -0
  89. package/src/lib/utility/query/create-find-infinite-query.svelte.ts +71 -0
  90. package/src/lib/utility/query/create-find-one-query.svelte.ts +53 -0
  91. package/src/lib/utility/query/create-find-query.svelte.ts +57 -0
  92. package/src/lib/utility/query/index.ts +3 -0
  93. package/src/lib/utility/query-factory.ts +62 -0
  94. package/src/routes/+page.svelte +3 -0
  95. package/src/routes/page.svelte.test.ts +11 -0
@@ -0,0 +1,751 @@
1
+ import { readMe, type AuthenticationClient, type DirectusClient, type RestClient, type RestCommand } from '@directus/sdk';
2
+ import { ServiceAbstract, type AnyObject, type ConfigurableServiceClass, type ConfiguredApplication, type HandleEvent, type ServiceAbstractOptions } from '@tanglemedia/svelte-starter-core';
3
+ export declare class DirectusBaseService<T extends AnyObject> extends ServiceAbstract<T> {
4
+ getDirectus(): Promise<DirectusClient<object> & RestClient<object> & AuthenticationClient<object>>;
5
+ handle(event: HandleEvent): Promise<void>;
6
+ command<T>(options: RestCommand<unknown, unknown>): Promise<T>;
7
+ readMe(query: Parameters<typeof readMe>[0]): Promise<{
8
+ id: string;
9
+ first_name: string | null;
10
+ last_name: string | null;
11
+ email: string | null;
12
+ password: string | null;
13
+ location: string | null;
14
+ title: string | null;
15
+ description: string | null;
16
+ tags: string[] | null;
17
+ avatar: string | {
18
+ id: string;
19
+ storage: string;
20
+ filename_disk: string | null;
21
+ filename_download: string;
22
+ title: string | null;
23
+ type: string | null;
24
+ folder: string | {
25
+ id: string;
26
+ name: string;
27
+ parent: string | /*elided*/ any | null;
28
+ } | null;
29
+ uploaded_by: string | {
30
+ id: string;
31
+ first_name: string | null;
32
+ last_name: string | null;
33
+ email: string | null;
34
+ password: string | null;
35
+ location: string | null;
36
+ title: string | null;
37
+ description: string | null;
38
+ tags: string[] | null;
39
+ avatar: string | /*elided*/ any | null;
40
+ language: string | null;
41
+ theme: string | null;
42
+ tfa_secret: string | null;
43
+ status: string;
44
+ role: string | {
45
+ id: string;
46
+ name: string;
47
+ icon: string;
48
+ description: string | null;
49
+ parent: string | /*elided*/ any;
50
+ children: string[] | /*elided*/ any[];
51
+ policies: string[] | {
52
+ id: string;
53
+ role: string | /*elided*/ any;
54
+ user: string | /*elided*/ any;
55
+ policy: string | {
56
+ id: string;
57
+ name: string;
58
+ icon: string;
59
+ description: string | null;
60
+ ip_access: string | null;
61
+ enforce_tfa: boolean;
62
+ admin_access: boolean;
63
+ app_access: boolean;
64
+ permissions: number[] | {
65
+ id: number;
66
+ policy: string | /*elided*/ any | null;
67
+ collection: string;
68
+ action: string;
69
+ permissions: Record<string, any> | null;
70
+ validation: Record<string, any> | null;
71
+ presets: Record<string, any> | null;
72
+ fields: string[] | null;
73
+ }[];
74
+ users: string[] | /*elided*/ any[];
75
+ roles: string[] | /*elided*/ any[];
76
+ };
77
+ sort: number;
78
+ }[];
79
+ users: string[] | /*elided*/ any[];
80
+ } | null;
81
+ token: string | null;
82
+ last_access: "datetime" | null;
83
+ last_page: string | null;
84
+ provider: string;
85
+ external_identifier: string | null;
86
+ auth_data: Record<string, any> | null;
87
+ email_notifications: boolean | null;
88
+ appearance: string | null;
89
+ theme_dark: string | null;
90
+ theme_light: string | null;
91
+ theme_light_overrides: Record<string, unknown> | null;
92
+ theme_dark_overrides: Record<string, unknown> | null;
93
+ policies: string[] | {
94
+ id: string;
95
+ name: string;
96
+ icon: string;
97
+ description: string | null;
98
+ ip_access: string | null;
99
+ enforce_tfa: boolean;
100
+ admin_access: boolean;
101
+ app_access: boolean;
102
+ permissions: number[] | {
103
+ id: number;
104
+ policy: string | /*elided*/ any | null;
105
+ collection: string;
106
+ action: string;
107
+ permissions: Record<string, any> | null;
108
+ validation: Record<string, any> | null;
109
+ presets: Record<string, any> | null;
110
+ fields: string[] | null;
111
+ }[];
112
+ users: string[] | /*elided*/ any[];
113
+ roles: string[] | {
114
+ id: string;
115
+ name: string;
116
+ icon: string;
117
+ description: string | null;
118
+ parent: string | /*elided*/ any;
119
+ children: string[] | /*elided*/ any[];
120
+ policies: string[] | {
121
+ id: string;
122
+ role: string | /*elided*/ any;
123
+ user: string | /*elided*/ any;
124
+ policy: string | /*elided*/ any;
125
+ sort: number;
126
+ }[];
127
+ users: string[] | /*elided*/ any[];
128
+ }[];
129
+ }[];
130
+ } | null;
131
+ uploaded_on: "datetime";
132
+ modified_by: string | {
133
+ id: string;
134
+ first_name: string | null;
135
+ last_name: string | null;
136
+ email: string | null;
137
+ password: string | null;
138
+ location: string | null;
139
+ title: string | null;
140
+ description: string | null;
141
+ tags: string[] | null;
142
+ avatar: string | /*elided*/ any | null;
143
+ language: string | null;
144
+ theme: string | null;
145
+ tfa_secret: string | null;
146
+ status: string;
147
+ role: string | {
148
+ id: string;
149
+ name: string;
150
+ icon: string;
151
+ description: string | null;
152
+ parent: string | /*elided*/ any;
153
+ children: string[] | /*elided*/ any[];
154
+ policies: string[] | {
155
+ id: string;
156
+ role: string | /*elided*/ any;
157
+ user: string | /*elided*/ any;
158
+ policy: string | {
159
+ id: string;
160
+ name: string;
161
+ icon: string;
162
+ description: string | null;
163
+ ip_access: string | null;
164
+ enforce_tfa: boolean;
165
+ admin_access: boolean;
166
+ app_access: boolean;
167
+ permissions: number[] | {
168
+ id: number;
169
+ policy: string | /*elided*/ any | null;
170
+ collection: string;
171
+ action: string;
172
+ permissions: Record<string, any> | null;
173
+ validation: Record<string, any> | null;
174
+ presets: Record<string, any> | null;
175
+ fields: string[] | null;
176
+ }[];
177
+ users: string[] | /*elided*/ any[];
178
+ roles: string[] | /*elided*/ any[];
179
+ };
180
+ sort: number;
181
+ }[];
182
+ users: string[] | /*elided*/ any[];
183
+ } | null;
184
+ token: string | null;
185
+ last_access: "datetime" | null;
186
+ last_page: string | null;
187
+ provider: string;
188
+ external_identifier: string | null;
189
+ auth_data: Record<string, any> | null;
190
+ email_notifications: boolean | null;
191
+ appearance: string | null;
192
+ theme_dark: string | null;
193
+ theme_light: string | null;
194
+ theme_light_overrides: Record<string, unknown> | null;
195
+ theme_dark_overrides: Record<string, unknown> | null;
196
+ policies: string[] | {
197
+ id: string;
198
+ name: string;
199
+ icon: string;
200
+ description: string | null;
201
+ ip_access: string | null;
202
+ enforce_tfa: boolean;
203
+ admin_access: boolean;
204
+ app_access: boolean;
205
+ permissions: number[] | {
206
+ id: number;
207
+ policy: string | /*elided*/ any | null;
208
+ collection: string;
209
+ action: string;
210
+ permissions: Record<string, any> | null;
211
+ validation: Record<string, any> | null;
212
+ presets: Record<string, any> | null;
213
+ fields: string[] | null;
214
+ }[];
215
+ users: string[] | /*elided*/ any[];
216
+ roles: string[] | {
217
+ id: string;
218
+ name: string;
219
+ icon: string;
220
+ description: string | null;
221
+ parent: string | /*elided*/ any;
222
+ children: string[] | /*elided*/ any[];
223
+ policies: string[] | {
224
+ id: string;
225
+ role: string | /*elided*/ any;
226
+ user: string | /*elided*/ any;
227
+ policy: string | /*elided*/ any;
228
+ sort: number;
229
+ }[];
230
+ users: string[] | /*elided*/ any[];
231
+ }[];
232
+ }[];
233
+ } | null;
234
+ modified_on: "datetime";
235
+ charset: string | null;
236
+ filesize: string | null;
237
+ width: number | null;
238
+ height: number | null;
239
+ duration: number | null;
240
+ embed: unknown | null;
241
+ description: string | null;
242
+ location: string | null;
243
+ tags: string[] | null;
244
+ metadata: Record<string, any> | null;
245
+ focal_point_x: number | null;
246
+ focal_point_y: number | null;
247
+ } | null;
248
+ language: string | null;
249
+ theme: string | null;
250
+ tfa_secret: string | null;
251
+ status: string;
252
+ role: string | {
253
+ id: string;
254
+ name: string;
255
+ icon: string;
256
+ description: string | null;
257
+ parent: string | /*elided*/ any;
258
+ children: string[] | /*elided*/ any[];
259
+ policies: string[] | {
260
+ id: string;
261
+ role: string | /*elided*/ any;
262
+ user: string | {
263
+ id: string;
264
+ first_name: string | null;
265
+ last_name: string | null;
266
+ email: string | null;
267
+ password: string | null;
268
+ location: string | null;
269
+ title: string | null;
270
+ description: string | null;
271
+ tags: string[] | null;
272
+ avatar: string | {
273
+ id: string;
274
+ storage: string;
275
+ filename_disk: string | null;
276
+ filename_download: string;
277
+ title: string | null;
278
+ type: string | null;
279
+ folder: string | {
280
+ id: string;
281
+ name: string;
282
+ parent: string | /*elided*/ any | null;
283
+ } | null;
284
+ uploaded_by: string | /*elided*/ any | null;
285
+ uploaded_on: "datetime";
286
+ modified_by: string | /*elided*/ any | null;
287
+ modified_on: "datetime";
288
+ charset: string | null;
289
+ filesize: string | null;
290
+ width: number | null;
291
+ height: number | null;
292
+ duration: number | null;
293
+ embed: unknown | null;
294
+ description: string | null;
295
+ location: string | null;
296
+ tags: string[] | null;
297
+ metadata: Record<string, any> | null;
298
+ focal_point_x: number | null;
299
+ focal_point_y: number | null;
300
+ } | null;
301
+ language: string | null;
302
+ theme: string | null;
303
+ tfa_secret: string | null;
304
+ status: string;
305
+ role: string | /*elided*/ any | null;
306
+ token: string | null;
307
+ last_access: "datetime" | null;
308
+ last_page: string | null;
309
+ provider: string;
310
+ external_identifier: string | null;
311
+ auth_data: Record<string, any> | null;
312
+ email_notifications: boolean | null;
313
+ appearance: string | null;
314
+ theme_dark: string | null;
315
+ theme_light: string | null;
316
+ theme_light_overrides: Record<string, unknown> | null;
317
+ theme_dark_overrides: Record<string, unknown> | null;
318
+ policies: string[] | {
319
+ id: string;
320
+ name: string;
321
+ icon: string;
322
+ description: string | null;
323
+ ip_access: string | null;
324
+ enforce_tfa: boolean;
325
+ admin_access: boolean;
326
+ app_access: boolean;
327
+ permissions: number[] | {
328
+ id: number;
329
+ policy: string | /*elided*/ any | null;
330
+ collection: string;
331
+ action: string;
332
+ permissions: Record<string, any> | null;
333
+ validation: Record<string, any> | null;
334
+ presets: Record<string, any> | null;
335
+ fields: string[] | null;
336
+ }[];
337
+ users: string[] | /*elided*/ any[];
338
+ roles: string[] | /*elided*/ any[];
339
+ }[];
340
+ };
341
+ policy: string | {
342
+ id: string;
343
+ name: string;
344
+ icon: string;
345
+ description: string | null;
346
+ ip_access: string | null;
347
+ enforce_tfa: boolean;
348
+ admin_access: boolean;
349
+ app_access: boolean;
350
+ permissions: number[] | {
351
+ id: number;
352
+ policy: string | /*elided*/ any | null;
353
+ collection: string;
354
+ action: string;
355
+ permissions: Record<string, any> | null;
356
+ validation: Record<string, any> | null;
357
+ presets: Record<string, any> | null;
358
+ fields: string[] | null;
359
+ }[];
360
+ users: string[] | {
361
+ id: string;
362
+ first_name: string | null;
363
+ last_name: string | null;
364
+ email: string | null;
365
+ password: string | null;
366
+ location: string | null;
367
+ title: string | null;
368
+ description: string | null;
369
+ tags: string[] | null;
370
+ avatar: string | {
371
+ id: string;
372
+ storage: string;
373
+ filename_disk: string | null;
374
+ filename_download: string;
375
+ title: string | null;
376
+ type: string | null;
377
+ folder: string | {
378
+ id: string;
379
+ name: string;
380
+ parent: string | /*elided*/ any | null;
381
+ } | null;
382
+ uploaded_by: string | /*elided*/ any | null;
383
+ uploaded_on: "datetime";
384
+ modified_by: string | /*elided*/ any | null;
385
+ modified_on: "datetime";
386
+ charset: string | null;
387
+ filesize: string | null;
388
+ width: number | null;
389
+ height: number | null;
390
+ duration: number | null;
391
+ embed: unknown | null;
392
+ description: string | null;
393
+ location: string | null;
394
+ tags: string[] | null;
395
+ metadata: Record<string, any> | null;
396
+ focal_point_x: number | null;
397
+ focal_point_y: number | null;
398
+ } | null;
399
+ language: string | null;
400
+ theme: string | null;
401
+ tfa_secret: string | null;
402
+ status: string;
403
+ role: string | /*elided*/ any | null;
404
+ token: string | null;
405
+ last_access: "datetime" | null;
406
+ last_page: string | null;
407
+ provider: string;
408
+ external_identifier: string | null;
409
+ auth_data: Record<string, any> | null;
410
+ email_notifications: boolean | null;
411
+ appearance: string | null;
412
+ theme_dark: string | null;
413
+ theme_light: string | null;
414
+ theme_light_overrides: Record<string, unknown> | null;
415
+ theme_dark_overrides: Record<string, unknown> | null;
416
+ policies: string[] | /*elided*/ any[];
417
+ }[];
418
+ roles: string[] | /*elided*/ any[];
419
+ };
420
+ sort: number;
421
+ }[];
422
+ users: string[] | {
423
+ id: string;
424
+ first_name: string | null;
425
+ last_name: string | null;
426
+ email: string | null;
427
+ password: string | null;
428
+ location: string | null;
429
+ title: string | null;
430
+ description: string | null;
431
+ tags: string[] | null;
432
+ avatar: string | {
433
+ id: string;
434
+ storage: string;
435
+ filename_disk: string | null;
436
+ filename_download: string;
437
+ title: string | null;
438
+ type: string | null;
439
+ folder: string | {
440
+ id: string;
441
+ name: string;
442
+ parent: string | /*elided*/ any | null;
443
+ } | null;
444
+ uploaded_by: string | /*elided*/ any | null;
445
+ uploaded_on: "datetime";
446
+ modified_by: string | /*elided*/ any | null;
447
+ modified_on: "datetime";
448
+ charset: string | null;
449
+ filesize: string | null;
450
+ width: number | null;
451
+ height: number | null;
452
+ duration: number | null;
453
+ embed: unknown | null;
454
+ description: string | null;
455
+ location: string | null;
456
+ tags: string[] | null;
457
+ metadata: Record<string, any> | null;
458
+ focal_point_x: number | null;
459
+ focal_point_y: number | null;
460
+ } | null;
461
+ language: string | null;
462
+ theme: string | null;
463
+ tfa_secret: string | null;
464
+ status: string;
465
+ role: string | /*elided*/ any | null;
466
+ token: string | null;
467
+ last_access: "datetime" | null;
468
+ last_page: string | null;
469
+ provider: string;
470
+ external_identifier: string | null;
471
+ auth_data: Record<string, any> | null;
472
+ email_notifications: boolean | null;
473
+ appearance: string | null;
474
+ theme_dark: string | null;
475
+ theme_light: string | null;
476
+ theme_light_overrides: Record<string, unknown> | null;
477
+ theme_dark_overrides: Record<string, unknown> | null;
478
+ policies: string[] | {
479
+ id: string;
480
+ name: string;
481
+ icon: string;
482
+ description: string | null;
483
+ ip_access: string | null;
484
+ enforce_tfa: boolean;
485
+ admin_access: boolean;
486
+ app_access: boolean;
487
+ permissions: number[] | {
488
+ id: number;
489
+ policy: string | /*elided*/ any | null;
490
+ collection: string;
491
+ action: string;
492
+ permissions: Record<string, any> | null;
493
+ validation: Record<string, any> | null;
494
+ presets: Record<string, any> | null;
495
+ fields: string[] | null;
496
+ }[];
497
+ users: string[] | /*elided*/ any[];
498
+ roles: string[] | /*elided*/ any[];
499
+ }[];
500
+ }[];
501
+ } | null;
502
+ token: string | null;
503
+ last_access: string | null;
504
+ last_page: string | null;
505
+ provider: string;
506
+ external_identifier: string | null;
507
+ auth_data: Record<string, any> | null;
508
+ email_notifications: boolean | null;
509
+ appearance: string | null;
510
+ theme_dark: string | null;
511
+ theme_light: string | null;
512
+ theme_light_overrides: Record<string, unknown> | null;
513
+ theme_dark_overrides: Record<string, unknown> | null;
514
+ policies: string[] | {
515
+ id: string;
516
+ name: string;
517
+ icon: string;
518
+ description: string | null;
519
+ ip_access: string | null;
520
+ enforce_tfa: boolean;
521
+ admin_access: boolean;
522
+ app_access: boolean;
523
+ permissions: number[] | {
524
+ id: number;
525
+ policy: string | /*elided*/ any | null;
526
+ collection: string;
527
+ action: string;
528
+ permissions: Record<string, any> | null;
529
+ validation: Record<string, any> | null;
530
+ presets: Record<string, any> | null;
531
+ fields: string[] | null;
532
+ }[];
533
+ users: string[] | {
534
+ id: string;
535
+ first_name: string | null;
536
+ last_name: string | null;
537
+ email: string | null;
538
+ password: string | null;
539
+ location: string | null;
540
+ title: string | null;
541
+ description: string | null;
542
+ tags: string[] | null;
543
+ avatar: string | {
544
+ id: string;
545
+ storage: string;
546
+ filename_disk: string | null;
547
+ filename_download: string;
548
+ title: string | null;
549
+ type: string | null;
550
+ folder: string | {
551
+ id: string;
552
+ name: string;
553
+ parent: string | /*elided*/ any | null;
554
+ } | null;
555
+ uploaded_by: string | /*elided*/ any | null;
556
+ uploaded_on: "datetime";
557
+ modified_by: string | /*elided*/ any | null;
558
+ modified_on: "datetime";
559
+ charset: string | null;
560
+ filesize: string | null;
561
+ width: number | null;
562
+ height: number | null;
563
+ duration: number | null;
564
+ embed: unknown | null;
565
+ description: string | null;
566
+ location: string | null;
567
+ tags: string[] | null;
568
+ metadata: Record<string, any> | null;
569
+ focal_point_x: number | null;
570
+ focal_point_y: number | null;
571
+ } | null;
572
+ language: string | null;
573
+ theme: string | null;
574
+ tfa_secret: string | null;
575
+ status: string;
576
+ role: string | {
577
+ id: string;
578
+ name: string;
579
+ icon: string;
580
+ description: string | null;
581
+ parent: string | /*elided*/ any;
582
+ children: string[] | /*elided*/ any[];
583
+ policies: string[] | {
584
+ id: string;
585
+ role: string | /*elided*/ any;
586
+ user: string | /*elided*/ any;
587
+ policy: string | /*elided*/ any;
588
+ sort: number;
589
+ }[];
590
+ users: string[] | /*elided*/ any[];
591
+ } | null;
592
+ token: string | null;
593
+ last_access: "datetime" | null;
594
+ last_page: string | null;
595
+ provider: string;
596
+ external_identifier: string | null;
597
+ auth_data: Record<string, any> | null;
598
+ email_notifications: boolean | null;
599
+ appearance: string | null;
600
+ theme_dark: string | null;
601
+ theme_light: string | null;
602
+ theme_light_overrides: Record<string, unknown> | null;
603
+ theme_dark_overrides: Record<string, unknown> | null;
604
+ policies: string[] | /*elided*/ any[];
605
+ }[];
606
+ roles: string[] | {
607
+ id: string;
608
+ name: string;
609
+ icon: string;
610
+ description: string | null;
611
+ parent: string | /*elided*/ any;
612
+ children: string[] | /*elided*/ any[];
613
+ policies: string[] | {
614
+ id: string;
615
+ role: string | /*elided*/ any;
616
+ user: string | {
617
+ id: string;
618
+ first_name: string | null;
619
+ last_name: string | null;
620
+ email: string | null;
621
+ password: string | null;
622
+ location: string | null;
623
+ title: string | null;
624
+ description: string | null;
625
+ tags: string[] | null;
626
+ avatar: string | {
627
+ id: string;
628
+ storage: string;
629
+ filename_disk: string | null;
630
+ filename_download: string;
631
+ title: string | null;
632
+ type: string | null;
633
+ folder: string | {
634
+ id: string;
635
+ name: string;
636
+ parent: string | /*elided*/ any | null;
637
+ } | null;
638
+ uploaded_by: string | /*elided*/ any | null;
639
+ uploaded_on: "datetime";
640
+ modified_by: string | /*elided*/ any | null;
641
+ modified_on: "datetime";
642
+ charset: string | null;
643
+ filesize: string | null;
644
+ width: number | null;
645
+ height: number | null;
646
+ duration: number | null;
647
+ embed: unknown | null;
648
+ description: string | null;
649
+ location: string | null;
650
+ tags: string[] | null;
651
+ metadata: Record<string, any> | null;
652
+ focal_point_x: number | null;
653
+ focal_point_y: number | null;
654
+ } | null;
655
+ language: string | null;
656
+ theme: string | null;
657
+ tfa_secret: string | null;
658
+ status: string;
659
+ role: string | /*elided*/ any | null;
660
+ token: string | null;
661
+ last_access: "datetime" | null;
662
+ last_page: string | null;
663
+ provider: string;
664
+ external_identifier: string | null;
665
+ auth_data: Record<string, any> | null;
666
+ email_notifications: boolean | null;
667
+ appearance: string | null;
668
+ theme_dark: string | null;
669
+ theme_light: string | null;
670
+ theme_light_overrides: Record<string, unknown> | null;
671
+ theme_dark_overrides: Record<string, unknown> | null;
672
+ policies: string[] | /*elided*/ any[];
673
+ };
674
+ policy: string | /*elided*/ any;
675
+ sort: number;
676
+ }[];
677
+ users: string[] | {
678
+ id: string;
679
+ first_name: string | null;
680
+ last_name: string | null;
681
+ email: string | null;
682
+ password: string | null;
683
+ location: string | null;
684
+ title: string | null;
685
+ description: string | null;
686
+ tags: string[] | null;
687
+ avatar: string | {
688
+ id: string;
689
+ storage: string;
690
+ filename_disk: string | null;
691
+ filename_download: string;
692
+ title: string | null;
693
+ type: string | null;
694
+ folder: string | {
695
+ id: string;
696
+ name: string;
697
+ parent: string | /*elided*/ any | null;
698
+ } | null;
699
+ uploaded_by: string | /*elided*/ any | null;
700
+ uploaded_on: "datetime";
701
+ modified_by: string | /*elided*/ any | null;
702
+ modified_on: "datetime";
703
+ charset: string | null;
704
+ filesize: string | null;
705
+ width: number | null;
706
+ height: number | null;
707
+ duration: number | null;
708
+ embed: unknown | null;
709
+ description: string | null;
710
+ location: string | null;
711
+ tags: string[] | null;
712
+ metadata: Record<string, any> | null;
713
+ focal_point_x: number | null;
714
+ focal_point_y: number | null;
715
+ } | null;
716
+ language: string | null;
717
+ theme: string | null;
718
+ tfa_secret: string | null;
719
+ status: string;
720
+ role: string | /*elided*/ any | null;
721
+ token: string | null;
722
+ last_access: "datetime" | null;
723
+ last_page: string | null;
724
+ provider: string;
725
+ external_identifier: string | null;
726
+ auth_data: Record<string, any> | null;
727
+ email_notifications: boolean | null;
728
+ appearance: string | null;
729
+ theme_dark: string | null;
730
+ theme_light: string | null;
731
+ theme_light_overrides: Record<string, unknown> | null;
732
+ theme_dark_overrides: Record<string, unknown> | null;
733
+ policies: string[] | /*elided*/ any[];
734
+ }[];
735
+ }[];
736
+ }[];
737
+ last_access_year: number;
738
+ last_access_month: number;
739
+ last_access_week: number;
740
+ last_access_day: number;
741
+ last_access_weekday: number;
742
+ last_access_hour: number;
743
+ last_access_minute: number;
744
+ last_access_second: number;
745
+ }>;
746
+ }
747
+ type ServiceProviderOpt<T extends AnyObject> = {
748
+ serviceClass?: (base: ConfigurableServiceClass<T>) => ConfigurableServiceClass<T, DirectusBaseService<T>>;
749
+ };
750
+ export declare function createDirectusServiceProvider({ configureService }: ConfiguredApplication): <T extends AnyObject>(collection: string, opt?: Partial<ServiceAbstractOptions> & ServiceProviderOpt<T>) => DirectusBaseService<T>;
751
+ export {};