Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
add deprecation notice to state functions (#7720)
Browse files Browse the repository at this point in the history
  • Loading branch information
HexaField authored Mar 10, 2023
1 parent 9a789a9 commit 418b3ef
Show file tree
Hide file tree
Showing 60 changed files with 120 additions and 113 deletions.
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/ActiveRouteService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ const activeRoutesRetrievedReceptor = (action: typeof AdminActiveRouteActions.ac
export const AdminActiveRouteReceptors = {
activeRoutesRetrievedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessAdminActiveRouteState = () => getMutableState(AdminActiveRouteState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useAdminActiveRouteState = () => useState(accessAdminActiveRouteState())

//Service
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/AnalyticsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ export const AdminAnalyticsReceptors = {
dailyNewUsersFetchedReceptor,
dailyUsersFetchedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessAdminAnalyticsState = () => getMutableState(AdminAnalyticsState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useAdminAnalyticsState = () => useState(accessAdminAnalyticsState())

//Service
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/AvatarService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ export const AdminAvatarReceptors = {
avatarRemovedReceptor,
avatarUpdatedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessAdminAvatarState = () => getMutableState(AdminAvatarState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useAdminAvatarState = () => useState(accessAdminAvatarState())

//Service
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/BotsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ export const AdminBotsCommandReceptors = {
botCommandCreatedReceptor,
botCommandRemovedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessAdminBotCommandState = () => getMutableState(AdminBotsCommandState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useAdminBotCommandState = () => useState(accessAdminBotCommandState())

//Service
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/BotsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ export const AdminBotServiceReceptors = {
botPatchedReceptor,
botRemovedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessAdminBotState = () => getMutableState(AdminBotState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useAdminBotState = () => useState(accessAdminBotState())

//Service
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/BuildStatusService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ const fetchBuildStatusReceptor = (action: typeof AdminBuildStatusActions.fetchBu
export const AdminBuildStatusReceptors = {
fetchBuildStatusReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessBuildStatusState = () => getMutableState(AdminBuildStatusState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useBuildStatusState = () => useState(accessBuildStatusState())

//Service
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/GroupService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ export const AdminGroupServiceReceptors = {
removeGroupActionReceptor,
addAdminGroupReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessAdminGroupState = () => getMutableState(AdminGroupState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useAdminGroupState = () => useState(accessAdminGroupState())

//Service
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/InstanceService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ export const AdminInstanceReceptors = {
instancesRetrievedReceptor,
instanceRemovedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessAdminInstanceState = () => getMutableState(AdminInstanceState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useAdminInstanceState = () => useState(accessAdminInstanceState())

//Service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ export const InstanceServerSettingReceptors = {
patchInstanceserverReceptor,
patchedInstanceserverReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessInstanceserverState = () => getMutableState(AdminInstanceServerState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useInstanceserverState = () => useState(accessInstanceserverState())

//Service
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/InviteService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ export const AdminInviteReceptors = {
invitePatchedReceptor,
inviteRemovedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessAdminInviteState = () => getMutableState(AdminInviteState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useAdminInviteState = () => useState(accessAdminInviteState())

//Service
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/LocationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ export const AdminLocationReceptors = {
locationRemovedReceptor,
locationTypesRetrievedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessAdminLocationState = () => getMutableState(AdminLocationState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useAdminLocationState = () => useState(accessAdminLocationState())

//Service
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/PartyService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ export const AdminPartyReceptors = {
partyRemovedReceptor,
partyPatchedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessPartyState = () => getMutableState(AdminPartyState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const usePartyState = () => useState(accessPartyState())

//Service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ export const ProjectUpdateReceptors = {
setProjectUpdateFieldReceptor,
mergeProjectUpdateFieldReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessProjectUpdateState = () => getMutableState(ProjectUpdateState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useProjectUpdateState = () => useState(accessProjectUpdateState())

export const ProjectUpdateService = {
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/ResourceService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ export const AdminResourceReceptors = {
resourceNeedsUpdateReceptor,
resourcesResetFilterReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessAdminResourceState = () => getMutableState(AdminResourceState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useAdminResourceState = () => useState(accessAdminResourceState())

export const ResourceService = {
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/RouteService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ const installedRoutesRetrievedReceptor = (action: typeof AdminRouteActions.insta
export const AdminRouteReceptors = {
installedRoutesRetrievedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessRouteState = () => getMutableState(AdminRouteState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useRouteState = () => useState(accessRouteState())

//Service
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/SceneService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export const AdminSceneReceptors = {
scenesFetchedReceptor,
sceneFetchedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessAdminSceneState = () => getMutableState(AdminSceneState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useAdminSceneState = () => useState(accessAdminSceneState())

export const AdminSceneService = {
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/ScopeTypeService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ const getScopeTypesReceptor = (action: typeof AdminScopeTypeActions.getScopeType
export const AdminScopeTypeReceptor = {
getScopeTypesReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessScopeTypeState = () => getMutableState(AdminScopeTypeState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useScopeTypeState = () => useState(accessScopeTypeState())

//Service
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/ServerInfoService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ export const AdminServerInfoReceptors = {
fetchServerInfoRetrievedReceptor,
serverInfoPodRemovedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessServerInfoState = () => getMutableState(AdminServerInfoState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useServerInfoState = () => useState(accessServerInfoState())

//Service
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/ServerLogsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ export const AdminServerLogsReceptors = {
fetchServerLogsRequestedReceptor,
fetchServerLogsRetrievedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessServerLogsState = () => getMutableState(AdminServerLogsState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useServerLogsState = () => useState(accessServerLogsState())

//Service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ const redisSettingRetrievedReceptor = (action: typeof AdminRedisSettingActions.r
export const RedisSettingReceptors = {
redisSettingRetrievedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessAdminRedisSettingState = () => getMutableState(AdminRedisSettingsState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useAdminRedisSettingState = () => useState(accessAdminRedisSettingState())

export const AdminRedisSettingService = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ export const AuthSettingsServiceReceptor = (action) => {
// authSettingRetrievedReceptor,
// authSettingPatchedReceptor
// }

/**@deprecated use getMutableState directly instead */
export const accessAuthSettingState = () => getMutableState(AuthSettingsState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useAuthSettingState = () => useState(accessAuthSettingState())

export const AuthSettingsService = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export const AwsSettingReceptors = {
awsSettingRetrievedReceptor,
awsSettingPatchedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessAdminAwsSettingState = () => getMutableState(AdminAwsSettingState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useAdminAwsSettingState = () => useState(accessAdminAwsSettingState())

export const AwsSettingService = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ const chargebeeSettingRetrievedReceptor = (
export const AdminChargebeeReceptors = {
chargebeeSettingRetrievedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessAdminChargebeeSettingState = () => getMutableState(AdminChargebeeSettingsState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useAdminChargebeeSettingState = () => useState(accessAdminChargebeeSettingState())

export const ChargebeeSettingService = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ export const ClientSettingsServiceReceptor = (action) => {
// fetchedClientReceptor,
// clientSettingPatchedReceptor
// }

/**@deprecated use getMutableState directly instead */
export const accessClientSettingState = () => getMutableState(AdminClientSettingsState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useClientSettingState = () => useState(accessClientSettingState())

export const ClientSettingService = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ const fetchedCoilReceptor = (action: typeof AdminCoilSettingActions.fetchedCoil.
export const CoilSettingReceptors = {
fetchedCoilReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessCoilSettingState = () => getMutableState(AdminCoilSettingsState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useCoilSettingState = () => useState(accessCoilSettingState())

export const AdminCoilSettingService = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export const EmailSettingReceptors = {
fetchedEmailReceptor,
emailSettingPatchedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessEmailSettingState = () => getMutableState(AdminEmailSettingsState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useEmailSettingState = () => useState(accessEmailSettingState())

export const EmailSettingService = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ const fetchedInstanceServerReceptor = (
export const AdminInstanceServerReceptors = {
fetchedInstanceServerReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessInstanceServerSettingState = () => getMutableState(AdminInstanceServerSettingsState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useInstanceServerSettingState = () => useState(accessInstanceServerSettingState())

export const InstanceServerSettingService = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const projectSettingFetchedReceptor = (
export const ProjectSettingReceptors = {
projectSettingFetchedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessProjectSettingState = () => getMutableState(AdminProjectSettingsState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useProjectSettingState = () => useState(accessProjectSettingState())

export const ProjectSettingService = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export const ServerSettingReceptors = {
fetchedSeverInfoReceptor,
serverSettingPatchedReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessServerSettingState = () => getMutableState(AdminServerSettingsState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useServerSettingState = () => useState(accessServerSettingState())

export const ServerSettingService = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ const fetchedTaskServersReceptor = (action: typeof AdminTaskServerSettingActions
export const TaskServerSettingReceptors = {
fetchedTaskServersReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessSettingTaskServerState = () => getMutableState(AdminTaskServerSettingsState)
/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useSettingTaskServerState = () => useState(accessSettingTaskServerState())

export const AdminSettingTaskServerService = {
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/TestBotService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ export const AdminTestBotReceptors = {
spawnBotsReceptor,
spawnedBotsReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessTestBotState = () => getMutableState(AdminTestBotState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useTestBotState = () => useState(accessTestBotState())

//Service
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/admin/services/UserService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ export const AdminUserReceptors = {
setSkipGuestsReceptor,
resetFilterReceptor
}

/**@deprecated use getMutableState directly instead */
export const accessUserState = () => getMutableState(AdminUserState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useUserState = () => useState(accessUserState())

//Service
Expand Down
4 changes: 2 additions & 2 deletions packages/client-core/src/common/services/AppLoadingService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export const AppLoadingServiceReceptor = (action) => {
})
})
}

/**@deprecated use getMutableState directly instead */
export const accessLoadingState = () => getMutableState(AppLoadingState)

/**@deprecated use useHookstate(getMutableState(...) directly instead */
export const useLoadingState = () => useState(accessLoadingState())

export class AppLoadingAction {
Expand Down
Loading

0 comments on commit 418b3ef

Please sign in to comment.