Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@directus/sdk

Package Overview
Dependencies
Maintainers
2
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@directus/sdk - npm Package Compare versions

Comparing version 13.0.2 to 14.0.0

dist/chunk-ARANAX6L.js

6

dist/auth/index.d.ts

@@ -1,4 +0,4 @@

import { D as DirectusClient } from '../client-572f0a81.js';
import { A as AuthenticationMode, c as AuthenticationConfig, d as AuthenticationClient, S as StaticTokenClient, b as AuthenticationStorage } from '../login-824b07b5.js';
export { a as AuthenticationData } from '../login-824b07b5.js';
import { D as DirectusClient } from '../client-pzVdw9Ub.js';
import { A as AuthenticationMode, c as AuthenticationConfig, d as AuthenticationClient, S as StaticTokenClient, b as AuthenticationStorage } from '../login-M53C1LeV.js';
export { a as AuthenticationData } from '../login-M53C1LeV.js';

@@ -5,0 +5,0 @@ /**

@@ -1,2 +0,2 @@

import{a,b,c}from"../chunk-GJVD322O.js";import"../chunk-35FIPLD2.js";export{b as authentication,a as memoryStorage,c as staticToken};
import{a,b,c}from"../chunk-LDFD35JM.js";import"../chunk-ARANAX6L.js";export{b as authentication,a as memoryStorage,c as staticToken};
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import { D as DirectusClient } from '../client-572f0a81.js';
import { D as DirectusClient } from '../client-pzVdw9Ub.js';

@@ -20,2 +20,2 @@ interface GraphqlClient<_Schema extends object> {

export { GqlResult, GraphqlClient, GraphqlConfig, graphql };
export { type GqlResult, type GraphqlClient, type GraphqlConfig, graphql };

@@ -1,2 +0,2 @@

import{e as a}from"../chunk-GJVD322O.js";import"../chunk-35FIPLD2.js";export{a as graphql};
import{e as a}from"../chunk-LDFD35JM.js";import"../chunk-ARANAX6L.js";export{a as graphql};
//# sourceMappingURL=index.js.map
export { authentication, memoryStorage, staticToken } from './auth/index.js';
export { d as AuthenticationClient, c as AuthenticationConfig, a as AuthenticationData, A as AuthenticationMode, b as AuthenticationStorage, H as HttpMethod, L as LoginOptions, g as RequestOptions, h as RequestTransformer, i as ResponseTransformer, e as RestClient, R as RestCommand, f as RestConfig, S as StaticTokenClient, l as login } from './login-824b07b5.js';
import { C as ClientOptions, D as DirectusClient } from './client-572f0a81.js';
export { a as ClientGlobals, F as FetchInterface, U as UrlInterface, W as WebSocketConstructor, b as WebSocketInterface } from './client-572f0a81.js';
export { d as AuthenticationClient, c as AuthenticationConfig, a as AuthenticationData, A as AuthenticationMode, b as AuthenticationStorage, H as HttpMethod, L as LoginOptions, g as RequestOptions, h as RequestTransformer, i as ResponseTransformer, e as RestClient, R as RestCommand, f as RestConfig, S as StaticTokenClient, l as login } from './login-M53C1LeV.js';
import { C as ClientOptions, D as DirectusClient } from './client-pzVdw9Ub.js';
export { a as ClientGlobals, F as FetchInterface, U as UrlInterface, W as WebSocketConstructor, b as WebSocketInterface } from './client-pzVdw9Ub.js';
export { GqlResult, GraphqlClient, GraphqlConfig, graphql } from './graphql/index.js';
export { EmailAuth, RefreshAuth, TokenAuth, auth, generateUid, messageCallback, pong, realtime, sleep } from './realtime/index.js';
export { ap as AllCollections, a2 as ApplyManyToAnyFields, a3 as ApplyNestedQueryFields, a1 as ApplyQueryFields, C as CollectionMetaTranslationType, ah as CollectionType, ao as CompleteSchema, j as CoreSchema, D as DirectusActivity, i as DirectusCollection, k as DirectusDashboard, l as DirectusField, o as DirectusFile, p as DirectusFlow, q as DirectusFolder, r as DirectusNotification, s as DirectusOperation, t as DirectusPanel, u as DirectusPermission, v as DirectusPreset, w as DirectusRelation, x as DirectusRevision, y as DirectusRole, z as DirectusSettings, A as DirectusShare, B as DirectusUser, E as DirectusVersion, G as DirectusWebhook, a9 as ExtractItem, aa as ExtractRelation, m as FieldMetaConditionOptionType, F as FieldMetaConditionType, n as FieldMetaTranslationType, a6 as FieldOutputMap, N as FieldsWildcard, Y as FilterOperators, aq as GetCollection, ar as GetCollectionName, K as HasManyToAnyRelation, L as HasNestedFields, aC as Identity, ay as IfAny, ax as IfNever, az as IsAny, aA as IsNullable, ag as ItemType, T as LiteralFields, $ as LogicalFilterOperators, M as ManyToAnyFields, a5 as MapFlatFields, au as Merge, an as MergeCoreCollection, ac as MergeFields, ae as MergeObjects, av as MergeOptional, ab as MergeRelationalFields, as as Mutable, aB as NestedPartial, V as NestedQueryFilter, X as NestedRelationalFilter, aw as NeverToUnknown, O as PickFlatFields, P as PickRelationalFields, ak as PrimitiveFields, a7 as Query, af as QueryAlias, Q as QueryDeep, H as QueryFields, J as QueryFieldsRelational, U as QueryFilter, a8 as QueryItem, ad as QuerySort, aj as RegularCollections, a4 as RelationNullable, al as RelationalFields, Z as RelationalFilterOperators, R as RemoveEventHandler, am as RemoveRelationships, ai as SingletonCollections, S as SubscribeOptions, f as SubscriptionEvents, e as SubscriptionOptionsEvents, g as SubscriptionOutput, h as SubscriptionPayload, at as UnpackList, W as WebSocketAuthModes, d as WebSocketClient, a as WebSocketConfig, c as WebSocketEventHandler, b as WebSocketEvents, a0 as WrapLogicalFilters, I as WrapQueryFields, _ as WrapRelationalFilters } from './output-ef15f34f.js';
export { dw as AggregateRecord, dy as AggregationOptions, dz as AggregationOutput, dv as AggregationTypes, dA as AssetsQuery, C as CreateActivityOutput, d as CreateCollectionOutput, a2 as CreateContentVersionOutput, f as CreateDashboardOutput, i as CreateFieldOutput, k as CreateFileOutput, n as CreateFlowOutput, s as CreateFolderOutput, w as CreateItemOutput, z as CreateNotificationOutput, D as CreateOperationOutput, G as CreatePanelOutput, J as CreatePermissionOutput, M as CreatePresetOutput, P as CreateRelationOutput, S as CreateRoleOutput, V as CreateShareOutput, Y as CreateTranslationOutput, $ as CreateUserOutput, a5 as CreateWebhookOutput, dt as DirectusTranslation, dC as ExtensionItem, dB as ExtensionTypes, d2 as FileFormat, dx as GroupByFields, du as GroupingFunctions, c1 as OpenApiSpecOutput, aI as ReadActivityOutput, aP as ReadCollectionOutput, bN as ReadContentVersionOutput, aS as ReadDashboardOutput, aW as ReadFieldOutput, a_ as ReadFileOutput, b1 as ReadFlowOutput, b4 as ReadFolderOutput, b7 as ReadItemOutput, ba as ReadNotificationOutput, bd as ReadOperationOutput, bg as ReadPanelOutput, bj as ReadPermissionOutput, bm as ReadPresetOutput, R as ReadProviderOutput, bp as ReadRelationOutput, bt as ReadRevisionOutput, bw as ReadRoleOutput, bz as ReadSettingOutput, bB as ReadShareOutput, bE as ReadSingletonOutput, bG as ReadTranslationOutput, bJ as ReadUserOutput, bQ as ReadWebhookOutput, bU as SchemaDiffOutput, bW as SchemaSnapshotOutput, bZ as ServerHealthOutput, b$ as ServerInfoOutput, c4 as UpdateActivityOutput, c6 as UpdateCollectionOutput, cX as UpdateContentVersionOutput, c8 as UpdateDashboardOutput, cb as UpdateFieldOutput, cd as UpdateFileOutput, cg as UpdateFlowOutput, cj as UpdateFolderOutput, cm as UpdateItemOutput, cp as UpdateNotificationOutput, cs as UpdateOperationOutput, cv as UpdatePanelOutput, cy as UpdatePermissionOutput, cB as UpdatePresetOutput, cE as UpdateRelationOutput, cG as UpdateRoleOutput, cJ as UpdateSettingOutput, cL as UpdateShareOutput, cO as UpdateSingletonOutput, cQ as UpdateTranslationOutput, cT as UpdateUserOutput, c_ as UpdateWebhookOutput, de as acceptUserInvite, aL as aggregate, d9 as authenticateShare, d1 as clearCache, dj as compareContentVersion, e as createCollection, c as createComment, a4 as createContentVersion, a3 as createContentVersions, h as createDashboard, g as createDashboards, j as createField, q as createFlow, o as createFlows, v as createFolder, t as createFolders, y as createItem, x as createItems, B as createNotification, A as createNotifications, F as createOperation, E as createOperations, I as createPanel, H as createPanels, L as createPermission, K as createPermissions, O as createPreset, N as createPresets, Q as createRelation, U as createRole, T as createRoles, X as createShare, W as createShares, _ as createTranslation, Z as createTranslations, a1 as createUser, a0 as createUsers, a7 as createWebhook, a6 as createWebhooks, a9 as deleteCollection, a8 as deleteComment, aF as deleteContentVersion, aE as deleteContentVersions, ab as deleteDashboard, aa as deleteDashboards, ac as deleteField, ae as deleteFile, ad as deleteFiles, ag as deleteFlow, af as deleteFlows, ai as deleteFolder, ah as deleteFolders, ak as deleteItem, aj as deleteItems, am as deleteNotification, al as deleteNotifications, ao as deleteOperation, an as deleteOperations, aq as deletePanel, ap as deletePanels, as as deletePermission, ar as deletePermissions, au as deletePreset, at as deletePresets, av as deleteRelation, ax as deleteRole, aw as deleteRoles, az as deleteShare, ay as deleteShares, aB as deleteTranslation, aA as deleteTranslations, aD as deleteUser, aC as deleteUsers, aH as deleteWebhook, aG as deleteWebhooks, dh as disableTwoFactor, dg as enableTwoFactor, d5 as generateHash, df as generateTwoFactorSecret, m as importFile, da as inviteShare, dd as inviteUser, l as logout, p as passwordRequest, a as passwordReset, dk as promoteContentVersion, dq as queryToParams, aJ as readActivities, aK as readActivity, aO as readAssetArrayBuffer, aN as readAssetBlob, aM as readAssetRaw, aR as readCollection, aQ as readCollections, bP as readContentVersion, bO as readContentVersions, aU as readDashboard, aT as readDashboards, aV as readExtensions, aZ as readField, aX as readFields, aY as readFieldsByCollection, b0 as readFile, a$ as readFiles, b3 as readFlow, b2 as readFlows, b6 as readFolder, b5 as readFolders, bY as readGraphqlSdl, b9 as readItem, b8 as readItems, bM as readMe, bc as readNotification, bb as readNotifications, c2 as readOpenApiSpec, bf as readOperation, be as readOperations, bi as readPanel, bh as readPanels, bl as readPermission, bk as readPermissions, bo as readPreset, bn as readPresets, r as readProviders, bs as readRelation, br as readRelationByCollection, bq as readRelations, bv as readRevision, bu as readRevisions, by as readRole, bx as readRoles, bA as readSettings, bD as readShare, db as readShareInfo, bC as readShares, bF as readSingleton, bI as readTranslation, bH as readTranslations, bL as readUser, bK as readUsers, bS as readWebhook, bR as readWebhooks, b as refresh, dl as rest, di as saveToContentVersion, bT as schemaApply, bV as schemaDiff, bX as schemaSnapshot, b_ as serverHealth, c0 as serverInfo, c3 as serverPing, ds as throwIfCoreCollection, dr as throwIfEmpty, d4 as triggerFlow, d8 as triggerOperation, c7 as updateCollection, c5 as updateComment, cZ as updateContentVersion, cY as updateContentVersions, ca as updateDashboard, c9 as updateDashboards, cc as updateField, cf as updateFile, ce as updateFiles, ci as updateFlow, ch as updateFlows, cl as updateFolder, ck as updateFolders, co as updateItem, cn as updateItems, cW as updateMe, cr as updateNotification, cq as updateNotifications, cu as updateOperation, ct as updateOperations, cx as updatePanel, cw as updatePanels, cA as updatePermission, cz as updatePermissions, cD as updatePreset, cC as updatePresets, cF as updateRelation, cI as updateRole, cH as updateRoles, cK as updateSettings, cN as updateShare, cM as updateShares, cP as updateSingleton, cS as updateTranslation, cR as updateTranslations, cV as updateUser, cU as updateUsers, d0 as updateWebhook, c$ as updateWebhooks, u as uploadFiles, dc as utilitySort, d3 as utilsExport, d7 as utilsImport, d6 as verifyHash, dm as withOptions, dn as withSearch, dp as withToken } from './index-7ec1f729.js';
export { as as AllCollections, a5 as ApplyManyToAnyFields, a6 as ApplyNestedQueryFields, a4 as ApplyQueryFields, C as CollectionMetaTranslationType, ak as CollectionType, ar as CompleteSchema, j as CoreSchema, D as DirectusActivity, i as DirectusCollection, k as DirectusDashboard, l as DirectusExtension, n as DirectusField, q as DirectusFile, r as DirectusFlow, s as DirectusFolder, t as DirectusNotification, u as DirectusOperation, v as DirectusPanel, w as DirectusPermission, x as DirectusPreset, y as DirectusRelation, z as DirectusRevision, A as DirectusRole, B as DirectusSettings, G as DirectusShare, H as DirectusUser, I as DirectusVersion, J as DirectusWebhook, E as ExtensionSchema, m as ExtensionTypes, ac as ExtractItem, ad as ExtractRelation, o as FieldMetaConditionOptionType, F as FieldMetaConditionType, p as FieldMetaTranslationType, a9 as FieldOutputMap, T as FieldsWildcard, $ as FilterOperators, at as GetCollection, au as GetCollectionName, O as HasManyToAnyRelation, P as HasNestedFields, aF as Identity, aB as IfAny, aA as IfNever, aC as IsAny, aD as IsNullable, aj as ItemType, X as LiteralFields, a2 as LogicalFilterOperators, N as ManyToAnyFields, a8 as MapFlatFields, ax as Merge, aq as MergeCoreCollection, af as MergeFields, ah as MergeObjects, ay as MergeOptional, ae as MergeRelationalFields, av as Mutable, aE as NestedPartial, Z as NestedQueryFilter, _ as NestedRelationalFilter, az as NeverToUnknown, V as PickFlatFields, U as PickRelationalFields, an as PrimitiveFields, aa as Query, ai as QueryAlias, Q as QueryDeep, K as QueryFields, M as QueryFieldsRelational, Y as QueryFilter, ab as QueryItem, ag as QuerySort, am as RegularCollections, a7 as RelationNullable, ao as RelationalFields, a0 as RelationalFilterOperators, R as RemoveEventHandler, ap as RemoveRelationships, al as SingletonCollections, S as SubscribeOptions, f as SubscriptionEvents, e as SubscriptionOptionsEvents, g as SubscriptionOutput, h as SubscriptionPayload, aw as UnpackList, W as WebSocketAuthModes, d as WebSocketClient, a as WebSocketConfig, c as WebSocketEventHandler, b as WebSocketEvents, a3 as WrapLogicalFilters, L as WrapQueryFields, a1 as WrapRelationalFilters } from './types-ZBNrmR-A.js';
export { dx as AggregateRecord, dz as AggregationOptions, dA as AggregationOutput, dw as AggregationTypes, dB as AssetsQuery, C as CreateActivityOutput, d as CreateCollectionOutput, a2 as CreateContentVersionOutput, f as CreateDashboardOutput, i as CreateFieldOutput, k as CreateFileOutput, n as CreateFlowOutput, s as CreateFolderOutput, w as CreateItemOutput, z as CreateNotificationOutput, D as CreateOperationOutput, G as CreatePanelOutput, J as CreatePermissionOutput, M as CreatePresetOutput, P as CreateRelationOutput, S as CreateRoleOutput, V as CreateShareOutput, Y as CreateTranslationOutput, $ as CreateUserOutput, a5 as CreateWebhookOutput, du as DirectusTranslation, d3 as FileFormat, dy as GroupByFields, dv as GroupingFunctions, c1 as OpenApiSpecOutput, aI as ReadActivityOutput, aP as ReadCollectionOutput, bN as ReadContentVersionOutput, aS as ReadDashboardOutput, aW as ReadFieldOutput, a_ as ReadFileOutput, b1 as ReadFlowOutput, b4 as ReadFolderOutput, b7 as ReadItemOutput, ba as ReadNotificationOutput, bd as ReadOperationOutput, bg as ReadPanelOutput, bj as ReadPermissionOutput, bm as ReadPresetOutput, R as ReadProviderOutput, bp as ReadRelationOutput, bt as ReadRevisionOutput, bw as ReadRoleOutput, bz as ReadSettingOutput, bB as ReadShareOutput, bE as ReadSingletonOutput, bG as ReadTranslationOutput, bJ as ReadUserOutput, bQ as ReadWebhookOutput, bU as SchemaDiffOutput, bW as SchemaSnapshotOutput, bZ as ServerHealthOutput, b$ as ServerInfoOutput, c4 as UpdateActivityOutput, c6 as UpdateCollectionOutput, cY as UpdateContentVersionOutput, c8 as UpdateDashboardOutput, cc as UpdateFieldOutput, ce as UpdateFileOutput, ch as UpdateFlowOutput, ck as UpdateFolderOutput, cn as UpdateItemOutput, cq as UpdateNotificationOutput, ct as UpdateOperationOutput, cw as UpdatePanelOutput, cz as UpdatePermissionOutput, cC as UpdatePresetOutput, cF as UpdateRelationOutput, cH as UpdateRoleOutput, cK as UpdateSettingOutput, cM as UpdateShareOutput, cP as UpdateSingletonOutput, cR as UpdateTranslationOutput, cU as UpdateUserOutput, c$ as UpdateWebhookOutput, df as acceptUserInvite, aL as aggregate, da as authenticateShare, d2 as clearCache, dk as compareContentVersion, e as createCollection, c as createComment, a4 as createContentVersion, a3 as createContentVersions, h as createDashboard, g as createDashboards, j as createField, q as createFlow, o as createFlows, v as createFolder, t as createFolders, y as createItem, x as createItems, B as createNotification, A as createNotifications, F as createOperation, E as createOperations, I as createPanel, H as createPanels, L as createPermission, K as createPermissions, O as createPreset, N as createPresets, Q as createRelation, U as createRole, T as createRoles, X as createShare, W as createShares, _ as createTranslation, Z as createTranslations, a1 as createUser, a0 as createUsers, a7 as createWebhook, a6 as createWebhooks, a9 as deleteCollection, a8 as deleteComment, aF as deleteContentVersion, aE as deleteContentVersions, ab as deleteDashboard, aa as deleteDashboards, ac as deleteField, ae as deleteFile, ad as deleteFiles, ag as deleteFlow, af as deleteFlows, ai as deleteFolder, ah as deleteFolders, ak as deleteItem, aj as deleteItems, am as deleteNotification, al as deleteNotifications, ao as deleteOperation, an as deleteOperations, aq as deletePanel, ap as deletePanels, as as deletePermission, ar as deletePermissions, au as deletePreset, at as deletePresets, av as deleteRelation, ax as deleteRole, aw as deleteRoles, az as deleteShare, ay as deleteShares, aB as deleteTranslation, aA as deleteTranslations, aD as deleteUser, aC as deleteUsers, aH as deleteWebhook, aG as deleteWebhooks, di as disableTwoFactor, dh as enableTwoFactor, d6 as generateHash, dg as generateTwoFactorSecret, m as importFile, db as inviteShare, de as inviteUser, l as logout, p as passwordRequest, a as passwordReset, dl as promoteContentVersion, dr as queryToParams, aJ as readActivities, aK as readActivity, aO as readAssetArrayBuffer, aN as readAssetBlob, aM as readAssetRaw, aR as readCollection, aQ as readCollections, bP as readContentVersion, bO as readContentVersions, aU as readDashboard, aT as readDashboards, aV as readExtensions, aZ as readField, aX as readFields, aY as readFieldsByCollection, b0 as readFile, a$ as readFiles, b3 as readFlow, b2 as readFlows, b6 as readFolder, b5 as readFolders, bY as readGraphqlSdl, b9 as readItem, b8 as readItems, bM as readMe, bc as readNotification, bb as readNotifications, c2 as readOpenApiSpec, bf as readOperation, be as readOperations, bi as readPanel, bh as readPanels, bl as readPermission, bk as readPermissions, bo as readPreset, bn as readPresets, r as readProviders, bs as readRelation, br as readRelationByCollection, bq as readRelations, bv as readRevision, bu as readRevisions, by as readRole, bx as readRoles, bA as readSettings, bD as readShare, dc as readShareInfo, bC as readShares, bF as readSingleton, bI as readTranslation, bH as readTranslations, bL as readUser, bK as readUsers, bS as readWebhook, bR as readWebhooks, b as refresh, dm as rest, dj as saveToContentVersion, bT as schemaApply, bV as schemaDiff, bX as schemaSnapshot, b_ as serverHealth, c0 as serverInfo, c3 as serverPing, dt as throwIfCoreCollection, ds as throwIfEmpty, d5 as triggerFlow, d9 as triggerOperation, c7 as updateCollection, c5 as updateComment, c_ as updateContentVersion, cZ as updateContentVersions, ca as updateDashboard, c9 as updateDashboards, cb as updateExtension, cd as updateField, cg as updateFile, cf as updateFiles, cj as updateFlow, ci as updateFlows, cm as updateFolder, cl as updateFolders, cp as updateItem, co as updateItems, cX as updateMe, cs as updateNotification, cr as updateNotifications, cv as updateOperation, cu as updateOperations, cy as updatePanel, cx as updatePanels, cB as updatePermission, cA as updatePermissions, cE as updatePreset, cD as updatePresets, cG as updateRelation, cJ as updateRole, cI as updateRoles, cL as updateSettings, cO as updateShare, cN as updateShares, cQ as updateSingleton, cT as updateTranslation, cS as updateTranslations, cW as updateUser, cV as updateUsers, d1 as updateWebhook, d0 as updateWebhooks, u as uploadFiles, dd as utilitySort, d4 as utilsExport, d8 as utilsImport, d7 as verifyHash, dn as withOptions, dp as withSearch, dq as withToken } from './index-Szt1hiPf.js';

@@ -10,0 +10,0 @@ /**

@@ -1,2 +0,2 @@

import{$ as fa,$a as fb,$b as fc,A as G,Aa as Ga,Ab as Gb,Ac as Gc,B as H,Ba as Ha,Bb as Hb,Bc as Hc,C as I,Ca as Ia,Cb as Ib,Cc as Ic,D as J,Da as Ja,Db as Jb,Dc as Jc,E as K,Ea as Ka,Eb as Kb,Ec as Kc,F as L,Fa as La,Fb as Lb,Fc as Lc,G as M,Ga as Ma,Gb as Mb,Gc as Mc,H as N,Ha as Na,Hb as Nb,Hc as Nc,I as O,Ia as Oa,Ib as Ob,Ic as Oc,J as P,Ja as Pa,Jb as Pb,Jc as Pc,K as Q,Ka as Qa,Kb as Qb,Kc as Qc,L as R,La as Ra,Lb as Rb,Lc as Rc,M as S,Ma as Sa,Mb as Sb,Mc as Sc,N as T,Na as Ta,Nb as Tb,Nc as Tc,O as U,Oa as Ua,Ob as Ub,Oc as Uc,P as V,Pa as Va,Pb as Vb,Pc as Vc,Q as W,Qa as Wa,Qb as Wb,Qc as Wc,R as X,Ra as Xa,Rb as Xb,Rc as Xc,S as Y,Sa as Ya,Sb as Yb,Sc as Yc,T as Z,Ta as Za,Tb as Zb,Tc as Zc,U as _,Ua as _a,Ub as _b,V as $,Va as $a,Vb as $b,W as aa,Wa as ab,Wb as ac,X as ba,Xa as bb,Xb as bc,Y as ca,Ya as cb,Yb as cc,Z as da,Za as db,Zb as dc,_ as ea,_a as eb,_b as ec,a,aa as ga,ab as gb,ac as gc,b,ba as ha,bb as hb,bc as hc,c,ca as ia,cb as ib,cc as ic,d,da as ja,db as jb,dc as jc,e,ea as ka,eb as kb,ec as kc,f as l,fa as la,fb as lb,fc as lc,g as m,ga as ma,gb as mb,gc as mc,h as n,ha as na,hb as nb,hc as nc,i as o,ia as oa,ib as ob,ic as oc,j as p,ja as pa,jb as pb,jc as pc,k as q,ka as qa,kb as qb,kc as qc,l as r,la as ra,lb as rb,lc as rc,m as s,ma as sa,mb as sb,mc as sc,n as t,na as ta,nb as tb,nc as tc,o as u,oa as ua,ob as ub,oc as uc,p as v,pa as va,pb as vb,pc as vc,q as w,qa as wa,qb as wb,qc as wc,r as x,ra as xa,rb as xb,rc as xc,s as y,sa as ya,sb as yb,sc as yc,t as z,ta as za,tb as zb,tc as zc,u as A,ua as Aa,ub as Ab,uc as Ac,v as B,va as Ba,vb as Bb,vc as Bc,w as C,wa as Ca,wb as Cb,wc as Cc,x as D,xa as Da,xb as Db,xc as Dc,y as E,ya as Ea,yb as Eb,yc as Ec,z as F,za as Fa,zb as Fb,zc as Fc}from"./chunk-GJVD322O.js";import{a as f,b as g,c as h,d as i,e as j,f as k}from"./chunk-35FIPLD2.js";export{Pc as acceptUserInvite,Oa as aggregate,f as auth,Kc as authenticateShare,b as authentication,Dc as clearCache,Uc as compareContentVersion,s as createCollection,r as createComment,Y as createContentVersion,X as createContentVersions,u as createDashboard,t as createDashboards,d as createDirectus,v as createField,z as createFlow,y as createFlows,B as createFolder,A as createFolders,D as createItem,C as createItems,F as createNotification,E as createNotifications,H as createOperation,G as createOperations,J as createPanel,I as createPanels,L as createPermission,K as createPermissions,N as createPreset,M as createPresets,O as createRelation,Q as createRole,P as createRoles,S as createShare,R as createShares,U as createTranslation,T as createTranslations,W as createUser,V as createUsers,_ as createWebhook,Z as createWebhooks,aa as deleteCollection,$ as deleteComment,Ja as deleteContentVersion,Ia as deleteContentVersions,fa as deleteDashboard,ea as deleteDashboards,ga as deleteField,ia as deleteFile,ha as deleteFiles,ka as deleteFlow,ja as deleteFlows,ma as deleteFolder,la as deleteFolders,oa as deleteItem,na as deleteItems,qa as deleteNotification,pa as deleteNotifications,sa as deleteOperation,ra as deleteOperations,ua as deletePanel,ta as deletePanels,wa as deletePermission,va as deletePermissions,ya as deletePreset,xa as deletePresets,za as deleteRelation,Ba as deleteRole,Aa as deleteRoles,Da as deleteShare,Ca as deleteShares,Fa as deleteTranslation,Ea as deleteTranslations,Ha as deleteUser,Ga as deleteUsers,La as deleteWebhook,Ka as deleteWebhooks,Sc as disableTwoFactor,Rc as enableTwoFactor,Gc as generateHash,Qc as generateTwoFactorSecret,i as generateUid,e as graphql,x as importFile,Lc as inviteShare,Oc as inviteUser,l as login,m as logout,a as memoryStorage,h as messageCallback,n as passwordRequest,o as passwordReset,g as pong,Vc as promoteContentVersion,ba as queryToParams,Ma as readActivities,Na as readActivity,Ra as readAssetArrayBuffer,Qa as readAssetBlob,Pa as readAssetRaw,Ta as readCollection,Sa as readCollections,Hb as readContentVersion,Gb as readContentVersions,Va as readDashboard,Ua as readDashboards,Wa as readExtensions,Za as readField,Xa as readFields,Ya as readFieldsByCollection,$a as readFile,_a as readFiles,bb as readFlow,ab as readFlows,db as readFolder,cb as readFolders,Nb as readGraphqlSdl,fb as readItem,eb as readItems,Fb as readMe,hb as readNotification,gb as readNotifications,Qb as readOpenApiSpec,jb as readOperation,ib as readOperations,lb as readPanel,kb as readPanels,nb as readPermission,mb as readPermissions,pb as readPreset,ob as readPresets,p as readProviders,sb as readRelation,rb as readRelationByCollection,qb as readRelations,ub as readRevision,tb as readRevisions,wb as readRole,vb as readRoles,xb as readSettings,zb as readShare,Mc as readShareInfo,yb as readShares,Ab as readSingleton,Cb as readTranslation,Bb as readTranslations,Eb as readUser,Db as readUsers,Jb as readWebhook,Ib as readWebhooks,j as realtime,q as refresh,Wc as rest,Tc as saveToContentVersion,Kb as schemaApply,Lb as schemaDiff,Mb as schemaSnapshot,Ob as serverHealth,Pb as serverInfo,Rb as serverPing,k as sleep,c as staticToken,da as throwIfCoreCollection,ca as throwIfEmpty,Fc as triggerFlow,Jc as triggerOperation,Tb as updateCollection,Sb as updateComment,Ac as updateContentVersion,zc as updateContentVersions,Vb as updateDashboard,Ub as updateDashboards,Wb as updateField,Yb as updateFile,Xb as updateFiles,_b as updateFlow,Zb as updateFlows,ac as updateFolder,$b as updateFolders,cc as updateItem,bc as updateItems,yc as updateMe,ec as updateNotification,dc as updateNotifications,gc as updateOperation,fc as updateOperations,ic as updatePanel,hc as updatePanels,kc as updatePermission,jc as updatePermissions,mc as updatePreset,lc as updatePresets,nc as updateRelation,pc as updateRole,oc as updateRoles,qc as updateSettings,sc as updateShare,rc as updateShares,tc as updateSingleton,vc as updateTranslation,uc as updateTranslations,xc as updateUser,wc as updateUsers,Cc as updateWebhook,Bc as updateWebhooks,w as uploadFiles,Nc as utilitySort,Ec as utilsExport,Ic as utilsImport,Hc as verifyHash,Xc as withOptions,Yc as withSearch,Zc as withToken};
import{$ as fa,$a as fb,$b as fc,A as G,Aa as Ga,Ab as Gb,Ac as Gc,B as H,Ba as Ha,Bb as Hb,Bc as Hc,C as I,Ca as Ia,Cb as Ib,Cc as Ic,D as J,Da as Ja,Db as Jb,Dc as Jc,E as K,Ea as Ka,Eb as Kb,Ec as Kc,F as L,Fa as La,Fb as Lb,Fc as Lc,G as M,Ga as Ma,Gb as Mb,Gc as Mc,H as N,Ha as Na,Hb as Nb,Hc as Nc,I as O,Ia as Oa,Ib as Ob,Ic as Oc,J as P,Ja as Pa,Jb as Pb,Jc as Pc,K as Q,Ka as Qa,Kb as Qb,Kc as Qc,L as R,La as Ra,Lb as Rb,Lc as Rc,M as S,Ma as Sa,Mb as Sb,Mc as Sc,N as T,Na as Ta,Nb as Tb,Nc as Tc,O as U,Oa as Ua,Ob as Ub,Oc as Uc,P as V,Pa as Va,Pb as Vb,Pc as Vc,Q as W,Qa as Wa,Qb as Wb,Qc as Wc,R as X,Ra as Xa,Rb as Xb,Rc as Xc,S as Y,Sa as Ya,Sb as Yb,Sc as Yc,T as Z,Ta as Za,Tb as Zb,Tc as Zc,U as _,Ua as _a,Ub as _b,Uc as _c,V as $,Va as $a,Vb as $b,W as aa,Wa as ab,Wb as ac,X as ba,Xa as bb,Xb as bc,Y as ca,Ya as cb,Yb as cc,Z as da,Za as db,Zb as dc,_ as ea,_a as eb,_b as ec,a,aa as ga,ab as gb,ac as gc,b,ba as ha,bb as hb,bc as hc,c,ca as ia,cb as ib,cc as ic,d,da as ja,db as jb,dc as jc,e,ea as ka,eb as kb,ec as kc,f as l,fa as la,fb as lb,fc as lc,g as m,ga as ma,gb as mb,gc as mc,h as n,ha as na,hb as nb,hc as nc,i as o,ia as oa,ib as ob,ic as oc,j as p,ja as pa,jb as pb,jc as pc,k as q,ka as qa,kb as qb,kc as qc,l as r,la as ra,lb as rb,lc as rc,m as s,ma as sa,mb as sb,mc as sc,n as t,na as ta,nb as tb,nc as tc,o as u,oa as ua,ob as ub,oc as uc,p as v,pa as va,pb as vb,pc as vc,q as w,qa as wa,qb as wb,qc as wc,r as x,ra as xa,rb as xb,rc as xc,s as y,sa as ya,sb as yb,sc as yc,t as z,ta as za,tb as zb,tc as zc,u as A,ua as Aa,ub as Ab,uc as Ac,v as B,va as Ba,vb as Bb,vc as Bc,w as C,wa as Ca,wb as Cb,wc as Cc,x as D,xa as Da,xb as Db,xc as Dc,y as E,ya as Ea,yb as Eb,yc as Ec,z as F,za as Fa,zb as Fb,zc as Fc}from"./chunk-LDFD35JM.js";import{a as f,b as g,c as h,d as i,e as j,f as k}from"./chunk-ARANAX6L.js";export{Qc as acceptUserInvite,Oa as aggregate,f as auth,Lc as authenticateShare,b as authentication,Ec as clearCache,Vc as compareContentVersion,s as createCollection,r as createComment,Y as createContentVersion,X as createContentVersions,u as createDashboard,t as createDashboards,d as createDirectus,v as createField,z as createFlow,y as createFlows,B as createFolder,A as createFolders,D as createItem,C as createItems,F as createNotification,E as createNotifications,H as createOperation,G as createOperations,J as createPanel,I as createPanels,L as createPermission,K as createPermissions,N as createPreset,M as createPresets,O as createRelation,Q as createRole,P as createRoles,S as createShare,R as createShares,U as createTranslation,T as createTranslations,W as createUser,V as createUsers,_ as createWebhook,Z as createWebhooks,aa as deleteCollection,$ as deleteComment,Ja as deleteContentVersion,Ia as deleteContentVersions,fa as deleteDashboard,ea as deleteDashboards,ga as deleteField,ia as deleteFile,ha as deleteFiles,ka as deleteFlow,ja as deleteFlows,ma as deleteFolder,la as deleteFolders,oa as deleteItem,na as deleteItems,qa as deleteNotification,pa as deleteNotifications,sa as deleteOperation,ra as deleteOperations,ua as deletePanel,ta as deletePanels,wa as deletePermission,va as deletePermissions,ya as deletePreset,xa as deletePresets,za as deleteRelation,Ba as deleteRole,Aa as deleteRoles,Da as deleteShare,Ca as deleteShares,Fa as deleteTranslation,Ea as deleteTranslations,Ha as deleteUser,Ga as deleteUsers,La as deleteWebhook,Ka as deleteWebhooks,Tc as disableTwoFactor,Sc as enableTwoFactor,Hc as generateHash,Rc as generateTwoFactorSecret,i as generateUid,e as graphql,x as importFile,Mc as inviteShare,Pc as inviteUser,l as login,m as logout,a as memoryStorage,h as messageCallback,n as passwordRequest,o as passwordReset,g as pong,Wc as promoteContentVersion,ba as queryToParams,Ma as readActivities,Na as readActivity,Ra as readAssetArrayBuffer,Qa as readAssetBlob,Pa as readAssetRaw,Ta as readCollection,Sa as readCollections,Hb as readContentVersion,Gb as readContentVersions,Va as readDashboard,Ua as readDashboards,Wa as readExtensions,Za as readField,Xa as readFields,Ya as readFieldsByCollection,$a as readFile,_a as readFiles,bb as readFlow,ab as readFlows,db as readFolder,cb as readFolders,Nb as readGraphqlSdl,fb as readItem,eb as readItems,Fb as readMe,hb as readNotification,gb as readNotifications,Qb as readOpenApiSpec,jb as readOperation,ib as readOperations,lb as readPanel,kb as readPanels,nb as readPermission,mb as readPermissions,pb as readPreset,ob as readPresets,p as readProviders,sb as readRelation,rb as readRelationByCollection,qb as readRelations,ub as readRevision,tb as readRevisions,wb as readRole,vb as readRoles,xb as readSettings,zb as readShare,Nc as readShareInfo,yb as readShares,Ab as readSingleton,Cb as readTranslation,Bb as readTranslations,Eb as readUser,Db as readUsers,Jb as readWebhook,Ib as readWebhooks,j as realtime,q as refresh,Xc as rest,Uc as saveToContentVersion,Kb as schemaApply,Lb as schemaDiff,Mb as schemaSnapshot,Ob as serverHealth,Pb as serverInfo,Rb as serverPing,k as sleep,c as staticToken,da as throwIfCoreCollection,ca as throwIfEmpty,Gc as triggerFlow,Kc as triggerOperation,Tb as updateCollection,Sb as updateComment,Bc as updateContentVersion,Ac as updateContentVersions,Vb as updateDashboard,Ub as updateDashboards,Wb as updateExtension,Xb as updateField,Zb as updateFile,Yb as updateFiles,$b as updateFlow,_b as updateFlows,bc as updateFolder,ac as updateFolders,dc as updateItem,cc as updateItems,zc as updateMe,fc as updateNotification,ec as updateNotifications,hc as updateOperation,gc as updateOperations,jc as updatePanel,ic as updatePanels,lc as updatePermission,kc as updatePermissions,nc as updatePreset,mc as updatePresets,oc as updateRelation,qc as updateRole,pc as updateRoles,rc as updateSettings,tc as updateShare,sc as updateShares,uc as updateSingleton,wc as updateTranslation,vc as updateTranslations,yc as updateUser,xc as updateUsers,Dc as updateWebhook,Cc as updateWebhooks,w as uploadFiles,Oc as utilitySort,Fc as utilsExport,Jc as utilsImport,Ic as verifyHash,Yc as withOptions,Zc as withSearch,_c as withToken};
//# sourceMappingURL=index.js.map

@@ -1,4 +0,4 @@

import { D as DirectusClient, b as WebSocketInterface } from '../client-572f0a81.js';
import { a as WebSocketConfig, d as WebSocketClient } from '../output-ef15f34f.js';
export { R as RemoveEventHandler, S as SubscribeOptions, f as SubscriptionEvents, e as SubscriptionOptionsEvents, g as SubscriptionOutput, h as SubscriptionPayload, W as WebSocketAuthModes, c as WebSocketEventHandler, b as WebSocketEvents } from '../output-ef15f34f.js';
import { D as DirectusClient, b as WebSocketInterface } from '../client-pzVdw9Ub.js';
import { a as WebSocketConfig, d as WebSocketClient } from '../types-ZBNrmR-A.js';
export { R as RemoveEventHandler, S as SubscribeOptions, f as SubscriptionEvents, e as SubscriptionOptionsEvents, g as SubscriptionOutput, h as SubscriptionPayload, W as WebSocketAuthModes, c as WebSocketEventHandler, b as WebSocketEvents } from '../types-ZBNrmR-A.js';

@@ -53,2 +53,2 @@ interface EmailAuth {

export { EmailAuth, RefreshAuth, TokenAuth, WebSocketClient, WebSocketConfig, auth, generateUid, messageCallback, pong, realtime, sleep };
export { type EmailAuth, type RefreshAuth, type TokenAuth, WebSocketClient, WebSocketConfig, auth, generateUid, messageCallback, pong, realtime, sleep };

@@ -1,2 +0,2 @@

import{a,b,c,d,e,f}from"../chunk-35FIPLD2.js";export{a as auth,d as generateUid,c as messageCallback,b as pong,e as realtime,f as sleep};
import{a,b,c,d,e,f}from"../chunk-ARANAX6L.js";export{a as auth,d as generateUid,c as messageCallback,b as pong,e as realtime,f as sleep};
//# sourceMappingURL=index.js.map

@@ -1,4 +0,4 @@

export { L as LoginOptions, e as RestClient, R as RestCommand, f as RestConfig, l as login } from '../login-824b07b5.js';
export { C as CreateActivityOutput, d as CreateCollectionOutput, a2 as CreateContentVersionOutput, f as CreateDashboardOutput, i as CreateFieldOutput, k as CreateFileOutput, n as CreateFlowOutput, s as CreateFolderOutput, w as CreateItemOutput, z as CreateNotificationOutput, D as CreateOperationOutput, G as CreatePanelOutput, J as CreatePermissionOutput, M as CreatePresetOutput, P as CreateRelationOutput, S as CreateRoleOutput, V as CreateShareOutput, Y as CreateTranslationOutput, $ as CreateUserOutput, a5 as CreateWebhookOutput, d2 as FileFormat, c1 as OpenApiSpecOutput, aI as ReadActivityOutput, aP as ReadCollectionOutput, bN as ReadContentVersionOutput, aS as ReadDashboardOutput, aW as ReadFieldOutput, a_ as ReadFileOutput, b1 as ReadFlowOutput, b4 as ReadFolderOutput, b7 as ReadItemOutput, ba as ReadNotificationOutput, bd as ReadOperationOutput, bg as ReadPanelOutput, bj as ReadPermissionOutput, bm as ReadPresetOutput, R as ReadProviderOutput, bp as ReadRelationOutput, bt as ReadRevisionOutput, bw as ReadRoleOutput, bz as ReadSettingOutput, bB as ReadShareOutput, bE as ReadSingletonOutput, bG as ReadTranslationOutput, bJ as ReadUserOutput, bQ as ReadWebhookOutput, bU as SchemaDiffOutput, bW as SchemaSnapshotOutput, bZ as ServerHealthOutput, b$ as ServerInfoOutput, c4 as UpdateActivityOutput, c6 as UpdateCollectionOutput, cX as UpdateContentVersionOutput, c8 as UpdateDashboardOutput, cb as UpdateFieldOutput, cd as UpdateFileOutput, cg as UpdateFlowOutput, cj as UpdateFolderOutput, cm as UpdateItemOutput, cp as UpdateNotificationOutput, cs as UpdateOperationOutput, cv as UpdatePanelOutput, cy as UpdatePermissionOutput, cB as UpdatePresetOutput, cE as UpdateRelationOutput, cG as UpdateRoleOutput, cJ as UpdateSettingOutput, cL as UpdateShareOutput, cO as UpdateSingletonOutput, cQ as UpdateTranslationOutput, cT as UpdateUserOutput, c_ as UpdateWebhookOutput, de as acceptUserInvite, aL as aggregate, d9 as authenticateShare, d1 as clearCache, dj as compareContentVersion, e as createCollection, c as createComment, a4 as createContentVersion, a3 as createContentVersions, h as createDashboard, g as createDashboards, j as createField, q as createFlow, o as createFlows, v as createFolder, t as createFolders, y as createItem, x as createItems, B as createNotification, A as createNotifications, F as createOperation, E as createOperations, I as createPanel, H as createPanels, L as createPermission, K as createPermissions, O as createPreset, N as createPresets, Q as createRelation, U as createRole, T as createRoles, X as createShare, W as createShares, _ as createTranslation, Z as createTranslations, a1 as createUser, a0 as createUsers, a7 as createWebhook, a6 as createWebhooks, a9 as deleteCollection, a8 as deleteComment, aF as deleteContentVersion, aE as deleteContentVersions, ab as deleteDashboard, aa as deleteDashboards, ac as deleteField, ae as deleteFile, ad as deleteFiles, ag as deleteFlow, af as deleteFlows, ai as deleteFolder, ah as deleteFolders, ak as deleteItem, aj as deleteItems, am as deleteNotification, al as deleteNotifications, ao as deleteOperation, an as deleteOperations, aq as deletePanel, ap as deletePanels, as as deletePermission, ar as deletePermissions, au as deletePreset, at as deletePresets, av as deleteRelation, ax as deleteRole, aw as deleteRoles, az as deleteShare, ay as deleteShares, aB as deleteTranslation, aA as deleteTranslations, aD as deleteUser, aC as deleteUsers, aH as deleteWebhook, aG as deleteWebhooks, dh as disableTwoFactor, dg as enableTwoFactor, d5 as generateHash, df as generateTwoFactorSecret, m as importFile, da as inviteShare, dd as inviteUser, l as logout, p as passwordRequest, a as passwordReset, dk as promoteContentVersion, dq as queryToParams, aJ as readActivities, aK as readActivity, aO as readAssetArrayBuffer, aN as readAssetBlob, aM as readAssetRaw, aR as readCollection, aQ as readCollections, bP as readContentVersion, bO as readContentVersions, aU as readDashboard, aT as readDashboards, aV as readExtensions, aZ as readField, aX as readFields, aY as readFieldsByCollection, b0 as readFile, a$ as readFiles, b3 as readFlow, b2 as readFlows, b6 as readFolder, b5 as readFolders, bY as readGraphqlSdl, b9 as readItem, b8 as readItems, bM as readMe, bc as readNotification, bb as readNotifications, c2 as readOpenApiSpec, bf as readOperation, be as readOperations, bi as readPanel, bh as readPanels, bl as readPermission, bk as readPermissions, bo as readPreset, bn as readPresets, r as readProviders, bs as readRelation, br as readRelationByCollection, bq as readRelations, bv as readRevision, bu as readRevisions, by as readRole, bx as readRoles, bA as readSettings, bD as readShare, db as readShareInfo, bC as readShares, bF as readSingleton, bI as readTranslation, bH as readTranslations, bL as readUser, bK as readUsers, bS as readWebhook, bR as readWebhooks, b as refresh, dl as rest, di as saveToContentVersion, bT as schemaApply, bV as schemaDiff, bX as schemaSnapshot, b_ as serverHealth, c0 as serverInfo, c3 as serverPing, ds as throwIfCoreCollection, dr as throwIfEmpty, d4 as triggerFlow, d8 as triggerOperation, c7 as updateCollection, c5 as updateComment, cZ as updateContentVersion, cY as updateContentVersions, ca as updateDashboard, c9 as updateDashboards, cc as updateField, cf as updateFile, ce as updateFiles, ci as updateFlow, ch as updateFlows, cl as updateFolder, ck as updateFolders, co as updateItem, cn as updateItems, cW as updateMe, cr as updateNotification, cq as updateNotifications, cu as updateOperation, ct as updateOperations, cx as updatePanel, cw as updatePanels, cA as updatePermission, cz as updatePermissions, cD as updatePreset, cC as updatePresets, cF as updateRelation, cI as updateRole, cH as updateRoles, cK as updateSettings, cN as updateShare, cM as updateShares, cP as updateSingleton, cS as updateTranslation, cR as updateTranslations, cV as updateUser, cU as updateUsers, d0 as updateWebhook, c$ as updateWebhooks, u as uploadFiles, dc as utilitySort, d3 as utilsExport, d7 as utilsImport, d6 as verifyHash, dm as withOptions, dn as withSearch, dp as withToken } from '../index-7ec1f729.js';
import '../output-ef15f34f.js';
import '../client-572f0a81.js';
export { L as LoginOptions, e as RestClient, R as RestCommand, f as RestConfig, l as login } from '../login-M53C1LeV.js';
export { C as CreateActivityOutput, d as CreateCollectionOutput, a2 as CreateContentVersionOutput, f as CreateDashboardOutput, i as CreateFieldOutput, k as CreateFileOutput, n as CreateFlowOutput, s as CreateFolderOutput, w as CreateItemOutput, z as CreateNotificationOutput, D as CreateOperationOutput, G as CreatePanelOutput, J as CreatePermissionOutput, M as CreatePresetOutput, P as CreateRelationOutput, S as CreateRoleOutput, V as CreateShareOutput, Y as CreateTranslationOutput, $ as CreateUserOutput, a5 as CreateWebhookOutput, d3 as FileFormat, c1 as OpenApiSpecOutput, aI as ReadActivityOutput, aP as ReadCollectionOutput, bN as ReadContentVersionOutput, aS as ReadDashboardOutput, aW as ReadFieldOutput, a_ as ReadFileOutput, b1 as ReadFlowOutput, b4 as ReadFolderOutput, b7 as ReadItemOutput, ba as ReadNotificationOutput, bd as ReadOperationOutput, bg as ReadPanelOutput, bj as ReadPermissionOutput, bm as ReadPresetOutput, R as ReadProviderOutput, bp as ReadRelationOutput, bt as ReadRevisionOutput, bw as ReadRoleOutput, bz as ReadSettingOutput, bB as ReadShareOutput, bE as ReadSingletonOutput, bG as ReadTranslationOutput, bJ as ReadUserOutput, bQ as ReadWebhookOutput, bU as SchemaDiffOutput, bW as SchemaSnapshotOutput, bZ as ServerHealthOutput, b$ as ServerInfoOutput, c4 as UpdateActivityOutput, c6 as UpdateCollectionOutput, cY as UpdateContentVersionOutput, c8 as UpdateDashboardOutput, cc as UpdateFieldOutput, ce as UpdateFileOutput, ch as UpdateFlowOutput, ck as UpdateFolderOutput, cn as UpdateItemOutput, cq as UpdateNotificationOutput, ct as UpdateOperationOutput, cw as UpdatePanelOutput, cz as UpdatePermissionOutput, cC as UpdatePresetOutput, cF as UpdateRelationOutput, cH as UpdateRoleOutput, cK as UpdateSettingOutput, cM as UpdateShareOutput, cP as UpdateSingletonOutput, cR as UpdateTranslationOutput, cU as UpdateUserOutput, c$ as UpdateWebhookOutput, df as acceptUserInvite, aL as aggregate, da as authenticateShare, d2 as clearCache, dk as compareContentVersion, e as createCollection, c as createComment, a4 as createContentVersion, a3 as createContentVersions, h as createDashboard, g as createDashboards, j as createField, q as createFlow, o as createFlows, v as createFolder, t as createFolders, y as createItem, x as createItems, B as createNotification, A as createNotifications, F as createOperation, E as createOperations, I as createPanel, H as createPanels, L as createPermission, K as createPermissions, O as createPreset, N as createPresets, Q as createRelation, U as createRole, T as createRoles, X as createShare, W as createShares, _ as createTranslation, Z as createTranslations, a1 as createUser, a0 as createUsers, a7 as createWebhook, a6 as createWebhooks, a9 as deleteCollection, a8 as deleteComment, aF as deleteContentVersion, aE as deleteContentVersions, ab as deleteDashboard, aa as deleteDashboards, ac as deleteField, ae as deleteFile, ad as deleteFiles, ag as deleteFlow, af as deleteFlows, ai as deleteFolder, ah as deleteFolders, ak as deleteItem, aj as deleteItems, am as deleteNotification, al as deleteNotifications, ao as deleteOperation, an as deleteOperations, aq as deletePanel, ap as deletePanels, as as deletePermission, ar as deletePermissions, au as deletePreset, at as deletePresets, av as deleteRelation, ax as deleteRole, aw as deleteRoles, az as deleteShare, ay as deleteShares, aB as deleteTranslation, aA as deleteTranslations, aD as deleteUser, aC as deleteUsers, aH as deleteWebhook, aG as deleteWebhooks, di as disableTwoFactor, dh as enableTwoFactor, d6 as generateHash, dg as generateTwoFactorSecret, m as importFile, db as inviteShare, de as inviteUser, l as logout, p as passwordRequest, a as passwordReset, dl as promoteContentVersion, dr as queryToParams, aJ as readActivities, aK as readActivity, aO as readAssetArrayBuffer, aN as readAssetBlob, aM as readAssetRaw, aR as readCollection, aQ as readCollections, bP as readContentVersion, bO as readContentVersions, aU as readDashboard, aT as readDashboards, aV as readExtensions, aZ as readField, aX as readFields, aY as readFieldsByCollection, b0 as readFile, a$ as readFiles, b3 as readFlow, b2 as readFlows, b6 as readFolder, b5 as readFolders, bY as readGraphqlSdl, b9 as readItem, b8 as readItems, bM as readMe, bc as readNotification, bb as readNotifications, c2 as readOpenApiSpec, bf as readOperation, be as readOperations, bi as readPanel, bh as readPanels, bl as readPermission, bk as readPermissions, bo as readPreset, bn as readPresets, r as readProviders, bs as readRelation, br as readRelationByCollection, bq as readRelations, bv as readRevision, bu as readRevisions, by as readRole, bx as readRoles, bA as readSettings, bD as readShare, dc as readShareInfo, bC as readShares, bF as readSingleton, bI as readTranslation, bH as readTranslations, bL as readUser, bK as readUsers, bS as readWebhook, bR as readWebhooks, b as refresh, dm as rest, dj as saveToContentVersion, bT as schemaApply, bV as schemaDiff, bX as schemaSnapshot, b_ as serverHealth, c0 as serverInfo, c3 as serverPing, dt as throwIfCoreCollection, ds as throwIfEmpty, d5 as triggerFlow, d9 as triggerOperation, c7 as updateCollection, c5 as updateComment, c_ as updateContentVersion, cZ as updateContentVersions, ca as updateDashboard, c9 as updateDashboards, cb as updateExtension, cd as updateField, cg as updateFile, cf as updateFiles, cj as updateFlow, ci as updateFlows, cm as updateFolder, cl as updateFolders, cp as updateItem, co as updateItems, cX as updateMe, cs as updateNotification, cr as updateNotifications, cv as updateOperation, cu as updateOperations, cy as updatePanel, cx as updatePanels, cB as updatePermission, cA as updatePermissions, cE as updatePreset, cD as updatePresets, cG as updateRelation, cJ as updateRole, cI as updateRoles, cL as updateSettings, cO as updateShare, cN as updateShares, cQ as updateSingleton, cT as updateTranslation, cS as updateTranslations, cW as updateUser, cV as updateUsers, d1 as updateWebhook, d0 as updateWebhooks, u as uploadFiles, dd as utilitySort, d4 as utilsExport, d8 as utilsImport, d7 as verifyHash, dn as withOptions, dp as withSearch, dq as withToken } from '../index-Szt1hiPf.js';
import '../types-ZBNrmR-A.js';
import '../client-pzVdw9Ub.js';

@@ -1,2 +0,2 @@

import{$ as W,$a as Wa,$b as Wb,A as v,Aa as va,Ab as vb,Ac as vc,B as w,Ba as wa,Bb as wb,Bc as wc,C as x,Ca as xa,Cb as xb,Cc as xc,D as y,Da as ya,Db as yb,Dc as yc,E as z,Ea as za,Eb as zb,Ec as zc,F as A,Fa as Aa,Fb as Ab,Fc as Ac,G as B,Ga as Ba,Gb as Bb,Gc as Bc,H as C,Ha as Ca,Hb as Cb,Hc as Cc,I as D,Ia as Da,Ib as Db,Ic as Dc,J as E,Ja as Ea,Jb as Eb,Jc as Ec,K as F,Ka as Fa,Kb as Fb,Kc as Fc,L as G,La as Ga,Lb as Gb,Lc as Gc,M as H,Ma as Ha,Mb as Hb,Mc as Hc,N as I,Na as Ia,Nb as Ib,Nc as Ic,O as J,Oa as Ja,Ob as Jb,Oc as Jc,P as K,Pa as Ka,Pb as Kb,Pc as Kc,Q as L,Qa as La,Qb as Lb,Qc as Lc,R as M,Ra as Ma,Rb as Mb,Rc as Mc,S as N,Sa as Na,Sb as Nb,Sc as Nc,T as O,Ta as Oa,Tb as Ob,Tc as Oc,U as P,Ua as Pa,Ub as Pb,V as Q,Va as Qa,Vb as Qb,W as R,Wa as Ra,Wb as Rb,X as S,Xa as Sa,Xb as Sb,Y as T,Ya as Ta,Yb as Tb,Z as U,Za as Ua,Zb as Ub,_ as V,_a as Va,_b as Vb,aa as X,ab as Xa,ac as Xb,ba as Y,bb as Ya,bc as Yb,ca as Z,cb as Za,cc as Zb,da as _,db as _a,dc as _b,ea as $,eb as $a,ec as $b,f as a,fa as aa,fb as ab,fc as ac,g as b,ga as ba,gb as bb,gc as bc,h as c,ha as ca,hb as cb,hc as cc,i as d,ia as da,ib as db,ic as dc,j as e,ja as ea,jb as eb,jc as ec,k as f,ka as fa,kb as fb,kc as fc,l as g,la as ga,lb as gb,lc as gc,m as h,ma as ha,mb as hb,mc as hc,n as i,na as ia,nb as ib,nc as ic,o as j,oa as ja,ob as jb,oc as jc,p as k,pa as ka,pb as kb,pc as kc,q as l,qa as la,qb as lb,qc as lc,r as m,ra as ma,rb as mb,rc as mc,s as n,sa as na,sb as nb,sc as nc,t as o,ta as oa,tb as ob,tc as oc,u as p,ua as pa,ub as pb,uc as pc,v as q,va as qa,vb as qb,vc as qc,w as r,wa as ra,wb as rb,wc as rc,x as s,xa as sa,xb as sb,xc as sc,y as t,ya as ta,yb as tb,yc as tc,z as u,za as ua,zb as ub,zc as uc}from"../chunk-GJVD322O.js";import"../chunk-35FIPLD2.js";export{Ec as acceptUserInvite,Da as aggregate,zc as authenticateShare,sc as clearCache,Jc as compareContentVersion,h as createCollection,g as createComment,N as createContentVersion,M as createContentVersions,j as createDashboard,i as createDashboards,k as createField,o as createFlow,n as createFlows,q as createFolder,p as createFolders,s as createItem,r as createItems,u as createNotification,t as createNotifications,w as createOperation,v as createOperations,y as createPanel,x as createPanels,A as createPermission,z as createPermissions,C as createPreset,B as createPresets,D as createRelation,F as createRole,E as createRoles,H as createShare,G as createShares,J as createTranslation,I as createTranslations,L as createUser,K as createUsers,P as createWebhook,O as createWebhooks,R as deleteCollection,Q as deleteComment,ya as deleteContentVersion,xa as deleteContentVersions,W as deleteDashboard,V as deleteDashboards,X as deleteField,Z as deleteFile,Y as deleteFiles,$ as deleteFlow,_ as deleteFlows,ba as deleteFolder,aa as deleteFolders,da as deleteItem,ca as deleteItems,fa as deleteNotification,ea as deleteNotifications,ha as deleteOperation,ga as deleteOperations,ja as deletePanel,ia as deletePanels,la as deletePermission,ka as deletePermissions,na as deletePreset,ma as deletePresets,oa as deleteRelation,qa as deleteRole,pa as deleteRoles,sa as deleteShare,ra as deleteShares,ua as deleteTranslation,ta as deleteTranslations,wa as deleteUser,va as deleteUsers,Aa as deleteWebhook,za as deleteWebhooks,Hc as disableTwoFactor,Gc as enableTwoFactor,vc as generateHash,Fc as generateTwoFactorSecret,m as importFile,Ac as inviteShare,Dc as inviteUser,a as login,b as logout,c as passwordRequest,d as passwordReset,Kc as promoteContentVersion,S as queryToParams,Ba as readActivities,Ca as readActivity,Ga as readAssetArrayBuffer,Fa as readAssetBlob,Ea as readAssetRaw,Ia as readCollection,Ha as readCollections,wb as readContentVersion,vb as readContentVersions,Ka as readDashboard,Ja as readDashboards,La as readExtensions,Oa as readField,Ma as readFields,Na as readFieldsByCollection,Qa as readFile,Pa as readFiles,Sa as readFlow,Ra as readFlows,Ua as readFolder,Ta as readFolders,Cb as readGraphqlSdl,Wa as readItem,Va as readItems,ub as readMe,Ya as readNotification,Xa as readNotifications,Fb as readOpenApiSpec,_a as readOperation,Za as readOperations,ab as readPanel,$a as readPanels,cb as readPermission,bb as readPermissions,eb as readPreset,db as readPresets,e as readProviders,hb as readRelation,gb as readRelationByCollection,fb as readRelations,jb as readRevision,ib as readRevisions,lb as readRole,kb as readRoles,mb as readSettings,ob as readShare,Bc as readShareInfo,nb as readShares,pb as readSingleton,rb as readTranslation,qb as readTranslations,tb as readUser,sb as readUsers,yb as readWebhook,xb as readWebhooks,f as refresh,Lc as rest,Ic as saveToContentVersion,zb as schemaApply,Ab as schemaDiff,Bb as schemaSnapshot,Db as serverHealth,Eb as serverInfo,Gb as serverPing,U as throwIfCoreCollection,T as throwIfEmpty,uc as triggerFlow,yc as triggerOperation,Ib as updateCollection,Hb as updateComment,pc as updateContentVersion,oc as updateContentVersions,Kb as updateDashboard,Jb as updateDashboards,Lb as updateField,Nb as updateFile,Mb as updateFiles,Pb as updateFlow,Ob as updateFlows,Rb as updateFolder,Qb as updateFolders,Tb as updateItem,Sb as updateItems,nc as updateMe,Vb as updateNotification,Ub as updateNotifications,Xb as updateOperation,Wb as updateOperations,Zb as updatePanel,Yb as updatePanels,$b as updatePermission,_b as updatePermissions,bc as updatePreset,ac as updatePresets,cc as updateRelation,ec as updateRole,dc as updateRoles,fc as updateSettings,hc as updateShare,gc as updateShares,ic as updateSingleton,kc as updateTranslation,jc as updateTranslations,mc as updateUser,lc as updateUsers,rc as updateWebhook,qc as updateWebhooks,l as uploadFiles,Cc as utilitySort,tc as utilsExport,xc as utilsImport,wc as verifyHash,Mc as withOptions,Nc as withSearch,Oc as withToken};
import{$ as W,$a as Wa,$b as Wb,A as v,Aa as va,Ab as vb,Ac as vc,B as w,Ba as wa,Bb as wb,Bc as wc,C as x,Ca as xa,Cb as xb,Cc as xc,D as y,Da as ya,Db as yb,Dc as yc,E as z,Ea as za,Eb as zb,Ec as zc,F as A,Fa as Aa,Fb as Ab,Fc as Ac,G as B,Ga as Ba,Gb as Bb,Gc as Bc,H as C,Ha as Ca,Hb as Cb,Hc as Cc,I as D,Ia as Da,Ib as Db,Ic as Dc,J as E,Ja as Ea,Jb as Eb,Jc as Ec,K as F,Ka as Fa,Kb as Fb,Kc as Fc,L as G,La as Ga,Lb as Gb,Lc as Gc,M as H,Ma as Ha,Mb as Hb,Mc as Hc,N as I,Na as Ia,Nb as Ib,Nc as Ic,O as J,Oa as Ja,Ob as Jb,Oc as Jc,P as K,Pa as Ka,Pb as Kb,Pc as Kc,Q as L,Qa as La,Qb as Lb,Qc as Lc,R as M,Ra as Ma,Rb as Mb,Rc as Mc,S as N,Sa as Na,Sb as Nb,Sc as Nc,T as O,Ta as Oa,Tb as Ob,Tc as Oc,U as P,Ua as Pa,Ub as Pb,Uc as Pc,V as Q,Va as Qa,Vb as Qb,W as R,Wa as Ra,Wb as Rb,X as S,Xa as Sa,Xb as Sb,Y as T,Ya as Ta,Yb as Tb,Z as U,Za as Ua,Zb as Ub,_ as V,_a as Va,_b as Vb,aa as X,ab as Xa,ac as Xb,ba as Y,bb as Ya,bc as Yb,ca as Z,cb as Za,cc as Zb,da as _,db as _a,dc as _b,ea as $,eb as $a,ec as $b,f as a,fa as aa,fb as ab,fc as ac,g as b,ga as ba,gb as bb,gc as bc,h as c,ha as ca,hb as cb,hc as cc,i as d,ia as da,ib as db,ic as dc,j as e,ja as ea,jb as eb,jc as ec,k as f,ka as fa,kb as fb,kc as fc,l as g,la as ga,lb as gb,lc as gc,m as h,ma as ha,mb as hb,mc as hc,n as i,na as ia,nb as ib,nc as ic,o as j,oa as ja,ob as jb,oc as jc,p as k,pa as ka,pb as kb,pc as kc,q as l,qa as la,qb as lb,qc as lc,r as m,ra as ma,rb as mb,rc as mc,s as n,sa as na,sb as nb,sc as nc,t as o,ta as oa,tb as ob,tc as oc,u as p,ua as pa,ub as pb,uc as pc,v as q,va as qa,vb as qb,vc as qc,w as r,wa as ra,wb as rb,wc as rc,x as s,xa as sa,xb as sb,xc as sc,y as t,ya as ta,yb as tb,yc as tc,z as u,za as ua,zb as ub,zc as uc}from"../chunk-LDFD35JM.js";import"../chunk-ARANAX6L.js";export{Fc as acceptUserInvite,Da as aggregate,Ac as authenticateShare,tc as clearCache,Kc as compareContentVersion,h as createCollection,g as createComment,N as createContentVersion,M as createContentVersions,j as createDashboard,i as createDashboards,k as createField,o as createFlow,n as createFlows,q as createFolder,p as createFolders,s as createItem,r as createItems,u as createNotification,t as createNotifications,w as createOperation,v as createOperations,y as createPanel,x as createPanels,A as createPermission,z as createPermissions,C as createPreset,B as createPresets,D as createRelation,F as createRole,E as createRoles,H as createShare,G as createShares,J as createTranslation,I as createTranslations,L as createUser,K as createUsers,P as createWebhook,O as createWebhooks,R as deleteCollection,Q as deleteComment,ya as deleteContentVersion,xa as deleteContentVersions,W as deleteDashboard,V as deleteDashboards,X as deleteField,Z as deleteFile,Y as deleteFiles,$ as deleteFlow,_ as deleteFlows,ba as deleteFolder,aa as deleteFolders,da as deleteItem,ca as deleteItems,fa as deleteNotification,ea as deleteNotifications,ha as deleteOperation,ga as deleteOperations,ja as deletePanel,ia as deletePanels,la as deletePermission,ka as deletePermissions,na as deletePreset,ma as deletePresets,oa as deleteRelation,qa as deleteRole,pa as deleteRoles,sa as deleteShare,ra as deleteShares,ua as deleteTranslation,ta as deleteTranslations,wa as deleteUser,va as deleteUsers,Aa as deleteWebhook,za as deleteWebhooks,Ic as disableTwoFactor,Hc as enableTwoFactor,wc as generateHash,Gc as generateTwoFactorSecret,m as importFile,Bc as inviteShare,Ec as inviteUser,a as login,b as logout,c as passwordRequest,d as passwordReset,Lc as promoteContentVersion,S as queryToParams,Ba as readActivities,Ca as readActivity,Ga as readAssetArrayBuffer,Fa as readAssetBlob,Ea as readAssetRaw,Ia as readCollection,Ha as readCollections,wb as readContentVersion,vb as readContentVersions,Ka as readDashboard,Ja as readDashboards,La as readExtensions,Oa as readField,Ma as readFields,Na as readFieldsByCollection,Qa as readFile,Pa as readFiles,Sa as readFlow,Ra as readFlows,Ua as readFolder,Ta as readFolders,Cb as readGraphqlSdl,Wa as readItem,Va as readItems,ub as readMe,Ya as readNotification,Xa as readNotifications,Fb as readOpenApiSpec,_a as readOperation,Za as readOperations,ab as readPanel,$a as readPanels,cb as readPermission,bb as readPermissions,eb as readPreset,db as readPresets,e as readProviders,hb as readRelation,gb as readRelationByCollection,fb as readRelations,jb as readRevision,ib as readRevisions,lb as readRole,kb as readRoles,mb as readSettings,ob as readShare,Cc as readShareInfo,nb as readShares,pb as readSingleton,rb as readTranslation,qb as readTranslations,tb as readUser,sb as readUsers,yb as readWebhook,xb as readWebhooks,f as refresh,Mc as rest,Jc as saveToContentVersion,zb as schemaApply,Ab as schemaDiff,Bb as schemaSnapshot,Db as serverHealth,Eb as serverInfo,Gb as serverPing,U as throwIfCoreCollection,T as throwIfEmpty,vc as triggerFlow,zc as triggerOperation,Ib as updateCollection,Hb as updateComment,qc as updateContentVersion,pc as updateContentVersions,Kb as updateDashboard,Jb as updateDashboards,Lb as updateExtension,Mb as updateField,Ob as updateFile,Nb as updateFiles,Qb as updateFlow,Pb as updateFlows,Sb as updateFolder,Rb as updateFolders,Ub as updateItem,Tb as updateItems,oc as updateMe,Wb as updateNotification,Vb as updateNotifications,Yb as updateOperation,Xb as updateOperations,_b as updatePanel,Zb as updatePanels,ac as updatePermission,$b as updatePermissions,cc as updatePreset,bc as updatePresets,dc as updateRelation,fc as updateRole,ec as updateRoles,gc as updateSettings,ic as updateShare,hc as updateShares,jc as updateSingleton,lc as updateTranslation,kc as updateTranslations,nc as updateUser,mc as updateUsers,sc as updateWebhook,rc as updateWebhooks,l as uploadFiles,Dc as utilitySort,uc as utilsExport,yc as utilsImport,xc as verifyHash,Nc as withOptions,Oc as withSearch,Pc as withToken};
//# sourceMappingURL=index.js.map
{
"name": "@directus/sdk",
"version": "13.0.2",
"version": "14.0.0",
"description": "Directus JavaScript SDK",

@@ -45,6 +45,6 @@ "homepage": "https://directus.io",

"devDependencies": {
"@types/node-fetch": "2.6.4",
"tsup": "7.2.0",
"typescript": "5.2.2",
"vitest": "0.31.1",
"@types/node-fetch": "2.6.9",
"tsup": "8.0.1",
"typescript": "5.3.3",
"vitest": "1.1.0",
"@directus/tsconfig": "1.0.1"

@@ -51,0 +51,0 @@ },

@@ -18,3 +18,3 @@ # Directus JavaScript SDK

This client is currently an empty wrapper without any functionality.Before you can do anything with it you'll need to
This client is currently an empty wrapper without any functionality. Before you can do anything with it you'll need to
add some features. The following composables are available/in progress:

@@ -82,3 +82,3 @@

authMode: 'public',
})
}),
);

@@ -103,3 +103,3 @@

authMode: 'public',
})
}),
);

@@ -106,0 +106,0 @@

@@ -25,3 +25,3 @@ import type { LoginOptions } from '../index.js';

let refreshPromise: Promise<AuthenticationData> | null = null;
let refreshTimeout: NodeJS.Timer | null = null;
let refreshTimeout: ReturnType<typeof setTimeout> | null = null;
const storage = authConfig.storage ?? memoryStorage();

@@ -28,0 +28,0 @@

@@ -22,3 +22,3 @@ import type { ClientGlobals, ClientOptions, DirectusClient } from './types/client.js';

url: string,
options: ClientOptions = {}
options: ClientOptions = {},
): DirectusClient<Schema> => {

@@ -25,0 +25,0 @@ const globals = options.globals ? { ...defaultGlobals, ...options.globals } : defaultGlobals;

@@ -21,3 +21,3 @@ import type { DirectusClient } from '../types/client.js';

variables?: Record<string, unknown>,
scope: 'items' | 'system' = 'items'
scope: 'items' | 'system' = 'items',
): Promise<Output> {

@@ -24,0 +24,0 @@ const fetchOptions: RequestInit = {

@@ -5,3 +5,3 @@ export interface GraphqlClient<_Schema extends object> {

variables?: Record<string, unknown>,
scope?: 'items' | 'system'
scope?: 'items' | 'system',
): Promise<Output>;

@@ -8,0 +8,0 @@ }

@@ -87,14 +87,17 @@ import type { DirectusClient } from '../types/client.js';

setTimeout(() => {
reconnectAttempts += 1;
setTimeout(
() => {
reconnectAttempts += 1;
this.connect()
.then(() => {
reconnectAttempts = 0;
reconnecting = false;
})
.catch(() => {
/* failed to connect */
});
}, Math.max(1, config.reconnect.delay));
this.connect()
.then(() => {
reconnectAttempts = 0;
reconnecting = false;
})
.catch(() => {
/* failed to connect */
});
},
Math.max(1, config.reconnect.delay),
);
} else {

@@ -238,3 +241,3 @@ reconnecting = false;

collection: Collection,
options = {} as Options
options = {} as Options,
) {

@@ -241,0 +244,0 @@ if (!socket || socket.readyState !== WebSocketState.OPEN) await this.connect();

@@ -39,3 +39,3 @@ import type { Query } from '../types/query.js';

collection: Collection,
options?: Options
options?: Options,
): Promise<{

@@ -67,3 +67,3 @@ subscription: AsyncGenerator<

? ApplyQueryFields<Schema, CollectionType<Schema, Collection>, TQuery['fields']>
: Partial<Schema[Collection]>
: Partial<Schema[Collection]>,
> = { type: 'subscription'; uid?: string } & (

@@ -70,0 +70,0 @@ | {

@@ -22,3 +22,3 @@ import type { AuthenticationData, AuthenticationMode } from '../../../index.js';

password: string,
options: LoginOptions = {}
options: LoginOptions = {},
): RestCommand<AuthenticationData, Schema> =>

@@ -25,0 +25,0 @@ () => {

@@ -15,3 +15,3 @@ import type { AuthenticationData, AuthenticationMode } from '../../../index.js';

mode: AuthenticationMode = 'cookie',
refresh_token?: string
refresh_token?: string,
): RestCommand<AuthenticationData, Schema> =>

@@ -18,0 +18,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusActivity } from '../../../schema/activity.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusActivity<Schema>
Item extends object = DirectusActivity<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

item: Partial<DirectusActivity<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreateActivityOutput<Schema, TQuery>, Schema> =>

@@ -26,0 +26,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusCollection } from '../../../schema/collection.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusCollection<Schema>
Item extends object = DirectusCollection<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

