@clxmedia/types 1.0.67 → 1.0.69

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.
@@ -0,0 +1,46 @@
1
+ type ConditionalEnterpriseEvent<T = {}> = T extends {
2
+ event_item_id: any;
3
+ } ? {
4
+ application_source: string;
5
+ event_item_type: string;
6
+ } : T extends {
7
+ event_item_type: any;
8
+ } ? {
9
+ application_source: string;
10
+ } : {};
11
+ export type EnterpriseEventApplicationSource = 'mediahub' | 'gbpa' | 'ad-broker' | 'clx-forms' | string;
12
+ export type EnterpriseEventAction = 'client-review-approval' | 'updated-proof' | 'published' | 'publish-failed-error' | 'created-proof' | 'update-live-post' | 'update-live-post-failed' | 'deleted-proof' | 'concession-update' | 'unarchive' | 'create_internal_label' | 'creation' | 'pause' | 'proofing' | 'share-form' | string;
13
+ export type EnterpriseEventItemType = 'asset' | 'proof' | 'concession-automation' | 'onboarding' | string;
14
+ export type EnterpriseEvent = {
15
+ user_email: string;
16
+ description: string;
17
+ application_source: EnterpriseEventApplicationSource;
18
+ event_action: EnterpriseEventAction;
19
+ event_unix_time_ms: number;
20
+ master_id?: number;
21
+ event_item_id?: string;
22
+ event_item_type?: EnterpriseEventItemType;
23
+ event_item_name?: string;
24
+ } & ConditionalEnterpriseEvent;
25
+ export type ServiceKeys = 'accessToken' | 'jwtConfig';
26
+ export type AccessConfigs = {
27
+ accessToken?: string;
28
+ jwtConfig?: {
29
+ jwtEmail: string;
30
+ jwtSecret: string;
31
+ };
32
+ };
33
+ export type AccessConfig = {
34
+ [K in ServiceKeys]: {
35
+ [P in K]: AccessConfigs[K];
36
+ };
37
+ }[ServiceKeys];
38
+ export interface XperienceCoreClientConfig {
39
+ server: string;
40
+ accessConfig: AccessConfig;
41
+ }
42
+ export type XperienceGCPConfig = {
43
+ project: string;
44
+ location: string;
45
+ };
46
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,7 @@
1
1
  export * as credstore from './credstore';
2
2
  export * as clxforms from './clxforms';
3
3
  export * as eventlog from './eventlog';
4
+ export * as events from './events';
4
5
  export * as auth from './auth';
5
6
  export * as tasks from './tasks';
7
+ export * as projects from './projects';
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tasks = exports.auth = exports.eventlog = exports.clxforms = exports.credstore = void 0;
3
+ exports.projects = exports.tasks = exports.auth = exports.events = exports.eventlog = exports.clxforms = exports.credstore = void 0;
4
4
  exports.credstore = require("./credstore");
5
5
  exports.clxforms = require("./clxforms");
6
6
  exports.eventlog = require("./eventlog");
7
+ exports.events = require("./events");
7
8
  exports.auth = require("./auth");
8
9
  exports.tasks = require("./tasks");
10
+ exports.projects = require("./projects");
@@ -0,0 +1,63 @@
1
+ import { CLXFormRuleSet } from "../clxforms";
2
+ export type CLXProjectStepStatus = "pending" | "open" | "complete";
3
+ export type CLXProjectStepSlug = string;
4
+ export type CLXProjectTaskTemplate = {
5
+ description: string;
6
+ slug: string;
7
+ task_type_id: number;
8
+ default_required?: boolean;
9
+ };
10
+ export type CLXProjectStepTemplate = {
11
+ name: string;
12
+ slug: string;
13
+ status: CLXProjectStepStatus;
14
+ tasks: CLXProjectTaskTemplate[];
15
+ };
16
+ export type CLXProjectTemplate = {
17
+ name: string;
18
+ slug: string;
19
+ steps: CLXProjectStepTemplate[];
20
+ };
21
+ export type CLXProject = {
22
+ name: string;
23
+ slug: string;
24
+ steps: CLXProjectStepTemplate[];
25
+ };
26
+ export type CLXTaskInstance = {
27
+ id: number;
28
+ slug: string;
29
+ task_type_id: number;
30
+ description: string;
31
+ master_id: number;
32
+ assigned_to_user_id: number | null;
33
+ created_at: Date;
34
+ closed_at: Date | null;
35
+ };
36
+ export type CLXProjectTaskInstance = {
37
+ id: number;
38
+ is_required: boolean;
39
+ conditions: CLXFormRuleSet | any;
40
+ project_step_id: number;
41
+ task_id: number;
42
+ created_at: Date;
43
+ updated_at: Date;
44
+ task: CLXTaskInstance;
45
+ };
46
+ export type CLXProjectStepInstance = {
47
+ id: number;
48
+ project_id: number;
49
+ name: string;
50
+ slug: string;
51
+ status: CLXProjectStepStatus;
52
+ tasks: CLXProjectTaskInstance[];
53
+ };
54
+ export type CLXProjectInstance = {
55
+ id: number;
56
+ master_id: number;
57
+ name: string;
58
+ slug: string;
59
+ created_at: Date;
60
+ updated_at: Date;
61
+ archived_at: Date | null;
62
+ steps: CLXProjectStepInstance[];
63
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clxmedia/types",
3
- "version": "1.0.67",
3
+ "version": "1.0.69",
4
4
  "description": "Conversion Logix TypeScript type definitions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,6 +25,10 @@
25
25
  "types": "./dist/core/tasks/index.d.ts",
26
26
  "default": "./dist/core/tasks/index.js"
27
27
  },
28
+ "./core/projects": {
29
+ "types": "./dist/core/projects/index.d.ts",
30
+ "default": "./dist/core/projects/index.js"
31
+ },
28
32
  "./core/clxforms": {
29
33
  "types": "./dist/core/clxforms/index.d.ts",
30
34
  "default": "./dist/core/clxforms/index.js"
@@ -37,6 +41,10 @@
37
41
  "types": "./dist/core/eventlog/index.d.ts",
38
42
  "default": "./dist/core/eventlog/index.js"
39
43
  },
44
+ "./core/events": {
45
+ "types": "./dist/core/events/index.d.ts",
46
+ "default": "./dist/core/events/index.js"
47
+ },
40
48
  "./emailhub": {
41
49
  "types": "./dist/emailhub/index.d.ts",
42
50
  "default": "./dist/emailhub/index.js"
@@ -57,6 +65,9 @@
57
65
  "core/tasks": [
58
66
  "dist/core/tasks/index.d.ts"
59
67
  ],
68
+ "core/projects": [
69
+ "dist/core/projects/index.d.ts"
70
+ ],
60
71
  "core/clxforms": [
61
72
  "dist/core/clxforms/index.d.ts"
62
73
  ],
@@ -66,6 +77,9 @@
66
77
  "core/eventlog": [
67
78
  "dist/core/eventlog/index.d.ts"
68
79
  ],
80
+ "core/events": [
81
+ "dist/core/events/index.d.ts"
82
+ ],
69
83
  "emailhub": [
70
84
  "dist/emailhub/index.d.ts"
71
85
  ],