@layer-drone/protocol 0.0.18-alpha → 0.1.1
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 +58 -52
- package/dist/index.d.ts +58 -52
- package/dist/index.js +19 -14
- package/dist/index.mjs +19 -14
- package/package.json +3 -2
- package/src/event/types.gen.ts +13 -12
package/dist/index.d.mts
CHANGED
|
@@ -777,9 +777,9 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
777
777
|
event_type: "test";
|
|
778
778
|
timestamp: string;
|
|
779
779
|
}>, z.ZodObject<{
|
|
780
|
-
id: z.
|
|
780
|
+
id: z.ZodString;
|
|
781
781
|
event_type: z.ZodLiteral<"protocol.mission.created">;
|
|
782
|
-
timestamp: z.
|
|
782
|
+
timestamp: z.ZodString;
|
|
783
783
|
data: z.ZodObject<{
|
|
784
784
|
id: z.ZodEffects<z.ZodObject<{
|
|
785
785
|
__type: z.ZodLiteral<"bigint">;
|
|
@@ -864,9 +864,9 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
864
864
|
captureEndTime: string;
|
|
865
865
|
requestor: string;
|
|
866
866
|
};
|
|
867
|
+
id: string;
|
|
867
868
|
event_type: "protocol.mission.created";
|
|
868
|
-
|
|
869
|
-
timestamp?: any;
|
|
869
|
+
timestamp: string;
|
|
870
870
|
}, {
|
|
871
871
|
data: {
|
|
872
872
|
id: {
|
|
@@ -887,13 +887,13 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
887
887
|
captureEndTime: string;
|
|
888
888
|
requestor: string;
|
|
889
889
|
};
|
|
890
|
+
id: string;
|
|
890
891
|
event_type: "protocol.mission.created";
|
|
891
|
-
|
|
892
|
-
timestamp?: any;
|
|
892
|
+
timestamp: string;
|
|
893
893
|
}>, z.ZodObject<{
|
|
894
|
-
id: z.
|
|
894
|
+
id: z.ZodString;
|
|
895
895
|
event_type: z.ZodLiteral<"protocol.mission.updated">;
|
|
896
|
-
timestamp: z.
|
|
896
|
+
timestamp: z.ZodString;
|
|
897
897
|
data: z.ZodObject<{
|
|
898
898
|
id: z.ZodEffects<z.ZodObject<{
|
|
899
899
|
__type: z.ZodLiteral<"bigint">;
|
|
@@ -943,9 +943,9 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
943
943
|
amount?: bigint | undefined;
|
|
944
944
|
isOpen?: boolean | undefined;
|
|
945
945
|
};
|
|
946
|
+
id: string;
|
|
946
947
|
event_type: "protocol.mission.updated";
|
|
947
|
-
|
|
948
|
-
timestamp?: any;
|
|
948
|
+
timestamp: string;
|
|
949
949
|
}, {
|
|
950
950
|
data: {
|
|
951
951
|
id: {
|
|
@@ -958,15 +958,15 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
958
958
|
} | undefined;
|
|
959
959
|
isOpen?: boolean | undefined;
|
|
960
960
|
};
|
|
961
|
+
id: string;
|
|
961
962
|
event_type: "protocol.mission.updated";
|
|
962
|
-
|
|
963
|
-
timestamp?: any;
|
|
963
|
+
timestamp: string;
|
|
964
964
|
}>, z.ZodObject<{
|
|
965
|
-
id: z.
|
|
965
|
+
id: z.ZodString;
|
|
966
966
|
event_type: z.ZodLiteral<"protocol.mission.paid">;
|
|
967
|
-
timestamp: z.
|
|
967
|
+
timestamp: z.ZodString;
|
|
968
968
|
data: z.ZodObject<{
|
|
969
|
-
recipient: z.
|
|
969
|
+
recipient: z.ZodString;
|
|
970
970
|
flightId: z.ZodEffects<z.ZodObject<{
|
|
971
971
|
__type: z.ZodLiteral<"bigint">;
|
|
972
972
|
value: z.ZodString;
|
|
@@ -1019,12 +1019,14 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1019
1019
|
value: string;
|
|
1020
1020
|
__type: "bigint";
|
|
1021
1021
|
}>;
|
|
1022
|
+
storageKey: z.ZodString;
|
|
1022
1023
|
}, "strict", z.ZodTypeAny, {
|
|
1023
1024
|
missionId: bigint;
|
|
1024
1025
|
flightId: bigint;
|
|
1025
1026
|
vaultId: bigint;
|
|
1026
1027
|
amount: bigint;
|
|
1027
|
-
recipient
|
|
1028
|
+
recipient: string;
|
|
1029
|
+
storageKey: string;
|
|
1028
1030
|
}, {
|
|
1029
1031
|
missionId: {
|
|
1030
1032
|
value: string;
|
|
@@ -1042,7 +1044,8 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1042
1044
|
value: string;
|
|
1043
1045
|
__type: "bigint";
|
|
1044
1046
|
};
|
|
1045
|
-
recipient
|
|
1047
|
+
recipient: string;
|
|
1048
|
+
storageKey: string;
|
|
1046
1049
|
}>;
|
|
1047
1050
|
}, "strict", z.ZodTypeAny, {
|
|
1048
1051
|
data: {
|
|
@@ -1050,11 +1053,12 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1050
1053
|
flightId: bigint;
|
|
1051
1054
|
vaultId: bigint;
|
|
1052
1055
|
amount: bigint;
|
|
1053
|
-
recipient
|
|
1056
|
+
recipient: string;
|
|
1057
|
+
storageKey: string;
|
|
1054
1058
|
};
|
|
1059
|
+
id: string;
|
|
1055
1060
|
event_type: "protocol.mission.paid";
|
|
1056
|
-
|
|
1057
|
-
timestamp?: any;
|
|
1061
|
+
timestamp: string;
|
|
1058
1062
|
}, {
|
|
1059
1063
|
data: {
|
|
1060
1064
|
missionId: {
|
|
@@ -1073,15 +1077,16 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1073
1077
|
value: string;
|
|
1074
1078
|
__type: "bigint";
|
|
1075
1079
|
};
|
|
1076
|
-
recipient
|
|
1080
|
+
recipient: string;
|
|
1081
|
+
storageKey: string;
|
|
1077
1082
|
};
|
|
1083
|
+
id: string;
|
|
1078
1084
|
event_type: "protocol.mission.paid";
|
|
1079
|
-
|
|
1080
|
-
timestamp?: any;
|
|
1085
|
+
timestamp: string;
|
|
1081
1086
|
}>, z.ZodObject<{
|
|
1082
|
-
id: z.
|
|
1087
|
+
id: z.ZodString;
|
|
1083
1088
|
event_type: z.ZodLiteral<"protocol.flight.submitted">;
|
|
1084
|
-
timestamp: z.
|
|
1089
|
+
timestamp: z.ZodString;
|
|
1085
1090
|
data: z.ZodObject<{
|
|
1086
1091
|
storageKey: z.ZodString;
|
|
1087
1092
|
pilotAddress: z.ZodString;
|
|
@@ -1120,9 +1125,9 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1120
1125
|
storageKey: string;
|
|
1121
1126
|
flightManifestUri: string;
|
|
1122
1127
|
};
|
|
1128
|
+
id: string;
|
|
1123
1129
|
event_type: "protocol.flight.submitted";
|
|
1124
|
-
|
|
1125
|
-
timestamp?: any;
|
|
1130
|
+
timestamp: string;
|
|
1126
1131
|
}, {
|
|
1127
1132
|
data: {
|
|
1128
1133
|
missionId: {
|
|
@@ -1133,13 +1138,13 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1133
1138
|
storageKey: string;
|
|
1134
1139
|
flightManifestUri: string;
|
|
1135
1140
|
};
|
|
1141
|
+
id: string;
|
|
1136
1142
|
event_type: "protocol.flight.submitted";
|
|
1137
|
-
|
|
1138
|
-
timestamp?: any;
|
|
1143
|
+
timestamp: string;
|
|
1139
1144
|
}>, z.ZodObject<{
|
|
1140
|
-
id: z.
|
|
1145
|
+
id: z.ZodString;
|
|
1141
1146
|
event_type: z.ZodLiteral<"protocol.flight.reviewed">;
|
|
1142
|
-
timestamp: z.
|
|
1147
|
+
timestamp: z.ZodString;
|
|
1143
1148
|
data: z.ZodObject<{
|
|
1144
1149
|
flightId: z.ZodEffects<z.ZodObject<{
|
|
1145
1150
|
__type: z.ZodLiteral<"bigint">;
|
|
@@ -1154,7 +1159,7 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1154
1159
|
value: string;
|
|
1155
1160
|
__type: "bigint";
|
|
1156
1161
|
}>;
|
|
1157
|
-
owner: z.
|
|
1162
|
+
owner: z.ZodString;
|
|
1158
1163
|
isApproved: z.ZodBoolean;
|
|
1159
1164
|
validationLogUri: z.ZodString;
|
|
1160
1165
|
validator: z.ZodString;
|
|
@@ -1177,11 +1182,11 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1177
1182
|
missionId: bigint;
|
|
1178
1183
|
flightId: bigint;
|
|
1179
1184
|
storageKey: string;
|
|
1185
|
+
owner: string;
|
|
1180
1186
|
isApproved: boolean;
|
|
1181
1187
|
validationLogUri: string;
|
|
1182
1188
|
validator: string;
|
|
1183
1189
|
filesHash: string;
|
|
1184
|
-
owner?: any;
|
|
1185
1190
|
}, {
|
|
1186
1191
|
missionId: {
|
|
1187
1192
|
value: string;
|
|
@@ -1192,26 +1197,26 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1192
1197
|
__type: "bigint";
|
|
1193
1198
|
};
|
|
1194
1199
|
storageKey: string;
|
|
1200
|
+
owner: string;
|
|
1195
1201
|
isApproved: boolean;
|
|
1196
1202
|
validationLogUri: string;
|
|
1197
1203
|
validator: string;
|
|
1198
1204
|
filesHash: string;
|
|
1199
|
-
owner?: any;
|
|
1200
1205
|
}>;
|
|
1201
1206
|
}, "strict", z.ZodTypeAny, {
|
|
1202
1207
|
data: {
|
|
1203
1208
|
missionId: bigint;
|
|
1204
1209
|
flightId: bigint;
|
|
1205
1210
|
storageKey: string;
|
|
1211
|
+
owner: string;
|
|
1206
1212
|
isApproved: boolean;
|
|
1207
1213
|
validationLogUri: string;
|
|
1208
1214
|
validator: string;
|
|
1209
1215
|
filesHash: string;
|
|
1210
|
-
owner?: any;
|
|
1211
1216
|
};
|
|
1217
|
+
id: string;
|
|
1212
1218
|
event_type: "protocol.flight.reviewed";
|
|
1213
|
-
|
|
1214
|
-
timestamp?: any;
|
|
1219
|
+
timestamp: string;
|
|
1215
1220
|
}, {
|
|
1216
1221
|
data: {
|
|
1217
1222
|
missionId: {
|
|
@@ -1223,15 +1228,15 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1223
1228
|
__type: "bigint";
|
|
1224
1229
|
};
|
|
1225
1230
|
storageKey: string;
|
|
1231
|
+
owner: string;
|
|
1226
1232
|
isApproved: boolean;
|
|
1227
1233
|
validationLogUri: string;
|
|
1228
1234
|
validator: string;
|
|
1229
1235
|
filesHash: string;
|
|
1230
|
-
owner?: any;
|
|
1231
1236
|
};
|
|
1237
|
+
id: string;
|
|
1232
1238
|
event_type: "protocol.flight.reviewed";
|
|
1233
|
-
|
|
1234
|
-
timestamp?: any;
|
|
1239
|
+
timestamp: string;
|
|
1235
1240
|
}>]>;
|
|
1236
1241
|
type Event = z.infer<typeof Event>;
|
|
1237
1242
|
type TestEvent = Extract<Event, {
|
|
@@ -1271,29 +1276,30 @@ declare function parseWebhookEvent(req: Request$1, webhookSecret: string): {
|
|
|
1271
1276
|
captureEndTime: string;
|
|
1272
1277
|
requestor: string;
|
|
1273
1278
|
};
|
|
1279
|
+
id: string;
|
|
1274
1280
|
event_type: "protocol.mission.created";
|
|
1275
|
-
|
|
1276
|
-
timestamp?: any;
|
|
1281
|
+
timestamp: string;
|
|
1277
1282
|
} | {
|
|
1278
1283
|
data: {
|
|
1279
1284
|
id: bigint;
|
|
1280
1285
|
amount?: bigint | undefined;
|
|
1281
1286
|
isOpen?: boolean | undefined;
|
|
1282
1287
|
};
|
|
1288
|
+
id: string;
|
|
1283
1289
|
event_type: "protocol.mission.updated";
|
|
1284
|
-
|
|
1285
|
-
timestamp?: any;
|
|
1290
|
+
timestamp: string;
|
|
1286
1291
|
} | {
|
|
1287
1292
|
data: {
|
|
1288
1293
|
missionId: bigint;
|
|
1289
1294
|
flightId: bigint;
|
|
1290
1295
|
vaultId: bigint;
|
|
1291
1296
|
amount: bigint;
|
|
1292
|
-
recipient
|
|
1297
|
+
recipient: string;
|
|
1298
|
+
storageKey: string;
|
|
1293
1299
|
};
|
|
1300
|
+
id: string;
|
|
1294
1301
|
event_type: "protocol.mission.paid";
|
|
1295
|
-
|
|
1296
|
-
timestamp?: any;
|
|
1302
|
+
timestamp: string;
|
|
1297
1303
|
} | {
|
|
1298
1304
|
data: {
|
|
1299
1305
|
missionId: bigint;
|
|
@@ -1301,23 +1307,23 @@ declare function parseWebhookEvent(req: Request$1, webhookSecret: string): {
|
|
|
1301
1307
|
storageKey: string;
|
|
1302
1308
|
flightManifestUri: string;
|
|
1303
1309
|
};
|
|
1310
|
+
id: string;
|
|
1304
1311
|
event_type: "protocol.flight.submitted";
|
|
1305
|
-
|
|
1306
|
-
timestamp?: any;
|
|
1312
|
+
timestamp: string;
|
|
1307
1313
|
} | {
|
|
1308
1314
|
data: {
|
|
1309
1315
|
missionId: bigint;
|
|
1310
1316
|
flightId: bigint;
|
|
1311
1317
|
storageKey: string;
|
|
1318
|
+
owner: string;
|
|
1312
1319
|
isApproved: boolean;
|
|
1313
1320
|
validationLogUri: string;
|
|
1314
1321
|
validator: string;
|
|
1315
1322
|
filesHash: string;
|
|
1316
|
-
owner?: any;
|
|
1317
1323
|
};
|
|
1324
|
+
id: string;
|
|
1318
1325
|
event_type: "protocol.flight.reviewed";
|
|
1319
|
-
|
|
1320
|
-
timestamp?: any;
|
|
1326
|
+
timestamp: string;
|
|
1321
1327
|
};
|
|
1322
1328
|
|
|
1323
1329
|
export { type ApiControllerGetHelloData, type ApiControllerGetHelloResponses, 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 Auth, 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 KeysControllerGetProvenanceCryptoKeyData, type KeysControllerGetProvenanceCryptoKeyResponse, type KeysControllerGetProvenanceCryptoKeyResponses, type MissionCreatedEvent, type MissionPaidEvent, type MissionUpdatedEvent, 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, apiControllerGetHello, apiTokenControllerCreateToken, apiTokenControllerDeleteToken, apiTokenControllerGetToken, apiTokenControllerUpdateToken, buildClientParams, conditionsControllerGetSunAltitudeTimeLimits, createClient, createConfig, flightsControllerCreatePresignedUrls, flightsControllerGenerateStorageKey, flightsControllerGetFlight, flightsControllerValidateFlight, formDataBodySerializer, jsonBodySerializer, keysControllerGetProvenanceCryptoKey, mergeHeaders, missionsControllerCreateMissions, missionsControllerUpdateMissions, parseWebhookEvent, quotesControllerCreateQuote, quotesControllerGetQuote, schemaControllerGetEventSchema, urlSearchParamsBodySerializer, webhooksControllerCreate, webhooksControllerDelete, webhooksControllerGet, webhooksControllerGetMany, webhooksControllerGetStatus, webhooksControllerRegenerateSecret, webhooksControllerTest, webhooksControllerUpdate };
|
package/dist/index.d.ts
CHANGED
|
@@ -777,9 +777,9 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
777
777
|
event_type: "test";
|
|
778
778
|
timestamp: string;
|
|
779
779
|
}>, z.ZodObject<{
|
|
780
|
-
id: z.
|
|
780
|
+
id: z.ZodString;
|
|
781
781
|
event_type: z.ZodLiteral<"protocol.mission.created">;
|
|
782
|
-
timestamp: z.
|
|
782
|
+
timestamp: z.ZodString;
|
|
783
783
|
data: z.ZodObject<{
|
|
784
784
|
id: z.ZodEffects<z.ZodObject<{
|
|
785
785
|
__type: z.ZodLiteral<"bigint">;
|
|
@@ -864,9 +864,9 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
864
864
|
captureEndTime: string;
|
|
865
865
|
requestor: string;
|
|
866
866
|
};
|
|
867
|
+
id: string;
|
|
867
868
|
event_type: "protocol.mission.created";
|
|
868
|
-
|
|
869
|
-
timestamp?: any;
|
|
869
|
+
timestamp: string;
|
|
870
870
|
}, {
|
|
871
871
|
data: {
|
|
872
872
|
id: {
|
|
@@ -887,13 +887,13 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
887
887
|
captureEndTime: string;
|
|
888
888
|
requestor: string;
|
|
889
889
|
};
|
|
890
|
+
id: string;
|
|
890
891
|
event_type: "protocol.mission.created";
|
|
891
|
-
|
|
892
|
-
timestamp?: any;
|
|
892
|
+
timestamp: string;
|
|
893
893
|
}>, z.ZodObject<{
|
|
894
|
-
id: z.
|
|
894
|
+
id: z.ZodString;
|
|
895
895
|
event_type: z.ZodLiteral<"protocol.mission.updated">;
|
|
896
|
-
timestamp: z.
|
|
896
|
+
timestamp: z.ZodString;
|
|
897
897
|
data: z.ZodObject<{
|
|
898
898
|
id: z.ZodEffects<z.ZodObject<{
|
|
899
899
|
__type: z.ZodLiteral<"bigint">;
|
|
@@ -943,9 +943,9 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
943
943
|
amount?: bigint | undefined;
|
|
944
944
|
isOpen?: boolean | undefined;
|
|
945
945
|
};
|
|
946
|
+
id: string;
|
|
946
947
|
event_type: "protocol.mission.updated";
|
|
947
|
-
|
|
948
|
-
timestamp?: any;
|
|
948
|
+
timestamp: string;
|
|
949
949
|
}, {
|
|
950
950
|
data: {
|
|
951
951
|
id: {
|
|
@@ -958,15 +958,15 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
958
958
|
} | undefined;
|
|
959
959
|
isOpen?: boolean | undefined;
|
|
960
960
|
};
|
|
961
|
+
id: string;
|
|
961
962
|
event_type: "protocol.mission.updated";
|
|
962
|
-
|
|
963
|
-
timestamp?: any;
|
|
963
|
+
timestamp: string;
|
|
964
964
|
}>, z.ZodObject<{
|
|
965
|
-
id: z.
|
|
965
|
+
id: z.ZodString;
|
|
966
966
|
event_type: z.ZodLiteral<"protocol.mission.paid">;
|
|
967
|
-
timestamp: z.
|
|
967
|
+
timestamp: z.ZodString;
|
|
968
968
|
data: z.ZodObject<{
|
|
969
|
-
recipient: z.
|
|
969
|
+
recipient: z.ZodString;
|
|
970
970
|
flightId: z.ZodEffects<z.ZodObject<{
|
|
971
971
|
__type: z.ZodLiteral<"bigint">;
|
|
972
972
|
value: z.ZodString;
|
|
@@ -1019,12 +1019,14 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1019
1019
|
value: string;
|
|
1020
1020
|
__type: "bigint";
|
|
1021
1021
|
}>;
|
|
1022
|
+
storageKey: z.ZodString;
|
|
1022
1023
|
}, "strict", z.ZodTypeAny, {
|
|
1023
1024
|
missionId: bigint;
|
|
1024
1025
|
flightId: bigint;
|
|
1025
1026
|
vaultId: bigint;
|
|
1026
1027
|
amount: bigint;
|
|
1027
|
-
recipient
|
|
1028
|
+
recipient: string;
|
|
1029
|
+
storageKey: string;
|
|
1028
1030
|
}, {
|
|
1029
1031
|
missionId: {
|
|
1030
1032
|
value: string;
|
|
@@ -1042,7 +1044,8 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1042
1044
|
value: string;
|
|
1043
1045
|
__type: "bigint";
|
|
1044
1046
|
};
|
|
1045
|
-
recipient
|
|
1047
|
+
recipient: string;
|
|
1048
|
+
storageKey: string;
|
|
1046
1049
|
}>;
|
|
1047
1050
|
}, "strict", z.ZodTypeAny, {
|
|
1048
1051
|
data: {
|
|
@@ -1050,11 +1053,12 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1050
1053
|
flightId: bigint;
|
|
1051
1054
|
vaultId: bigint;
|
|
1052
1055
|
amount: bigint;
|
|
1053
|
-
recipient
|
|
1056
|
+
recipient: string;
|
|
1057
|
+
storageKey: string;
|
|
1054
1058
|
};
|
|
1059
|
+
id: string;
|
|
1055
1060
|
event_type: "protocol.mission.paid";
|
|
1056
|
-
|
|
1057
|
-
timestamp?: any;
|
|
1061
|
+
timestamp: string;
|
|
1058
1062
|
}, {
|
|
1059
1063
|
data: {
|
|
1060
1064
|
missionId: {
|
|
@@ -1073,15 +1077,16 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1073
1077
|
value: string;
|
|
1074
1078
|
__type: "bigint";
|
|
1075
1079
|
};
|
|
1076
|
-
recipient
|
|
1080
|
+
recipient: string;
|
|
1081
|
+
storageKey: string;
|
|
1077
1082
|
};
|
|
1083
|
+
id: string;
|
|
1078
1084
|
event_type: "protocol.mission.paid";
|
|
1079
|
-
|
|
1080
|
-
timestamp?: any;
|
|
1085
|
+
timestamp: string;
|
|
1081
1086
|
}>, z.ZodObject<{
|
|
1082
|
-
id: z.
|
|
1087
|
+
id: z.ZodString;
|
|
1083
1088
|
event_type: z.ZodLiteral<"protocol.flight.submitted">;
|
|
1084
|
-
timestamp: z.
|
|
1089
|
+
timestamp: z.ZodString;
|
|
1085
1090
|
data: z.ZodObject<{
|
|
1086
1091
|
storageKey: z.ZodString;
|
|
1087
1092
|
pilotAddress: z.ZodString;
|
|
@@ -1120,9 +1125,9 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1120
1125
|
storageKey: string;
|
|
1121
1126
|
flightManifestUri: string;
|
|
1122
1127
|
};
|
|
1128
|
+
id: string;
|
|
1123
1129
|
event_type: "protocol.flight.submitted";
|
|
1124
|
-
|
|
1125
|
-
timestamp?: any;
|
|
1130
|
+
timestamp: string;
|
|
1126
1131
|
}, {
|
|
1127
1132
|
data: {
|
|
1128
1133
|
missionId: {
|
|
@@ -1133,13 +1138,13 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1133
1138
|
storageKey: string;
|
|
1134
1139
|
flightManifestUri: string;
|
|
1135
1140
|
};
|
|
1141
|
+
id: string;
|
|
1136
1142
|
event_type: "protocol.flight.submitted";
|
|
1137
|
-
|
|
1138
|
-
timestamp?: any;
|
|
1143
|
+
timestamp: string;
|
|
1139
1144
|
}>, z.ZodObject<{
|
|
1140
|
-
id: z.
|
|
1145
|
+
id: z.ZodString;
|
|
1141
1146
|
event_type: z.ZodLiteral<"protocol.flight.reviewed">;
|
|
1142
|
-
timestamp: z.
|
|
1147
|
+
timestamp: z.ZodString;
|
|
1143
1148
|
data: z.ZodObject<{
|
|
1144
1149
|
flightId: z.ZodEffects<z.ZodObject<{
|
|
1145
1150
|
__type: z.ZodLiteral<"bigint">;
|
|
@@ -1154,7 +1159,7 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1154
1159
|
value: string;
|
|
1155
1160
|
__type: "bigint";
|
|
1156
1161
|
}>;
|
|
1157
|
-
owner: z.
|
|
1162
|
+
owner: z.ZodString;
|
|
1158
1163
|
isApproved: z.ZodBoolean;
|
|
1159
1164
|
validationLogUri: z.ZodString;
|
|
1160
1165
|
validator: z.ZodString;
|
|
@@ -1177,11 +1182,11 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1177
1182
|
missionId: bigint;
|
|
1178
1183
|
flightId: bigint;
|
|
1179
1184
|
storageKey: string;
|
|
1185
|
+
owner: string;
|
|
1180
1186
|
isApproved: boolean;
|
|
1181
1187
|
validationLogUri: string;
|
|
1182
1188
|
validator: string;
|
|
1183
1189
|
filesHash: string;
|
|
1184
|
-
owner?: any;
|
|
1185
1190
|
}, {
|
|
1186
1191
|
missionId: {
|
|
1187
1192
|
value: string;
|
|
@@ -1192,26 +1197,26 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1192
1197
|
__type: "bigint";
|
|
1193
1198
|
};
|
|
1194
1199
|
storageKey: string;
|
|
1200
|
+
owner: string;
|
|
1195
1201
|
isApproved: boolean;
|
|
1196
1202
|
validationLogUri: string;
|
|
1197
1203
|
validator: string;
|
|
1198
1204
|
filesHash: string;
|
|
1199
|
-
owner?: any;
|
|
1200
1205
|
}>;
|
|
1201
1206
|
}, "strict", z.ZodTypeAny, {
|
|
1202
1207
|
data: {
|
|
1203
1208
|
missionId: bigint;
|
|
1204
1209
|
flightId: bigint;
|
|
1205
1210
|
storageKey: string;
|
|
1211
|
+
owner: string;
|
|
1206
1212
|
isApproved: boolean;
|
|
1207
1213
|
validationLogUri: string;
|
|
1208
1214
|
validator: string;
|
|
1209
1215
|
filesHash: string;
|
|
1210
|
-
owner?: any;
|
|
1211
1216
|
};
|
|
1217
|
+
id: string;
|
|
1212
1218
|
event_type: "protocol.flight.reviewed";
|
|
1213
|
-
|
|
1214
|
-
timestamp?: any;
|
|
1219
|
+
timestamp: string;
|
|
1215
1220
|
}, {
|
|
1216
1221
|
data: {
|
|
1217
1222
|
missionId: {
|
|
@@ -1223,15 +1228,15 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
1223
1228
|
__type: "bigint";
|
|
1224
1229
|
};
|
|
1225
1230
|
storageKey: string;
|
|
1231
|
+
owner: string;
|
|
1226
1232
|
isApproved: boolean;
|
|
1227
1233
|
validationLogUri: string;
|
|
1228
1234
|
validator: string;
|
|
1229
1235
|
filesHash: string;
|
|
1230
|
-
owner?: any;
|
|
1231
1236
|
};
|
|
1237
|
+
id: string;
|
|
1232
1238
|
event_type: "protocol.flight.reviewed";
|
|
1233
|
-
|
|
1234
|
-
timestamp?: any;
|
|
1239
|
+
timestamp: string;
|
|
1235
1240
|
}>]>;
|
|
1236
1241
|
type Event = z.infer<typeof Event>;
|
|
1237
1242
|
type TestEvent = Extract<Event, {
|
|
@@ -1271,29 +1276,30 @@ declare function parseWebhookEvent(req: Request$1, webhookSecret: string): {
|
|
|
1271
1276
|
captureEndTime: string;
|
|
1272
1277
|
requestor: string;
|
|
1273
1278
|
};
|
|
1279
|
+
id: string;
|
|
1274
1280
|
event_type: "protocol.mission.created";
|
|
1275
|
-
|
|
1276
|
-
timestamp?: any;
|
|
1281
|
+
timestamp: string;
|
|
1277
1282
|
} | {
|
|
1278
1283
|
data: {
|
|
1279
1284
|
id: bigint;
|
|
1280
1285
|
amount?: bigint | undefined;
|
|
1281
1286
|
isOpen?: boolean | undefined;
|
|
1282
1287
|
};
|
|
1288
|
+
id: string;
|
|
1283
1289
|
event_type: "protocol.mission.updated";
|
|
1284
|
-
|
|
1285
|
-
timestamp?: any;
|
|
1290
|
+
timestamp: string;
|
|
1286
1291
|
} | {
|
|
1287
1292
|
data: {
|
|
1288
1293
|
missionId: bigint;
|
|
1289
1294
|
flightId: bigint;
|
|
1290
1295
|
vaultId: bigint;
|
|
1291
1296
|
amount: bigint;
|
|
1292
|
-
recipient
|
|
1297
|
+
recipient: string;
|
|
1298
|
+
storageKey: string;
|
|
1293
1299
|
};
|
|
1300
|
+
id: string;
|
|
1294
1301
|
event_type: "protocol.mission.paid";
|
|
1295
|
-
|
|
1296
|
-
timestamp?: any;
|
|
1302
|
+
timestamp: string;
|
|
1297
1303
|
} | {
|
|
1298
1304
|
data: {
|
|
1299
1305
|
missionId: bigint;
|
|
@@ -1301,23 +1307,23 @@ declare function parseWebhookEvent(req: Request$1, webhookSecret: string): {
|
|
|
1301
1307
|
storageKey: string;
|
|
1302
1308
|
flightManifestUri: string;
|
|
1303
1309
|
};
|
|
1310
|
+
id: string;
|
|
1304
1311
|
event_type: "protocol.flight.submitted";
|
|
1305
|
-
|
|
1306
|
-
timestamp?: any;
|
|
1312
|
+
timestamp: string;
|
|
1307
1313
|
} | {
|
|
1308
1314
|
data: {
|
|
1309
1315
|
missionId: bigint;
|
|
1310
1316
|
flightId: bigint;
|
|
1311
1317
|
storageKey: string;
|
|
1318
|
+
owner: string;
|
|
1312
1319
|
isApproved: boolean;
|
|
1313
1320
|
validationLogUri: string;
|
|
1314
1321
|
validator: string;
|
|
1315
1322
|
filesHash: string;
|
|
1316
|
-
owner?: any;
|
|
1317
1323
|
};
|
|
1324
|
+
id: string;
|
|
1318
1325
|
event_type: "protocol.flight.reviewed";
|
|
1319
|
-
|
|
1320
|
-
timestamp?: any;
|
|
1326
|
+
timestamp: string;
|
|
1321
1327
|
};
|
|
1322
1328
|
|
|
1323
1329
|
export { type ApiControllerGetHelloData, type ApiControllerGetHelloResponses, 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 Auth, 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 KeysControllerGetProvenanceCryptoKeyData, type KeysControllerGetProvenanceCryptoKeyResponse, type KeysControllerGetProvenanceCryptoKeyResponses, type MissionCreatedEvent, type MissionPaidEvent, type MissionUpdatedEvent, 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, apiControllerGetHello, apiTokenControllerCreateToken, apiTokenControllerDeleteToken, apiTokenControllerGetToken, apiTokenControllerUpdateToken, buildClientParams, conditionsControllerGetSunAltitudeTimeLimits, createClient, createConfig, flightsControllerCreatePresignedUrls, flightsControllerGenerateStorageKey, flightsControllerGetFlight, flightsControllerValidateFlight, formDataBodySerializer, jsonBodySerializer, keysControllerGetProvenanceCryptoKey, mergeHeaders, missionsControllerCreateMissions, missionsControllerUpdateMissions, parseWebhookEvent, quotesControllerCreateQuote, quotesControllerGetQuote, schemaControllerGetEventSchema, urlSearchParamsBodySerializer, webhooksControllerCreate, webhooksControllerDelete, webhooksControllerGet, webhooksControllerGetMany, webhooksControllerGetStatus, webhooksControllerRegenerateSecret, webhooksControllerTest, webhooksControllerUpdate };
|
package/dist/index.js
CHANGED
|
@@ -627,7 +627,11 @@ var createClient = /* @__PURE__ */ __name((config = {}) => {
|
|
|
627
627
|
if (opts.body === void 0 || opts.body === "") {
|
|
628
628
|
opts.headers.delete("Content-Type");
|
|
629
629
|
}
|
|
630
|
-
const url = buildUrl(
|
|
630
|
+
const url = buildUrl({
|
|
631
|
+
...opts,
|
|
632
|
+
baseUrl: opts.baseUrl ?? _config?.baseUrl ?? "https://api.layerdrone.org",
|
|
633
|
+
url: opts.url ?? ""
|
|
634
|
+
});
|
|
631
635
|
const requestInit = {
|
|
632
636
|
redirect: "follow",
|
|
633
637
|
...opts
|
|
@@ -1080,9 +1084,9 @@ var Event = import_zod.z.union([
|
|
|
1080
1084
|
}).strict()
|
|
1081
1085
|
}).strict(),
|
|
1082
1086
|
import_zod.z.object({
|
|
1083
|
-
id: import_zod.z.
|
|
1087
|
+
id: import_zod.z.string(),
|
|
1084
1088
|
event_type: import_zod.z.literal("protocol.mission.created"),
|
|
1085
|
-
timestamp: import_zod.z.
|
|
1089
|
+
timestamp: import_zod.z.string(),
|
|
1086
1090
|
data: import_zod.z.object({
|
|
1087
1091
|
id: import_zod.z.object({
|
|
1088
1092
|
__type: import_zod.z.literal("bigint"),
|
|
@@ -1108,9 +1112,9 @@ var Event = import_zod.z.union([
|
|
|
1108
1112
|
}).strict()
|
|
1109
1113
|
}).strict(),
|
|
1110
1114
|
import_zod.z.object({
|
|
1111
|
-
id: import_zod.z.
|
|
1115
|
+
id: import_zod.z.string(),
|
|
1112
1116
|
event_type: import_zod.z.literal("protocol.mission.updated"),
|
|
1113
|
-
timestamp: import_zod.z.
|
|
1117
|
+
timestamp: import_zod.z.string(),
|
|
1114
1118
|
data: import_zod.z.object({
|
|
1115
1119
|
id: import_zod.z.object({
|
|
1116
1120
|
__type: import_zod.z.literal("bigint"),
|
|
@@ -1124,11 +1128,11 @@ var Event = import_zod.z.union([
|
|
|
1124
1128
|
}).strict()
|
|
1125
1129
|
}).strict(),
|
|
1126
1130
|
import_zod.z.object({
|
|
1127
|
-
id: import_zod.z.
|
|
1131
|
+
id: import_zod.z.string(),
|
|
1128
1132
|
event_type: import_zod.z.literal("protocol.mission.paid"),
|
|
1129
|
-
timestamp: import_zod.z.
|
|
1133
|
+
timestamp: import_zod.z.string(),
|
|
1130
1134
|
data: import_zod.z.object({
|
|
1131
|
-
recipient: import_zod.z.
|
|
1135
|
+
recipient: import_zod.z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$")),
|
|
1132
1136
|
flightId: import_zod.z.object({
|
|
1133
1137
|
__type: import_zod.z.literal("bigint"),
|
|
1134
1138
|
value: import_zod.z.string()
|
|
@@ -1144,13 +1148,14 @@ var Event = import_zod.z.union([
|
|
|
1144
1148
|
amount: import_zod.z.object({
|
|
1145
1149
|
__type: import_zod.z.literal("bigint"),
|
|
1146
1150
|
value: import_zod.z.string()
|
|
1147
|
-
}).transform((wire) => BigInt(wire.value))
|
|
1151
|
+
}).transform((wire) => BigInt(wire.value)),
|
|
1152
|
+
storageKey: import_zod.z.string()
|
|
1148
1153
|
}).strict()
|
|
1149
1154
|
}).strict(),
|
|
1150
1155
|
import_zod.z.object({
|
|
1151
|
-
id: import_zod.z.
|
|
1156
|
+
id: import_zod.z.string(),
|
|
1152
1157
|
event_type: import_zod.z.literal("protocol.flight.submitted"),
|
|
1153
|
-
timestamp: import_zod.z.
|
|
1158
|
+
timestamp: import_zod.z.string(),
|
|
1154
1159
|
data: import_zod.z.object({
|
|
1155
1160
|
storageKey: import_zod.z.string(),
|
|
1156
1161
|
pilotAddress: import_zod.z.string(),
|
|
@@ -1162,15 +1167,15 @@ var Event = import_zod.z.union([
|
|
|
1162
1167
|
}).strict()
|
|
1163
1168
|
}).strict(),
|
|
1164
1169
|
import_zod.z.object({
|
|
1165
|
-
id: import_zod.z.
|
|
1170
|
+
id: import_zod.z.string(),
|
|
1166
1171
|
event_type: import_zod.z.literal("protocol.flight.reviewed"),
|
|
1167
|
-
timestamp: import_zod.z.
|
|
1172
|
+
timestamp: import_zod.z.string(),
|
|
1168
1173
|
data: import_zod.z.object({
|
|
1169
1174
|
flightId: import_zod.z.object({
|
|
1170
1175
|
__type: import_zod.z.literal("bigint"),
|
|
1171
1176
|
value: import_zod.z.string()
|
|
1172
1177
|
}).transform((wire) => BigInt(wire.value)),
|
|
1173
|
-
owner: import_zod.z.
|
|
1178
|
+
owner: import_zod.z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$")),
|
|
1174
1179
|
isApproved: import_zod.z.boolean(),
|
|
1175
1180
|
validationLogUri: import_zod.z.string(),
|
|
1176
1181
|
validator: import_zod.z.string(),
|
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
|
|
@@ -1024,9 +1028,9 @@ var Event = z.union([
|
|
|
1024
1028
|
}).strict()
|
|
1025
1029
|
}).strict(),
|
|
1026
1030
|
z.object({
|
|
1027
|
-
id: z.
|
|
1031
|
+
id: z.string(),
|
|
1028
1032
|
event_type: z.literal("protocol.mission.created"),
|
|
1029
|
-
timestamp: z.
|
|
1033
|
+
timestamp: z.string(),
|
|
1030
1034
|
data: z.object({
|
|
1031
1035
|
id: z.object({
|
|
1032
1036
|
__type: z.literal("bigint"),
|
|
@@ -1052,9 +1056,9 @@ var Event = z.union([
|
|
|
1052
1056
|
}).strict()
|
|
1053
1057
|
}).strict(),
|
|
1054
1058
|
z.object({
|
|
1055
|
-
id: z.
|
|
1059
|
+
id: z.string(),
|
|
1056
1060
|
event_type: z.literal("protocol.mission.updated"),
|
|
1057
|
-
timestamp: z.
|
|
1061
|
+
timestamp: z.string(),
|
|
1058
1062
|
data: z.object({
|
|
1059
1063
|
id: z.object({
|
|
1060
1064
|
__type: z.literal("bigint"),
|
|
@@ -1068,11 +1072,11 @@ var Event = z.union([
|
|
|
1068
1072
|
}).strict()
|
|
1069
1073
|
}).strict(),
|
|
1070
1074
|
z.object({
|
|
1071
|
-
id: z.
|
|
1075
|
+
id: z.string(),
|
|
1072
1076
|
event_type: z.literal("protocol.mission.paid"),
|
|
1073
|
-
timestamp: z.
|
|
1077
|
+
timestamp: z.string(),
|
|
1074
1078
|
data: z.object({
|
|
1075
|
-
recipient: z.
|
|
1079
|
+
recipient: z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$")),
|
|
1076
1080
|
flightId: z.object({
|
|
1077
1081
|
__type: z.literal("bigint"),
|
|
1078
1082
|
value: z.string()
|
|
@@ -1088,13 +1092,14 @@ var Event = z.union([
|
|
|
1088
1092
|
amount: z.object({
|
|
1089
1093
|
__type: z.literal("bigint"),
|
|
1090
1094
|
value: z.string()
|
|
1091
|
-
}).transform((wire) => BigInt(wire.value))
|
|
1095
|
+
}).transform((wire) => BigInt(wire.value)),
|
|
1096
|
+
storageKey: z.string()
|
|
1092
1097
|
}).strict()
|
|
1093
1098
|
}).strict(),
|
|
1094
1099
|
z.object({
|
|
1095
|
-
id: z.
|
|
1100
|
+
id: z.string(),
|
|
1096
1101
|
event_type: z.literal("protocol.flight.submitted"),
|
|
1097
|
-
timestamp: z.
|
|
1102
|
+
timestamp: z.string(),
|
|
1098
1103
|
data: z.object({
|
|
1099
1104
|
storageKey: z.string(),
|
|
1100
1105
|
pilotAddress: z.string(),
|
|
@@ -1106,15 +1111,15 @@ var Event = z.union([
|
|
|
1106
1111
|
}).strict()
|
|
1107
1112
|
}).strict(),
|
|
1108
1113
|
z.object({
|
|
1109
|
-
id: z.
|
|
1114
|
+
id: z.string(),
|
|
1110
1115
|
event_type: z.literal("protocol.flight.reviewed"),
|
|
1111
|
-
timestamp: z.
|
|
1116
|
+
timestamp: z.string(),
|
|
1112
1117
|
data: z.object({
|
|
1113
1118
|
flightId: z.object({
|
|
1114
1119
|
__type: z.literal("bigint"),
|
|
1115
1120
|
value: z.string()
|
|
1116
1121
|
}).transform((wire) => BigInt(wire.value)),
|
|
1117
|
-
owner: z.
|
|
1122
|
+
owner: z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$")),
|
|
1118
1123
|
isApproved: z.boolean(),
|
|
1119
1124
|
validationLogUri: z.string(),
|
|
1120
1125
|
validator: z.string(),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layer-drone/protocol",
|
|
3
3
|
"description": "Layer Drone protocol SDK with typed API client and event parsing",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -17,11 +17,12 @@
|
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@hey-api/openapi-ts": "^0.74.0",
|
|
20
|
-
"@types/express": "^4",
|
|
20
|
+
"@types/express": "^4.17.17",
|
|
21
21
|
"@types/jest": "^29.5.2",
|
|
22
22
|
"@types/node": "^20.3.1",
|
|
23
23
|
"express": "^4",
|
|
24
24
|
"jest": "^29.7.0",
|
|
25
|
+
"json-refs": "^3.0.15",
|
|
25
26
|
"json-schema-to-zod": "^2.6.1",
|
|
26
27
|
"ts-jest": "^29.2.5",
|
|
27
28
|
"ts-loader": "^9.4.3",
|
package/src/event/types.gen.ts
CHANGED
|
@@ -12,9 +12,9 @@ export const Event = z.union([
|
|
|
12
12
|
.strict(),
|
|
13
13
|
z
|
|
14
14
|
.object({
|
|
15
|
-
id: z.
|
|
15
|
+
id: z.string(),
|
|
16
16
|
event_type: z.literal("protocol.mission.created"),
|
|
17
|
-
timestamp: z.
|
|
17
|
+
timestamp: z.string(),
|
|
18
18
|
data: z
|
|
19
19
|
.object({
|
|
20
20
|
id: z
|
|
@@ -37,9 +37,9 @@ export const Event = z.union([
|
|
|
37
37
|
.strict(),
|
|
38
38
|
z
|
|
39
39
|
.object({
|
|
40
|
-
id: z.
|
|
40
|
+
id: z.string(),
|
|
41
41
|
event_type: z.literal("protocol.mission.updated"),
|
|
42
|
-
timestamp: z.
|
|
42
|
+
timestamp: z.string(),
|
|
43
43
|
data: z
|
|
44
44
|
.object({
|
|
45
45
|
id: z
|
|
@@ -56,12 +56,12 @@ export const Event = z.union([
|
|
|
56
56
|
.strict(),
|
|
57
57
|
z
|
|
58
58
|
.object({
|
|
59
|
-
id: z.
|
|
59
|
+
id: z.string(),
|
|
60
60
|
event_type: z.literal("protocol.mission.paid"),
|
|
61
|
-
timestamp: z.
|
|
61
|
+
timestamp: z.string(),
|
|
62
62
|
data: z
|
|
63
63
|
.object({
|
|
64
|
-
recipient: z.
|
|
64
|
+
recipient: z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$")),
|
|
65
65
|
flightId: z
|
|
66
66
|
.object({ __type: z.literal("bigint"), value: z.string() })
|
|
67
67
|
.transform((wire) => BigInt(wire.value)),
|
|
@@ -74,15 +74,16 @@ export const Event = z.union([
|
|
|
74
74
|
amount: z
|
|
75
75
|
.object({ __type: z.literal("bigint"), value: z.string() })
|
|
76
76
|
.transform((wire) => BigInt(wire.value)),
|
|
77
|
+
storageKey: z.string(),
|
|
77
78
|
})
|
|
78
79
|
.strict(),
|
|
79
80
|
})
|
|
80
81
|
.strict(),
|
|
81
82
|
z
|
|
82
83
|
.object({
|
|
83
|
-
id: z.
|
|
84
|
+
id: z.string(),
|
|
84
85
|
event_type: z.literal("protocol.flight.submitted"),
|
|
85
|
-
timestamp: z.
|
|
86
|
+
timestamp: z.string(),
|
|
86
87
|
data: z
|
|
87
88
|
.object({
|
|
88
89
|
storageKey: z.string(),
|
|
@@ -97,15 +98,15 @@ export const Event = z.union([
|
|
|
97
98
|
.strict(),
|
|
98
99
|
z
|
|
99
100
|
.object({
|
|
100
|
-
id: z.
|
|
101
|
+
id: z.string(),
|
|
101
102
|
event_type: z.literal("protocol.flight.reviewed"),
|
|
102
|
-
timestamp: z.
|
|
103
|
+
timestamp: z.string(),
|
|
103
104
|
data: z
|
|
104
105
|
.object({
|
|
105
106
|
flightId: z
|
|
106
107
|
.object({ __type: z.literal("bigint"), value: z.string() })
|
|
107
108
|
.transform((wire) => BigInt(wire.value)),
|
|
108
|
-
owner: z.
|
|
109
|
+
owner: z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$")),
|
|
109
110
|
isApproved: z.boolean(),
|
|
110
111
|
validationLogUri: z.string(),
|
|
111
112
|
validator: z.string(),
|