@layer-drone/protocol 0.0.14 → 0.0.15
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 +59 -101
- package/dist/index.d.ts +59 -101
- package/dist/index.js +21 -52
- package/dist/index.mjs +21 -50
- package/package.json +2 -2
- package/src/client/sdk.gen.ts +11 -67
- package/src/client/types.gen.ts +26 -89
- package/src/event/types.gen.ts +8 -7
package/dist/index.d.mts
CHANGED
|
@@ -8,22 +8,11 @@ type GetProvenanceCryptoKeyResponse = {
|
|
|
8
8
|
KeyUsage?: "ENCRYPT_DECRYPT" | "GENERATE_VERIFY_MAC" | "KEY_AGREEMENT" | "SIGN_VERIFY";
|
|
9
9
|
EncryptionAlgorithms?: Array<"RSAES_OAEP_SHA_1" | "RSAES_OAEP_SHA_256" | "SM2PKE" | "SYMMETRIC_DEFAULT">;
|
|
10
10
|
};
|
|
11
|
-
type
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
type DepositRewardsResponseDto = {
|
|
18
|
-
MessageId: string;
|
|
19
|
-
};
|
|
20
|
-
type DistributeRewardsRequestDto = {
|
|
21
|
-
amounts: {
|
|
22
|
-
[key: string]: number;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
type DistributeRewardsResponseDto = {
|
|
26
|
-
MessageId: string;
|
|
11
|
+
type CreateQuoteRequestDto = {
|
|
12
|
+
missionIds: Array<number>;
|
|
13
|
+
entitlementType: string;
|
|
14
|
+
buyer: string;
|
|
15
|
+
mintOnChain: boolean;
|
|
27
16
|
};
|
|
28
17
|
type CreateApiTokenResponseDto = {
|
|
29
18
|
id: string;
|
|
@@ -50,17 +39,11 @@ type UpdateApiTokenResponseDto = {
|
|
|
50
39
|
org: number;
|
|
51
40
|
scopes: Array<"manageTokens" | "manageFlights" | "manageWebhooks" | "all">;
|
|
52
41
|
};
|
|
53
|
-
type CreateQuoteRequestDto = {
|
|
54
|
-
missionIds: Array<number>;
|
|
55
|
-
entitlementType: string;
|
|
56
|
-
buyer: string;
|
|
57
|
-
mintOnChain: boolean;
|
|
58
|
-
};
|
|
59
42
|
type CreateMissionRequestDto = {
|
|
60
43
|
missions: Array<{
|
|
61
44
|
zoneId: string;
|
|
62
45
|
flightPlanId: number;
|
|
63
|
-
amount:
|
|
46
|
+
amount: bigint;
|
|
64
47
|
startTime: Date;
|
|
65
48
|
endTime: Date;
|
|
66
49
|
}>;
|
|
@@ -72,24 +55,23 @@ type CreateMissionResponseDto = {
|
|
|
72
55
|
success: boolean;
|
|
73
56
|
data: {
|
|
74
57
|
missions: Array<{
|
|
75
|
-
|
|
58
|
+
id: string;
|
|
76
59
|
vaultId: string;
|
|
77
|
-
amount:
|
|
60
|
+
amount: string;
|
|
78
61
|
zoneId: string;
|
|
79
62
|
flightPlanId: number;
|
|
80
63
|
captureStartTime: Date;
|
|
81
64
|
captureEndTime: Date;
|
|
82
65
|
requestor: string;
|
|
83
66
|
}>;
|
|
84
|
-
totalAmount: number;
|
|
85
67
|
} | string;
|
|
86
68
|
};
|
|
87
69
|
type UpdateMissionsRequestDto = {
|
|
88
70
|
missions: Array<{
|
|
89
|
-
id:
|
|
90
|
-
amount:
|
|
71
|
+
id: bigint;
|
|
72
|
+
amount: bigint;
|
|
91
73
|
} | {
|
|
92
|
-
id:
|
|
74
|
+
id: bigint;
|
|
93
75
|
isOpen: false;
|
|
94
76
|
}>;
|
|
95
77
|
};
|
|
@@ -238,34 +220,34 @@ type KeysControllerGetProvenanceCryptoKeyResponses = {
|
|
|
238
220
|
200: GetProvenanceCryptoKeyResponse;
|
|
239
221
|
};
|
|
240
222
|
type KeysControllerGetProvenanceCryptoKeyResponse = KeysControllerGetProvenanceCryptoKeyResponses[keyof KeysControllerGetProvenanceCryptoKeyResponses];
|
|
241
|
-
type
|
|
242
|
-
body:
|
|
223
|
+
type QuotesControllerCreateQuoteData = {
|
|
224
|
+
body: CreateQuoteRequestDto;
|
|
243
225
|
path?: never;
|
|
244
226
|
query?: never;
|
|
245
|
-
url: "/
|
|
227
|
+
url: "/quotes";
|
|
246
228
|
};
|
|
247
|
-
type
|
|
229
|
+
type QuotesControllerCreateQuoteErrors = {
|
|
248
230
|
401: unknown;
|
|
249
231
|
403: unknown;
|
|
250
232
|
};
|
|
251
|
-
type
|
|
252
|
-
|
|
233
|
+
type QuotesControllerCreateQuoteResponses = {
|
|
234
|
+
201: unknown;
|
|
253
235
|
};
|
|
254
|
-
type
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
236
|
+
type QuotesControllerGetQuoteData = {
|
|
237
|
+
body?: never;
|
|
238
|
+
path: {
|
|
239
|
+
id: string;
|
|
240
|
+
};
|
|
258
241
|
query?: never;
|
|
259
|
-
url: "/
|
|
242
|
+
url: "/quotes/{id}";
|
|
260
243
|
};
|
|
261
|
-
type
|
|
244
|
+
type QuotesControllerGetQuoteErrors = {
|
|
262
245
|
401: unknown;
|
|
263
246
|
403: unknown;
|
|
264
247
|
};
|
|
265
|
-
type
|
|
266
|
-
200:
|
|
248
|
+
type QuotesControllerGetQuoteResponses = {
|
|
249
|
+
200: unknown;
|
|
267
250
|
};
|
|
268
|
-
type RewardsControllerDistributeRewardsResponse = RewardsControllerDistributeRewardsResponses[keyof RewardsControllerDistributeRewardsResponses];
|
|
269
251
|
type ApiTokenControllerCreateTokenData = {
|
|
270
252
|
body: CreateApiTokenRequestDto;
|
|
271
253
|
path?: never;
|
|
@@ -327,34 +309,6 @@ type ApiTokenControllerUpdateTokenResponses = {
|
|
|
327
309
|
200: UpdateApiTokenResponseDto;
|
|
328
310
|
};
|
|
329
311
|
type ApiTokenControllerUpdateTokenResponse = ApiTokenControllerUpdateTokenResponses[keyof ApiTokenControllerUpdateTokenResponses];
|
|
330
|
-
type QuotesControllerCreateQuoteData = {
|
|
331
|
-
body: CreateQuoteRequestDto;
|
|
332
|
-
path?: never;
|
|
333
|
-
query?: never;
|
|
334
|
-
url: "/quotes";
|
|
335
|
-
};
|
|
336
|
-
type QuotesControllerCreateQuoteErrors = {
|
|
337
|
-
401: unknown;
|
|
338
|
-
403: unknown;
|
|
339
|
-
};
|
|
340
|
-
type QuotesControllerCreateQuoteResponses = {
|
|
341
|
-
201: unknown;
|
|
342
|
-
};
|
|
343
|
-
type QuotesControllerGetQuoteData = {
|
|
344
|
-
body?: never;
|
|
345
|
-
path: {
|
|
346
|
-
id: string;
|
|
347
|
-
};
|
|
348
|
-
query?: never;
|
|
349
|
-
url: "/quotes/{id}";
|
|
350
|
-
};
|
|
351
|
-
type QuotesControllerGetQuoteErrors = {
|
|
352
|
-
401: unknown;
|
|
353
|
-
403: unknown;
|
|
354
|
-
};
|
|
355
|
-
type QuotesControllerGetQuoteResponses = {
|
|
356
|
-
200: unknown;
|
|
357
|
-
};
|
|
358
312
|
type MissionsControllerCreateMissionsData = {
|
|
359
313
|
body: CreateMissionRequestDto;
|
|
360
314
|
path?: never;
|
|
@@ -798,14 +752,12 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
|
|
|
798
752
|
};
|
|
799
753
|
declare const appControllerGetHello: <ThrowOnError extends boolean = false>(options?: Options<AppControllerGetHelloData, ThrowOnError>) => RequestResult<AppControllerGetHelloResponses, unknown, ThrowOnError, "fields">;
|
|
800
754
|
declare const keysControllerGetProvenanceCryptoKey: <ThrowOnError extends boolean = false>(options?: Options<KeysControllerGetProvenanceCryptoKeyData, ThrowOnError>) => RequestResult<KeysControllerGetProvenanceCryptoKeyResponses, unknown, ThrowOnError, "fields">;
|
|
801
|
-
declare const
|
|
802
|
-
declare const
|
|
755
|
+
declare const quotesControllerCreateQuote: <ThrowOnError extends boolean = false>(options: Options<QuotesControllerCreateQuoteData, ThrowOnError>) => RequestResult<QuotesControllerCreateQuoteResponses, QuotesControllerCreateQuoteErrors, ThrowOnError, "fields">;
|
|
756
|
+
declare const quotesControllerGetQuote: <ThrowOnError extends boolean = false>(options: Options<QuotesControllerGetQuoteData, ThrowOnError>) => RequestResult<QuotesControllerGetQuoteResponses, QuotesControllerGetQuoteErrors, ThrowOnError, "fields">;
|
|
803
757
|
declare const apiTokenControllerCreateToken: <ThrowOnError extends boolean = false>(options: Options<ApiTokenControllerCreateTokenData, ThrowOnError>) => RequestResult<ApiTokenControllerCreateTokenResponses, ApiTokenControllerCreateTokenErrors, ThrowOnError, "fields">;
|
|
804
758
|
declare const apiTokenControllerDeleteToken: <ThrowOnError extends boolean = false>(options: Options<ApiTokenControllerDeleteTokenData, ThrowOnError>) => RequestResult<ApiTokenControllerDeleteTokenResponses, ApiTokenControllerDeleteTokenErrors, ThrowOnError, "fields">;
|
|
805
759
|
declare const apiTokenControllerGetToken: <ThrowOnError extends boolean = false>(options: Options<ApiTokenControllerGetTokenData, ThrowOnError>) => RequestResult<ApiTokenControllerGetTokenResponses, ApiTokenControllerGetTokenErrors, ThrowOnError, "fields">;
|
|
806
760
|
declare const apiTokenControllerUpdateToken: <ThrowOnError extends boolean = false>(options: Options<ApiTokenControllerUpdateTokenData, ThrowOnError>) => RequestResult<ApiTokenControllerUpdateTokenResponses, ApiTokenControllerUpdateTokenErrors, ThrowOnError, "fields">;
|
|
807
|
-
declare const quotesControllerCreateQuote: <ThrowOnError extends boolean = false>(options: Options<QuotesControllerCreateQuoteData, ThrowOnError>) => RequestResult<QuotesControllerCreateQuoteResponses, QuotesControllerCreateQuoteErrors, ThrowOnError, "fields">;
|
|
808
|
-
declare const quotesControllerGetQuote: <ThrowOnError extends boolean = false>(options: Options<QuotesControllerGetQuoteData, ThrowOnError>) => RequestResult<QuotesControllerGetQuoteResponses, QuotesControllerGetQuoteErrors, ThrowOnError, "fields">;
|
|
809
761
|
declare const missionsControllerCreateMissions: <ThrowOnError extends boolean = false>(options: Options<MissionsControllerCreateMissionsData, ThrowOnError>) => RequestResult<MissionsControllerCreateMissionsResponses, MissionsControllerCreateMissionsErrors, ThrowOnError, "fields">;
|
|
810
762
|
declare const missionsControllerUpdateMissions: <ThrowOnError extends boolean = false>(options: Options<MissionsControllerUpdateMissionsData, ThrowOnError>) => RequestResult<MissionsControllerUpdateMissionsResponses, unknown, ThrowOnError, "fields">;
|
|
811
763
|
declare const missionsControllerClaimRewards: <ThrowOnError extends boolean = false>(options: Options<MissionsControllerClaimRewardsData, ThrowOnError>) => RequestResult<MissionsControllerClaimRewardsResponses, MissionsControllerClaimRewardsErrors, ThrowOnError, "fields">;
|
|
@@ -894,57 +846,62 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
894
846
|
event_type: z.ZodLiteral<"protocol.mission.created">;
|
|
895
847
|
timestamp: z.ZodAny;
|
|
896
848
|
data: z.ZodObject<{
|
|
897
|
-
|
|
898
|
-
vaultId: z.
|
|
899
|
-
amount: z.
|
|
849
|
+
id: z.ZodNumber;
|
|
850
|
+
vaultId: z.ZodNumber;
|
|
851
|
+
amount: z.ZodNumber;
|
|
900
852
|
zoneId: z.ZodString;
|
|
901
853
|
flightPlanId: z.ZodNumber;
|
|
902
854
|
captureStartTime: z.ZodString;
|
|
903
855
|
captureEndTime: z.ZodString;
|
|
904
856
|
detailsHash: z.ZodString;
|
|
857
|
+
requestor: z.ZodString;
|
|
905
858
|
}, "strict", z.ZodTypeAny, {
|
|
906
|
-
|
|
907
|
-
vaultId:
|
|
908
|
-
amount:
|
|
859
|
+
id: number;
|
|
860
|
+
vaultId: number;
|
|
861
|
+
amount: number;
|
|
909
862
|
zoneId: string;
|
|
910
863
|
flightPlanId: number;
|
|
911
864
|
captureStartTime: string;
|
|
912
865
|
captureEndTime: string;
|
|
913
866
|
detailsHash: string;
|
|
867
|
+
requestor: string;
|
|
914
868
|
}, {
|
|
915
|
-
|
|
916
|
-
vaultId:
|
|
917
|
-
amount:
|
|
869
|
+
id: number;
|
|
870
|
+
vaultId: number;
|
|
871
|
+
amount: number;
|
|
918
872
|
zoneId: string;
|
|
919
873
|
flightPlanId: number;
|
|
920
874
|
captureStartTime: string;
|
|
921
875
|
captureEndTime: string;
|
|
922
876
|
detailsHash: string;
|
|
877
|
+
requestor: string;
|
|
923
878
|
}>;
|
|
924
879
|
}, "strict", z.ZodTypeAny, {
|
|
925
880
|
data: {
|
|
926
|
-
|
|
927
|
-
vaultId:
|
|
928
|
-
amount:
|
|
881
|
+
id: number;
|
|
882
|
+
vaultId: number;
|
|
883
|
+
amount: number;
|
|
929
884
|
zoneId: string;
|
|
930
885
|
flightPlanId: number;
|
|
931
886
|
captureStartTime: string;
|
|
932
887
|
captureEndTime: string;
|
|
933
888
|
detailsHash: string;
|
|
889
|
+
requestor: string;
|
|
934
890
|
};
|
|
935
891
|
event_type: "protocol.mission.created";
|
|
936
892
|
id?: any;
|
|
937
893
|
timestamp?: any;
|
|
938
894
|
}, {
|
|
939
895
|
data: {
|
|
940
|
-
|
|
941
|
-
vaultId:
|
|
942
|
-
amount:
|
|
896
|
+
id: number;
|
|
897
|
+
vaultId: number;
|
|
898
|
+
amount: number;
|
|
943
899
|
zoneId: string;
|
|
944
900
|
flightPlanId: number;
|
|
945
901
|
captureStartTime: string;
|
|
946
902
|
captureEndTime: string;
|
|
947
903
|
detailsHash: string;
|
|
904
|
+
requestor: string;
|
|
948
905
|
};
|
|
949
906
|
event_type: "protocol.mission.created";
|
|
950
907
|
id?: any;
|
|
@@ -954,21 +911,21 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
954
911
|
event_type: z.ZodLiteral<"protocol.mission.updated">;
|
|
955
912
|
timestamp: z.ZodAny;
|
|
956
913
|
data: z.ZodObject<{
|
|
957
|
-
id: z.
|
|
914
|
+
id: z.ZodNumber;
|
|
958
915
|
amount: z.ZodOptional<z.ZodNumber>;
|
|
959
916
|
isOpen: z.ZodOptional<z.ZodBoolean>;
|
|
960
917
|
}, "strict", z.ZodTypeAny, {
|
|
961
|
-
id:
|
|
918
|
+
id: number;
|
|
962
919
|
amount?: number | undefined;
|
|
963
920
|
isOpen?: boolean | undefined;
|
|
964
921
|
}, {
|
|
965
|
-
id:
|
|
922
|
+
id: number;
|
|
966
923
|
amount?: number | undefined;
|
|
967
924
|
isOpen?: boolean | undefined;
|
|
968
925
|
}>;
|
|
969
926
|
}, "strict", z.ZodTypeAny, {
|
|
970
927
|
data: {
|
|
971
|
-
id:
|
|
928
|
+
id: number;
|
|
972
929
|
amount?: number | undefined;
|
|
973
930
|
isOpen?: boolean | undefined;
|
|
974
931
|
};
|
|
@@ -977,7 +934,7 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
977
934
|
timestamp?: any;
|
|
978
935
|
}, {
|
|
979
936
|
data: {
|
|
980
|
-
id:
|
|
937
|
+
id: number;
|
|
981
938
|
amount?: number | undefined;
|
|
982
939
|
isOpen?: boolean | undefined;
|
|
983
940
|
};
|
|
@@ -1066,21 +1023,22 @@ declare function parseWebhookEvent(req: Request$1, webhookSecret: string): {
|
|
|
1066
1023
|
timestamp?: any;
|
|
1067
1024
|
} | {
|
|
1068
1025
|
data: {
|
|
1069
|
-
|
|
1070
|
-
vaultId:
|
|
1071
|
-
amount:
|
|
1026
|
+
id: number;
|
|
1027
|
+
vaultId: number;
|
|
1028
|
+
amount: number;
|
|
1072
1029
|
zoneId: string;
|
|
1073
1030
|
flightPlanId: number;
|
|
1074
1031
|
captureStartTime: string;
|
|
1075
1032
|
captureEndTime: string;
|
|
1076
1033
|
detailsHash: string;
|
|
1034
|
+
requestor: string;
|
|
1077
1035
|
};
|
|
1078
1036
|
event_type: "protocol.mission.created";
|
|
1079
1037
|
id?: any;
|
|
1080
1038
|
timestamp?: any;
|
|
1081
1039
|
} | {
|
|
1082
1040
|
data: {
|
|
1083
|
-
id:
|
|
1041
|
+
id: number;
|
|
1084
1042
|
amount?: number | undefined;
|
|
1085
1043
|
isOpen?: boolean | undefined;
|
|
1086
1044
|
};
|
|
@@ -1100,4 +1058,4 @@ declare function parseWebhookEvent(req: Request$1, webhookSecret: string): {
|
|
|
1100
1058
|
timestamp?: any;
|
|
1101
1059
|
};
|
|
1102
1060
|
|
|
1103
|
-
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,
|
|
1061
|
+
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 FlightsControllerGenerateFlightIdData, type FlightsControllerGenerateFlightIdErrors, type FlightsControllerGenerateFlightIdResponse, type FlightsControllerGenerateFlightIdResponses, 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 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 ValidateFlightDto, 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, flightsControllerGenerateFlightId, 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.d.ts
CHANGED
|
@@ -8,22 +8,11 @@ type GetProvenanceCryptoKeyResponse = {
|
|
|
8
8
|
KeyUsage?: "ENCRYPT_DECRYPT" | "GENERATE_VERIFY_MAC" | "KEY_AGREEMENT" | "SIGN_VERIFY";
|
|
9
9
|
EncryptionAlgorithms?: Array<"RSAES_OAEP_SHA_1" | "RSAES_OAEP_SHA_256" | "SM2PKE" | "SYMMETRIC_DEFAULT">;
|
|
10
10
|
};
|
|
11
|
-
type
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
type DepositRewardsResponseDto = {
|
|
18
|
-
MessageId: string;
|
|
19
|
-
};
|
|
20
|
-
type DistributeRewardsRequestDto = {
|
|
21
|
-
amounts: {
|
|
22
|
-
[key: string]: number;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
type DistributeRewardsResponseDto = {
|
|
26
|
-
MessageId: string;
|
|
11
|
+
type CreateQuoteRequestDto = {
|
|
12
|
+
missionIds: Array<number>;
|
|
13
|
+
entitlementType: string;
|
|
14
|
+
buyer: string;
|
|
15
|
+
mintOnChain: boolean;
|
|
27
16
|
};
|
|
28
17
|
type CreateApiTokenResponseDto = {
|
|
29
18
|
id: string;
|
|
@@ -50,17 +39,11 @@ type UpdateApiTokenResponseDto = {
|
|
|
50
39
|
org: number;
|
|
51
40
|
scopes: Array<"manageTokens" | "manageFlights" | "manageWebhooks" | "all">;
|
|
52
41
|
};
|
|
53
|
-
type CreateQuoteRequestDto = {
|
|
54
|
-
missionIds: Array<number>;
|
|
55
|
-
entitlementType: string;
|
|
56
|
-
buyer: string;
|
|
57
|
-
mintOnChain: boolean;
|
|
58
|
-
};
|
|
59
42
|
type CreateMissionRequestDto = {
|
|
60
43
|
missions: Array<{
|
|
61
44
|
zoneId: string;
|
|
62
45
|
flightPlanId: number;
|
|
63
|
-
amount:
|
|
46
|
+
amount: bigint;
|
|
64
47
|
startTime: Date;
|
|
65
48
|
endTime: Date;
|
|
66
49
|
}>;
|
|
@@ -72,24 +55,23 @@ type CreateMissionResponseDto = {
|
|
|
72
55
|
success: boolean;
|
|
73
56
|
data: {
|
|
74
57
|
missions: Array<{
|
|
75
|
-
|
|
58
|
+
id: string;
|
|
76
59
|
vaultId: string;
|
|
77
|
-
amount:
|
|
60
|
+
amount: string;
|
|
78
61
|
zoneId: string;
|
|
79
62
|
flightPlanId: number;
|
|
80
63
|
captureStartTime: Date;
|
|
81
64
|
captureEndTime: Date;
|
|
82
65
|
requestor: string;
|
|
83
66
|
}>;
|
|
84
|
-
totalAmount: number;
|
|
85
67
|
} | string;
|
|
86
68
|
};
|
|
87
69
|
type UpdateMissionsRequestDto = {
|
|
88
70
|
missions: Array<{
|
|
89
|
-
id:
|
|
90
|
-
amount:
|
|
71
|
+
id: bigint;
|
|
72
|
+
amount: bigint;
|
|
91
73
|
} | {
|
|
92
|
-
id:
|
|
74
|
+
id: bigint;
|
|
93
75
|
isOpen: false;
|
|
94
76
|
}>;
|
|
95
77
|
};
|
|
@@ -238,34 +220,34 @@ type KeysControllerGetProvenanceCryptoKeyResponses = {
|
|
|
238
220
|
200: GetProvenanceCryptoKeyResponse;
|
|
239
221
|
};
|
|
240
222
|
type KeysControllerGetProvenanceCryptoKeyResponse = KeysControllerGetProvenanceCryptoKeyResponses[keyof KeysControllerGetProvenanceCryptoKeyResponses];
|
|
241
|
-
type
|
|
242
|
-
body:
|
|
223
|
+
type QuotesControllerCreateQuoteData = {
|
|
224
|
+
body: CreateQuoteRequestDto;
|
|
243
225
|
path?: never;
|
|
244
226
|
query?: never;
|
|
245
|
-
url: "/
|
|
227
|
+
url: "/quotes";
|
|
246
228
|
};
|
|
247
|
-
type
|
|
229
|
+
type QuotesControllerCreateQuoteErrors = {
|
|
248
230
|
401: unknown;
|
|
249
231
|
403: unknown;
|
|
250
232
|
};
|
|
251
|
-
type
|
|
252
|
-
|
|
233
|
+
type QuotesControllerCreateQuoteResponses = {
|
|
234
|
+
201: unknown;
|
|
253
235
|
};
|
|
254
|
-
type
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
236
|
+
type QuotesControllerGetQuoteData = {
|
|
237
|
+
body?: never;
|
|
238
|
+
path: {
|
|
239
|
+
id: string;
|
|
240
|
+
};
|
|
258
241
|
query?: never;
|
|
259
|
-
url: "/
|
|
242
|
+
url: "/quotes/{id}";
|
|
260
243
|
};
|
|
261
|
-
type
|
|
244
|
+
type QuotesControllerGetQuoteErrors = {
|
|
262
245
|
401: unknown;
|
|
263
246
|
403: unknown;
|
|
264
247
|
};
|
|
265
|
-
type
|
|
266
|
-
200:
|
|
248
|
+
type QuotesControllerGetQuoteResponses = {
|
|
249
|
+
200: unknown;
|
|
267
250
|
};
|
|
268
|
-
type RewardsControllerDistributeRewardsResponse = RewardsControllerDistributeRewardsResponses[keyof RewardsControllerDistributeRewardsResponses];
|
|
269
251
|
type ApiTokenControllerCreateTokenData = {
|
|
270
252
|
body: CreateApiTokenRequestDto;
|
|
271
253
|
path?: never;
|
|
@@ -327,34 +309,6 @@ type ApiTokenControllerUpdateTokenResponses = {
|
|
|
327
309
|
200: UpdateApiTokenResponseDto;
|
|
328
310
|
};
|
|
329
311
|
type ApiTokenControllerUpdateTokenResponse = ApiTokenControllerUpdateTokenResponses[keyof ApiTokenControllerUpdateTokenResponses];
|
|
330
|
-
type QuotesControllerCreateQuoteData = {
|
|
331
|
-
body: CreateQuoteRequestDto;
|
|
332
|
-
path?: never;
|
|
333
|
-
query?: never;
|
|
334
|
-
url: "/quotes";
|
|
335
|
-
};
|
|
336
|
-
type QuotesControllerCreateQuoteErrors = {
|
|
337
|
-
401: unknown;
|
|
338
|
-
403: unknown;
|
|
339
|
-
};
|
|
340
|
-
type QuotesControllerCreateQuoteResponses = {
|
|
341
|
-
201: unknown;
|
|
342
|
-
};
|
|
343
|
-
type QuotesControllerGetQuoteData = {
|
|
344
|
-
body?: never;
|
|
345
|
-
path: {
|
|
346
|
-
id: string;
|
|
347
|
-
};
|
|
348
|
-
query?: never;
|
|
349
|
-
url: "/quotes/{id}";
|
|
350
|
-
};
|
|
351
|
-
type QuotesControllerGetQuoteErrors = {
|
|
352
|
-
401: unknown;
|
|
353
|
-
403: unknown;
|
|
354
|
-
};
|
|
355
|
-
type QuotesControllerGetQuoteResponses = {
|
|
356
|
-
200: unknown;
|
|
357
|
-
};
|
|
358
312
|
type MissionsControllerCreateMissionsData = {
|
|
359
313
|
body: CreateMissionRequestDto;
|
|
360
314
|
path?: never;
|
|
@@ -798,14 +752,12 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
|
|
|
798
752
|
};
|
|
799
753
|
declare const appControllerGetHello: <ThrowOnError extends boolean = false>(options?: Options<AppControllerGetHelloData, ThrowOnError>) => RequestResult<AppControllerGetHelloResponses, unknown, ThrowOnError, "fields">;
|
|
800
754
|
declare const keysControllerGetProvenanceCryptoKey: <ThrowOnError extends boolean = false>(options?: Options<KeysControllerGetProvenanceCryptoKeyData, ThrowOnError>) => RequestResult<KeysControllerGetProvenanceCryptoKeyResponses, unknown, ThrowOnError, "fields">;
|
|
801
|
-
declare const
|
|
802
|
-
declare const
|
|
755
|
+
declare const quotesControllerCreateQuote: <ThrowOnError extends boolean = false>(options: Options<QuotesControllerCreateQuoteData, ThrowOnError>) => RequestResult<QuotesControllerCreateQuoteResponses, QuotesControllerCreateQuoteErrors, ThrowOnError, "fields">;
|
|
756
|
+
declare const quotesControllerGetQuote: <ThrowOnError extends boolean = false>(options: Options<QuotesControllerGetQuoteData, ThrowOnError>) => RequestResult<QuotesControllerGetQuoteResponses, QuotesControllerGetQuoteErrors, ThrowOnError, "fields">;
|
|
803
757
|
declare const apiTokenControllerCreateToken: <ThrowOnError extends boolean = false>(options: Options<ApiTokenControllerCreateTokenData, ThrowOnError>) => RequestResult<ApiTokenControllerCreateTokenResponses, ApiTokenControllerCreateTokenErrors, ThrowOnError, "fields">;
|
|
804
758
|
declare const apiTokenControllerDeleteToken: <ThrowOnError extends boolean = false>(options: Options<ApiTokenControllerDeleteTokenData, ThrowOnError>) => RequestResult<ApiTokenControllerDeleteTokenResponses, ApiTokenControllerDeleteTokenErrors, ThrowOnError, "fields">;
|
|
805
759
|
declare const apiTokenControllerGetToken: <ThrowOnError extends boolean = false>(options: Options<ApiTokenControllerGetTokenData, ThrowOnError>) => RequestResult<ApiTokenControllerGetTokenResponses, ApiTokenControllerGetTokenErrors, ThrowOnError, "fields">;
|
|
806
760
|
declare const apiTokenControllerUpdateToken: <ThrowOnError extends boolean = false>(options: Options<ApiTokenControllerUpdateTokenData, ThrowOnError>) => RequestResult<ApiTokenControllerUpdateTokenResponses, ApiTokenControllerUpdateTokenErrors, ThrowOnError, "fields">;
|
|
807
|
-
declare const quotesControllerCreateQuote: <ThrowOnError extends boolean = false>(options: Options<QuotesControllerCreateQuoteData, ThrowOnError>) => RequestResult<QuotesControllerCreateQuoteResponses, QuotesControllerCreateQuoteErrors, ThrowOnError, "fields">;
|
|
808
|
-
declare const quotesControllerGetQuote: <ThrowOnError extends boolean = false>(options: Options<QuotesControllerGetQuoteData, ThrowOnError>) => RequestResult<QuotesControllerGetQuoteResponses, QuotesControllerGetQuoteErrors, ThrowOnError, "fields">;
|
|
809
761
|
declare const missionsControllerCreateMissions: <ThrowOnError extends boolean = false>(options: Options<MissionsControllerCreateMissionsData, ThrowOnError>) => RequestResult<MissionsControllerCreateMissionsResponses, MissionsControllerCreateMissionsErrors, ThrowOnError, "fields">;
|
|
810
762
|
declare const missionsControllerUpdateMissions: <ThrowOnError extends boolean = false>(options: Options<MissionsControllerUpdateMissionsData, ThrowOnError>) => RequestResult<MissionsControllerUpdateMissionsResponses, unknown, ThrowOnError, "fields">;
|
|
811
763
|
declare const missionsControllerClaimRewards: <ThrowOnError extends boolean = false>(options: Options<MissionsControllerClaimRewardsData, ThrowOnError>) => RequestResult<MissionsControllerClaimRewardsResponses, MissionsControllerClaimRewardsErrors, ThrowOnError, "fields">;
|
|
@@ -894,57 +846,62 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
894
846
|
event_type: z.ZodLiteral<"protocol.mission.created">;
|
|
895
847
|
timestamp: z.ZodAny;
|
|
896
848
|
data: z.ZodObject<{
|
|
897
|
-
|
|
898
|
-
vaultId: z.
|
|
899
|
-
amount: z.
|
|
849
|
+
id: z.ZodNumber;
|
|
850
|
+
vaultId: z.ZodNumber;
|
|
851
|
+
amount: z.ZodNumber;
|
|
900
852
|
zoneId: z.ZodString;
|
|
901
853
|
flightPlanId: z.ZodNumber;
|
|
902
854
|
captureStartTime: z.ZodString;
|
|
903
855
|
captureEndTime: z.ZodString;
|
|
904
856
|
detailsHash: z.ZodString;
|
|
857
|
+
requestor: z.ZodString;
|
|
905
858
|
}, "strict", z.ZodTypeAny, {
|
|
906
|
-
|
|
907
|
-
vaultId:
|
|
908
|
-
amount:
|
|
859
|
+
id: number;
|
|
860
|
+
vaultId: number;
|
|
861
|
+
amount: number;
|
|
909
862
|
zoneId: string;
|
|
910
863
|
flightPlanId: number;
|
|
911
864
|
captureStartTime: string;
|
|
912
865
|
captureEndTime: string;
|
|
913
866
|
detailsHash: string;
|
|
867
|
+
requestor: string;
|
|
914
868
|
}, {
|
|
915
|
-
|
|
916
|
-
vaultId:
|
|
917
|
-
amount:
|
|
869
|
+
id: number;
|
|
870
|
+
vaultId: number;
|
|
871
|
+
amount: number;
|
|
918
872
|
zoneId: string;
|
|
919
873
|
flightPlanId: number;
|
|
920
874
|
captureStartTime: string;
|
|
921
875
|
captureEndTime: string;
|
|
922
876
|
detailsHash: string;
|
|
877
|
+
requestor: string;
|
|
923
878
|
}>;
|
|
924
879
|
}, "strict", z.ZodTypeAny, {
|
|
925
880
|
data: {
|
|
926
|
-
|
|
927
|
-
vaultId:
|
|
928
|
-
amount:
|
|
881
|
+
id: number;
|
|
882
|
+
vaultId: number;
|
|
883
|
+
amount: number;
|
|
929
884
|
zoneId: string;
|
|
930
885
|
flightPlanId: number;
|
|
931
886
|
captureStartTime: string;
|
|
932
887
|
captureEndTime: string;
|
|
933
888
|
detailsHash: string;
|
|
889
|
+
requestor: string;
|
|
934
890
|
};
|
|
935
891
|
event_type: "protocol.mission.created";
|
|
936
892
|
id?: any;
|
|
937
893
|
timestamp?: any;
|
|
938
894
|
}, {
|
|
939
895
|
data: {
|
|
940
|
-
|
|
941
|
-
vaultId:
|
|
942
|
-
amount:
|
|
896
|
+
id: number;
|
|
897
|
+
vaultId: number;
|
|
898
|
+
amount: number;
|
|
943
899
|
zoneId: string;
|
|
944
900
|
flightPlanId: number;
|
|
945
901
|
captureStartTime: string;
|
|
946
902
|
captureEndTime: string;
|
|
947
903
|
detailsHash: string;
|
|
904
|
+
requestor: string;
|
|
948
905
|
};
|
|
949
906
|
event_type: "protocol.mission.created";
|
|
950
907
|
id?: any;
|
|
@@ -954,21 +911,21 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
954
911
|
event_type: z.ZodLiteral<"protocol.mission.updated">;
|
|
955
912
|
timestamp: z.ZodAny;
|
|
956
913
|
data: z.ZodObject<{
|
|
957
|
-
id: z.
|
|
914
|
+
id: z.ZodNumber;
|
|
958
915
|
amount: z.ZodOptional<z.ZodNumber>;
|
|
959
916
|
isOpen: z.ZodOptional<z.ZodBoolean>;
|
|
960
917
|
}, "strict", z.ZodTypeAny, {
|
|
961
|
-
id:
|
|
918
|
+
id: number;
|
|
962
919
|
amount?: number | undefined;
|
|
963
920
|
isOpen?: boolean | undefined;
|
|
964
921
|
}, {
|
|
965
|
-
id:
|
|
922
|
+
id: number;
|
|
966
923
|
amount?: number | undefined;
|
|
967
924
|
isOpen?: boolean | undefined;
|
|
968
925
|
}>;
|
|
969
926
|
}, "strict", z.ZodTypeAny, {
|
|
970
927
|
data: {
|
|
971
|
-
id:
|
|
928
|
+
id: number;
|
|
972
929
|
amount?: number | undefined;
|
|
973
930
|
isOpen?: boolean | undefined;
|
|
974
931
|
};
|
|
@@ -977,7 +934,7 @@ declare const Event: z.ZodUnion<[z.ZodObject<{
|
|
|
977
934
|
timestamp?: any;
|
|
978
935
|
}, {
|
|
979
936
|
data: {
|
|
980
|
-
id:
|
|
937
|
+
id: number;
|
|
981
938
|
amount?: number | undefined;
|
|
982
939
|
isOpen?: boolean | undefined;
|
|
983
940
|
};
|
|
@@ -1066,21 +1023,22 @@ declare function parseWebhookEvent(req: Request$1, webhookSecret: string): {
|
|
|
1066
1023
|
timestamp?: any;
|
|
1067
1024
|
} | {
|
|
1068
1025
|
data: {
|
|
1069
|
-
|
|
1070
|
-
vaultId:
|
|
1071
|
-
amount:
|
|
1026
|
+
id: number;
|
|
1027
|
+
vaultId: number;
|
|
1028
|
+
amount: number;
|
|
1072
1029
|
zoneId: string;
|
|
1073
1030
|
flightPlanId: number;
|
|
1074
1031
|
captureStartTime: string;
|
|
1075
1032
|
captureEndTime: string;
|
|
1076
1033
|
detailsHash: string;
|
|
1034
|
+
requestor: string;
|
|
1077
1035
|
};
|
|
1078
1036
|
event_type: "protocol.mission.created";
|
|
1079
1037
|
id?: any;
|
|
1080
1038
|
timestamp?: any;
|
|
1081
1039
|
} | {
|
|
1082
1040
|
data: {
|
|
1083
|
-
id:
|
|
1041
|
+
id: number;
|
|
1084
1042
|
amount?: number | undefined;
|
|
1085
1043
|
isOpen?: boolean | undefined;
|
|
1086
1044
|
};
|
|
@@ -1100,4 +1058,4 @@ declare function parseWebhookEvent(req: Request$1, webhookSecret: string): {
|
|
|
1100
1058
|
timestamp?: any;
|
|
1101
1059
|
};
|
|
1102
1060
|
|
|
1103
|
-
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,
|
|
1061
|
+
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 FlightsControllerGenerateFlightIdData, type FlightsControllerGenerateFlightIdErrors, type FlightsControllerGenerateFlightIdResponse, type FlightsControllerGenerateFlightIdResponses, 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 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 ValidateFlightDto, 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, flightsControllerGenerateFlightId, 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
|
@@ -45,8 +45,6 @@ __export(index_exports, {
|
|
|
45
45
|
parseWebhookEvent: () => parseWebhookEvent,
|
|
46
46
|
quotesControllerCreateQuote: () => quotesControllerCreateQuote,
|
|
47
47
|
quotesControllerGetQuote: () => quotesControllerGetQuote,
|
|
48
|
-
rewardsControllerDepositRewards: () => rewardsControllerDepositRewards,
|
|
49
|
-
rewardsControllerDistributeRewards: () => rewardsControllerDistributeRewards,
|
|
50
48
|
schemaControllerGetEventSchema: () => schemaControllerGetEventSchema,
|
|
51
49
|
urlSearchParamsBodySerializer: () => urlSearchParamsBodySerializer,
|
|
52
50
|
webhooksControllerCreate: () => webhooksControllerCreate,
|
|
@@ -783,7 +781,7 @@ var keysControllerGetProvenanceCryptoKey = /* @__PURE__ */ __name((options) => {
|
|
|
783
781
|
...options
|
|
784
782
|
});
|
|
785
783
|
}, "keysControllerGetProvenanceCryptoKey");
|
|
786
|
-
var
|
|
784
|
+
var quotesControllerCreateQuote = /* @__PURE__ */ __name((options) => {
|
|
787
785
|
return (options.client ?? client).post({
|
|
788
786
|
security: [
|
|
789
787
|
{
|
|
@@ -791,30 +789,26 @@ var rewardsControllerDepositRewards = /* @__PURE__ */ __name((options) => {
|
|
|
791
789
|
type: "apiKey"
|
|
792
790
|
}
|
|
793
791
|
],
|
|
794
|
-
url: "/
|
|
792
|
+
url: "/quotes",
|
|
795
793
|
...options,
|
|
796
794
|
headers: {
|
|
797
795
|
"Content-Type": "application/json",
|
|
798
796
|
...options.headers
|
|
799
797
|
}
|
|
800
798
|
});
|
|
801
|
-
}, "
|
|
802
|
-
var
|
|
803
|
-
return (options.client ?? client).
|
|
799
|
+
}, "quotesControllerCreateQuote");
|
|
800
|
+
var quotesControllerGetQuote = /* @__PURE__ */ __name((options) => {
|
|
801
|
+
return (options.client ?? client).get({
|
|
804
802
|
security: [
|
|
805
803
|
{
|
|
806
804
|
name: "x-api-token",
|
|
807
805
|
type: "apiKey"
|
|
808
806
|
}
|
|
809
807
|
],
|
|
810
|
-
url: "/
|
|
811
|
-
...options
|
|
812
|
-
headers: {
|
|
813
|
-
"Content-Type": "application/json",
|
|
814
|
-
...options.headers
|
|
815
|
-
}
|
|
808
|
+
url: "/quotes/{id}",
|
|
809
|
+
...options
|
|
816
810
|
});
|
|
817
|
-
}, "
|
|
811
|
+
}, "quotesControllerGetQuote");
|
|
818
812
|
var apiTokenControllerCreateToken = /* @__PURE__ */ __name((options) => {
|
|
819
813
|
return (options.client ?? client).post({
|
|
820
814
|
security: [
|
|
@@ -872,34 +866,6 @@ var apiTokenControllerUpdateToken = /* @__PURE__ */ __name((options) => {
|
|
|
872
866
|
}
|
|
873
867
|
});
|
|
874
868
|
}, "apiTokenControllerUpdateToken");
|
|
875
|
-
var quotesControllerCreateQuote = /* @__PURE__ */ __name((options) => {
|
|
876
|
-
return (options.client ?? client).post({
|
|
877
|
-
security: [
|
|
878
|
-
{
|
|
879
|
-
name: "x-api-token",
|
|
880
|
-
type: "apiKey"
|
|
881
|
-
}
|
|
882
|
-
],
|
|
883
|
-
url: "/quotes",
|
|
884
|
-
...options,
|
|
885
|
-
headers: {
|
|
886
|
-
"Content-Type": "application/json",
|
|
887
|
-
...options.headers
|
|
888
|
-
}
|
|
889
|
-
});
|
|
890
|
-
}, "quotesControllerCreateQuote");
|
|
891
|
-
var quotesControllerGetQuote = /* @__PURE__ */ __name((options) => {
|
|
892
|
-
return (options.client ?? client).get({
|
|
893
|
-
security: [
|
|
894
|
-
{
|
|
895
|
-
name: "x-api-token",
|
|
896
|
-
type: "apiKey"
|
|
897
|
-
}
|
|
898
|
-
],
|
|
899
|
-
url: "/quotes/{id}",
|
|
900
|
-
...options
|
|
901
|
-
});
|
|
902
|
-
}, "quotesControllerGetQuote");
|
|
903
869
|
var missionsControllerCreateMissions = /* @__PURE__ */ __name((options) => {
|
|
904
870
|
return (options.client ?? client).post({
|
|
905
871
|
url: "/missions",
|
|
@@ -1131,14 +1097,19 @@ var Event = import_zod.z.union([
|
|
|
1131
1097
|
event_type: import_zod.z.literal("protocol.mission.created"),
|
|
1132
1098
|
timestamp: import_zod.z.any(),
|
|
1133
1099
|
data: import_zod.z.object({
|
|
1134
|
-
|
|
1135
|
-
vaultId: import_zod.z.
|
|
1136
|
-
amount: import_zod.z.
|
|
1100
|
+
id: import_zod.z.number().int(),
|
|
1101
|
+
vaultId: import_zod.z.number().int(),
|
|
1102
|
+
amount: import_zod.z.number().int(),
|
|
1137
1103
|
zoneId: import_zod.z.string(),
|
|
1138
1104
|
flightPlanId: import_zod.z.number(),
|
|
1139
|
-
captureStartTime: import_zod.z.string()
|
|
1140
|
-
|
|
1141
|
-
|
|
1105
|
+
captureStartTime: import_zod.z.string().datetime({
|
|
1106
|
+
offset: true
|
|
1107
|
+
}),
|
|
1108
|
+
captureEndTime: import_zod.z.string().datetime({
|
|
1109
|
+
offset: true
|
|
1110
|
+
}),
|
|
1111
|
+
detailsHash: import_zod.z.string(),
|
|
1112
|
+
requestor: import_zod.z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$"))
|
|
1142
1113
|
}).strict()
|
|
1143
1114
|
}).strict(),
|
|
1144
1115
|
import_zod.z.object({
|
|
@@ -1146,8 +1117,8 @@ var Event = import_zod.z.union([
|
|
|
1146
1117
|
event_type: import_zod.z.literal("protocol.mission.updated"),
|
|
1147
1118
|
timestamp: import_zod.z.any(),
|
|
1148
1119
|
data: import_zod.z.object({
|
|
1149
|
-
id: import_zod.z.
|
|
1150
|
-
amount: import_zod.z.number().optional(),
|
|
1120
|
+
id: import_zod.z.number().int(),
|
|
1121
|
+
amount: import_zod.z.number().int().optional(),
|
|
1151
1122
|
isOpen: import_zod.z.boolean().optional()
|
|
1152
1123
|
}).strict()
|
|
1153
1124
|
}).strict(),
|
|
@@ -1215,8 +1186,6 @@ __name(getSecretHeader, "getSecretHeader");
|
|
|
1215
1186
|
parseWebhookEvent,
|
|
1216
1187
|
quotesControllerCreateQuote,
|
|
1217
1188
|
quotesControllerGetQuote,
|
|
1218
|
-
rewardsControllerDepositRewards,
|
|
1219
|
-
rewardsControllerDistributeRewards,
|
|
1220
1189
|
schemaControllerGetEventSchema,
|
|
1221
1190
|
urlSearchParamsBodySerializer,
|
|
1222
1191
|
webhooksControllerCreate,
|
package/dist/index.mjs
CHANGED
|
@@ -724,7 +724,7 @@ var keysControllerGetProvenanceCryptoKey = /* @__PURE__ */ __name((options) => {
|
|
|
724
724
|
...options
|
|
725
725
|
});
|
|
726
726
|
}, "keysControllerGetProvenanceCryptoKey");
|
|
727
|
-
var
|
|
727
|
+
var quotesControllerCreateQuote = /* @__PURE__ */ __name((options) => {
|
|
728
728
|
return (options.client ?? client).post({
|
|
729
729
|
security: [
|
|
730
730
|
{
|
|
@@ -732,30 +732,26 @@ var rewardsControllerDepositRewards = /* @__PURE__ */ __name((options) => {
|
|
|
732
732
|
type: "apiKey"
|
|
733
733
|
}
|
|
734
734
|
],
|
|
735
|
-
url: "/
|
|
735
|
+
url: "/quotes",
|
|
736
736
|
...options,
|
|
737
737
|
headers: {
|
|
738
738
|
"Content-Type": "application/json",
|
|
739
739
|
...options.headers
|
|
740
740
|
}
|
|
741
741
|
});
|
|
742
|
-
}, "
|
|
743
|
-
var
|
|
744
|
-
return (options.client ?? client).
|
|
742
|
+
}, "quotesControllerCreateQuote");
|
|
743
|
+
var quotesControllerGetQuote = /* @__PURE__ */ __name((options) => {
|
|
744
|
+
return (options.client ?? client).get({
|
|
745
745
|
security: [
|
|
746
746
|
{
|
|
747
747
|
name: "x-api-token",
|
|
748
748
|
type: "apiKey"
|
|
749
749
|
}
|
|
750
750
|
],
|
|
751
|
-
url: "/
|
|
752
|
-
...options
|
|
753
|
-
headers: {
|
|
754
|
-
"Content-Type": "application/json",
|
|
755
|
-
...options.headers
|
|
756
|
-
}
|
|
751
|
+
url: "/quotes/{id}",
|
|
752
|
+
...options
|
|
757
753
|
});
|
|
758
|
-
}, "
|
|
754
|
+
}, "quotesControllerGetQuote");
|
|
759
755
|
var apiTokenControllerCreateToken = /* @__PURE__ */ __name((options) => {
|
|
760
756
|
return (options.client ?? client).post({
|
|
761
757
|
security: [
|
|
@@ -813,34 +809,6 @@ var apiTokenControllerUpdateToken = /* @__PURE__ */ __name((options) => {
|
|
|
813
809
|
}
|
|
814
810
|
});
|
|
815
811
|
}, "apiTokenControllerUpdateToken");
|
|
816
|
-
var quotesControllerCreateQuote = /* @__PURE__ */ __name((options) => {
|
|
817
|
-
return (options.client ?? client).post({
|
|
818
|
-
security: [
|
|
819
|
-
{
|
|
820
|
-
name: "x-api-token",
|
|
821
|
-
type: "apiKey"
|
|
822
|
-
}
|
|
823
|
-
],
|
|
824
|
-
url: "/quotes",
|
|
825
|
-
...options,
|
|
826
|
-
headers: {
|
|
827
|
-
"Content-Type": "application/json",
|
|
828
|
-
...options.headers
|
|
829
|
-
}
|
|
830
|
-
});
|
|
831
|
-
}, "quotesControllerCreateQuote");
|
|
832
|
-
var quotesControllerGetQuote = /* @__PURE__ */ __name((options) => {
|
|
833
|
-
return (options.client ?? client).get({
|
|
834
|
-
security: [
|
|
835
|
-
{
|
|
836
|
-
name: "x-api-token",
|
|
837
|
-
type: "apiKey"
|
|
838
|
-
}
|
|
839
|
-
],
|
|
840
|
-
url: "/quotes/{id}",
|
|
841
|
-
...options
|
|
842
|
-
});
|
|
843
|
-
}, "quotesControllerGetQuote");
|
|
844
812
|
var missionsControllerCreateMissions = /* @__PURE__ */ __name((options) => {
|
|
845
813
|
return (options.client ?? client).post({
|
|
846
814
|
url: "/missions",
|
|
@@ -1072,14 +1040,19 @@ var Event = z.union([
|
|
|
1072
1040
|
event_type: z.literal("protocol.mission.created"),
|
|
1073
1041
|
timestamp: z.any(),
|
|
1074
1042
|
data: z.object({
|
|
1075
|
-
|
|
1076
|
-
vaultId: z.
|
|
1077
|
-
amount: z.
|
|
1043
|
+
id: z.number().int(),
|
|
1044
|
+
vaultId: z.number().int(),
|
|
1045
|
+
amount: z.number().int(),
|
|
1078
1046
|
zoneId: z.string(),
|
|
1079
1047
|
flightPlanId: z.number(),
|
|
1080
|
-
captureStartTime: z.string()
|
|
1081
|
-
|
|
1082
|
-
|
|
1048
|
+
captureStartTime: z.string().datetime({
|
|
1049
|
+
offset: true
|
|
1050
|
+
}),
|
|
1051
|
+
captureEndTime: z.string().datetime({
|
|
1052
|
+
offset: true
|
|
1053
|
+
}),
|
|
1054
|
+
detailsHash: z.string(),
|
|
1055
|
+
requestor: z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$"))
|
|
1083
1056
|
}).strict()
|
|
1084
1057
|
}).strict(),
|
|
1085
1058
|
z.object({
|
|
@@ -1087,8 +1060,8 @@ var Event = z.union([
|
|
|
1087
1060
|
event_type: z.literal("protocol.mission.updated"),
|
|
1088
1061
|
timestamp: z.any(),
|
|
1089
1062
|
data: z.object({
|
|
1090
|
-
id: z.
|
|
1091
|
-
amount: z.number().optional(),
|
|
1063
|
+
id: z.number().int(),
|
|
1064
|
+
amount: z.number().int().optional(),
|
|
1092
1065
|
isOpen: z.boolean().optional()
|
|
1093
1066
|
}).strict()
|
|
1094
1067
|
}).strict(),
|
|
@@ -1155,8 +1128,6 @@ export {
|
|
|
1155
1128
|
parseWebhookEvent,
|
|
1156
1129
|
quotesControllerCreateQuote,
|
|
1157
1130
|
quotesControllerGetQuote,
|
|
1158
|
-
rewardsControllerDepositRewards,
|
|
1159
|
-
rewardsControllerDistributeRewards,
|
|
1160
1131
|
schemaControllerGetEventSchema,
|
|
1161
1132
|
urlSearchParamsBodySerializer,
|
|
1162
1133
|
webhooksControllerCreate,
|
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.0.
|
|
4
|
+
"version": "0.0.15",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@layer-drone/typescript-config": "0.0.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"zod": "^3.
|
|
33
|
+
"zod": "^3.x.x"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsup src/index.ts --format cjs,esm --dts",
|
package/src/client/sdk.gen.ts
CHANGED
|
@@ -54,12 +54,6 @@ import type {
|
|
|
54
54
|
QuotesControllerGetQuoteData,
|
|
55
55
|
QuotesControllerGetQuoteErrors,
|
|
56
56
|
QuotesControllerGetQuoteResponses,
|
|
57
|
-
RewardsControllerDepositRewardsData,
|
|
58
|
-
RewardsControllerDepositRewardsErrors,
|
|
59
|
-
RewardsControllerDepositRewardsResponses,
|
|
60
|
-
RewardsControllerDistributeRewardsData,
|
|
61
|
-
RewardsControllerDistributeRewardsErrors,
|
|
62
|
-
RewardsControllerDistributeRewardsResponses,
|
|
63
57
|
SchemaControllerGetEventSchemaData,
|
|
64
58
|
SchemaControllerGetEventSchemaResponses,
|
|
65
59
|
WebhooksControllerCreateData,
|
|
@@ -133,14 +127,14 @@ export const keysControllerGetProvenanceCryptoKey = <
|
|
|
133
127
|
});
|
|
134
128
|
};
|
|
135
129
|
|
|
136
|
-
export const
|
|
130
|
+
export const quotesControllerCreateQuote = <
|
|
137
131
|
ThrowOnError extends boolean = false,
|
|
138
132
|
>(
|
|
139
|
-
options: Options<
|
|
133
|
+
options: Options<QuotesControllerCreateQuoteData, ThrowOnError>,
|
|
140
134
|
) => {
|
|
141
135
|
return (options.client ?? _heyApiClient).post<
|
|
142
|
-
|
|
143
|
-
|
|
136
|
+
QuotesControllerCreateQuoteResponses,
|
|
137
|
+
QuotesControllerCreateQuoteErrors,
|
|
144
138
|
ThrowOnError
|
|
145
139
|
>({
|
|
146
140
|
security: [
|
|
@@ -149,7 +143,7 @@ export const rewardsControllerDepositRewards = <
|
|
|
149
143
|
type: "apiKey",
|
|
150
144
|
},
|
|
151
145
|
],
|
|
152
|
-
url: "/
|
|
146
|
+
url: "/quotes",
|
|
153
147
|
...options,
|
|
154
148
|
headers: {
|
|
155
149
|
"Content-Type": "application/json",
|
|
@@ -158,14 +152,12 @@ export const rewardsControllerDepositRewards = <
|
|
|
158
152
|
});
|
|
159
153
|
};
|
|
160
154
|
|
|
161
|
-
export const
|
|
162
|
-
|
|
163
|
-
>(
|
|
164
|
-
options: Options<RewardsControllerDistributeRewardsData, ThrowOnError>,
|
|
155
|
+
export const quotesControllerGetQuote = <ThrowOnError extends boolean = false>(
|
|
156
|
+
options: Options<QuotesControllerGetQuoteData, ThrowOnError>,
|
|
165
157
|
) => {
|
|
166
|
-
return (options.client ?? _heyApiClient).
|
|
167
|
-
|
|
168
|
-
|
|
158
|
+
return (options.client ?? _heyApiClient).get<
|
|
159
|
+
QuotesControllerGetQuoteResponses,
|
|
160
|
+
QuotesControllerGetQuoteErrors,
|
|
169
161
|
ThrowOnError
|
|
170
162
|
>({
|
|
171
163
|
security: [
|
|
@@ -174,12 +166,8 @@ export const rewardsControllerDistributeRewards = <
|
|
|
174
166
|
type: "apiKey",
|
|
175
167
|
},
|
|
176
168
|
],
|
|
177
|
-
url: "/
|
|
169
|
+
url: "/quotes/{id}",
|
|
178
170
|
...options,
|
|
179
|
-
headers: {
|
|
180
|
-
"Content-Type": "application/json",
|
|
181
|
-
...options.headers,
|
|
182
|
-
},
|
|
183
171
|
});
|
|
184
172
|
};
|
|
185
173
|
|
|
@@ -276,50 +264,6 @@ export const apiTokenControllerUpdateToken = <
|
|
|
276
264
|
});
|
|
277
265
|
};
|
|
278
266
|
|
|
279
|
-
export const quotesControllerCreateQuote = <
|
|
280
|
-
ThrowOnError extends boolean = false,
|
|
281
|
-
>(
|
|
282
|
-
options: Options<QuotesControllerCreateQuoteData, ThrowOnError>,
|
|
283
|
-
) => {
|
|
284
|
-
return (options.client ?? _heyApiClient).post<
|
|
285
|
-
QuotesControllerCreateQuoteResponses,
|
|
286
|
-
QuotesControllerCreateQuoteErrors,
|
|
287
|
-
ThrowOnError
|
|
288
|
-
>({
|
|
289
|
-
security: [
|
|
290
|
-
{
|
|
291
|
-
name: "x-api-token",
|
|
292
|
-
type: "apiKey",
|
|
293
|
-
},
|
|
294
|
-
],
|
|
295
|
-
url: "/quotes",
|
|
296
|
-
...options,
|
|
297
|
-
headers: {
|
|
298
|
-
"Content-Type": "application/json",
|
|
299
|
-
...options.headers,
|
|
300
|
-
},
|
|
301
|
-
});
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
export const quotesControllerGetQuote = <ThrowOnError extends boolean = false>(
|
|
305
|
-
options: Options<QuotesControllerGetQuoteData, ThrowOnError>,
|
|
306
|
-
) => {
|
|
307
|
-
return (options.client ?? _heyApiClient).get<
|
|
308
|
-
QuotesControllerGetQuoteResponses,
|
|
309
|
-
QuotesControllerGetQuoteErrors,
|
|
310
|
-
ThrowOnError
|
|
311
|
-
>({
|
|
312
|
-
security: [
|
|
313
|
-
{
|
|
314
|
-
name: "x-api-token",
|
|
315
|
-
type: "apiKey",
|
|
316
|
-
},
|
|
317
|
-
],
|
|
318
|
-
url: "/quotes/{id}",
|
|
319
|
-
...options,
|
|
320
|
-
});
|
|
321
|
-
};
|
|
322
|
-
|
|
323
267
|
/**
|
|
324
268
|
* Create new missions
|
|
325
269
|
* Create missions for specified zones and mission types.
|
package/src/client/types.gen.ts
CHANGED
|
@@ -27,28 +27,11 @@ export type GetProvenanceCryptoKeyResponse = {
|
|
|
27
27
|
>;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
export type
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
amount: bigint;
|
|
36
|
-
vaultId: number;
|
|
37
|
-
vaultManagerAddress?: string;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export type DepositRewardsResponseDto = {
|
|
41
|
-
MessageId: string;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export type DistributeRewardsRequestDto = {
|
|
45
|
-
amounts: {
|
|
46
|
-
[key: string]: number;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export type DistributeRewardsResponseDto = {
|
|
51
|
-
MessageId: string;
|
|
30
|
+
export type CreateQuoteRequestDto = {
|
|
31
|
+
missionIds: Array<number>;
|
|
32
|
+
entitlementType: string;
|
|
33
|
+
buyer: string;
|
|
34
|
+
mintOnChain: boolean;
|
|
52
35
|
};
|
|
53
36
|
|
|
54
37
|
export type CreateApiTokenResponseDto = {
|
|
@@ -80,18 +63,11 @@ export type UpdateApiTokenResponseDto = {
|
|
|
80
63
|
scopes: Array<"manageTokens" | "manageFlights" | "manageWebhooks" | "all">;
|
|
81
64
|
};
|
|
82
65
|
|
|
83
|
-
export type CreateQuoteRequestDto = {
|
|
84
|
-
missionIds: Array<number>;
|
|
85
|
-
entitlementType: string;
|
|
86
|
-
buyer: string;
|
|
87
|
-
mintOnChain: boolean;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
66
|
export type CreateMissionRequestDto = {
|
|
91
67
|
missions: Array<{
|
|
92
68
|
zoneId: string;
|
|
93
69
|
flightPlanId: number;
|
|
94
|
-
amount:
|
|
70
|
+
amount: bigint;
|
|
95
71
|
startTime: Date;
|
|
96
72
|
endTime: Date;
|
|
97
73
|
}>;
|
|
@@ -105,16 +81,15 @@ export type CreateMissionResponseDto = {
|
|
|
105
81
|
data:
|
|
106
82
|
| {
|
|
107
83
|
missions: Array<{
|
|
108
|
-
|
|
84
|
+
id: string;
|
|
109
85
|
vaultId: string;
|
|
110
|
-
amount:
|
|
86
|
+
amount: string;
|
|
111
87
|
zoneId: string;
|
|
112
88
|
flightPlanId: number;
|
|
113
89
|
captureStartTime: Date;
|
|
114
90
|
captureEndTime: Date;
|
|
115
91
|
requestor: string;
|
|
116
92
|
}>;
|
|
117
|
-
totalAmount: number;
|
|
118
93
|
}
|
|
119
94
|
| string;
|
|
120
95
|
};
|
|
@@ -122,11 +97,11 @@ export type CreateMissionResponseDto = {
|
|
|
122
97
|
export type UpdateMissionsRequestDto = {
|
|
123
98
|
missions: Array<
|
|
124
99
|
| {
|
|
125
|
-
id:
|
|
126
|
-
amount:
|
|
100
|
+
id: bigint;
|
|
101
|
+
amount: bigint;
|
|
127
102
|
}
|
|
128
103
|
| {
|
|
129
|
-
id:
|
|
104
|
+
id: bigint;
|
|
130
105
|
isOpen: false;
|
|
131
106
|
}
|
|
132
107
|
>;
|
|
@@ -339,44 +314,40 @@ export type KeysControllerGetProvenanceCryptoKeyResponses = {
|
|
|
339
314
|
export type KeysControllerGetProvenanceCryptoKeyResponse =
|
|
340
315
|
KeysControllerGetProvenanceCryptoKeyResponses[keyof KeysControllerGetProvenanceCryptoKeyResponses];
|
|
341
316
|
|
|
342
|
-
export type
|
|
343
|
-
body:
|
|
317
|
+
export type QuotesControllerCreateQuoteData = {
|
|
318
|
+
body: CreateQuoteRequestDto;
|
|
344
319
|
path?: never;
|
|
345
320
|
query?: never;
|
|
346
|
-
url: "/
|
|
321
|
+
url: "/quotes";
|
|
347
322
|
};
|
|
348
323
|
|
|
349
|
-
export type
|
|
324
|
+
export type QuotesControllerCreateQuoteErrors = {
|
|
350
325
|
401: unknown;
|
|
351
326
|
403: unknown;
|
|
352
327
|
};
|
|
353
328
|
|
|
354
|
-
export type
|
|
355
|
-
|
|
329
|
+
export type QuotesControllerCreateQuoteResponses = {
|
|
330
|
+
201: unknown;
|
|
356
331
|
};
|
|
357
332
|
|
|
358
|
-
export type
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
path?: never;
|
|
333
|
+
export type QuotesControllerGetQuoteData = {
|
|
334
|
+
body?: never;
|
|
335
|
+
path: {
|
|
336
|
+
id: string;
|
|
337
|
+
};
|
|
364
338
|
query?: never;
|
|
365
|
-
url: "/
|
|
339
|
+
url: "/quotes/{id}";
|
|
366
340
|
};
|
|
367
341
|
|
|
368
|
-
export type
|
|
342
|
+
export type QuotesControllerGetQuoteErrors = {
|
|
369
343
|
401: unknown;
|
|
370
344
|
403: unknown;
|
|
371
345
|
};
|
|
372
346
|
|
|
373
|
-
export type
|
|
374
|
-
200:
|
|
347
|
+
export type QuotesControllerGetQuoteResponses = {
|
|
348
|
+
200: unknown;
|
|
375
349
|
};
|
|
376
350
|
|
|
377
|
-
export type RewardsControllerDistributeRewardsResponse =
|
|
378
|
-
RewardsControllerDistributeRewardsResponses[keyof RewardsControllerDistributeRewardsResponses];
|
|
379
|
-
|
|
380
351
|
export type ApiTokenControllerCreateTokenData = {
|
|
381
352
|
body: CreateApiTokenRequestDto;
|
|
382
353
|
path?: never;
|
|
@@ -454,40 +425,6 @@ export type ApiTokenControllerUpdateTokenResponses = {
|
|
|
454
425
|
export type ApiTokenControllerUpdateTokenResponse =
|
|
455
426
|
ApiTokenControllerUpdateTokenResponses[keyof ApiTokenControllerUpdateTokenResponses];
|
|
456
427
|
|
|
457
|
-
export type QuotesControllerCreateQuoteData = {
|
|
458
|
-
body: CreateQuoteRequestDto;
|
|
459
|
-
path?: never;
|
|
460
|
-
query?: never;
|
|
461
|
-
url: "/quotes";
|
|
462
|
-
};
|
|
463
|
-
|
|
464
|
-
export type QuotesControllerCreateQuoteErrors = {
|
|
465
|
-
401: unknown;
|
|
466
|
-
403: unknown;
|
|
467
|
-
};
|
|
468
|
-
|
|
469
|
-
export type QuotesControllerCreateQuoteResponses = {
|
|
470
|
-
201: unknown;
|
|
471
|
-
};
|
|
472
|
-
|
|
473
|
-
export type QuotesControllerGetQuoteData = {
|
|
474
|
-
body?: never;
|
|
475
|
-
path: {
|
|
476
|
-
id: string;
|
|
477
|
-
};
|
|
478
|
-
query?: never;
|
|
479
|
-
url: "/quotes/{id}";
|
|
480
|
-
};
|
|
481
|
-
|
|
482
|
-
export type QuotesControllerGetQuoteErrors = {
|
|
483
|
-
401: unknown;
|
|
484
|
-
403: unknown;
|
|
485
|
-
};
|
|
486
|
-
|
|
487
|
-
export type QuotesControllerGetQuoteResponses = {
|
|
488
|
-
200: unknown;
|
|
489
|
-
};
|
|
490
|
-
|
|
491
428
|
export type MissionsControllerCreateMissionsData = {
|
|
492
429
|
body: CreateMissionRequestDto;
|
|
493
430
|
path?: never;
|
package/src/event/types.gen.ts
CHANGED
|
@@ -32,14 +32,15 @@ export const Event = z.union([
|
|
|
32
32
|
timestamp: z.any(),
|
|
33
33
|
data: z
|
|
34
34
|
.object({
|
|
35
|
-
|
|
36
|
-
vaultId: z.
|
|
37
|
-
amount: z.
|
|
35
|
+
id: z.number().int(),
|
|
36
|
+
vaultId: z.number().int(),
|
|
37
|
+
amount: z.number().int(),
|
|
38
38
|
zoneId: z.string(),
|
|
39
39
|
flightPlanId: z.number(),
|
|
40
|
-
captureStartTime: z.string(),
|
|
41
|
-
captureEndTime: z.string(),
|
|
40
|
+
captureStartTime: z.string().datetime({ offset: true }),
|
|
41
|
+
captureEndTime: z.string().datetime({ offset: true }),
|
|
42
42
|
detailsHash: z.string(),
|
|
43
|
+
requestor: z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$")),
|
|
43
44
|
})
|
|
44
45
|
.strict(),
|
|
45
46
|
})
|
|
@@ -51,8 +52,8 @@ export const Event = z.union([
|
|
|
51
52
|
timestamp: z.any(),
|
|
52
53
|
data: z
|
|
53
54
|
.object({
|
|
54
|
-
id: z.
|
|
55
|
-
amount: z.number().optional(),
|
|
55
|
+
id: z.number().int(),
|
|
56
|
+
amount: z.number().int().optional(),
|
|
56
57
|
isOpen: z.boolean().optional(),
|
|
57
58
|
})
|
|
58
59
|
.strict(),
|