@spoosh/angular 0.6.5 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,15 +16,14 @@ npm install @spoosh/core @spoosh/angular
|
|
|
16
16
|
|
|
17
17
|
```typescript
|
|
18
18
|
import { Spoosh } from "@spoosh/core";
|
|
19
|
-
import {
|
|
19
|
+
import { create } from "@spoosh/angular";
|
|
20
20
|
import { cachePlugin } from "@spoosh/plugin-cache";
|
|
21
21
|
|
|
22
22
|
const spoosh = new Spoosh<ApiSchema, Error>("/api").use([
|
|
23
23
|
cachePlugin({ staleTime: 5000 }),
|
|
24
24
|
]);
|
|
25
25
|
|
|
26
|
-
export const { injectRead, injectWrite, injectInfiniteRead } =
|
|
27
|
-
createAngularSpoosh(spoosh);
|
|
26
|
+
export const { injectRead, injectWrite, injectInfiniteRead } = create(spoosh);
|
|
28
27
|
```
|
|
29
28
|
|
|
30
29
|
### injectRead
|
package/dist/index.d.mts
CHANGED
|
@@ -359,6 +359,6 @@ type SpooshAngularFunctions<TDefaultError, TSchema, TPlugins extends PluginArray
|
|
|
359
359
|
injectInfiniteRead: ReturnType<typeof createInjectInfiniteRead<TSchema, TDefaultError, TPlugins>>;
|
|
360
360
|
} & MergePluginInstanceApi<TPlugins, TSchema>;
|
|
361
361
|
|
|
362
|
-
declare function
|
|
362
|
+
declare function create<TSchema, TDefaultError, TPlugins extends PluginArray, TApi>(instance: SpooshInstanceShape<TApi, TSchema, TDefaultError, TPlugins>): SpooshAngularFunctions<TDefaultError, TSchema, TPlugins>;
|
|
363
363
|
|
|
364
|
-
export { type AngularOptionsMap, type BaseInfiniteReadOptions, type BaseInfiniteReadResult, type BaseReadOptions, type BaseReadResult, type BaseWriteResult, type EnabledOption, type ExtractMethodBody, type ExtractMethodData, type ExtractMethodError, type ExtractMethodOptions, type ExtractMethodQuery, type ExtractResponseBody, type ExtractResponseParamNames, type ExtractResponseQuery, type InfiniteReadApiClient, type PageContext, type ReadApiClient, type ResponseInputFields, type SpooshInstanceShape, type TriggerOptions, type WriteApiClient, type WriteResponseInputFields,
|
|
364
|
+
export { type AngularOptionsMap, type BaseInfiniteReadOptions, type BaseInfiniteReadResult, type BaseReadOptions, type BaseReadResult, type BaseWriteResult, type EnabledOption, type ExtractMethodBody, type ExtractMethodData, type ExtractMethodError, type ExtractMethodOptions, type ExtractMethodQuery, type ExtractResponseBody, type ExtractResponseParamNames, type ExtractResponseQuery, type InfiniteReadApiClient, type PageContext, type ReadApiClient, type ResponseInputFields, type SpooshInstanceShape, type TriggerOptions, type WriteApiClient, type WriteResponseInputFields, create };
|
package/dist/index.d.ts
CHANGED
|
@@ -359,6 +359,6 @@ type SpooshAngularFunctions<TDefaultError, TSchema, TPlugins extends PluginArray
|
|
|
359
359
|
injectInfiniteRead: ReturnType<typeof createInjectInfiniteRead<TSchema, TDefaultError, TPlugins>>;
|
|
360
360
|
} & MergePluginInstanceApi<TPlugins, TSchema>;
|
|
361
361
|
|
|
362
|
-
declare function
|
|
362
|
+
declare function create<TSchema, TDefaultError, TPlugins extends PluginArray, TApi>(instance: SpooshInstanceShape<TApi, TSchema, TDefaultError, TPlugins>): SpooshAngularFunctions<TDefaultError, TSchema, TPlugins>;
|
|
363
363
|
|
|
364
|
-
export { type AngularOptionsMap, type BaseInfiniteReadOptions, type BaseInfiniteReadResult, type BaseReadOptions, type BaseReadResult, type BaseWriteResult, type EnabledOption, type ExtractMethodBody, type ExtractMethodData, type ExtractMethodError, type ExtractMethodOptions, type ExtractMethodQuery, type ExtractResponseBody, type ExtractResponseParamNames, type ExtractResponseQuery, type InfiniteReadApiClient, type PageContext, type ReadApiClient, type ResponseInputFields, type SpooshInstanceShape, type TriggerOptions, type WriteApiClient, type WriteResponseInputFields,
|
|
364
|
+
export { type AngularOptionsMap, type BaseInfiniteReadOptions, type BaseInfiniteReadResult, type BaseReadOptions, type BaseReadResult, type BaseWriteResult, type EnabledOption, type ExtractMethodBody, type ExtractMethodData, type ExtractMethodError, type ExtractMethodOptions, type ExtractMethodQuery, type ExtractResponseBody, type ExtractResponseParamNames, type ExtractResponseQuery, type InfiniteReadApiClient, type PageContext, type ReadApiClient, type ResponseInputFields, type SpooshInstanceShape, type TriggerOptions, type WriteApiClient, type WriteResponseInputFields, create };
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
|
-
|
|
23
|
+
create: () => create
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(src_exports);
|
|
26
26
|
|
|
@@ -821,8 +821,8 @@ function createInjectInfiniteRead(options) {
|
|
|
821
821
|
};
|
|
822
822
|
}
|
|
823
823
|
|
|
824
|
-
// src/
|
|
825
|
-
function
|
|
824
|
+
// src/create/index.ts
|
|
825
|
+
function create(instance) {
|
|
826
826
|
const { api, stateManager, eventEmitter, pluginExecutor } = instance;
|
|
827
827
|
const injectRead = createInjectRead({
|
|
828
828
|
api,
|
package/dist/index.mjs
CHANGED
|
@@ -823,8 +823,8 @@ function createInjectInfiniteRead(options) {
|
|
|
823
823
|
};
|
|
824
824
|
}
|
|
825
825
|
|
|
826
|
-
// src/
|
|
827
|
-
function
|
|
826
|
+
// src/create/index.ts
|
|
827
|
+
function create(instance) {
|
|
828
828
|
const { api, stateManager, eventEmitter, pluginExecutor } = instance;
|
|
829
829
|
const injectRead = createInjectRead({
|
|
830
830
|
api,
|
|
@@ -868,5 +868,5 @@ function createAngularSpoosh(instance) {
|
|
|
868
868
|
};
|
|
869
869
|
}
|
|
870
870
|
export {
|
|
871
|
-
|
|
871
|
+
create
|
|
872
872
|
};
|