item: NestedPartial<DirectusCollection<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreateCollectionOutput<Schema, TQuery>, Schema> =>

@@ -26,0 +26,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusDashboard } from '../../../schema/dashboard.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusDashboard<Schema>
Item extends object = DirectusDashboard<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

items: Partial<DirectusDashboard<Schema>>[],
query?: TQuery
query?: TQuery,
): RestCommand<CreateDashboardOutput<Schema, TQuery>[], Schema> =>

@@ -44,3 +44,3 @@ () => ({

item: Partial<DirectusDashboard<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreateDashboardOutput<Schema, TQuery>, Schema> =>

@@ -47,0 +47,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusField } from '../../../schema/field.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusField<Schema>
Item extends object = DirectusField<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: NestedPartial<DirectusField<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreateFieldOutput<Schema, TQuery>, Schema> =>

@@ -28,0 +28,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusFile } from '../../../schema/file.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusFile<Schema>
Item extends object = DirectusFile<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

data: FormData,
query?: TQuery
query?: TQuery,
): RestCommand<CreateFileOutput<Schema, TQuery>, Schema> =>

@@ -47,3 +47,3 @@ () => ({

data: Partial<DirectusFile<Schema>> = {},
query?: TQuery
query?: TQuery,
): RestCommand<CreateFileOutput<Schema, TQuery>, Schema> =>

@@ -50,0 +50,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusFlow } from '../../../schema/flow.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusFlow<Schema>
Item extends object = DirectusFlow<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

