@directus/api 28.0.3 → 29.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.
Files changed (141) hide show
  1. package/dist/auth/drivers/openid.js +12 -6
  2. package/dist/cli/commands/init/index.js +2 -2
  3. package/dist/cli/commands/init/questions.d.ts +1 -1
  4. package/dist/cli/commands/schema/apply.js +1 -1
  5. package/dist/cli/utils/create-db-connection.d.ts +1 -1
  6. package/dist/cli/utils/create-env/index.d.ts +1 -1
  7. package/dist/cli/utils/drivers.d.ts +1 -1
  8. package/dist/constants.d.ts +1 -1
  9. package/dist/controllers/assets.js +1 -1
  10. package/dist/controllers/extensions.js +4 -4
  11. package/dist/database/get-ast-from-query/lib/parse-fields.js +3 -1
  12. package/dist/database/helpers/index.d.ts +4 -4
  13. package/dist/database/helpers/schema/types.d.ts +1 -2
  14. package/dist/database/index.d.ts +1 -1
  15. package/dist/database/migrations/20210225A-add-relations-sort-field.js +1 -1
  16. package/dist/database/migrations/20240924B-populate-versioning-deltas.js +1 -1
  17. package/dist/database/migrations/20250718A-add-direction.d.ts +3 -0
  18. package/dist/database/migrations/20250718A-add-direction.js +10 -0
  19. package/dist/database/run-ast/lib/apply-query/filter/get-filter-type.d.ts +2 -2
  20. package/dist/database/run-ast/utils/apply-parent-filters.js +2 -0
  21. package/dist/database/run-ast/utils/get-field-alias.js +2 -0
  22. package/dist/database/run-ast/utils/remove-temporary-fields.js +8 -2
  23. package/dist/extensions/lib/get-extensions-settings.d.ts +1 -1
  24. package/dist/extensions/lib/sandbox/generate-api-extensions-sandbox-entrypoint.d.ts +1 -1
  25. package/dist/extensions/manager.d.ts +5 -13
  26. package/dist/extensions/manager.js +39 -28
  27. package/dist/flows.d.ts +1 -2
  28. package/dist/operations/throw-error/index.d.ts +7 -0
  29. package/dist/operations/throw-error/index.js +11 -0
  30. package/dist/permissions/modules/validate-access/lib/validate-item-access.js +2 -1
  31. package/dist/permissions/utils/fetch-share-info.d.ts +1 -1
  32. package/dist/services/access.d.ts +1 -2
  33. package/dist/services/access.js +1 -1
  34. package/dist/services/activity.d.ts +1 -1
  35. package/dist/services/assets.d.ts +1 -3
  36. package/dist/services/authentication.d.ts +1 -2
  37. package/dist/services/collections.d.ts +3 -10
  38. package/dist/services/comments.d.ts +1 -2
  39. package/dist/services/dashboards.d.ts +1 -1
  40. package/dist/services/extensions.d.ts +2 -4
  41. package/dist/services/fields.d.ts +1 -2
  42. package/dist/services/fields.js +2 -8
  43. package/dist/services/files.d.ts +2 -3
  44. package/dist/services/flows.d.ts +1 -2
  45. package/dist/services/folders.d.ts +1 -1
  46. package/dist/services/graphql/errors/format.d.ts +1 -1
  47. package/dist/services/graphql/errors/format.js +0 -1
  48. package/dist/services/graphql/index.d.ts +1 -3
  49. package/dist/services/graphql/resolvers/system-admin.d.ts +1 -1
  50. package/dist/services/graphql/resolvers/system-global.d.ts +1 -1
  51. package/dist/services/graphql/resolvers/system.d.ts +1 -1
  52. package/dist/services/graphql/schema/get-types.d.ts +1 -1
  53. package/dist/services/graphql/schema/get-types.js +0 -1
  54. package/dist/services/import-export.d.ts +2 -4
  55. package/dist/services/import-export.js +5 -3
  56. package/dist/services/items.d.ts +2 -12
  57. package/dist/services/items.js +2 -1
  58. package/dist/services/mail/index.d.ts +2 -4
  59. package/dist/services/mail/index.js +11 -5
  60. package/dist/services/meta.d.ts +1 -2
  61. package/dist/services/notifications.d.ts +1 -2
  62. package/dist/services/operations.d.ts +1 -2
  63. package/dist/services/panels.d.ts +1 -1
  64. package/dist/services/payload.d.ts +9 -17
  65. package/dist/services/payload.js +1 -1
  66. package/dist/services/permissions.d.ts +1 -3
  67. package/dist/services/policies.d.ts +1 -2
  68. package/dist/services/policies.js +1 -1
  69. package/dist/services/presets.d.ts +1 -1
  70. package/dist/services/relations.d.ts +2 -3
  71. package/dist/services/revisions.d.ts +1 -2
  72. package/dist/services/roles.d.ts +1 -2
  73. package/dist/services/roles.js +1 -1
  74. package/dist/services/schema.d.ts +1 -2
  75. package/dist/services/server.d.ts +1 -2
  76. package/dist/services/settings.d.ts +1 -1
  77. package/dist/services/shares.d.ts +1 -2
  78. package/dist/services/specifications.d.ts +1 -2
  79. package/dist/services/tfa.d.ts +1 -2
  80. package/dist/services/translations.d.ts +1 -3
  81. package/dist/services/users.d.ts +1 -2
  82. package/dist/services/users.js +1 -1
  83. package/dist/services/utils.d.ts +1 -2
  84. package/dist/services/versions.d.ts +1 -2
  85. package/dist/services/webhooks.d.ts +1 -2
  86. package/dist/services/websocket.d.ts +1 -3
  87. package/dist/types/ast.d.ts +2 -0
  88. package/dist/types/auth.d.ts +0 -6
  89. package/dist/types/index.d.ts +0 -7
  90. package/dist/types/index.js +0 -7
  91. package/dist/utils/apply-diff.d.ts +1 -2
  92. package/dist/utils/apply-diff.js +1 -1
  93. package/dist/utils/apply-snapshot.d.ts +1 -2
  94. package/dist/utils/get-ip-from-req.js +1 -1
  95. package/dist/utils/get-service.d.ts +1 -1
  96. package/dist/utils/get-snapshot-diff.d.ts +1 -1
  97. package/dist/utils/get-snapshot-diff.js +1 -1
  98. package/dist/utils/get-snapshot.d.ts +1 -2
  99. package/dist/utils/get-snapshot.js +8 -3
  100. package/dist/utils/schedule.js +4 -1
  101. package/dist/utils/should-clear-cache.d.ts +1 -1
  102. package/dist/utils/transformations.d.ts +1 -2
  103. package/dist/utils/validate-diff.d.ts +1 -1
  104. package/dist/utils/validate-diff.js +1 -1
  105. package/dist/utils/validate-snapshot.d.ts +1 -1
  106. package/dist/utils/validate-snapshot.js +1 -1
  107. package/dist/utils/validate-user-count-integrity.d.ts +1 -8
  108. package/dist/utils/validate-user-count-integrity.js +1 -9
  109. package/dist/websocket/authenticate.d.ts +2 -1
  110. package/dist/websocket/authenticate.js +25 -4
  111. package/dist/websocket/controllers/base.d.ts +2 -1
  112. package/dist/websocket/controllers/base.js +12 -15
  113. package/dist/websocket/controllers/graphql.js +5 -3
  114. package/dist/websocket/controllers/logs.js +1 -1
  115. package/dist/websocket/controllers/rest.d.ts +1 -1
  116. package/dist/websocket/controllers/rest.js +1 -1
  117. package/dist/websocket/errors.d.ts +1 -1
  118. package/dist/websocket/handlers/heartbeat.d.ts +1 -1
  119. package/dist/websocket/handlers/heartbeat.js +1 -1
  120. package/dist/websocket/messages.d.ts +57 -308
  121. package/dist/websocket/messages.js +5 -10
  122. package/dist/websocket/utils/items.d.ts +1 -1
  123. package/dist/websocket/utils/wait-for-message.d.ts +1 -1
  124. package/dist/websocket/utils/wait-for-message.js +1 -1
  125. package/package.json +86 -85
  126. package/dist/extensions/types.d.ts +0 -19
  127. package/dist/extensions/types.js +0 -1
  128. package/dist/types/assets.d.ts +0 -22
  129. package/dist/types/assets.js +0 -51
  130. package/dist/types/database.d.ts +0 -3
  131. package/dist/types/database.js +0 -1
  132. package/dist/types/graphql.d.ts +0 -14
  133. package/dist/types/graphql.js +0 -1
  134. package/dist/types/items.d.ts +0 -52
  135. package/dist/types/items.js +0 -1
  136. package/dist/types/services.d.ts +0 -22
  137. package/dist/types/services.js +0 -1
  138. package/dist/types/snapshot.d.ts +0 -55
  139. package/dist/types/snapshot.js +0 -13
  140. package/dist/types/webhooks.d.ts +0 -15
  141. package/dist/types/webhooks.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@directus/api",
