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