items: Partial<DirectusFlow<Schema>>[],
query?: TQuery
query?: TQuery,
): RestCommand<CreateFlowOutput<Schema, TQuery>[], Schema> =>

@@ -44,3 +44,3 @@ () => ({

item: Partial<DirectusFlow<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreateFlowOutput<Schema, TQuery>, Schema> =>

@@ -47,0 +47,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusFolder } from '../../../schema/folder.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusFolder<Schema>
Item extends object = DirectusFolder<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

items: Partial<DirectusFolder<Schema>>[],
query?: TQuery
query?: TQuery,
): RestCommand<CreateFolderOutput<Schema, TQuery>[], Schema> =>

@@ -44,3 +44,3 @@ () => ({

item: Partial<DirectusFolder<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreateFolderOutput<Schema, TQuery>, Schema> =>

@@ -47,0 +47,0 @@ () => ({

@@ -7,3 +7,3 @@ import type { ApplyQueryFields, CollectionType, Query, UnpackList } from '../../../types/index.js';

Collection extends keyof Schema,
TQuery extends Query<Schema, Schema[Collection]>
TQuery extends Query<Schema, Schema[Collection]>,
> = ApplyQueryFields<Schema, CollectionType<Schema, Collection>, TQuery['fields']>;

@@ -24,3 +24,3 @@

items: Partial<UnpackList<Schema[Collection]>>[],
query?: TQuery
query?: TQuery,
): RestCommand<CreateItemOutput<Schema, Collection, TQuery>[], Schema> =>

@@ -55,3 +55,3 @@ () => {

item: Partial<UnpackList<Schema[Collection]>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreateItemOutput<Schema, Collection, TQuery>, Schema> =>

@@ -58,0 +58,0 @@ () => {

@@ -8,3 +8,3 @@ import type { DirectusNotification } from '../../../schema/notification.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusNotification<Schema>
Item extends object = DirectusNotification<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

items: Partial<DirectusNotification<Schema>>[],
query?: TQuery
query?: TQuery,
): RestCommand<CreateNotificationOutput<Schema, TQuery>[], Schema> =>

@@ -44,3 +44,3 @@ () => ({

item: Partial<DirectusNotification<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreateNotificationOutput<Schema, TQuery>, Schema> =>

@@ -47,0 +47,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusOperation } from '../../../schema/operation.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusOperation<Schema>
Item extends object = DirectusOperation<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

items: Partial<DirectusOperation<Schema>>[],
query?: TQuery
query?: TQuery,
): RestCommand<CreateOperationOutput<Schema, TQuery>[], Schema> =>

@@ -44,3 +44,3 @@ () => ({

item: Partial<DirectusOperation<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreateOperationOutput<Schema, TQuery>, Schema> =>

@@ -47,0 +47,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusPanel } from '../../../schema/panel.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusPanel<Schema>
Item extends object = DirectusPanel<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

items: Partial<DirectusPanel<Schema>>[],
query?: TQuery
query?: TQuery,
): RestCommand<CreatePanelOutput<Schema, TQuery>[], Schema> =>

@@ -44,3 +44,3 @@ () => ({

item: Partial<DirectusPanel<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreatePanelOutput<Schema, TQuery>, Schema> =>

@@ -47,0 +47,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusPermission } from '../../../schema/permission.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusPermission<Schema>
Item extends object = DirectusPermission<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

items: Partial<DirectusPermission<Schema>>[],
query?: TQuery
query?: TQuery,
): RestCommand<CreatePermissionOutput<Schema, TQuery>[], Schema> =>

@@ -44,3 +44,3 @@ () => ({

item: Partial<DirectusPermission<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreatePermissionOutput<Schema, TQuery>, Schema> =>

@@ -47,0 +47,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusPreset } from '../../../schema/preset.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusPreset<Schema>
Item extends object = DirectusPreset<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

items: Partial<DirectusPreset<Schema>>[],
query?: TQuery
query?: TQuery,
): RestCommand<CreatePresetOutput<Schema, TQuery>[], Schema> =>

@@ -44,3 +44,3 @@ () => ({

item: Partial<DirectusPreset<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreatePresetOutput<Schema, TQuery>, Schema> =>

@@ -47,0 +47,0 @@ () => ({

@@ -7,3 +7,3 @@ import type { DirectusRelation } from '../../../schema/relation.js';

Schema extends object,
Item extends object = DirectusRelation<Schema>
Item extends object = DirectusRelation<Schema>,
> = ApplyQueryFields<Schema, Item, '*'>;

@@ -21,3 +21,3 @@

<Schema extends object>(
item: NestedPartial<DirectusRelation<Schema>>
item: NestedPartial<DirectusRelation<Schema>>,
): RestCommand<CreateRelationOutput<Schema>, Schema> =>

@@ -24,0 +24,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusRole } from '../../../schema/role.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusRole<Schema>
Item extends object = DirectusRole<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

items: Partial<DirectusRole<Schema>>[],
query?: TQuery
query?: TQuery,
): RestCommand<CreateRoleOutput<Schema, TQuery>[], Schema> =>

@@ -44,3 +44,3 @@ () => ({

item: Partial<DirectusRole<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreateRoleOutput<Schema, TQuery>, Schema> =>

@@ -47,0 +47,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusShare } from '../../../schema/share.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusShare<Schema>
Item extends object = DirectusShare<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

items: Partial<DirectusShare<Schema>>[],
query?: TQuery
query?: TQuery,
): RestCommand<CreateShareOutput<Schema, TQuery>[], Schema> =>

@@ -44,3 +44,3 @@ () => ({

item: Partial<DirectusShare<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreateShareOutput<Schema, TQuery>, Schema> =>

@@ -47,0 +47,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusTranslation } from '../../../schema/translation.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusTranslation<Schema>
Item extends object = DirectusTranslation<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

items: Partial<DirectusTranslation<Schema>>[],
query?: TQuery
query?: TQuery,
): RestCommand<CreateTranslationOutput<Schema, TQuery>[], Schema> =>

@@ -44,3 +44,3 @@ () => ({

item: Partial<DirectusTranslation<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreateTranslationOutput<Schema, TQuery>, Schema> =>

@@ -47,0 +47,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusUser } from '../../../schema/user.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusUser<Schema>
Item extends object = DirectusUser<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

items: Partial<DirectusUser<Schema>>[],
query?: TQuery
query?: TQuery,
): RestCommand<CreateUserOutput<Schema, TQuery>[], Schema> =>

@@ -44,3 +44,3 @@ () => ({

item: Partial<DirectusUser<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreateUserOutput<Schema, TQuery>, Schema> =>

@@ -47,0 +47,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusVersion } from '../../../schema/version.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusVersion<Schema>
Item extends object = DirectusVersion<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

items: Partial<DirectusVersion<Schema>>[],
query?: TQuery
query?: TQuery,
): RestCommand<CreateContentVersionOutput<Schema, TQuery>[], Schema> =>

@@ -44,3 +44,3 @@ () => ({

item: Partial<DirectusVersion<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreateContentVersionOutput<Schema, TQuery>, Schema> =>

@@ -47,0 +47,0 @@ () => ({

@@ -8,3 +8,3 @@ import type { DirectusWebhook } from '../../../schema/webhook.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusWebhook<Schema>
Item extends object = DirectusWebhook<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -23,3 +23,3 @@

items: Partial<DirectusWebhook<Schema>>[],
query?: TQuery
query?: TQuery,
): RestCommand<CreateWebhookOutput<Schema, TQuery>[], Schema> =>

@@ -44,3 +44,3 @@ () => ({

item: Partial<DirectusWebhook<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<CreateWebhookOutput<Schema, TQuery>, Schema> =>

@@ -47,0 +47,0 @@ () => ({

@@ -16,3 +16,3 @@ import type { DirectusField } from '../../../schema/field.js';

collection: DirectusField<Schema>['collection'],
field: DirectusField<Schema>['field']
field: DirectusField<Schema>['field'],
): RestCommand<void, Schema> =>

@@ -19,0 +19,0 @@ () => {

@@ -19,3 +19,3 @@ import type { Query } from '../../../types/index.js';

collection: Collection,
keysOrQuery: string[] | number[] | TQuery
keysOrQuery: string[] | number[] | TQuery,
): RestCommand<void, Schema> =>

@@ -57,3 +57,3 @@ () => {

collection: Collection,
key: string | number
key: string | number,
): RestCommand<void, Schema> =>

@@ -60,0 +60,0 @@ () => {

@@ -16,3 +16,3 @@ import type { DirectusRelation } from '../../../schema/relation.js';

collection: DirectusRelation<Schema>['collection'],
field: DirectusRelation<Schema>['field']
field: DirectusRelation<Schema>['field'],
): RestCommand<void, Schema> =>

@@ -19,0 +19,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusActivity } from '../../../schema/activity.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusActivity<Schema>
Item extends object = DirectusActivity<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -20,3 +20,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusActivity<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadActivityOutput<Schema, TQuery>[], Schema> =>

@@ -39,3 +39,3 @@ () => ({

key: DirectusActivity<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadActivityOutput<Schema, TQuery>, Schema> =>

@@ -42,0 +42,0 @@ () => {

@@ -17,6 +17,6 @@ import type { AllCollections } from '../../../index.js';

Collection extends AllCollections<Schema>,
Options extends AggregationOptions<Schema, Collection>
Options extends AggregationOptions<Schema, Collection>,
>(
collection: Collection,
options: Options
options: Options,
): RestCommand<AggregationOutput<Schema, Collection, Options>, Schema> =>

@@ -23,0 +23,0 @@ () => {

@@ -16,3 +16,3 @@ import type { DirectusFile } from '../../../schema/file.js';

key: DirectusFile<Schema>['id'],
query?: AssetsQuery
query?: AssetsQuery,
): RestCommand<ReadableStream<Uint8Array>, Schema> =>

@@ -19,0 +19,0 @@ () => {

@@ -8,3 +8,3 @@ import type { DirectusCollection } from '../../../schema/collection.js';

Schema extends object,
Item extends object = DirectusCollection<Schema>
Item extends object = DirectusCollection<Schema>,
> = ApplyQueryFields<Schema, Item, '*'>;

@@ -31,3 +31,3 @@

<Schema extends object>(
collection: DirectusCollection<Schema>['collection']
collection: DirectusCollection<Schema>['collection'],
): RestCommand<ReadCollectionOutput<Schema>, Schema> =>

@@ -34,0 +34,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusDashboard } from '../../../schema/dashboard.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusDashboard<Schema>
Item extends object = DirectusDashboard<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -20,3 +20,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusDashboard<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadDashboardOutput<Schema, TQuery>[], Schema> =>

@@ -39,3 +39,3 @@ () => ({

key: DirectusDashboard<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadDashboardOutput<Schema, TQuery>, Schema> =>

@@ -42,0 +42,0 @@ () => {

@@ -1,2 +0,2 @@

import type { ExtensionItem } from '../../../types/index.js';
import type { DirectusExtension } from '../../../schema/extension.js';
import type { RestCommand } from '../../types.js';

@@ -9,3 +9,3 @@

export const readExtensions =
<Schema extends object>(): RestCommand<ExtensionItem[], Schema> =>
<Schema extends object>(): RestCommand<DirectusExtension<Schema>[], Schema> =>
() => ({

@@ -12,0 +12,0 @@ path: `/extensions/`,

@@ -32,3 +32,3 @@ import type { DirectusField } from '../../../schema/field.js';

<Schema extends object>(
collection: DirectusField<Schema>['collection']
collection: DirectusField<Schema>['collection'],
): RestCommand<ReadFieldOutput<Schema>[], Schema> =>

@@ -55,3 +55,3 @@ () => {

collection: DirectusField<Schema>['collection'],
field: DirectusField<Schema>['field']
field: DirectusField<Schema>['field'],
): RestCommand<ReadFieldOutput<Schema>, Schema> =>

@@ -58,0 +58,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusFile } from '../../../schema/file.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusFile<Schema>
Item extends object = DirectusFile<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -20,3 +20,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusFile<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadFileOutput<Schema, TQuery>[], Schema> =>

@@ -39,3 +39,3 @@ () => ({

key: DirectusFile<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadFileOutput<Schema, TQuery>, Schema> =>

@@ -42,0 +42,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusFlow } from '../../../schema/flow.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusFlow<Schema>
Item extends object = DirectusFlow<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -20,3 +20,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusFlow<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadFlowOutput<Schema, TQuery>[], Schema> =>

@@ -39,3 +39,3 @@ () => ({

key: DirectusFlow<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadFlowOutput<Schema, TQuery>, Schema> =>

@@ -42,0 +42,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusFolder } from '../../../schema/folder.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusFolder<Schema>
Item extends object = DirectusFolder<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -20,3 +20,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusFolder<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadFolderOutput<Schema, TQuery>[], Schema> =>

@@ -39,3 +39,3 @@ () => ({

key: DirectusFolder<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadFolderOutput<Schema, TQuery>, Schema> =>

@@ -42,0 +42,0 @@ () => {

@@ -8,3 +8,3 @@ import type { ApplyQueryFields, CollectionType, Query, QueryItem, RegularCollections } from '../../../types/index.js';

Collection extends RegularCollections<Schema>,
TQuery extends Query<Schema, CollectionType<Schema, Collection>>
TQuery extends Query<Schema, CollectionType<Schema, Collection>>,
> = ApplyQueryFields<Schema, CollectionType<Schema, Collection>, TQuery['fields']>;

@@ -26,6 +26,6 @@

Collection extends RegularCollections<Schema>,
const TQuery extends Query<Schema, CollectionType<Schema, Collection>>
const TQuery extends Query<Schema, CollectionType<Schema, Collection>>,
>(
collection: Collection,
query?: TQuery
query?: TQuery,
): RestCommand<ReadItemOutput<Schema, Collection, TQuery>[], Schema> =>

@@ -59,7 +59,7 @@ () => {

Collection extends RegularCollections<Schema>,
const TQuery extends QueryItem<Schema, CollectionType<Schema, Collection>>
const TQuery extends QueryItem<Schema, CollectionType<Schema, Collection>>,
>(
collection: Collection,
key: string | number,
query?: TQuery
query?: TQuery,
): RestCommand<ReadItemOutput<Schema, Collection, TQuery>, Schema> =>

@@ -66,0 +66,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusNotification } from '../../../schema/notification.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusNotification<Schema>
Item extends object = DirectusNotification<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -20,3 +20,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusNotification<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadNotificationOutput<Schema, TQuery>[], Schema> =>

@@ -39,3 +39,3 @@ () => ({

key: DirectusNotification<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadNotificationOutput<Schema, TQuery>, Schema> =>

@@ -42,0 +42,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusOperation } from '../../../schema/operation.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusOperation<Schema>
Item extends object = DirectusOperation<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -20,3 +20,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusOperation<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadOperationOutput<Schema, TQuery>[], Schema> =>

@@ -39,3 +39,3 @@ () => ({

key: DirectusOperation<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadOperationOutput<Schema, TQuery>, Schema> =>

@@ -42,0 +42,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusPanel } from '../../../schema/panel.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusPanel<Schema>
Item extends object = DirectusPanel<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -20,3 +20,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusPanel<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadPanelOutput<Schema, TQuery>[], Schema> =>

@@ -39,3 +39,3 @@ () => ({

key: DirectusPanel<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadPanelOutput<Schema, TQuery>, Schema> =>

@@ -42,0 +42,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusPermission } from '../../../schema/permission.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusPermission<Schema>
Item extends object = DirectusPermission<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -20,3 +20,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusPermission<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadPermissionOutput<Schema, TQuery>[], Schema> =>

@@ -39,3 +39,3 @@ () => ({

key: DirectusPermission<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadPermissionOutput<Schema, TQuery>, Schema> =>

@@ -42,0 +42,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusPreset } from '../../../schema/preset.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusPreset<Schema>
Item extends object = DirectusPreset<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -20,3 +20,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusPreset<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadPresetOutput<Schema, TQuery>[], Schema> =>

@@ -39,3 +39,3 @@ () => ({

key: DirectusPreset<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadPresetOutput<Schema, TQuery>, Schema> =>

@@ -42,0 +42,0 @@ () => {

@@ -8,3 +8,3 @@ import type { DirectusRelation } from '../../../schema/relation.js';

Schema extends object,
Item extends object = DirectusRelation<Schema>
Item extends object = DirectusRelation<Schema>,
> = ApplyQueryFields<Schema, Item, '*'>;

@@ -32,3 +32,3 @@

<Schema extends object>(
collection: DirectusRelation<Schema>['collection']
collection: DirectusRelation<Schema>['collection'],
): RestCommand<ReadRelationOutput<Schema>, Schema> =>

@@ -51,3 +51,3 @@ () => ({

collection: DirectusRelation<Schema>['collection'],
field: DirectusRelation<Schema>['field']
field: DirectusRelation<Schema>['field'],
): RestCommand<ReadRelationOutput<Schema, TQuery>, Schema> =>

@@ -54,0 +54,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusRevision } from '../../../schema/revision.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusRevision<Schema>
Item extends object = DirectusRevision<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -20,3 +20,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusRevision<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadRevisionOutput<Schema, TQuery>[], Schema> =>

@@ -39,3 +39,3 @@ () => ({

key: DirectusRevision<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadRevisionOutput<Schema, TQuery>, Schema> =>

@@ -42,0 +42,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusRole } from '../../../schema/role.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusRole<Schema>
Item extends object = DirectusRole<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -20,3 +20,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusRole<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadRoleOutput<Schema, TQuery>[], Schema> =>

@@ -39,3 +39,3 @@ () => ({

key: DirectusRole<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadRoleOutput<Schema, TQuery>, Schema> =>

@@ -42,0 +42,0 @@ () => {

@@ -8,3 +8,3 @@ import type { DirectusSettings } from '../../../schema/settings.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusSettings<Schema>
Item extends object = DirectusSettings<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -21,3 +21,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusSettings<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadSettingOutput<Schema, TQuery>, Schema> =>

@@ -24,0 +24,0 @@ () => ({

@@ -9,3 +9,3 @@ import type { DirectusShare } from '../../../schema/share.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusShare<Schema>
Item extends object = DirectusShare<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -20,3 +20,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusShare<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadShareOutput<Schema, TQuery>[], Schema> =>

@@ -39,3 +39,3 @@ () => ({

key: DirectusShare<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadShareOutput<Schema, TQuery>, Schema> =>

@@ -42,0 +42,0 @@ () => {

@@ -8,3 +8,3 @@ import type { ApplyQueryFields, CollectionType, Query, QueryItem, SingletonCollections } from '../../../types/index.js';

Collection extends SingletonCollections<Schema>,
TQuery extends Query<Schema, Schema[Collection]>
TQuery extends Query<Schema, Schema[Collection]>,
> = ApplyQueryFields<Schema, CollectionType<Schema, Collection>, TQuery['fields']>;

@@ -26,6 +26,6 @@

Collection extends SingletonCollections<Schema>,
const TQuery extends QueryItem<Schema, Schema[Collection]>
const TQuery extends QueryItem<Schema, Schema[Collection]>,
>(
collection: Collection,
query?: TQuery
query?: TQuery,
): RestCommand<ReadSingletonOutput<Schema, Collection, TQuery>, Schema> =>

@@ -32,0 +32,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusTranslation } from '../../../schema/translation.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusTranslation<Schema>
Item extends object = DirectusTranslation<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -20,3 +20,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusTranslation<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadTranslationOutput<Schema, TQuery>[], Schema> =>

@@ -39,3 +39,3 @@ () => ({

key: DirectusTranslation<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadTranslationOutput<Schema, TQuery>, Schema> =>

@@ -42,0 +42,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusUser } from '../../../schema/user.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusUser<Schema>
Item extends object = DirectusUser<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -22,3 +22,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusUser<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadUserOutput<Schema, TQuery>[], Schema> =>

@@ -43,3 +43,3 @@ () => ({

key: DirectusUser<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadUserOutput<Schema, TQuery>, Schema> =>

@@ -65,3 +65,3 @@ () => {

<Schema extends object, const TQuery extends Query<Schema, DirectusUser<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadUserOutput<Schema, TQuery>, Schema> =>

@@ -68,0 +68,0 @@ () => ({

@@ -9,3 +9,3 @@ import type { DirectusVersion } from '../../../schema/version.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusVersion<Schema>
Item extends object = DirectusVersion<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -20,3 +20,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusVersion<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadContentVersionOutput<Schema, TQuery>[], Schema> =>

@@ -39,3 +39,3 @@ () => ({

key: DirectusVersion<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadContentVersionOutput<Schema, TQuery>, Schema> =>

@@ -42,0 +42,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusWebhook } from '../../../schema/webhook.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusWebhook<Schema>
Item extends object = DirectusWebhook<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -20,3 +20,3 @@

<Schema extends object, const TQuery extends Query<Schema, DirectusWebhook<Schema>>>(
query?: TQuery
query?: TQuery,
): RestCommand<ReadWebhookOutput<Schema, TQuery>[], Schema> =>

@@ -39,3 +39,3 @@ () => ({

key: DirectusWebhook<Schema>['id'],
query?: TQuery
query?: TQuery,
): RestCommand<ReadWebhookOutput<Schema, TQuery>, Schema> =>

@@ -42,0 +42,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusActivity } from '../../../schema/activity.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusActivity<Schema>
Item extends object = DirectusActivity<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: Partial<DirectusActivity<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateActivityOutput<Schema, TQuery>, Schema> =>

@@ -28,0 +28,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusCollection } from '../../../schema/collection.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusCollection<Schema>
Item extends object = DirectusCollection<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: NestedPartial<DirectusCollection<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateCollectionOutput<Schema, TQuery>, Schema> =>

@@ -28,0 +28,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusDashboard } from '../../../schema/dashboard.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusDashboard<Schema>
Item extends object = DirectusDashboard<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: Partial<DirectusDashboard<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateDashboardOutput<Schema, TQuery>[], Schema> =>

@@ -51,3 +51,3 @@ () => {

item: Partial<DirectusDashboard<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateDashboardOutput<Schema, TQuery>, Schema> =>

@@ -54,0 +54,0 @@ () => {

@@ -1,2 +0,3 @@

import type { NestedPartial, ExtensionItem } from '../../../types/index.js';
import type { DirectusExtension } from '../../../schema/extension.js';
import type { NestedPartial } from '../../../types/index.js';
import type { RestCommand } from '../../types.js';

@@ -16,4 +17,4 @@ import { throwIfEmpty } from '../../utils/index.js';

name: string,
data: NestedPartial<ExtensionItem>
): RestCommand<ExtensionItem, Schema> =>
data: NestedPartial<DirectusExtension<Schema>>,
): RestCommand<DirectusExtension<Schema>, Schema> =>
() => {

@@ -20,0 +21,0 @@ if (bundle !== null) throwIfEmpty(bundle, 'Bundle cannot be an empty string');

@@ -9,3 +9,3 @@ import type { DirectusField } from '../../../schema/field.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusField<Schema>
Item extends object = DirectusField<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -28,3 +28,3 @@

item: NestedPartial<DirectusField<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateFieldOutput<Schema, TQuery>, Schema> =>

@@ -31,0 +31,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusFile } from '../../../schema/file.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusFile<Schema>
Item extends object = DirectusFile<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: Partial<DirectusFile<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateFileOutput<Schema, TQuery>[], Schema> =>

@@ -51,3 +51,3 @@ () => {

item: Partial<DirectusFile<Schema>> | FormData,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateFileOutput<Schema, TQuery>, Schema> =>

@@ -54,0 +54,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusFlow } from '../../../schema/flow.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusFlow<Schema>
Item extends object = DirectusFlow<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: Partial<DirectusFlow<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateFlowOutput<Schema, TQuery>[], Schema> =>

@@ -51,3 +51,3 @@ () => {

item: Partial<DirectusFlow<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateFlowOutput<Schema, TQuery>, Schema> =>

@@ -54,0 +54,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusFolder } from '../../../schema/folder.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusFolder<Schema>
Item extends object = DirectusFolder<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: Partial<DirectusFolder<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateFolderOutput<Schema, TQuery>[], Schema> =>

@@ -51,3 +51,3 @@ () => {

item: Partial<DirectusFolder<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateFolderOutput<Schema, TQuery>, Schema> =>

@@ -54,0 +54,0 @@ () => {

export * from './activity.js';
export * from './collections.js';
export * from './dashboards.js';
export * from './extensions.js';
export * from './fields.js';

@@ -5,0 +6,0 @@ export * from './files.js';

@@ -8,3 +8,3 @@ import type { ApplyQueryFields, CollectionType, Query, UnpackList } from '../../../types/index.js';

Collection extends keyof Schema,
TQuery extends Query<Schema, Schema[Collection]>
TQuery extends Query<Schema, Schema[Collection]>,
> = ApplyQueryFields<Schema, CollectionType<Schema, Collection>, TQuery['fields']>;

@@ -16,3 +16,3 @@

* @param collection The collection of the items
* @param keys The primary key of the items
* @param keysOrQuery The primary keys or a query
* @param item The item data to update

@@ -22,3 +22,3 @@ * @param query Optional return data query

* @returns Returns the item objects for the updated items.
* @throws Will throw if keys is empty
* @throws Will throw if keysOrQuery is empty
* @throws Will throw if collection is empty

@@ -30,15 +30,25 @@ * @throws Will throw if collection is a core collection

collection: Collection,
keys: string[] | number[],
keysOrQuery: string[] | number[] | Query<Schema, Schema[Collection]>,
item: Partial<UnpackList<Schema[Collection]>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateItemOutput<Schema, Collection, TQuery>[], Schema> =>
() => {
throwIfEmpty(keys, 'Keys cannot be empty');
let payload: Record<string, any> = {};
throwIfEmpty(String(collection), 'Collection cannot be empty');
throwIfCoreCollection(collection, 'Cannot use updateItems for core collections');
if (Array.isArray(keysOrQuery)) {
throwIfEmpty(keysOrQuery, 'keysOrQuery cannot be empty');
payload = { keys: keysOrQuery };
} else {
throwIfEmpty(Object.keys(keysOrQuery), 'keysOrQuery cannot be empty');
payload = { query: keysOrQuery };
}
payload['data'] = item;
return {
path: `/items/${collection as string}`,
params: query ?? {},
body: JSON.stringify({ keys, data: item }),
body: JSON.stringify(payload),
method: 'PATCH',

@@ -66,3 +76,3 @@ };

const TQuery extends Query<Schema, Schema[Collection]>,
Item = UnpackList<Schema[Collection]>
Item = UnpackList<Schema[Collection]>,
>(

@@ -72,3 +82,3 @@ collection: Collection,

item: Partial<Item>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateItemOutput<Schema, Collection, TQuery>, Schema> =>

@@ -75,0 +85,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusNotification } from '../../../schema/notification.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusNotification<Schema>
Item extends object = DirectusNotification<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: Partial<DirectusNotification<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateNotificationOutput<Schema, TQuery>[], Schema> =>

@@ -51,3 +51,3 @@ () => {

item: Partial<DirectusNotification<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateNotificationOutput<Schema, TQuery>, Schema> =>

@@ -54,0 +54,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusOperation } from '../../../schema/operation.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusOperation<Schema>
Item extends object = DirectusOperation<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: Partial<DirectusOperation<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateOperationOutput<Schema, TQuery>[], Schema> =>

@@ -51,3 +51,3 @@ () => {

item: Partial<DirectusOperation<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateOperationOutput<Schema, TQuery>, Schema> =>

@@ -54,0 +54,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusPanel } from '../../../schema/panel.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusPanel<Schema>
Item extends object = DirectusPanel<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: Partial<DirectusPanel<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdatePanelOutput<Schema, TQuery>[], Schema> =>

@@ -51,3 +51,3 @@ () => {

item: Partial<DirectusPanel<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdatePanelOutput<Schema, TQuery>, Schema> =>

@@ -54,0 +54,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusPermission } from '../../../schema/permission.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusPermission<Schema>
Item extends object = DirectusPermission<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: Partial<DirectusPermission<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdatePermissionOutput<Schema, TQuery>[], Schema> =>

@@ -51,3 +51,3 @@ () => {

item: Partial<DirectusPermission<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdatePermissionOutput<Schema, TQuery>, Schema> =>

@@ -54,0 +54,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusPreset } from '../../../schema/preset.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusPreset<Schema>
Item extends object = DirectusPreset<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: Partial<DirectusPreset<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdatePresetOutput<Schema, TQuery>[], Schema> =>

@@ -51,3 +51,3 @@ () => {

item: Partial<DirectusPreset<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdatePresetOutput<Schema, TQuery>, Schema> =>

@@ -54,0 +54,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusRelation } from '../../../schema/relation.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusRelation<Schema>
Item extends object = DirectusRelation<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -26,3 +26,3 @@

item: NestedPartial<DirectusRelation<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateRelationOutput<Schema, TQuery>, Schema> =>

@@ -29,0 +29,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusRole } from '../../../schema/role.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusRole<Schema>
Item extends object = DirectusRole<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: Partial<DirectusRole<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateRoleOutput<Schema, TQuery>[], Schema> =>

@@ -51,3 +51,3 @@ () => {

item: Partial<DirectusRole<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateRoleOutput<Schema, TQuery>, Schema> =>

@@ -54,0 +54,0 @@ () => {

@@ -8,3 +8,3 @@ import type { DirectusSettings } from '../../../schema/settings.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusSettings<Schema>
Item extends object = DirectusSettings<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -21,3 +21,3 @@

item: Partial<DirectusSettings<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateSettingOutput<Schema, TQuery>[], Schema> =>

@@ -24,0 +24,0 @@ () => ({

@@ -9,3 +9,3 @@ import type { DirectusShare } from '../../../schema/share.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusShare<Schema>
Item extends object = DirectusShare<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: Partial<DirectusShare<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateShareOutput<Schema, TQuery>[], Schema> =>

@@ -51,3 +51,3 @@ () => {

item: Partial<DirectusShare<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateShareOutput<Schema, TQuery>, Schema> =>

@@ -54,0 +54,0 @@ () => {

@@ -8,3 +8,3 @@ import type { ApplyQueryFields, CollectionType, Query, SingletonCollections } from '../../../types/index.js';

Collection extends SingletonCollections<Schema>,
TQuery extends Query<Schema, Schema[Collection]>
TQuery extends Query<Schema, Schema[Collection]>,
> = ApplyQueryFields<Schema, CollectionType<Schema, Collection>, TQuery['fields']>;

@@ -27,7 +27,7 @@

const TQuery extends Query<Schema, Schema[Collection]>,
Item = Schema[Collection]
Item = Schema[Collection],
>(
collection: Collection,
item: Partial<Item>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateSingletonOutput<Schema, Collection, TQuery>, Schema> =>

@@ -34,0 +34,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusTranslation } from '../../../schema/translation.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusTranslation<Schema>
Item extends object = DirectusTranslation<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: Partial<DirectusTranslation<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateTranslationOutput<Schema, TQuery>[], Schema> =>

@@ -51,3 +51,3 @@ () => {

item: Partial<DirectusTranslation<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateTranslationOutput<Schema, TQuery>, Schema> =>

@@ -54,0 +54,0 @@ () => {

@@ -9,3 +9,3 @@ import type { ApplyQueryFields, Query } from '../../../types/index.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusUser<Schema>
Item extends object = DirectusUser<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -27,3 +27,3 @@

item: Partial<DirectusUser<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateUserOutput<Schema, TQuery>[], Schema> =>

@@ -55,3 +55,3 @@ () => {

item: Partial<DirectusUser<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateUserOutput<Schema, TQuery>, Schema> =>

@@ -80,3 +80,3 @@ () => {

item: Partial<DirectusUser<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateUserOutput<Schema, TQuery>, Schema> =>

@@ -83,0 +83,0 @@ () => ({

@@ -9,3 +9,3 @@ import type { DirectusVersion } from '../../../schema/version.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusVersion<Schema>
Item extends object = DirectusVersion<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: Partial<DirectusVersion<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateContentVersionOutput<Schema, TQuery>[], Schema> =>

@@ -51,3 +51,3 @@ () => {

item: Partial<DirectusVersion<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateContentVersionOutput<Schema, TQuery>, Schema> =>

@@ -54,0 +54,0 @@ () => {

@@ -9,3 +9,3 @@ import type { DirectusWebhook } from '../../../schema/webhook.js';

TQuery extends Query<Schema, Item>,
Item extends object = DirectusWebhook<Schema>
Item extends object = DirectusWebhook<Schema>,
> = ApplyQueryFields<Schema, Item, TQuery['fields']>;

@@ -25,3 +25,3 @@

item: Partial<DirectusWebhook<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateWebhookOutput<Schema, TQuery>[], Schema> =>

@@ -51,3 +51,3 @@ () => {

item: Partial<DirectusWebhook<Schema>>,
query?: TQuery
query?: TQuery,
): RestCommand<UpdateWebhookOutput<Schema, TQuery>, Schema> =>

@@ -54,0 +54,0 @@ () => {

@@ -16,3 +16,3 @@ import type { Query } from '../../../index.js';

query: TQuery,
file: Partial<DirectusFile<Schema>>
file: Partial<DirectusFile<Schema>>,
): RestCommand<void, Schema> =>

@@ -19,0 +19,0 @@ () => ({

@@ -16,3 +16,3 @@ import type { RestCommand } from '../../types.js';

id: string,
data?: Record<string, string>
data?: Record<string, string>,
): RestCommand<unknown, Schema> =>

@@ -19,0 +19,0 @@ () => {

@@ -14,3 +14,3 @@ import type { RestCommand } from '../../types.js';

share: string,
password: string
password: string,
): RestCommand<

@@ -55,3 +55,3 @@ {

<Schema extends object>(
id: string
id: string,
): RestCommand<

@@ -58,0 +58,0 @@ {

@@ -17,3 +17,3 @@ import type { DirectusVersion } from '../../../schema/version.js';

id: DirectusVersion<Schema>['id'],
item: Partial<Item>
item: Partial<Item>,
): RestCommand<Item, Schema> =>

@@ -41,3 +41,3 @@ () => {

<Schema extends object, Collection extends keyof Schema, Item = UnpackList<Schema[Collection]>>(
id: DirectusVersion<Schema>['id']
id: DirectusVersion<Schema>['id'],
): RestCommand<

@@ -74,3 +74,3 @@ {

mainHash: string,
fields?: (keyof UnpackList<Item>)[]
fields?: (keyof UnpackList<Item>)[],
): RestCommand<string | number, Schema> =>

@@ -77,0 +77,0 @@ () => {

@@ -14,3 +14,3 @@ import type { RequestTransformer } from '../../index.js';

getOptions: RestCommand<Output, Schema>,
extraOptions: RequestTransformer | Partial<RequestInit>
extraOptions: RequestTransformer | Partial<RequestInit>,
): RestCommand<Output, Schema> {

@@ -17,0 +17,0 @@ return () => {

import type { RestCommand } from '../types.js';
export function withSearch<Schema extends object, Output>(
getOptions: RestCommand<Output, Schema>
getOptions: RestCommand<Output, Schema>,
): RestCommand<Output, Schema> {

@@ -6,0 +6,0 @@ return () => {

@@ -5,3 +5,3 @@ import type { RestCommand } from '../types.js';

token: string,
getOptions: RestCommand<Output, Schema>
getOptions: RestCommand<Output, Schema>,
): RestCommand<Output, Schema> {

@@ -8,0 +8,0 @@ return () => {

@@ -16,3 +16,3 @@ import type { AggregationTypes, GroupByFields, Query } from '../../types/index.js';

export const queryToParams = <Schema extends object, Item>(
query: ExtendedQuery<Schema, Item>
query: ExtendedQuery<Schema, Item>,
): Record<string, string> => {

@@ -19,0 +19,0 @@ const params: Record<string, string> = {};

import type { DirectusActivity } from './activity.js';
import type { DirectusCollection } from './collection.js';
import type { DirectusDashboard } from './dashboard.js';
import type { DirectusExtension } from './extension.js';
import type { DirectusField } from './field.js';

@@ -25,2 +26,3 @@ import type { DirectusFile } from './file.js';

directus_dashboards: DirectusDashboard<Schema>[];
directus_extensions: DirectusExtension<Schema>[];
directus_fields: DirectusField<Schema>[];

@@ -27,0 +29,0 @@ directus_files: DirectusFile<Schema>[];

@@ -5,2 +5,3 @@ export * from './activity.js';

export * from './dashboard.js';
export * from './extension.js';
export * from './field.js';

@@ -7,0 +8,0 @@ export * from './file.js';

@@ -69,3 +69,3 @@ import type { ArrayFunctions, DateTimeFunctions, MappedFieldNames, MappedFunctionFields } from './functions.js';

Fields = Collection extends keyof Schema ? keyof UnpackList<GetCollection<Schema, Collection>> : string,
Item = Collection extends keyof Schema ? UnpackList<GetCollection<Schema, Collection>> : object
Item = Collection extends keyof Schema ? UnpackList<GetCollection<Schema, Collection>> : object,
> = {

@@ -83,3 +83,3 @@ aggregate: AggregateRecord<Fields>;

Collection extends AllCollections<Schema>,
Options extends AggregationOptions<Schema, Collection>
Options extends AggregationOptions<Schema, Collection>,
> = ((Options['groupBy'] extends string[]

@@ -111,6 +111,6 @@ ? UnpackList<GetCollection<Schema, Collection>> extends infer Item

: Options['aggregate'][Func] extends string
? Options['aggregate'][Func] extends '*'
? AggregationTypes[Func]['output']
: { [SubField in Options['aggregate'][Func]]: AggregationTypes[Func]['output'] }[Options['aggregate'][Func]]
: never
? Options['aggregate'][Func] extends '*'
? AggregationTypes[Func]['output']
: { [SubField in Options['aggregate'][Func]]: AggregationTypes[Func]['output'] }[Options['aggregate'][Func]]
: never
: never;

@@ -136,3 +136,3 @@ })[];

: Field extends string
? Field
: never;
? Field
: never;

@@ -90,10 +90,10 @@ import type { FunctionFields } from './functions.js';

: UnpackList<Fields> extends infer Field
? Field extends undefined
? keyof Item
: Field extends '*'
? keyof Item
: Field extends string
? Field
: never
: never;
? Field extends undefined
? keyof Item
: Field extends '*'
? keyof Item
: Field extends string
? Field
: never
: never;

@@ -100,0 +100,0 @@ /**

import type { MappedFieldNames } from './functions.js';
import type { FieldOutputMap } from './output.js';
import type { RelationalFields } from './schema.js';

@@ -44,3 +45,6 @@ import type { MergeOptional, UnpackList } from './utils.js';

*/
export type FilterOperators<T> = {
export type FilterOperators<
FieldType,
T = FieldType extends keyof FieldOutputMap ? FieldOutputMap[FieldType] : FieldType,
> = {
_eq?: T;

@@ -47,0 +51,0 @@ _neq?: T;

@@ -5,3 +5,2 @@ export * from './aggregate.js';

export * from './deep.js';
export * from './extensions.js';
export * from './fields.js';

@@ -8,0 +7,0 @@ export * from './filters.js';

@@ -19,3 +19,3 @@ import type { FieldsWildcard, HasManyToAnyRelation, PickRelationalFields } from './fields.js';

RelationalKeys extends keyof RelationalFields = RelationalFields extends never ? never : keyof RelationalFields,
FlatFields extends keyof CollectionItem = FieldsWildcard<CollectionItem, Exclude<Fields, RelationalKeys>>
FlatFields extends keyof CollectionItem = FieldsWildcard<CollectionItem, Exclude<Fields, RelationalKeys>>,
> = IfAny<

@@ -56,3 +56,3 @@ Schema,

// calculated types
Junction = UnpackList<JunctionCollection>
Junction = UnpackList<JunctionCollection>,
> = Junction extends object

@@ -62,12 +62,12 @@ ? PickRelationalFields<FieldsList> extends never

: 'item' extends keyof PickRelationalFields<FieldsList> // do m2a magic
? PickRelationalFields<FieldsList>['item'] extends infer ItemFields
? Omit<ApplyQueryFields<Schema, Omit<Junction, 'item'>, Readonly<UnpackList<FieldsList>>>, 'item'> & {
item: {
[Scope in keyof ItemFields]: Scope extends keyof Schema
? ApplyNestedQueryFields<Schema, Schema[Scope], ItemFields[Scope]>
: never;
}[keyof ItemFields];
}
: never
: ApplyQueryFields<Schema, Junction, Readonly<UnpackList<FieldsList>>> // no items query
? PickRelationalFields<FieldsList>['item'] extends infer ItemFields
? Omit<ApplyQueryFields<Schema, Omit<Junction, 'item'>, Readonly<UnpackList<FieldsList>>>, 'item'> & {
item: {
[Scope in keyof ItemFields]: Scope extends keyof Schema
? ApplyNestedQueryFields<Schema, Schema[Scope], ItemFields[Scope]>
: never;
}[keyof ItemFields];
}
: never
: ApplyQueryFields<Schema, Junction, Readonly<UnpackList<FieldsList>>> // no items query
: never;

@@ -93,3 +93,3 @@

Fields extends keyof Item,
FunctionMap extends Record<string, string>
FunctionMap extends Record<string, string>,
> = {

@@ -99,8 +99,8 @@ [F in Fields as F extends keyof FunctionMap ? FunctionMap[F] : F]: F extends keyof FunctionMap

: Extract<Item[F], keyof FieldOutputMap> extends infer A
? A[] extends never[]
? Item[F]
: A extends keyof FieldOutputMap
? FieldOutputMap[A] | Exclude<Item[F], A>
: Item[F]
: Item[F];
? A[] extends never[]
? Item[F]
: A extends keyof FieldOutputMap
? FieldOutputMap[A] | Exclude<Item[F], A>
: Item[F]
: Item[F];
};

@@ -107,0 +107,0 @@

@@ -67,3 +67,3 @@ import type { QueryDeep } from './deep.js';

export type MergeObjects<A, B extends object> = A extends object ? A & B : never;
export type MergeObjects<A, B> = object extends A ? (object extends B ? A & B : A) : object extends B ? B : never;

@@ -70,0 +70,0 @@ /**

@@ -69,3 +69,3 @@ import type { CoreSchema } from '../schema/index.js';

Collection extends keyof Schema | string,
BuiltinCollection
BuiltinCollection,
> = Collection extends keyof Schema

@@ -87,4 +87,4 @@ ? UnpackList<Schema[Collection]> extends infer Item

: Collection extends keyof Schema
? Schema[Collection]
: never;
? Schema[Collection]
: never;
}

@@ -103,8 +103,8 @@ : never;

Schema extends object,
CollectionName extends AllCollections<Schema>
CollectionName extends AllCollections<Schema>,
> = CollectionName extends keyof CoreSchema<Schema>
? CoreSchema<Schema>[CollectionName]
: CollectionName extends keyof Schema
? Schema[CollectionName]
: never;
? Schema[CollectionName]
: never;

@@ -111,0 +111,0 @@ /**

@@ -18,6 +18,6 @@ /**

: K extends keyof TypeB
? TypeB[K]
: K extends keyof TypeA
? TypeA[K]
: never;
? TypeB[K]
: K extends keyof TypeA
? TypeA[K]
: never;
};

@@ -47,4 +47,4 @@ export type MergeOptional<A, B, TypeA = NeverToUnknown<A>, TypeB = NeverToUnknown<B>> = Partial<

: NestedItem extends object
? NestedPartial<NestedItem> | Exclude<Item[Key], NestedItem>
: Item[Key]
? NestedPartial<NestedItem> | Exclude<Item[Key], NestedItem>
: Item[Key]
: Item[Key];

@@ -51,0 +51,0 @@ };

@@ -15,3 +15,3 @@ import type { FetchInterface } from '../index.js';

options: RequestInit,
fetcher: FetchInterface = globalThis.fetch
fetcher: FetchInterface = globalThis.fetch,
): Promise<Output> => {

@@ -18,0 +18,0 @@ options.headers =

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc