@layer-drone/protocol 0.0.17 → 0.1.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/README.md +43 -0
- package/dist/index.d.mts +328 -347
- package/dist/index.d.ts +328 -347
- package/dist/index.js +106 -123
- package/dist/index.mjs +105 -121
- package/package.json +7 -2
- package/src/client/client/client.ts +5 -1
- package/src/client/sdk.gen.ts +108 -136
- package/src/client/transformers.gen.ts +12 -26
- package/src/client/types.gen.ts +219 -262
- package/src/event/types.gen.ts +40 -41
package/dist/index.js
CHANGED
|
@@ -22,11 +22,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
22
22
|
var index_exports = {};
|
|
23
23
|
__export(index_exports, {
|
|
24
24
|
Event: () => Event,
|
|
25
|
+
apiControllerGetHello: () => apiControllerGetHello,
|
|
25
26
|
apiTokenControllerCreateToken: () => apiTokenControllerCreateToken,
|
|
26
27
|
apiTokenControllerDeleteToken: () => apiTokenControllerDeleteToken,
|
|
27
28
|
apiTokenControllerGetToken: () => apiTokenControllerGetToken,
|
|
28
29
|
apiTokenControllerUpdateToken: () => apiTokenControllerUpdateToken,
|
|
29
|
-
appControllerGetHello: () => appControllerGetHello,
|
|
30
30
|
buildClientParams: () => buildClientParams,
|
|
31
31
|
conditionsControllerGetSunAltitudeTimeLimits: () => conditionsControllerGetSunAltitudeTimeLimits,
|
|
32
32
|
createClient: () => createClient,
|
|
@@ -39,7 +39,6 @@ __export(index_exports, {
|
|
|
39
39
|
jsonBodySerializer: () => jsonBodySerializer,
|
|
40
40
|
keysControllerGetProvenanceCryptoKey: () => keysControllerGetProvenanceCryptoKey,
|
|
41
41
|
mergeHeaders: () => mergeHeaders,
|
|
42
|
-
missionsControllerClaimRewards: () => missionsControllerClaimRewards,
|
|
43
42
|
missionsControllerCreateMissions: () => missionsControllerCreateMissions,
|
|
44
43
|
missionsControllerUpdateMissions: () => missionsControllerUpdateMissions,
|
|
45
44
|
parseWebhookEvent: () => parseWebhookEvent,
|
|
@@ -628,7 +627,11 @@ var createClient = /* @__PURE__ */ __name((config = {}) => {
|
|
|
628
627
|
if (opts.body === void 0 || opts.body === "") {
|
|
629
628
|
opts.headers.delete("Content-Type");
|
|
630
629
|
}
|
|
631
|
-
const url = buildUrl(
|
|
630
|
+
const url = buildUrl({
|
|
631
|
+
...opts,
|
|
632
|
+
baseUrl: opts.baseUrl ?? _config?.baseUrl ?? "https://api.layerdrone.org",
|
|
633
|
+
url: opts.url ?? ""
|
|
634
|
+
});
|
|
632
635
|
const requestInit = {
|
|
633
636
|
redirect: "follow",
|
|
634
637
|
...opts
|
|
@@ -756,23 +759,6 @@ var apiTokenControllerUpdateTokenResponseTransformer = /* @__PURE__ */ __name(as
|
|
|
756
759
|
data = updateApiTokenResponseDtoSchemaResponseTransformer(data);
|
|
757
760
|
return data;
|
|
758
761
|
}, "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");
|
|
776
762
|
var getTimeLimitsForSunAltitudeResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
777
763
|
data.OptimalSunAltitudePeriod.StartTime = new Date(data.OptimalSunAltitudePeriod.StartTime);
|
|
778
764
|
data.OptimalSunAltitudePeriod.EndTime = new Date(data.OptimalSunAltitudePeriod.EndTime);
|
|
@@ -784,48 +770,22 @@ var conditionsControllerGetSunAltitudeTimeLimitsResponseTransformer = /* @__PURE
|
|
|
784
770
|
data = getTimeLimitsForSunAltitudeResponseSchemaResponseTransformer(data);
|
|
785
771
|
return data;
|
|
786
772
|
}, "conditionsControllerGetSunAltitudeTimeLimitsResponseTransformer");
|
|
773
|
+
var validateFlightResponseDtoSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
774
|
+
data.flightId = BigInt(data.flightId.toString());
|
|
775
|
+
return data;
|
|
776
|
+
}, "validateFlightResponseDtoSchemaResponseTransformer");
|
|
777
|
+
var flightsControllerValidateFlightResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
778
|
+
data = validateFlightResponseDtoSchemaResponseTransformer(data);
|
|
779
|
+
return data;
|
|
780
|
+
}, "flightsControllerValidateFlightResponseTransformer");
|
|
787
781
|
|
|
788
782
|
// src/client/sdk.gen.ts
|
|
789
|
-
var
|
|
783
|
+
var apiControllerGetHello = /* @__PURE__ */ __name((options) => {
|
|
790
784
|
return (options?.client ?? client).get({
|
|
791
785
|
url: "/",
|
|
792
786
|
...options
|
|
793
787
|
});
|
|
794
|
-
}, "
|
|
795
|
-
var keysControllerGetProvenanceCryptoKey = /* @__PURE__ */ __name((options) => {
|
|
796
|
-
return (options?.client ?? client).get({
|
|
797
|
-
url: "/keys",
|
|
798
|
-
...options
|
|
799
|
-
});
|
|
800
|
-
}, "keysControllerGetProvenanceCryptoKey");
|
|
801
|
-
var quotesControllerCreateQuote = /* @__PURE__ */ __name((options) => {
|
|
802
|
-
return (options.client ?? client).post({
|
|
803
|
-
security: [
|
|
804
|
-
{
|
|
805
|
-
name: "x-api-token",
|
|
806
|
-
type: "apiKey"
|
|
807
|
-
}
|
|
808
|
-
],
|
|
809
|
-
url: "/quotes",
|
|
810
|
-
...options,
|
|
811
|
-
headers: {
|
|
812
|
-
"Content-Type": "application/json",
|
|
813
|
-
...options.headers
|
|
814
|
-
}
|
|
815
|
-
});
|
|
816
|
-
}, "quotesControllerCreateQuote");
|
|
817
|
-
var quotesControllerGetQuote = /* @__PURE__ */ __name((options) => {
|
|
818
|
-
return (options.client ?? client).get({
|
|
819
|
-
security: [
|
|
820
|
-
{
|
|
821
|
-
name: "x-api-token",
|
|
822
|
-
type: "apiKey"
|
|
823
|
-
}
|
|
824
|
-
],
|
|
825
|
-
url: "/quotes/{id}",
|
|
826
|
-
...options
|
|
827
|
-
});
|
|
828
|
-
}, "quotesControllerGetQuote");
|
|
788
|
+
}, "apiControllerGetHello");
|
|
829
789
|
var apiTokenControllerCreateToken = /* @__PURE__ */ __name((options) => {
|
|
830
790
|
return (options.client ?? client).post({
|
|
831
791
|
security: [
|
|
@@ -883,36 +843,13 @@ var apiTokenControllerUpdateToken = /* @__PURE__ */ __name((options) => {
|
|
|
883
843
|
}
|
|
884
844
|
});
|
|
885
845
|
}, "apiTokenControllerUpdateToken");
|
|
886
|
-
var
|
|
887
|
-
return (options.client ?? client).
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
"Content-Type": "application/json",
|
|
892
|
-
...options.headers
|
|
893
|
-
}
|
|
894
|
-
});
|
|
895
|
-
}, "missionsControllerCreateMissions");
|
|
896
|
-
var missionsControllerUpdateMissions = /* @__PURE__ */ __name((options) => {
|
|
897
|
-
return (options.client ?? client).put({
|
|
898
|
-
url: "/missions",
|
|
899
|
-
...options,
|
|
900
|
-
headers: {
|
|
901
|
-
"Content-Type": "application/json",
|
|
902
|
-
...options.headers
|
|
903
|
-
}
|
|
904
|
-
});
|
|
905
|
-
}, "missionsControllerUpdateMissions");
|
|
906
|
-
var missionsControllerClaimRewards = /* @__PURE__ */ __name((options) => {
|
|
907
|
-
return (options.client ?? client).post({
|
|
908
|
-
url: "/missions/{id}/rewards",
|
|
909
|
-
...options,
|
|
910
|
-
headers: {
|
|
911
|
-
"Content-Type": "application/json",
|
|
912
|
-
...options.headers
|
|
913
|
-
}
|
|
846
|
+
var conditionsControllerGetSunAltitudeTimeLimits = /* @__PURE__ */ __name((options) => {
|
|
847
|
+
return (options.client ?? client).get({
|
|
848
|
+
responseTransformer: conditionsControllerGetSunAltitudeTimeLimitsResponseTransformer,
|
|
849
|
+
url: "/conditions/sun-altitude",
|
|
850
|
+
...options
|
|
914
851
|
});
|
|
915
|
-
}, "
|
|
852
|
+
}, "conditionsControllerGetSunAltitudeTimeLimits");
|
|
916
853
|
var flightsControllerGenerateStorageKey = /* @__PURE__ */ __name((options) => {
|
|
917
854
|
return (options.client ?? client).get({
|
|
918
855
|
security: [
|
|
@@ -933,7 +870,6 @@ var flightsControllerGetFlight = /* @__PURE__ */ __name((options) => {
|
|
|
933
870
|
type: "apiKey"
|
|
934
871
|
}
|
|
935
872
|
],
|
|
936
|
-
responseTransformer: flightsControllerGetFlightResponseTransformer,
|
|
937
873
|
url: "/flights/{flightId}",
|
|
938
874
|
...options
|
|
939
875
|
});
|
|
@@ -971,13 +907,60 @@ var flightsControllerValidateFlight = /* @__PURE__ */ __name((options) => {
|
|
|
971
907
|
}
|
|
972
908
|
});
|
|
973
909
|
}, "flightsControllerValidateFlight");
|
|
974
|
-
var
|
|
910
|
+
var keysControllerGetProvenanceCryptoKey = /* @__PURE__ */ __name((options) => {
|
|
911
|
+
return (options?.client ?? client).get({
|
|
912
|
+
url: "/keys",
|
|
913
|
+
...options
|
|
914
|
+
});
|
|
915
|
+
}, "keysControllerGetProvenanceCryptoKey");
|
|
916
|
+
var missionsControllerCreateMissions = /* @__PURE__ */ __name((options) => {
|
|
917
|
+
return (options.client ?? client).post({
|
|
918
|
+
url: "/missions",
|
|
919
|
+
...options,
|
|
920
|
+
headers: {
|
|
921
|
+
"Content-Type": "application/json",
|
|
922
|
+
...options.headers
|
|
923
|
+
}
|
|
924
|
+
});
|
|
925
|
+
}, "missionsControllerCreateMissions");
|
|
926
|
+
var missionsControllerUpdateMissions = /* @__PURE__ */ __name((options) => {
|
|
927
|
+
return (options.client ?? client).put({
|
|
928
|
+
url: "/missions",
|
|
929
|
+
...options,
|
|
930
|
+
headers: {
|
|
931
|
+
"Content-Type": "application/json",
|
|
932
|
+
...options.headers
|
|
933
|
+
}
|
|
934
|
+
});
|
|
935
|
+
}, "missionsControllerUpdateMissions");
|
|
936
|
+
var quotesControllerCreateQuote = /* @__PURE__ */ __name((options) => {
|
|
937
|
+
return (options.client ?? client).post({
|
|
938
|
+
security: [
|
|
939
|
+
{
|
|
940
|
+
name: "x-api-token",
|
|
941
|
+
type: "apiKey"
|
|
942
|
+
}
|
|
943
|
+
],
|
|
944
|
+
url: "/quotes",
|
|
945
|
+
...options,
|
|
946
|
+
headers: {
|
|
947
|
+
"Content-Type": "application/json",
|
|
948
|
+
...options.headers
|
|
949
|
+
}
|
|
950
|
+
});
|
|
951
|
+
}, "quotesControllerCreateQuote");
|
|
952
|
+
var quotesControllerGetQuote = /* @__PURE__ */ __name((options) => {
|
|
975
953
|
return (options.client ?? client).get({
|
|
976
|
-
|
|
977
|
-
|
|
954
|
+
security: [
|
|
955
|
+
{
|
|
956
|
+
name: "x-api-token",
|
|
957
|
+
type: "apiKey"
|
|
958
|
+
}
|
|
959
|
+
],
|
|
960
|
+
url: "/quotes/{id}",
|
|
978
961
|
...options
|
|
979
962
|
});
|
|
980
|
-
}, "
|
|
963
|
+
}, "quotesControllerGetQuote");
|
|
981
964
|
var schemaControllerGetEventSchema = /* @__PURE__ */ __name((options) => {
|
|
982
965
|
return (options?.client ?? client).get({
|
|
983
966
|
url: "/schema/event",
|
|
@@ -1100,20 +1083,6 @@ var Event = import_zod.z.union([
|
|
|
1100
1083
|
message: import_zod.z.string()
|
|
1101
1084
|
}).strict()
|
|
1102
1085
|
}).strict(),
|
|
1103
|
-
import_zod.z.object({
|
|
1104
|
-
id: import_zod.z.any(),
|
|
1105
|
-
event_type: import_zod.z.literal("protocol.flight.submitted"),
|
|
1106
|
-
timestamp: import_zod.z.any(),
|
|
1107
|
-
data: import_zod.z.object({
|
|
1108
|
-
storageKey: import_zod.z.string(),
|
|
1109
|
-
pilotAddress: import_zod.z.string(),
|
|
1110
|
-
flightManifestUri: import_zod.z.string(),
|
|
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))
|
|
1115
|
-
}).strict()
|
|
1116
|
-
}).strict(),
|
|
1117
1086
|
import_zod.z.object({
|
|
1118
1087
|
id: import_zod.z.any(),
|
|
1119
1088
|
event_type: import_zod.z.literal("protocol.mission.created"),
|
|
@@ -1139,7 +1108,6 @@ var Event = import_zod.z.union([
|
|
|
1139
1108
|
captureEndTime: import_zod.z.string().datetime({
|
|
1140
1109
|
offset: true
|
|
1141
1110
|
}),
|
|
1142
|
-
detailsHash: import_zod.z.string(),
|
|
1143
1111
|
requestor: import_zod.z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$"))
|
|
1144
1112
|
}).strict()
|
|
1145
1113
|
}).strict(),
|
|
@@ -1161,45 +1129,61 @@ var Event = import_zod.z.union([
|
|
|
1161
1129
|
}).strict(),
|
|
1162
1130
|
import_zod.z.object({
|
|
1163
1131
|
id: import_zod.z.any(),
|
|
1164
|
-
event_type: import_zod.z.literal("protocol.
|
|
1132
|
+
event_type: import_zod.z.literal("protocol.mission.paid"),
|
|
1165
1133
|
timestamp: import_zod.z.any(),
|
|
1166
1134
|
data: import_zod.z.object({
|
|
1135
|
+
recipient: import_zod.z.any(),
|
|
1167
1136
|
flightId: import_zod.z.object({
|
|
1168
1137
|
__type: import_zod.z.literal("bigint"),
|
|
1169
1138
|
value: import_zod.z.string()
|
|
1170
1139
|
}).transform((wire) => BigInt(wire.value)),
|
|
1171
|
-
isApproved: import_zod.z.boolean(),
|
|
1172
|
-
validationLogUri: import_zod.z.string(),
|
|
1173
|
-
validator: import_zod.z.string(),
|
|
1174
|
-
filesHash: import_zod.z.string(),
|
|
1175
|
-
storageKey: import_zod.z.string(),
|
|
1176
1140
|
missionId: import_zod.z.object({
|
|
1177
1141
|
__type: import_zod.z.literal("bigint"),
|
|
1178
1142
|
value: import_zod.z.string()
|
|
1143
|
+
}).transform((wire) => BigInt(wire.value)),
|
|
1144
|
+
vaultId: import_zod.z.object({
|
|
1145
|
+
__type: import_zod.z.literal("bigint"),
|
|
1146
|
+
value: import_zod.z.string()
|
|
1147
|
+
}).transform((wire) => BigInt(wire.value)),
|
|
1148
|
+
amount: import_zod.z.object({
|
|
1149
|
+
__type: import_zod.z.literal("bigint"),
|
|
1150
|
+
value: import_zod.z.string()
|
|
1179
1151
|
}).transform((wire) => BigInt(wire.value))
|
|
1180
1152
|
}).strict()
|
|
1181
1153
|
}).strict(),
|
|
1182
1154
|
import_zod.z.object({
|
|
1183
1155
|
id: import_zod.z.any(),
|
|
1184
|
-
event_type: import_zod.z.literal("
|
|
1156
|
+
event_type: import_zod.z.literal("protocol.flight.submitted"),
|
|
1185
1157
|
timestamp: import_zod.z.any(),
|
|
1186
1158
|
data: import_zod.z.object({
|
|
1187
|
-
isApproved: import_zod.z.boolean(),
|
|
1188
1159
|
storageKey: import_zod.z.string(),
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
tokenId: import_zod.z.object({
|
|
1160
|
+
pilotAddress: import_zod.z.string(),
|
|
1161
|
+
flightManifestUri: import_zod.z.string(),
|
|
1162
|
+
missionId: import_zod.z.object({
|
|
1193
1163
|
__type: import_zod.z.literal("bigint"),
|
|
1194
1164
|
value: import_zod.z.string()
|
|
1195
|
-
}).transform((wire) => BigInt(wire.value))
|
|
1196
|
-
|
|
1165
|
+
}).transform((wire) => BigInt(wire.value))
|
|
1166
|
+
}).strict()
|
|
1167
|
+
}).strict(),
|
|
1168
|
+
import_zod.z.object({
|
|
1169
|
+
id: import_zod.z.any(),
|
|
1170
|
+
event_type: import_zod.z.literal("protocol.flight.reviewed"),
|
|
1171
|
+
timestamp: import_zod.z.any(),
|
|
1172
|
+
data: import_zod.z.object({
|
|
1173
|
+
flightId: import_zod.z.object({
|
|
1197
1174
|
__type: import_zod.z.literal("bigint"),
|
|
1198
1175
|
value: import_zod.z.string()
|
|
1199
1176
|
}).transform((wire) => BigInt(wire.value)),
|
|
1200
|
-
|
|
1177
|
+
owner: import_zod.z.any(),
|
|
1178
|
+
isApproved: import_zod.z.boolean(),
|
|
1179
|
+
validationLogUri: import_zod.z.string(),
|
|
1180
|
+
validator: import_zod.z.string(),
|
|
1201
1181
|
filesHash: import_zod.z.string(),
|
|
1202
|
-
|
|
1182
|
+
storageKey: import_zod.z.string(),
|
|
1183
|
+
missionId: import_zod.z.object({
|
|
1184
|
+
__type: import_zod.z.literal("bigint"),
|
|
1185
|
+
value: import_zod.z.string()
|
|
1186
|
+
}).transform((wire) => BigInt(wire.value))
|
|
1203
1187
|
}).strict()
|
|
1204
1188
|
}).strict()
|
|
1205
1189
|
]);
|
|
@@ -1231,11 +1215,11 @@ __name(getSecretHeader, "getSecretHeader");
|
|
|
1231
1215
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1232
1216
|
0 && (module.exports = {
|
|
1233
1217
|
Event,
|
|
1218
|
+
apiControllerGetHello,
|
|
1234
1219
|
apiTokenControllerCreateToken,
|
|
1235
1220
|
apiTokenControllerDeleteToken,
|
|
1236
1221
|
apiTokenControllerGetToken,
|
|
1237
1222
|
apiTokenControllerUpdateToken,
|
|
1238
|
-
appControllerGetHello,
|
|
1239
1223
|
buildClientParams,
|
|
1240
1224
|
conditionsControllerGetSunAltitudeTimeLimits,
|
|
1241
1225
|
createClient,
|
|
@@ -1248,7 +1232,6 @@ __name(getSecretHeader, "getSecretHeader");
|
|
|
1248
1232
|
jsonBodySerializer,
|
|
1249
1233
|
keysControllerGetProvenanceCryptoKey,
|
|
1250
1234
|
mergeHeaders,
|
|
1251
|
-
missionsControllerClaimRewards,
|
|
1252
1235
|
missionsControllerCreateMissions,
|
|
1253
1236
|
missionsControllerUpdateMissions,
|
|
1254
1237
|
parseWebhookEvent,
|
package/dist/index.mjs
CHANGED
|
@@ -571,7 +571,11 @@ var createClient = /* @__PURE__ */ __name((config = {}) => {
|
|
|
571
571
|
if (opts.body === void 0 || opts.body === "") {
|
|
572
572
|
opts.headers.delete("Content-Type");
|
|
573
573
|
}
|
|
574
|
-
const url = buildUrl(
|
|
574
|
+
const url = buildUrl({
|
|
575
|
+
...opts,
|
|
576
|
+
baseUrl: opts.baseUrl ?? _config?.baseUrl ?? "https://api.layerdrone.org",
|
|
577
|
+
url: opts.url ?? ""
|
|
578
|
+
});
|
|
575
579
|
const requestInit = {
|
|
576
580
|
redirect: "follow",
|
|
577
581
|
...opts
|
|
@@ -699,23 +703,6 @@ var apiTokenControllerUpdateTokenResponseTransformer = /* @__PURE__ */ __name(as
|
|
|
699
703
|
data = updateApiTokenResponseDtoSchemaResponseTransformer(data);
|
|
700
704
|
return data;
|
|
701
705
|
}, "apiTokenControllerUpdateTokenResponseTransformer");
|
|
702
|
-
var flightDtoSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
703
|
-
data.token_id = BigInt(data.token_id.toString());
|
|
704
|
-
data.mission_id = BigInt(data.mission_id.toString());
|
|
705
|
-
return data;
|
|
706
|
-
}, "flightDtoSchemaResponseTransformer");
|
|
707
|
-
var flightsControllerGetFlightResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
708
|
-
data = flightDtoSchemaResponseTransformer(data);
|
|
709
|
-
return data;
|
|
710
|
-
}, "flightsControllerGetFlightResponseTransformer");
|
|
711
|
-
var validateFlightResponseDtoSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
712
|
-
data.flightId = BigInt(data.flightId.toString());
|
|
713
|
-
return data;
|
|
714
|
-
}, "validateFlightResponseDtoSchemaResponseTransformer");
|
|
715
|
-
var flightsControllerValidateFlightResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
716
|
-
data = validateFlightResponseDtoSchemaResponseTransformer(data);
|
|
717
|
-
return data;
|
|
718
|
-
}, "flightsControllerValidateFlightResponseTransformer");
|
|
719
706
|
var getTimeLimitsForSunAltitudeResponseSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
720
707
|
data.OptimalSunAltitudePeriod.StartTime = new Date(data.OptimalSunAltitudePeriod.StartTime);
|
|
721
708
|
data.OptimalSunAltitudePeriod.EndTime = new Date(data.OptimalSunAltitudePeriod.EndTime);
|
|
@@ -727,48 +714,22 @@ var conditionsControllerGetSunAltitudeTimeLimitsResponseTransformer = /* @__PURE
|
|
|
727
714
|
data = getTimeLimitsForSunAltitudeResponseSchemaResponseTransformer(data);
|
|
728
715
|
return data;
|
|
729
716
|
}, "conditionsControllerGetSunAltitudeTimeLimitsResponseTransformer");
|
|
717
|
+
var validateFlightResponseDtoSchemaResponseTransformer = /* @__PURE__ */ __name((data) => {
|
|
718
|
+
data.flightId = BigInt(data.flightId.toString());
|
|
719
|
+
return data;
|
|
720
|
+
}, "validateFlightResponseDtoSchemaResponseTransformer");
|
|
721
|
+
var flightsControllerValidateFlightResponseTransformer = /* @__PURE__ */ __name(async (data) => {
|
|
722
|
+
data = validateFlightResponseDtoSchemaResponseTransformer(data);
|
|
723
|
+
return data;
|
|
724
|
+
}, "flightsControllerValidateFlightResponseTransformer");
|
|
730
725
|
|
|
731
726
|
// src/client/sdk.gen.ts
|
|
732
|
-
var
|
|
727
|
+
var apiControllerGetHello = /* @__PURE__ */ __name((options) => {
|
|
733
728
|
return (options?.client ?? client).get({
|
|
734
729
|
url: "/",
|
|
735
730
|
...options
|
|
736
731
|
});
|
|
737
|
-
}, "
|
|
738
|
-
var keysControllerGetProvenanceCryptoKey = /* @__PURE__ */ __name((options) => {
|
|
739
|
-
return (options?.client ?? client).get({
|
|
740
|
-
url: "/keys",
|
|
741
|
-
...options
|
|
742
|
-
});
|
|
743
|
-
}, "keysControllerGetProvenanceCryptoKey");
|
|
744
|
-
var quotesControllerCreateQuote = /* @__PURE__ */ __name((options) => {
|
|
745
|
-
return (options.client ?? client).post({
|
|
746
|
-
security: [
|
|
747
|
-
{
|
|
748
|
-
name: "x-api-token",
|
|
749
|
-
type: "apiKey"
|
|
750
|
-
}
|
|
751
|
-
],
|
|
752
|
-
url: "/quotes",
|
|
753
|
-
...options,
|
|
754
|
-
headers: {
|
|
755
|
-
"Content-Type": "application/json",
|
|
756
|
-
...options.headers
|
|
757
|
-
}
|
|
758
|
-
});
|
|
759
|
-
}, "quotesControllerCreateQuote");
|
|
760
|
-
var quotesControllerGetQuote = /* @__PURE__ */ __name((options) => {
|
|
761
|
-
return (options.client ?? client).get({
|
|
762
|
-
security: [
|
|
763
|
-
{
|
|
764
|
-
name: "x-api-token",
|
|
765
|
-
type: "apiKey"
|
|
766
|
-
}
|
|
767
|
-
],
|
|
768
|
-
url: "/quotes/{id}",
|
|
769
|
-
...options
|
|
770
|
-
});
|
|
771
|
-
}, "quotesControllerGetQuote");
|
|
732
|
+
}, "apiControllerGetHello");
|
|
772
733
|
var apiTokenControllerCreateToken = /* @__PURE__ */ __name((options) => {
|
|
773
734
|
return (options.client ?? client).post({
|
|
774
735
|
security: [
|
|
@@ -826,36 +787,13 @@ var apiTokenControllerUpdateToken = /* @__PURE__ */ __name((options) => {
|
|
|
826
787
|
}
|
|
827
788
|
});
|
|
828
789
|
}, "apiTokenControllerUpdateToken");
|
|
829
|
-
var
|
|
830
|
-
return (options.client ?? client).
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
"Content-Type": "application/json",
|
|
835
|
-
...options.headers
|
|
836
|
-
}
|
|
837
|
-
});
|
|
838
|
-
}, "missionsControllerCreateMissions");
|
|
839
|
-
var missionsControllerUpdateMissions = /* @__PURE__ */ __name((options) => {
|
|
840
|
-
return (options.client ?? client).put({
|
|
841
|
-
url: "/missions",
|
|
842
|
-
...options,
|
|
843
|
-
headers: {
|
|
844
|
-
"Content-Type": "application/json",
|
|
845
|
-
...options.headers
|
|
846
|
-
}
|
|
847
|
-
});
|
|
848
|
-
}, "missionsControllerUpdateMissions");
|
|
849
|
-
var missionsControllerClaimRewards = /* @__PURE__ */ __name((options) => {
|
|
850
|
-
return (options.client ?? client).post({
|
|
851
|
-
url: "/missions/{id}/rewards",
|
|
852
|
-
...options,
|
|
853
|
-
headers: {
|
|
854
|
-
"Content-Type": "application/json",
|
|
855
|
-
...options.headers
|
|
856
|
-
}
|
|
790
|
+
var conditionsControllerGetSunAltitudeTimeLimits = /* @__PURE__ */ __name((options) => {
|
|
791
|
+
return (options.client ?? client).get({
|
|
792
|
+
responseTransformer: conditionsControllerGetSunAltitudeTimeLimitsResponseTransformer,
|
|
793
|
+
url: "/conditions/sun-altitude",
|
|
794
|
+
...options
|
|
857
795
|
});
|
|
858
|
-
}, "
|
|
796
|
+
}, "conditionsControllerGetSunAltitudeTimeLimits");
|
|
859
797
|
var flightsControllerGenerateStorageKey = /* @__PURE__ */ __name((options) => {
|
|
860
798
|
return (options.client ?? client).get({
|
|
861
799
|
security: [
|
|
@@ -876,7 +814,6 @@ var flightsControllerGetFlight = /* @__PURE__ */ __name((options) => {
|
|
|
876
814
|
type: "apiKey"
|
|
877
815
|
}
|
|
878
816
|
],
|
|
879
|
-
responseTransformer: flightsControllerGetFlightResponseTransformer,
|
|
880
817
|
url: "/flights/{flightId}",
|
|
881
818
|
...options
|
|
882
819
|
});
|
|
@@ -914,13 +851,60 @@ var flightsControllerValidateFlight = /* @__PURE__ */ __name((options) => {
|
|
|
914
851
|
}
|
|
915
852
|
});
|
|
916
853
|
}, "flightsControllerValidateFlight");
|
|
917
|
-
var
|
|
854
|
+
var keysControllerGetProvenanceCryptoKey = /* @__PURE__ */ __name((options) => {
|
|
855
|
+
return (options?.client ?? client).get({
|
|
856
|
+
url: "/keys",
|
|
857
|
+
...options
|
|
858
|
+
});
|
|
859
|
+
}, "keysControllerGetProvenanceCryptoKey");
|
|
860
|
+
var missionsControllerCreateMissions = /* @__PURE__ */ __name((options) => {
|
|
861
|
+
return (options.client ?? client).post({
|
|
862
|
+
url: "/missions",
|
|
863
|
+
...options,
|
|
864
|
+
headers: {
|
|
865
|
+
"Content-Type": "application/json",
|
|
866
|
+
...options.headers
|
|
867
|
+
}
|
|
868
|
+
});
|
|
869
|
+
}, "missionsControllerCreateMissions");
|
|
870
|
+
var missionsControllerUpdateMissions = /* @__PURE__ */ __name((options) => {
|
|
871
|
+
return (options.client ?? client).put({
|
|
872
|
+
url: "/missions",
|
|
873
|
+
...options,
|
|
874
|
+
headers: {
|
|
875
|
+
"Content-Type": "application/json",
|
|
876
|
+
...options.headers
|
|
877
|
+
}
|
|
878
|
+
});
|
|
879
|
+
}, "missionsControllerUpdateMissions");
|
|
880
|
+
var quotesControllerCreateQuote = /* @__PURE__ */ __name((options) => {
|
|
881
|
+
return (options.client ?? client).post({
|
|
882
|
+
security: [
|
|
883
|
+
{
|
|
884
|
+
name: "x-api-token",
|
|
885
|
+
type: "apiKey"
|
|
886
|
+
}
|
|
887
|
+
],
|
|
888
|
+
url: "/quotes",
|
|
889
|
+
...options,
|
|
890
|
+
headers: {
|
|
891
|
+
"Content-Type": "application/json",
|
|
892
|
+
...options.headers
|
|
893
|
+
}
|
|
894
|
+
});
|
|
895
|
+
}, "quotesControllerCreateQuote");
|
|
896
|
+
var quotesControllerGetQuote = /* @__PURE__ */ __name((options) => {
|
|
918
897
|
return (options.client ?? client).get({
|
|
919
|
-
|
|
920
|
-
|
|
898
|
+
security: [
|
|
899
|
+
{
|
|
900
|
+
name: "x-api-token",
|
|
901
|
+
type: "apiKey"
|
|
902
|
+
}
|
|
903
|
+
],
|
|
904
|
+
url: "/quotes/{id}",
|
|
921
905
|
...options
|
|
922
906
|
});
|
|
923
|
-
}, "
|
|
907
|
+
}, "quotesControllerGetQuote");
|
|
924
908
|
var schemaControllerGetEventSchema = /* @__PURE__ */ __name((options) => {
|
|
925
909
|
return (options?.client ?? client).get({
|
|
926
910
|
url: "/schema/event",
|
|
@@ -1043,20 +1027,6 @@ var Event = z.union([
|
|
|
1043
1027
|
message: z.string()
|
|
1044
1028
|
}).strict()
|
|
1045
1029
|
}).strict(),
|
|
1046
|
-
z.object({
|
|
1047
|
-
id: z.any(),
|
|
1048
|
-
event_type: z.literal("protocol.flight.submitted"),
|
|
1049
|
-
timestamp: z.any(),
|
|
1050
|
-
data: z.object({
|
|
1051
|
-
storageKey: z.string(),
|
|
1052
|
-
pilotAddress: z.string(),
|
|
1053
|
-
flightManifestUri: z.string(),
|
|
1054
|
-
missionId: z.object({
|
|
1055
|
-
__type: z.literal("bigint"),
|
|
1056
|
-
value: z.string()
|
|
1057
|
-
}).transform((wire) => BigInt(wire.value))
|
|
1058
|
-
}).strict()
|
|
1059
|
-
}).strict(),
|
|
1060
1030
|
z.object({
|
|
1061
1031
|
id: z.any(),
|
|
1062
1032
|
event_type: z.literal("protocol.mission.created"),
|
|
@@ -1082,7 +1052,6 @@ var Event = z.union([
|
|
|
1082
1052
|
captureEndTime: z.string().datetime({
|
|
1083
1053
|
offset: true
|
|
1084
1054
|
}),
|
|
1085
|
-
detailsHash: z.string(),
|
|
1086
1055
|
requestor: z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$"))
|
|
1087
1056
|
}).strict()
|
|
1088
1057
|
}).strict(),
|
|
@@ -1104,45 +1073,61 @@ var Event = z.union([
|
|
|
1104
1073
|
}).strict(),
|
|
1105
1074
|
z.object({
|
|
1106
1075
|
id: z.any(),
|
|
1107
|
-
event_type: z.literal("protocol.
|
|
1076
|
+
event_type: z.literal("protocol.mission.paid"),
|
|
1108
1077
|
timestamp: z.any(),
|
|
1109
1078
|
data: z.object({
|
|
1079
|
+
recipient: z.any(),
|
|
1110
1080
|
flightId: z.object({
|
|
1111
1081
|
__type: z.literal("bigint"),
|
|
1112
1082
|
value: z.string()
|
|
1113
1083
|
}).transform((wire) => BigInt(wire.value)),
|
|
1114
|
-
isApproved: z.boolean(),
|
|
1115
|
-
validationLogUri: z.string(),
|
|
1116
|
-
validator: z.string(),
|
|
1117
|
-
filesHash: z.string(),
|
|
1118
|
-
storageKey: z.string(),
|
|
1119
1084
|
missionId: z.object({
|
|
1120
1085
|
__type: z.literal("bigint"),
|
|
1121
1086
|
value: z.string()
|
|
1087
|
+
}).transform((wire) => BigInt(wire.value)),
|
|
1088
|
+
vaultId: z.object({
|
|
1089
|
+
__type: z.literal("bigint"),
|
|
1090
|
+
value: z.string()
|
|
1091
|
+
}).transform((wire) => BigInt(wire.value)),
|
|
1092
|
+
amount: z.object({
|
|
1093
|
+
__type: z.literal("bigint"),
|
|
1094
|
+
value: z.string()
|
|
1122
1095
|
}).transform((wire) => BigInt(wire.value))
|
|
1123
1096
|
}).strict()
|
|
1124
1097
|
}).strict(),
|
|
1125
1098
|
z.object({
|
|
1126
1099
|
id: z.any(),
|
|
1127
|
-
event_type: z.literal("
|
|
1100
|
+
event_type: z.literal("protocol.flight.submitted"),
|
|
1128
1101
|
timestamp: z.any(),
|
|
1129
1102
|
data: z.object({
|
|
1130
|
-
isApproved: z.boolean(),
|
|
1131
1103
|
storageKey: z.string(),
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
tokenId: z.object({
|
|
1104
|
+
pilotAddress: z.string(),
|
|
1105
|
+
flightManifestUri: z.string(),
|
|
1106
|
+
missionId: z.object({
|
|
1136
1107
|
__type: z.literal("bigint"),
|
|
1137
1108
|
value: z.string()
|
|
1138
|
-
}).transform((wire) => BigInt(wire.value))
|
|
1139
|
-
|
|
1109
|
+
}).transform((wire) => BigInt(wire.value))
|
|
1110
|
+
}).strict()
|
|
1111
|
+
}).strict(),
|
|
1112
|
+
z.object({
|
|
1113
|
+
id: z.any(),
|
|
1114
|
+
event_type: z.literal("protocol.flight.reviewed"),
|
|
1115
|
+
timestamp: z.any(),
|
|
1116
|
+
data: z.object({
|
|
1117
|
+
flightId: z.object({
|
|
1140
1118
|
__type: z.literal("bigint"),
|
|
1141
1119
|
value: z.string()
|
|
1142
1120
|
}).transform((wire) => BigInt(wire.value)),
|
|
1143
|
-
|
|
1121
|
+
owner: z.any(),
|
|
1122
|
+
isApproved: z.boolean(),
|
|
1123
|
+
validationLogUri: z.string(),
|
|
1124
|
+
validator: z.string(),
|
|
1144
1125
|
filesHash: z.string(),
|
|
1145
|
-
|
|
1126
|
+
storageKey: z.string(),
|
|
1127
|
+
missionId: z.object({
|
|
1128
|
+
__type: z.literal("bigint"),
|
|
1129
|
+
value: z.string()
|
|
1130
|
+
}).transform((wire) => BigInt(wire.value))
|
|
1146
1131
|
}).strict()
|
|
1147
1132
|
}).strict()
|
|
1148
1133
|
]);
|
|
@@ -1173,11 +1158,11 @@ function getSecretHeader(headers) {
|
|
|
1173
1158
|
__name(getSecretHeader, "getSecretHeader");
|
|
1174
1159
|
export {
|
|
1175
1160
|
Event,
|
|
1161
|
+
apiControllerGetHello,
|
|
1176
1162
|
apiTokenControllerCreateToken,
|
|
1177
1163
|
apiTokenControllerDeleteToken,
|
|
1178
1164
|
apiTokenControllerGetToken,
|
|
1179
1165
|
apiTokenControllerUpdateToken,
|
|
1180
|
-
appControllerGetHello,
|
|
1181
1166
|
buildClientParams,
|
|
1182
1167
|
conditionsControllerGetSunAltitudeTimeLimits,
|
|
1183
1168
|
createClient,
|
|
@@ -1190,7 +1175,6 @@ export {
|
|
|
1190
1175
|
jsonBodySerializer,
|
|
1191
1176
|
keysControllerGetProvenanceCryptoKey,
|
|
1192
1177
|
mergeHeaders,
|
|
1193
|
-
missionsControllerClaimRewards,
|
|
1194
1178
|
missionsControllerCreateMissions,
|
|
1195
1179
|
missionsControllerUpdateMissions,
|
|
1196
1180
|
parseWebhookEvent,
|