@tanglemedia/svelte-starter-directus-api 4.0.2 → 4.1.1
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/README.md +1 -0
- package/dist/adapter/api-adapter.js +9 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/provider/api-references-functions.provider.d.ts +1 -0
- package/dist/provider/api-references-functions.provider.js +1 -0
- package/dist/types/adapter.types.d.ts +1 -0
- package/dist/types/adapter.types.js +1 -1
- package/package.json +3 -3
- package/src/adapter/api-adapter.ts +36 -21
- package/src/index.ts +2 -0
- package/src/provider/api-references-functions.provider.ts +199 -0
- package/src/types/adapter.types.ts +7 -0
package/README.md
CHANGED
|
@@ -260,4 +260,5 @@ export const formsServiceClient = configureService<FormInterface>(Forms, {
|
|
|
260
260
|
adapterKey: 'directus-client'
|
|
261
261
|
});
|
|
262
262
|
```
|
|
263
|
+
|
|
263
264
|
### For mode demos and to check out all the components, please visit our [documentation website](https://tanglemedia-svelte-docs.netlify.app/docs/directus-api-package/functionality)
|
|
@@ -47,7 +47,7 @@ export class DirectusApiAdapter extends ApiAdapterAbstract {
|
|
|
47
47
|
aggregate: { [k]: f },
|
|
48
48
|
query: {
|
|
49
49
|
...(filter ? { filter } : {}),
|
|
50
|
-
...(search ? { search } : {})
|
|
50
|
+
...(search ? { search } : {})
|
|
51
51
|
}
|
|
52
52
|
}));
|
|
53
53
|
let total = 0;
|
|
@@ -92,7 +92,7 @@ export class DirectusApiAdapter extends ApiAdapterAbstract {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
async find(collection, query) {
|
|
95
|
-
const response = await this.directus.request(readItems(collection, query));
|
|
95
|
+
const response = (await this.directus.request(readItems(collection, query)));
|
|
96
96
|
const total = await this.includeTotals(collection, query);
|
|
97
97
|
if (null === total) {
|
|
98
98
|
return this.transformResponse({ data: response });
|
|
@@ -105,11 +105,13 @@ export class DirectusApiAdapter extends ApiAdapterAbstract {
|
|
|
105
105
|
return this.transformResponse({ data });
|
|
106
106
|
}
|
|
107
107
|
async aggregate(collection, query) {
|
|
108
|
-
const { aggregate: aggregate_, ...rest } =
|
|
108
|
+
const { aggregate: aggregate_, ...rest } = query || {};
|
|
109
109
|
const data = await this.directus.request(aggregate(collection, {
|
|
110
|
-
aggregate: aggregate_
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
aggregate: aggregate_
|
|
111
|
+
? aggregate_
|
|
112
|
+
: {
|
|
113
|
+
count: 'id'
|
|
114
|
+
},
|
|
113
115
|
query: rest
|
|
114
116
|
}));
|
|
115
117
|
return this.transformResponse({ data });
|
|
@@ -128,7 +130,7 @@ export class DirectusApiAdapter extends ApiAdapterAbstract {
|
|
|
128
130
|
}
|
|
129
131
|
async put(collection, key, payload) {
|
|
130
132
|
if (key) {
|
|
131
|
-
const data = await this.directus.request(updateItem(collection, key, payload));
|
|
133
|
+
const data = (await this.directus.request(updateItem(collection, key, payload)));
|
|
132
134
|
return this.transformResponse({ data }, 201);
|
|
133
135
|
}
|
|
134
136
|
else {
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { readItem, readSingleton, readItems, createItem, createItems, updateItem, updateSingleton, updateItems, deleteItem, deleteItems, readAssetRaw, readFiles, readFile, uploadFiles, importFile, updateFile, updateFiles, deleteFile, deleteFiles, readActivities, readActivity, readCollections, readCollection, createCollection, updateCollection, deleteCollection, readComments, readComment, createComment, createComments, updateComment, updateComments, deleteComment, deleteComments, readContentVersions, readContentVersion, createContentVersion, createContentVersions, updateContentVersion, updateContentVersions, deleteContentVersion, deleteContentVersions, saveToContentVersion, compareContentVersion, promoteContentVersion, readDashboards, readDashboard, createDashboard, createDashboards, updateDashboard, updateDashboards, deleteDashboard, deleteDashboards, readExtensions, updateExtension, readFields, readFieldsByCollection, readField, createField, updateField, deleteField, readFlows, readFlow, createFlow, createFlows, updateFlow, updateFlows, deleteFlow, deleteFlows, triggerFlow, readFolders, readFolder, createFolder, createFolders, updateFolder, updateFolders, deleteFolder, deleteFolders, readNotifications, readNotification, createNotification, createNotifications, updateNotification, updateNotifications, deleteNotification, deleteNotifications, readOperations, readOperation, createOperation, createOperations, updateOperation, updateOperations, deleteOperation, deleteOperations, triggerOperation, readPanels, readPanel, createPanel, createPanels, updatePanel, updatePanels, deletePanel, deletePanels, readPermissions, readPermission, createPermission, createPermissions, updatePermission, updatePermissions, deletePermission, deletePermissions, readUserPermissions, readItemPermissions, readPolicies, readPolicy, createPolicy, createPolicies, updatePolicy, updatePolicies, deletePolicy, deletePolicies, readPresets, readPreset, createPreset, createPresets, updatePreset, updatePresets, deletePreset, deletePresets, readRelations, readRelationByCollection, readRelation, createRelation, updateRelation, deleteRelation, readRevisions, readRevision, readRoles, readRole, createRole, createRoles, updateRole, updateRoles, deleteRole, deleteRoles, schemaSnapshot, readOpenApiSpec, readGraphqlSdl, serverPing, serverInfo, serverHealth, readSettings, updateSettings, readShares, readShare, createShare, createShares, updateShare, updateShares, deleteShare, deleteShares, authenticateShare, inviteShare, readShareInfo, readTranslations, readTranslation, createTranslation, createTranslations, updateTranslation, updateTranslations, deleteTranslation, deleteTranslations, readUsers, readUser, readMe, updateMe, createUser, createUsers, updateUser, updateUsers, deleteUser, deleteUsers, registerUser, registerUserVerify, inviteUser, acceptUserInvite, generateTwoFactorSecret, enableTwoFactor, disableTwoFactor, randomString, generateHash, verifyHash, utilitySort, utilsImport, utilsExport, clearCache, passwordRequest } from '@directus/sdk';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { readItem, readSingleton, readItems, createItem, createItems, updateItem, updateSingleton, updateItems, deleteItem, deleteItems, readAssetRaw, readFiles, readFile, uploadFiles, importFile, updateFile, updateFiles, deleteFile, deleteFiles, readActivities, readActivity, readCollections, readCollection, createCollection, updateCollection, deleteCollection, readComments, readComment, createComment, createComments, updateComment, updateComments, deleteComment, deleteComments, readContentVersions, readContentVersion, createContentVersion, createContentVersions, updateContentVersion, updateContentVersions, deleteContentVersion, deleteContentVersions, saveToContentVersion, compareContentVersion, promoteContentVersion, readDashboards, readDashboard, createDashboard, createDashboards, updateDashboard, updateDashboards, deleteDashboard, deleteDashboards, readExtensions, updateExtension, readFields, readFieldsByCollection, readField, createField, updateField, deleteField, readFlows, readFlow, createFlow, createFlows, updateFlow, updateFlows, deleteFlow, deleteFlows, triggerFlow, readFolders, readFolder, createFolder, createFolders, updateFolder, updateFolders, deleteFolder, deleteFolders, readNotifications, readNotification, createNotification, createNotifications, updateNotification, updateNotifications, deleteNotification, deleteNotifications, readOperations, readOperation, createOperation, createOperations, updateOperation, updateOperations, deleteOperation, deleteOperations, triggerOperation, readPanels, readPanel, createPanel, createPanels, updatePanel, updatePanels, deletePanel, deletePanels, readPermissions, readPermission, createPermission, createPermissions, updatePermission, updatePermissions, deletePermission, deletePermissions, readUserPermissions, readItemPermissions, readPolicies, readPolicy, createPolicy, createPolicies, updatePolicy, updatePolicies, deletePolicy, deletePolicies, readPresets, readPreset, createPreset, createPresets, updatePreset, updatePresets, deletePreset, deletePresets, readRelations, readRelationByCollection, readRelation, createRelation, updateRelation, deleteRelation, readRevisions, readRevision, readRoles, readRole, createRole, createRoles, updateRole, updateRoles, deleteRole, deleteRoles, schemaSnapshot, readOpenApiSpec, readGraphqlSdl, serverPing, serverInfo, serverHealth, readSettings, updateSettings, readShares, readShare, createShare, createShares, updateShare, updateShares, deleteShare, deleteShares, authenticateShare, inviteShare, readShareInfo, readTranslations, readTranslation, createTranslation, createTranslations, updateTranslation, updateTranslations, deleteTranslation, deleteTranslations, readUsers, readUser, readMe, updateMe, createUser, createUsers, updateUser, updateUsers, deleteUser, deleteUsers, registerUser, registerUserVerify, inviteUser, acceptUserInvite, generateTwoFactorSecret, enableTwoFactor, disableTwoFactor, randomString, generateHash, verifyHash, utilitySort, utilsImport, utilsExport, clearCache, passwordRequest } from '@directus/sdk';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AuthenticationMode, GraphqlConfig } from '@directus/sdk';
|
|
2
2
|
import type { BaseApiAdapterConfig } from '@tanglemedia/svelte-starter-core';
|
|
3
|
+
export { type AllCollections, type DirectusClient, type RegularCollections, type RestClient } from '@directus/sdk';
|
|
3
4
|
export type DirectusApiAuthOptions = {
|
|
4
5
|
mode: AuthenticationMode;
|
|
5
6
|
config?: Partial<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {} from '@directus/sdk';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanglemedia/svelte-starter-directus-api",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"main": "src/index.ts",
|
|
5
5
|
"types": "src/index.ts",
|
|
6
6
|
"description": "directus API wrapper for all the directus sdk functionality",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@directus/types": "
|
|
25
|
+
"@directus/types": "12.2.2",
|
|
26
26
|
"@sveltejs/adapter-auto": "^3.2.5",
|
|
27
27
|
"@sveltejs/package": "^2.3.5",
|
|
28
28
|
"@sveltejs/vite-plugin-svelte": "^3.1.2",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@tanglemedia/svelte-starter-core": "0.5.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@directus/sdk": "
|
|
42
|
+
"@directus/sdk": "18.0.1",
|
|
43
43
|
"@types/js-cookie": "^3.0.6",
|
|
44
44
|
"esm-env": "^1.0.0",
|
|
45
45
|
"js-cookie": "^3.0.5"
|
|
@@ -35,13 +35,16 @@ export type AdapterClient<Schema extends SchemaShape = SchemaShape> = DirectusCl
|
|
|
35
35
|
RestClient<Schema>;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
* TODO: Various types fixes. The current adapter doesn't correctly follow the types defined under the ApiAdapterAbstract.
|
|
38
|
+
* TODO: Various types fixes. The current adapter doesn't correctly follow the types defined under the ApiAdapterAbstract.
|
|
39
39
|
* See the fetch adapter under the core
|
|
40
40
|
*/
|
|
41
41
|
export class DirectusApiAdapter<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
>
|
|
42
|
+
Schema extends SchemaShape = SchemaShape,
|
|
43
|
+
Path extends RegularCollections<Schema> = RegularCollections<Schema>
|
|
44
|
+
>
|
|
45
|
+
extends ApiAdapterAbstract<DirectusConfig, ApiAdapterRequestConfig, Path, AdapterClient>
|
|
46
|
+
implements ApiAdapterHandle
|
|
47
|
+
{
|
|
45
48
|
constructor(
|
|
46
49
|
protected config: DirectusConfig,
|
|
47
50
|
private readonly directus: AdapterClient<Schema>
|
|
@@ -59,7 +62,8 @@ export class DirectusApiAdapter<
|
|
|
59
62
|
}
|
|
60
63
|
|
|
61
64
|
normalizeMeta(response: AnyObject) {
|
|
62
|
-
const payload = response.data,
|
|
65
|
+
const payload = response.data,
|
|
66
|
+
meta = response.meta as Record<string, unknown>;
|
|
63
67
|
|
|
64
68
|
if (!meta) {
|
|
65
69
|
return {};
|
|
@@ -91,13 +95,15 @@ export class DirectusApiAdapter<
|
|
|
91
95
|
const k = this.config.configuration.totalAggregate || 'count';
|
|
92
96
|
const f = this.config.configuration.totalField || 'id';
|
|
93
97
|
|
|
94
|
-
const data = await this.directus.request(
|
|
95
|
-
aggregate
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
const data = await this.directus.request(
|
|
99
|
+
aggregate(collection, {
|
|
100
|
+
aggregate: { [k]: f },
|
|
101
|
+
query: {
|
|
102
|
+
...(filter ? { filter } : {}),
|
|
103
|
+
...(search ? { search } : {})
|
|
104
|
+
}
|
|
105
|
+
})
|
|
106
|
+
);
|
|
101
107
|
|
|
102
108
|
let total = 0;
|
|
103
109
|
|
|
@@ -110,7 +116,7 @@ export class DirectusApiAdapter<
|
|
|
110
116
|
}
|
|
111
117
|
|
|
112
118
|
async transformResponse<T, M extends object = AnyObject>(
|
|
113
|
-
res: { data: T
|
|
119
|
+
res: { data: T; meta?: AnyObject },
|
|
114
120
|
status: number = 200
|
|
115
121
|
): Promise<ApiResponse<T, Response, M>> {
|
|
116
122
|
return {
|
|
@@ -157,8 +163,11 @@ export class DirectusApiAdapter<
|
|
|
157
163
|
}
|
|
158
164
|
}
|
|
159
165
|
|
|
160
|
-
public async find<T, Q = T, R = T>(
|
|
161
|
-
|
|
166
|
+
public async find<T, Q = T, R = T>(
|
|
167
|
+
collection: Path,
|
|
168
|
+
query: ApiFindQuery<Q>
|
|
169
|
+
): Promise<ApiResponse<R[]>> {
|
|
170
|
+
const response = (await this.directus.request<T>(readItems(collection, query))) as R[];
|
|
162
171
|
const total = await this.includeTotals(collection, query);
|
|
163
172
|
if (null === total) {
|
|
164
173
|
return this.transformResponse({ data: response });
|
|
@@ -181,13 +190,15 @@ export class DirectusApiAdapter<
|
|
|
181
190
|
collection: Path,
|
|
182
191
|
query: ApiAggregateQuery<Q>
|
|
183
192
|
): Promise<ApiResponse<R>> {
|
|
184
|
-
const { aggregate: aggregate_, ...rest } =
|
|
193
|
+
const { aggregate: aggregate_, ...rest } = query || {};
|
|
185
194
|
|
|
186
195
|
const data = await this.directus.request<T>(
|
|
187
196
|
aggregate(collection, {
|
|
188
|
-
aggregate: aggregate_
|
|
189
|
-
|
|
190
|
-
|
|
197
|
+
aggregate: aggregate_
|
|
198
|
+
? aggregate_
|
|
199
|
+
: {
|
|
200
|
+
count: 'id'
|
|
201
|
+
},
|
|
191
202
|
query: rest
|
|
192
203
|
})
|
|
193
204
|
);
|
|
@@ -218,9 +229,13 @@ export class DirectusApiAdapter<
|
|
|
218
229
|
return this.transformResponse({ data }, 202);
|
|
219
230
|
}
|
|
220
231
|
|
|
221
|
-
public async put<T extends object, R = T>(
|
|
232
|
+
public async put<T extends object, R = T>(
|
|
233
|
+
collection: Path,
|
|
234
|
+
key?: ApiId,
|
|
235
|
+
payload?: AnyObject
|
|
236
|
+
): Promise<ApiResponse<R>> {
|
|
222
237
|
if (key) {
|
|
223
|
-
const data = await this.directus.request<T>(updateItem(collection, key, payload)) as R;
|
|
238
|
+
const data = (await this.directus.request<T>(updateItem(collection, key, payload))) as R;
|
|
224
239
|
return this.transformResponse({ data }, 201);
|
|
225
240
|
} else {
|
|
226
241
|
console.error(`Error updating all ${collection}: no key specified`);
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
export {
|
|
2
|
+
readItem,
|
|
3
|
+
readSingleton,
|
|
4
|
+
readItems,
|
|
5
|
+
createItem,
|
|
6
|
+
createItems,
|
|
7
|
+
updateItem,
|
|
8
|
+
updateSingleton,
|
|
9
|
+
updateItems,
|
|
10
|
+
deleteItem,
|
|
11
|
+
deleteItems,
|
|
12
|
+
readAssetRaw,
|
|
13
|
+
readFiles,
|
|
14
|
+
readFile,
|
|
15
|
+
uploadFiles,
|
|
16
|
+
importFile,
|
|
17
|
+
updateFile,
|
|
18
|
+
updateFiles,
|
|
19
|
+
deleteFile,
|
|
20
|
+
deleteFiles,
|
|
21
|
+
readActivities,
|
|
22
|
+
readActivity,
|
|
23
|
+
readCollections,
|
|
24
|
+
readCollection,
|
|
25
|
+
createCollection,
|
|
26
|
+
updateCollection,
|
|
27
|
+
deleteCollection,
|
|
28
|
+
readComments,
|
|
29
|
+
readComment,
|
|
30
|
+
createComment,
|
|
31
|
+
createComments,
|
|
32
|
+
updateComment,
|
|
33
|
+
updateComments,
|
|
34
|
+
deleteComment,
|
|
35
|
+
deleteComments,
|
|
36
|
+
readContentVersions,
|
|
37
|
+
readContentVersion,
|
|
38
|
+
createContentVersion,
|
|
39
|
+
createContentVersions,
|
|
40
|
+
updateContentVersion,
|
|
41
|
+
updateContentVersions,
|
|
42
|
+
deleteContentVersion,
|
|
43
|
+
deleteContentVersions,
|
|
44
|
+
saveToContentVersion,
|
|
45
|
+
compareContentVersion,
|
|
46
|
+
promoteContentVersion,
|
|
47
|
+
readDashboards,
|
|
48
|
+
readDashboard,
|
|
49
|
+
createDashboard,
|
|
50
|
+
createDashboards,
|
|
51
|
+
updateDashboard,
|
|
52
|
+
updateDashboards,
|
|
53
|
+
deleteDashboard,
|
|
54
|
+
deleteDashboards,
|
|
55
|
+
readExtensions,
|
|
56
|
+
updateExtension,
|
|
57
|
+
readFields,
|
|
58
|
+
readFieldsByCollection,
|
|
59
|
+
readField,
|
|
60
|
+
createField,
|
|
61
|
+
updateField,
|
|
62
|
+
deleteField,
|
|
63
|
+
readFlows,
|
|
64
|
+
readFlow,
|
|
65
|
+
createFlow,
|
|
66
|
+
createFlows,
|
|
67
|
+
updateFlow,
|
|
68
|
+
updateFlows,
|
|
69
|
+
deleteFlow,
|
|
70
|
+
deleteFlows,
|
|
71
|
+
triggerFlow,
|
|
72
|
+
readFolders,
|
|
73
|
+
readFolder,
|
|
74
|
+
createFolder,
|
|
75
|
+
createFolders,
|
|
76
|
+
updateFolder,
|
|
77
|
+
updateFolders,
|
|
78
|
+
deleteFolder,
|
|
79
|
+
deleteFolders,
|
|
80
|
+
readNotifications,
|
|
81
|
+
readNotification,
|
|
82
|
+
createNotification,
|
|
83
|
+
createNotifications,
|
|
84
|
+
updateNotification,
|
|
85
|
+
updateNotifications,
|
|
86
|
+
deleteNotification,
|
|
87
|
+
deleteNotifications,
|
|
88
|
+
readOperations,
|
|
89
|
+
readOperation,
|
|
90
|
+
createOperation,
|
|
91
|
+
createOperations,
|
|
92
|
+
updateOperation,
|
|
93
|
+
updateOperations,
|
|
94
|
+
deleteOperation,
|
|
95
|
+
deleteOperations,
|
|
96
|
+
triggerOperation,
|
|
97
|
+
readPanels,
|
|
98
|
+
readPanel,
|
|
99
|
+
createPanel,
|
|
100
|
+
createPanels,
|
|
101
|
+
updatePanel,
|
|
102
|
+
updatePanels,
|
|
103
|
+
deletePanel,
|
|
104
|
+
deletePanels,
|
|
105
|
+
readPermissions,
|
|
106
|
+
readPermission,
|
|
107
|
+
createPermission,
|
|
108
|
+
createPermissions,
|
|
109
|
+
updatePermission,
|
|
110
|
+
updatePermissions,
|
|
111
|
+
deletePermission,
|
|
112
|
+
deletePermissions,
|
|
113
|
+
readUserPermissions,
|
|
114
|
+
readItemPermissions,
|
|
115
|
+
readPolicies,
|
|
116
|
+
readPolicy,
|
|
117
|
+
createPolicy,
|
|
118
|
+
createPolicies,
|
|
119
|
+
updatePolicy,
|
|
120
|
+
updatePolicies,
|
|
121
|
+
deletePolicy,
|
|
122
|
+
deletePolicies,
|
|
123
|
+
readPresets,
|
|
124
|
+
readPreset,
|
|
125
|
+
createPreset,
|
|
126
|
+
createPresets,
|
|
127
|
+
updatePreset,
|
|
128
|
+
updatePresets,
|
|
129
|
+
deletePreset,
|
|
130
|
+
deletePresets,
|
|
131
|
+
readRelations,
|
|
132
|
+
readRelationByCollection,
|
|
133
|
+
readRelation,
|
|
134
|
+
createRelation,
|
|
135
|
+
updateRelation,
|
|
136
|
+
deleteRelation,
|
|
137
|
+
readRevisions,
|
|
138
|
+
readRevision,
|
|
139
|
+
readRoles,
|
|
140
|
+
readRole,
|
|
141
|
+
createRole,
|
|
142
|
+
createRoles,
|
|
143
|
+
updateRole,
|
|
144
|
+
updateRoles,
|
|
145
|
+
deleteRole,
|
|
146
|
+
deleteRoles,
|
|
147
|
+
schemaSnapshot,
|
|
148
|
+
readOpenApiSpec,
|
|
149
|
+
readGraphqlSdl,
|
|
150
|
+
serverPing,
|
|
151
|
+
serverInfo,
|
|
152
|
+
serverHealth,
|
|
153
|
+
readSettings,
|
|
154
|
+
updateSettings,
|
|
155
|
+
readShares,
|
|
156
|
+
readShare,
|
|
157
|
+
createShare,
|
|
158
|
+
createShares,
|
|
159
|
+
updateShare,
|
|
160
|
+
updateShares,
|
|
161
|
+
deleteShare,
|
|
162
|
+
deleteShares,
|
|
163
|
+
authenticateShare,
|
|
164
|
+
inviteShare,
|
|
165
|
+
readShareInfo,
|
|
166
|
+
readTranslations,
|
|
167
|
+
readTranslation,
|
|
168
|
+
createTranslation,
|
|
169
|
+
createTranslations,
|
|
170
|
+
updateTranslation,
|
|
171
|
+
updateTranslations,
|
|
172
|
+
deleteTranslation,
|
|
173
|
+
deleteTranslations,
|
|
174
|
+
readUsers,
|
|
175
|
+
readUser,
|
|
176
|
+
readMe,
|
|
177
|
+
updateMe,
|
|
178
|
+
createUser,
|
|
179
|
+
createUsers,
|
|
180
|
+
updateUser,
|
|
181
|
+
updateUsers,
|
|
182
|
+
deleteUser,
|
|
183
|
+
deleteUsers,
|
|
184
|
+
registerUser,
|
|
185
|
+
registerUserVerify,
|
|
186
|
+
inviteUser,
|
|
187
|
+
acceptUserInvite,
|
|
188
|
+
generateTwoFactorSecret,
|
|
189
|
+
enableTwoFactor,
|
|
190
|
+
disableTwoFactor,
|
|
191
|
+
randomString,
|
|
192
|
+
generateHash,
|
|
193
|
+
verifyHash,
|
|
194
|
+
utilitySort,
|
|
195
|
+
utilsImport,
|
|
196
|
+
utilsExport,
|
|
197
|
+
clearCache,
|
|
198
|
+
passwordRequest
|
|
199
|
+
} from '@directus/sdk';
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { AuthenticationMode, GraphqlConfig } from '@directus/sdk';
|
|
2
2
|
import type { BaseApiAdapterConfig } from '@tanglemedia/svelte-starter-core';
|
|
3
3
|
|
|
4
|
+
export {
|
|
5
|
+
type AllCollections,
|
|
6
|
+
type DirectusClient,
|
|
7
|
+
type RegularCollections,
|
|
8
|
+
type RestClient
|
|
9
|
+
} from '@directus/sdk';
|
|
10
|
+
|
|
4
11
|
export type DirectusApiAuthOptions = {
|
|
5
12
|
mode: AuthenticationMode;
|
|
6
13
|
config?: Partial<{
|