diff --git a/changelog.md b/changelog.md index 9fc3b62..fba66cd 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,12 @@ # Changelog +## 2024-12-21 - 4.5.4 - fix(ts_web) +Fix action type and data fields in appstate for CRUD operations + +- Correct request method in createSecretGroupAction to accurately reflect the purpose. +- Align the deleteSecretGroupAction and deleteSecretBundleAction request types with proper interfaces. +- Ensure data payload matches backend requirements for secret group and secret bundle operations. + ## 2024-12-21 - 4.5.3 - fix(secret-management) Refactor secret management to use distinct secret bundle and group APIs. Introduce API client classes for secret bundles and groups. diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index a46e3b1..6ab174b 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/cloudly', - version: '4.5.3', + version: '4.5.4', description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.' } diff --git a/ts_interfaces/requests/secretbundle.ts b/ts_interfaces/requests/secretbundle.ts index 68711d8..546bea8 100644 --- a/ts_interfaces/requests/secretbundle.ts +++ b/ts_interfaces/requests/secretbundle.ts @@ -36,6 +36,21 @@ export interface IReq_GetSecretBundles extends plugins.typedrequestInterfaces.im } +export interface IReq_GetSecretBundleById extends plugins.typedrequestInterfaces.implementsTR< + plugins.typedrequestInterfaces.ITypedRequest, + IReq_GetSecretBundleById +> { + method: 'getSecretBundleById'; + request: { + identity: userInterfaces.IIdentity; + secretBundleId: string; + }; + response: { + secretBundle: data.ISecretBundle; + }; + +} + export interface IReq_CreateSecretBundle extends plugins.typedrequestInterfaces.implementsTR< plugins.typedrequestInterfaces.ITypedRequest, IReq_CreateSecretBundle diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index a46e3b1..6ab174b 100644 --- a/ts_web/00_commitinfo_data.ts +++ b/ts_web/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/cloudly', - version: '4.5.3', + version: '4.5.4', description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.' } diff --git a/ts_web/appstate.ts b/ts_web/appstate.ts index e451578..a67b6f1 100644 --- a/ts_web/appstate.ts +++ b/ts_web/appstate.ts @@ -144,14 +144,13 @@ export const createSecretGroupAction = dataState.createAction( async (statePartArg, payloadArg: plugins.interfaces.data.ISecretGroup) => { let currentState = statePartArg.getState(); const trCreateSecretGroup = - new domtools.plugins.typedrequest.TypedRequest( + new domtools.plugins.typedrequest.TypedRequest( '/typedrequest', - 'adminCreateSecretBundlesAndGroups' + 'createSecretGroup' ); const response = await trCreateSecretGroup.fire({ identity: loginStatePart.getState().identity, - secretBundles: [], - secretGroups: [payloadArg], + secretGroup: payloadArg, }); currentState = await dataState.dispatchAction(getAllDataAction, null); return currentState; @@ -163,14 +162,13 @@ export const deleteSecretGroupAction = dataState.createAction( async (statePartArg, payloadArg: { secretGroupId: string }) => { let currentState = statePartArg.getState(); const trDeleteSecretGroup = - new domtools.plugins.typedrequest.TypedRequest( + new domtools.plugins.typedrequest.TypedRequest( '/typedrequest', - 'adminDeleteConfigBundlesAndSecretGroups' + 'deleteSecretGroupById' ); const response = await trDeleteSecretGroup.fire({ identity: loginStatePart.getState().identity, - secretBundleIds: [], - secretGroupIds: [payloadArg.secretGroupId], + secretGroupId: payloadArg.secretGroupId, }); currentState = await dataState.dispatchAction(getAllDataAction, null); return currentState; @@ -182,14 +180,13 @@ export const deleteSecretBundleAction = dataState.createAction( async (statePartArg, payloadArg: { configBundleId: string }) => { let currentState = statePartArg.getState(); const trDeleteConfigBundle = - new domtools.plugins.typedrequest.TypedRequest( + new domtools.plugins.typedrequest.TypedRequest( '/typedrequest', - 'adminDeleteConfigBundlesAndSecretGroups' + 'deleteSecretBundleById' ); const response = await trDeleteConfigBundle.fire({ identity: loginStatePart.getState().identity, - secretBundleIds: [payloadArg.configBundleId], - secretGroupIds: [], + secretBundleId: payloadArg.configBundleId, }); currentState = await dataState.dispatchAction(getAllDataAction, null); return currentState;