Initial push of Plunk Next
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "@plunk/types",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"clean": "rimraf node_modules .turbo"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@plunk/typescript-config": "*",
|
||||
"@types/node": "22.10.5",
|
||||
"@types/react": "^19",
|
||||
"typescript": "5.7.2"
|
||||
},
|
||||
"exports": {
|
||||
"./integrations/*": "./src/integrations/*.ts",
|
||||
"./swyp/*": "./src/swyp/*.ts",
|
||||
".": "./src/index.ts"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
// Segment filter types
|
||||
export interface SegmentFilter {
|
||||
field: string;
|
||||
operator:
|
||||
| 'equals'
|
||||
| 'notEquals'
|
||||
| 'contains'
|
||||
| 'notContains'
|
||||
| 'greaterThan'
|
||||
| 'lessThan'
|
||||
| 'greaterThanOrEqual'
|
||||
| 'lessThanOrEqual'
|
||||
| 'exists'
|
||||
| 'notExists'
|
||||
| 'within';
|
||||
value?: any;
|
||||
unit?: 'days' | 'hours' | 'minutes';
|
||||
}
|
||||
|
||||
export interface CreateSegmentData {
|
||||
name: string;
|
||||
description?: string;
|
||||
filters: SegmentFilter[];
|
||||
trackMembership?: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateSegmentData {
|
||||
name?: string;
|
||||
description?: string;
|
||||
filters?: SegmentFilter[];
|
||||
trackMembership?: boolean;
|
||||
}
|
||||
|
||||
export interface SegmentMembershipComputeResult {
|
||||
added: number;
|
||||
removed: number;
|
||||
total: number;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "@plunk/typescript-config/base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user