refactor: configure cache api clients via constructor options

This commit is contained in:
Shivam Mishra
2026-06-10 12:46:10 +05:30
parent ac5b3a38c5
commit 880c5e8bf4
7 changed files with 30 additions and 86 deletions
+5 -6
View File
@@ -2,12 +2,11 @@ import CacheEnabledApiClient from './CacheEnabledApiClient';
class LabelsAPI extends CacheEnabledApiClient {
constructor() {
super('labels', { accountScoped: true });
}
// eslint-disable-next-line class-methods-use-this
get cacheModelName() {
return 'label';
super('labels', {
accountScoped: true,
cacheModel: 'label',
payloadEnvelope: true,
});
}
}