3
- "version": "28.0.3",
3
+ "version": "29.1.0",
4
4
  "description": "Directus is a real-time API and App dashboard for managing SQL database content",
5
5
  "keywords": [
6
6
  "directus",
@@ -59,23 +59,23 @@
59
59
  ],
60
60
  "dependencies": {
61
61
  "@authenio/samlify-node-xmllint": "2.0.0",
62
- "@aws-sdk/client-ses": "3.758.0",
62
+ "@aws-sdk/client-ses": "3.859.0",
63
63
  "@godaddy/terminus": "4.12.1",
64
64
  "@rollup/plugin-alias": "5.1.1",
65
- "@rollup/plugin-node-resolve": "15.3.1",
65
+ "@rollup/plugin-node-resolve": "16.0.1",
66
66
  "@rollup/plugin-virtual": "3.0.2",
67
67
  "@tus/server": "1.10.2",
68
68
  "@tus/utils": "0.5.1",
69
- "argon2": "0.41.1",
69
+ "argon2": "0.43.1",
70
70
  "async": "3.2.6",
71
71
  "async-mutex": "0.5.0",
72
- "axios": "1.8.4",
72
+ "axios": "1.11.0",
73
73
  "busboy": "1.6.0",
74
74
  "bytes": "3.1.2",
75
75
  "camelcase": "8.0.0",
76
76
  "chalk": "5.4.1",
77
- "chokidar": "3.6.0",
78
- "commander": "12.1.0",
77
+ "chokidar": "4.0.3",
78
+ "commander": "14.0.0",
79
79
  "content-disposition": "0.5.4",
80
80
  "cookie": "1.0.2",
81
81
  "cookie-parser": "1.4.7",
@@ -84,22 +84,22 @@
84
84
  "date-fns": "4.1.0",
85
85
  "deep-diff": "1.0.2",
86
86
  "destroy": "1.2.0",
87
- "dotenv": "16.4.7",
87
+ "dotenv": "17.2.1",
88
88
  "encodeurl": "2.0.0",
89
89
  "eventemitter2": "6.4.9",
90
- "execa": "8.0.1",
90
+ "execa": "9.6.0",
91
91
  "exif-reader": "2.0.2",
92
92
  "express": "4.21.2",
93
93
  "flat": "6.0.1",
94
94
  "fs-extra": "11.3.0",
95
95
  "glob-to-regexp": "0.4.1",
96
- "graphql": "16.10.0",
96
+ "graphql": "16.11.0",
97
97
  "graphql-compose": "9.1.0",
98
- "graphql-ws": "5.16.2",
99
- "helmet": "8.0.0",
98
+ "graphql-ws": "6.0.6",
99
+ "helmet": "8.1.0",
100
100
  "icc": "3.0.0",
101
- "inquirer": "12.4.2",
102
- "ioredis": "5.5.0",
101
+ "inquirer": "12.9.0",
102
+ "ioredis": "5.7.0",
103
103
  "ip-matching": "2.1.2",
104
104
  "isolated-vm": "5.0.3",
105
105
  "joi": "17.13.3",
@@ -107,128 +107,128 @@
107
107
  "js2xmlparser": "5.0.0",
108
108
  "json2csv": "5.0.7",
109
109
  "jsonwebtoken": "9.0.2",
110
- "keyv": "5.3.0",
110
+ "keyv": "5.4.0",
111
111
  "knex": "3.1.0",
112
112
  "ldapjs": "2.3.3",
113
- "liquidjs": "10.21.0",
113
+ "liquidjs": "10.21.1",
114
114
  "lodash-es": "4.17.21",
115
- "marked": "15.0.7",
115
+ "marked": "16.1.1",
116
116
  "micromustache": "8.0.3",
117
- "mime-types": "2.1.35",
118
- "minimatch": "10.0.1",
117
+ "mime-types": "3.0.1",
118
+ "minimatch": "10.0.3",
119
119
  "mnemonist": "0.40.3",
120
120
  "ms": "2.1.3",
121
- "nanoid": "5.1.2",
121
+ "nanoid": "5.1.5",
122
122
  "node-machine-id": "1.1.12",
123
123
  "node-schedule": "2.1.1",
124
- "nodemailer": "6.10.0",
124
+ "nodemailer": "7.0.5",
125
125
  "object-hash": "3.0.0",
126
- "openapi3-ts": "4.4.0",
126
+ "openapi3-ts": "4.5.0",
127
127
  "openid-client": "5.7.1",
128
128
  "ora": "8.2.0",
129
129
  "otplib": "12.0.1",
130
130
  "p-limit": "6.2.0",
131
131
  "p-queue": "8.1.0",
132
- "papaparse": "5.5.2",
133
- "pino": "9.6.0",
134
- "pino-http": "10.4.0",
132
+ "papaparse": "5.5.3",
133
+ "pino": "9.7.0",
134
+ "pino-http": "10.5.0",
135
135
  "pino-http-print": "3.1.0",
136
- "pino-pretty": "13.0.0",
137
- "pm2": "5.4.3",
136
+ "pino-pretty": "13.1.1",
137
+ "pm2": "6.0.8",
138
138
  "prom-client": "15.1.3",
139
139
  "proxy-addr": "2.0.7",
140
140
  "qs": "6.14.0",
141
- "rate-limiter-flexible": "5.0.5",
142
- "rollup": "4.34.9",
143
- "samlify": "2.10.0",
144
- "sanitize-html": "2.14.0",
145
- "sharp": "0.33.5",
146
- "snappy": "7.2.2",
141
+ "rate-limiter-flexible": "7.2.0",
142
+ "rollup": "4.46.2",
143
+ "rolldown": "1.0.0-beta.31",
144
+ "samlify": "2.10.1",
145
+ "sanitize-html": "2.17.0",
146
+ "sharp": "0.34.3",
147
+ "snappy": "7.3.0",
147
148
  "stream-json": "1.9.1",
148
149
  "tar": "7.4.3",
149
- "tsx": "4.19.3",
150
+ "tsx": "4.20.3",
150
151
  "uuid": "11.1.0",
151
152
  "wellknown": "0.5.0",
152
- "ws": "8.18.1",
153
- "zod": "3.24.2",
154
- "zod-validation-error": "3.4.0",
155
- "@directus/app": "13.11.3",
156
- "@directus/env": "5.1.0",
157
- "@directus/constants": "13.0.1",
158
- "@directus/errors": "2.0.2",
159
- "@directus/extensions": "3.0.7",
160
- "@directus/extensions-registry": "3.0.7",
153
+ "ws": "8.18.3",
154
+ "zod": "4.0.14",
155
+ "zod-validation-error": "4.0.1",
156
+ "@directus/app": "13.13.0",
157
+ "@directus/constants": "13.0.2",
158
+ "@directus/env": "5.1.2",
159
+ "@directus/errors": "2.0.3",
160
+ "@directus/extensions": "3.0.9",
161
+ "@directus/extensions-sdk": "16.0.0",
161
162
  "@directus/format-title": "12.0.1",
162
- "@directus/extensions-sdk": "14.0.0",
163
- "@directus/memory": "3.0.6",
164
- "@directus/pressure": "3.0.6",
165
- "@directus/schema": "13.0.1",
166
- "@directus/schema-builder": "0.0.3",
167
- "@directus/specs": "11.1.0",
168
- "@directus/storage": "12.0.0",
169
- "@directus/storage-driver-azure": "12.0.6",
170
- "@directus/storage-driver-cloudinary": "12.0.6",
171
- "@directus/storage-driver-gcs": "12.0.6",
172
- "@directus/storage-driver-local": "12.0.0",
173
- "@directus/storage-driver-supabase": "3.0.6",
174
- "@directus/system-data": "3.1.1",
175
- "@directus/utils": "13.0.7",
176
- "@directus/storage-driver-s3": "12.0.6",
177
- "directus": "11.9.3",
178
- "@directus/validation": "2.0.6"
163
+ "@directus/extensions-registry": "3.0.9",
164
+ "@directus/memory": "3.0.8",
165
+ "@directus/pressure": "3.0.8",
166
+ "@directus/schema": "13.0.2",
167
+ "@directus/schema-builder": "0.0.4",
168
+ "@directus/storage": "12.0.1",
169
+ "@directus/specs": "11.1.1",
170
+ "@directus/storage-driver-cloudinary": "12.0.8",
171
+ "@directus/storage-driver-gcs": "12.0.8",
172
+ "@directus/storage-driver-azure": "12.0.8",
173
+ "@directus/storage-driver-local": "12.0.1",
174
+ "@directus/storage-driver-s3": "12.0.8",
175
+ "@directus/storage-driver-supabase": "3.0.8",
176
+ "@directus/utils": "13.0.9",
177
+ "@directus/system-data": "3.2.1",
178
+ "@directus/validation": "2.0.8",
179
+ "directus": "11.10.1"
179
180
  },
