@new-project-media/client-frontends-shared-types 3.13.2 → 3.13.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@new-project-media/client-frontends-shared-types",
3
- "version": "3.13.2",
3
+ "version": "3.13.3",
4
4
  "scripts": {
5
5
  "build": "tsc -p tsconfig.json",
6
6
  "postbuild": "mkdir -p ../../dist/packages/client-frontends-shared-types/ && cp package.json ../../dist/packages/client-frontends-shared-types/",
package/src/index.d.ts CHANGED
@@ -7,3 +7,4 @@ export * from './lib/userLocalePreference';
7
7
  export * from './lib/userSizeUnits';
8
8
  export * from './lib/dashboard';
9
9
  export * from './lib/identifier';
10
+ export * from './lib/intel';
package/src/index.js CHANGED
@@ -10,4 +10,5 @@ tslib_1.__exportStar(require("./lib/userLocalePreference"), exports);
10
10
  tslib_1.__exportStar(require("./lib/userSizeUnits"), exports);
11
11
  tslib_1.__exportStar(require("./lib/dashboard"), exports);
12
12
  tslib_1.__exportStar(require("./lib/identifier"), exports);
13
+ tslib_1.__exportStar(require("./lib/intel"), exports);
13
14
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/client-frontends-shared-types/src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,wDAA6B;AAC7B,yDAA8B;AAC9B,0DAA+B;AAC/B,+DAAoC;AACpC,qEAA0C;AAC1C,8DAAmC;AACnC,0DAA+B;AAC/B,2DAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/client-frontends-shared-types/src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B;AAC5B,wDAA6B;AAC7B,yDAA8B;AAC9B,0DAA+B;AAC/B,+DAAoC;AACpC,qEAA0C;AAC1C,8DAAmC;AACnC,0DAA+B;AAC/B,2DAAgC;AAChC,sDAA2B"}
@@ -0,0 +1,2 @@
1
+ export * from './intel';
2
+ export * from './intel-chart';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./intel"), exports);
5
+ tslib_1.__exportStar(require("./intel-chart"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/client-frontends-shared-types/src/lib/intel/index.ts"],"names":[],"mappings":";;;AAAA,kDAAuB;AACvB,wDAA6B"}
@@ -0,0 +1,48 @@
1
+ export type Stats = {
2
+ data: Data;
3
+ }[] | StatusCode;
4
+ export type Data = {
5
+ setName: string;
6
+ field: string;
7
+ set: Set[];
8
+ nested?: boolean;
9
+ count: number;
10
+ value?: string;
11
+ parser?: string;
12
+ };
13
+ type MetricKey = 'sectors' | 'status';
14
+ export type Metric = {
15
+ [K in MetricKey]: {
16
+ key: string;
17
+ count: number;
18
+ totalMWs: number;
19
+ };
20
+ };
21
+ export type Set = {
22
+ key: string;
23
+ count: number;
24
+ min?: number;
25
+ max?: number;
26
+ avg?: number;
27
+ sum?: number;
28
+ totalMWs: number;
29
+ field: string;
30
+ setName: string;
31
+ id?: string;
32
+ } & Metric;
33
+ type StatusCode = {
34
+ statusCode: number;
35
+ };
36
+ export type QueueChartData = {
37
+ data: Data;
38
+ };
39
+ export interface QueueWrapperResponse {
40
+ intelOnly: boolean;
41
+ queueData: QueueChartData[];
42
+ queueStats: number;
43
+ queueParamName: string;
44
+ queueKeys: QueueChartData[] | undefined;
45
+ chartHeader: string;
46
+ getQueuePath: (queries?: Record<string, string>[]) => string | null;
47
+ }
48
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=intel-chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intel-chart.js","sourceRoot":"","sources":["../../../../../../packages/client-frontends-shared-types/src/lib/intel/intel-chart.ts"],"names":[],"mappings":""}
@@ -0,0 +1,234 @@
1
+ export type FieldValue = {
2
+ name: string;
3
+ value?: unknown;
4
+ subHeaders?: boolean;
5
+ highlight?: boolean;
6
+ entity?: string;
7
+ spacer?: boolean;
8
+ format?: (...args: unknown[]) => unknown;
9
+ field?: string;
10
+ transform?: (...args: unknown[]) => unknown;
11
+ };
12
+ export type Schema = {
13
+ fields: Map<string, FieldValue> | Record<string, FieldValue>;
14
+ region?: Record<string, string[]>;
15
+ };
16
+ export interface IdentifierItem {
17
+ identifier: string;
18
+ id: string;
19
+ key: string;
20
+ }
21
+ export interface SourceUrl {
22
+ label: string | null;
23
+ url: string;
24
+ }
25
+ export interface FileData {
26
+ s3: boolean;
27
+ thumb_url: string;
28
+ source: string | null;
29
+ type: string;
30
+ application_id: string;
31
+ url: string;
32
+ signed_url: string;
33
+ filename: string;
34
+ size: number;
35
+ field_key: string;
36
+ checksum: string;
37
+ id: string;
38
+ signed_url_inline: string;
39
+ }
40
+ export interface IntelById {
41
+ intelParsed: string;
42
+ audiences: IdentifierItem[];
43
+ created: string;
44
+ country: IdentifierItem[];
45
+ decorator: string;
46
+ files: FileData[];
47
+ id: string;
48
+ intelChannelTags: IdentifierItem[];
49
+ intelHeadline: string;
50
+ intelSections: IdentifierItem[];
51
+ intelType: IdentifierItem[];
52
+ lastUpdated: string;
53
+ publicationDate: string;
54
+ publicationTime: string;
55
+ publishedTime: string;
56
+ regions: IdentifierItem[];
57
+ relatedIntels: IdentifierItem[];
58
+ relatedOrganizations: IdentifierItem[];
59
+ sectors: IdentifierItem[];
60
+ sourceUrl: SourceUrl;
61
+ stateProvince: IdentifierItem[];
62
+ npmJournalists: IdentifierItem[];
63
+ developerQueueChart: IdentifierItem[];
64
+ relatedProjectOrRfp: IdentifierItem[];
65
+ }
66
+ export interface IntelByIdResponse {
67
+ hits: IntelById[];
68
+ }
69
+ export interface CreateEmailResponse {
70
+ href: string;
71
+ name: string;
72
+ }
73
+ export type IntelItem = {
74
+ id?: string | number;
75
+ intelHeadline?: string;
76
+ decorator?: string;
77
+ npmJournalists?: IdentifierItem[];
78
+ intelParsed?: string;
79
+ sourceUrl?: {
80
+ url?: string;
81
+ } | null;
82
+ relatedIntels?: Array<{
83
+ id: string | number;
84
+ identifier: string;
85
+ }>;
86
+ files?: Array<{
87
+ id?: string | number;
88
+ url: string;
89
+ filename?: string;
90
+ }>;
91
+ developerQueueChart?: Array<{
92
+ id: string | number;
93
+ identifier: string;
94
+ }>;
95
+ publicationTime: string;
96
+ audiences: IdentifierItem[];
97
+ [key: string]: unknown;
98
+ };
99
+ export interface LookupForQueueParams {
100
+ id: string;
101
+ target: string;
102
+ }
103
+ export interface LookupForQueueResponse {
104
+ data: MWData | QueueData | SectorData | GeographyData | DeveloperData | UtilityData;
105
+ meta?: Record<string, unknown>;
106
+ }
107
+ export interface MWData {
108
+ setName: 'MW';
109
+ field: 'totalMw';
110
+ set: MWResult[];
111
+ }
112
+ export interface MWResult {
113
+ key: string;
114
+ count: number;
115
+ min: number;
116
+ max: number;
117
+ avg: number;
118
+ sum: number;
119
+ }
120
+ export interface QueueData {
121
+ setName: 'Queues';
122
+ nested: true;
123
+ field: 'queueDataset';
124
+ set: QueueSet[];
125
+ count: number;
126
+ value: string;
127
+ parser: string;
128
+ }
129
+ export interface QueueSet {
130
+ key: string;
131
+ count: number;
132
+ totalMWs: number;
133
+ field: 'sectors';
134
+ setName: 'sectors';
135
+ sectors: SectorBreakdown[];
136
+ }
137
+ export interface SectorBreakdown {
138
+ key: string;
139
+ count: number;
140
+ totalMWs: number;
141
+ }
142
+ export interface SectorData {
143
+ setName: 'Sectors';
144
+ nested: true;
145
+ field: 'sectors';
146
+ set: SectorSet[];
147
+ count: number;
148
+ value: string;
149
+ parser: string;
150
+ }
151
+ export interface SectorSet {
152
+ key: string;
153
+ count: number;
154
+ totalMWs: number;
155
+ field: 'status';
156
+ setName: 'status';
157
+ status: StatusBreakdown[];
158
+ }
159
+ export interface StatusBreakdown {
160
+ key: string;
161
+ count: number;
162
+ totalMWs: number;
163
+ }
164
+ export interface GeographyData {
165
+ setName: 'Geography';
166
+ nested: true;
167
+ field: 'state';
168
+ set: GeographySet[];
169
+ count: number;
170
+ value: string;
171
+ parser: string;
172
+ }
173
+ export interface GeographySet {
174
+ key: string;
175
+ count: number;
176
+ totalMWs: number;
177
+ field: 'sectors';
178
+ setName: 'sectors';
179
+ sectors: SectorBreakdown[];
180
+ id: string;
181
+ }
182
+ export interface DeveloperData {
183
+ setName: 'Developer Relationships';
184
+ nested: true;
185
+ field: 'developer';
186
+ set: DeveloperSet[];
187
+ count: number;
188
+ value: string;
189
+ parser: string;
190
+ }
191
+ export interface DeveloperSet {
192
+ key: string;
193
+ count: number;
194
+ totalMWs: number;
195
+ field: 'sectors';
196
+ setName: 'sectors';
197
+ sectors: SectorBreakdown[];
198
+ id: string;
199
+ }
200
+ export interface UtilityData {
201
+ setName: 'Utility Relationships';
202
+ nested: true;
203
+ field: 'utility';
204
+ set: UtilitySet[];
205
+ count: number;
206
+ value: string;
207
+ parser: string;
208
+ }
209
+ export interface UtilitySet {
210
+ key: string;
211
+ count: number;
212
+ totalMWs: number;
213
+ field: 'sectors';
214
+ setName: 'sectors';
215
+ sectors: SectorBreakdown[];
216
+ id: string;
217
+ }
218
+ export interface NestedDatum {
219
+ key: string;
220
+ id?: string;
221
+ count?: number;
222
+ totalMWs?: number;
223
+ }
224
+ export type ValueItem = {
225
+ url?: string;
226
+ id: string;
227
+ identifier: string;
228
+ spaced?: string | boolean;
229
+ };
230
+ export type IdIdentifier = {
231
+ identifier: string;
232
+ id: string;
233
+ };
234
+ export type Field = string | number | IdIdentifier | string[] | IdIdentifier[];
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=intel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"intel.js","sourceRoot":"","sources":["../../../../../../packages/client-frontends-shared-types/src/lib/intel/intel.ts"],"names":[],"mappings":""}