@buildery/ts-api-kit 6.2.1 → 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 +2 -2
- 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,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,13 +7,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const middlewares_1 = require("../../sync/middlewares");
|
|
17
|
-
class Update extends abstract_1.AbstractCRUDApi {
|
|
10
|
+
import { AbstractCRUDApi } from "../abstract/index.js";
|
|
11
|
+
import { Calloutable } from "../../../callout/index.js";
|
|
12
|
+
import { CrudSyncAction } from "../../sync/index.js";
|
|
13
|
+
import { PushCrudEvent } from "../../sync/index.js";
|
|
14
|
+
export class Update extends AbstractCRUDApi {
|
|
18
15
|
update(entity) {
|
|
19
16
|
return {
|
|
20
17
|
baseURL: this.serverUrl,
|
|
@@ -25,9 +22,8 @@ class Update extends abstract_1.AbstractCRUDApi {
|
|
|
25
22
|
}
|
|
26
23
|
;
|
|
27
24
|
}
|
|
28
|
-
exports.Update = Update;
|
|
29
25
|
__decorate([
|
|
30
|
-
|
|
26
|
+
Calloutable(PushCrudEvent(CrudSyncAction.Update)),
|
|
31
27
|
__metadata("design:type", Function),
|
|
32
28
|
__metadata("design:paramtypes", [Object]),
|
|
33
29
|
__metadata("design:returntype", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/Update.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/Update.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAElD,MAAM,OAAO,MAAU,SAAQ,eAAe;IAGrC,MAAM,CAAC,MAAS;QACrB,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,SAAS;YACvB,GAAG,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE;YAC1B,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,MAAM;SACb,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AATQ;IADN,WAAW,CAAC,aAAa,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;;;;oCAQjD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractCRUDApi } from "../abstract";
|
|
1
|
+
import { AbstractCRUDApi } from "../abstract/index.js";
|
|
2
2
|
import { AxiosRequestConfig } from "axios";
|
|
3
3
|
export declare class UpdateBulk<T> extends AbstractCRUDApi {
|
|
4
4
|
updateBulk(entities: Array<T>): AxiosRequestConfig<Array<T>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,13 +7,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const middlewares_1 = require("../../sync/middlewares");
|
|
17
|
-
class UpdateBulk extends abstract_1.AbstractCRUDApi {
|
|
10
|
+
import { AbstractCRUDApi } from "../abstract/index.js";
|
|
11
|
+
import { Calloutable } from "../../../callout/index.js";
|
|
12
|
+
import { CrudSyncAction } from "../../sync/index.js";
|
|
13
|
+
import { PushCrudEvent } from "../../sync/index.js";
|
|
14
|
+
export class UpdateBulk extends AbstractCRUDApi {
|
|
18
15
|
updateBulk(entities) {
|
|
19
16
|
return {
|
|
20
17
|
baseURL: this.serverUrl,
|
|
@@ -25,9 +22,8 @@ class UpdateBulk extends abstract_1.AbstractCRUDApi {
|
|
|
25
22
|
}
|
|
26
23
|
;
|
|
27
24
|
}
|
|
28
|
-
exports.UpdateBulk = UpdateBulk;
|
|
29
25
|
__decorate([
|
|
30
|
-
|
|
26
|
+
Calloutable(PushCrudEvent(CrudSyncAction.UpdateBulk)),
|
|
31
27
|
__metadata("design:type", Function),
|
|
32
28
|
__metadata("design:paramtypes", [Array]),
|
|
33
29
|
__metadata("design:returntype", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateBulk.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/UpdateBulk.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UpdateBulk.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/UpdateBulk.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAElD,MAAM,OAAO,UAAc,SAAQ,eAAe;IAGzC,UAAU,CAAC,QAAkB;QAClC,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,SAAS;YACvB,GAAG,EAAE,IAAI,IAAI,CAAC,UAAU,OAAO;YAC/B,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,QAAQ;SACf,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AATQ;IADN,WAAW,CAAC,aAAa,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;;qCAC1B,KAAK;;4CAOhC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,13 +7,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const middlewares_1 = require("../../sync/middlewares");
|
|
17
|
-
class Upsert extends abstract_1.AbstractCRUDApi {
|
|
10
|
+
import { AbstractCRUDApi } from "../abstract/index.js";
|
|
11
|
+
import { Calloutable } from "../../../callout/index.js";
|
|
12
|
+
import { CrudSyncAction } from "../../sync/index.js";
|
|
13
|
+
import { PushCrudEvent } from "../../sync/index.js";
|
|
14
|
+
export class Upsert extends AbstractCRUDApi {
|
|
18
15
|
upsert(entity) {
|
|
19
16
|
return {
|
|
20
17
|
baseURL: this.serverUrl,
|
|
@@ -25,9 +22,8 @@ class Upsert extends abstract_1.AbstractCRUDApi {
|
|
|
25
22
|
}
|
|
26
23
|
;
|
|
27
24
|
}
|
|
28
|
-
exports.Upsert = Upsert;
|
|
29
25
|
__decorate([
|
|
30
|
-
|
|
26
|
+
Calloutable(PushCrudEvent(CrudSyncAction.Upsert)),
|
|
31
27
|
__metadata("design:type", Function),
|
|
32
28
|
__metadata("design:paramtypes", [Object]),
|
|
33
29
|
__metadata("design:returntype", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Upsert.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/Upsert.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Upsert.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/Upsert.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAElD,MAAM,OAAO,MAAU,SAAQ,eAAe;IAGrC,MAAM,CAAC,MAAS;QACrB,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,SAAS;YACvB,GAAG,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE;YAC1B,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,MAAM;SACb,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AATQ;IADN,WAAW,CAAC,aAAa,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;;;;oCAQjD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractCRUDApi } from "../abstract";
|
|
1
|
+
import { AbstractCRUDApi } from "../abstract/index.js";
|
|
2
2
|
import { AxiosRequestConfig } from "axios";
|
|
3
3
|
export declare class UpsertBulk<T> extends AbstractCRUDApi {
|
|
4
4
|
upsertBulk(entities: Array<T>): AxiosRequestConfig<Array<T>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,13 +7,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const middlewares_1 = require("../../sync/middlewares");
|
|
17
|
-
class UpsertBulk extends abstract_1.AbstractCRUDApi {
|
|
10
|
+
import { AbstractCRUDApi } from "../abstract/index.js";
|
|
11
|
+
import { Calloutable } from "../../../callout/index.js";
|
|
12
|
+
import { CrudSyncAction } from "../../sync/index.js";
|
|
13
|
+
import { PushCrudEvent } from "../../sync/index.js";
|
|
14
|
+
export class UpsertBulk extends AbstractCRUDApi {
|
|
18
15
|
upsertBulk(entities) {
|
|
19
16
|
return {
|
|
20
17
|
baseURL: this.serverUrl,
|
|
@@ -25,9 +22,8 @@ class UpsertBulk extends abstract_1.AbstractCRUDApi {
|
|
|
25
22
|
}
|
|
26
23
|
;
|
|
27
24
|
}
|
|
28
|
-
exports.UpsertBulk = UpsertBulk;
|
|
29
25
|
__decorate([
|
|
30
|
-
|
|
26
|
+
Calloutable(PushCrudEvent(CrudSyncAction.UpsertBulk)),
|
|
31
27
|
__metadata("design:type", Function),
|
|
32
28
|
__metadata("design:paramtypes", [Array]),
|
|
33
29
|
__metadata("design:returntype", Object)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpsertBulk.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/UpsertBulk.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UpsertBulk.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/UpsertBulk.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAC,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,aAAa,EAAC,MAAM,qBAAqB,CAAC;AAElD,MAAM,OAAO,UAAc,SAAQ,eAAe;IAGzC,UAAU,CAAC,QAAkB;QAClC,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,SAAS;YACvB,GAAG,EAAE,IAAI,IAAI,CAAC,UAAU,OAAO;YAC/B,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,QAAQ;SACf,CAAA;IACH,CAAC;IAAA,CAAC;CAEH;AATQ;IADN,WAAW,CAAC,aAAa,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;;qCAC1B,KAAK;;4CAOhC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export * from './Create';
|
|
2
|
-
export * from './CreateBulk';
|
|
3
|
-
export * from './DeleteByFilters';
|
|
4
|
-
export * from './DeleteById';
|
|
5
|
-
export * from './DeleteByIds';
|
|
6
|
-
export * from './GetAll';
|
|
7
|
-
export * from './GetById';
|
|
8
|
-
export * from './GetByIds';
|
|
9
|
-
export * from './GetByFilters';
|
|
10
|
-
export * from './Update';
|
|
11
|
-
export * from './UpdateBulk';
|
|
12
|
-
export * from './Upsert';
|
|
13
|
-
export * from './UpsertBulk';
|
|
1
|
+
export * from './Create.js';
|
|
2
|
+
export * from './CreateBulk.js';
|
|
3
|
+
export * from './DeleteByFilters.js';
|
|
4
|
+
export * from './DeleteById.js';
|
|
5
|
+
export * from './DeleteByIds.js';
|
|
6
|
+
export * from './GetAll.js';
|
|
7
|
+
export * from './GetById.js';
|
|
8
|
+
export * from './GetByIds.js';
|
|
9
|
+
export * from './GetByFilters.js';
|
|
10
|
+
export * from './Update.js';
|
|
11
|
+
export * from './UpdateBulk.js';
|
|
12
|
+
export * from './Upsert.js';
|
|
13
|
+
export * from './UpsertBulk.js';
|
|
@@ -1,30 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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("./Create"), exports);
|
|
18
|
-
__exportStar(require("./CreateBulk"), exports);
|
|
19
|
-
__exportStar(require("./DeleteByFilters"), exports);
|
|
20
|
-
__exportStar(require("./DeleteById"), exports);
|
|
21
|
-
__exportStar(require("./DeleteByIds"), exports);
|
|
22
|
-
__exportStar(require("./GetAll"), exports);
|
|
23
|
-
__exportStar(require("./GetById"), exports);
|
|
24
|
-
__exportStar(require("./GetByIds"), exports);
|
|
25
|
-
__exportStar(require("./GetByFilters"), exports);
|
|
26
|
-
__exportStar(require("./Update"), exports);
|
|
27
|
-
__exportStar(require("./UpdateBulk"), exports);
|
|
28
|
-
__exportStar(require("./Upsert"), exports);
|
|
29
|
-
__exportStar(require("./UpsertBulk"), exports);
|
|
1
|
+
export * from './Create.js';
|
|
2
|
+
export * from './CreateBulk.js';
|
|
3
|
+
export * from './DeleteByFilters.js';
|
|
4
|
+
export * from './DeleteById.js';
|
|
5
|
+
export * from './DeleteByIds.js';
|
|
6
|
+
export * from './GetAll.js';
|
|
7
|
+
export * from './GetById.js';
|
|
8
|
+
export * from './GetByIds.js';
|
|
9
|
+
export * from './GetByFilters.js';
|
|
10
|
+
export * from './Update.js';
|
|
11
|
+
export * from './UpdateBulk.js';
|
|
12
|
+
export * from './Upsert.js';
|
|
13
|
+
export * from './UpsertBulk.js';
|
|
30
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/crud/operations/operations/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './useCrudSync';
|
|
1
|
+
export * from './useCrudSync.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("./useCrudSync"), exports);
|
|
1
|
+
export * from './useCrudSync.js';
|
|
18
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/compose/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/compose/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { AbstractCRUDApi } from "../../operations";
|
|
2
|
-
import { HasDBId } from "../../../../types";
|
|
3
|
-
import { CrudSyncAction } from "../constants";
|
|
1
|
+
import type { AbstractCRUDApi } from "../../operations/index.js";
|
|
2
|
+
import { HasDBId } from "../../../../types.js";
|
|
3
|
+
import { CrudSyncAction } from "../constants/index.js";
|
|
4
4
|
export declare function useSyncCrud(api: AbstractCRUDApi, actions?: Array<CrudSyncAction>): {
|
|
5
5
|
subscribeSyncCrud: (target: HasDBId | Array<HasDBId>) => void;
|
|
6
6
|
unsubscribeSyncCrud: () => void;
|
|
7
|
-
};
|
|
7
|
+
} | undefined;
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const sync_1 = require("../sync");
|
|
8
|
-
const compose_1 = require("../../../../compose");
|
|
9
|
-
const ApiConfigs_1 = require("../../../../ApiConfigs");
|
|
1
|
+
import { CrudSyncError } from "../error/index.js";
|
|
2
|
+
import { CrudSyncAction } from "../constants/index.js";
|
|
3
|
+
import { CrudSyncService } from "../services/index.js";
|
|
4
|
+
import { CrudSyncCreate, CrudSyncDelete, CrudSyncUpdate, CrudSyncUpsert } from "../sync/index.js";
|
|
5
|
+
import { useSingleton } from "../../../../compose/index.js";
|
|
6
|
+
import { ApiConfigs } from "../../../../ApiConfigs.js";
|
|
10
7
|
const ALL_ACTIONS = [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
CrudSyncAction.Create,
|
|
9
|
+
CrudSyncAction.Delete,
|
|
10
|
+
CrudSyncAction.Update,
|
|
11
|
+
CrudSyncAction.Upsert,
|
|
12
|
+
CrudSyncAction.CreateBulk,
|
|
13
|
+
CrudSyncAction.DeleteBulk,
|
|
14
|
+
CrudSyncAction.UpdateBulk,
|
|
15
|
+
CrudSyncAction.UpsertBulk,
|
|
19
16
|
];
|
|
20
|
-
function useSyncCrud(api, actions = ALL_ACTIONS) {
|
|
17
|
+
export function useSyncCrud(api, actions = ALL_ACTIONS) {
|
|
21
18
|
if (!(api && api.objectName && actions))
|
|
22
19
|
return;
|
|
23
|
-
if (!
|
|
24
|
-
throw new
|
|
20
|
+
if (!ApiConfigs.event.eventBus) {
|
|
21
|
+
throw new CrudSyncError('Event bus not defined in the ApiConfigs');
|
|
25
22
|
}
|
|
26
23
|
const channelName = getChannelName(api);
|
|
27
24
|
const syncServiceByAction = getHandlerByAction(actions);
|
|
@@ -33,12 +30,16 @@ function useSyncCrud(api, actions = ALL_ACTIONS) {
|
|
|
33
30
|
eventHandlerByAction.forEach(unsubscribe);
|
|
34
31
|
}
|
|
35
32
|
function subscribe(action, service, target) {
|
|
33
|
+
if (!ApiConfigs.event.eventBus)
|
|
34
|
+
return;
|
|
36
35
|
const handler = (response) => service.sync(target, response);
|
|
37
36
|
eventHandlerByAction.set(action, handler);
|
|
38
|
-
|
|
37
|
+
ApiConfigs.event.eventBus.subscribe(channelName, action, handler);
|
|
39
38
|
}
|
|
40
39
|
function unsubscribe(handler, action) {
|
|
41
|
-
|
|
40
|
+
if (!ApiConfigs.event.eventBus)
|
|
41
|
+
return;
|
|
42
|
+
ApiConfigs.event.eventBus.unsubscribe(channelName, action, handler);
|
|
42
43
|
}
|
|
43
44
|
return {
|
|
44
45
|
subscribeSyncCrud,
|
|
@@ -46,25 +47,25 @@ function useSyncCrud(api, actions = ALL_ACTIONS) {
|
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
49
|
function getChannelName(api) {
|
|
49
|
-
return
|
|
50
|
+
return CrudSyncService.getObjectChannel(api.objectName);
|
|
50
51
|
}
|
|
51
52
|
function getSyncService(action) {
|
|
52
|
-
if (action ===
|
|
53
|
-
return
|
|
53
|
+
if (action === CrudSyncAction.Delete || action === CrudSyncAction.DeleteBulk) {
|
|
54
|
+
return CrudSyncDelete;
|
|
54
55
|
}
|
|
55
|
-
if (action ===
|
|
56
|
-
return
|
|
56
|
+
if (action === CrudSyncAction.Update || action === CrudSyncAction.UpdateBulk) {
|
|
57
|
+
return CrudSyncUpdate;
|
|
57
58
|
}
|
|
58
|
-
if (action ===
|
|
59
|
-
return
|
|
59
|
+
if (action === CrudSyncAction.Create || action === CrudSyncAction.CreateBulk) {
|
|
60
|
+
return CrudSyncCreate;
|
|
60
61
|
}
|
|
61
|
-
if (action ===
|
|
62
|
-
return
|
|
62
|
+
if (action === CrudSyncAction.Upsert || action === CrudSyncAction.UpsertBulk || action === CrudSyncAction.Query || action === CrudSyncAction.QueryBulk) {
|
|
63
|
+
return CrudSyncUpsert;
|
|
63
64
|
}
|
|
64
|
-
throw new
|
|
65
|
+
throw new CrudSyncError(`Sync service not found for the action ${action}`);
|
|
65
66
|
}
|
|
66
67
|
function getHandlerByAction(actions) {
|
|
67
|
-
const { getInstanceByDefinition } =
|
|
68
|
+
const { getInstanceByDefinition } = useSingleton();
|
|
68
69
|
return new Map(actions.map(action => [
|
|
69
70
|
action,
|
|
70
71
|
getInstanceByDefinition(getSyncService(action)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCrudSync.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/compose/useCrudSync.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCrudSync.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/compose/useCrudSync.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CrudSyncAction = void 0;
|
|
4
|
-
var CrudSyncAction;
|
|
1
|
+
export var CrudSyncAction;
|
|
5
2
|
(function (CrudSyncAction) {
|
|
6
3
|
CrudSyncAction["Create"] = "create";
|
|
7
4
|
CrudSyncAction["Update"] = "update";
|
|
@@ -13,5 +10,5 @@ var CrudSyncAction;
|
|
|
13
10
|
CrudSyncAction["DeleteBulk"] = "delete_bulk";
|
|
14
11
|
CrudSyncAction["UpsertBulk"] = "upsert_bulk";
|
|
15
12
|
CrudSyncAction["QueryBulk"] = "query_bulk";
|
|
16
|
-
})(CrudSyncAction || (
|
|
13
|
+
})(CrudSyncAction || (CrudSyncAction = {}));
|
|
17
14
|
//# sourceMappingURL=CrudSyncAction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudSyncAction.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/constants/CrudSyncAction.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CrudSyncAction.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/constants/CrudSyncAction.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,cAWX;AAXD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,mCAAiB,CAAA;IACjB,iCAAe,CAAA;IACf,4CAA0B,CAAA;IAC1B,4CAA0B,CAAA;IAC1B,4CAA0B,CAAA;IAC1B,4CAA0B,CAAA;IAC1B,0CAAwB,CAAA;AAC1B,CAAC,EAXW,cAAc,KAAd,cAAc,QAWzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudSyncConstants.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/constants/CrudSyncConstants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CrudSyncConstants.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/constants/CrudSyncConstants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './CrudSyncConstants';
|
|
2
|
-
export * from './CrudSyncAction';
|
|
1
|
+
export * from './CrudSyncConstants.js';
|
|
2
|
+
export * from './CrudSyncAction.js';
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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("./CrudSyncConstants"), exports);
|
|
18
|
-
__exportStar(require("./CrudSyncAction"), exports);
|
|
1
|
+
export * from './CrudSyncConstants.js';
|
|
2
|
+
export * from './CrudSyncAction.js';
|
|
19
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/constants/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC"}
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CrudSyncError = void 0;
|
|
4
|
-
class CrudSyncError extends Error {
|
|
1
|
+
export class CrudSyncError extends Error {
|
|
5
2
|
constructor(message) {
|
|
6
3
|
super(message);
|
|
7
4
|
}
|
|
8
5
|
}
|
|
9
|
-
exports.CrudSyncError = CrudSyncError;
|
|
10
6
|
//# sourceMappingURL=CrudSyncError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudSyncError.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/error/CrudSyncError.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CrudSyncError.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/error/CrudSyncError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,aAAc,SAAQ,KAAK;IACtC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAA;IAChB,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './CrudSyncError';
|
|
1
|
+
export * from './CrudSyncError.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("./CrudSyncError"), exports);
|
|
1
|
+
export * from './CrudSyncError.js';
|
|
18
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/error/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/crud/sync/error/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './compose';
|
|
2
|
-
export * from './constants';
|
|
3
|
-
export * from './error';
|
|
4
|
-
export * from './middlewares';
|
|
5
|
-
export * from './services';
|
|
6
|
-
export * from './sync';
|
|
1
|
+
export * from './compose/index.js';
|
|
2
|
+
export * from './constants/index.js';
|
|
3
|
+
export * from './error/index.js';
|
|
4
|
+
export * from './middlewares/index.js';
|
|
5
|
+
export * from './services/index.js';
|
|
6
|
+
export * from './sync/index.js';
|
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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("./compose"), exports);
|
|
18
|
-
__exportStar(require("./constants"), exports);
|
|
19
|
-
__exportStar(require("./error"), exports);
|
|
20
|
-
__exportStar(require("./middlewares"), exports);
|
|
21
|
-
__exportStar(require("./services"), exports);
|
|
22
|
-
__exportStar(require("./sync"), exports);
|
|
1
|
+
export * from './compose/index.js';
|
|
2
|
+
export * from './constants/index.js';
|
|
3
|
+
export * from './error/index.js';
|
|
4
|
+
export * from './middlewares/index.js';
|
|
5
|
+
export * from './services/index.js';
|
|
6
|
+
export * from './sync/index.js';
|
|
23
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/crud/sync/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/crud/sync/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC"}
|