@plyaz/types 1.46.9 → 1.46.11
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/index.d.ts +1 -1
- package/dist/campaign/types.d.ts +51 -0
- package/package.json +1 -1
package/dist/campaign/index.d.ts
CHANGED
|
@@ -16,4 +16,4 @@
|
|
|
16
16
|
export { CreateCampaignSchema, UpdateCampaignSchema, PatchCampaignSchema, QueryCampaignSchema, DeleteCampaignSchema, CampaignResponseSchema, CampaignListResponseSchema, formCampaignSchema, } from './schemas';
|
|
17
17
|
export type { FormCampaignData } from './schemas';
|
|
18
18
|
export { CAMPAIGN_STATUS, MILESTONE_TRIGGER_TYPE, MILESTONE_STATUS } from './enums';
|
|
19
|
-
export type { CreateCampaignDTO, UpdateCampaignDTO, PatchCampaignDTO, QueryCampaignDTO, DeleteCampaignDTO, UpdateCampaignParams, CampaignResponseDTO, CampaignListResponseDTO, CampaignEntity, CampaignStoreItem, CampaignStoreState, CampaignCreatedPayload, CampaignUpdatedPayload, CampaignDeletedPayload, CampaignValidationFailedPayload, CampaignFrontendStoreData, CampaignFrontendStoreState, CampaignFrontendStoreActions, CampaignCoreBaseMethods, CampaignSpecificActions, CampaignFrontendStoreSlice, CampaignFrontendServiceConfig, CampaignFrontendEventType, CampaignDomainServiceConfig, OverviewDataItem, OverviewData, FormCampaignDataInterface, DraftCampaignData, CampaignDatabaseRow, } from './types';
|
|
19
|
+
export type { CreateCampaignDTO, UpdateCampaignDTO, PatchCampaignDTO, QueryCampaignDTO, DeleteCampaignDTO, UpdateCampaignParams, CampaignResponseDTO, CampaignListResponseDTO, CampaignEntity, CampaignStoreItem, CampaignStoreState, CampaignCreatedPayload, CampaignUpdatedPayload, CampaignDeletedPayload, CampaignValidationFailedPayload, CampaignFrontendStoreData, CampaignFrontendStoreState, CampaignFrontendStoreActions, CampaignCoreBaseMethods, CampaignSpecificActions, CampaignFrontendStoreSlice, CampaignFrontendServiceConfig, CampaignFrontendEventType, CampaignDomainServiceConfig, OverviewDataItem, OverviewData, FormCampaignDataInterface, DraftCampaignData, CampaignDatabaseRow, CampaignManager, CampaignFileOperations, CampaignOperations, CampaignFileUpload, } from './types';
|
package/dist/campaign/types.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Inferred from Zod schemas where possible.
|
|
6
6
|
*/
|
|
7
7
|
import type { z } from 'zod';
|
|
8
|
+
import type { Dispatch, SetStateAction } from 'react';
|
|
8
9
|
import type { CreateCampaignSchema, UpdateCampaignSchema, PatchCampaignSchema, QueryCampaignSchema, DeleteCampaignSchema, CampaignResponseSchema, CampaignListResponseSchema } from './schemas';
|
|
9
10
|
import type { CoreEntityCreatedPayload, CoreEntityUpdatedPayload, CoreEntityDeletedPayload, CoreValidationFailedPayload } from '../core/events';
|
|
10
11
|
import type { CoreBaseFrontendStore, CoreBaseFrontendServiceConfig } from '../core/frontend';
|
|
@@ -280,6 +281,56 @@ export interface DraftCampaignData extends FormCampaignDataInterface {
|
|
|
280
281
|
/** Timestamp when the draft was last saved */
|
|
281
282
|
lastSavedAt: Date;
|
|
282
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* Campaign hook return interface
|
|
286
|
+
* Provides campaigns data and CRUD operations
|
|
287
|
+
*/
|
|
288
|
+
export interface CampaignManager {
|
|
289
|
+
campaigns: CampaignEntity[];
|
|
290
|
+
setCampaigns: Dispatch<SetStateAction<CampaignEntity[]>>;
|
|
291
|
+
fetchCampaigns: (query?: QueryCampaignDTO) => Promise<void>;
|
|
292
|
+
createCampaign: (data: CreateCampaignDTO) => Promise<CampaignEntity | null>;
|
|
293
|
+
updateCampaign: (id: string, data: PatchCampaignDTO) => Promise<CampaignEntity | null>;
|
|
294
|
+
deleteCampaign: (id: string) => Promise<boolean>;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Campaign file operations interface
|
|
298
|
+
* Provides file upload operations for campaigns
|
|
299
|
+
*/
|
|
300
|
+
export interface CampaignFileOperations {
|
|
301
|
+
createWithFiles: (data: CreateCampaignDTO & {
|
|
302
|
+
files?: Record<string, File | File[]>;
|
|
303
|
+
}, setCampaigns: Dispatch<SetStateAction<CampaignEntity[]>>) => Promise<CampaignEntity | null>;
|
|
304
|
+
updateWithFiles: (id: string, data: PatchCampaignDTO & {
|
|
305
|
+
files?: Record<string, File | File[]>;
|
|
306
|
+
}, setCampaigns: Dispatch<SetStateAction<CampaignEntity[]>>) => Promise<CampaignEntity | null>;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Enhanced campaign operations interface
|
|
310
|
+
* Combines basic operations with file upload capabilities
|
|
311
|
+
*/
|
|
312
|
+
export interface CampaignOperations {
|
|
313
|
+
campaigns: CampaignEntity[];
|
|
314
|
+
fetchCampaigns: (query?: QueryCampaignDTO) => Promise<void>;
|
|
315
|
+
createCampaign: (data: CreateCampaignDTO) => Promise<CampaignEntity | null>;
|
|
316
|
+
createCampaignWithFiles: (data: CreateCampaignDTO & {
|
|
317
|
+
files?: Record<string, File | File[]>;
|
|
318
|
+
}) => Promise<CampaignEntity | null>;
|
|
319
|
+
updateCampaign: (id: string, data: PatchCampaignDTO) => Promise<CampaignEntity | null>;
|
|
320
|
+
updateCampaignWithFiles: (id: string, data: PatchCampaignDTO & {
|
|
321
|
+
files?: Record<string, File | File[]>;
|
|
322
|
+
}) => Promise<CampaignEntity | null>;
|
|
323
|
+
deleteCampaign: (id: string) => Promise<boolean>;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Campaign file upload interface
|
|
327
|
+
* Provides file upload methods for campaigns
|
|
328
|
+
*/
|
|
329
|
+
export interface CampaignFileUpload {
|
|
330
|
+
uploadCampaignImages: (files: File[], campaignId?: string) => Promise<string[]>;
|
|
331
|
+
uploadCampaignVideos: (files: File[], campaignId?: string) => Promise<string[]>;
|
|
332
|
+
uploadCampaignDocuments: (files: File[], campaignId?: string) => Promise<string[]>;
|
|
333
|
+
}
|
|
283
334
|
/**
|
|
284
335
|
* Database row type for Campaign entity
|
|
285
336
|
*/
|
package/package.json
CHANGED