@layer-drone/protocol 1.0.2 → 2.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.
- package/dist/index.d.mts +1226 -159
- package/dist/index.d.ts +1226 -159
- package/dist/index.js +878 -19
- package/dist/index.mjs +844 -16
- package/package.json +5 -3
- package/src/client/client.gen.ts +5 -1
- package/src/client/sdk.gen.ts +1209 -171
- package/src/client/transformers.gen.ts +390 -0
- package/src/client/types.gen.ts +1532 -139
|
@@ -2,22 +2,36 @@
|
|
|
2
2
|
import type {
|
|
3
3
|
ApiTokenControllerUpdateToken0V1Response,
|
|
4
4
|
ApiTokenControllerUpdateToken1Response,
|
|
5
|
+
CampaignsControllerCreateCampaignV2V2Response,
|
|
6
|
+
CampaignsControllerGetCampaignV2V2Response,
|
|
7
|
+
CampaignsControllerGetCampaignsV2V2Response,
|
|
8
|
+
CampaignsControllerUpdateCampaignV2V2Response,
|
|
5
9
|
ConditionsControllerGetSunAltitudeTimeLimits0V1Response,
|
|
6
10
|
ConditionsControllerGetSunAltitudeTimeLimits1Response,
|
|
7
11
|
ContractsControllerGetAllContracts0V1Response,
|
|
8
12
|
ContractsControllerGetAllContracts1Response,
|
|
9
13
|
FlightPlansControllerCreate0V1Response,
|
|
10
14
|
FlightPlansControllerCreate1Response,
|
|
15
|
+
FlightPlansControllerCreateV2V2Response,
|
|
11
16
|
FlightPlansControllerGet0V1Response,
|
|
12
17
|
FlightPlansControllerGet1Response,
|
|
13
18
|
FlightPlansControllerGetMany0V1Response,
|
|
14
19
|
FlightPlansControllerGetMany1Response,
|
|
20
|
+
FlightPlansControllerGetManyV2V2Response,
|
|
21
|
+
FlightPlansControllerGetV2V2Response,
|
|
22
|
+
FlightPlansControllerUpdateV2V2Response,
|
|
15
23
|
FlightReviewsControllerGetFlightReview0V1Response,
|
|
16
24
|
FlightReviewsControllerGetFlightReview1Response,
|
|
17
25
|
FlightReviewsControllerGetFlightReviews0V1Response,
|
|
18
26
|
FlightReviewsControllerGetFlightReviews1Response,
|
|
27
|
+
FlightsControllerCreateFlightV2V2Response,
|
|
19
28
|
FlightsControllerGetFlight0V1Response,
|
|
20
29
|
FlightsControllerGetFlight1Response,
|
|
30
|
+
FlightsControllerGetFlightV2V2Response,
|
|
31
|
+
FlightsControllerGetFlightsV2V2Response,
|
|
32
|
+
FlightsControllerGetReviewV2V2Response,
|
|
33
|
+
FlightsControllerRequestReviewV2V2Response,
|
|
34
|
+
FlightsControllerSubmitProvenanceV2V2Response,
|
|
21
35
|
FlightsControllerValidateFlight0V1Response,
|
|
22
36
|
FlightsControllerValidateFlight1Response,
|
|
23
37
|
GetProposalResponse,
|
|
@@ -30,12 +44,19 @@ import type {
|
|
|
30
44
|
InboundWebhookConfigsControllerUpdate0V1Response,
|
|
31
45
|
InboundWebhookConfigsControllerUpdate1Response,
|
|
32
46
|
ListProposalsResponse,
|
|
47
|
+
MissionsControllerCancelMissionV2V2Response,
|
|
33
48
|
MissionsControllerCreateMissions0V1Response,
|
|
34
49
|
MissionsControllerCreateMissions1Response,
|
|
50
|
+
MissionsControllerCreateMissionsV2V2Response,
|
|
35
51
|
MissionsControllerGetMission0V1Response,
|
|
36
52
|
MissionsControllerGetMission1Response,
|
|
53
|
+
MissionsControllerGetMissionV2V2Response,
|
|
37
54
|
MissionsControllerGetMissions0V1Response,
|
|
38
55
|
MissionsControllerGetMissions1Response,
|
|
56
|
+
MissionsControllerGetMissionsV2V2Response,
|
|
57
|
+
MissionsControllerRetryMissionV2V2Response,
|
|
58
|
+
MissionsControllerUpdateMissionV2V2Response,
|
|
59
|
+
RewardsControllerListRewardsV2V2Response,
|
|
39
60
|
WebhooksControllerGet0V1Response,
|
|
40
61
|
WebhooksControllerGet1Response,
|
|
41
62
|
WebhooksControllerGetMany0V1Response,
|
|
@@ -46,8 +67,12 @@ import type {
|
|
|
46
67
|
WebhooksControllerUpdate1Response,
|
|
47
68
|
ZonesControllerCreateZone0V1Response,
|
|
48
69
|
ZonesControllerCreateZone1Response,
|
|
70
|
+
ZonesControllerGetZone0V1Response,
|
|
71
|
+
ZonesControllerGetZone1Response,
|
|
72
|
+
ZonesControllerGetZoneV2V2Response,
|
|
49
73
|
ZonesControllerUpdateZone0V1Response,
|
|
50
74
|
ZonesControllerUpdateZone1Response,
|
|
75
|
+
ZonesControllerUpdateZoneV2V2Response,
|
|
51
76
|
} from "./types.gen.js";
|
|
52
77
|
|
|
53
78
|
const updateApiTokenResponseDtoSchemaResponseTransformer = (data: any) => {
|
|
@@ -490,6 +515,13 @@ export const zonesControllerCreateZone1ResponseTransformer = async (
|
|
|
490
515
|
return data;
|
|
491
516
|
};
|
|
492
517
|
|
|
518
|
+
export const zonesControllerGetZone0V1ResponseTransformer = async (
|
|
519
|
+
data: any,
|
|
520
|
+
): Promise<ZonesControllerGetZone0V1Response> => {
|
|
521
|
+
data = zoneResponseDtoSchemaResponseTransformer(data);
|
|
522
|
+
return data;
|
|
523
|
+
};
|
|
524
|
+
|
|
493
525
|
export const zonesControllerUpdateZone0V1ResponseTransformer = async (
|
|
494
526
|
data: any,
|
|
495
527
|
): Promise<ZonesControllerUpdateZone0V1Response> => {
|
|
@@ -497,6 +529,13 @@ export const zonesControllerUpdateZone0V1ResponseTransformer = async (
|
|
|
497
529
|
return data;
|
|
498
530
|
};
|
|
499
531
|
|
|
532
|
+
export const zonesControllerGetZone1ResponseTransformer = async (
|
|
533
|
+
data: any,
|
|
534
|
+
): Promise<ZonesControllerGetZone1Response> => {
|
|
535
|
+
data = zoneResponseDtoSchemaResponseTransformer(data);
|
|
536
|
+
return data;
|
|
537
|
+
};
|
|
538
|
+
|
|
500
539
|
export const zonesControllerUpdateZone1ResponseTransformer = async (
|
|
501
540
|
data: any,
|
|
502
541
|
): Promise<ZonesControllerUpdateZone1Response> => {
|
|
@@ -598,3 +637,354 @@ export const inboundWebhookConfigsControllerUpdate1ResponseTransformer = async (
|
|
|
598
637
|
data = updateInboundWebhookConfigResponseSchemaResponseTransformer(data);
|
|
599
638
|
return data;
|
|
600
639
|
};
|
|
640
|
+
|
|
641
|
+
const listCampaignsResponseDtoSchemaResponseTransformer = (data: any) => {
|
|
642
|
+
data.data = data.data.map((item: any) => {
|
|
643
|
+
if (item.start_date) {
|
|
644
|
+
item.start_date = new Date(item.start_date);
|
|
645
|
+
}
|
|
646
|
+
if (item.end_date) {
|
|
647
|
+
item.end_date = new Date(item.end_date);
|
|
648
|
+
}
|
|
649
|
+
item.created_at = new Date(item.created_at);
|
|
650
|
+
item.updated_at = new Date(item.updated_at);
|
|
651
|
+
return item;
|
|
652
|
+
});
|
|
653
|
+
return data;
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
export const campaignsControllerGetCampaignsV2V2ResponseTransformer = async (
|
|
657
|
+
data: any,
|
|
658
|
+
): Promise<CampaignsControllerGetCampaignsV2V2Response> => {
|
|
659
|
+
data = listCampaignsResponseDtoSchemaResponseTransformer(data);
|
|
660
|
+
return data;
|
|
661
|
+
};
|
|
662
|
+
|
|
663
|
+
const campaignResponseDtoSchemaResponseTransformer = (data: any) => {
|
|
664
|
+
if (data.start_date) {
|
|
665
|
+
data.start_date = new Date(data.start_date);
|
|
666
|
+
}
|
|
667
|
+
if (data.end_date) {
|
|
668
|
+
data.end_date = new Date(data.end_date);
|
|
669
|
+
}
|
|
670
|
+
data.created_at = new Date(data.created_at);
|
|
671
|
+
data.updated_at = new Date(data.updated_at);
|
|
672
|
+
return data;
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
export const campaignsControllerCreateCampaignV2V2ResponseTransformer = async (
|
|
676
|
+
data: any,
|
|
677
|
+
): Promise<CampaignsControllerCreateCampaignV2V2Response> => {
|
|
678
|
+
data = campaignResponseDtoSchemaResponseTransformer(data);
|
|
679
|
+
return data;
|
|
680
|
+
};
|
|
681
|
+
|
|
682
|
+
export const campaignsControllerGetCampaignV2V2ResponseTransformer = async (
|
|
683
|
+
data: any,
|
|
684
|
+
): Promise<CampaignsControllerGetCampaignV2V2Response> => {
|
|
685
|
+
data = campaignResponseDtoSchemaResponseTransformer(data);
|
|
686
|
+
return data;
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
export const campaignsControllerUpdateCampaignV2V2ResponseTransformer = async (
|
|
690
|
+
data: any,
|
|
691
|
+
): Promise<CampaignsControllerUpdateCampaignV2V2Response> => {
|
|
692
|
+
data = campaignResponseDtoSchemaResponseTransformer(data);
|
|
693
|
+
return data;
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
const missionFulfillmentGetFlightPlansResponseSchemaResponseTransformer = (
|
|
697
|
+
data: any,
|
|
698
|
+
) => {
|
|
699
|
+
data.data = data.data.map((item: any) => {
|
|
700
|
+
item.created_at = new Date(item.created_at);
|
|
701
|
+
item.updated_at = new Date(item.updated_at);
|
|
702
|
+
return item;
|
|
703
|
+
});
|
|
704
|
+
return data;
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
export const flightPlansControllerGetManyV2V2ResponseTransformer = async (
|
|
708
|
+
data: any,
|
|
709
|
+
): Promise<FlightPlansControllerGetManyV2V2Response> => {
|
|
710
|
+
data =
|
|
711
|
+
missionFulfillmentGetFlightPlansResponseSchemaResponseTransformer(data);
|
|
712
|
+
return data;
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
const flightPlanResponseSchemaResponseTransformer = (data: any) => {
|
|
716
|
+
data.created_at = new Date(data.created_at);
|
|
717
|
+
data.updated_at = new Date(data.updated_at);
|
|
718
|
+
return data;
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
export const flightPlansControllerCreateV2V2ResponseTransformer = async (
|
|
722
|
+
data: any,
|
|
723
|
+
): Promise<FlightPlansControllerCreateV2V2Response> => {
|
|
724
|
+
data = flightPlanResponseSchemaResponseTransformer(data);
|
|
725
|
+
return data;
|
|
726
|
+
};
|
|
727
|
+
|
|
728
|
+
export const flightPlansControllerGetV2V2ResponseTransformer = async (
|
|
729
|
+
data: any,
|
|
730
|
+
): Promise<FlightPlansControllerGetV2V2Response> => {
|
|
731
|
+
data = flightPlanResponseSchemaResponseTransformer(data);
|
|
732
|
+
return data;
|
|
733
|
+
};
|
|
734
|
+
|
|
735
|
+
export const flightPlansControllerUpdateV2V2ResponseTransformer = async (
|
|
736
|
+
data: any,
|
|
737
|
+
): Promise<FlightPlansControllerUpdateV2V2Response> => {
|
|
738
|
+
data = flightPlanResponseSchemaResponseTransformer(data);
|
|
739
|
+
return data;
|
|
740
|
+
};
|
|
741
|
+
|
|
742
|
+
const listFlightsResponseSchemaResponseTransformer = (data: any) => {
|
|
743
|
+
data.data = data.data.map((item: any) => {
|
|
744
|
+
item.created_at = new Date(item.created_at);
|
|
745
|
+
item.updated_at = new Date(item.updated_at);
|
|
746
|
+
return item;
|
|
747
|
+
});
|
|
748
|
+
return data;
|
|
749
|
+
};
|
|
750
|
+
|
|
751
|
+
export const flightsControllerGetFlightsV2V2ResponseTransformer = async (
|
|
752
|
+
data: any,
|
|
753
|
+
): Promise<FlightsControllerGetFlightsV2V2Response> => {
|
|
754
|
+
data = listFlightsResponseSchemaResponseTransformer(data);
|
|
755
|
+
return data;
|
|
756
|
+
};
|
|
757
|
+
|
|
758
|
+
const createFlightResponseSchemaResponseTransformer = (data: any) => {
|
|
759
|
+
data.flight.created_at = new Date(data.flight.created_at);
|
|
760
|
+
data.flight.updated_at = new Date(data.flight.updated_at);
|
|
761
|
+
return data;
|
|
762
|
+
};
|
|
763
|
+
|
|
764
|
+
export const flightsControllerCreateFlightV2V2ResponseTransformer = async (
|
|
765
|
+
data: any,
|
|
766
|
+
): Promise<FlightsControllerCreateFlightV2V2Response> => {
|
|
767
|
+
data = createFlightResponseSchemaResponseTransformer(data);
|
|
768
|
+
return data;
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
const flightResponseSchemaResponseTransformer = (data: any) => {
|
|
772
|
+
data.created_at = new Date(data.created_at);
|
|
773
|
+
data.updated_at = new Date(data.updated_at);
|
|
774
|
+
return data;
|
|
775
|
+
};
|
|
776
|
+
|
|
777
|
+
export const flightsControllerGetFlightV2V2ResponseTransformer = async (
|
|
778
|
+
data: any,
|
|
779
|
+
): Promise<FlightsControllerGetFlightV2V2Response> => {
|
|
780
|
+
data = flightResponseSchemaResponseTransformer(data);
|
|
781
|
+
return data;
|
|
782
|
+
};
|
|
783
|
+
|
|
784
|
+
const flightReviewResponseSchemaResponseTransformer = (data: any) => {
|
|
785
|
+
data.created_at = new Date(data.created_at);
|
|
786
|
+
data.updated_at = new Date(data.updated_at);
|
|
787
|
+
if (data.reviewed_at) {
|
|
788
|
+
data.reviewed_at = new Date(data.reviewed_at);
|
|
789
|
+
}
|
|
790
|
+
if (data.confirmed_at) {
|
|
791
|
+
data.confirmed_at = new Date(data.confirmed_at);
|
|
792
|
+
}
|
|
793
|
+
return data;
|
|
794
|
+
};
|
|
795
|
+
|
|
796
|
+
export const flightsControllerGetReviewV2V2ResponseTransformer = async (
|
|
797
|
+
data: any,
|
|
798
|
+
): Promise<FlightsControllerGetReviewV2V2Response> => {
|
|
799
|
+
data = flightReviewResponseSchemaResponseTransformer(data);
|
|
800
|
+
return data;
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
export const flightsControllerRequestReviewV2V2ResponseTransformer = async (
|
|
804
|
+
data: any,
|
|
805
|
+
): Promise<FlightsControllerRequestReviewV2V2Response> => {
|
|
806
|
+
data = flightReviewResponseSchemaResponseTransformer(data);
|
|
807
|
+
return data;
|
|
808
|
+
};
|
|
809
|
+
|
|
810
|
+
export const flightsControllerSubmitProvenanceV2V2ResponseTransformer = async (
|
|
811
|
+
data: any,
|
|
812
|
+
): Promise<FlightsControllerSubmitProvenanceV2V2Response> => {
|
|
813
|
+
data = flightResponseSchemaResponseTransformer(data);
|
|
814
|
+
return data;
|
|
815
|
+
};
|
|
816
|
+
|
|
817
|
+
const listMissionsResponseSchemaResponseTransformer = (data: any) => {
|
|
818
|
+
data.data = data.data.map((item: any) => {
|
|
819
|
+
item.capture_start_time = new Date(item.capture_start_time);
|
|
820
|
+
item.capture_end_time = new Date(item.capture_end_time);
|
|
821
|
+
if (item.confirmed_at) {
|
|
822
|
+
item.confirmed_at = new Date(item.confirmed_at);
|
|
823
|
+
}
|
|
824
|
+
if (item.confirmations) {
|
|
825
|
+
item.confirmations = item.confirmations.map((item: any) => {
|
|
826
|
+
item.block_timestamp = new Date(item.block_timestamp);
|
|
827
|
+
item.recorded_at = new Date(item.recorded_at);
|
|
828
|
+
return item;
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
if (item.hold) {
|
|
832
|
+
item.hold.expires_at = new Date(item.hold.expires_at);
|
|
833
|
+
if (item.hold.released_at) {
|
|
834
|
+
item.hold.released_at = new Date(item.hold.released_at);
|
|
835
|
+
}
|
|
836
|
+
item.hold.created_at = new Date(item.hold.created_at);
|
|
837
|
+
item.hold.updated_at = new Date(item.hold.updated_at);
|
|
838
|
+
}
|
|
839
|
+
if (item.closed_at) {
|
|
840
|
+
item.closed_at = new Date(item.closed_at);
|
|
841
|
+
}
|
|
842
|
+
item.created_at = new Date(item.created_at);
|
|
843
|
+
item.updated_at = new Date(item.updated_at);
|
|
844
|
+
return item;
|
|
845
|
+
});
|
|
846
|
+
return data;
|
|
847
|
+
};
|
|
848
|
+
|
|
849
|
+
export const missionsControllerGetMissionsV2V2ResponseTransformer = async (
|
|
850
|
+
data: any,
|
|
851
|
+
): Promise<MissionsControllerGetMissionsV2V2Response> => {
|
|
852
|
+
data = listMissionsResponseSchemaResponseTransformer(data);
|
|
853
|
+
return data;
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
const createMissionsResponseSchemaResponseTransformer = (data: any) => {
|
|
857
|
+
data.results = data.results.map((item: any) => {
|
|
858
|
+
item.mission.capture_start_time = new Date(item.mission.capture_start_time);
|
|
859
|
+
item.mission.capture_end_time = new Date(item.mission.capture_end_time);
|
|
860
|
+
if (item.mission.confirmed_at) {
|
|
861
|
+
item.mission.confirmed_at = new Date(item.mission.confirmed_at);
|
|
862
|
+
}
|
|
863
|
+
if (item.mission.confirmations) {
|
|
864
|
+
item.mission.confirmations = item.mission.confirmations.map(
|
|
865
|
+
(item: any) => {
|
|
866
|
+
item.block_timestamp = new Date(item.block_timestamp);
|
|
867
|
+
item.recorded_at = new Date(item.recorded_at);
|
|
868
|
+
return item;
|
|
869
|
+
},
|
|
870
|
+
);
|
|
871
|
+
}
|
|
872
|
+
if (item.mission.hold) {
|
|
873
|
+
item.mission.hold.expires_at = new Date(item.mission.hold.expires_at);
|
|
874
|
+
if (item.mission.hold.released_at) {
|
|
875
|
+
item.mission.hold.released_at = new Date(item.mission.hold.released_at);
|
|
876
|
+
}
|
|
877
|
+
item.mission.hold.created_at = new Date(item.mission.hold.created_at);
|
|
878
|
+
item.mission.hold.updated_at = new Date(item.mission.hold.updated_at);
|
|
879
|
+
}
|
|
880
|
+
if (item.mission.closed_at) {
|
|
881
|
+
item.mission.closed_at = new Date(item.mission.closed_at);
|
|
882
|
+
}
|
|
883
|
+
item.mission.created_at = new Date(item.mission.created_at);
|
|
884
|
+
item.mission.updated_at = new Date(item.mission.updated_at);
|
|
885
|
+
return item;
|
|
886
|
+
});
|
|
887
|
+
return data;
|
|
888
|
+
};
|
|
889
|
+
|
|
890
|
+
export const missionsControllerCreateMissionsV2V2ResponseTransformer = async (
|
|
891
|
+
data: any,
|
|
892
|
+
): Promise<MissionsControllerCreateMissionsV2V2Response> => {
|
|
893
|
+
data = createMissionsResponseSchemaResponseTransformer(data);
|
|
894
|
+
return data;
|
|
895
|
+
};
|
|
896
|
+
|
|
897
|
+
const missionResponseSchemaResponseTransformer = (data: any) => {
|
|
898
|
+
data.capture_start_time = new Date(data.capture_start_time);
|
|
899
|
+
data.capture_end_time = new Date(data.capture_end_time);
|
|
900
|
+
if (data.confirmed_at) {
|
|
901
|
+
data.confirmed_at = new Date(data.confirmed_at);
|
|
902
|
+
}
|
|
903
|
+
if (data.confirmations) {
|
|
904
|
+
data.confirmations = data.confirmations.map((item: any) => {
|
|
905
|
+
item.block_timestamp = new Date(item.block_timestamp);
|
|
906
|
+
item.recorded_at = new Date(item.recorded_at);
|
|
907
|
+
return item;
|
|
908
|
+
});
|
|
909
|
+
}
|
|
910
|
+
if (data.hold) {
|
|
911
|
+
data.hold.expires_at = new Date(data.hold.expires_at);
|
|
912
|
+
if (data.hold.released_at) {
|
|
913
|
+
data.hold.released_at = new Date(data.hold.released_at);
|
|
914
|
+
}
|
|
915
|
+
data.hold.created_at = new Date(data.hold.created_at);
|
|
916
|
+
data.hold.updated_at = new Date(data.hold.updated_at);
|
|
917
|
+
}
|
|
918
|
+
if (data.closed_at) {
|
|
919
|
+
data.closed_at = new Date(data.closed_at);
|
|
920
|
+
}
|
|
921
|
+
data.created_at = new Date(data.created_at);
|
|
922
|
+
data.updated_at = new Date(data.updated_at);
|
|
923
|
+
return data;
|
|
924
|
+
};
|
|
925
|
+
|
|
926
|
+
export const missionsControllerGetMissionV2V2ResponseTransformer = async (
|
|
927
|
+
data: any,
|
|
928
|
+
): Promise<MissionsControllerGetMissionV2V2Response> => {
|
|
929
|
+
data = missionResponseSchemaResponseTransformer(data);
|
|
930
|
+
return data;
|
|
931
|
+
};
|
|
932
|
+
|
|
933
|
+
export const missionsControllerUpdateMissionV2V2ResponseTransformer = async (
|
|
934
|
+
data: any,
|
|
935
|
+
): Promise<MissionsControllerUpdateMissionV2V2Response> => {
|
|
936
|
+
data = missionResponseSchemaResponseTransformer(data);
|
|
937
|
+
return data;
|
|
938
|
+
};
|
|
939
|
+
|
|
940
|
+
export const missionsControllerCancelMissionV2V2ResponseTransformer = async (
|
|
941
|
+
data: any,
|
|
942
|
+
): Promise<MissionsControllerCancelMissionV2V2Response> => {
|
|
943
|
+
data = missionResponseSchemaResponseTransformer(data);
|
|
944
|
+
return data;
|
|
945
|
+
};
|
|
946
|
+
|
|
947
|
+
export const missionsControllerRetryMissionV2V2ResponseTransformer = async (
|
|
948
|
+
data: any,
|
|
949
|
+
): Promise<MissionsControllerRetryMissionV2V2Response> => {
|
|
950
|
+
data = missionResponseSchemaResponseTransformer(data);
|
|
951
|
+
return data;
|
|
952
|
+
};
|
|
953
|
+
|
|
954
|
+
const listRewardsResponseSchemaResponseTransformer = (data: any) => {
|
|
955
|
+
data.data = data.data.map((item: any) => {
|
|
956
|
+
item.created_at = new Date(item.created_at);
|
|
957
|
+
item.updated_at = new Date(item.updated_at);
|
|
958
|
+
return item;
|
|
959
|
+
});
|
|
960
|
+
return data;
|
|
961
|
+
};
|
|
962
|
+
|
|
963
|
+
export const rewardsControllerListRewardsV2V2ResponseTransformer = async (
|
|
964
|
+
data: any,
|
|
965
|
+
): Promise<RewardsControllerListRewardsV2V2Response> => {
|
|
966
|
+
data = listRewardsResponseSchemaResponseTransformer(data);
|
|
967
|
+
return data;
|
|
968
|
+
};
|
|
969
|
+
|
|
970
|
+
const missionFulfillmentZoneResponseDtoSchemaResponseTransformer = (
|
|
971
|
+
data: any,
|
|
972
|
+
) => {
|
|
973
|
+
data.created_at = new Date(data.created_at);
|
|
974
|
+
data.updated_at = new Date(data.updated_at);
|
|
975
|
+
return data;
|
|
976
|
+
};
|
|
977
|
+
|
|
978
|
+
export const zonesControllerGetZoneV2V2ResponseTransformer = async (
|
|
979
|
+
data: any,
|
|
980
|
+
): Promise<ZonesControllerGetZoneV2V2Response> => {
|
|
981
|
+
data = missionFulfillmentZoneResponseDtoSchemaResponseTransformer(data);
|
|
982
|
+
return data;
|
|
983
|
+
};
|
|
984
|
+
|
|
985
|
+
export const zonesControllerUpdateZoneV2V2ResponseTransformer = async (
|
|
986
|
+
data: any,
|
|
987
|
+
): Promise<ZonesControllerUpdateZoneV2V2Response> => {
|
|
988
|
+
data = missionFulfillmentZoneResponseDtoSchemaResponseTransformer(data);
|
|
989
|
+
return data;
|
|
990
|
+
};
|