@plyaz/types 1.46.8 → 1.46.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.
@@ -1,4 +1,4 @@
1
- import type { AuthTokens, AuthUser } from "./types";
1
+ import type { AuthTokens, AuthUser } from './types';
2
2
  export interface SignInCredentials {
3
3
  email: string;
4
4
  password: string;
@@ -1,4 +1,4 @@
1
- import type { AuthTokens, AuthUser } from "./types";
1
+ import type { AuthTokens, AuthUser } from './types';
2
2
  export interface SignUpData {
3
3
  email: string;
4
4
  password: string;
@@ -1,7 +1,7 @@
1
- import type { AuthAdapterUser, AuthSession, Tokens } from "./adapter-interface";
2
- import type { AuthUserPermissions } from "./client";
3
- import type { AUTHPROVIDER } from "./enums";
4
- import type { AuthCredentials, AuthTokens, AuthUser, ConnectedAccount, Session } from "./types";
1
+ import type { AuthAdapterUser, AuthSession, Tokens } from './adapter-interface';
2
+ import type { AuthUserPermissions } from './client';
3
+ import type { AUTHPROVIDER } from './enums';
4
+ import type { AuthCredentials, AuthTokens, AuthUser, ConnectedAccount, Session } from './types';
5
5
  export interface AuthState {
6
6
  user: AuthUserPermissions | null;
7
7
  tokens: AuthTokens | null;
@@ -2,7 +2,7 @@ import type { WithExpiration, WithAuthTokens } from '../common/types';
2
2
  import type { BaseErrorContext } from '../errors';
3
3
  import type { AUTH_ERROR_DEFINITIONS, USER_ROLE_STATUS } from './enums';
4
4
  import type { AuthForm } from './schemas';
5
- import type { JwtPayload } from "jsonwebtoken";
5
+ import type { JwtPayload } from 'jsonwebtoken';
6
6
  /**
7
7
  * AuthToken Interface.
8
8
  * @description Represents an authentication token set returned after a successful login or refresh.
@@ -1206,7 +1206,7 @@ export interface AuthProviderConfig {
1206
1206
  }
1207
1207
  export interface AuthenticationProvider {
1208
1208
  readonly name: string;
1209
- readonly type: "oauth" | "traditional" | "web3";
1209
+ readonly type: 'oauth' | 'traditional' | 'web3';
1210
1210
  initialize(config: AuthProviderConfig): Promise<void>;
1211
1211
  authenticate(credentials: {
1212
1212
  code: string;
@@ -1269,7 +1269,7 @@ export interface SessionMiddlewareConfig {
1269
1269
  cookieOptions: {
1270
1270
  httpOnly: boolean;
1271
1271
  secure: boolean;
1272
- sameSite: "strict" | "lax" | "none";
1272
+ sameSite: 'strict' | 'lax' | 'none';
1273
1273
  path: string;
1274
1274
  };
1275
1275
  }
@@ -1287,7 +1287,7 @@ export interface CookieStoreConfig extends Partial<SessionStoreConfig> {
1287
1287
  /** HttpOnly flag */
1288
1288
  httpOnly?: boolean;
1289
1289
  /** SameSite policy */
1290
- sameSite?: "strict" | "lax" | "none";
1290
+ sameSite?: 'strict' | 'lax' | 'none';
1291
1291
  }
1292
1292
  /**
1293
1293
  * User context for session creation
@@ -1362,7 +1362,7 @@ export interface RedisStoreConfig extends Partial<SessionStoreConfig> {
1362
1362
  /** Enable compression for large sessions */
1363
1363
  compression?: boolean;
1364
1364
  /** Serialization format */
1365
- serialization?: "json" | "msgpack";
1365
+ serialization?: 'json' | 'msgpack';
1366
1366
  }
1367
1367
  /**
1368
1368
  * Mock Redis client interface for development
@@ -1431,7 +1431,7 @@ export interface RefreshTokenPayload {
1431
1431
  /** Token generation number */
1432
1432
  generation?: number;
1433
1433
  /** Token type */
1434
- type: "refresh";
1434
+ type: 'refresh';
1435
1435
  /** Issued at */
1436
1436
  iat: number;
1437
1437
  /** Expires at */
@@ -1454,7 +1454,7 @@ export interface AccessTokenPayload {
1454
1454
  /** User permissions */
1455
1455
  permissions?: string[];
1456
1456
  /** Token type */
1457
- type: "access";
1457
+ type: 'access';
1458
1458
  /** Issued at */
1459
1459
  iat: number;
1460
1460
  /** Expires at */
@@ -1508,7 +1508,7 @@ export interface ValidatedTokenPayload extends JwtPayload {
1508
1508
  /** User permissions */
1509
1509
  permissions?: string[];
1510
1510
  /** Token type */
1511
- type?: "access" | "refresh";
1511
+ type?: 'access' | 'refresh';
1512
1512
  }
1513
1513
  /**
1514
1514
  * Token validation result
@@ -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, } from './types';
@@ -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,18 @@ 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
+ }
283
296
  /**
284
297
  * Database row type for Campaign entity
285
298
  */
package/dist/index.cjs CHANGED
@@ -8370,6 +8370,7 @@ var PAYMENT_EVENT_TYPE = /* @__PURE__ */ ((PAYMENT_EVENT_TYPE2) => {
8370
8370
  PAYMENT_EVENT_TYPE2["PaymentCaptured"] = "payment.captured";
8371
8371
  PAYMENT_EVENT_TYPE2["PaymentHeld"] = "payment.held";
8372
8372
  PAYMENT_EVENT_TYPE2["PaymentReleased"] = "payment.released";
8373
+ PAYMENT_EVENT_TYPE2["PaymentPending"] = "payment.pending";
8373
8374
  PAYMENT_EVENT_TYPE2["RefundRequested"] = "refund.requested";
8374
8375
  PAYMENT_EVENT_TYPE2["RefundApproved"] = "refund.approved";
8375
8376
  PAYMENT_EVENT_TYPE2["RefundRejected"] = "refund.rejected";
@@ -8618,14 +8619,6 @@ var REQUIREDACTIONTYPE = /* @__PURE__ */ ((REQUIREDACTIONTYPE2) => {
8618
8619
  return REQUIREDACTIONTYPE2;
8619
8620
  })(REQUIREDACTIONTYPE || {});
8620
8621
 
8621
- // src/payments/gateways/provider/plans/enums.ts
8622
- var PROVIDER_PRODUCT_STATUS = /* @__PURE__ */ ((PROVIDER_PRODUCT_STATUS2) => {
8623
- PROVIDER_PRODUCT_STATUS2["Active"] = "active";
8624
- PROVIDER_PRODUCT_STATUS2["Inactive"] = "inactive";
8625
- PROVIDER_PRODUCT_STATUS2["Archived"] = "archived";
8626
- return PROVIDER_PRODUCT_STATUS2;
8627
- })(PROVIDER_PRODUCT_STATUS || {});
8628
-
8629
8622
  // src/payments/gateways/provider/fee/enum.ts
8630
8623
  var FEE_TYPE = /* @__PURE__ */ ((FEE_TYPE2) => {
8631
8624
  FEE_TYPE2["Platform"] = "platform";
@@ -10205,7 +10198,6 @@ exports.PERFORMANCE_METRIC_TYPE = PERFORMANCE_METRIC_TYPE;
10205
10198
  exports.PRIORITY_LEVEL = PRIORITY_LEVEL;
10206
10199
  exports.PRODUCT_TYPE = PRODUCT_TYPE;
10207
10200
  exports.PROVIDERTYPE = PROVIDERTYPE;
10208
- exports.PROVIDER_PRODUCT_STATUS = PROVIDER_PRODUCT_STATUS;
10209
10201
  exports.PUB_SUB_EVENT = PUB_SUB_EVENT;
10210
10202
  exports.PatchCampaignSchema = PatchCampaignSchema;
10211
10203
  exports.PatchFilesSchema = PatchFilesSchema;