@corva/create-app 0.106.1 → 0.108.0
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/lib/constants/cli.js +4 -4
- package/lib/constants/manifest.js +1 -0
- package/lib/constants/package.js +4 -0
- package/package.json +5 -3
- package/template_extensions/corva/.eslintrc +32 -0
- package/templates/ui/javascript/src/App.completion.js +2 -2
- package/templates/ui/javascript/src/App.css +4 -0
- package/templates/ui/javascript/src/App.drilling.js +3 -3
- package/templates/ui/typescript/src/App.completion.tsx +4 -10
- package/templates/ui/typescript/src/App.css +4 -0
- package/templates/ui/typescript/src/App.drilling.tsx +5 -10
- package/templates/ui/typescript/src/AppSettings.tsx +2 -12
- package/templates/ui/typescript/src/__mocks__/mockData.ts +194 -0
- package/templates/ui/typescript/src/__tests__/App.test.tsx +59 -10
- package/templates/ui/typescript/src/__tests__/AppSettings.test.tsx +14 -3
- package/templates/ui/typescript/src/types.ts +618 -0
- package/templates/ui/typescript/tsconfig.json +0 -1
- package/templates/ui/typescript/src/__mocks__/mockAppProps.ts +0 -590
- package/templates/ui/typescript/src/__mocks__/mockAppSettingsProps.ts +0 -290
|
@@ -0,0 +1,618 @@
|
|
|
1
|
+
/* eslint-disable camelcase, no-use-before-define */
|
|
2
|
+
|
|
3
|
+
// ============================================================================
|
|
4
|
+
// MAIN APP PROPS TYPES
|
|
5
|
+
// ============================================================================
|
|
6
|
+
|
|
7
|
+
export interface AppProps {
|
|
8
|
+
// Completion-specific properties
|
|
9
|
+
fracFleet?: FracFleet;
|
|
10
|
+
wells?: Well[];
|
|
11
|
+
fracFleetId?: number;
|
|
12
|
+
padId?: number;
|
|
13
|
+
assets?: unknown;
|
|
14
|
+
|
|
15
|
+
// Drilling-specific properties
|
|
16
|
+
rig?: Rig;
|
|
17
|
+
well?: Well;
|
|
18
|
+
rigId?: number;
|
|
19
|
+
wellId?: number;
|
|
20
|
+
|
|
21
|
+
// Common properties
|
|
22
|
+
app: AppInstance;
|
|
23
|
+
package: string;
|
|
24
|
+
coordinates: Coordinates;
|
|
25
|
+
currentUser: User;
|
|
26
|
+
devCenterRouter: DevCenterRouter;
|
|
27
|
+
segment: string;
|
|
28
|
+
appHeaderProps: AppHeaderData;
|
|
29
|
+
isNative: boolean;
|
|
30
|
+
layoutEnvironment: LayoutEnvironment;
|
|
31
|
+
|
|
32
|
+
// Methods
|
|
33
|
+
onSettingChange: (key: string, value: unknown) => void;
|
|
34
|
+
onSettingsChange: (settings: Record<string, unknown>) => void;
|
|
35
|
+
setIsFullscreenModalMode: (isFullscreenModalMode: boolean) => Promise<void>;
|
|
36
|
+
setIsMaximized: (isMaximized: boolean) => void;
|
|
37
|
+
setMainMenuItems: (mainMenuItems: MenuItem[]) => void;
|
|
38
|
+
setSecondaryMenuItems: (secondaryMenuItems: MenuItem[]) => void;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// ============================================================================
|
|
42
|
+
// APP SETTINGS PROPS TYPES
|
|
43
|
+
// ============================================================================
|
|
44
|
+
|
|
45
|
+
export interface AppSettingsProps {
|
|
46
|
+
app: AppInstance;
|
|
47
|
+
appData: AppInstanceData;
|
|
48
|
+
settings: Record<string, unknown>;
|
|
49
|
+
layoutEnvironment: LayoutEnvironment;
|
|
50
|
+
currentUser: User;
|
|
51
|
+
|
|
52
|
+
// Methods
|
|
53
|
+
onSettingChange: (key: string, value: unknown) => void;
|
|
54
|
+
onSettingsChange: (settings: Record<string, unknown>) => void;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface CustomAppSettings {
|
|
58
|
+
isExampleCheckboxChecked?: boolean;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// ============================================================================
|
|
62
|
+
// COMMON TYPES
|
|
63
|
+
// ============================================================================
|
|
64
|
+
|
|
65
|
+
export interface MenuItem {
|
|
66
|
+
icon: string;
|
|
67
|
+
title: string;
|
|
68
|
+
priority: boolean;
|
|
69
|
+
onClick: () => void;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface Coordinates {
|
|
73
|
+
w: number;
|
|
74
|
+
h: number;
|
|
75
|
+
x: number;
|
|
76
|
+
y: number;
|
|
77
|
+
pixelHeight: number;
|
|
78
|
+
pixelWidth: number;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface LayoutEnvironment {
|
|
82
|
+
type: string;
|
|
83
|
+
pdfReportMode: boolean;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface DevCenterRouter {
|
|
87
|
+
location: {
|
|
88
|
+
pathname: string;
|
|
89
|
+
query: Record<string, unknown>;
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// ============================================================================
|
|
94
|
+
// APP PACKAGE TYPES
|
|
95
|
+
// ============================================================================
|
|
96
|
+
|
|
97
|
+
export interface AppManifestLicense {
|
|
98
|
+
type: string;
|
|
99
|
+
url: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface AppManifestDeveloper {
|
|
103
|
+
name: string;
|
|
104
|
+
identifier: string;
|
|
105
|
+
authors: unknown[];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface AppManifestUI {
|
|
109
|
+
initial_size: {
|
|
110
|
+
w: number;
|
|
111
|
+
h: number;
|
|
112
|
+
};
|
|
113
|
+
multi_rig: boolean;
|
|
114
|
+
full_screen_report: boolean;
|
|
115
|
+
use_app_header_v3: boolean;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface AppManifestEntrypoint {
|
|
119
|
+
file: string;
|
|
120
|
+
function: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface AppManifestSettings {
|
|
124
|
+
entrypoint: AppManifestEntrypoint;
|
|
125
|
+
environment: Record<string, unknown>;
|
|
126
|
+
runtime: string;
|
|
127
|
+
app: {
|
|
128
|
+
log_type: string;
|
|
129
|
+
};
|
|
130
|
+
enable_isolation: boolean;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface AppManifestApplication {
|
|
134
|
+
type: string;
|
|
135
|
+
key: string;
|
|
136
|
+
visibility: string;
|
|
137
|
+
name: string;
|
|
138
|
+
description: string;
|
|
139
|
+
summary: string;
|
|
140
|
+
category: string;
|
|
141
|
+
website: string;
|
|
142
|
+
segments: string[];
|
|
143
|
+
ui: AppManifestUI;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface AppManifest {
|
|
147
|
+
format: number;
|
|
148
|
+
license: AppManifestLicense;
|
|
149
|
+
developer: AppManifestDeveloper;
|
|
150
|
+
application: AppManifestApplication;
|
|
151
|
+
settings: AppManifestSettings;
|
|
152
|
+
datasets: Record<string, unknown>;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface AppManifestPackage {
|
|
156
|
+
manifest: AppManifest;
|
|
157
|
+
build: string;
|
|
158
|
+
version: string;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface AppMetadata {
|
|
162
|
+
app_key: string;
|
|
163
|
+
platform: string;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export interface AppInstance {
|
|
167
|
+
app: AppMetadata;
|
|
168
|
+
id: number;
|
|
169
|
+
package: AppManifestPackage;
|
|
170
|
+
segment: string[];
|
|
171
|
+
settings: Record<string, unknown>;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// ============================================================================
|
|
175
|
+
// ASSET TYPES
|
|
176
|
+
// ============================================================================
|
|
177
|
+
|
|
178
|
+
export interface LonLat {
|
|
179
|
+
longitude: number;
|
|
180
|
+
latitude: number;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface Company {
|
|
184
|
+
type: string;
|
|
185
|
+
id: string;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export interface Asset {
|
|
189
|
+
type: string;
|
|
190
|
+
id: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface DataConnection {
|
|
194
|
+
type: string;
|
|
195
|
+
id: string;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// ============================================================================
|
|
199
|
+
// DATA STREAM TYPES
|
|
200
|
+
// ============================================================================
|
|
201
|
+
|
|
202
|
+
export interface DataStream {
|
|
203
|
+
type: string;
|
|
204
|
+
id: number;
|
|
205
|
+
company_id: number;
|
|
206
|
+
asset_id: number;
|
|
207
|
+
name: string;
|
|
208
|
+
status: string;
|
|
209
|
+
configuration: Record<string, unknown>;
|
|
210
|
+
visibility: string;
|
|
211
|
+
segment: string;
|
|
212
|
+
source_type: string;
|
|
213
|
+
data_source: string;
|
|
214
|
+
log_type: string;
|
|
215
|
+
log_identifier: unknown;
|
|
216
|
+
log_display_name: unknown;
|
|
217
|
+
settings: Record<string, unknown>;
|
|
218
|
+
first_active_at: string;
|
|
219
|
+
last_active_at: string;
|
|
220
|
+
data_received_at: string;
|
|
221
|
+
created_at: string;
|
|
222
|
+
updated_at: string;
|
|
223
|
+
consumer_strategy: string;
|
|
224
|
+
company: Company;
|
|
225
|
+
asset: Asset;
|
|
226
|
+
app_connections: DataConnection[];
|
|
227
|
+
relationshipNames: string[];
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// ============================================================================
|
|
231
|
+
// RIG TYPES (Drilling)
|
|
232
|
+
// ============================================================================
|
|
233
|
+
|
|
234
|
+
export interface Rig {
|
|
235
|
+
name: string;
|
|
236
|
+
id: string;
|
|
237
|
+
asset_id: number;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// ============================================================================
|
|
241
|
+
// WELL TYPES
|
|
242
|
+
// ============================================================================
|
|
243
|
+
|
|
244
|
+
export interface WellStats {
|
|
245
|
+
well_end: number;
|
|
246
|
+
total_cost: number;
|
|
247
|
+
total_time: number;
|
|
248
|
+
well_start: number;
|
|
249
|
+
total_depth: number;
|
|
250
|
+
first_active_at: number;
|
|
251
|
+
witsml_data_frequency: number | null;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export interface WellCustomProperties {
|
|
255
|
+
'auto-stage'?: string;
|
|
256
|
+
is_asset_viewer?: boolean;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface WellArchivation {
|
|
260
|
+
status: string;
|
|
261
|
+
status_reasons: unknown[];
|
|
262
|
+
performer: unknown;
|
|
263
|
+
archivation_date: unknown;
|
|
264
|
+
abilities: string[];
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export interface SpudRelease {
|
|
268
|
+
id: string;
|
|
269
|
+
spud: string;
|
|
270
|
+
rig_up: string;
|
|
271
|
+
release: string;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export interface WellSettings {
|
|
275
|
+
basin?: string;
|
|
276
|
+
qc_at?: number;
|
|
277
|
+
qc_by?: number;
|
|
278
|
+
county?: string;
|
|
279
|
+
air_gap?: number;
|
|
280
|
+
timezone?: string;
|
|
281
|
+
top_hole?: {
|
|
282
|
+
raw: string;
|
|
283
|
+
coordinates: number[];
|
|
284
|
+
};
|
|
285
|
+
api_number?: string;
|
|
286
|
+
bottom_hole?: Record<string, unknown>;
|
|
287
|
+
mud_company?: string;
|
|
288
|
+
spud_release?: SpudRelease[];
|
|
289
|
+
string_design?: string;
|
|
290
|
+
contractor_name?: string;
|
|
291
|
+
ground_elevation?: number;
|
|
292
|
+
target_formation?: string;
|
|
293
|
+
visible_rerun_id?: number;
|
|
294
|
+
last_mongo_refresh?: string;
|
|
295
|
+
rig_classification?: string;
|
|
296
|
+
directional_driller?: string;
|
|
297
|
+
drilling_afe_number?: string;
|
|
298
|
+
day_shift_start_time?: string;
|
|
299
|
+
off_bottom_tolerance?: number;
|
|
300
|
+
target_formation_standard?: string;
|
|
301
|
+
completion_day_shift_start_time?: string;
|
|
302
|
+
associations_last_active_at_updated_at?: string;
|
|
303
|
+
enable_alerts?: boolean;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export interface Well {
|
|
307
|
+
name: string;
|
|
308
|
+
settings?: WellSettings;
|
|
309
|
+
asset_id: number;
|
|
310
|
+
last_active_at: string;
|
|
311
|
+
status: string;
|
|
312
|
+
archivation?: WellArchivation;
|
|
313
|
+
id: string;
|
|
314
|
+
companyId?: string;
|
|
315
|
+
type?: string;
|
|
316
|
+
stats?: WellStats;
|
|
317
|
+
custom_properties?: WellCustomProperties;
|
|
318
|
+
is_active?: boolean;
|
|
319
|
+
app_streams?: DataStream[];
|
|
320
|
+
rig?: {
|
|
321
|
+
type: string;
|
|
322
|
+
id: string;
|
|
323
|
+
};
|
|
324
|
+
relationshipNames?: string[];
|
|
325
|
+
last_frac_at?: string;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
// ============================================================================
|
|
329
|
+
// FRAC FLEET TYPES (Completion)
|
|
330
|
+
// ============================================================================
|
|
331
|
+
|
|
332
|
+
export interface ProgramEmpty {
|
|
333
|
+
rigs: boolean;
|
|
334
|
+
pads: boolean;
|
|
335
|
+
frac_fleets: boolean;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export interface Program {
|
|
339
|
+
type: string;
|
|
340
|
+
id: string;
|
|
341
|
+
asset_id: number;
|
|
342
|
+
name: string;
|
|
343
|
+
lon_lat: LonLat | null;
|
|
344
|
+
created_at: string;
|
|
345
|
+
updated_at: string;
|
|
346
|
+
empty: ProgramEmpty;
|
|
347
|
+
company: Company;
|
|
348
|
+
relationshipNames: string[];
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export interface Pad {
|
|
352
|
+
id: number;
|
|
353
|
+
name: string;
|
|
354
|
+
created_at: string;
|
|
355
|
+
updated_at: string;
|
|
356
|
+
company_id: number;
|
|
357
|
+
program_id: number;
|
|
358
|
+
lon_lat: LonLat;
|
|
359
|
+
drillout_unit_id: number | null;
|
|
360
|
+
last_active_at: string;
|
|
361
|
+
viewer_well_id: number | null;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
export interface FracFleetBasic {
|
|
365
|
+
id: number;
|
|
366
|
+
name: string;
|
|
367
|
+
created_at: string;
|
|
368
|
+
updated_at: string;
|
|
369
|
+
company_id: number;
|
|
370
|
+
program_id: number;
|
|
371
|
+
lon_lat: LonLat;
|
|
372
|
+
frac_fleet_vendor: unknown;
|
|
373
|
+
last_active_at: string;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export interface PadFracFleet {
|
|
377
|
+
type: string;
|
|
378
|
+
id: number;
|
|
379
|
+
current: boolean;
|
|
380
|
+
last_current_at: string;
|
|
381
|
+
created_at: string;
|
|
382
|
+
updated_at: string;
|
|
383
|
+
pad: Pad;
|
|
384
|
+
frac_fleet: FracFleetBasic;
|
|
385
|
+
contract_data: Record<string, unknown>;
|
|
386
|
+
frac_fleet_lines: unknown[];
|
|
387
|
+
relationshipNames: string[];
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export interface FracFleet {
|
|
391
|
+
type: string;
|
|
392
|
+
id: string;
|
|
393
|
+
name: string;
|
|
394
|
+
current_pad_id: number;
|
|
395
|
+
program: Program;
|
|
396
|
+
pad_frac_fleets: PadFracFleet[];
|
|
397
|
+
relationshipNames: string[];
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// ============================================================================
|
|
401
|
+
// USER TYPES
|
|
402
|
+
// ============================================================================
|
|
403
|
+
|
|
404
|
+
export interface UserFavorite {
|
|
405
|
+
id: string;
|
|
406
|
+
asset_type: string;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export interface UserHomePage {
|
|
410
|
+
selected_assets_tab: string;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
export interface UISetting {
|
|
414
|
+
key: string;
|
|
415
|
+
message: string;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export interface UserUISettings {
|
|
419
|
+
[key: string]: UISetting;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export interface UserSingleAsset {
|
|
423
|
+
padId: number;
|
|
424
|
+
rigId: number;
|
|
425
|
+
wellId: number | null;
|
|
426
|
+
rigAssetId: number;
|
|
427
|
+
fracFleetId: number;
|
|
428
|
+
wellAssetId: number | null;
|
|
429
|
+
drilloutUnitId: number;
|
|
430
|
+
completionWellAssetId: number;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export interface UserFeedFilters {
|
|
434
|
+
company_id: unknown;
|
|
435
|
+
start_date: string;
|
|
436
|
+
content_types: string[];
|
|
437
|
+
selected_rigs_ids: unknown[];
|
|
438
|
+
selected_user_ids: unknown[];
|
|
439
|
+
users_radio_value: string;
|
|
440
|
+
assets_radio_value: string;
|
|
441
|
+
date_range_radio_value: string;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export interface UserAlertsListFilters {
|
|
445
|
+
end_date: string;
|
|
446
|
+
segments: string[];
|
|
447
|
+
alert_name: string;
|
|
448
|
+
start_date: string;
|
|
449
|
+
validation: string;
|
|
450
|
+
alert_levels: string[];
|
|
451
|
+
subscription: string;
|
|
452
|
+
classification: string;
|
|
453
|
+
assets_radio_value: string;
|
|
454
|
+
date_range_radio_value: string;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
export interface UserNotificationsFilters {
|
|
458
|
+
end_date: string;
|
|
459
|
+
start_date: string;
|
|
460
|
+
content_types: string[];
|
|
461
|
+
date_range_radio_value: string;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export interface UserDirectionalAppSettings {
|
|
465
|
+
curve_to_lat_threshold: number;
|
|
466
|
+
vert_to_curve_threshold: number;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export interface UserSettings {
|
|
470
|
+
favorites: UserFavorite[];
|
|
471
|
+
home_page: UserHomePage;
|
|
472
|
+
onboarded: boolean;
|
|
473
|
+
beta_2_158: Record<string, unknown>;
|
|
474
|
+
uiSettings: UserUISettings;
|
|
475
|
+
singleAsset: UserSingleAsset;
|
|
476
|
+
feed_filters: UserFeedFilters;
|
|
477
|
+
sms_blacklisted: boolean;
|
|
478
|
+
favorit_asset_ids: number[];
|
|
479
|
+
restricted_assets: unknown[];
|
|
480
|
+
alerts_list_filters: UserAlertsListFilters;
|
|
481
|
+
restricted_programs: unknown[];
|
|
482
|
+
is_dnd_feature_shown: boolean;
|
|
483
|
+
last_new_alerts_check: string;
|
|
484
|
+
notifications_filters: UserNotificationsFilters;
|
|
485
|
+
directional_app_settings: UserDirectionalAppSettings;
|
|
486
|
+
last_new_feed_items_check: string;
|
|
487
|
+
participates_in_beta_apps: boolean;
|
|
488
|
+
'cross-plot__gradient-manager': unknown[];
|
|
489
|
+
last_new_dashboard_shares_check: string;
|
|
490
|
+
formation_evaluation_lithology_types: Record<string, unknown>;
|
|
491
|
+
formation_evaluation_custom_gradients: unknown[];
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
export interface CompanyInfo {
|
|
495
|
+
id: number;
|
|
496
|
+
name: string;
|
|
497
|
+
time_zone: string;
|
|
498
|
+
language: string;
|
|
499
|
+
provider: string;
|
|
500
|
+
unit_system: Record<string, string>;
|
|
501
|
+
custom_unit_system: Record<string, unknown>;
|
|
502
|
+
custom_units: Record<string, unknown>;
|
|
503
|
+
dev_center_enabled: boolean;
|
|
504
|
+
with_subscription: boolean;
|
|
505
|
+
competitor_analysis_enabled: boolean;
|
|
506
|
+
ai_model_scope: string;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
export interface UserGroup {
|
|
510
|
+
id: number;
|
|
511
|
+
name: string;
|
|
512
|
+
company_id: number;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
export interface UserPreference {
|
|
516
|
+
id: number;
|
|
517
|
+
push_notifications_enabled: boolean;
|
|
518
|
+
emails_enabled: boolean;
|
|
519
|
+
sms_enabled: boolean;
|
|
520
|
+
alert_levels: string[];
|
|
521
|
+
play_alerts_sound: boolean;
|
|
522
|
+
show_intercom_icon: boolean;
|
|
523
|
+
segment: string[];
|
|
524
|
+
disable_create_dashboard: boolean;
|
|
525
|
+
disable_costs: boolean;
|
|
526
|
+
disable_documents: boolean;
|
|
527
|
+
realtime_operation_mode: boolean;
|
|
528
|
+
disable_file_upload: boolean;
|
|
529
|
+
stay_on_app_store: boolean;
|
|
530
|
+
new_navigation_beta: boolean;
|
|
531
|
+
new_mobile_app_enabled: boolean;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export interface User {
|
|
535
|
+
id: number;
|
|
536
|
+
company_id: number;
|
|
537
|
+
first_name: string;
|
|
538
|
+
last_name: string;
|
|
539
|
+
email: string;
|
|
540
|
+
mobile: string;
|
|
541
|
+
created_at: string;
|
|
542
|
+
terms_acceptance_at: string;
|
|
543
|
+
profile_photo: unknown;
|
|
544
|
+
recently_viewed_asset_ids: number[];
|
|
545
|
+
unit_system: unknown;
|
|
546
|
+
custom_unit_system: unknown;
|
|
547
|
+
role: string;
|
|
548
|
+
title: unknown;
|
|
549
|
+
group: unknown;
|
|
550
|
+
favorite_asset_id: unknown;
|
|
551
|
+
current_segment: string;
|
|
552
|
+
theme: string;
|
|
553
|
+
messaging_id: string;
|
|
554
|
+
restricted_assets: unknown[];
|
|
555
|
+
restricted_programs: unknown[];
|
|
556
|
+
settings: UserSettings;
|
|
557
|
+
last_sign_in_at: string;
|
|
558
|
+
locked_access: boolean;
|
|
559
|
+
unit_ids: unknown[];
|
|
560
|
+
intercom_admin_id: unknown;
|
|
561
|
+
resource: unknown[];
|
|
562
|
+
consent_to_process_data: boolean;
|
|
563
|
+
identity_verification_enabled: unknown;
|
|
564
|
+
intercom_user_hash: string;
|
|
565
|
+
impersonating: boolean;
|
|
566
|
+
profile_groups: unknown[];
|
|
567
|
+
preference: UserPreference;
|
|
568
|
+
company: CompanyInfo;
|
|
569
|
+
groups: UserGroup[];
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
// ============================================================================
|
|
573
|
+
// APP HEADER TYPES
|
|
574
|
+
// ============================================================================
|
|
575
|
+
|
|
576
|
+
export interface AppHeaderData {
|
|
577
|
+
app: AppInstance;
|
|
578
|
+
appLastAnnotation: unknown;
|
|
579
|
+
appSettings: Record<string, unknown>;
|
|
580
|
+
coordinates: Coordinates;
|
|
581
|
+
currentUser: User;
|
|
582
|
+
isMaximized: boolean;
|
|
583
|
+
layoutEnvironment: LayoutEnvironment;
|
|
584
|
+
fracFleet?: FracFleet;
|
|
585
|
+
wells?: Well[];
|
|
586
|
+
rig?: Rig;
|
|
587
|
+
well?: Well;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
// ============================================================================
|
|
591
|
+
// APP DATA TYPES (Settings)
|
|
592
|
+
// ============================================================================
|
|
593
|
+
|
|
594
|
+
export interface CompletionWellInfo {
|
|
595
|
+
fracFleet: {
|
|
596
|
+
id: number | null;
|
|
597
|
+
name: string | null;
|
|
598
|
+
};
|
|
599
|
+
pad: {
|
|
600
|
+
id: number | null;
|
|
601
|
+
name: string | null;
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
export interface AppInstanceData {
|
|
606
|
+
id: number;
|
|
607
|
+
rig: Rig | null;
|
|
608
|
+
well: Well | null;
|
|
609
|
+
fracFleet: FracFleet | null;
|
|
610
|
+
program: {
|
|
611
|
+
id: string | null;
|
|
612
|
+
name: string | null;
|
|
613
|
+
};
|
|
614
|
+
completionWellInfo?: CompletionWellInfo;
|
|
615
|
+
wells: Well[] | null;
|
|
616
|
+
isLoading: boolean;
|
|
617
|
+
appHash: string;
|
|
618
|
+
}
|