diff --git a/docs/api/cozy-client/README.md b/docs/api/cozy-client/README.md index 9930b549ec..a3e0bcbd7b 100644 --- a/docs/api/cozy-client/README.md +++ b/docs/api/cozy-client/README.md @@ -353,7 +353,7 @@ Dispatches a create action for a document to update CozyClient store from realti *Defined in* -[packages/cozy-client/src/store/realtimes.js:58](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/store/realtimes.js#L58) +[packages/cozy-client/src/store/realtime.js:58](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/store/realtime.js#L58) *** @@ -377,7 +377,7 @@ Dispatches a delete action for a document to update CozyClient store from realti *Defined in* -[packages/cozy-client/src/store/realtimes.js:80](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/store/realtimes.js#L80) +[packages/cozy-client/src/store/realtime.js:80](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/store/realtime.js#L80) *** @@ -401,7 +401,7 @@ Dispatches a update action for a document to update CozyClient store from realti *Defined in* -[packages/cozy-client/src/store/realtimes.js:69](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/store/realtimes.js#L69) +[packages/cozy-client/src/store/realtime.js:69](https://github.com/cozy/cozy-client/blob/master/packages/cozy-client/src/store/realtime.js#L69) *** diff --git a/packages/cozy-client/src/RealTimeQueries.jsx b/packages/cozy-client/src/RealTimeQueries.jsx index c24f7dc72a..5356bd2acb 100644 --- a/packages/cozy-client/src/RealTimeQueries.jsx +++ b/packages/cozy-client/src/RealTimeQueries.jsx @@ -4,7 +4,7 @@ import { dispatchCreate, dispatchDelete, dispatchUpdate -} from './store/realtimes' +} from './store/realtime' /** * Component that subscribes to a doctype changes and keep the diff --git a/packages/cozy-client/src/store/index.js b/packages/cozy-client/src/store/index.js index 772a398b9f..8fb2eb58c2 100644 --- a/packages/cozy-client/src/store/index.js +++ b/packages/cozy-client/src/store/index.js @@ -118,4 +118,4 @@ export { receiveMutationError } from './mutations' -export { dispatchCreate, dispatchUpdate, dispatchDelete } from './realtimes' +export { dispatchCreate, dispatchUpdate, dispatchDelete } from './realtime' diff --git a/packages/cozy-client/src/store/realtimes.js b/packages/cozy-client/src/store/realtime.js similarity index 100% rename from packages/cozy-client/src/store/realtimes.js rename to packages/cozy-client/src/store/realtime.js diff --git a/packages/cozy-client/types/store/index.d.ts b/packages/cozy-client/types/store/index.d.ts index 311203bbe2..ab548cb3a6 100644 --- a/packages/cozy-client/types/store/index.d.ts +++ b/packages/cozy-client/types/store/index.d.ts @@ -21,4 +21,4 @@ export function resetState(): { export { getStateRoot, getCollectionFromState, getDocumentFromState, getQueryFromStore, getQueryFromState, getRawQueryFromState, isQueryExisting } from "./stateHelpers"; export { initQuery, loadQuery, resetQuery, receiveQueryResult, receiveQueryError, executeQueryFromState } from "./queries"; export { initMutation, receiveMutationResult, receiveMutationError } from "./mutations"; -export { dispatchCreate, dispatchUpdate, dispatchDelete } from "./realtimes"; +export { dispatchCreate, dispatchUpdate, dispatchDelete } from "./realtime"; diff --git a/packages/cozy-client/types/store/realtime.d.ts b/packages/cozy-client/types/store/realtime.d.ts new file mode 100644 index 0000000000..21a4bd8672 --- /dev/null +++ b/packages/cozy-client/types/store/realtime.d.ts @@ -0,0 +1,3 @@ +export function dispatchCreate(client: object, doctype: import("../types").Doctype, couchDBDoc: import("../types").CouchDBDocument): void; +export function dispatchUpdate(client: object, doctype: import("../types").Doctype, couchDBDoc: import("../types").CouchDBDocument): void; +export function dispatchDelete(client: object, doctype: import("../types").Doctype, couchDBDoc: import("../types").CouchDBDocument): void;