jamespot-front-business 1.0.3 → 1.1.3

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/dist/types.d.ts CHANGED
@@ -1,43 +1,372 @@
1
- import * as jamespot_user_api from 'jamespot-user-api';
2
- import { Bookmark, SearchQuery, ApiWrapper, SearchQueryResult, ListFilterSpec, PagingResults, JamespotUserApi } from 'jamespot-user-api';
3
1
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
4
- import { Action } from '@reduxjs/toolkit';
2
+ import { EntityState, Action, Dispatch as Dispatch$1, PayloadAction } from '@reduxjs/toolkit';
3
+ import * as _reduxjs_toolkit_dist_tsHelpers from '@reduxjs/toolkit/dist/tsHelpers';
4
+ import * as jamespot_user_api from 'jamespot-user-api';
5
+ import { Application as Application$1, JamespotUserApi, ReservationList, BookableAssetList, AssetReservationConfiguration, Model as Model$1, JLandMap, JLicenseAvailable, jUserList } from 'jamespot-user-api';
6
+ import * as redux from 'redux';
5
7
  import { Dispatch } from 'redux';
6
- import { ExtractDispatchExtensions } from '@reduxjs/toolkit/src/tsHelpers';
8
+ import * as immer_dist_internal from 'immer/dist/internal';
9
+
10
+ type ApplicationRootState = {
11
+ entities: {
12
+ applications: EntityState<Application$1>;
13
+ };
14
+ };
15
+ declare const Application: {
16
+ slice: _reduxjs_toolkit.Slice<EntityState<Application$1>, {
17
+ addOne: {
18
+ <S extends EntityState<Application$1>>(state: _reduxjs_toolkit_dist_tsHelpers.IsAny<S, EntityState<Application$1>, S>, entity: Application$1): S;
19
+ <S_1 extends EntityState<Application$1>>(state: _reduxjs_toolkit_dist_tsHelpers.IsAny<S_1, EntityState<Application$1>, S_1>, action: {
20
+ payload: Application$1;
21
+ type: string;
22
+ }): S_1;
23
+ };
24
+ addMany: {
25
+ <S_2 extends EntityState<Application$1>>(state: _reduxjs_toolkit_dist_tsHelpers.IsAny<S_2, EntityState<Application$1>, S_2>, entities: readonly Application$1[] | Record<_reduxjs_toolkit.EntityId, Application$1>): S_2;
26
+ <S_3 extends EntityState<Application$1>>(state: _reduxjs_toolkit_dist_tsHelpers.IsAny<S_3, EntityState<Application$1>, S_3>, entities: {
27
+ payload: readonly Application$1[] | Record<_reduxjs_toolkit.EntityId, Application$1>;
28
+ type: string;
29
+ }): S_3;
30
+ };
31
+ setAll: {
32
+ <S_4 extends EntityState<Application$1>>(state: _reduxjs_toolkit_dist_tsHelpers.IsAny<S_4, EntityState<Application$1>, S_4>, entities: readonly Application$1[] | Record<_reduxjs_toolkit.EntityId, Application$1>): S_4;
33
+ <S_5 extends EntityState<Application$1>>(state: _reduxjs_toolkit_dist_tsHelpers.IsAny<S_5, EntityState<Application$1>, S_5>, entities: {
34
+ payload: readonly Application$1[] | Record<_reduxjs_toolkit.EntityId, Application$1>;
35
+ type: string;
36
+ }): S_5;
37
+ };
38
+ }, "applications">;
39
+ actions: {
40
+ addOne: _reduxjs_toolkit.ActionCreatorWithPayload<Application$1, "applications/addOne">;
41
+ addMany: _reduxjs_toolkit.ActionCreatorWithPayload<readonly Application$1[] | Record<_reduxjs_toolkit.EntityId, Application$1>, "applications/addMany">;
42
+ setAll: _reduxjs_toolkit.ActionCreatorWithPayload<readonly Application$1[] | Record<_reduxjs_toolkit.EntityId, Application$1>, "applications/setAll">;
43
+ };
44
+ selectors: _reduxjs_toolkit.EntitySelectors<Application$1, ApplicationRootState>;
45
+ };
7
46
 
