ajsc 1.0.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.
Files changed (34) hide show
  1. package/dist/JSONSchemaConverter.js +370 -0
  2. package/dist/JSONSchemaConverter.js.map +1 -0
  3. package/dist/JSONSchemaConverter.test.js +302 -0
  4. package/dist/JSONSchemaConverter.test.js.map +1 -0
  5. package/dist/TypescriptBaseConverter.js +131 -0
  6. package/dist/TypescriptBaseConverter.js.map +1 -0
  7. package/dist/TypescriptConverter.js +107 -0
  8. package/dist/TypescriptConverter.js.map +1 -0
  9. package/dist/TypescriptConverter.test.js +199 -0
  10. package/dist/TypescriptConverter.test.js.map +1 -0
  11. package/dist/TypescriptProcedureConverter.js +118 -0
  12. package/dist/TypescriptProcedureConverter.js.map +1 -0
  13. package/dist/TypescriptProceduresConverter.test.js +948 -0
  14. package/dist/TypescriptProceduresConverter.test.js.map +1 -0
  15. package/dist/types.js +2 -0
  16. package/dist/types.js.map +1 -0
  17. package/dist/utils/path-utils.js +78 -0
  18. package/dist/utils/path-utils.js.map +1 -0
  19. package/dist/utils/path-utils.test.js +92 -0
  20. package/dist/utils/path-utils.test.js.map +1 -0
  21. package/dist/utils/to-pascal-case.js +11 -0
  22. package/dist/utils/to-pascal-case.js.map +1 -0
  23. package/package.json +56 -0
  24. package/src/JSONSchemaConverter.test.ts +342 -0
  25. package/src/JSONSchemaConverter.ts +459 -0
  26. package/src/TypescriptBaseConverter.ts +161 -0
  27. package/src/TypescriptConverter.test.ts +264 -0
  28. package/src/TypescriptConverter.ts +161 -0
  29. package/src/TypescriptProcedureConverter.ts +160 -0
  30. package/src/TypescriptProceduresConverter.test.ts +952 -0
  31. package/src/types.ts +101 -0
  32. package/src/utils/path-utils.test.ts +102 -0
  33. package/src/utils/path-utils.ts +89 -0
  34. package/src/utils/to-pascal-case.ts +10 -0
