@layer-drone/protocol 0.0.16 → 0.0.17
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 +234 -43
- package/dist/index.d.ts +234 -43
- package/dist/index.js +63 -10
- package/dist/index.mjs +62 -9
- package/package.json +1 -1
- package/src/client/sdk.gen.ts +13 -9
- package/src/client/transformers.gen.ts +27 -0
- package/src/client/types.gen.ts +25 -20
- package/src/event/types.gen.ts +40 -3
package/dist/index.d.ts
CHANGED
|
@@ -92,7 +92,8 @@ type ClaimRewardsResponseDto = {
|
|
|
92
92
|
} | string;
|
|
93
93
|
};
|
|
94
94
|
type FlightDto = {
|
|
95
|
-
token_id:
|
|
95
|
+
token_id: bigint;
|
|
96
|
+
mission_id: bigint;
|
|
96
97
|
owner: string;
|
|
97
98
|
validator: string;
|
|
98
99
|
is_approved: boolean;
|
|
@@ -104,16 +105,17 @@ type FlightDto = {
|
|
|
104
105
|
};
|
|
105
106
|
type CreateFileRequestDto = {
|
|
106
107
|
filenames: Array<string>;
|
|
108
|
+
storageKey: string;
|
|
107
109
|
};
|
|
108
110
|
type CreateFileResponseDto = {
|
|
109
111
|
presignedUrls: {
|
|
110
112
|
[key: string]: string;
|
|
111
113
|
};
|
|
112
114
|
};
|
|
113
|
-
type
|
|
114
|
-
|
|
115
|
+
type ValidateFlightRequestDto = {
|
|
116
|
+
storageKey: string;
|
|
115
117
|
pilotAddress: string;
|
|
116
|
-
missionId:
|
|
118
|
+
missionId: bigint;
|
|
117
119
|
flightTimestamp: string;
|
|
118
120
|
flightRequestInfo: {
|
|
119
121
|
filePaths: Array<string>;
|
|
@@ -123,7 +125,7 @@ type ValidateFlightDto = {
|
|
|
123
125
|
};
|
|
124
126
|
};
|
|
125
127
|
type ValidateFlightResponseDto = {
|
|
126
|
-
flightId:
|
|
128
|
+
flightId: bigint;
|
|
127
129
|
flightManifestUri: string;
|
|
128
130
|
};
|
|
129
131
|
type GetTimeLimitsForSunAltitudeResponse = {
|
|
@@ -142,7 +144,7 @@ type GetTimeLimitsForSunAltitudeResponse = {
|
|
|
142
144
|
type CreateWebhookBody = {
|
|
143
145
|
name: string;
|
|
144
146
|
url: string;
|
|
145
|
-
event_types: Array<"test" | "protocol.flight.submitted" | "protocol.mission.created" | "protocol.mission.updated" | "protocol.flight.reviewed" | "*">;
|
|
147
|
+
event_types: Array<"test" | "protocol.flight.submitted" | "protocol.mission.created" | "protocol.mission.updated" | "protocol.flight.reviewed" | "internal.flight.reviewed" | "*">;
|
|
146
148
|
active: boolean;
|
|
147
149
|
};
|
|
148
150
|
type CreateWebhookResponse = {
|
|
@@ -153,7 +155,7 @@ type GetWebhooksResponse = Array<{
|
|
|
153
155
|
id: number;
|
|
154
156
|
name: string;
|
|
155
157
|
url: string;
|
|
156
|
-
event_types: Array<"test" | "protocol.flight.submitted" | "protocol.mission.created" | "protocol.mission.updated" | "protocol.flight.reviewed" | "*">;
|
|
158
|
+
event_types: Array<"test" | "protocol.flight.submitted" | "protocol.mission.created" | "protocol.mission.updated" | "protocol.flight.reviewed" | "internal.flight.reviewed" | "*">;
|
|
157
159
|
active: boolean;
|
|
158
160
|
failure_count: number;
|
|
159
161
|
last_failure_reason: string;
|
|
@@ -164,7 +166,7 @@ type GetWebhookResponse = {
|
|
|
164
166
|
id: number;
|
|
165
167
|
name: string;
|
|
166
168
|
url: string;
|
|
167
|
-
event_types: Array<"test" | "protocol.flight.submitted" | "protocol.mission.created" | "protocol.mission.updated" | "protocol.flight.reviewed" | "*">;
|
|
169
|
+
event_types: Array<"test" | "protocol.flight.submitted" | "protocol.mission.created" | "protocol.mission.updated" | "protocol.flight.reviewed" | "internal.flight.reviewed" | "*">;
|
|
168
170
|
active: boolean;
|
|
169
171
|
failure_count: number;
|
|
170
172
|
last_failure_reason: string;
|
|
@@ -174,14 +176,14 @@ type GetWebhookResponse = {
|
|
|
174
176
|
type UpdateWebhookBody = {
|
|
175
177
|
name?: string;
|
|
176
178
|
url?: string;
|
|
177
|
-
event_types?: Array<"test" | "protocol.flight.submitted" | "protocol.mission.created" | "protocol.mission.updated" | "protocol.flight.reviewed" | "*">;
|
|
179
|
+
event_types?: Array<"test" | "protocol.flight.submitted" | "protocol.mission.created" | "protocol.mission.updated" | "protocol.flight.reviewed" | "internal.flight.reviewed" | "*">;
|
|
178
180
|
active?: boolean;
|
|
179
181
|
};
|
|
180
182
|
type UpdateWebhookResponse = {
|
|
181
183
|
id: number;
|
|
182
184
|
name: string;
|
|
183
185
|
url: string;
|
|
184
|
-
event_types: Array<"test" | "protocol.flight.submitted" | "protocol.mission.created" | "protocol.mission.updated" | "protocol.flight.reviewed" | "*">;
|
|
186
|
+
event_types: Array<"test" | "protocol.flight.submitted" | "protocol.mission.created" | "protocol.mission.updated" | "protocol.flight.reviewed" | "internal.flight.reviewed" | "*">;
|
|
185
187
|
active: boolean;
|
|
186
188
|
failure_count: number;
|
|
187
189
|
last_failure_reason: string;
|
|
@@ -351,28 +353,28 @@ type MissionsControllerClaimRewardsResponses = {
|
|
|
351
353
|
200: ClaimRewardsResponseDto;
|
|
352
354
|
};
|
|
353
355
|
type MissionsControllerClaimRewardsResponse = MissionsControllerClaimRewardsResponses[keyof MissionsControllerClaimRewardsResponses];
|
|
354
|
-
type
|
|
356
|
+
type FlightsControllerGenerateStorageKeyData = {
|
|
355
357
|
body?: never;
|
|
356
358
|
path?: never;
|
|
357
359
|
query: {
|
|
358
|
-
missionId:
|
|
360
|
+
missionId: bigint;
|
|
359
361
|
pilotAddress: string;
|
|
360
362
|
flightTimestamp?: string;
|
|
361
363
|
};
|
|
362
|
-
url: "/flights/
|
|
364
|
+
url: "/flights/storage-key";
|
|
363
365
|
};
|
|
364
|
-
type
|
|
366
|
+
type FlightsControllerGenerateStorageKeyErrors = {
|
|
365
367
|
401: unknown;
|
|
366
368
|
403: unknown;
|
|
367
369
|
};
|
|
368
|
-
type
|
|
369
|
-
200:
|
|
370
|
+
type FlightsControllerGenerateStorageKeyResponses = {
|
|
371
|
+
200: string;
|
|
370
372
|
};
|
|
371
|
-
type
|
|
373
|
+
type FlightsControllerGenerateStorageKeyResponse = FlightsControllerGenerateStorageKeyResponses[keyof FlightsControllerGenerateStorageKeyResponses];
|
|
372
374
|
type FlightsControllerGetFlightData = {
|
|
373
375
|
body?: never;
|
|
374
376
|
path: {
|
|
375
|
-
flightId:
|
|
377
|
+
flightId: bigint;
|
|
376
378
|
};
|
|
377
379
|
query?: never;
|
|
378
380
|
url: "/flights/{flightId}";
|
|
@@ -387,11 +389,9 @@ type FlightsControllerGetFlightResponses = {
|
|
|
387
389
|
type FlightsControllerGetFlightResponse = FlightsControllerGetFlightResponses[keyof FlightsControllerGetFlightResponses];
|
|
388
390
|
type FlightsControllerCreatePresignedUrlsData = {
|
|
389
391
|
body: CreateFileRequestDto;
|
|
390
|
-
path
|
|
391
|
-
flightId: number;
|
|
392
|
-
};
|
|
392
|
+
path?: never;
|
|
393
393
|
query?: never;
|
|
394
|
-
url: "/flights/
|
|
394
|
+
url: "/flights/files";
|
|
395
395
|
};
|
|
396
396
|
type FlightsControllerCreatePresignedUrlsErrors = {
|
|
397
397
|
401: unknown;
|
|
@@ -402,7 +402,7 @@ type FlightsControllerCreatePresignedUrlsResponses = {
|
|
|
402
402
|
};
|
|
403
403
|
type FlightsControllerCreatePresignedUrlsResponse = FlightsControllerCreatePresignedUrlsResponses[keyof FlightsControllerCreatePresignedUrlsResponses];
|
|
404
404
|
type FlightsControllerValidateFlightData = {
|
|
405
|
-
body:
|
|
405
|
+
body: ValidateFlightRequestDto;
|
|
406
406
|
path?: never;
|
|
407
407
|
query?: never;
|
|
408
408
|
url: "/flights";
|
|
@@ -761,7 +761,7 @@ declare const apiTokenControllerUpdateToken: <ThrowOnError extends boolean = fal
|
|
|
761
761
|
declare const missionsControllerCreateMissions: <ThrowOnError extends boolean = false>(options: Options<MissionsControllerCreateMissionsData, ThrowOnError>) => RequestResult<MissionsControllerCreateMissionsResponses, MissionsControllerCreateMissionsErrors, ThrowOnError, "fields">;
|
|
762
762
|
declare const missionsControllerUpdateMissions: <ThrowOnError extends boolean = false>(options: Options<MissionsControllerUpdateMissionsData, ThrowOnError>) => RequestResult<MissionsControllerUpdateMissionsResponses, unknown, ThrowOnError, "fields">;
|
|
763
763
|
declare const missionsControllerClaimRewards: <ThrowOnError extends boolean = false>(options: Options<MissionsControllerClaimRewardsData, ThrowOnError>) => RequestResult<MissionsControllerClaimRewardsResponses, MissionsControllerClaimRewardsErrors, ThrowOnError, "fields">;
|
|
764
|
-
declare const
|
|
764
|
+
declare const flightsControllerGenerateStorageKey: <ThrowOnError extends boolean = false>(options: Options<FlightsControllerGenerateStorageKeyData, ThrowOnError>) => RequestResult<FlightsControllerGenerateStorageKeyResponses, FlightsControllerGenerateStorageKeyErrors, ThrowOnError, "fields">;
|
|
765
765
|
declare const flightsControllerGetFlight: <ThrowOnError extends boolean = false>(options: Options<FlightsControllerGetFlightData, ThrowOnError>) => RequestResult<FlightsControllerGetFlightResponses, FlightsControllerGetFlightErrors, ThrowOnError, "fields">;
|
|
766
766
|
declare const flightsControllerCreatePresignedUrls: <ThrowOnError extends boolean = false>(options: Options<FlightsControllerCreatePresignedUrlsData, ThrowOnError>) => RequestResult<FlightsControllerCreatePresignedUrlsResponses, FlightsControllerCreatePresignedUrlsErrors, ThrowOnError, "fields">;
|
|
767
767
|
declare const flightsControllerValidateFlight: <ThrowOnError extends boolean = false>(options: Options<FlightsControllerValidateFlightData, ThrowOnError>) => RequestResult<FlightsControllerValidateFlightResponses, FlightsControllerValidateFlightErrors, ThrowOnError, "fields">;
|
|
@@ -806,26 +806,41 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
806
806
|
event_type: z.ZodLiteral<"protocol.flight.submitted">;
|
|
807
807
|
timestamp: z.ZodAny;
|
|
808
808
|
data: z.ZodObject<{
|
|
809
|
-
|
|
809
|
+
storageKey: z.ZodString;
|
|
810
810
|
pilotAddress: z.ZodString;
|
|
811
811
|
flightManifestUri: z.ZodString;
|
|
812
|
-
missionId: z.
|
|
812
|
+
missionId: z.ZodEffects<z.ZodObject<{
|
|
813
|
+
__type: z.ZodLiteral<"bigint">;
|
|
814
|
+
value: z.ZodString;
|
|
815
|
+
}, "strip", z.ZodTypeAny, {
|
|
816
|
+
value: string;
|
|
817
|
+
__type: "bigint";
|
|
818
|
+
}, {
|
|
819
|
+
value: string;
|
|
820
|
+
__type: "bigint";
|
|
821
|
+
}>, bigint, {
|
|
822
|
+
value: string;
|
|
823
|
+
__type: "bigint";
|
|
824
|
+
}>;
|
|
813
825
|
}, "strict", z.ZodTypeAny, {
|
|
814
|
-
missionId:
|
|
826
|
+
missionId: bigint;
|
|
815
827
|
pilotAddress: string;
|
|
816
|
-
|
|
828
|
+
storageKey: string;
|
|
817
829
|
flightManifestUri: string;
|
|
818
830
|
}, {
|
|
819
|
-
missionId:
|
|
831
|
+
missionId: {
|
|
832
|
+
value: string;
|
|
833
|
+
__type: "bigint";
|
|
834
|
+
};
|
|
820
835
|
pilotAddress: string;
|
|
821
|
-
|
|
836
|
+
storageKey: string;
|
|
822
837
|
flightManifestUri: string;
|
|
823
838
|
}>;
|
|
824
839
|
}, "strict", z.ZodTypeAny, {
|
|
825
840
|
data: {
|
|
826
|
-
missionId:
|
|
841
|
+
missionId: bigint;
|
|
827
842
|
pilotAddress: string;
|
|
828
|
-
|
|
843
|
+
storageKey: string;
|
|
829
844
|
flightManifestUri: string;
|
|
830
845
|
};
|
|
831
846
|
event_type: "protocol.flight.submitted";
|
|
@@ -833,9 +848,12 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
833
848
|
timestamp?: any;
|
|
834
849
|
}, {
|
|
835
850
|
data: {
|
|
836
|
-
missionId:
|
|
851
|
+
missionId: {
|
|
852
|
+
value: string;
|
|
853
|
+
__type: "bigint";
|
|
854
|
+
};
|
|
837
855
|
pilotAddress: string;
|
|
838
|
-
|
|
856
|
+
storageKey: string;
|
|
839
857
|
flightManifestUri: string;
|
|
840
858
|
};
|
|
841
859
|
event_type: "protocol.flight.submitted";
|
|
@@ -1036,19 +1054,55 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1036
1054
|
event_type: z.ZodLiteral<"protocol.flight.reviewed">;
|
|
1037
1055
|
timestamp: z.ZodAny;
|
|
1038
1056
|
data: z.ZodObject<{
|
|
1039
|
-
flightId: z.
|
|
1057
|
+
flightId: z.ZodEffects<z.ZodObject<{
|
|
1058
|
+
__type: z.ZodLiteral<"bigint">;
|
|
1059
|
+
value: z.ZodString;
|
|
1060
|
+
}, "strip", z.ZodTypeAny, {
|
|
1061
|
+
value: string;
|
|
1062
|
+
__type: "bigint";
|
|
1063
|
+
}, {
|
|
1064
|
+
value: string;
|
|
1065
|
+
__type: "bigint";
|
|
1066
|
+
}>, bigint, {
|
|
1067
|
+
value: string;
|
|
1068
|
+
__type: "bigint";
|
|
1069
|
+
}>;
|
|
1040
1070
|
isApproved: z.ZodBoolean;
|
|
1041
1071
|
validationLogUri: z.ZodString;
|
|
1042
1072
|
validator: z.ZodString;
|
|
1043
1073
|
filesHash: z.ZodString;
|
|
1074
|
+
storageKey: z.ZodString;
|
|
1075
|
+
missionId: z.ZodEffects<z.ZodObject<{
|
|
1076
|
+
__type: z.ZodLiteral<"bigint">;
|
|
1077
|
+
value: z.ZodString;
|
|
1078
|
+
}, "strip", z.ZodTypeAny, {
|
|
1079
|
+
value: string;
|
|
1080
|
+
__type: "bigint";
|
|
1081
|
+
}, {
|
|
1082
|
+
value: string;
|
|
1083
|
+
__type: "bigint";
|
|
1084
|
+
}>, bigint, {
|
|
1085
|
+
value: string;
|
|
1086
|
+
__type: "bigint";
|
|
1087
|
+
}>;
|
|
1044
1088
|
}, "strict", z.ZodTypeAny, {
|
|
1045
|
-
|
|
1089
|
+
missionId: bigint;
|
|
1090
|
+
flightId: bigint;
|
|
1091
|
+
storageKey: string;
|
|
1046
1092
|
isApproved: boolean;
|
|
1047
1093
|
validationLogUri: string;
|
|
1048
1094
|
validator: string;
|
|
1049
1095
|
filesHash: string;
|
|
1050
1096
|
}, {
|
|
1051
|
-
|
|
1097
|
+
missionId: {
|
|
1098
|
+
value: string;
|
|
1099
|
+
__type: "bigint";
|
|
1100
|
+
};
|
|
1101
|
+
flightId: {
|
|
1102
|
+
value: string;
|
|
1103
|
+
__type: "bigint";
|
|
1104
|
+
};
|
|
1105
|
+
storageKey: string;
|
|
1052
1106
|
isApproved: boolean;
|
|
1053
1107
|
validationLogUri: string;
|
|
1054
1108
|
validator: string;
|
|
@@ -1056,7 +1110,9 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1056
1110
|
}>;
|
|
1057
1111
|
}, "strict", z.ZodTypeAny, {
|
|
1058
1112
|
data: {
|
|
1059
|
-
|
|
1113
|
+
missionId: bigint;
|
|
1114
|
+
flightId: bigint;
|
|
1115
|
+
storageKey: string;
|
|
1060
1116
|
isApproved: boolean;
|
|
1061
1117
|
validationLogUri: string;
|
|
1062
1118
|
validator: string;
|
|
@@ -1067,7 +1123,15 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1067
1123
|
timestamp?: any;
|
|
1068
1124
|
}, {
|
|
1069
1125
|
data: {
|
|
1070
|
-
|
|
1126
|
+
missionId: {
|
|
1127
|
+
value: string;
|
|
1128
|
+
__type: "bigint";
|
|
1129
|
+
};
|
|
1130
|
+
flightId: {
|
|
1131
|
+
value: string;
|
|
1132
|
+
__type: "bigint";
|
|
1133
|
+
};
|
|
1134
|
+
storageKey: string;
|
|
1071
1135
|
isApproved: boolean;
|
|
1072
1136
|
validationLogUri: string;
|
|
1073
1137
|
validator: string;
|
|
@@ -1076,6 +1140,112 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1076
1140
|
event_type: "protocol.flight.reviewed";
|
|
1077
1141
|
id?: any;
|
|
1078
1142
|
timestamp?: any;
|
|
1143
|
+
}>, z.ZodObject<{
|
|
1144
|
+
id: z.ZodAny;
|
|
1145
|
+
event_type: z.ZodLiteral<"internal.flight.reviewed">;
|
|
1146
|
+
timestamp: z.ZodAny;
|
|
1147
|
+
data: z.ZodObject<{
|
|
1148
|
+
isApproved: z.ZodBoolean;
|
|
1149
|
+
storageKey: z.ZodString;
|
|
1150
|
+
provenanceDataVersion: z.ZodString;
|
|
1151
|
+
validationLogUri: z.ZodString;
|
|
1152
|
+
provenanceDataUri: z.ZodString;
|
|
1153
|
+
tokenId: z.ZodEffects<z.ZodObject<{
|
|
1154
|
+
__type: z.ZodLiteral<"bigint">;
|
|
1155
|
+
value: z.ZodString;
|
|
1156
|
+
}, "strip", z.ZodTypeAny, {
|
|
1157
|
+
value: string;
|
|
1158
|
+
__type: "bigint";
|
|
1159
|
+
}, {
|
|
1160
|
+
value: string;
|
|
1161
|
+
__type: "bigint";
|
|
1162
|
+
}>, bigint, {
|
|
1163
|
+
value: string;
|
|
1164
|
+
__type: "bigint";
|
|
1165
|
+
}>;
|
|
1166
|
+
missionId: z.ZodEffects<z.ZodObject<{
|
|
1167
|
+
__type: z.ZodLiteral<"bigint">;
|
|
1168
|
+
value: z.ZodString;
|
|
1169
|
+
}, "strip", z.ZodTypeAny, {
|
|
1170
|
+
value: string;
|
|
1171
|
+
__type: "bigint";
|
|
1172
|
+
}, {
|
|
1173
|
+
value: string;
|
|
1174
|
+
__type: "bigint";
|
|
1175
|
+
}>, bigint, {
|
|
1176
|
+
value: string;
|
|
1177
|
+
__type: "bigint";
|
|
1178
|
+
}>;
|
|
1179
|
+
validator: z.ZodAny;
|
|
1180
|
+
filesHash: z.ZodString;
|
|
1181
|
+
to: z.ZodAny;
|
|
1182
|
+
}, "strict", z.ZodTypeAny, {
|
|
1183
|
+
missionId: bigint;
|
|
1184
|
+
storageKey: string;
|
|
1185
|
+
isApproved: boolean;
|
|
1186
|
+
validationLogUri: string;
|
|
1187
|
+
filesHash: string;
|
|
1188
|
+
provenanceDataVersion: string;
|
|
1189
|
+
provenanceDataUri: string;
|
|
1190
|
+
tokenId: bigint;
|
|
1191
|
+
validator?: any;
|
|
1192
|
+
to?: any;
|
|
1193
|
+
}, {
|
|
1194
|
+
missionId: {
|
|
1195
|
+
value: string;
|
|
1196
|
+
__type: "bigint";
|
|
1197
|
+
};
|
|
1198
|
+
storageKey: string;
|
|
1199
|
+
isApproved: boolean;
|
|
1200
|
+
validationLogUri: string;
|
|
1201
|
+
filesHash: string;
|
|
1202
|
+
provenanceDataVersion: string;
|
|
1203
|
+
provenanceDataUri: string;
|
|
1204
|
+
tokenId: {
|
|
1205
|
+
value: string;
|
|
1206
|
+
__type: "bigint";
|
|
1207
|
+
};
|
|
1208
|
+
validator?: any;
|
|
1209
|
+
to?: any;
|
|
1210
|
+
}>;
|
|
1211
|
+
}, "strict", z.ZodTypeAny, {
|
|
1212
|
+
data: {
|
|
1213
|
+
missionId: bigint;
|
|
1214
|
+
storageKey: string;
|
|
1215
|
+
isApproved: boolean;
|
|
1216
|
+
validationLogUri: string;
|
|
1217
|
+
filesHash: string;
|
|
1218
|
+
provenanceDataVersion: string;
|
|
1219
|
+
provenanceDataUri: string;
|
|
1220
|
+
tokenId: bigint;
|
|
1221
|
+
validator?: any;
|
|
1222
|
+
to?: any;
|
|
1223
|
+
};
|
|
1224
|
+
event_type: "internal.flight.reviewed";
|
|
1225
|
+
id?: any;
|
|
1226
|
+
timestamp?: any;
|
|
1227
|
+
}, {
|
|
1228
|
+
data: {
|
|
1229
|
+
missionId: {
|
|
1230
|
+
value: string;
|
|
1231
|
+
__type: "bigint";
|
|
1232
|
+
};
|
|
1233
|
+
storageKey: string;
|
|
1234
|
+
isApproved: boolean;
|
|
1235
|
+
validationLogUri: string;
|
|
1236
|
+
filesHash: string;
|
|
1237
|
+
provenanceDataVersion: string;
|
|
1238
|
+
provenanceDataUri: string;
|
|
1239
|
+
tokenId: {
|
|
1240
|
+
value: string;
|
|
1241
|
+
__type: "bigint";
|
|
1242
|
+
};
|
|
1243
|
+
validator?: any;
|
|
1244
|
+
to?: any;
|
|
1245
|
+
};
|
|
1246
|
+
event_type: "internal.flight.reviewed";
|
|
1247
|
+
id?: any;
|
|
1248
|
+
timestamp?: any;
|
|
1079
1249
|
}>]>;
|
|
1080
1250
|
type Event = z.infer<typeof Event>;
|
|
1081
1251
|
type TestEvent = Extract<Event, {
|
|
@@ -1093,6 +1263,9 @@ type MissionUpdatedEvent = Extract<Event, {
|
|
|
1093
1263
|
type FlightReviewedEvent = Extract<Event, {
|
|
1094
1264
|
event_type: "protocol.flight.reviewed";
|
|
1095
1265
|
}>;
|
|
1266
|
+
type InternalFlightReviewedEvent = Extract<Event, {
|
|
1267
|
+
event_type: "internal.flight.reviewed";
|
|
1268
|
+
}>;
|
|
1096
1269
|
|
|
1097
1270
|
declare function parseWebhookEvent(req: Request$1, webhookSecret: string): {
|
|
1098
1271
|
data: {
|
|
@@ -1103,9 +1276,9 @@ declare function parseWebhookEvent(req: Request$1, webhookSecret: string): {
|
|
|
1103
1276
|
timestamp: string;
|
|
1104
1277
|
} | {
|
|
1105
1278
|
data: {
|
|
1106
|
-
missionId:
|
|
1279
|
+
missionId: bigint;
|
|
1107
1280
|
pilotAddress: string;
|
|
1108
|
-
|
|
1281
|
+
storageKey: string;
|
|
1109
1282
|
flightManifestUri: string;
|
|
1110
1283
|
};
|
|
1111
1284
|
event_type: "protocol.flight.submitted";
|
|
@@ -1137,7 +1310,9 @@ declare function parseWebhookEvent(req: Request$1, webhookSecret: string): {
|
|
|
1137
1310
|
timestamp?: any;
|
|
1138
1311
|
} | {
|
|
1139
1312
|
data: {
|
|
1140
|
-
|
|
1313
|
+
missionId: bigint;
|
|
1314
|
+
flightId: bigint;
|
|
1315
|
+
storageKey: string;
|
|
1141
1316
|
isApproved: boolean;
|
|
1142
1317
|
validationLogUri: string;
|
|
1143
1318
|
validator: string;
|
|
@@ -1146,6 +1321,22 @@ declare function parseWebhookEvent(req: Request$1, webhookSecret: string): {
|
|
|
1146
1321
|
event_type: "protocol.flight.reviewed";
|
|
1147
1322
|
id?: any;
|
|
1148
1323
|
timestamp?: any;
|
|
1324
|
+
} | {
|
|
1325
|
+
data: {
|
|
1326
|
+
missionId: bigint;
|
|
1327
|
+
storageKey: string;
|
|
1328
|
+
isApproved: boolean;
|
|
1329
|
+
validationLogUri: string;
|
|
1330
|
+
filesHash: string;
|
|
1331
|
+
provenanceDataVersion: string;
|
|
1332
|
+
provenanceDataUri: string;
|
|
1333
|
+
tokenId: bigint;
|
|
1334
|
+
validator?: any;
|
|
1335
|
+
to?: any;
|
|
1336
|
+
};
|
|
1337
|
+
event_type: "internal.flight.reviewed";
|
|
1338
|
+
id?: any;
|
|
1339
|
+
timestamp?: any;
|
|
1149
1340
|
};
|
|
1150
1341
|
|
|
1151
|
-
export { type ApiTokenControllerCreateTokenData, type ApiTokenControllerCreateTokenErrors, type ApiTokenControllerCreateTokenResponse, type ApiTokenControllerCreateTokenResponses, type ApiTokenControllerDeleteTokenData, type ApiTokenControllerDeleteTokenErrors, type ApiTokenControllerDeleteTokenResponses, type ApiTokenControllerGetTokenData, type ApiTokenControllerGetTokenErrors, type ApiTokenControllerGetTokenResponses, type ApiTokenControllerUpdateTokenData, type ApiTokenControllerUpdateTokenErrors, type ApiTokenControllerUpdateTokenResponse, type ApiTokenControllerUpdateTokenResponses, type AppControllerGetHelloData, type AppControllerGetHelloResponses, type Auth, type ClaimRewardsRequestDto, type ClaimRewardsResponseDto, type Client, type ClientOptions$1 as ClientOptions, type ConditionsControllerGetSunAltitudeTimeLimitsData, type ConditionsControllerGetSunAltitudeTimeLimitsResponse, type ConditionsControllerGetSunAltitudeTimeLimitsResponses, type Config, type CreateApiTokenRequestDto, type CreateApiTokenResponseDto, type CreateClientConfig, type CreateFileRequestDto, type CreateFileResponseDto, type CreateMissionRequestDto, type CreateMissionResponseDto, type CreateQuoteRequestDto, type CreateWebhookBody, type CreateWebhookResponse, type DeleteWebhookResponse, Event, type FlightDto, type FlightReviewedEvent, type FlightSubmittedEvent, type FlightsControllerCreatePresignedUrlsData, type FlightsControllerCreatePresignedUrlsErrors, type FlightsControllerCreatePresignedUrlsResponse, type FlightsControllerCreatePresignedUrlsResponses, type
|
|
1342
|
+
export { type ApiTokenControllerCreateTokenData, type ApiTokenControllerCreateTokenErrors, type ApiTokenControllerCreateTokenResponse, type ApiTokenControllerCreateTokenResponses, type ApiTokenControllerDeleteTokenData, type ApiTokenControllerDeleteTokenErrors, type ApiTokenControllerDeleteTokenResponses, type ApiTokenControllerGetTokenData, type ApiTokenControllerGetTokenErrors, type ApiTokenControllerGetTokenResponses, type ApiTokenControllerUpdateTokenData, type ApiTokenControllerUpdateTokenErrors, type ApiTokenControllerUpdateTokenResponse, type ApiTokenControllerUpdateTokenResponses, type AppControllerGetHelloData, type AppControllerGetHelloResponses, type Auth, type ClaimRewardsRequestDto, type ClaimRewardsResponseDto, type Client, type ClientOptions$1 as ClientOptions, type ConditionsControllerGetSunAltitudeTimeLimitsData, type ConditionsControllerGetSunAltitudeTimeLimitsResponse, type ConditionsControllerGetSunAltitudeTimeLimitsResponses, type Config, type CreateApiTokenRequestDto, type CreateApiTokenResponseDto, type CreateClientConfig, type CreateFileRequestDto, type CreateFileResponseDto, type CreateMissionRequestDto, type CreateMissionResponseDto, type CreateQuoteRequestDto, type CreateWebhookBody, type CreateWebhookResponse, type DeleteWebhookResponse, Event, type FlightDto, type FlightReviewedEvent, type FlightSubmittedEvent, type FlightsControllerCreatePresignedUrlsData, type FlightsControllerCreatePresignedUrlsErrors, type FlightsControllerCreatePresignedUrlsResponse, type FlightsControllerCreatePresignedUrlsResponses, type FlightsControllerGenerateStorageKeyData, type FlightsControllerGenerateStorageKeyErrors, type FlightsControllerGenerateStorageKeyResponse, type FlightsControllerGenerateStorageKeyResponses, type FlightsControllerGetFlightData, type FlightsControllerGetFlightErrors, type FlightsControllerGetFlightResponse, type FlightsControllerGetFlightResponses, type FlightsControllerValidateFlightData, type FlightsControllerValidateFlightErrors, type FlightsControllerValidateFlightResponse, type FlightsControllerValidateFlightResponses, type GetProvenanceCryptoKeyResponse, type GetTimeLimitsForSunAltitudeResponse, type GetWebhookResponse, type GetWebhookStatusResponse, type GetWebhooksResponse, type InternalFlightReviewedEvent, type KeysControllerGetProvenanceCryptoKeyData, type KeysControllerGetProvenanceCryptoKeyResponse, type KeysControllerGetProvenanceCryptoKeyResponses, type MissionCreatedEvent, type MissionUpdatedEvent, type MissionsControllerClaimRewardsData, type MissionsControllerClaimRewardsErrors, type MissionsControllerClaimRewardsResponse, type MissionsControllerClaimRewardsResponses, type MissionsControllerCreateMissionsData, type MissionsControllerCreateMissionsErrors, type MissionsControllerCreateMissionsResponse, type MissionsControllerCreateMissionsResponses, type MissionsControllerUpdateMissionsData, type MissionsControllerUpdateMissionsResponse, type MissionsControllerUpdateMissionsResponses, type Options, type OptionsLegacyParser, type QuerySerializerOptions, type QuotesControllerCreateQuoteData, type QuotesControllerCreateQuoteErrors, type QuotesControllerCreateQuoteResponses, type QuotesControllerGetQuoteData, type QuotesControllerGetQuoteErrors, type QuotesControllerGetQuoteResponses, type RegenerateWebhookSecretResponseDto, type RequestOptions, type RequestResult, type ResponseStyle, type SchemaControllerGetEventSchemaData, type SchemaControllerGetEventSchemaResponses, type TDataShape, type TestEvent, type TestWebhookResponse, type UpdateApiTokenRequestDto, type UpdateApiTokenResponseDto, type UpdateMissionsRequestDto, type UpdateMissionsResponseDto, type UpdateWebhookBody, type UpdateWebhookResponse, type ValidateFlightRequestDto, type ValidateFlightResponseDto, type WebhooksControllerCreateData, type WebhooksControllerCreateErrors, type WebhooksControllerCreateResponse, type WebhooksControllerCreateResponses, type WebhooksControllerDeleteData, type WebhooksControllerDeleteErrors, type WebhooksControllerDeleteResponse, type WebhooksControllerDeleteResponses, type WebhooksControllerGetData, type WebhooksControllerGetErrors, type WebhooksControllerGetManyData, type WebhooksControllerGetManyErrors, type WebhooksControllerGetManyResponse, type WebhooksControllerGetManyResponses, type WebhooksControllerGetResponse, type WebhooksControllerGetResponses, type WebhooksControllerGetStatusData, type WebhooksControllerGetStatusErrors, type WebhooksControllerGetStatusResponse, type WebhooksControllerGetStatusResponses, type WebhooksControllerRegenerateSecretData, type WebhooksControllerRegenerateSecretErrors, type WebhooksControllerRegenerateSecretResponse, type WebhooksControllerRegenerateSecretResponses, type WebhooksControllerTestData, type WebhooksControllerTestErrors, type WebhooksControllerTestResponse, type WebhooksControllerTestResponses, type WebhooksControllerUpdateData, type WebhooksControllerUpdateErrors, type WebhooksControllerUpdateResponse, type WebhooksControllerUpdateResponses, apiTokenControllerCreateToken, apiTokenControllerDeleteToken, apiTokenControllerGetToken, apiTokenControllerUpdateToken, appControllerGetHello, buildClientParams, conditionsControllerGetSunAltitudeTimeLimits, createClient, createConfig, flightsControllerCreatePresignedUrls, flightsControllerGenerateStorageKey, flightsControllerGetFlight, flightsControllerValidateFlight, formDataBodySerializer, jsonBodySerializer, keysControllerGetProvenanceCryptoKey, mergeHeaders, missionsControllerClaimRewards, missionsControllerCreateMissions, missionsControllerUpdateMissions, parseWebhookEvent, quotesControllerCreateQuote, quotesControllerGetQuote, schemaControllerGetEventSchema, urlSearchParamsBodySerializer, webhooksControllerCreate, webhooksControllerDelete, webhooksControllerGet, webhooksControllerGetMany, webhooksControllerGetStatus, webhooksControllerRegenerateSecret, webhooksControllerTest, webhooksControllerUpdate };
|
package/dist/index.js
CHANGED
|
@@ -32,7 +32,7 @@ __export(index_exports, {
|
|
|
32
32
|
createClient: () => createClient,
|
|
33
33
|
createConfig: () => createConfig,
|
|
34
34
|
flightsControllerCreatePresignedUrls: () => flightsControllerCreatePresignedUrls,
|
|
35
|
-
|
|
35
|
+
flightsControllerGenerateStorageKey: () => flightsControllerGenerateStorageKey,
|
|
36
36
|
flightsControllerGetFlight: () => flightsControllerGetFlight,
|
|
37
37
|
flightsControllerValidateFlight: () => flightsControllerValidateFlight,
|
|
38
38
|
formDataBodySerializer: () => formDataBodySerializer,
|
|
@@ -756,6 +756,23 @@ var apiTokenControllerUpdateTokenResponseTransformer = /* @__PURE__ */ __name(as
|
|
|
756
756
|
data = updateApiTokenResponseDtoSchemaResponseTransformer(data);
|
|
757
757
|
return data;
|
|
758
758
|
}, "apiTokenControllerUpdateTokenResponseTransformer");
|
|
759
|
+
var flightDtoSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
760
|
+
data.token_id = BigInt(data.token_id.toString());
|
|
761
|
+
data.mission_id = BigInt(data.mission_id.toString());
|
|
762
|
+
return data;
|
|
763
|
+
}, "flightDtoSchemaResponseTransformer");
|
|
764
|
+
var flightsControllerGetFlightResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
765
|
+
data = flightDtoSchemaResponseTransformer(data);
|
|
766
|
+
return data;
|
|
767
|
+
}, "flightsControllerGetFlightResponseTransformer");
|
|
768
|
+
var validateFlightResponseDtoSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
769
|
+
data.flightId = BigInt(data.flightId.toString());
|
|
770
|
+
return data;
|
|
771
|
+
}, "validateFlightResponseDtoSchemaResponseTransformer");
|
|
772
|
+
var flightsControllerValidateFlightResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
773
|
+
data = validateFlightResponseDtoSchemaResponseTransformer(data);
|
|
774
|
+
return data;
|
|
775
|
+
}, "flightsControllerValidateFlightResponseTransformer");
|
|
759
776
|
var getTimeLimitsForSunAltitudeResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
760
777
|
data.OptimalSunAltitudePeriod.StartTime = new Date(data.OptimalSunAltitudePeriod.StartTime);
|
|
761
778
|
data.OptimalSunAltitudePeriod.EndTime = new Date(data.OptimalSunAltitudePeriod.EndTime);
|
|
@@ -896,7 +913,7 @@ var missionsControllerClaimRewards = /* @__PURE__ */ __name((options) => {
|
|
|
896
913
|
}
|
|
897
914
|
});
|
|
898
915
|
}, "missionsControllerClaimRewards");
|
|
899
|
-
var
|
|
916
|
+
var flightsControllerGenerateStorageKey = /* @__PURE__ */ __name((options) => {
|
|
900
917
|
return (options.client ?? client).get({
|
|
901
918
|
security: [
|
|
902
919
|
{
|
|
@@ -904,10 +921,10 @@ var flightsControllerGenerateFlightId = /* @__PURE__ */ __name((options) => {
|
|
|
904
921
|
type: "apiKey"
|
|
905
922
|
}
|
|
906
923
|
],
|
|
907
|
-
url: "/flights/
|
|
924
|
+
url: "/flights/storage-key",
|
|
908
925
|
...options
|
|
909
926
|
});
|
|
910
|
-
}, "
|
|
927
|
+
}, "flightsControllerGenerateStorageKey");
|
|
911
928
|
var flightsControllerGetFlight = /* @__PURE__ */ __name((options) => {
|
|
912
929
|
return (options.client ?? client).get({
|
|
913
930
|
security: [
|
|
@@ -916,6 +933,7 @@ var flightsControllerGetFlight = /* @__PURE__ */ __name((options) => {
|
|
|
916
933
|
type: "apiKey"
|
|
917
934
|
}
|
|
918
935
|
],
|
|
936
|
+
responseTransformer: flightsControllerGetFlightResponseTransformer,
|
|
919
937
|
url: "/flights/{flightId}",
|
|
920
938
|
...options
|
|
921
939
|
});
|
|
@@ -928,7 +946,7 @@ var flightsControllerCreatePresignedUrls = /* @__PURE__ */ __name((options) => {
|
|
|
928
946
|
type: "apiKey"
|
|
929
947
|
}
|
|
930
948
|
],
|
|
931
|
-
url: "/flights/
|
|
949
|
+
url: "/flights/files",
|
|
932
950
|
...options,
|
|
933
951
|
headers: {
|
|
934
952
|
"Content-Type": "application/json",
|
|
@@ -944,6 +962,7 @@ var flightsControllerValidateFlight = /* @__PURE__ */ __name((options) => {
|
|
|
944
962
|
type: "apiKey"
|
|
945
963
|
}
|
|
946
964
|
],
|
|
965
|
+
responseTransformer: flightsControllerValidateFlightResponseTransformer,
|
|
947
966
|
url: "/flights",
|
|
948
967
|
...options,
|
|
949
968
|
headers: {
|
|
@@ -1086,10 +1105,13 @@ var Event = import_zod.z.union([
|
|
|
1086
1105
|
event_type: import_zod.z.literal("protocol.flight.submitted"),
|
|
1087
1106
|
timestamp: import_zod.z.any(),
|
|
1088
1107
|
data: import_zod.z.object({
|
|
1089
|
-
|
|
1108
|
+
storageKey: import_zod.z.string(),
|
|
1090
1109
|
pilotAddress: import_zod.z.string(),
|
|
1091
1110
|
flightManifestUri: import_zod.z.string(),
|
|
1092
|
-
missionId: import_zod.z.
|
|
1111
|
+
missionId: import_zod.z.object({
|
|
1112
|
+
__type: import_zod.z.literal("bigint"),
|
|
1113
|
+
value: import_zod.z.string()
|
|
1114
|
+
}).transform((wire) => BigInt(wire.value))
|
|
1093
1115
|
}).strict()
|
|
1094
1116
|
}).strict(),
|
|
1095
1117
|
import_zod.z.object({
|
|
@@ -1142,11 +1164,42 @@ var Event = import_zod.z.union([
|
|
|
1142
1164
|
event_type: import_zod.z.literal("protocol.flight.reviewed"),
|
|
1143
1165
|
timestamp: import_zod.z.any(),
|
|
1144
1166
|
data: import_zod.z.object({
|
|
1145
|
-
flightId: import_zod.z.
|
|
1167
|
+
flightId: import_zod.z.object({
|
|
1168
|
+
__type: import_zod.z.literal("bigint"),
|
|
1169
|
+
value: import_zod.z.string()
|
|
1170
|
+
}).transform((wire) => BigInt(wire.value)),
|
|
1146
1171
|
isApproved: import_zod.z.boolean(),
|
|
1147
1172
|
validationLogUri: import_zod.z.string(),
|
|
1148
1173
|
validator: import_zod.z.string(),
|
|
1149
|
-
filesHash: import_zod.z.string()
|
|
1174
|
+
filesHash: import_zod.z.string(),
|
|
1175
|
+
storageKey: import_zod.z.string(),
|
|
1176
|
+
missionId: import_zod.z.object({
|
|
1177
|
+
__type: import_zod.z.literal("bigint"),
|
|
1178
|
+
value: import_zod.z.string()
|
|
1179
|
+
}).transform((wire) => BigInt(wire.value))
|
|
1180
|
+
}).strict()
|
|
1181
|
+
}).strict(),
|
|
1182
|
+
import_zod.z.object({
|
|
1183
|
+
id: import_zod.z.any(),
|
|
1184
|
+
event_type: import_zod.z.literal("internal.flight.reviewed"),
|
|
1185
|
+
timestamp: import_zod.z.any(),
|
|
1186
|
+
data: import_zod.z.object({
|
|
1187
|
+
isApproved: import_zod.z.boolean(),
|
|
1188
|
+
storageKey: import_zod.z.string(),
|
|
1189
|
+
provenanceDataVersion: import_zod.z.string(),
|
|
1190
|
+
validationLogUri: import_zod.z.string(),
|
|
1191
|
+
provenanceDataUri: import_zod.z.string(),
|
|
1192
|
+
tokenId: import_zod.z.object({
|
|
1193
|
+
__type: import_zod.z.literal("bigint"),
|
|
1194
|
+
value: import_zod.z.string()
|
|
1195
|
+
}).transform((wire) => BigInt(wire.value)),
|
|
1196
|
+
missionId: import_zod.z.object({
|
|
1197
|
+
__type: import_zod.z.literal("bigint"),
|
|
1198
|
+
value: import_zod.z.string()
|
|
1199
|
+
}).transform((wire) => BigInt(wire.value)),
|
|
1200
|
+
validator: import_zod.z.any(),
|
|
1201
|
+
filesHash: import_zod.z.string(),
|
|
1202
|
+
to: import_zod.z.any()
|
|
1150
1203
|
}).strict()
|
|
1151
1204
|
}).strict()
|
|
1152
1205
|
]);
|
|
@@ -1188,7 +1241,7 @@ __name(getSecretHeader, "getSecretHeader");
|
|
|
1188
1241
|
createClient,
|
|
1189
1242
|
createConfig,
|
|
1190
1243
|
flightsControllerCreatePresignedUrls,
|
|
1191
|
-
|
|
1244
|
+
flightsControllerGenerateStorageKey,
|
|
1192
1245
|
flightsControllerGetFlight,
|
|
1193
1246
|
flightsControllerValidateFlight,
|
|
1194
1247
|
formDataBodySerializer,
|