8
- interface BookmarkState {
9
- entities: Array<Bookmark>;
47
+ type RootState = Partial<AssetReservationRootState | ApplicationRootState | ModelRootState | ToastRootState>;
48
+ type RootDispatch = Dispatch<Action>;
49
+ type ThunkApiConfig<T> = {
50
+ dispatch: any;
51
+ state: RootState & T;
52
+ extra: {
53
+ jApi: JamespotUserApi;
54
+ };
55
+ };
56
+
57
+ type ReservationForm = {
58
+ date: string;
59
+ hourStart: string;
60
+ hourEnd: string;
61
+ uriUser?: string;
62
+ description?: string;
63
+ };
64
+
65
+ type Loading = {
10
66
  loading: 'idle' | 'pending';
67
+ };
68
+
69
+ type ReservationState = Loading & {
70
+ entities: ReservationList[];
11
71
  nbResults: number;
72
+ form: ReservationForm;
73
+ };
74
+ interface ReservationRootState {
75
+ reservation: ReservationState;
12
76
  }
13
- interface BookmarkRootState {
14
- bookmark: BookmarkState;
77
+
78
+ type BookableAssetState = Loading & {
79
+ entities: BookableAssetList[];
80
+ nbResults: number;
81
+ };
82
+ interface BookableAssetRootState {
83
+ bookableAsset: BookableAssetState;
15
84
  }
16
- declare const bookmarkSlice: _reduxjs_toolkit.Slice<BookmarkState, {}, "bookmark">;
17
- declare const fetchBookmarks: _reduxjs_toolkit.AsyncThunk<jamespot_user_api.ApiWrapper<jamespot_user_api.PagingResults<Bookmark>, string[]>, void, {}>;
18
- declare const selectBookmarkList: (state: BookmarkRootState) => Bookmark[];
19
- declare const selectBookmarkLoading: (state: BookmarkRootState) => "idle" | "pending";
20
85
 
21
- interface IJApi {
22
- search: {
23
- searchQuery: (query: SearchQuery, signal?: AbortSignal) => Promise<ApiWrapper<SearchQueryResult>>;
86
+ type Configuration = AssetReservationConfiguration & Loading;
87
+ interface ConfigurationRootState {
88
+ configuration: Configuration;
89
+ }
90
+
91
+ type AssetReservationRootState = {
92
+ assetReservation: BookableAssetRootState & ConfigurationRootState & ReservationRootState;
93
+ };
94
+ declare const AssetReservation: {
95
+ slice: {
96
+ name: "assetReservation";
97
+ reducer: redux.Reducer<redux.CombinedState<{
98
+ bookableAsset: BookableAssetState;
99
+ configuration: jamespot_user_api.AssetReservationConfiguration & Loading;
100
+ reservation: ReservationState;
101
+ }>, redux.AnyAction>;
24
102
  };
25
- bookmark: {
26
- getList: (filterSpecs: ListFilterSpec) => Promise<ApiWrapper<PagingResults<Bookmark>, string[]>>;
103
+ actions: {
104
+ fetchBookableAsset: _reduxjs_toolkit.AsyncThunk<jamespot_user_api.ApiPagingResults<jamespot_user_api.BookableAssetList, string[]>, void, {
105
+ dispatch: any;
106
+ state: RootState & BookableAssetRootState;
107
+ extra: {
108
+ jApi: jamespot_user_api.JamespotUserApi;
109
+ };
110
+ rejectValue?: unknown;
111
+ serializedErrorType?: unknown;
112
+ pendingMeta?: unknown;
113
+ fulfilledMeta?: unknown;
114
+ rejectedMeta?: unknown;
115
+ }>;
116
+ fetchConfiguration: _reduxjs_toolkit.AsyncThunk<jamespot_user_api.ApiWrapper<jamespot_user_api.AssetReservationConfiguration, string[]>, void, {
117
+ dispatch: any;
118
+ state: RootState & jamespot_user_api.AssetReservationConfiguration & Loading;
119
+ extra: {
120
+ jApi: jamespot_user_api.JamespotUserApi;
121
+ };
122
+ rejectValue?: unknown;
123
+ serializedErrorType?: unknown;
124
+ pendingMeta?: unknown;
125
+ fulfilledMeta?: unknown;
126
+ rejectedMeta?: unknown;
127
+ }>;
128
+ fetchReservation: _reduxjs_toolkit.AsyncThunk<jamespot_user_api.ApiPagingResults<jamespot_user_api.ReservationList, jamespot_user_api.BaseMessages>, "history" | undefined, {
129
+ dispatch: any;
130
+ state: RootState & ReservationRootState;
131
+ extra: {
132
+ jApi: jamespot_user_api.JamespotUserApi;
133
+ };
134
+ rejectValue?: unknown;
135
+ serializedErrorType?: unknown;
136
+ pendingMeta?: unknown;
137
+ fulfilledMeta?: unknown;
138
+ rejectedMeta?: unknown;
139
+ }>;
140
+ setForm: _reduxjs_toolkit.ActionCreatorWithPayload<ReservationForm, "reservation/setForm">;
141
+ resetForm: _reduxjs_toolkit.ActionCreatorWithoutPayload<"reservation/resetForm">;
142
+ removeReservation: _reduxjs_toolkit.ActionCreatorWithPayload<number, "reservation/removeReservation">;
143
+ };
144
+ selectors: {
145
+ configuration: (state: AssetReservationRootState) => jamespot_user_api.AssetReservationConfiguration & Loading;
146
+ bookableAssetEntities: (state: AssetReservationRootState) => jamespot_user_api.BookableAssetList[];
147
+ bookableAssetLoading: (state: AssetReservationRootState) => "idle" | "pending";
148
+ reservationEntities: (state: AssetReservationRootState) => jamespot_user_api.ReservationList[];
149
+ reservationLoading: (state: AssetReservationRootState) => "idle" | "pending";
150
+ reservationForm: (state: AssetReservationRootState) => ReservationForm;
27
151
  };
28
- }
29
- declare type ExtraThunkType = {
30
- jApi: IJApi;
31
152
  };
32
153
 
33
- declare type RootState = Partial<BookmarkRootState>;
34
- declare type RootDispatch = ExtractDispatchExtensions<unknown> & Dispatch<Action>;
35
- declare type ThunkApiConfig<T> = {
36
- dispatch: RootDispatch;
37
- state: RootState & T;
38
- extra: {
39
- jApi: JamespotUserApi;
154
+ type ModelRootState = {
155
+ entities: {
156
+ models: EntityState<Model$1>;
157
+ };
158
+ };
159
+ declare const Model: {
160
+ slice: _reduxjs_toolkit.Slice<EntityState<Model$1<string>>, {
161
+ addOne: {
162
+ <S extends EntityState<Model$1<string>>>(state: _reduxjs_toolkit_dist_tsHelpers.IsAny<S, EntityState<Model$1<string>>, S>, entity: Model$1<string>): S;
163
+ <S_1 extends EntityState<Model$1<string>>>(state: _reduxjs_toolkit_dist_tsHelpers.IsAny<S_1, EntityState<Model$1<string>>, S_1>, action: {
164
+ payload: Model$1<string>;
165
+ type: string;
166
+ }): S_1;
167
+ };
168
+ addMany: {
169
+ <S_2 extends EntityState<Model$1<string>>>(state: _reduxjs_toolkit_dist_tsHelpers.IsAny<S_2, EntityState<Model$1<string>>, S_2>, entities: readonly Model$1<string>[] | Record<_reduxjs_toolkit.EntityId, Model$1<string>>): S_2;
170
+ <S_3 extends EntityState<Model$1<string>>>(state: _reduxjs_toolkit_dist_tsHelpers.IsAny<S_3, EntityState<Model$1<string>>, S_3>, entities: {
171
+ payload: readonly Model$1<string>[] | Record<_reduxjs_toolkit.EntityId, Model$1<string>>;
172
+ type: string;
173
+ }): S_3;
174
+ };
175
+ setAll: {
176
+ <S_4 extends EntityState<Model$1<string>>>(state: _reduxjs_toolkit_dist_tsHelpers.IsAny<S_4, EntityState<Model$1<string>>, S_4>, entities: readonly Model$1<string>[] | Record<_reduxjs_toolkit.EntityId, Model$1<string>>): S_4;
177
+ <S_5 extends EntityState<Model$1<string>>>(state: _reduxjs_toolkit_dist_tsHelpers.IsAny<S_5, EntityState<Model$1<string>>, S_5>, entities: {
178
+ payload: readonly Model$1<string>[] | Record<_reduxjs_toolkit.EntityId, Model$1<string>>;
179
+ type: string;
180
+ }): S_5;
181
+ };
182
+ }, "models">;
183
+ actions: {
184
+ addOne: _reduxjs_toolkit.ActionCreatorWithPayload<Model$1<string>, "models/addOne">;
185
+ addMany: _reduxjs_toolkit.ActionCreatorWithPayload<readonly Model$1<string>[] | Record<_reduxjs_toolkit.EntityId, Model$1<string>>, "models/addMany">;
186
+ setAll: _reduxjs_toolkit.ActionCreatorWithPayload<readonly Model$1<string>[] | Record<_reduxjs_toolkit.EntityId, Model$1<string>>, "models/setAll">;
187
+ };
188
+ selectors: _reduxjs_toolkit.EntitySelectors<Model$1<string>, ModelRootState>;
189
+ };
190
+
191
+ type ToastType = 'success' | 'warning' | 'error';
192
+ type ToastRootState = {
193
+ toasts: EntityState<ToastEntity>;
194
+ };
195
+ type ToastEntity = {
196
+ id: string;
197
+ label: string;
198
+ description?: string;
199
+ timeout: number;
200
+ type: ToastType;
201
+ };
202
+ declare const actions: {
203
+ addMessage: ({ id, ...toast }: Toast, type?: ToastType, timeout?: number) => (dispatch: Dispatch$1) => string;
204
+ success: (toast: Toast, timeout?: number) => (dispatch: Dispatch$1) => string;
205
+ warning: (toast: Toast, timeout?: number) => (dispatch: Dispatch$1) => string;
206
+ error: (toast: Toast, timeout?: number) => (dispatch: Dispatch$1) => string;
207
+ };
208
+ type Toast = {
209
+ id?: string;
210
+ label: string;
211
+ description?: string;
212
+ };
213
+ declare const Toast: {
214
+ slice: _reduxjs_toolkit.Slice<EntityState<ToastEntity>, {
215
+ addOne: {
216
+ <S extends EntityState<ToastEntity>>(state: _reduxjs_toolkit_dist_tsHelpers.IsAny<S, EntityState<ToastEntity>, S>, entity: ToastEntity): S;
217
+ <S_1 extends EntityState<ToastEntity>>(state: _reduxjs_toolkit_dist_tsHelpers.IsAny<S_1, EntityState<ToastEntity>, S_1>, action: {
218
+ payload: ToastEntity;
219
+ type: string;
220
+ }): S_1;
221
+ };
222
+ removeOne: {
223
+ <S_2 extends EntityState<ToastEntity>>(state: _reduxjs_toolkit_dist_tsHelpers.IsAny<S_2, EntityState<ToastEntity>, S_2>, key: _reduxjs_toolkit.EntityId): S_2;
224
+ <S_3 extends EntityState<ToastEntity>>(state: _reduxjs_toolkit_dist_tsHelpers.IsAny<S_3, EntityState<ToastEntity>, S_3>, key: {
225
+ payload: _reduxjs_toolkit.EntityId;
226
+ type: string;
227
+ }): S_3;
228
+ };
229
+ }, "toasts">;
230
+ actions: {
231
+ addOne: _reduxjs_toolkit.ActionCreatorWithPayload<ToastEntity, "toasts/addOne">;
232
+ removeOne: _reduxjs_toolkit.ActionCreatorWithPayload<_reduxjs_toolkit.EntityId, "toasts/removeOne">;
233
+ addMessage: ({ id, ...toast }: Toast, type?: ToastType, timeout?: number) => (dispatch: Dispatch$1) => string;
234
+ success: (toast: Toast, timeout?: number) => (dispatch: Dispatch$1) => string;
235
+ warning: (toast: Toast, timeout?: number) => (dispatch: Dispatch$1) => string;
236
+ error: (toast: Toast, timeout?: number) => (dispatch: Dispatch$1) => string;
237
+ };
238
+ selectors: _reduxjs_toolkit.EntitySelectors<ToastEntity, ToastRootState>;
239
+ };
240
+
241
+ type JLandMapFront = JLandMap & {
242
+ urlToJland?: string;
243
+ };
244
+ type JLandState = {
245
+ maps: Array<JLandMapFront>;
246
+ availableLicenses: JLicenseAvailable;
247
+ loading: 'idle' | 'pending';
248
+ loadingAvailableLicenses: 'idle' | 'pending';
249
+ loadingLicenseOperation: {
250
+ [key: number]: 'idle' | 'pending' | undefined;
251
+ };
252
+ loadingMapDeletion: 'idle' | 'pending';
253
+ };
254
+ type JLandRootState = {
255
+ jland: JLandState;
256
+ };
257
+ declare const jland: {
258
+ slice: _reduxjs_toolkit.Slice<{
259
+ maps: JLandMapFront[];
260
+ availableLicenses: JLicenseAvailable;
261
+ loading: "idle" | "pending";
262
+ loadingAvailableLicenses: "idle" | "pending";
263
+ loadingLicenseOperation: {
264
+ [key: number]: "idle" | "pending" | undefined;
265
+ };
266
+ loadingMapDeletion: "idle" | "pending";
267
+ }, {}, "jland">;
268
+ actions: {
269
+ assignLicense: _reduxjs_toolkit.AsyncThunk<boolean | undefined, {
270
+ map: JLandMapFront;
271
+ retrieveAllMaps: boolean;
272
+ }, {
273
+ dispatch: any;
274
+ state: RootState & JLandRootState;
275
+ extra: {
276
+ jApi: jamespot_user_api.JamespotUserApi;
277
+ };
278
+ rejectValue?: unknown;
279
+ serializedErrorType?: unknown;
280
+ pendingMeta?: unknown;
281
+ fulfilledMeta?: unknown;
282
+ rejectedMeta?: unknown;
283
+ }>;
284
+ unassignLicense: _reduxjs_toolkit.AsyncThunk<boolean | undefined, {
285
+ map: JLandMapFront;
286
+ retrieveAllMaps: boolean;
287
+ }, {
288
+ dispatch: any;
289
+ state: RootState & JLandRootState;
290
+ extra: {
291
+ jApi: jamespot_user_api.JamespotUserApi;
292
+ };
293
+ rejectValue?: unknown;
294
+ serializedErrorType?: unknown;
295
+ pendingMeta?: unknown;
296
+ fulfilledMeta?: unknown;
297
+ rejectedMeta?: unknown;
298
+ }>;
299
+ deleteJlandMap: _reduxjs_toolkit.AsyncThunk<boolean | undefined, {
300
+ map: JLandMapFront;
301
+ retrieveAllMaps: boolean;
302
+ }, {
303
+ dispatch: any;
304
+ state: RootState & JLandRootState;
305
+ extra: {
306
+ jApi: jamespot_user_api.JamespotUserApi;
307
+ };
308
+ rejectValue?: unknown;
309
+ serializedErrorType?: unknown;
310
+ pendingMeta?: unknown;
311
+ fulfilledMeta?: unknown;
312
+ rejectedMeta?: unknown;
313
+ }>;
314
+ fetchJLandMaps: _reduxjs_toolkit.AsyncThunk<JLandMapFront[] | undefined, {
315
+ jlandUrlBase: string;
316
+ retrieveAllMaps: boolean;
317
+ }, {
318
+ dispatch: any;
319
+ state: RootState & JLandRootState;
320
+ extra: {
321
+ jApi: jamespot_user_api.JamespotUserApi;
322
+ };
323
+ rejectValue?: unknown;
324
+ serializedErrorType?: unknown;
325
+ pendingMeta?: unknown;
326
+ fulfilledMeta?: unknown;
327
+ rejectedMeta?: unknown;
328
+ }>;
329
+ fetchJLandAvailableLicenses: _reduxjs_toolkit.AsyncThunk<JLicenseAvailable | undefined, void, {
330
+ dispatch: any;
331
+ state: RootState & JLandRootState;
332
+ extra: {
333
+ jApi: jamespot_user_api.JamespotUserApi;
334
+ };
335
+ rejectValue?: unknown;
336
+ serializedErrorType?: unknown;
337
+ pendingMeta?: unknown;
338
+ fulfilledMeta?: unknown;
339
+ rejectedMeta?: unknown;
340
+ }>;
341
+ };
342
+ selectors: {
343
+ selectJLandMaps: (state: JLandRootState) => JLandMapFront[];
344
+ selectJLandAvailableLicenses: (state: JLandRootState) => JLicenseAvailable;
345
+ };
346
+ utils: {
347
+ buildUrlToJland: (map: JLandMap, hostname: string, urlBase: string) => string;
348
+ };
349
+ };
350
+
351
+ type UserCurrentRootState = {
352
+ userCurrent: jUserList;
353
+ };
354
+ declare const slice: _reduxjs_toolkit.Slice<jUserList, {
355
+ init: (_: immer_dist_internal.WritableDraft<jUserList>, { payload }: PayloadAction<jUserList>) => jUserList;
356
+ }, "userCurrent">;
357
+ declare const UserCurrent: {
358
+ slice: _reduxjs_toolkit.Slice<jUserList, {
359
+ init: (_: immer_dist_internal.WritableDraft<jUserList>, { payload }: PayloadAction<jUserList>) => jUserList;
360
+ }, "userCurrent">;
361
+ actions: {
362
+ init: _reduxjs_toolkit.ActionCreatorWithPayload<jUserList, "userCurrent/init">;
363
+ };
364
+ selectors: {
365
+ get: (state: UserCurrentRootState) => jUserList;
366
+ };
367
+ utils: {
368
+ isAdmin: (userCurrent: jUserList) => boolean;
40
369
  };
41
370
  };
42
371
 
43
- export { BookmarkRootState, BookmarkState, ExtraThunkType, IJApi, RootDispatch, RootState, ThunkApiConfig, bookmarkSlice, fetchBookmarks, selectBookmarkList, selectBookmarkLoading };
372
+ export { Application, ApplicationRootState, AssetReservation, AssetReservationRootState, JLandMapFront, JLandRootState, JLandState, Model, ModelRootState, ReservationForm, RootDispatch, RootState, ThunkApiConfig, Toast, ToastRootState, UserCurrent, UserCurrentRootState, actions, jland, slice };
package/package.json CHANGED
@@ -1,50 +1,51 @@
1
1
  {
2
- "name": "jamespot-front-business",
3
- "version": "1.0.3",
4
- "description": "typescript utils",
5
- "main": "dist/cjs.js",
6
- "module": "dist/esm.js",
7
- "types": "dist/types.d.ts",
8
- "repository": {
9
- "type": "git",
10
- "url": "git+ssh://git@github.com/Jamespot/jamespot-front-business.git"
11
- },
12
- "keywords": [
13
- "typescript",
14
- "jamespot",
15
- "api",
16
- "redux"
17
- ],
18
- "author": "Jamespot",
19
- "devDependencies": {
20
- "@changesets/cli": "^2.24.3",
21
- "@rollup/plugin-commonjs": "^22.0.2",
22
- "@rollup/plugin-typescript": "^8.3.3",
23
- "@types/jest": "^28.1.4",
24
- "@typescript-eslint/eslint-plugin": "^5.30.5",
25
- "@typescript-eslint/parser": "^5.30.5",
26
- "eslint": "^8.19.0",
27
- "eslint-config-prettier": "^8.5.0",
28
- "jest": "^28.1.2",
29
- "jest-environment-jsdom": "^29.0.1",
30
- "prettier": "^2.7.1",
31
- "rollup": "^2.75.7",
32
- "rollup-plugin-dts": "^4.2.2",
33
- "ts-jest": "^28.0.5",
34
- "tslib": "^2.4.0",
35
- "typescript": "^4.7.4"
36
- },
37
- "dependencies": {
38
- "@reduxjs/toolkit": "^1.8.5",
39
- "react-redux": "^8.0.2",
40
- "redux": "^4.2.0",
41
- "jamespot-user-api": "../jamespot-user-api"
42
- },
43
- "scripts": {
44
- "build": "rollup -c",
45
- "watch": "rollup -c -w",
46
- "format": "prettier --write --plugin-search-dir=. .",
47
- "lint": "eslint --ignore-path .gitignore .",
48
- "test": "jest"
49
- }
50
- }
2
+ "name": "jamespot-front-business",
3
+ "version": "1.1.3",
4
+ "description": "typescript utils",
5
+ "main": "dist/cjs.js",
6
+ "module": "dist/esm.js",
7
+ "types": "dist/types.d.ts",
8
+ "scripts": {
9
+ "build": "rollup -c",
10
+ "watch": "rollup -c -w",
11
+ "format": "prettier --write --plugin-search-dir=. .",
12
+ "lint": "eslint --ignore-path .gitignore .",
13
+ "test": "jest",
14
+ "test:one": "jest --coverage=0"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+ssh://git@github.com/Jamespot/jamespot-front-business.git"
19
+ },
20
+ "keywords": [
21
+ "typescript",
22
+ "jamespot",
23
+ "api",
24
+ "redux"
25
+ ],
26
+ "author": "Jamespot",
27
+ "devDependencies": {
28
+ "@changesets/cli": "^2.24.3",
29
+ "@rollup/plugin-commonjs": "^22.0.2",
30
+ "@rollup/plugin-typescript": "^8.3.3",
31
+ "@types/jest": "^28.1.4",
32
+ "@typescript-eslint/eslint-plugin": "^5.30.5",
33
+ "@typescript-eslint/parser": "^5.30.5",
34
+ "eslint": "^8.19.0",
35
+ "eslint-config-prettier": "^8.5.0",
36
+ "jest": "^28.1.2",
37
+ "jest-environment-jsdom": "^29.0.1",
38
+ "prettier": "^2.7.1",
39
+ "rollup": "^2.75.7",
40
+ "rollup-plugin-dts": "^4.2.2",
41
+ "ts-jest": "^28.0.5",
42
+ "tslib": "^2.4.0",
43
+ "typescript": "^4.7.4"
44
+ },
45
+ "dependencies": {
46
+ "@reduxjs/toolkit": "1.9.0",
47
+ "jamespot-user-api": "^1.0.89",
48
+ "react-redux": "7.2.9",
49
+ "redux": "4.2.0"
50
+ }
51
+ }
package/tsconfig.json CHANGED
@@ -15,17 +15,27 @@
15
15
  "sourceMap": true, // enables the use of source maps for debuggers and error reporting etc
16
16
  "sourceRoot": "/", // Specify the location where a debugger should locate TypeScript files instead of relative source locations.
17
17
 
18
+
18
19
  // Strict Checks
19
- "alwaysStrict": true, // Ensures that your files are parsed in the ECMAScript strict mode, and emit “use strict” for each source file.
20
+ "strict": true,
20
21
  "allowUnreachableCode": false, // pick up dead code paths
22
+ "allowUnusedLabels": false,
23
+ "alwaysStrict": true, // Ensures that your files are parsed in the ECMAScript strict mode, and emit “use strict” for each source file.
24
+ "exactOptionalPropertyTypes": true,
25
+ "noFallthroughCasesInSwitch": true,
21
26
  "noImplicitAny": true, // In some cases where no type annotations are present, TypeScript will fall back to a type of any for a variable when it cannot infer the type.
22
- "strictNullChecks": true, // When strictNullChecks is true, null and undefined have their own distinct types and you’ll get a type error if you try to use them where a concrete value is expected.
23
-
24
- // Linter Checks
27
+ "noImplicitOverride": false,
28
+ "noImplicitThis": true,
25
29
  "noImplicitReturns": true,
30
+ "noPropertyAccessFromIndexSignature": false,
26
31
  "noUncheckedIndexedAccess": true, // accessing index must always check for undefined
27
32
  "noUnusedLocals": true, // Report errors on unused local variables.
28
- "noUnusedParameters": true // Report errors on unused parameters in functions
33
+ "noUnusedParameters": true, // Report errors on unused parameters in functions
34
+ "strictBindCallApply": true,
35
+ "strictFunctionTypes": true,
36
+ "strictNullChecks": true, // When strictNullChecks is true, null and undefined have their own distinct types and you’ll get a type error if you try to use them where a concrete value is expected.
37
+ "strictPropertyInitialization": true,
38
+ "useUnknownInCatchVariables": true
29
39
  },
30
40
  "include": ["./**/*.ts"],
31
41
  "exclude": ["node_modules/**/*"]