@layer-drone/protocol 0.1.1 → 0.1.3

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.
@@ -6,18 +6,36 @@ export type CreateApiTokenResponseDto = {
6
6
  deleted_at: Date;
7
7
  last_used: Date;
8
8
  org: number;
9
- scopes: Array<"manageTokens" | "manageFlights" | "manageWebhooks" | "all">;
9
+ scopes: Array<
10
+ | "manageTokens"
11
+ | "manageFlights"
12
+ | "manageMissions"
13
+ | "manageWebhooks"
14
+ | "all"
15
+ >;
10
16
  };
11
17
 
12
18
  export type CreateApiTokenRequestDto = {
13
19
  name: string;
14
- scopes: Array<"manageTokens" | "manageFlights" | "manageWebhooks" | "all">;
20
+ scopes: Array<
21
+ | "manageTokens"
22
+ | "manageFlights"
23
+ | "manageMissions"
24
+ | "manageWebhooks"
25
+ | "all"
26
+ >;
15
27
  orgId: number;
16
28
  };
17
29
 
18
30
  export type UpdateApiTokenRequestDto = {
19
31
  name?: string;
20
- scopes?: Array<"manageTokens" | "manageFlights" | "manageWebhooks" | "all">;
32
+ scopes?: Array<
33
+ | "manageTokens"
34
+ | "manageFlights"
35
+ | "manageMissions"
36
+ | "manageWebhooks"
37
+ | "all"
38
+ >;
21
39
  };
22
40
 
