@layer-drone/protocol 0.1.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +869 -5
- package/dist/index.d.ts +869 -5
- package/dist/index.js +380 -1
- package/dist/index.mjs +362 -1
- package/package.json +2 -2
- package/src/client/sdk.gen.ts +539 -0
- package/src/client/transformers.gen.ts +130 -0
- package/src/client/types.gen.ts +967 -0
- package/src/event/types.gen.ts +11 -0
package/src/client/sdk.gen.ts
CHANGED
|
@@ -8,10 +8,20 @@ import type {
|
|
|
8
8
|
import {
|
|
9
9
|
apiTokenControllerUpdateTokenResponseTransformer,
|
|
10
10
|
conditionsControllerGetSunAltitudeTimeLimitsResponseTransformer,
|
|
11
|
+
contractsControllerGetAllContractsResponseTransformer,
|
|
12
|
+
flightPlansControllerCreateResponseTransformer,
|
|
13
|
+
flightPlansControllerGetManyResponseTransformer,
|
|
14
|
+
flightPlansControllerGetResponseTransformer,
|
|
11
15
|
flightsControllerValidateFlightResponseTransformer,
|
|
16
|
+
inboundWebhookConfigsControllerCreateResponseTransformer,
|
|
17
|
+
inboundWebhookConfigsControllerGetManyResponseTransformer,
|
|
18
|
+
inboundWebhookConfigsControllerGetResponseTransformer,
|
|
19
|
+
inboundWebhookConfigsControllerUpdateResponseTransformer,
|
|
12
20
|
missionsControllerCreateMissionsResponseTransformer,
|
|
13
21
|
} from "./transformers.gen.js";
|
|
14
22
|
import type {
|
|
23
|
+
AlchemyControllerHandleWebhookData,
|
|
24
|
+
AlchemyControllerHandleWebhookResponses,
|
|
15
25
|
ApiControllerGetErrorData,
|
|
16
26
|
ApiControllerGetErrorResponses,
|
|
17
27
|
ApiControllerGetHelloData,
|
|
@@ -30,6 +40,33 @@ import type {
|
|
|
30
40
|
ApiTokenControllerUpdateTokenResponses,
|
|
31
41
|
ConditionsControllerGetSunAltitudeTimeLimitsData,
|
|
32
42
|
ConditionsControllerGetSunAltitudeTimeLimitsResponses,
|
|
43
|
+
ContractsControllerCreateContractData,
|
|
44
|
+
ContractsControllerCreateContractErrors,
|
|
45
|
+
ContractsControllerCreateContractResponses,
|
|
46
|
+
ContractsControllerDeleteContractData,
|
|
47
|
+
ContractsControllerDeleteContractErrors,
|
|
48
|
+
ContractsControllerDeleteContractResponses,
|
|
49
|
+
ContractsControllerGetAllContractsData,
|
|
50
|
+
ContractsControllerGetAllContractsErrors,
|
|
51
|
+
ContractsControllerGetAllContractsResponses,
|
|
52
|
+
ContractsControllerGetContractData,
|
|
53
|
+
ContractsControllerGetContractErrors,
|
|
54
|
+
ContractsControllerGetContractResponses,
|
|
55
|
+
ContractsControllerUpdateContractData,
|
|
56
|
+
ContractsControllerUpdateContractErrors,
|
|
57
|
+
ContractsControllerUpdateContractResponses,
|
|
58
|
+
DlqRedriverControllerRedriveDlqData,
|
|
59
|
+
DlqRedriverControllerRedriveDlqErrors,
|
|
60
|
+
DlqRedriverControllerRedriveDlqResponses,
|
|
61
|
+
FlightPlansControllerCreateData,
|
|
62
|
+
FlightPlansControllerCreateErrors,
|
|
63
|
+
FlightPlansControllerCreateResponses,
|
|
64
|
+
FlightPlansControllerGetData,
|
|
65
|
+
FlightPlansControllerGetErrors,
|
|
66
|
+
FlightPlansControllerGetManyData,
|
|
67
|
+
FlightPlansControllerGetManyErrors,
|
|
68
|
+
FlightPlansControllerGetManyResponses,
|
|
69
|
+
FlightPlansControllerGetResponses,
|
|
33
70
|
FlightsControllerCreatePresignedUrlsData,
|
|
34
71
|
FlightsControllerCreatePresignedUrlsErrors,
|
|
35
72
|
FlightsControllerCreatePresignedUrlsResponses,
|
|
@@ -42,8 +79,26 @@ import type {
|
|
|
42
79
|
FlightsControllerValidateFlightData,
|
|
43
80
|
FlightsControllerValidateFlightErrors,
|
|
44
81
|
FlightsControllerValidateFlightResponses,
|
|
82
|
+
InboundWebhookConfigsControllerCreateData,
|
|
83
|
+
InboundWebhookConfigsControllerCreateErrors,
|
|
84
|
+
InboundWebhookConfigsControllerCreateResponses,
|
|
85
|
+
InboundWebhookConfigsControllerDeleteData,
|
|
86
|
+
InboundWebhookConfigsControllerDeleteErrors,
|
|
87
|
+
InboundWebhookConfigsControllerDeleteResponses,
|
|
88
|
+
InboundWebhookConfigsControllerGetData,
|
|
89
|
+
InboundWebhookConfigsControllerGetErrors,
|
|
90
|
+
InboundWebhookConfigsControllerGetManyData,
|
|
91
|
+
InboundWebhookConfigsControllerGetManyErrors,
|
|
92
|
+
InboundWebhookConfigsControllerGetManyResponses,
|
|
93
|
+
InboundWebhookConfigsControllerGetResponses,
|
|
94
|
+
InboundWebhookConfigsControllerUpdateData,
|
|
95
|
+
InboundWebhookConfigsControllerUpdateErrors,
|
|
96
|
+
InboundWebhookConfigsControllerUpdateResponses,
|
|
45
97
|
KeysControllerGetProvenanceCryptoKeyData,
|
|
46
98
|
KeysControllerGetProvenanceCryptoKeyResponses,
|
|
99
|
+
MissionsControllerCloseMissionData,
|
|
100
|
+
MissionsControllerCloseMissionErrors,
|
|
101
|
+
MissionsControllerCloseMissionResponses,
|
|
47
102
|
MissionsControllerCreateMissionsData,
|
|
48
103
|
MissionsControllerCreateMissionsErrors,
|
|
49
104
|
MissionsControllerCreateMissionsResponses,
|
|
@@ -61,6 +116,11 @@ import type {
|
|
|
61
116
|
QuotesControllerGetQuoteResponses,
|
|
62
117
|
SchemaControllerGetEventSchemaData,
|
|
63
118
|
SchemaControllerGetEventSchemaResponses,
|
|
119
|
+
SchemaControllerGetFlightPlanSchemaData,
|
|
120
|
+
SchemaControllerGetFlightPlanSchemaResponses,
|
|
121
|
+
VaultsControllerCreateVaultsData,
|
|
122
|
+
VaultsControllerCreateVaultsErrors,
|
|
123
|
+
VaultsControllerCreateVaultsResponses,
|
|
64
124
|
WebhooksControllerCreateData,
|
|
65
125
|
WebhooksControllerCreateErrors,
|
|
66
126
|
WebhooksControllerCreateResponses,
|
|
@@ -243,6 +303,169 @@ export const conditionsControllerGetSunAltitudeTimeLimits = <
|
|
|
243
303
|
});
|
|
244
304
|
};
|
|
245
305
|
|
|
306
|
+
/**
|
|
307
|
+
* Get all contracts
|
|
308
|
+
* Retrieve all activity and ERC20 contracts
|
|
309
|
+
*/
|
|
310
|
+
export const contractsControllerGetAllContracts = <
|
|
311
|
+
ThrowOnError extends boolean = false,
|
|
312
|
+
>(
|
|
313
|
+
options?: Options<ContractsControllerGetAllContractsData, ThrowOnError>,
|
|
314
|
+
) => {
|
|
315
|
+
return (options?.client ?? _heyApiClient).get<
|
|
316
|
+
ContractsControllerGetAllContractsResponses,
|
|
317
|
+
ContractsControllerGetAllContractsErrors,
|
|
318
|
+
ThrowOnError
|
|
319
|
+
>({
|
|
320
|
+
security: [
|
|
321
|
+
{
|
|
322
|
+
name: "x-api-token",
|
|
323
|
+
type: "apiKey",
|
|
324
|
+
},
|
|
325
|
+
],
|
|
326
|
+
responseTransformer: contractsControllerGetAllContractsResponseTransformer,
|
|
327
|
+
url: "/contracts",
|
|
328
|
+
...options,
|
|
329
|
+
});
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Create a new contract
|
|
334
|
+
* Create either an activity contract or an ERC20 contract
|
|
335
|
+
*/
|
|
336
|
+
export const contractsControllerCreateContract = <
|
|
337
|
+
ThrowOnError extends boolean = false,
|
|
338
|
+
>(
|
|
339
|
+
options: Options<ContractsControllerCreateContractData, ThrowOnError>,
|
|
340
|
+
) => {
|
|
341
|
+
return (options.client ?? _heyApiClient).post<
|
|
342
|
+
ContractsControllerCreateContractResponses,
|
|
343
|
+
ContractsControllerCreateContractErrors,
|
|
344
|
+
ThrowOnError
|
|
345
|
+
>({
|
|
346
|
+
security: [
|
|
347
|
+
{
|
|
348
|
+
name: "x-api-token",
|
|
349
|
+
type: "apiKey",
|
|
350
|
+
},
|
|
351
|
+
],
|
|
352
|
+
url: "/contracts",
|
|
353
|
+
...options,
|
|
354
|
+
headers: {
|
|
355
|
+
"Content-Type": "application/json",
|
|
356
|
+
...options.headers,
|
|
357
|
+
},
|
|
358
|
+
});
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Delete a contract
|
|
363
|
+
* Delete a contract by ID and type
|
|
364
|
+
*/
|
|
365
|
+
export const contractsControllerDeleteContract = <
|
|
366
|
+
ThrowOnError extends boolean = false,
|
|
367
|
+
>(
|
|
368
|
+
options: Options<ContractsControllerDeleteContractData, ThrowOnError>,
|
|
369
|
+
) => {
|
|
370
|
+
return (options.client ?? _heyApiClient).delete<
|
|
371
|
+
ContractsControllerDeleteContractResponses,
|
|
372
|
+
ContractsControllerDeleteContractErrors,
|
|
373
|
+
ThrowOnError
|
|
374
|
+
>({
|
|
375
|
+
security: [
|
|
376
|
+
{
|
|
377
|
+
name: "x-api-token",
|
|
378
|
+
type: "apiKey",
|
|
379
|
+
},
|
|
380
|
+
],
|
|
381
|
+
url: "/contracts/{id}",
|
|
382
|
+
...options,
|
|
383
|
+
});
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Get a contract by ID
|
|
388
|
+
* Retrieve a specific contract by ID and type
|
|
389
|
+
*/
|
|
390
|
+
export const contractsControllerGetContract = <
|
|
391
|
+
ThrowOnError extends boolean = false,
|
|
392
|
+
>(
|
|
393
|
+
options: Options<ContractsControllerGetContractData, ThrowOnError>,
|
|
394
|
+
) => {
|
|
395
|
+
return (options.client ?? _heyApiClient).get<
|
|
396
|
+
ContractsControllerGetContractResponses,
|
|
397
|
+
ContractsControllerGetContractErrors,
|
|
398
|
+
ThrowOnError
|
|
399
|
+
>({
|
|
400
|
+
security: [
|
|
401
|
+
{
|
|
402
|
+
name: "x-api-token",
|
|
403
|
+
type: "apiKey",
|
|
404
|
+
},
|
|
405
|
+
],
|
|
406
|
+
url: "/contracts/{id}",
|
|
407
|
+
...options,
|
|
408
|
+
});
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Update a contract
|
|
413
|
+
* Update an existing contract
|
|
414
|
+
*/
|
|
415
|
+
export const contractsControllerUpdateContract = <
|
|
416
|
+
ThrowOnError extends boolean = false,
|
|
417
|
+
>(
|
|
418
|
+
options: Options<ContractsControllerUpdateContractData, ThrowOnError>,
|
|
419
|
+
) => {
|
|
420
|
+
return (options.client ?? _heyApiClient).patch<
|
|
421
|
+
ContractsControllerUpdateContractResponses,
|
|
422
|
+
ContractsControllerUpdateContractErrors,
|
|
423
|
+
ThrowOnError
|
|
424
|
+
>({
|
|
425
|
+
security: [
|
|
426
|
+
{
|
|
427
|
+
name: "x-api-token",
|
|
428
|
+
type: "apiKey",
|
|
429
|
+
},
|
|
430
|
+
],
|
|
431
|
+
url: "/contracts/{id}",
|
|
432
|
+
...options,
|
|
433
|
+
headers: {
|
|
434
|
+
"Content-Type": "application/json",
|
|
435
|
+
...options.headers,
|
|
436
|
+
},
|
|
437
|
+
});
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Redrive messages from a DLQ topic back to its main topic
|
|
442
|
+
* Consumes messages from a DLQ topic, increments the dlq-redrive-count header, and republishes them to the corresponding main topic. Messages with dlq-redrive-count >= 2 are skipped and logged.
|
|
443
|
+
*/
|
|
444
|
+
export const dlqRedriverControllerRedriveDlq = <
|
|
445
|
+
ThrowOnError extends boolean = false,
|
|
446
|
+
>(
|
|
447
|
+
options: Options<DlqRedriverControllerRedriveDlqData, ThrowOnError>,
|
|
448
|
+
) => {
|
|
449
|
+
return (options.client ?? _heyApiClient).post<
|
|
450
|
+
DlqRedriverControllerRedriveDlqResponses,
|
|
451
|
+
DlqRedriverControllerRedriveDlqErrors,
|
|
452
|
+
ThrowOnError
|
|
453
|
+
>({
|
|
454
|
+
security: [
|
|
455
|
+
{
|
|
456
|
+
name: "x-api-token",
|
|
457
|
+
type: "apiKey",
|
|
458
|
+
},
|
|
459
|
+
],
|
|
460
|
+
url: "/dlq-redriver/redrive",
|
|
461
|
+
...options,
|
|
462
|
+
headers: {
|
|
463
|
+
"Content-Type": "application/json",
|
|
464
|
+
...options.headers,
|
|
465
|
+
},
|
|
466
|
+
});
|
|
467
|
+
};
|
|
468
|
+
|
|
246
469
|
export const flightsControllerGenerateStorageKey = <
|
|
247
470
|
ThrowOnError extends boolean = false,
|
|
248
471
|
>(
|
|
@@ -336,6 +559,86 @@ export const flightsControllerValidateFlight = <
|
|
|
336
559
|
});
|
|
337
560
|
};
|
|
338
561
|
|
|
562
|
+
/**
|
|
563
|
+
* Get all flight plans
|
|
564
|
+
* Returns all available flight plan templates. These define capture patterns (map, panorama) that can be used for drone missions.
|
|
565
|
+
*/
|
|
566
|
+
export const flightPlansControllerGetMany = <
|
|
567
|
+
ThrowOnError extends boolean = false,
|
|
568
|
+
>(
|
|
569
|
+
options?: Options<FlightPlansControllerGetManyData, ThrowOnError>,
|
|
570
|
+
) => {
|
|
571
|
+
return (options?.client ?? _heyApiClient).get<
|
|
572
|
+
FlightPlansControllerGetManyResponses,
|
|
573
|
+
FlightPlansControllerGetManyErrors,
|
|
574
|
+
ThrowOnError
|
|
575
|
+
>({
|
|
576
|
+
security: [
|
|
577
|
+
{
|
|
578
|
+
name: "x-api-token",
|
|
579
|
+
type: "apiKey",
|
|
580
|
+
},
|
|
581
|
+
],
|
|
582
|
+
responseTransformer: flightPlansControllerGetManyResponseTransformer,
|
|
583
|
+
url: "/flight-plans",
|
|
584
|
+
...options,
|
|
585
|
+
});
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Create a new flight plan
|
|
590
|
+
* Creates a new flight plan template with sections and connection strategy.
|
|
591
|
+
*/
|
|
592
|
+
export const flightPlansControllerCreate = <
|
|
593
|
+
ThrowOnError extends boolean = false,
|
|
594
|
+
>(
|
|
595
|
+
options: Options<FlightPlansControllerCreateData, ThrowOnError>,
|
|
596
|
+
) => {
|
|
597
|
+
return (options.client ?? _heyApiClient).post<
|
|
598
|
+
FlightPlansControllerCreateResponses,
|
|
599
|
+
FlightPlansControllerCreateErrors,
|
|
600
|
+
ThrowOnError
|
|
601
|
+
>({
|
|
602
|
+
security: [
|
|
603
|
+
{
|
|
604
|
+
name: "x-api-token",
|
|
605
|
+
type: "apiKey",
|
|
606
|
+
},
|
|
607
|
+
],
|
|
608
|
+
responseTransformer: flightPlansControllerCreateResponseTransformer,
|
|
609
|
+
url: "/flight-plans",
|
|
610
|
+
...options,
|
|
611
|
+
headers: {
|
|
612
|
+
"Content-Type": "application/json",
|
|
613
|
+
...options.headers,
|
|
614
|
+
},
|
|
615
|
+
});
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Get a flight plan by ID
|
|
620
|
+
* Returns a single flight plan template by its ID.
|
|
621
|
+
*/
|
|
622
|
+
export const flightPlansControllerGet = <ThrowOnError extends boolean = false>(
|
|
623
|
+
options: Options<FlightPlansControllerGetData, ThrowOnError>,
|
|
624
|
+
) => {
|
|
625
|
+
return (options.client ?? _heyApiClient).get<
|
|
626
|
+
FlightPlansControllerGetResponses,
|
|
627
|
+
FlightPlansControllerGetErrors,
|
|
628
|
+
ThrowOnError
|
|
629
|
+
>({
|
|
630
|
+
security: [
|
|
631
|
+
{
|
|
632
|
+
name: "x-api-token",
|
|
633
|
+
type: "apiKey",
|
|
634
|
+
},
|
|
635
|
+
],
|
|
636
|
+
responseTransformer: flightPlansControllerGetResponseTransformer,
|
|
637
|
+
url: "/flight-plans/{id}",
|
|
638
|
+
...options,
|
|
639
|
+
});
|
|
640
|
+
};
|
|
641
|
+
|
|
339
642
|
export const keysControllerGetProvenanceCryptoKey = <
|
|
340
643
|
ThrowOnError extends boolean = false,
|
|
341
644
|
>(
|
|
@@ -439,6 +742,35 @@ export const missionsControllerRepriceMissions = <
|
|
|
439
742
|
});
|
|
440
743
|
};
|
|
441
744
|
|
|
745
|
+
/**
|
|
746
|
+
* Close a mission
|
|
747
|
+
* Close a mission by publishing a FlightReviewed event for the specified flight ID
|
|
748
|
+
*/
|
|
749
|
+
export const missionsControllerCloseMission = <
|
|
750
|
+
ThrowOnError extends boolean = false,
|
|
751
|
+
>(
|
|
752
|
+
options: Options<MissionsControllerCloseMissionData, ThrowOnError>,
|
|
753
|
+
) => {
|
|
754
|
+
return (options.client ?? _heyApiClient).post<
|
|
755
|
+
MissionsControllerCloseMissionResponses,
|
|
756
|
+
MissionsControllerCloseMissionErrors,
|
|
757
|
+
ThrowOnError
|
|
758
|
+
>({
|
|
759
|
+
security: [
|
|
760
|
+
{
|
|
761
|
+
name: "x-api-token",
|
|
762
|
+
type: "apiKey",
|
|
763
|
+
},
|
|
764
|
+
],
|
|
765
|
+
url: "/missions/{id}/close",
|
|
766
|
+
...options,
|
|
767
|
+
headers: {
|
|
768
|
+
"Content-Type": "application/json",
|
|
769
|
+
...options.headers,
|
|
770
|
+
},
|
|
771
|
+
});
|
|
772
|
+
};
|
|
773
|
+
|
|
442
774
|
export const quotesControllerCreateQuote = <
|
|
443
775
|
ThrowOnError extends boolean = false,
|
|
444
776
|
>(
|
|
@@ -498,6 +830,56 @@ export const schemaControllerGetEventSchema = <
|
|
|
498
830
|
});
|
|
499
831
|
};
|
|
500
832
|
|
|
833
|
+
export const schemaControllerGetFlightPlanSchema = <
|
|
834
|
+
ThrowOnError extends boolean = false,
|
|
835
|
+
>(
|
|
836
|
+
options?: Options<SchemaControllerGetFlightPlanSchemaData, ThrowOnError>,
|
|
837
|
+
) => {
|
|
838
|
+
return (options?.client ?? _heyApiClient).get<
|
|
839
|
+
SchemaControllerGetFlightPlanSchemaResponses,
|
|
840
|
+
unknown,
|
|
841
|
+
ThrowOnError
|
|
842
|
+
>({
|
|
843
|
+
url: "/schema/flight-plan",
|
|
844
|
+
...options,
|
|
845
|
+
});
|
|
846
|
+
};
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* Create new vault requests
|
|
850
|
+
* Create vault requests and publish to the internal.vault.requested queue.
|
|
851
|
+
* Accepts a list of vaults with optional vaultId.
|
|
852
|
+
* Api is meant for internal use to add data on chain manually.
|
|
853
|
+
*/
|
|
854
|
+
export const vaultsControllerCreateVaults = <
|
|
855
|
+
ThrowOnError extends boolean = false,
|
|
856
|
+
>(
|
|
857
|
+
options: Options<VaultsControllerCreateVaultsData, ThrowOnError>,
|
|
858
|
+
) => {
|
|
859
|
+
return (options.client ?? _heyApiClient).post<
|
|
860
|
+
VaultsControllerCreateVaultsResponses,
|
|
861
|
+
VaultsControllerCreateVaultsErrors,
|
|
862
|
+
ThrowOnError
|
|
863
|
+
>({
|
|
864
|
+
security: [
|
|
865
|
+
{
|
|
866
|
+
name: "x-api-token",
|
|
867
|
+
type: "apiKey",
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
name: "x-api-token",
|
|
871
|
+
type: "apiKey",
|
|
872
|
+
},
|
|
873
|
+
],
|
|
874
|
+
url: "/vaults",
|
|
875
|
+
...options,
|
|
876
|
+
headers: {
|
|
877
|
+
"Content-Type": "application/json",
|
|
878
|
+
...options.headers,
|
|
879
|
+
},
|
|
880
|
+
});
|
|
881
|
+
};
|
|
882
|
+
|
|
501
883
|
export const webhooksControllerGetMany = <ThrowOnError extends boolean = false>(
|
|
502
884
|
options: Options<WebhooksControllerGetManyData, ThrowOnError>,
|
|
503
885
|
) => {
|
|
@@ -661,3 +1043,160 @@ export const webhooksControllerGetStatus = <
|
|
|
661
1043
|
...options,
|
|
662
1044
|
});
|
|
663
1045
|
};
|
|
1046
|
+
|
|
1047
|
+
export const alchemyControllerHandleWebhook = <
|
|
1048
|
+
ThrowOnError extends boolean = false,
|
|
1049
|
+
>(
|
|
1050
|
+
options: Options<AlchemyControllerHandleWebhookData, ThrowOnError>,
|
|
1051
|
+
) => {
|
|
1052
|
+
return (options.client ?? _heyApiClient).post<
|
|
1053
|
+
AlchemyControllerHandleWebhookResponses,
|
|
1054
|
+
unknown,
|
|
1055
|
+
ThrowOnError
|
|
1056
|
+
>({
|
|
1057
|
+
url: "/webhooks/inbound/alchemy",
|
|
1058
|
+
...options,
|
|
1059
|
+
headers: {
|
|
1060
|
+
"Content-Type": "application/json",
|
|
1061
|
+
...options.headers,
|
|
1062
|
+
},
|
|
1063
|
+
});
|
|
1064
|
+
};
|
|
1065
|
+
|
|
1066
|
+
/**
|
|
1067
|
+
* Get all inbound webhook configs
|
|
1068
|
+
*/
|
|
1069
|
+
export const inboundWebhookConfigsControllerGetMany = <
|
|
1070
|
+
ThrowOnError extends boolean = false,
|
|
1071
|
+
>(
|
|
1072
|
+
options?: Options<InboundWebhookConfigsControllerGetManyData, ThrowOnError>,
|
|
1073
|
+
) => {
|
|
1074
|
+
return (options?.client ?? _heyApiClient).get<
|
|
1075
|
+
InboundWebhookConfigsControllerGetManyResponses,
|
|
1076
|
+
InboundWebhookConfigsControllerGetManyErrors,
|
|
1077
|
+
ThrowOnError
|
|
1078
|
+
>({
|
|
1079
|
+
security: [
|
|
1080
|
+
{
|
|
1081
|
+
name: "x-api-token",
|
|
1082
|
+
type: "apiKey",
|
|
1083
|
+
},
|
|
1084
|
+
],
|
|
1085
|
+
responseTransformer:
|
|
1086
|
+
inboundWebhookConfigsControllerGetManyResponseTransformer,
|
|
1087
|
+
url: "/webhooks/inbound/configs",
|
|
1088
|
+
...options,
|
|
1089
|
+
});
|
|
1090
|
+
};
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* Add a configuration for an inbound webhook
|
|
1094
|
+
* The config added here helps the api process the webhook events received
|
|
1095
|
+
* by the /webhooks/inbound/alchemy endpoint.
|
|
1096
|
+
* [Detailed Instructions](https://github.com/spexigeo/layer-drone/blob/main/apps/protocol-api/src/modules/api/webhooks/inbound/alchemy/README.md)
|
|
1097
|
+
*/
|
|
1098
|
+
export const inboundWebhookConfigsControllerCreate = <
|
|
1099
|
+
ThrowOnError extends boolean = false,
|
|
1100
|
+
>(
|
|
1101
|
+
options: Options<InboundWebhookConfigsControllerCreateData, ThrowOnError>,
|
|
1102
|
+
) => {
|
|
1103
|
+
return (options.client ?? _heyApiClient).post<
|
|
1104
|
+
InboundWebhookConfigsControllerCreateResponses,
|
|
1105
|
+
InboundWebhookConfigsControllerCreateErrors,
|
|
1106
|
+
ThrowOnError
|
|
1107
|
+
>({
|
|
1108
|
+
security: [
|
|
1109
|
+
{
|
|
1110
|
+
name: "x-api-token",
|
|
1111
|
+
type: "apiKey",
|
|
1112
|
+
},
|
|
1113
|
+
],
|
|
1114
|
+
responseTransformer:
|
|
1115
|
+
inboundWebhookConfigsControllerCreateResponseTransformer,
|
|
1116
|
+
url: "/webhooks/inbound/configs",
|
|
1117
|
+
...options,
|
|
1118
|
+
headers: {
|
|
1119
|
+
"Content-Type": "application/json",
|
|
1120
|
+
...options.headers,
|
|
1121
|
+
},
|
|
1122
|
+
});
|
|
1123
|
+
};
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
* Delete an inbound webhook config
|
|
1127
|
+
*/
|
|
1128
|
+
export const inboundWebhookConfigsControllerDelete = <
|
|
1129
|
+
ThrowOnError extends boolean = false,
|
|
1130
|
+
>(
|
|
1131
|
+
options: Options<InboundWebhookConfigsControllerDeleteData, ThrowOnError>,
|
|
1132
|
+
) => {
|
|
1133
|
+
return (options.client ?? _heyApiClient).delete<
|
|
1134
|
+
InboundWebhookConfigsControllerDeleteResponses,
|
|
1135
|
+
InboundWebhookConfigsControllerDeleteErrors,
|
|
1136
|
+
ThrowOnError
|
|
1137
|
+
>({
|
|
1138
|
+
security: [
|
|
1139
|
+
{
|
|
1140
|
+
name: "x-api-token",
|
|
1141
|
+
type: "apiKey",
|
|
1142
|
+
},
|
|
1143
|
+
],
|
|
1144
|
+
url: "/webhooks/inbound/configs/{id}",
|
|
1145
|
+
...options,
|
|
1146
|
+
});
|
|
1147
|
+
};
|
|
1148
|
+
|
|
1149
|
+
/**
|
|
1150
|
+
* Get an inbound webhook config by id
|
|
1151
|
+
*/
|
|
1152
|
+
export const inboundWebhookConfigsControllerGet = <
|
|
1153
|
+
ThrowOnError extends boolean = false,
|
|
1154
|
+
>(
|
|
1155
|
+
options: Options<InboundWebhookConfigsControllerGetData, ThrowOnError>,
|
|
1156
|
+
) => {
|
|
1157
|
+
return (options.client ?? _heyApiClient).get<
|
|
1158
|
+
InboundWebhookConfigsControllerGetResponses,
|
|
1159
|
+
InboundWebhookConfigsControllerGetErrors,
|
|
1160
|
+
ThrowOnError
|
|
1161
|
+
>({
|
|
1162
|
+
security: [
|
|
1163
|
+
{
|
|
1164
|
+
name: "x-api-token",
|
|
1165
|
+
type: "apiKey",
|
|
1166
|
+
},
|
|
1167
|
+
],
|
|
1168
|
+
responseTransformer: inboundWebhookConfigsControllerGetResponseTransformer,
|
|
1169
|
+
url: "/webhooks/inbound/configs/{id}",
|
|
1170
|
+
...options,
|
|
1171
|
+
});
|
|
1172
|
+
};
|
|
1173
|
+
|
|
1174
|
+
/**
|
|
1175
|
+
* Update an inbound webhook config
|
|
1176
|
+
*/
|
|
1177
|
+
export const inboundWebhookConfigsControllerUpdate = <
|
|
1178
|
+
ThrowOnError extends boolean = false,
|
|
1179
|
+
>(
|
|
1180
|
+
options: Options<InboundWebhookConfigsControllerUpdateData, ThrowOnError>,
|
|
1181
|
+
) => {
|
|
1182
|
+
return (options.client ?? _heyApiClient).put<
|
|
1183
|
+
InboundWebhookConfigsControllerUpdateResponses,
|
|
1184
|
+
InboundWebhookConfigsControllerUpdateErrors,
|
|
1185
|
+
ThrowOnError
|
|
1186
|
+
>({
|
|
1187
|
+
security: [
|
|
1188
|
+
{
|
|
1189
|
+
name: "x-api-token",
|
|
1190
|
+
type: "apiKey",
|
|
1191
|
+
},
|
|
1192
|
+
],
|
|
1193
|
+
responseTransformer:
|
|
1194
|
+
inboundWebhookConfigsControllerUpdateResponseTransformer,
|
|
1195
|
+
url: "/webhooks/inbound/configs/{id}",
|
|
1196
|
+
...options,
|
|
1197
|
+
headers: {
|
|
1198
|
+
"Content-Type": "application/json",
|
|
1199
|
+
...options.headers,
|
|
1200
|
+
},
|
|
1201
|
+
});
|
|
1202
|
+
};
|