@@ -0,0 +1,952 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { TypescriptProcedureConverter } from "./TypescriptProcedureConverter.js";
3
+ import { JSONSchema7Definition } from "json-schema";
4
+
5
+ describe("TypescriptProceduresPlugin", () => {
6
+ it("complex json-schema", () => {
7
+ const argsAndData: JSONSchema7Definition = {
8
+ type: "object",
9
+ properties: {
10
+ pagination: {
11
+ type: "object",
12
+ properties: {
13
+ total: {
14
+ type: "number",
15
+ },
16
+ },
17
+ },
18
+ organizations: {
19
+ type: "array",
20
+ items: {
21
+ type: "object",
22
+ properties: {
23
+ counts: {
24
+ type: "object",
25
+ properties: {
26
+ locations: {
27
+ type: "number",
28
+ },
29
+ portalUsers: {
30
+ type: "number",
31
+ },
32
+ users: {
33
+ type: "number",
34
+ },
35
+ regions: {
36
+ type: "number",
37
+ },
38
+ },
39
+ required: ["locations", "portalUsers", "users", "regions"],
40
+ },
41
+ linkedToInfinityOrganizationId: {
42
+ type: "string",
43
+ },
44
+ migration: {
45
+ type: "object",
46
+ properties: {
47
+ infinity: {
48
+ type: "object",
49
+ properties: {
50
+ organizationId: {
51
+ type: "string",
52
+ },
53
+ primaryRegionId: {
54
+ type: "string",
55
+ },
56
+ primaryUserId: {
57
+ type: "string",
58
+ },
59
+ },
60
+ required: [
61
+ "organizationId",
62
+ "primaryRegionId",
63
+ "primaryUserId",
64
+ ],
65
+ },
66
+ legacy: {
67
+ type: "object",
68
+ properties: {
69
+ organizationId: {
70
+ type: "string",
71
+ },
72
+ primaryRegionId: {
73
+ type: "string",
74
+ },
75
+ primaryUserId: {
76
+ type: "string",
77
+ },
78
+ },
79
+ required: [
80
+ "organizationId",
81
+ "primaryRegionId",
82
+ "primaryUserId",
83
+ ],
84
+ },
85
+ operations: {
86
+ type: "array",
87
+ items: {
88
+ type: "object",
89
+ properties: {
90
+ action: {
91
+ anyOf: [
92
+ {
93
+ const: "initial-migration",
94
+ type: "string",
95
+ },
96
+ {
97
+ const: "migration-update",
98
+ type: "string",
99
+ },
100
+ ],
101
+ },
102
+ timestamp: {
103
+ type: "string",
104
+ },
105
+ },
106
+ required: ["action", "timestamp"],
107
+ },
108
+ },
109
+ organizationId: {
110
+ type: "string",
111
+ },
112
+ step: {
113
+ type: "object",
114
+ properties: {
115
+ create_regions: {
116
+ type: "object",
117
+ properties: {
118
+ total: {
119
+ type: "number",
120
+ },
121
+ processed: {
122
+ type: "number",
123
+ },
124
+ failed: {
125
+ type: "number",
126
+ },
127
+ },
128
+ required: ["total", "processed", "failed"],
129
+ },
130
+ create_location_groups: {
131
+ type: "object",
132
+ properties: {
133
+ total: {
134
+ type: "number",
135
+ },
136
+ processed: {
137
+ type: "number",
138
+ },
139
+ failed: {
140
+ type: "number",
141
+ },
142
+ },
143
+ required: ["total", "processed", "failed"],
144
+ },
145
+ create_locations: {
146
+ type: "object",
147
+ properties: {
148
+ total: {
149
+ type: "number",
150
+ },
151
+ processed: {
152
+ type: "number",
153
+ },
154
+ failed: {
155
+ type: "number",
156
+ },
157
+ },
158
+ required: ["total", "processed", "failed"],
159
+ },
160
+ create_locations_bolos: {
161
+ type: "object",
162
+ properties: {
163
+ total: {
164
+ type: "number",
165
+ },
166
+ processed: {
167
+ type: "number",
168
+ },
169
+ failed: {
170
+ type: "number",
171
+ },
172
+ },
173
+ required: ["total", "processed", "failed"],
174
+ },
175
+ create_locations_checkpoints: {
176
+ type: "object",
177
+ properties: {
178
+ total: {
179
+ type: "number",
180
+ },
181
+ processed: {
182
+ type: "number",
183
+ },
184
+ failed: {
185
+ type: "number",
186
+ },
187
+ },
188
+ required: ["total", "processed", "failed"],
189
+ },
190
+ create_locations_contacts: {
191
+ type: "object",
192
+ properties: {
193
+ total: {
194
+ type: "number",
195
+ },
196
+ processed: {
197
+ type: "number",
198
+ },
199
+ failed: {
200
+ type: "number",
201
+ },
202
+ },
203
+ required: ["total", "processed", "failed"],
204
+ },
205
+ create_locations_info_blocks: {
206
+ type: "object",
207
+ properties: {
208
+ total: {
209
+ type: "number",
210
+ },
211
+ processed: {
212
+ type: "number",
213
+ },
214
+ failed: {
215
+ type: "number",
216
+ },
217
+ },
218
+ required: ["total", "processed", "failed"],
219
+ },
220
+ create_locations_passdowns: {
221
+ type: "object",
222
+ properties: {
223
+ total: {
224
+ type: "number",
225
+ },
226
+ processed: {
227
+ type: "number",
228
+ },
229
+ failed: {
230
+ type: "number",
231
+ },
232
+ },
233
+ required: ["total", "processed", "failed"],
234
+ },
235
+ create_locations_subscribers: {
236
+ type: "object",
237
+ properties: {
238
+ total: {
239
+ type: "number",
240
+ },
241
+ processed: {
242
+ type: "number",
243
+ },
244
+ failed: {
245
+ type: "number",
246
+ },
247
+ },
248
+ required: ["total", "processed", "failed"],
249
+ },
250
+ create_locations_sub_locations: {
251
+ type: "object",
252
+ properties: {
253
+ total: {
254
+ type: "number",
255
+ },
256
+ processed: {
257
+ type: "number",
258
+ },
259
+ failed: {
260
+ type: "number",
261
+ },
262
+ },
263
+ required: ["total", "processed", "failed"],
264
+ },
265
+ create_users: {
266
+ type: "object",
267
+ properties: {
268
+ total: {
269
+ type: "number",
270
+ },
271
+ processed: {
272
+ type: "number",
273
+ },
274
+ failed: {
275
+ type: "number",
276
+ },
277
+ },
278
+ required: ["total", "processed", "failed"],
279
+ },
280
+ create_portal_users: {
281
+ type: "object",
282
+ properties: {
283
+ total: {
284
+ type: "number",
285
+ },
286
+ processed: {
287
+ type: "number",
288
+ },
289
+ failed: {
290
+ type: "number",
291
+ },
292
+ },
293
+ required: ["total", "processed", "failed"],
294
+ },
295
+ create_records: {
296
+ type: "object",
297
+ properties: {
298
+ total: {
299
+ type: "number",
300
+ },
301
+ processed: {
302
+ type: "number",
303
+ },
304
+ failed: {
305
+ type: "number",
306
+ },
307
+ },
308
+ required: ["total", "processed", "failed"],
309
+ },
310
+ create_records_comments: {
311
+ type: "object",
312
+ properties: {
313
+ total: {
314
+ type: "number",
315
+ },
316
+ processed: {
317
+ type: "number",
318
+ },
319
+ failed: {
320
+ type: "number",
321
+ },
322
+ },
323
+ required: ["total", "processed", "failed"],
324
+ },
325
+ },
326
+ },
327
+ startTime: {
328
+ type: "string",
329
+ },
330
+ endTime: {
331
+ anyOf: [
332
+ {
333
+ type: "string",
334
+ },
335
+ {
336
+ type: "null",
337
+ },
338
+ ],
339
+ },
340
+ },
341
+ required: ["operations", "organizationId", "step"],
342
+ },
343
+ organization: {
344
+ type: "object",
345
+ properties: {
346
+ _id: {
347
+ type: "string",
348
+ },
349
+ _migrated: {
350
+ anyOf: [
351
+ {
352
+ type: "object",
353
+ properties: {
354
+ success: {
355
+ const: true,
356
+ type: "boolean",
357
+ },
358
+ infinityOrgId: {
359
+ type: "string",
360
+ },
361
+ infinityId: {
362
+ type: "string",
363
+ },
364
+ infinityEntity: {
365
+ type: "string",
366
+ },
367
+ },
368
+ required: [
369
+ "success",
370
+ "infinityOrgId",
371
+ "infinityId",
372
+ "infinityEntity",
373
+ ],
374
+ },
375
+ {
376
+ type: "object",
377
+ properties: {
378
+ success: {
379
+ const: false,
380
+ type: "boolean",
381
+ },
382
+ },
383
+ required: ["success"],
384
+ },
385
+ {
386
+ type: "null",
387
+ },
388
+ ],
389
+ },
390
+ active: {
391
+ type: "boolean",
392
+ },
393
+ address: {
394
+ type: "object",
395
+ properties: {
396
+ city: {
397
+ type: "string",
398
+ },
399
+ state: {
400
+ type: "string",
401
+ },
402
+ streetAddress: {
403
+ type: "string",
404
+ },
405
+ },
406
+ required: ["city", "state"],
407
+ },
408
+ createdAt: {
409
+ type: "string",
410
+ },
411
+ createdBy: {
412
+ type: "string",
413
+ },
414
+ name: {
415
+ type: "string",
416
+ },
417
+ phone: {
418
+ type: "string",
419
+ },
420
+ updatedAt: {
421
+ type: "string",
422
+ },
423
+ updatedBy: {
424
+ type: "string",
425
+ },
426
+ website: {
427
+ type: "string",
428
+ },
429
+ logoUrl: {
430
+ anyOf: [
431
+ {
432
+ type: "array",
433
+ items: {
434
+ type: "string",
435
+ },
436
+ },
437
+ {
438
+ type: "string",
439
+ },
440
+ ],
441
+ },
442
+ userStatuses: {
443
+ type: "array",
444
+ items: {
445
+ type: "object",
446
+ properties: {
447
+ color: {
448
+ type: "string",
449
+ },
450
+ title: {
451
+ type: "string",
452
+ },
453
+ },
454
+ required: ["color", "title"],
455
+ },
456
+ },
457
+ stagnent: {
458
+ type: "boolean",
459
+ },
460
+ metadata: {
461
+ type: "object",
462
+ properties: {
463
+ _id: {
464
+ type: "string",
465
+ },
466
+ _migrated: {
467
+ anyOf: [
468
+ {
469
+ type: "object",
470
+ properties: {
471
+ success: {
472
+ const: true,
473
+ type: "boolean",
474
+ },
475
+ infinityOrgId: {
476
+ type: "string",
477
+ },
478
+ infinityId: {
479
+ type: "string",
480
+ },
481
+ infinityEntity: {
482
+ type: "string",
483
+ },
484
+ },
485
+ required: [
486
+ "success",
487
+ "infinityOrgId",
488
+ "infinityId",
489
+ "infinityEntity",
490
+ ],
491
+ },
492
+ {
493
+ type: "object",
494
+ properties: {
495
+ success: {
496
+ const: false,
497
+ type: "boolean",
498
+ },
499
+ },
500
+ required: ["success"],
501
+ },
502
+ {
503
+ type: "null",
504
+ },
505
+ ],
506
+ },
507
+ firstLogin: {
508
+ type: "boolean",
509
+ },
510
+ modules: {
511
+ type: "object",
512
+ properties: {
513
+ region: {
514
+ type: "boolean",
515
+ },
516
+ report: {
517
+ type: "boolean",
518
+ },
519
+ record: {
520
+ type: "boolean",
521
+ },
522
+ mail: {
523
+ type: "boolean",
524
+ },
525
+ location: {
526
+ type: "boolean",
527
+ },
528
+ dispatch: {
529
+ type: "boolean",
530
+ },
531
+ bulletin: {
532
+ type: "boolean",
533
+ },
534
+ portal: {
535
+ type: "boolean",
536
+ },
537
+ schedule: {
538
+ type: "boolean",
539
+ },
540
+ geolocation: {
541
+ type: "boolean",
542
+ },
543
+ patrol: {
544
+ type: "boolean",
545
+ },
546
+ integrations: {
547
+ type: "boolean",
548
+ },
549
+ dateFormat: {
550
+ type: "string",
551
+ },
552
+ timeFormat: {
553
+ type: "string",
554
+ },
555
+ },
556
+ },
557
+ organizationId: {
558
+ type: "string",
559
+ },
560
+ settings: {
561
+ type: "object",
562
+ properties: {
563
+ dateFormat: {
564
+ type: "string",
565
+ },
566
+ timeFormat: {
567
+ type: "string",
568
+ },
569
+ userNameFormat: {
570
+ type: "number",
571
+ },
572
+ module: {
573
+ type: "object",
574
+ properties: {
575
+ dispatch: {
576
+ type: "object",
577
+ properties: {
578
+ allowedDispatchTypeIds: {
579
+ type: "object",
580
+ properties: {
581
+ serviceCall: {
582
+ type: "boolean",
583
+ },
584
+ userStatus: {
585
+ type: "boolean",
586
+ },
587
+ },
588
+ },
589
+ dispatchTypeSettings: {
590
+ type: "object",
591
+ properties: {
592
+ serviceCall: {
593
+ type: "object",
594
+ properties: {
595
+ requireClearedWithReportEntry: {
596
+ type: "boolean",
597
+ },
598
+ },
599
+ required: [
600
+ "requireClearedWithReportEntry",
601
+ ],
602
+ },
603
+ },
604
+ required: ["serviceCall"],
605
+ },
606
+ },
607
+ required: ["allowedDispatchTypeIds"],
608
+ },
609
+ roster: {
610
+ type: "object",
611
+ properties: {
612
+ userInfoAccessLevel: {
613
+ anyOf: [
614
+ {
615
+ type: "null",
616
+ },
617
+ {
618
+ type: "number",
619
+ },
620
+ ],
621
+ },
622
+ },
623
+ required: ["userInfoAccessLevel"],
624
+ },
625
+ },
626
+ },
627
+ },
628
+ },
629
+ services: {
630
+ type: "array",
631
+ items: {
632
+ type: "string",
633
+ },
634
+ },
635
+ userStatuses: {
636
+ type: "array",
637
+ items: {
638
+ type: "object",
639
+ properties: {
640
+ color: {
641
+ type: "string",
642
+ },
643
+ geoTracking: {
644
+ type: "boolean",
645
+ },
646
+ title: {
647
+ type: "string",
648
+ },
649
+ sortPriority: {
650
+ type: "number",
651
+ },
652
+ },
653
+ required: [
654
+ "color",
655
+ "geoTracking",
656
+ "title",
657
+ "sortPriority",
658
+ ],
659
+ },
660
+ },
661
+ subscriptionStatus: {
662
+ type: "string",
663
+ },
664
+ survey: {
665
+ type: "object",
666
+ properties: {
667
+ referral: {
668
+ type: "string",
669
+ },
670
+ currentlyUsingSystem: {
671
+ type: "string",
672
+ },
673
+ organizationAppGoal: {
674
+ type: "string",
675
+ },
676
+ currentSystemName: {
677
+ type: "string",
678
+ },
679
+ currentSystemIssue: {
680
+ type: "string",
681
+ },
682
+ contactMeForWalkThrough: {
683
+ type: "boolean",
684
+ },
685
+ organizationAppGoalOther: {
686
+ type: "string",
687
+ },
688
+ bestContactTime: {
689
+ type: "string",
690
+ },
691
+ },
692
+ },
693
+ },
694
+ required: [
695
+ "_id",
696
+ "modules",
697
+ "organizationId",
698
+ "settings",
699
+ "services",
700
+ "userStatuses",
701
+ ],
702
+ },
703
+ },
704
+ required: [
705
+ "_id",
706
+ "active",
707
+ "address",
708
+ "createdAt",
709
+ "createdBy",
710
+ "name",
711
+ "updatedAt",
712
+ "updatedBy",
713
+ "metadata",
714
+ ],
715
+ },
716
+ subscription: {
717
+ type: "object",
718
+ properties: {
719
+ _id: {
720
+ type: "string",
721
+ },
722
+ _migration: {
723
+ anyOf: [
724
+ {
725
+ type: "object",
726
+ properties: {
727
+ success: {
728
+ const: true,
729
+ type: "boolean",
730
+ },
731
+ infinityOrgId: {
732
+ type: "string",
733
+ },
734
+ infinityId: {
735
+ type: "string",
736
+ },
737
+ infinityEntity: {
738
+ type: "string",
739
+ },
740
+ },
741
+ required: [
742
+ "success",
743
+ "infinityOrgId",
744
+ "infinityId",
745
+ "infinityEntity",
746
+ ],
747
+ },
748
+ {
749
+ type: "object",
750
+ properties: {
751
+ success: {
752
+ const: false,
753
+ type: "boolean",
754
+ },
755
+ },
756
+ required: ["success"],
757
+ },
758
+ {
759
+ type: "null",
760
+ },
761
+ ],
762
+ },
763
+ stripeMetadata: {
764
+ type: "object",
765
+ properties: {
766
+ activeUsersUsageSubscriptionItemIds: {
767
+ type: "array",
768
+ items: {
769
+ type: "string",
770
+ },
771
+ },
772
+ paidInvoiceUrls: {
773
+ type: "array",
774
+ items: {
775
+ type: "string",
776
+ },
777
+ },
778
+ customerId: {
779
+ type: "string",
780
+ },
781
+ monthlyUsersSubscriptionId: {
782
+ anyOf: [
783
+ {
784
+ type: "null",
785
+ },
786
+ {
787
+ type: "string",
788
+ },
789
+ ],
790
+ },
791
+ card: {
792
+ type: "object",
793
+ properties: {
794
+ brand: {
795
+ type: "string",
796
+ },
797
+ exp_month: {
798
+ type: "number",
799
+ },
800
+ exp_year: {
801
+ type: "number",
802
+ },
803
+ last4: {
804
+ type: "number",
805
+ },
806
+ },
807
+ required: ["brand", "exp_month", "exp_year", "last4"],
808
+ },
809
+ planId: {
810
+ anyOf: [
811
+ {
812
+ type: "string",
813
+ },
814
+ {
815
+ type: "null",
816
+ },
817
+ ],
818
+ },
819
+ },
820
+ required: [
821
+ "activeUsersUsageSubscriptionItemIds",
822
+ "paidInvoiceUrls",
823
+ "monthlyUsersSubscriptionId",
824
+ ],
825
+ },
826
+ status: {
827
+ type: "string",
828
+ },
829
+ organizationId: {
830
+ type: "string",
831
+ },
832
+ createdAt: {
833
+ type: "string",
834
+ },
835
+ statusDate: {
836
+ type: "string",
837
+ },
838
+ __v: {
839
+ type: "number",
840
+ },
841
+ trialEndDate: {
842
+ type: "string",
843
+ },
844
+ activeUserCount: {
845
+ type: "number",
846
+ },
847
+ statusMessage: {
848
+ anyOf: [
849
+ {
850
+ type: "string",
851
+ },
852
+ {
853
+ type: "null",
854
+ },
855
+ ],
856
+ },
857
+ contact: {
858
+ type: "object",
859
+ properties: {
860
+ email: {
861
+ type: "string",
862
+ },
863
+ name: {
864
+ type: "string",
865
+ },
866
+ phone: {
867
+ type: "string",
868
+ },
869
+ },
870
+ required: ["email", "name", "phone"],
871
+ },
872
+ statusDelinquentAfterDate: {
873
+ type: "null",
874
+ },
875
+ },
876
+ required: [
877
+ "_id",
878
+ "stripeMetadata",
879
+ "status",
880
+ "organizationId",
881
+ "createdAt",
882
+ "statusDate",
883
+ "__v",
884
+ ],
885
+ },
886
+ },
887
+ required: ["organization", "subscription"],
888
+ },
889
+ },
890
+ },
891
+ required: ["organizations"],
892
+ };
893
+ const converter = new TypescriptProcedureConverter("MyScope", {
894
+ args: argsAndData,
895
+ data: argsAndData,
896
+ });
897
+
898
+ expect(converter.code.replace(/\s/g, "")).toMatch(
899
+ `export namespace MyScope {
900
+ export interface Args { pagination?: Pagination; organizations: Array<OrganizationItem>; }
901
+
902
+ export interface Data { pagination?: Pagination; organizations: Array<OrganizationItem>; }
903
+
904
+ export type Pagination = { total?: number; }
905
+ export type OrganizationItem = { counts?: Counts; linkedToInfinityOrganizationId?: string; migration?: Migration; organization: Organization; subscription: Subscription; }
906
+ export type Counts = { locations: number; portalUsers: number; users: number; regions: number; }
907
+ export type Migration = { infinity?: Infinity; legacy?: Legacy; operations: Array<OperationItem>; organizationId: string; step: Step; startTime?: string; endTime?: string | null; }
908
+ export type Infinity = { organizationId: string; primaryRegionId: string; primaryUserId: string; }
909
+ export type Legacy = { organizationId: string; primaryRegionId: string; primaryUserId: string; }
910
+ export type OperationItem = { action: "initial-migration" | "migration-update"; timestamp: string; }
911
+ export type Step = { create_regions?: CreateRegions; create_location_groups?: CreateLocationGroups; create_locations?: CreateLocations; create_locations_bolos?: CreateLocationsBolos; create_locations_checkpoints?: CreateLocationsCheckpoints; create_locations_contacts?: CreateLocationsContacts; create_locations_info_blocks?: CreateLocationsInfoBlocks; create_locations_passdowns?: CreateLocationsPassdowns; create_locations_subscribers?: CreateLocationsSubscribers; create_locations_sub_locations?: CreateLocationsSubLocations; create_users?: CreateUsers; create_portal_users?: CreatePortalUsers; create_records?: CreateRecords; create_records_comments?: CreateRecordsComments; }
912
+ export type CreateRegions = { total: number; processed: number; failed: number; }
913
+ export type CreateLocationGroups = { total: number; processed: number; failed: number; }
914
+ export type CreateLocations = { total: number; processed: number; failed: number; }
915
+ export type CreateLocationsBolos = { total: number; processed: number; failed: number; }
916
+ export type CreateLocationsCheckpoints = { total: number; processed: number; failed: number; }
917
+ export type CreateLocationsContacts = { total: number; processed: number; failed: number; }
918
+ export type CreateLocationsInfoBlocks = { total: number; processed: number; failed: number; }
919
+ export type CreateLocationsPassdowns = { total: number; processed: number; failed: number; }
920
+ export type CreateLocationsSubscribers = { total: number; processed: number; failed: number; }
921
+ export type CreateLocationsSubLocations = { total: number; processed: number; failed: number; }
922
+ export type CreateUsers = { total: number; processed: number; failed: number; }
923
+ export type CreatePortalUsers = { total: number; processed: number; failed: number; }
924
+ export type CreateRecords = { total: number; processed: number; failed: number; }
925
+ export type CreateRecordsComments = { total: number; processed: number; failed: number; }
926
+ export type Organization = { _id: string; _migrated?: Migrated | OrganizationMigrated | null; active: boolean; address: Address; createdAt: string; createdBy: string; name: string; phone?: string; updatedAt: string; updatedBy: string; website?: string; logoUrl?: Array<string> | string; userStatuses?: Array<UserStatuseItem>; stagnent?: boolean; metadata: Metadata; }
927
+ export type Migrated = { success: true; infinityOrgId: string; infinityId: string; infinityEntity: string; }
928
+ export type OrganizationMigrated = { success: false; }
929
+ export type Address = { city: string; state: string; streetAddress?: string; }
930
+ export type UserStatuseItem = { color: string; title: string; }
931
+ export type Metadata = { _id: string; _migrated?: Migrated | MetadataMigrated | null; firstLogin?: boolean; modules: Modules; organizationId: string; settings: Settings; services: Array<string>; userStatuses: Array<MetadataUserStatuseItem>; subscriptionStatus?: string; survey?: Survey; }
932
+ export type MetadataMigrated = { success: false; }
933
+ export type Modules = { region?: boolean; report?: boolean; record?: boolean; mail?: boolean; location?: boolean; dispatch?: boolean; bulletin?: boolean; portal?: boolean; schedule?: boolean; geolocation?: boolean; patrol?: boolean; integrations?: boolean; dateFormat?: string; timeFormat?: string; }
934
+ export type Settings = { dateFormat?: string; timeFormat?: string; userNameFormat?: number; module?: Module; }
935
+ export type Module = { dispatch?: Dispatch; roster?: Roster; }
936
+ export type Dispatch = { allowedDispatchTypeIds: AllowedDispatchTypeIds; dispatchTypeSettings?: DispatchTypeSettings; }
937
+ export type AllowedDispatchTypeIds = { serviceCall?: boolean; userStatus?: boolean; }
938
+ export type DispatchTypeSettings = { serviceCall: ServiceCall; }
939
+ export type ServiceCall = { requireClearedWithReportEntry: boolean; }
940
+ export type Roster = { userInfoAccessLevel: null | number; }
941
+ export type MetadataUserStatuseItem = { color: string; geoTracking: boolean; title: string; sortPriority: number; }
942
+ export type Survey = { referral?: string; currentlyUsingSystem?: string; organizationAppGoal?: string; currentSystemName?: string; currentSystemIssue?: string; contactMeForWalkThrough?: boolean; organizationAppGoalOther?: string; bestContactTime?: string; }
943
+ export type Subscription = { _id: string; _migration?: SubscriptionMigration | MigrationType | null; stripeMetadata: StripeMetadata; status: string; organizationId: string; createdAt: string; statusDate: string; __v: number; trialEndDate?: string; activeUserCount?: number; statusMessage?: string | null; contact?: Contact; statusDelinquentAfterDate?: null; }
944
+ export type SubscriptionMigration = { success: true; infinityOrgId: string; infinityId: string; infinityEntity: string; }
945
+ export type MigrationType = { success: false; }
946
+ export type StripeMetadata = { activeUsersUsageSubscriptionItemIds: Array<string>; paidInvoiceUrls: Array<string>; customerId?: string; monthlyUsersSubscriptionId: null | string; card?: Card; planId?: string | null; }
947
+ export type Card = { brand: string; exp_month: number; exp_year: number; last4: number; }
948
+ export type Contact = { email: string; name: string; phone: string; }
949
+ }`.replace(/\s/g, ""),
950
+ );
951
+ });
952
+ });