23
41
  export type UpdateApiTokenResponseDto = {
@@ -26,7 +44,13 @@ export type UpdateApiTokenResponseDto = {
26
44
  deleted_at: Date;
27
45
  last_used: Date;
28
46
  org: number;
29
- scopes: Array<"manageTokens" | "manageFlights" | "manageWebhooks" | "all">;
47
+ scopes: Array<
48
+ | "manageTokens"
49
+ | "manageFlights"
50
+ | "manageMissions"
51
+ | "manageWebhooks"
52
+ | "all"
53
+ >;
30
54
  };
31
55
 
32
56
  export type GetTimeLimitsForSunAltitudeResponse = {
@@ -115,57 +139,67 @@ export type GetProvenanceCryptoKeyResponse = {
115
139
  export type CreateMissionRequestDto = {
116
140
  missions: Array<{
117
141
  zoneId: string;
142
+ campaigns: Array<string>;
118
143
  flightPlanId: number;
119
144
  amount: string | number | bigint;
120
145
  startTime: Date;
121
146
  endTime: Date;
122
147
  }>;
123
- campaignId: number;
124
148
  requestor: string;
125
149
  mintOnChain?: boolean;
126
150
  };
127
151
 
128
152
  export type CreateMissionResponseDto = {
129
153
  success: boolean;
130
- data:
131
- | {
132
- missions: Array<{
133
- id: string;
134
- vaultId: string;
135
- amount: string;
136
- zoneId: string;
137
- flightPlanId: number;
138
- captureStartTime: Date;
139
- captureEndTime: Date;
140
- requestor: string;
141
- }>;
142
- }
143
- | string;
154
+ data: {
155
+ missions: Array<{
156
+ id: string;
157
+ vaultId: string;
158
+ amount: string;
159
+ zoneId: string;
160
+ flightPlanId: number;
161
+ campaigns: Array<string>;
162
+ captureStartTime: Date;
163
+ captureEndTime: Date;
164
+ requestor: string;
165
+ }>;
166
+ };
144
167
  };
145
168
 
146
169
  export type UpdateMissionsRequestDto = {
147
- missions: Array<
148
- | {
149
- id: string | number | bigint;
150
- amount: string | number | bigint;
151
- }
152
- | {
153
- id: string | number | bigint;
154
- isOpen: false;
155
- }
156
- >;
170
+ missions: Array<{
171
+ id: string | number | bigint;
172
+ amount?: string | number | bigint;
173
+ isOpen?: boolean;
174
+ }>;
157
175
  treasuryAddress: string;
158
176
  };
159
177
 
160
178
  export type UpdateMissionsResponseDto = {
161
179
  success: boolean;
162
- data:
163
- | {
164
- escrowRequestsQueued: Array<string>;
165
- withdrawalRequestsQueued: Array<string>;
166
- cancelRequestsQueued: Array<string>;
167
- }
168
- | string;
180
+ data: {
181
+ escrowRequestsQueued: Array<string>;
182
+ withdrawalRequestsQueued: Array<string>;
183
+ cancelRequestsQueued: Array<string>;
184
+ };
185
+ };
186
+
187
+ export type RepriceMissionsRequestDto = {
188
+ scaleFactor: number;
189
+ requestor: string;
190
+ jobId?: string;
191
+ };
192
+
193
+ export type RepriceMissionsResponseDto = {
194
+ success: boolean;
195
+ data: {
196
+ jobId: string;
197
+ status: "in_progress" | "queued" | "completed" | "failed";
198
+ missionsProcessed: number;
199
+ escrowRequestsQueued: Array<string>;
200
+ withdrawalRequestsQueued: Array<string>;
201
+ errorMessage?: string;
202
+ };
169
203
  };
170
204
 
171
205
  export type CreateQuoteRequestDto = {
@@ -298,6 +332,17 @@ export type ApiControllerGetHelloResponses = {
298
332
  200: unknown;
299
333
  };
300
334
 
335
+ export type ApiControllerGetErrorData = {
336
+ body?: never;
337
+ path?: never;
338
+ query?: never;
339
+ url: "/debug-sentry";
340
+ };
341
+
342
+ export type ApiControllerGetErrorResponses = {
343
+ 200: unknown;
344
+ };
345
+
301
346
  export type ApiTokenControllerCreateTokenData = {
302
347
  body: CreateApiTokenRequestDto;
303
348
  path?: never;
@@ -525,6 +570,7 @@ export type MissionsControllerCreateMissionsErrors = {
525
570
  * Validation failed - invalid Zones, mission types, or times
526
571
  */
527
572
  400: unknown;
573
+ 401: unknown;
528
574
  /**
529
575
  * Insufficient treasury spending limit
530
576
  */
@@ -552,6 +598,11 @@ export type MissionsControllerUpdateMissionsData = {
552
598
  url: "/missions";
553
599
  };
554
600
 
601
+ export type MissionsControllerUpdateMissionsErrors = {
602
+ 401: unknown;
603
+ 403: unknown;
604
+ };
605
+
555
606
  export type MissionsControllerUpdateMissionsResponses = {
556
607
  /**
557
608
  * Missions update transaction queued successfully
@@ -562,6 +613,28 @@ export type MissionsControllerUpdateMissionsResponses = {
562
613
  export type MissionsControllerUpdateMissionsResponse =
563
614
  MissionsControllerUpdateMissionsResponses[keyof MissionsControllerUpdateMissionsResponses];
564
615
 
616
+ export type MissionsControllerRepriceMissionsData = {
617
+ body: RepriceMissionsRequestDto;
618
+ path?: never;
619
+ query?: never;
620
+ url: "/missions/amounts";
621
+ };
622
+
623
+ export type MissionsControllerRepriceMissionsErrors = {
624
+ 401: unknown;
625
+ 403: unknown;
626
+ };
627
+
628
+ export type MissionsControllerRepriceMissionsResponses = {
629
+ /**
630
+ * Mission repricing queued successfully
631
+ */
632
+ 200: RepriceMissionsResponseDto;
633
+ };
634
+
635
+ export type MissionsControllerRepriceMissionsResponse =
636
+ MissionsControllerRepriceMissionsResponses[keyof MissionsControllerRepriceMissionsResponses];
637
+
565
638
  export type QuotesControllerCreateQuoteData = {
566
639
  body: CreateQuoteRequestDto;
567
640
  path?: never;
@@ -7,9 +7,9 @@ export const Event = z.union([
7
7
  id: z.string(),
8
8
  event_type: z.literal("test"),
9
9
  timestamp: z.string(),
10
- data: z.object({ message: z.string() }).strict(),
10
+ data: z.object({ message: z.string() }).catchall(z.any()),
11
11
  })
12
- .strict(),
12
+ .catchall(z.any()),
13
13
  z
14
14
  .object({
15
15
  id: z.string(),
@@ -28,13 +28,14 @@ export const Event = z.union([
28
28
  .transform((wire) => BigInt(wire.value)),
29
29
  zoneId: z.string(),
30
30
  flightPlanId: z.number(),
31
+ campaigns: z.array(z.string()),
31
32
  captureStartTime: z.string().datetime({ offset: true }),
32
33
  captureEndTime: z.string().datetime({ offset: true }),
33
34
  requestor: z.string().regex(new RegExp("^0x[a-fA-F0-9]{40}$")),
34
35
  })
35
- .strict(),
36
+ .catchall(z.any()),
36
37
  })
37
- .strict(),
38
+ .catchall(z.any()),
38
39
  z
39
40
  .object({
40
41
  id: z.string(),
@@ -50,10 +51,11 @@ export const Event = z.union([
50
51
  .transform((wire) => BigInt(wire.value))
51
52
  .optional(),
52
53
  isOpen: z.boolean().optional(),
54
+ campaigns: z.array(z.string()).optional(),
53
55
  })
54
- .strict(),
56
+ .catchall(z.any()),
55
57
  })
56
- .strict(),
58
+ .catchall(z.any()),
57
59
  z
58
60
  .object({
59
61
  id: z.string(),
@@ -76,9 +78,9 @@ export const Event = z.union([
76
78
  .transform((wire) => BigInt(wire.value)),
77
79
  storageKey: z.string(),
78
80
  })
79
- .strict(),
81
+ .catchall(z.any()),
80
82
  })
81
- .strict(),
83
+ .catchall(z.any()),
82
84
  z
83
85
  .object({
84
86
  id: z.string(),
@@ -93,9 +95,9 @@ export const Event = z.union([
93
95
  .object({ __type: z.literal("bigint"), value: z.string() })
94
96
  .transform((wire) => BigInt(wire.value)),
95
97
  })
96
- .strict(),
98
+ .catchall(z.any()),
97
99
  })
98
- .strict(),
100
+ .catchall(z.any()),
99
101
  z
100
102
  .object({
101
103
  id: z.string(),
@@ -116,9 +118,9 @@ export const Event = z.union([
116
118
  .object({ __type: z.literal("bigint"), value: z.string() })
117
119
  .transform((wire) => BigInt(wire.value)),
118
120
  })
119
- .strict(),
121
+ .catchall(z.any()),
120
122
  })
121
- .strict(),
123
+ .catchall(z.any()),
122
124
  ]);
123
125
  export type Event = z.infer<typeof Event>;
124
126