180
181
  "devDependencies": {
181
182
  "@directus/tsconfig": "3.0.0",
182
- "@ngneat/falso": "7.3.0",
183
+ "@ngneat/falso": "8.0.2",
183
184
  "@types/async": "3.2.24",
184
185
  "@types/busboy": "1.5.4",
185
186
  "@types/bytes": "3.1.5",
186
- "@types/content-disposition": "0.5.8",
187
- "@types/cookie-parser": "1.4.8",
188
- "@types/cors": "2.8.17",
187
+ "@types/content-disposition": "0.5.9",
188
+ "@types/cookie-parser": "1.4.9",
189
+ "@types/cors": "2.8.19",
189
190
  "@types/deep-diff": "1.0.5",
190
191
  "@types/destroy": "1.0.3",
191
- "@types/encodeurl": "1.0.2",
192
+ "@types/encodeurl": "1.0.3",
192
193
  "@types/express": "4.17.21",
193
194
  "@types/express-serve-static-core": "4.19.6",
194
195
  "@types/fs-extra": "11.0.4",
195
196
  "@types/glob-to-regexp": "0.4.4",
196
- "@types/inquirer": "9.0.7",
197
+ "@types/inquirer": "9.0.8",
197
198
  "@types/js-yaml": "4.0.9",
198
199
  "@types/json2csv": "5.0.7",
199
- "@types/jsonwebtoken": "9.0.9",
200
+ "@types/jsonwebtoken": "9.0.10",
200
201
  "@types/ldapjs": "2.2.5",
201
202
  "@types/lodash-es": "4.17.12",
202
- "@types/mime-types": "2.1.4",
203
+ "@types/mime-types": "3.0.1",
203
204
  "@types/ms": "2.1.0",
204
- "@types/node": "22.13.8",
205
- "@types/node-schedule": "2.1.7",
205
+ "@types/node": "22.13.14",
206
+ "@types/node-schedule": "2.1.8",
206
207
  "@types/nodemailer": "6.4.17",
207
208
  "@types/object-hash": "3.0.6",
208
- "@types/papaparse": "5.3.15",
209
+ "@types/papaparse": "5.3.16",
209
210
  "@types/proxy-addr": "2.0.3",
210
- "@types/qs": "6.9.18",
211
- "@types/sanitize-html": "2.13.0",
211
+ "@types/qs": "6.14.0",
212
+ "@types/sanitize-html": "2.16.0",
212
213
  "@types/stream-json": "1.7.8",
213
214
  "@types/wellknown": "0.5.8",
214
- "@types/ws": "8.5.14",
215
- "@vitest/coverage-v8": "2.1.9",
215
+ "@types/ws": "8.18.1",
216
+ "@vitest/coverage-v8": "3.2.4",
216
217
  "copyfiles": "2.4.1",
217
- "form-data": "4.0.2",
218
+ "form-data": "4.0.4",
218
219
  "get-port": "7.1.0",
219
220
  "knex-mock-client": "3.0.2",
220
- "typescript": "5.8.2",
221
- "vitest": "2.1.9",
222
- "@directus/random": "2.0.1",
223
- "@directus/schema-builder": "0.0.3",
224
- "@directus/types": "13.2.0"
221
+ "typescript": "5.8.3",
222
+ "vitest": "3.2.4",
223
+ "@directus/types": "13.2.1",
224
+ "@directus/schema-builder": "0.0.4"
225
225
  },
