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