@clxmedia/types 1.0.203 → 1.0.205

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,5 +1,5 @@
1
1
  import type { CLiQUserLocator, CLiQUserLocatorSlug } from "../auth";
2
- import type { CLXFormRuleSet } from "../clxforms";
2
+ import { CLXFormRuleSet } from "../clxforms";
3
3
  import type { EnterpriseEventSlugs } from "../events";
4
4
  export type CLXSortDirection = "asc" | "desc";
5
5
  export type ISODateString = `${number}-${number}-${number}`;
@@ -10,6 +10,7 @@ export type CLXTaskFilter = {
10
10
  master_id?: number;
11
11
  include_closed?: boolean;
12
12
  slug?: string;
13
+ awaiting_verification?: boolean;
13
14
  take?: number;
14
15
  skip?: number;
15
16
  sort_by?: string;
@@ -21,13 +22,13 @@ export type PagedResult<T> = {
21
22
  take: number;
22
23
  skip: number;
23
24
  };
24
- export type CLXProjectActionType = "create" | "activate" | "complete" | "notify" | "archive";
25
+ export type CLXProjectActionType = "activate" | "complete" | "create" | "notify" | "archive";
25
26
  export type CLXProjectStepInstance = {
26
27
  id: number;
27
28
  project_id: number;
28
29
  name: string;
29
30
  status: CLXTaskStatus;
30
- project_tasks: CLXTask[];
31
+ project_tasks: CLXTaskWithStatus[];
31
32
  };
32
33
  export type CLXUserInstance = {
33
34
  id: number;
@@ -49,7 +50,7 @@ export type CLXProjectInstance = {
49
50
  archived_at: Date | null;
50
51
  steps: CLXProjectStepInstance[];
51
52
  };
52
- export type CLXTaskActionType = "create" | "activate" | "assign" | "comment" | "notify" | "skip" | "complete";
53
+ export type CLXTaskActionType = "create" | "activate" | "assign" | "comment" | "notify" | "start" | "reject" | "skip" | "complete" | "verify" | "close";
53
54
  export type CLXTaskTargetNone = {
54
55
  type: "none";
55
56
  };
@@ -144,37 +145,57 @@ export type TaskReminderConfig = {
144
145
  schedule: TaskReminderScheduleEntry[];
145
146
  };
146
147
  export type TaskActivateReminderConfig = TaskReminderConfig & {
147
- origin_status: "create";
148
148
  target_status: "activate";
149
+ origin_status: "create";
149
150
  };
150
- export type TaskCompleteReminderConfig = TaskReminderConfig & {
151
+ export type TaskStartReminderConfig = TaskReminderConfig & {
152
+ target_status: "start";
151
153
  origin_status: "activate";
154
+ };
155
+ export type TaskCompleteReminderConfig = TaskReminderConfig & {
152
156
  target_status: "complete";
157
+ origin_status: "start";
158
+ };
159
+ export type TaskVerifyReminderConfig = TaskReminderConfig & {
160
+ target_status: "verify";
161
+ origin_status: "complete";
162
+ };
163
+ export type TaskCloseReminderConfig = TaskReminderConfig & {
164
+ target_status: "close";
165
+ origin_status: "verify";
153
166
  };
154
167
  export type TaskReminderScheduleConfig = {
155
168
  activate?: TaskActivateReminderConfig;
169
+ start?: TaskStartReminderConfig;
156
170
  complete?: TaskCompleteReminderConfig;
171
+ verify?: TaskVerifyReminderConfig;
172
+ close?: TaskCloseReminderConfig;
157
173
  };
158
- export type TaskReminderConfigTypes = TaskActivateReminderConfig | TaskCompleteReminderConfig;
159
- export type ProjectReminderConfigTypes = ProjectActivateReminderConfig | ProjectCompleteReminderConfig;
174
+ export type TaskReminderConfigTypes = TaskActivateReminderConfig | TaskStartReminderConfig | TaskCompleteReminderConfig | TaskVerifyReminderConfig | TaskCloseReminderConfig;
175
+ export type ProjectReminderConfigTypes = ProjectActivateReminderConfig | ProjectCompleteReminderConfig | ProjectArchiveReminderConfig;
160
176
  export type ProjectActivateReminderConfig = ProjectReminderConfig & {
161
- origin_status: "create";
162
177
  target_status: "activate";
178
+ origin_status: "create";
163
179
  };
164
180
  export type ProjectCompleteReminderConfig = ProjectReminderConfig & {
165
- origin_status: "activate";
166
181
  target_status: "complete";
182
+ origin_status: "activate";
183
+ };
184
+ export type ProjectArchiveReminderConfig = ProjectReminderConfig & {
185
+ target_status: "archive";
186
+ origin_status: "complete";
167
187
  };
168
188
  export type ProjectReminderScheduleConfig = {
169
189
  activate?: ProjectActivateReminderConfig;
170
190
  complete?: ProjectCompleteReminderConfig;
191
+ archive?: ProjectArchiveReminderConfig;
171
192
  };
172
193
  export type ProjectReminderConfig = {
173
194
  origin_status: CLXProjectActionType;
174
195
  template_slug: string;
175
196
  schedule: ProjectReminderScheduleEntry[];
176
197
  };
177
- export type CLXPriority = number;
198
+ export type CLXPriority = "low" | "normal" | "urgent";
178
199
  export type CLXTaskChecklistItem = {
179
200
  guid: string;
180
201
  description: string;
@@ -182,6 +203,7 @@ export type CLXTaskChecklistItem = {
182
203
  is_done: boolean;
183
204
  };
184
205
  export type CLXTaskMetaData = {
206
+ verifier: CLiQUserLocator | null;
185
207
  resource?: {
186
208
  path: string;
187
209
  label: string;
@@ -191,12 +213,13 @@ export type CLXTaskMetaData = {
191
213
  notifications?: TaskNotificationConfig[];
192
214
  due_date?: ISODateString;
193
215
  priority?: CLXPriority;
216
+ checklist?: CLXTaskChecklistItem[];
194
217
  };
195
218
  export type CLXTaskTriggerConstraint = "event_user_to_onboarding_recipient_match" | "project_id_match";
196
219
  export type CLXTaskTriggerConfig = {
197
220
  constraints: CLXTaskTriggerConstraint[];
198
221
  };
199
- export type CLXTaskTriggerAction = "activate" | "skip" | "complete" | "require" | "optional" | "delete";
222
+ export type CLXTaskTriggerAction = "activate" | "start" | "complete" | "close" | "require" | "optional" | "delete";
200
223
  export type CLXTaskTrigger = {
201
224
  trigger_slug: EnterpriseEventSlugs;
202
225
  action_type: CLXTaskTriggerAction;
@@ -210,39 +233,28 @@ export type CLXTaskBase = {
210
233
  id: number;
211
234
  name: string;
212
235
  slug: string;
236
+ is_active: boolean;
213
237
  };
214
238
  export type CLXTaskResolution = "done" | "skipped" | "none";
215
- export type CLXTaskTag = {
216
- id: number;
217
- task_id: number;
218
- name: string;
219
- added_by_user_id?: number;
220
- comment?: string;
221
- created_at: Date;
222
- };
223
239
  export type CLXTask = CLXTaskBase & {
224
240
  id: number;
225
241
  is_required: boolean;
226
242
  conditions: CLXFormRuleSet | any;
227
243
  project_step_id?: number;
244
+ updated_at?: Date;
245
+ requires_verification: boolean;
246
+ depends_on?: CLXTaskBase;
228
247
  internal_only: boolean;
229
248
  meta_data?: CLXTaskMetaData;
230
249
  description?: string;
231
250
  instructions?: string;
232
- due_at: Date | null;
233
251
  created_at: Date;
234
- updated_at?: Date;
235
252
  closed_at: Date | null;
236
253
  master_id: number;
237
254
  entity_name: string;
238
255
  assignment: CLiQUserLocator | null;
239
256
  target: CLXTaskTargetNone | CLXTaskTarget;
240
257
  resolution: CLXTaskResolution;
241
- priority: number;
242
- activated_at: Date | null;
243
- responsibility: "internal" | "external";
244
- status: CLXTaskStatus;
245
- tags: CLXTaskTag[];
246
258
  };
247
259
  export type CLXTaskHistoryEntry = {
248
260
  id: number;
@@ -256,26 +268,17 @@ export type CLXTaskHistoryEntry = {
256
268
  email: string;
257
269
  };
258
270
  };
259
- export type TaskChecklistItem = {
260
- id: number;
261
- task_id: number;
262
- description: string;
263
- required: boolean;
264
- completed_by: number | null;
265
- order_num: number;
271
+ export type CLXTaskWithStatus = CLXTask & {
272
+ activated_at: Date | null;
273
+ started_at: Date | null;
274
+ completed_at: Date | null;
275
+ verified_at: Date | null;
276
+ skipped_at: Date | null;
277
+ responsibility: "internal" | "external";
278
+ status: CLXTaskStatus;
266
279
  };
267
- export type CLXTaskWithHistory = CLXTask & {
280
+ export type CLXTaskWithHistory = CLXTaskWithStatus & {
268
281
  history: CLXTaskHistoryEntry[];
269
- checklist?: TaskChecklistItem[];
270
- project_step?: {
271
- id: number;
272
- name: string;
273
- project: {
274
- id: number;
275
- name: string;
276
- slug: string;
277
- };
278
- };
279
282
  };
280
283
  export type TaskHistoryArchive = {
281
284
  id: number;
@@ -292,7 +295,9 @@ export type TaskArchive = {
292
295
  name: string;
293
296
  created_at: Date;
294
297
  is_required: boolean;
298
+ requires_verification: boolean;
295
299
  activated_at: Date;
300
+ completed_at: Date;
296
301
  closed_at: Date;
297
302
  resolution: string;
298
303
  history: TaskHistoryArchive[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clxmedia/types",
3
- "version": "1.0.203",
3
+ "version": "1.0.205",
4
4
  "description": "Conversion Logix TypeScript type definitions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",