226
226
  "optionalDependencies": {
227
227
  "@keyv/redis": "3.0.1",
228
- "mysql2": "3.12.0",
228
+ "mysql2": "3.14.3",
229
229
  "nodemailer-mailgun-transport": "2.1.5",
230
- "oracledb": "6.8.0",
231
- "pg": "8.13.3",
230
+ "oracledb": "6.9.0",
231
+ "pg": "8.16.3",
232
232
  "sqlite3": "5.1.7",
233
233
  "tedious": "18.6.1"
234
234
  },
@@ -240,6 +240,7 @@
240
240
  "cli": "NODE_ENV=development SERVE_APP=false tsx src/cli/run.ts",
241
241
  "dev": "NODE_ENV=development SERVE_APP=true tsx watch --ignore extensions --clear-screen=false src/start.ts",
242
242
  "test": "vitest run",
243
- "test:watch": "vitest"
243
+ "test:watch": "vitest",
244
+ "test:coverage": "vitest run --coverage"
244
245
  }
245
246
  }
@@ -1,19 +0,0 @@
1
- import type { EndpointConfig, HookConfig, OperationApiConfig } from '@directus/extensions';
2
- export type BundleConfig = {
3
- endpoints: {
4
- name: string;
5
- config: EndpointConfig;
6
- }[];
7
- hooks: {
8
- name: string;
9
- config: HookConfig;
10
- }[];
11
- operations: {
12
- name: string;
13
- config: OperationApiConfig;
14
- }[];
15
- };
16
- export interface ExtensionManagerOptions {
17
- schedule: boolean;
18
- watch: boolean;
19
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,22 +0,0 @@
1
- import type { ResizeOptions, Sharp } from 'sharp';
2
- export declare const TransformationMethods: readonly ["toFormat", "jpeg", "png", "tiff", "webp", "avif", "resize", "extend", "extract", "trim", "rotate", "flip", "flop", "sharpen", "median", "blur", "flatten", "gamma", "negate", "normalise", "normalize", "clahe", "convolve", "threshold", "linear", "recomb", "modulate", "tint", "greyscale", "grayscale", "toColorspace", "toColourspace", "removeAlpha", "ensureAlpha", "extractChannel", "bandbool"];
3
- type AllowedSharpMethods = Pick<Sharp, (typeof TransformationMethods)[number]>;
4
- export type TransformationMap = {
5
- [M in keyof AllowedSharpMethods]: readonly [M, ...Parameters<AllowedSharpMethods[M]>];
6
- };
7
- export type Transformation = TransformationMap[keyof TransformationMap];
8
- export type TransformationResize = Pick<ResizeOptions, 'width' | 'height' | 'fit' | 'withoutEnlargement'>;
9
- export type TransformationFormat = 'jpg' | 'jpeg' | 'png' | 'webp' | 'tiff' | 'avif';
10
- export type TransformationParams = {
11
- key?: string;
12
- transforms?: Transformation[];
13
- format?: TransformationFormat | 'auto';
14
- quality?: number;
15
- focal_point_x?: number;
16
- focal_point_y?: number;
17
- } & TransformationResize;
18
- export type TransformationSet = {
19
- transformationParams: TransformationParams;
20
- acceptFormat?: TransformationFormat | undefined;
21
- };
22
- export {};
@@ -1,51 +0,0 @@
1
- // List of allowed sharp methods to expose.
2
- //
3
- // This is a literal, so we can use it to validate request parameters.
4
- export const TransformationMethods /*: readonly (keyof Sharp)[]*/ = [
5
- // Output options
6
- // https://sharp.pixelplumbing.com/api-output
7
- 'toFormat',
8
- 'jpeg',
9
- 'png',
10
- 'tiff',
11
- 'webp',
12
- 'avif',
13
- // Resizing
14
- // https://sharp.pixelplumbing.com/api-resize
15
- 'resize',
16
- 'extend',
17
- 'extract',
18
- 'trim',
19
- // Image operations
20
- // https://sharp.pixelplumbing.com/api-operation
21
- 'rotate',
22
- 'flip',
23
- 'flop',
24
- 'sharpen',
25
- 'median',
26
- 'blur',
27
- 'flatten',
28
- 'gamma',
29
- 'negate',
30
- 'normalise',
31
- 'normalize',
32
- 'clahe',
33
- 'convolve',
34
- 'threshold',
35
- 'linear',
36
- 'recomb',
37
- 'modulate',
38
- // Color manipulation
39
- // https://sharp.pixelplumbing.com/api-colour
40
- 'tint',
41
- 'greyscale',
42
- 'grayscale',
43
- 'toColorspace',
44
- 'toColourspace',
45
- // Channel manipulation
46
- // https://sharp.pixelplumbing.com/api-channel
47
- 'removeAlpha',
48
- 'ensureAlpha',
49
- 'extractChannel',
50
- 'bandbool',
51
- ];
@@ -1,3 +0,0 @@
1
- export type Driver = 'mysql2' | 'pg' | 'cockroachdb' | 'sqlite3' | 'oracledb' | 'mssql';
2
- export declare const DatabaseClients: readonly ["mysql", "postgres", "cockroachdb", "sqlite", "oracle", "mssql", "redshift"];
3
- export type DatabaseClient = (typeof DatabaseClients)[number];
@@ -1 +0,0 @@
1
- export const DatabaseClients = ['mysql', 'postgres', 'cockroachdb', 'sqlite', 'oracle', 'mssql', 'redshift'];
@@ -1,14 +0,0 @@
1
- import type { Request, Response } from 'express';
2
- import type { DocumentNode } from 'graphql';
3
- export interface GraphQLParams {
4
- query: string | null;
5
- variables: {
6
- readonly [name: string]: unknown;
7
- } | null;
8
- operationName: string | null;
9
- document: DocumentNode;
10
- contextValue: {
11
- req?: Request;
12
- res?: Response;
13
- };
14
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,52 +0,0 @@
1
- import type { DirectusError } from '@directus/errors';
2
- import type { EventContext, PrimaryKey } from '@directus/types';
3
- import type { MutationTracker } from '../services/items.js';
4
- import type { UserIntegrityCheckFlag } from '../utils/validate-user-count-integrity.js';
5
- export type MutationOptions = {
6
- /**
7
- * Callback function that's fired whenever a revision is made in the mutation
8
- */
9
- onRevisionCreate?: ((pk: PrimaryKey) => void) | undefined;
10
- /**
11
- * Flag to disable the auto purging of the cache. Is ignored when CACHE_AUTO_PURGE isn't enabled.
12
- */
13
- autoPurgeCache?: false | undefined;
14
- /**
15
- * Flag to disable the auto purging of the system cache.
16
- */
17
- autoPurgeSystemCache?: false | undefined;
18
- /**
19
- * Allow disabling the emitting of hooks. Useful if a custom hook is fired (like files.upload)
20
- */
21
- emitEvents?: boolean | undefined;
22
- /**
23
- * To bypass the emitting of action events if emitEvents is enabled
24
- * Can be used to queue up the nested events from item service's create, update and delete
25
- */
26
- bypassEmitAction?: ((params: ActionEventParams) => void) | undefined;
27
- /**
28
- * To bypass limits so that functions would work as intended
29
- */
30
- bypassLimits?: boolean | undefined;
31
- /**
32
- * To keep track of mutation limits
33
- */
34
- mutationTracker?: MutationTracker | undefined;
35
- preMutationError?: DirectusError | undefined;
36
- bypassAutoIncrementSequenceReset?: boolean;
37
- /**
38
- * Indicate that the top level mutation needs to perform a user integrity check before commiting the transaction
39
- * This is a combination of flags
40
- * @see UserIntegrityCheckFlag
41
- */
42
- userIntegrityCheckFlags?: UserIntegrityCheckFlag;
43
- /**
44
- * Callback function that is called whenever a mutation requires a user integrity check to be made
45
- */
46
- onRequireUserIntegrityCheck?: ((flags: UserIntegrityCheckFlag) => void) | undefined;
47
- };
48
- export type ActionEventParams = {
49
- event: string | string[];
50
- meta: Record<string, any>;
51
- context: EventContext;
52
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,22 +0,0 @@
1
- import type { Accountability, Item, PrimaryKey, Query, SchemaOverview } from '@directus/types';
2
- import type { Knex } from 'knex';
3
- export type AbstractServiceOptions = {
4
- knex?: Knex | undefined;
5
- accountability?: Accountability | null | undefined;
6
- schema: SchemaOverview;
7
- nested?: string[];
8
- };
9
- export interface AbstractService {
10
- knex: Knex;
11
- accountability: Accountability | null | undefined;
12
- nested: string[];
13
- createOne(data: Partial<Item>): Promise<PrimaryKey>;
14
- createMany(data: Partial<Item>[]): Promise<PrimaryKey[]>;
15
- readOne(key: PrimaryKey, query?: Query): Promise<Item>;
16
- readMany(keys: PrimaryKey[], query?: Query): Promise<Item[]>;
17
- readByQuery(query: Query): Promise<Item[]>;
18
- updateOne(key: PrimaryKey, data: Partial<Item>): Promise<PrimaryKey>;
19
- updateMany(keys: PrimaryKey[], data: Partial<Item>): Promise<PrimaryKey[]>;
20
- deleteOne(key: PrimaryKey): Promise<PrimaryKey>;
21
- deleteMany(keys: PrimaryKey[]): Promise<PrimaryKey[]>;
22
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,55 +0,0 @@
1
- import type { Field, FieldMeta, Relation, RelationMeta } from '@directus/types';
2
- import type { Diff } from 'deep-diff';
3
- import type { Collection } from './collection.js';
4
- import type { DatabaseClient } from './database.js';
5
- export type Snapshot = {
6
- version: number;
7
- directus: string;
8
- vendor?: DatabaseClient;
9
- collections: Collection[];
10
- fields: SnapshotField[];
11
- relations: SnapshotRelation[];
12
- };
13
- export type SnapshotField = Field & {
14
- meta: Omit<FieldMeta, 'id'>;
15
- };
16
- export type SnapshotRelation = Relation & {
17
- meta: Omit<RelationMeta, 'id'>;
18
- };
19
- export type SnapshotWithHash = Snapshot & {
20
- hash: string;
21
- };
22
- export type SnapshotDiff = {
23
- collections: {
24
- collection: string;
25
- diff: Diff<Collection | undefined>[];
26
- }[];
27
- fields: {
28
- collection: string;
29
- field: string;
30
- diff: Diff<SnapshotField | undefined>[];
31
- }[];
32
- relations: {
33
- collection: string;
34
- field: string;
35
- related_collection: string | null;
36
- diff: Diff<SnapshotRelation | undefined>[];
37
- }[];
38
- };
39
- export type SnapshotDiffWithHash = {
40
- hash: string;
41
- diff: SnapshotDiff;
42
- };
43
- /**
44
- * Indicates the kind of change based on comparisons by deep-diff package
45
- */
46
- export declare const DiffKind: {
47
- /** indicates a newly added property/element */
48
- readonly NEW: "N";
49
- /** indicates a property/element was deleted */
50
- readonly DELETE: "D";
51
- /** indicates a property/element was edited */
52
- readonly EDIT: "E";
53
- /** indicates a change occurred within an array */
54
- readonly ARRAY: "A";
55
- };
@@ -1,13 +0,0 @@
1
- /**
2
- * Indicates the kind of change based on comparisons by deep-diff package
3
- */
4
- export const DiffKind = {
5
- /** indicates a newly added property/element */
6
- NEW: 'N',
7
- /** indicates a property/element was deleted */
8
- DELETE: 'D',
9
- /** indicates a property/element was edited */
10
- EDIT: 'E',
11
- /** indicates a change occurred within an array */
12
- ARRAY: 'A',
13
- };
@@ -1,15 +0,0 @@
1
- export type Webhook = {
2
- id: number;
3
- name: string;
4
- method: 'GET' | 'POST';
5
- url: string;
6
- status: 'active' | 'inactive';
7
- data: boolean;
8
- actions: string[];
9
- collections: string[];
10
- headers: WebhookHeader[];
11
- };
12
- export type WebhookHeader = {
13
- header: string;
14
- value: string;
15
- };
@@ -1 +0,0 @@
1
- export {};