@buildery/ts-api-kit 6.2.2 → 7.0.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/dist/Api.d.ts +21 -21
- package/dist/Api.js +38 -42
- package/dist/Api.js.map +1 -1
- package/dist/ApiConfigs.js +12 -16
- package/dist/ApiConfigs.js.map +1 -1
- package/dist/compose/index.d.ts +1 -1
- package/dist/compose/index.js +1 -17
- package/dist/compose/index.js.map +1 -1
- package/dist/compose/useSingleton.d.ts +1 -1
- package/dist/compose/useSingleton.js +6 -10
- package/dist/compose/useSingleton.js.map +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +8 -11
- package/dist/constants.js.map +1 -1
- package/dist/features/api/AbstractApi.d.ts +1 -1
- package/dist/features/api/AbstractApi.js +4 -9
- package/dist/features/api/AbstractApi.js.map +1 -1
- package/dist/features/api/index.d.ts +1 -1
- package/dist/features/api/index.js +1 -17
- package/dist/features/api/index.js.map +1 -1
- package/dist/features/auth/errors/AuthError.js +1 -5
- package/dist/features/auth/errors/AuthError.js.map +1 -1
- package/dist/features/auth/errors/index.d.ts +1 -1
- package/dist/features/auth/errors/index.js +1 -17
- package/dist/features/auth/errors/index.js.map +1 -1
- package/dist/features/auth/index.d.ts +3 -3
- package/dist/features/auth/index.js +3 -19
- package/dist/features/auth/index.js.map +1 -1
- package/dist/features/auth/services/AuthAxiosService.js +10 -15
- package/dist/features/auth/services/AuthAxiosService.js.map +1 -1
- package/dist/features/auth/services/AuthService.d.ts +2 -2
- package/dist/features/auth/services/AuthService.js +5 -9
- package/dist/features/auth/services/AuthService.js.map +1 -1
- package/dist/features/auth/services/AuthTokensService.d.ts +5 -5
- package/dist/features/auth/services/AuthTokensService.js +14 -18
- package/dist/features/auth/services/AuthTokensService.js.map +1 -1
- package/dist/features/auth/services/index.d.ts +3 -3
- package/dist/features/auth/services/index.js +3 -19
- package/dist/features/auth/services/index.js.map +1 -1
- package/dist/features/auth/types/AuthActivateUser.js +1 -2
- package/dist/features/auth/types/AuthApiTokens.js +1 -2
- package/dist/features/auth/types/AuthChangePassword.js +1 -2
- package/dist/features/auth/types/AuthCode.js +1 -2
- package/dist/features/auth/types/AuthConfirmResetPassword.js +1 -2
- package/dist/features/auth/types/AuthSignIn.js +1 -2
- package/dist/features/auth/types/AuthUserJWT.js +1 -2
- package/dist/features/auth/types/index.d.ts +7 -7
- package/dist/features/auth/types/index.js +7 -23
- package/dist/features/auth/types/index.js.map +1 -1
- package/dist/features/callout/Callout.d.ts +2 -2
- package/dist/features/callout/Callout.js +11 -14
- package/dist/features/callout/Callout.js.map +1 -1
- package/dist/features/callout/CalloutMiddlewareService.d.ts +1 -1
- package/dist/features/callout/CalloutMiddlewareService.js +6 -10
- package/dist/features/callout/CalloutMiddlewareService.js.map +1 -1
- package/dist/features/callout/CalloutMiddlewares.d.ts +1 -1
- package/dist/features/callout/CalloutMiddlewares.js +9 -13
- package/dist/features/callout/CalloutMiddlewares.js.map +1 -1
- package/dist/features/callout/Calloutable.d.ts +2 -2
- package/dist/features/callout/Calloutable.js +6 -10
- package/dist/features/callout/Calloutable.js.map +1 -1
- package/dist/features/callout/index.d.ts +5 -5
- package/dist/features/callout/index.js +5 -21
- package/dist/features/callout/index.js.map +1 -1
- package/dist/features/callout/types.d.ts +2 -2
- package/dist/features/callout/types.js +1 -2
- package/dist/features/crud/index.d.ts +2 -2
- package/dist/features/crud/index.js +2 -18
- package/dist/features/crud/index.js.map +1 -1
- package/dist/features/crud/operations/abstract/AbstractCRUDApi.d.ts +2 -2
- package/dist/features/crud/operations/abstract/AbstractCRUDApi.js +3 -6
- package/dist/features/crud/operations/abstract/AbstractCRUDApi.js.map +1 -1
- package/dist/features/crud/operations/abstract/index.d.ts +1 -1
- package/dist/features/crud/operations/abstract/index.js +1 -17
- package/dist/features/crud/operations/abstract/index.js.map +1 -1
- package/dist/features/crud/operations/index.d.ts +2 -2
- package/dist/features/crud/operations/index.js +2 -18
- package/dist/features/crud/operations/index.js.map +1 -1
- package/dist/features/crud/operations/operations/Create.d.ts +1 -1
- package/dist/features/crud/operations/operations/Create.js +5 -10
- package/dist/features/crud/operations/operations/Create.js.map +1 -1
- package/dist/features/crud/operations/operations/CreateBulk.d.ts +1 -1
- package/dist/features/crud/operations/operations/CreateBulk.js +5 -9
- package/dist/features/crud/operations/operations/CreateBulk.js.map +1 -1
- package/dist/features/crud/operations/operations/DeleteByFilters.d.ts +1 -1
- package/dist/features/crud/operations/operations/DeleteByFilters.js +5 -9
- package/dist/features/crud/operations/operations/DeleteByFilters.js.map +1 -1
- package/dist/features/crud/operations/operations/DeleteById.d.ts +1 -1
- package/dist/features/crud/operations/operations/DeleteById.js +6 -10
- package/dist/features/crud/operations/operations/DeleteById.js.map +1 -1
- package/dist/features/crud/operations/operations/DeleteByIds.d.ts +1 -1
- package/dist/features/crud/operations/operations/DeleteByIds.js +7 -11
- package/dist/features/crud/operations/operations/DeleteByIds.js.map +1 -1
- package/dist/features/crud/operations/operations/GetAll.d.ts +1 -1
- package/dist/features/crud/operations/operations/GetAll.js +6 -10
- package/dist/features/crud/operations/operations/GetAll.js.map +1 -1
- package/dist/features/crud/operations/operations/GetByFilters.d.ts +2 -2
- package/dist/features/crud/operations/operations/GetByFilters.js +6 -10
- package/dist/features/crud/operations/operations/GetByFilters.js.map +1 -1
- package/dist/features/crud/operations/operations/GetById.d.ts +1 -1
- package/dist/features/crud/operations/operations/GetById.js +6 -10
- package/dist/features/crud/operations/operations/GetById.js.map +1 -1
- package/dist/features/crud/operations/operations/GetByIds.d.ts +1 -1
- package/dist/features/crud/operations/operations/GetByIds.js +6 -10
- package/dist/features/crud/operations/operations/GetByIds.js.map +1 -1
- package/dist/features/crud/operations/operations/Update.d.ts +1 -1
- package/dist/features/crud/operations/operations/Update.js +6 -10
- package/dist/features/crud/operations/operations/Update.js.map +1 -1
- package/dist/features/crud/operations/operations/UpdateBulk.d.ts +1 -1
- package/dist/features/crud/operations/operations/UpdateBulk.js +6 -10
- package/dist/features/crud/operations/operations/UpdateBulk.js.map +1 -1
- package/dist/features/crud/operations/operations/Upsert.d.ts +1 -1
- package/dist/features/crud/operations/operations/Upsert.js +6 -10
- package/dist/features/crud/operations/operations/Upsert.js.map +1 -1
- package/dist/features/crud/operations/operations/UpsertBulk.d.ts +1 -1
- package/dist/features/crud/operations/operations/UpsertBulk.js +6 -10
- package/dist/features/crud/operations/operations/UpsertBulk.js.map +1 -1
- package/dist/features/crud/operations/operations/index.d.ts +13 -13
- package/dist/features/crud/operations/operations/index.js +13 -29
- package/dist/features/crud/operations/operations/index.js.map +1 -1
- package/dist/features/crud/sync/compose/index.d.ts +1 -1
- package/dist/features/crud/sync/compose/index.js +1 -17
- package/dist/features/crud/sync/compose/index.js.map +1 -1
- package/dist/features/crud/sync/compose/useCrudSync.d.ts +4 -4
- package/dist/features/crud/sync/compose/useCrudSync.js +34 -33
- package/dist/features/crud/sync/compose/useCrudSync.js.map +1 -1
- package/dist/features/crud/sync/constants/CrudSyncAction.js +2 -5
- package/dist/features/crud/sync/constants/CrudSyncAction.js.map +1 -1
- package/dist/features/crud/sync/constants/CrudSyncConstants.js +1 -4
- package/dist/features/crud/sync/constants/CrudSyncConstants.js.map +1 -1
- package/dist/features/crud/sync/constants/index.d.ts +2 -2
- package/dist/features/crud/sync/constants/index.js +2 -18
- package/dist/features/crud/sync/constants/index.js.map +1 -1
- package/dist/features/crud/sync/error/CrudSyncError.js +1 -5
- package/dist/features/crud/sync/error/CrudSyncError.js.map +1 -1
- package/dist/features/crud/sync/error/index.d.ts +1 -1
- package/dist/features/crud/sync/error/index.js +1 -17
- package/dist/features/crud/sync/error/index.js.map +1 -1
- package/dist/features/crud/sync/index.d.ts +6 -6
- package/dist/features/crud/sync/index.js +6 -22
- package/dist/features/crud/sync/index.js.map +1 -1
- package/dist/features/crud/sync/middlewares/PushCrudEvent.d.ts +3 -3
- package/dist/features/crud/sync/middlewares/PushCrudEvent.js +6 -10
- package/dist/features/crud/sync/middlewares/PushCrudEvent.js.map +1 -1
- package/dist/features/crud/sync/middlewares/index.d.ts +1 -1
- package/dist/features/crud/sync/middlewares/index.js +1 -17
- package/dist/features/crud/sync/middlewares/index.js.map +1 -1
- package/dist/features/crud/sync/services/CrudSyncService.d.ts +1 -1
- package/dist/features/crud/sync/services/CrudSyncService.js +3 -7
- package/dist/features/crud/sync/services/CrudSyncService.js.map +1 -1
- package/dist/features/crud/sync/services/index.d.ts +1 -1
- package/dist/features/crud/sync/services/index.js +1 -17
- package/dist/features/crud/sync/services/index.js.map +1 -1
- package/dist/features/crud/sync/sync/CrudSyncCreate.d.ts +2 -2
- package/dist/features/crud/sync/sync/CrudSyncCreate.js +6 -10
- package/dist/features/crud/sync/sync/CrudSyncCreate.js.map +1 -1
- package/dist/features/crud/sync/sync/CrudSyncDelete.d.ts +2 -2
- package/dist/features/crud/sync/sync/CrudSyncDelete.js +6 -10
- package/dist/features/crud/sync/sync/CrudSyncDelete.js.map +1 -1
- package/dist/features/crud/sync/sync/CrudSyncUpdate.d.ts +2 -2
- package/dist/features/crud/sync/sync/CrudSyncUpdate.js +6 -10
- package/dist/features/crud/sync/sync/CrudSyncUpdate.js.map +1 -1
- package/dist/features/crud/sync/sync/CrudSyncUpsert.d.ts +2 -2
- package/dist/features/crud/sync/sync/CrudSyncUpsert.js +5 -9
- package/dist/features/crud/sync/sync/CrudSyncUpsert.js.map +1 -1
- package/dist/features/crud/sync/sync/abstract/AbstractCrudSync.d.ts +1 -1
- package/dist/features/crud/sync/sync/abstract/AbstractCrudSync.js +4 -8
- package/dist/features/crud/sync/sync/abstract/AbstractCrudSync.js.map +1 -1
- package/dist/features/crud/sync/sync/abstract/index.d.ts +1 -1
- package/dist/features/crud/sync/sync/abstract/index.js +1 -17
- package/dist/features/crud/sync/sync/abstract/index.js.map +1 -1
- package/dist/features/crud/sync/sync/index.d.ts +5 -5
- package/dist/features/crud/sync/sync/index.js +5 -21
- package/dist/features/crud/sync/sync/index.js.map +1 -1
- package/dist/features/index.d.ts +4 -4
- package/dist/features/index.js +4 -20
- package/dist/features/index.js.map +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.js +14 -33
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.js +1 -0
- package/dist/micro/auth/AuthApi.d.ts +1 -1
- package/dist/micro/auth/AuthApi.js +20 -24
- package/dist/micro/auth/AuthApi.js.map +1 -1
- package/dist/micro/auth/WorkspaceApi.d.ts +1 -1
- package/dist/micro/auth/WorkspaceApi.js +6 -10
- package/dist/micro/auth/WorkspaceApi.js.map +1 -1
- package/dist/micro/auth/index.d.ts +2 -2
- package/dist/micro/auth/index.js +2 -18
- package/dist/micro/auth/index.js.map +1 -1
- package/dist/micro/auth/types/InitWorkspace.d.ts +1 -1
- package/dist/micro/auth/types/InitWorkspace.js +1 -2
- package/dist/micro/auth/types/index.d.ts +1 -1
- package/dist/micro/auth/types/index.js +1 -17
- package/dist/micro/auth/types/index.js.map +1 -1
- package/dist/micro/blueprint/types.js +1 -2
- package/dist/micro/index.d.ts +4 -4
- package/dist/micro/index.js +4 -20
- package/dist/micro/index.js.map +1 -1
- package/dist/micro/query/FieldApi.d.ts +2 -2
- package/dist/micro/query/FieldApi.js +7 -11
- package/dist/micro/query/FieldApi.js.map +1 -1
- package/dist/micro/query/SObjectApi.d.ts +1 -1
- package/dist/micro/query/SObjectApi.js +4 -8
- package/dist/micro/query/SObjectApi.js.map +1 -1
- package/dist/micro/query/error/ObjectApiError.js +1 -5
- package/dist/micro/query/error/ObjectApiError.js.map +1 -1
- package/dist/micro/query/error/index.d.ts +1 -1
- package/dist/micro/query/error/index.js +1 -17
- package/dist/micro/query/error/index.js.map +1 -1
- package/dist/micro/query/index.d.ts +4 -4
- package/dist/micro/query/index.js +4 -20
- package/dist/micro/query/index.js.map +1 -1
- package/dist/micro/query/types/FieldType.js +2 -5
- package/dist/micro/query/types/FieldType.js.map +1 -1
- package/dist/micro/query/types/PicklistValue.js +1 -2
- package/dist/micro/query/types/SObject.d.ts +1 -1
- package/dist/micro/query/types/SObject.js +1 -2
- package/dist/micro/query/types/SObjectField.d.ts +3 -3
- package/dist/micro/query/types/SObjectField.js +1 -2
- package/dist/micro/query/types/index.d.ts +4 -4
- package/dist/micro/query/types/index.js +4 -20
- package/dist/micro/query/types/index.js.map +1 -1
- package/dist/micro/security/PermissionApi.d.ts +2 -2
- package/dist/micro/security/PermissionApi.js +7 -11
- package/dist/micro/security/PermissionApi.js.map +1 -1
- package/dist/micro/security/PermissionCategoryApi.d.ts +1 -1
- package/dist/micro/security/PermissionCategoryApi.js +4 -8
- package/dist/micro/security/PermissionCategoryApi.js.map +1 -1
- package/dist/micro/security/PermissionSetApi.d.ts +2 -2
- package/dist/micro/security/PermissionSetApi.js +6 -10
- package/dist/micro/security/PermissionSetApi.js.map +1 -1
- package/dist/micro/security/TeamApi.d.ts +2 -2
- package/dist/micro/security/TeamApi.js +6 -10
- package/dist/micro/security/TeamApi.js.map +1 -1
- package/dist/micro/security/index.d.ts +5 -5
- package/dist/micro/security/index.js +5 -21
- package/dist/micro/security/index.js.map +1 -1
- package/dist/micro/security/types/CalculatedPermissionAssignment.js +1 -2
- package/dist/micro/security/types/Permission.js +1 -2
- package/dist/micro/security/types/PermissionAssignment.js +1 -2
- package/dist/micro/security/types/PermissionCategory.js +1 -2
- package/dist/micro/security/types/PermissionDefinition.js +1 -2
- package/dist/micro/security/types/PermissionGroup.js +1 -2
- package/dist/micro/security/types/PermissionSet.d.ts +1 -1
- package/dist/micro/security/types/PermissionSet.js +1 -2
- package/dist/micro/security/types/PermissionSetAssignment.js +1 -2
- package/dist/micro/security/types/Team.d.ts +1 -1
- package/dist/micro/security/types/Team.js +1 -2
- package/dist/micro/security/types/TeamAssignment.js +1 -2
- package/dist/micro/security/types/index.d.ts +10 -10
- package/dist/micro/security/types/index.js +10 -26
- package/dist/micro/security/types/index.js.map +1 -1
- package/dist/micro/workspace/ModuleApi.d.ts +2 -2
- package/dist/micro/workspace/ModuleApi.js +7 -11
- package/dist/micro/workspace/ModuleApi.js.map +1 -1
- package/dist/micro/workspace/index.d.ts +2 -2
- package/dist/micro/workspace/index.js +2 -18
- package/dist/micro/workspace/index.js.map +1 -1
- package/dist/micro/workspace/types/CreateUser.js +1 -2
- package/dist/micro/workspace/types/EUserStatus.js +2 -5
- package/dist/micro/workspace/types/EUserStatus.js.map +1 -1
- package/dist/micro/workspace/types/Module.d.ts +1 -1
- package/dist/micro/workspace/types/Module.js +1 -2
- package/dist/micro/workspace/types/ModuleAction.js +1 -2
- package/dist/micro/workspace/types/User.d.ts +3 -3
- package/dist/micro/workspace/types/User.js +1 -2
- package/dist/micro/workspace/types/index.d.ts +5 -5
- package/dist/micro/workspace/types/index.js +5 -21
- package/dist/micro/workspace/types/index.js.map +1 -1
- package/dist/services/MapService.js +2 -6
- package/dist/services/MapService.js.map +1 -1
- package/dist/services/ResponseService.d.ts +1 -1
- package/dist/services/ResponseService.js +5 -12
- package/dist/services/ResponseService.js.map +1 -1
- package/dist/services/UrlService.d.ts +1 -1
- package/dist/services/UrlService.js +5 -10
- package/dist/services/UrlService.js.map +1 -1
- package/dist/services/index.d.ts +3 -3
- package/dist/services/index.js +3 -19
- package/dist/services/index.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +4 -7
- package/dist/types.js.map +1 -1
- package/package.json +15 -12
- package/dist/features/callout/decorators/Calloutable.d.ts +0 -3
- package/dist/features/callout/decorators/Calloutable.js +0 -20
- package/dist/features/callout/decorators/Calloutable.js.map +0 -1
- package/dist/features/callout/decorators/index.d.ts +0 -1
- package/dist/features/callout/decorators/index.js +0 -18
- package/dist/features/callout/decorators/index.js.map +0 -1
- package/dist/features/callout/types/ApiCalloutMiddleware.d.ts +0 -2
- package/dist/features/callout/types/ApiCalloutMiddleware.js +0 -3
- package/dist/features/callout/types/ApiCalloutMiddleware.js.map +0 -1
- package/dist/features/callout/types/index.d.ts +0 -1
- package/dist/features/callout/types/index.js +0 -18
- package/dist/features/callout/types/index.js.map +0 -1
- package/dist/micro/security/types/IPermission.d.ts +0 -10
- package/dist/micro/security/types/IPermission.js +0 -3
- package/dist/micro/security/types/IPermission.js.map +0 -1
- package/dist/micro/security/types/IPermissionAssignment.d.ts +0 -6
- package/dist/micro/security/types/IPermissionAssignment.js +0 -3
- package/dist/micro/security/types/IPermissionAssignment.js.map +0 -1
- package/dist/micro/security/types/IPermissionCategory.d.ts +0 -5
- package/dist/micro/security/types/IPermissionCategory.js +0 -3
- package/dist/micro/security/types/IPermissionCategory.js.map +0 -1
- package/dist/micro/security/types/IPermissionDefinition.d.ts +0 -6
- package/dist/micro/security/types/IPermissionDefinition.js +0 -3
- package/dist/micro/security/types/IPermissionDefinition.js.map +0 -1
- package/dist/micro/security/types/IPermissionGroup.d.ts +0 -4
- package/dist/micro/security/types/IPermissionGroup.js +0 -3
- package/dist/micro/security/types/IPermissionGroup.js.map +0 -1
- package/dist/micro/security/types/IPermissionSet.d.ts +0 -6
- package/dist/micro/security/types/IPermissionSet.js +0 -3
- package/dist/micro/security/types/IPermissionSet.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/types/ApiQueryOptions.d.ts +0 -14
- package/dist/types/ApiQueryOptions.js +0 -3
- package/dist/types/ApiQueryOptions.js.map +0 -1
- package/dist/types/Constructable.d.ts +0 -3
- package/dist/types/Constructable.js +0 -3
- package/dist/types/Constructable.js.map +0 -1
- package/dist/types/Constructor.d.ts +0 -1
- package/dist/types/Constructor.js +0 -3
- package/dist/types/Constructor.js.map +0 -1
- package/dist/types/HasApiName.d.ts +0 -3
- package/dist/types/HasApiName.js +0 -3
- package/dist/types/HasApiName.js.map +0 -1
- package/dist/types/HasCallouts.d.ts +0 -4
- package/dist/types/HasCallouts.js +0 -3
- package/dist/types/HasCallouts.js.map +0 -1
- package/dist/types/HasDBId.d.ts +0 -3
- package/dist/types/HasDBId.js +0 -3
- package/dist/types/HasDBId.js.map +0 -1
- package/dist/types/HasDescription.d.ts +0 -3
- package/dist/types/HasDescription.js +0 -3
- package/dist/types/HasDescription.js.map +0 -1
- package/dist/types/HasEmail.d.ts +0 -3
- package/dist/types/HasEmail.js +0 -3
- package/dist/types/HasEmail.js.map +0 -1
- package/dist/types/HasId.d.ts +0 -3
- package/dist/types/HasId.js +0 -3
- package/dist/types/HasId.js.map +0 -1
- package/dist/types/HasLabel.d.ts +0 -3
- package/dist/types/HasLabel.js +0 -3
- package/dist/types/HasLabel.js.map +0 -1
- package/dist/types/HasMode.d.ts +0 -3
- package/dist/types/HasMode.js +0 -3
- package/dist/types/HasMode.js.map +0 -1
- package/dist/types/HasNamespace.d.ts +0 -3
- package/dist/types/HasNamespace.js +0 -3
- package/dist/types/HasNamespace.js.map +0 -1
- package/dist/types/HasOrder.d.ts +0 -3
- package/dist/types/HasOrder.js +0 -3
- package/dist/types/HasOrder.js.map +0 -1
- package/dist/types/index.d.ts +0 -11
- package/dist/types/index.js +0 -28
- package/dist/types/index.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApiCalloutMiddleware } from "../../../callout";
|
|
2
|
-
import { AbstractCRUDApi } from "../../operations";
|
|
3
|
-
import { CrudSyncAction } from "../constants";
|
|
1
|
+
import { ApiCalloutMiddleware } from "../../../callout/index.js";
|
|
2
|
+
import { AbstractCRUDApi } from "../../operations/index.js";
|
|
3
|
+
import { CrudSyncAction } from "../constants/index.js";
|
|
4
4
|
export declare const PushCrudEvent: (action: CrudSyncAction) => ApiCalloutMiddleware<AbstractCRUDApi>;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
if (!ApiConfigs_1.ApiConfigs.event.eventBus)
|
|
8
|
-
return;
|
|
9
|
-
return (response) => ApiConfigs_1.ApiConfigs.event.eventBus.publish(services_1.CrudSyncService.getObjectChannel(apiInstance.objectName), action, response === null || response === void 0 ? void 0 : response.data);
|
|
1
|
+
import { CrudSyncService } from "../services/index.js";
|
|
2
|
+
import { ApiConfigs } from "../../../../ApiConfigs.js";
|
|
3
|
+
export const PushCrudEvent = (action) => (apiInstance) => {
|
|
4
|
+
if (!ApiConfigs.event.eventBus)
|
|
5
|
+
return () => null;
|
|
6
|
+
return (response) => ApiConfigs.event.eventBus?.publish(CrudSyncService.getObjectChannel(apiInstance.objectName), action, response?.data);
|
|
10
7
|
};
|
|
11
|
-
exports.PushCrudEvent = PushCrudEvent;
|
|
12
8
|
//# sourceMappingURL=PushCrudEvent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PushCrudEvent.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/middlewares/PushCrudEvent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PushCrudEvent.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/middlewares/PushCrudEvent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAGrD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAsB,EAAwC,EAAE,CAAC,CAAC,WAAgB,EAA+B,EAAE;IAC/I,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,QAAQ;QAAE,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC;IAElD,OAAO,CAAC,QAAa,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAC1D,eAAe,CAAC,gBAAgB,CAAC,WAAW,CAAC,UAAU,CAAW,EAClE,MAAM,EACN,QAAQ,EAAE,IAAI,CACf,CAAC;AACJ,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './PushCrudEvent';
|
|
1
|
+
export * from './PushCrudEvent.js';
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./PushCrudEvent"), exports);
|
|
1
|
+
export * from './PushCrudEvent.js';
|
|
18
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/middlewares/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/middlewares/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.CrudSyncService = void 0;
|
|
4
|
-
const constants_1 = require("../constants");
|
|
5
|
-
class CrudSyncService {
|
|
1
|
+
import { CrudEventChannel } from "../constants/index.js";
|
|
2
|
+
export class CrudSyncService {
|
|
6
3
|
static getObjectChannel(objectApi) {
|
|
7
4
|
return objectApi
|
|
8
|
-
? `${
|
|
5
|
+
? `${CrudEventChannel}__${objectApi}`
|
|
9
6
|
: undefined;
|
|
10
7
|
}
|
|
11
8
|
}
|
|
12
|
-
exports.CrudSyncService = CrudSyncService;
|
|
13
9
|
//# sourceMappingURL=CrudSyncService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudSyncService.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/services/CrudSyncService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CrudSyncService.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/services/CrudSyncService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AAEvD,MAAM,OAAO,eAAe;IAE1B,MAAM,CAAC,gBAAgB,CAAC,SAAiB;QACvC,OAAO,SAAS;YACd,CAAC,CAAC,GAAG,gBAAgB,KAAK,SAAS,EAAE;YACrC,CAAC,CAAC,SAAS,CAAC;IAChB,CAAC;CAEF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './CrudSyncService';
|
|
1
|
+
export * from './CrudSyncService.js';
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./CrudSyncService"), exports);
|
|
1
|
+
export * from './CrudSyncService.js';
|
|
18
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/services/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractCrudSync } from "./abstract";
|
|
2
|
-
import { HasDBId } from "../../../../types";
|
|
1
|
+
import { AbstractCrudSync } from "./abstract/index.js";
|
|
2
|
+
import { HasDBId } from "../../../../types.js";
|
|
3
3
|
export declare class CrudSyncCreate extends AbstractCrudSync {
|
|
4
4
|
targetArrayResponseObject(target: Array<HasDBId>, response: HasDBId): void;
|
|
5
5
|
targetArrayResponseArray(target: Array<HasDBId>, response: Array<HasDBId>): void;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const error_1 = require("../error");
|
|
6
|
-
const services_1 = require("../../../../services");
|
|
7
|
-
class CrudSyncCreate extends abstract_1.AbstractCrudSync {
|
|
1
|
+
import { AbstractCrudSync } from "./abstract/index.js";
|
|
2
|
+
import { CrudSyncError } from "../error/index.js";
|
|
3
|
+
import { MapService } from "../../../../services/index.js";
|
|
4
|
+
export class CrudSyncCreate extends AbstractCrudSync {
|
|
8
5
|
targetArrayResponseObject(target, response) {
|
|
9
6
|
const isExist = target.findIndex(t => t._id === response._id);
|
|
10
7
|
if (isExist)
|
|
@@ -12,7 +9,7 @@ class CrudSyncCreate extends abstract_1.AbstractCrudSync {
|
|
|
12
9
|
target.push(response);
|
|
13
10
|
}
|
|
14
11
|
targetArrayResponseArray(target, response) {
|
|
15
|
-
const targetById =
|
|
12
|
+
const targetById = MapService.getMapByProperty('_id', target);
|
|
16
13
|
response.forEach(r => {
|
|
17
14
|
if (targetById.has(r._id))
|
|
18
15
|
return;
|
|
@@ -20,8 +17,7 @@ class CrudSyncCreate extends abstract_1.AbstractCrudSync {
|
|
|
20
17
|
});
|
|
21
18
|
}
|
|
22
19
|
targetObjectResponseObject() {
|
|
23
|
-
throw new
|
|
20
|
+
throw new CrudSyncError('Unreal insert an object to the object');
|
|
24
21
|
}
|
|
25
22
|
}
|
|
26
|
-
exports.CrudSyncCreate = CrudSyncCreate;
|
|
27
23
|
//# sourceMappingURL=CrudSyncCreate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudSyncCreate.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/sync/CrudSyncCreate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CrudSyncCreate.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/sync/CrudSyncCreate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,UAAU,EAAC,MAAM,+BAA+B,CAAC;AAEzD,MAAM,OAAO,cAAe,SAAQ,gBAAgB;IAE3C,yBAAyB,CAAC,MAAsB,EAAE,QAAiB;QACxE,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,CAAC;QAE9D,IAAI,OAAO;YAAE,OAAO;QAEpB,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;IAEM,wBAAwB,CAAC,MAAsB,EAAE,QAAwB;QAC9E,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAE9D,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACnB,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;gBAAE,OAAO;YAElC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,0BAA0B;QAC/B,MAAM,IAAI,aAAa,CAAC,uCAAuC,CAAC,CAAC;IACnE,CAAC;CAEF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractCrudSync } from "./abstract";
|
|
2
|
-
import { HasDBId } from "../../../../types";
|
|
1
|
+
import { AbstractCrudSync } from "./abstract/index.js";
|
|
2
|
+
import { HasDBId } from "../../../../types.js";
|
|
3
3
|
export declare class CrudSyncDelete extends AbstractCrudSync {
|
|
4
4
|
targetArrayResponseObject(target: Array<HasDBId>, response: HasDBId): void;
|
|
5
5
|
targetArrayResponseArray(target: Array<HasDBId>, response: Array<HasDBId>): void;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const error_1 = require("../error");
|
|
6
|
-
const services_1 = require("../../../../services");
|
|
7
|
-
class CrudSyncDelete extends abstract_1.AbstractCrudSync {
|
|
1
|
+
import { AbstractCrudSync } from "./abstract/index.js";
|
|
2
|
+
import { CrudSyncError } from "../error/index.js";
|
|
3
|
+
import { MapService } from "../../../../services/index.js";
|
|
4
|
+
export class CrudSyncDelete extends AbstractCrudSync {
|
|
8
5
|
targetArrayResponseObject(target, response) {
|
|
9
6
|
const targetIndex = target.findIndex(record => record._id === response._id);
|
|
10
7
|
if (targetIndex === -1)
|
|
@@ -12,14 +9,13 @@ class CrudSyncDelete extends abstract_1.AbstractCrudSync {
|
|
|
12
9
|
target.splice(targetIndex, 1);
|
|
13
10
|
}
|
|
14
11
|
targetArrayResponseArray(target, response) {
|
|
15
|
-
const responseById =
|
|
12
|
+
const responseById = MapService.getMapByProperty('_id', response);
|
|
16
13
|
const filtered = target.filter(t => !responseById.get(t._id));
|
|
17
14
|
target.length = 0;
|
|
18
15
|
target.push(...filtered);
|
|
19
16
|
}
|
|
20
17
|
targetObjectResponseObject() {
|
|
21
|
-
throw new
|
|
18
|
+
throw new CrudSyncError('Unreal delete an object from the object');
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
|
-
exports.CrudSyncDelete = CrudSyncDelete;
|
|
25
21
|
//# sourceMappingURL=CrudSyncDelete.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudSyncDelete.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/sync/CrudSyncDelete.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CrudSyncDelete.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/sync/CrudSyncDelete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAC,UAAU,EAAC,MAAM,+BAA+B,CAAC;AAEzD,MAAM,OAAO,cAAe,SAAQ,gBAAgB;IAE3C,yBAAyB,CAAC,MAAsB,EAAE,QAAiB;QACxE,MAAM,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,CAAC;QAE5E,IAAI,WAAW,KAAK,CAAC,CAAC;YAAE,OAAO;QAE/B,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IAChC,CAAC;IAEM,wBAAwB,CAAC,MAAsB,EAAE,QAAwB;QAC9E,MAAM,YAAY,GAAG,UAAU,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAElE,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAE9D,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QAElB,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;IAC3B,CAAC;IAEM,0BAA0B;QAC/B,MAAM,IAAI,aAAa,CAAC,yCAAyC,CAAC,CAAC;IACrE,CAAC;CAEF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractCrudSync } from "./abstract";
|
|
2
|
-
import { HasDBId } from "../../../../types";
|
|
1
|
+
import { AbstractCrudSync } from "./abstract/index.js";
|
|
2
|
+
import { HasDBId } from "../../../../types.js";
|
|
3
3
|
export declare class CrudSyncUpdate extends AbstractCrudSync {
|
|
4
4
|
targetArrayResponseObject(target: Array<HasDBId>, response: HasDBId): void;
|
|
5
5
|
targetArrayResponseArray(target: Array<HasDBId>, response: Array<HasDBId>): void;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const abstract_1 = require("./abstract");
|
|
5
|
-
const services_1 = require("../../../../services");
|
|
6
|
-
class CrudSyncUpdate extends abstract_1.AbstractCrudSync {
|
|
1
|
+
import { AbstractCrudSync } from "./abstract/index.js";
|
|
2
|
+
import { MapService } from "../../../../services/index.js";
|
|
3
|
+
export class CrudSyncUpdate extends AbstractCrudSync {
|
|
7
4
|
targetArrayResponseObject(target, response) {
|
|
8
5
|
const targetRecord = target.find(record => record._id === response._id);
|
|
9
6
|
if (!targetRecord)
|
|
@@ -11,13 +8,12 @@ class CrudSyncUpdate extends abstract_1.AbstractCrudSync {
|
|
|
11
8
|
Object.assign(targetRecord, response);
|
|
12
9
|
}
|
|
13
10
|
targetArrayResponseArray(target, response) {
|
|
14
|
-
const targetById =
|
|
15
|
-
const responseById =
|
|
11
|
+
const targetById = MapService.getMapByProperty('_id', target);
|
|
12
|
+
const responseById = MapService.getMapByProperty('_id', response);
|
|
16
13
|
targetById.forEach(target => this.targetObjectResponseObject(target, responseById.get(target._id)));
|
|
17
14
|
}
|
|
18
15
|
targetObjectResponseObject(target, response) {
|
|
19
|
-
Object.assign(target
|
|
16
|
+
Object.assign(target ?? {}, response ?? {});
|
|
20
17
|
}
|
|
21
18
|
}
|
|
22
|
-
exports.CrudSyncUpdate = CrudSyncUpdate;
|
|
23
19
|
//# sourceMappingURL=CrudSyncUpdate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudSyncUpdate.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/sync/CrudSyncUpdate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CrudSyncUpdate.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/sync/CrudSyncUpdate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAC,UAAU,EAAC,MAAM,+BAA+B,CAAC;AAEzD,MAAM,OAAO,cAAe,SAAQ,gBAAgB;IAE3C,yBAAyB,CAAC,MAAsB,EAAE,QAAiB;QACxE,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,CAAC;QAExE,IAAI,CAAC,YAAY;YAAE,OAAO;QAE1B,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACxC,CAAC;IAEM,wBAAwB,CAAC,MAAsB,EAAE,QAAwB;QAC9E,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAC9D,MAAM,YAAY,GAAG,UAAU,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAElE,UAAU,CAAC,OAAO,CAChB,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,0BAA0B,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAChF,CAAC;IACJ,CAAC;IAEM,0BAA0B,CAAC,MAAe,EAAE,QAAiB;QAClE,MAAM,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC;IAC9C,CAAC;CAEF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractCrudSync } from "./abstract";
|
|
2
|
-
import { HasDBId } from "../../../../types";
|
|
1
|
+
import { AbstractCrudSync } from "./abstract/index.js";
|
|
2
|
+
import { HasDBId } from "../../../../types.js";
|
|
3
3
|
export declare class CrudSyncUpsert extends AbstractCrudSync {
|
|
4
4
|
targetArrayResponseObject(target: Array<HasDBId>, response: HasDBId): number | HasDBId;
|
|
5
5
|
targetArrayResponseArray(target: Array<HasDBId>, response: Array<HasDBId>): void;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const abstract_1 = require("./abstract");
|
|
5
|
-
const services_1 = require("../../../../services");
|
|
6
|
-
class CrudSyncUpsert extends abstract_1.AbstractCrudSync {
|
|
1
|
+
import { AbstractCrudSync } from "./abstract/index.js";
|
|
2
|
+
import { MapService } from "../../../../services/index.js";
|
|
3
|
+
export class CrudSyncUpsert extends AbstractCrudSync {
|
|
7
4
|
targetArrayResponseObject(target, response) {
|
|
8
5
|
const record = target.find(t => t._id === response._id);
|
|
9
6
|
return record
|
|
@@ -11,8 +8,8 @@ class CrudSyncUpsert extends abstract_1.AbstractCrudSync {
|
|
|
11
8
|
: target.push(response);
|
|
12
9
|
}
|
|
13
10
|
targetArrayResponseArray(target, response) {
|
|
14
|
-
const targetById =
|
|
15
|
-
const responseById =
|
|
11
|
+
const targetById = MapService.getMapByProperty('_id', target);
|
|
12
|
+
const responseById = MapService.getMapByProperty('_id', response);
|
|
16
13
|
responseById.forEach(responseRecord => {
|
|
17
14
|
const targetRecord = targetById.get(responseRecord._id);
|
|
18
15
|
return targetRecord
|
|
@@ -26,5 +23,4 @@ class CrudSyncUpsert extends abstract_1.AbstractCrudSync {
|
|
|
26
23
|
Object.assign(target, response);
|
|
27
24
|
}
|
|
28
25
|
}
|
|
29
|
-
exports.CrudSyncUpsert = CrudSyncUpsert;
|
|
30
26
|
//# sourceMappingURL=CrudSyncUpsert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudSyncUpsert.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/sync/CrudSyncUpsert.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CrudSyncUpsert.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/sync/CrudSyncUpsert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAC,UAAU,EAAC,MAAM,+BAA+B,CAAC;AAEzD,MAAM,OAAO,cAAe,SAAQ,gBAAgB;IAE3C,yBAAyB,CAAC,MAAsB,EAAE,QAAiB;QACxE,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG,CAAC,CAAC;QAExD,OAAO,MAAM;YACX,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC;YACjC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;IAEM,wBAAwB,CAAC,MAAsB,EAAE,QAAwB;QAC9E,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAC9D,MAAM,YAAY,GAAG,UAAU,CAAC,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAElE,YAAY,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE;YACpC,MAAM,YAAY,GAAG,UAAU,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;YAExD,OAAO,YAAY;gBACjB,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,cAAc,CAAC;gBAC7C,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC;IAEM,0BAA0B,CAAC,MAAe,EAAE,QAAiB;QAClE,IAAI,MAAM,CAAC,GAAG,KAAK,QAAQ,CAAC,GAAG;YAAE,OAAO;QAExC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAClC,CAAC;CAEF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HasDBId } from "../../../../../types";
|
|
1
|
+
import { HasDBId } from "../../../../../types.js";
|
|
2
2
|
export declare abstract class AbstractCrudSync {
|
|
3
3
|
sync(target: HasDBId | Array<HasDBId>, response: HasDBId | Array<HasDBId>): void;
|
|
4
4
|
protected abstract targetArrayResponseObject(target: Array<HasDBId>, response: HasDBId): any;
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.AbstractCrudSync = void 0;
|
|
4
|
-
const error_1 = require("../../error");
|
|
5
|
-
class AbstractCrudSync {
|
|
1
|
+
import { CrudSyncError } from "../../error/index.js";
|
|
2
|
+
export class AbstractCrudSync {
|
|
6
3
|
sync(target, response) {
|
|
7
4
|
if (!response)
|
|
8
5
|
return;
|
|
9
6
|
if (!target) {
|
|
10
|
-
throw new
|
|
7
|
+
throw new CrudSyncError('Target cannot be empty');
|
|
11
8
|
}
|
|
12
9
|
const isTargetArray = Array.isArray(target);
|
|
13
10
|
const isResponseArray = Array.isArray(response);
|
|
14
11
|
if (!isTargetArray && isResponseArray) {
|
|
15
|
-
throw new
|
|
12
|
+
throw new CrudSyncError('Types mismatch: an array to the object');
|
|
16
13
|
}
|
|
17
14
|
if (isTargetArray && !isResponseArray) {
|
|
18
15
|
this.targetArrayResponseObject(target, response);
|
|
@@ -25,5 +22,4 @@ class AbstractCrudSync {
|
|
|
25
22
|
}
|
|
26
23
|
}
|
|
27
24
|
}
|
|
28
|
-
exports.AbstractCrudSync = AbstractCrudSync;
|
|
29
25
|
//# sourceMappingURL=AbstractCrudSync.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractCrudSync.js","sourceRoot":"","sources":["../../../../../../src/features/crud/sync/sync/abstract/AbstractCrudSync.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AbstractCrudSync.js","sourceRoot":"","sources":["../../../../../../src/features/crud/sync/sync/abstract/AbstractCrudSync.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAEnD,MAAM,OAAgB,gBAAgB;IAE7B,IAAI,CAAC,MAAgC,EAAE,QAAkC;QAC9E,IAAI,CAAC,QAAQ;YAAE,OAAO;QAEtB,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,aAAa,CAAC,wBAAwB,CAAC,CAAC;QACpD,CAAC;QAED,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAE5C,MAAM,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAEhD,IAAI,CAAC,aAAa,IAAI,eAAe,EAAE,CAAC;YACtC,MAAM,IAAI,aAAa,CAAC,wCAAwC,CAAC,CAAC;QACpE,CAAC;QAED,IAAI,aAAa,IAAI,CAAC,eAAe,EAAE,CAAC;YACtC,IAAI,CAAC,yBAAyB,CAAC,MAAwB,EAAE,QAAmB,CAAC,CAAC;QAChF,CAAC;QAED,IAAI,aAAa,IAAI,eAAe,EAAE,CAAC;YACrC,IAAI,CAAC,wBAAwB,CAAC,MAAwB,EAAE,QAA0B,CAAC,CAAC;QACtF,CAAC;QAED,IAAI,CAAC,aAAa,IAAI,CAAC,eAAe,EAAE,CAAC;YACvC,IAAI,CAAC,0BAA0B,CAAC,MAAiB,EAAE,QAAmB,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;CAQF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './AbstractCrudSync';
|
|
1
|
+
export * from './AbstractCrudSync.js';
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./AbstractCrudSync"), exports);
|
|
1
|
+
export * from './AbstractCrudSync.js';
|
|
18
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/features/crud/sync/sync/abstract/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/features/crud/sync/sync/abstract/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './CrudSyncCreate';
|
|
2
|
-
export * from './CrudSyncDelete';
|
|
3
|
-
export * from './CrudSyncUpdate';
|
|
4
|
-
export * from './CrudSyncUpsert';
|
|
5
|
-
export * from './abstract';
|
|
1
|
+
export * from './CrudSyncCreate.js';
|
|
2
|
+
export * from './CrudSyncDelete.js';
|
|
3
|
+
export * from './CrudSyncUpdate.js';
|
|
4
|
+
export * from './CrudSyncUpsert.js';
|
|
5
|
+
export * from './abstract/index.js';
|
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./CrudSyncCreate"), exports);
|
|
18
|
-
__exportStar(require("./CrudSyncDelete"), exports);
|
|
19
|
-
__exportStar(require("./CrudSyncUpdate"), exports);
|
|
20
|
-
__exportStar(require("./CrudSyncUpsert"), exports);
|
|
21
|
-
__exportStar(require("./abstract"), exports);
|
|
1
|
+
export * from './CrudSyncCreate.js';
|
|
2
|
+
export * from './CrudSyncDelete.js';
|
|
3
|
+
export * from './CrudSyncUpdate.js';
|
|
4
|
+
export * from './CrudSyncUpsert.js';
|
|
5
|
+
export * from './abstract/index.js';
|
|
22
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/sync/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/sync/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC"}
|
package/dist/features/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './api';
|
|
2
|
-
export * from './auth';
|
|
3
|
-
export * from './crud';
|
|
4
|
-
export * from './callout';
|
|
1
|
+
export * from './api/index.js';
|
|
2
|
+
export * from './auth/index.js';
|
|
3
|
+
export * from './crud/index.js';
|
|
4
|
+
export * from './callout/index.js';
|
package/dist/features/index.js
CHANGED
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./api"), exports);
|
|
18
|
-
__exportStar(require("./auth"), exports);
|
|
19
|
-
__exportStar(require("./crud"), exports);
|
|
20
|
-
__exportStar(require("./callout"), exports);
|
|
1
|
+
export * from './api/index.js';
|
|
2
|
+
export * from './auth/index.js';
|
|
3
|
+
export * from './crud/index.js';
|
|
4
|
+
export * from './callout/index.js';
|
|
21
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/features/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/features/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { TsApiKitOptions } from "./types";
|
|
2
|
-
export * from './compose';
|
|
3
|
-
export * from './features';
|
|
4
|
-
export * from './micro';
|
|
5
|
-
export * from './services';
|
|
6
|
-
export * from './types';
|
|
7
|
-
export * from './Api';
|
|
8
|
-
export * from './ApiConfigs';
|
|
1
|
+
import { TsApiKitOptions } from "./types.js";
|
|
2
|
+
export * from './compose/index.js';
|
|
3
|
+
export * from './features/index.js';
|
|
4
|
+
export * from './micro/index.js';
|
|
5
|
+
export * from './services/index.js';
|
|
6
|
+
export * from './types.js';
|
|
7
|
+
export * from './Api.js';
|
|
8
|
+
export * from './ApiConfigs.js';
|
|
9
9
|
import type { App } from "vue";
|
|
10
10
|
declare const _default: {
|
|
11
11
|
install(app: App, options: TsApiKitOptions): void;
|
package/dist/index.js
CHANGED
|
@@ -1,41 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.createApi = void 0;
|
|
18
|
-
exports.getLibOptions = getLibOptions;
|
|
19
|
-
__exportStar(require("./compose"), exports);
|
|
20
|
-
__exportStar(require("./features"), exports);
|
|
21
|
-
__exportStar(require("./micro"), exports);
|
|
22
|
-
__exportStar(require("./services"), exports);
|
|
23
|
-
__exportStar(require("./types"), exports);
|
|
24
|
-
__exportStar(require("./Api"), exports);
|
|
25
|
-
__exportStar(require("./ApiConfigs"), exports);
|
|
26
|
-
const Api_1 = require("./Api");
|
|
1
|
+
export * from './compose/index.js';
|
|
2
|
+
export * from './features/index.js';
|
|
3
|
+
export * from './micro/index.js';
|
|
4
|
+
export * from './services/index.js';
|
|
5
|
+
export * from './types.js';
|
|
6
|
+
export * from './Api.js';
|
|
7
|
+
export * from './ApiConfigs.js';
|
|
8
|
+
import { initApi } from "./Api.js";
|
|
27
9
|
let libOptions = {};
|
|
28
|
-
|
|
10
|
+
export default {
|
|
29
11
|
install(app, options) {
|
|
30
|
-
|
|
12
|
+
createApi(options);
|
|
31
13
|
}
|
|
32
14
|
};
|
|
33
|
-
const createApi = (options) => {
|
|
34
|
-
libOptions = options
|
|
35
|
-
|
|
15
|
+
export const createApi = (options) => {
|
|
16
|
+
libOptions = options ?? {};
|
|
17
|
+
initApi();
|
|
36
18
|
};
|
|
37
|
-
|
|
38
|
-
function getLibOptions() {
|
|
19
|
+
export function getLibOptions() {
|
|
39
20
|
return libOptions;
|
|
40
21
|
}
|
|
41
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAGhC,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAEjC,IAAI,UAAU,GAAoB,EAAqB,CAAC;AAExD,eAAe;IAEX,OAAO,CAAC,GAAQ,EAAE,OAAwB;QACtC,SAAS,CAAC,OAAO,CAAC,CAAC;IACvB,CAAC;CACJ,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAwB,EAAE,EAAE;IAClD,UAAU,GAAG,OAAO,IAAI,EAAqB,CAAC;IAE9C,OAAO,EAAE,CAAC;AACd,CAAC,CAAA;AAED,MAAM,UAAU,aAAa;IACzB,OAAO,UAAU,CAAC;AACtB,CAAC"}
|
package/dist/main.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from "axios";
|
|
2
|
-
import { AuthActivateUser, AuthChangePassword, AuthConfirmResetPassword, AuthSignIn } from "../../features";
|
|
2
|
+
import { AuthActivateUser, AuthChangePassword, AuthConfirmResetPassword, AuthSignIn } from "../../features/index.js";
|
|
3
3
|
export declare class AuthApi {
|
|
4
4
|
getTokensByCredentials(user: AuthSignIn): AxiosRequestConfig;
|
|
5
5
|
getAuthCodeByCredentials(user: AuthSignIn): AxiosRequestConfig;
|