@plyaz/types 1.45.9 → 1.45.10
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/campaign/types.d.ts +29 -6
- package/package.json +1 -1
package/dist/campaign/types.d.ts
CHANGED
|
@@ -143,7 +143,9 @@ export type CampaignValidationFailedPayload = CoreValidationFailedPayload;
|
|
|
143
143
|
* Used for setData() - only items is required, selectedId is preserved if not provided
|
|
144
144
|
*/
|
|
145
145
|
export interface CampaignFrontendStoreData {
|
|
146
|
-
|
|
146
|
+
campaigns: CampaignEntity[];
|
|
147
|
+
/** @deprecated Use `campaigns` instead */
|
|
148
|
+
items?: CampaignEntity[];
|
|
147
149
|
/** Optional - if not provided, current selection is preserved */
|
|
148
150
|
selectedId?: string | null;
|
|
149
151
|
}
|
|
@@ -152,19 +154,40 @@ export interface CampaignFrontendStoreData {
|
|
|
152
154
|
*/
|
|
153
155
|
export interface CampaignFrontendStoreState {
|
|
154
156
|
/** Array of campaign items */
|
|
155
|
-
|
|
157
|
+
campaigns: CampaignEntity[];
|
|
158
|
+
/** @deprecated Use `campaigns` instead */
|
|
159
|
+
items?: CampaignEntity[];
|
|
156
160
|
/** Currently selected item ID */
|
|
157
161
|
selectedId: string | null;
|
|
158
162
|
/** Loading state */
|
|
159
163
|
isLoading: boolean;
|
|
160
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* Core base methods for campaign store.
|
|
167
|
+
* Inherited from CoreBaseFrontendStore - used by slice factory.
|
|
168
|
+
*/
|
|
169
|
+
export type CampaignCoreBaseMethods = CoreBaseFrontendStore<CampaignFrontendStoreData>;
|
|
170
|
+
/**
|
|
171
|
+
* Campaign-specific actions (not from CoreBaseFrontendStore)
|
|
172
|
+
*/
|
|
173
|
+
export interface CampaignSpecificActions {
|
|
174
|
+
/** Select a campaign by ID */
|
|
175
|
+
selectCampaign: (id: string | null) => void;
|
|
176
|
+
/** Add a campaign */
|
|
177
|
+
addCampaign: (item: CampaignEntity) => void;
|
|
178
|
+
/** Update a campaign by ID */
|
|
179
|
+
updateCampaign: (id: string, item: Partial<CampaignEntity>) => void;
|
|
180
|
+
/** Remove a campaign by ID */
|
|
181
|
+
removeCampaign: (id: string) => void;
|
|
182
|
+
/** Clear all campaigns */
|
|
183
|
+
clearCampaigns: () => void;
|
|
184
|
+
}
|
|
161
185
|
/**
|
|
162
186
|
* Campaign frontend store actions.
|
|
163
|
-
* Extends CoreBaseFrontendStore
|
|
187
|
+
* Extends CoreBaseFrontendStore to provide standard CRUD integration
|
|
188
|
+
* with BaseFrontendDomainService (fetchAll, delete, etc.)
|
|
164
189
|
*/
|
|
165
|
-
export interface CampaignFrontendStoreActions extends
|
|
166
|
-
/** Select an item by ID */
|
|
167
|
-
selectItem: (id: string | null) => void;
|
|
190
|
+
export interface CampaignFrontendStoreActions extends CampaignCoreBaseMethods, CampaignSpecificActions {
|
|
168
191
|
}
|
|
169
192
|
/**
|
|
170
193
|
* Complete campaign frontend store slice (state + actions).
|
package/package.json
CHANGED