@avalabs/glacier-sdk 2.8.0-canary.5083b17.0 → 2.8.0-canary.52adf67.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.ts CHANGED
@@ -60,79 +60,6 @@ declare abstract class BaseHttpRequest {
60
60
  abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
61
61
  }
62
62
 
63
- type AddressActivityMetadata = {
64
- /**
65
- * Ethereum address for the address_activity event type
66
- */
67
- address: string;
68
- /**
69
- * Array of hexadecimal strings of the event signatures.
70
- */
71
- eventSignatures?: Array<string>;
72
- /**
73
- * Whether to include traces in the webhook payload.
74
- */
75
- includeTraces?: boolean;
76
- /**
77
- * Whether to include logs in the webhook payload.
78
- */
79
- includeLogs?: boolean;
80
- };
81
-
82
- declare enum EventType {
83
- ADDRESS_ACTIVITY = "address_activity"
84
- }
85
-
86
- declare enum WebhookStatusType {
87
- ACTIVE = "active",
88
- INACTIVE = "inactive"
89
- }
90
-
91
- type WebhookResponse = {
92
- id: string;
93
- eventType: EventType;
94
- metadata: AddressActivityMetadata;
95
- url: string;
96
- chainId: string;
97
- status: WebhookStatusType;
98
- createdAt: number;
99
- name: string;
100
- description: string;
101
- };
102
-
103
- type ListWebhooksResponse = {
104
- /**
105
- * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
106
- */
107
- nextPageToken?: string;
108
- webhooks: Array<WebhookResponse>;
109
- };
110
-
111
- type RegisterWebhookRequest = {
112
- url: string;
113
- chainId: string;
114
- eventType: EventType;
115
- metadata: AddressActivityMetadata;
116
- };
117
-
118
- type SharedSecretsResponse = {
119
- secret: string;
120
- };
121
-
122
- type UpdateWebhookRequest = {
123
- name?: string;
124
- description?: string;
125
- url?: string;
126
- status?: WebhookStatusType;
127
- includeTraces?: boolean;
128
- includeLogs?: boolean;
129
- };
130
-
131
- declare enum WebhookStatus {
132
- ACTIVE = "active",
133
- INACTIVE = "inactive"
134
- }
135
-
136
63
  declare class DefaultService {
137
64
  readonly httpRequest: BaseHttpRequest;
138
65
  constructor(httpRequest: BaseHttpRequest);
@@ -141,86 +68,6 @@ declare class DefaultService {
141
68
  * @throws ApiError
142
69
  */
143
70
  mediaControllerUploadImage(): CancelablePromise<any>;
144
- /**
145
- * Register a webhook
146
- * Registers a new webhook.
147
- * @returns WebhookResponse
148
- * @throws ApiError
149
- */
150
- registerWebhook({ requestBody, }: {
151
- requestBody: RegisterWebhookRequest;
152
- }): CancelablePromise<WebhookResponse>;
153
- /**
154
- * List webhooks
155
- * Lists webhooks for the user.
156
- * @returns ListWebhooksResponse
157
- * @throws ApiError
158
- */
159
- listWebhooks({ pageToken, pageSize, status, }: {
160
- /**
161
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
162
- */
163
- pageToken?: string;
164
- /**
165
- * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
166
- */
167
- pageSize?: number;
168
- /**
169
- * Status of the webhook. Use "active" to return only active webhooks, "inactive" to return only inactive webhooks. Else if no status is provided, all configured webhooks will be returned.
170
- */
171
- status?: WebhookStatus;
172
- }): CancelablePromise<ListWebhooksResponse>;
173
- /**
174
- * Get a webhook by ID
175
- * Retrieves a webhook by ID.
176
- * @returns WebhookResponse
177
- * @throws ApiError
178
- */
179
- getWebhook({ id, }: {
180
- /**
181
- * The webhook identifier.
182
- */
183
- id: string;
184
- }): CancelablePromise<WebhookResponse>;
185
- /**
186
- * Deactivate a webhook
187
- * Deactivates a webhook by ID.
188
- * @returns WebhookResponse
189
- * @throws ApiError
190
- */
191
- deactivateWebhook({ id, }: {
192
- /**
193
- * The webhook identifier.
194
- */
195
- id: string;
196
- }): CancelablePromise<WebhookResponse>;
197
- /**
198
- * Update a webhook
199
- * Updates an existing webhook.
200
- * @returns WebhookResponse
201
- * @throws ApiError
202
- */
203
- updateWebhook({ id, requestBody, }: {
204
- /**
205
- * The webhook identifier.
206
- */
207
- id: string;
208
- requestBody: UpdateWebhookRequest;
209
- }): CancelablePromise<WebhookResponse>;
210
- /**
211
- * Generate a shared secret
212
- * Generates a new shared secret.
213
- * @returns SharedSecretsResponse
214
- * @throws ApiError
215
- */
216
- generateSharedSecret(): CancelablePromise<SharedSecretsResponse>;
217
- /**
218
- * Get a shared secret
219
- * Get a previously generated shared secret.
220
- * @returns SharedSecretsResponse
221
- * @throws ApiError
222
- */
223
- getSharedSecret(): CancelablePromise<SharedSecretsResponse>;
224
71
  }
225
72
 
226
73
  /**
@@ -2794,7 +2641,7 @@ declare class PrimaryNetworkService {
2794
2641
  /**
2795
2642
  * The subnet ID to filter by. If not provided, then all subnets will be returned.
2796
2643
  */
2797
- subnetId?: string;
2644
+ subnetId?: any;
2798
2645
  }): CancelablePromise<ListValidatorDetailsResponse>;
2799
2646
  /**
2800
2647
  * Get single validator details
@@ -4437,6 +4284,172 @@ declare class TeleporterService {
4437
4284
  }): CancelablePromise<NextPageToken>;
4438
4285
  }
4439
4286
 
4287
+ type AddressActivityMetadata = {
4288
+ /**
4289
+ * Ethereum address for the address_activity event type
4290
+ */
4291
+ address: string;
4292
+ /**
4293
+ * Array of hexadecimal strings of the event signatures.
4294
+ */
4295
+ eventSignatures?: Array<string>;
4296
+ };
4297
+
4298
+ declare enum EventType {
4299
+ ADDRESS_ACTIVITY = "address_activity"
4300
+ }
4301
+
4302
+ declare enum WebhookStatusType {
4303
+ ACTIVE = "active",
4304
+ INACTIVE = "inactive"
4305
+ }
4306
+
4307
+ type WebhookResponse = {
4308
+ id: string;
4309
+ eventType: EventType;
4310
+ metadata: AddressActivityMetadata;
4311
+ /**
4312
+ * Whether to include traces in the webhook payload.
4313
+ */
4314
+ includeTraces?: boolean;
4315
+ /**
4316
+ * Whether to include logs in the webhook payload.
4317
+ */
4318
+ includeLogs?: boolean;
4319
+ url: string;
4320
+ chainId: string;
4321
+ status: WebhookStatusType;
4322
+ createdAt: number;
4323
+ name: string;
4324
+ description: string;
4325
+ };
4326
+
4327
+ type ListWebhooksResponse = {
4328
+ /**
4329
+ * A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.
4330
+ */
4331
+ nextPageToken?: string;
4332
+ webhooks: Array<WebhookResponse>;
4333
+ };
4334
+
4335
+ type RegisterWebhookRequest = {
4336
+ url: string;
4337
+ chainId: string;
4338
+ eventType: EventType;
4339
+ metadata: AddressActivityMetadata;
4340
+ /**
4341
+ * Whether to include traces in the webhook payload.
4342
+ */
4343
+ includeTraces?: boolean;
4344
+ /**
4345
+ * Whether to include logs in the webhook payload.
4346
+ */
4347
+ includeLogs?: boolean;
4348
+ };
4349
+
4350
+ type SharedSecretsResponse = {
4351
+ secret: string;
4352
+ };
4353
+
4354
+ type UpdateWebhookRequest = {
4355
+ name?: string;
4356
+ description?: string;
4357
+ url?: string;
4358
+ status?: WebhookStatusType;
4359
+ includeTraces?: boolean;
4360
+ includeLogs?: boolean;
4361
+ };
4362
+
4363
+ declare enum WebhookStatus {
4364
+ ACTIVE = "active",
4365
+ INACTIVE = "inactive"
4366
+ }
4367
+
4368
+ declare class WebhooksService {
4369
+ readonly httpRequest: BaseHttpRequest;
4370
+ constructor(httpRequest: BaseHttpRequest);
4371
+ /**
4372
+ * Register a webhook
4373
+ * Registers a new webhook.
4374
+ * @returns WebhookResponse
4375
+ * @throws ApiError
4376
+ */
4377
+ registerWebhook({ requestBody, }: {
4378
+ requestBody: RegisterWebhookRequest;
4379
+ }): CancelablePromise<WebhookResponse>;
4380
+ /**
4381
+ * List webhooks
4382
+ * Lists webhooks for the user.
4383
+ * @returns ListWebhooksResponse
4384
+ * @throws ApiError
4385
+ */
4386
+ listWebhooks({ pageToken, pageSize, status, }: {
4387
+ /**
4388
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
4389
+ */
4390
+ pageToken?: string;
4391
+ /**
4392
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
4393
+ */
4394
+ pageSize?: number;
4395
+ /**
4396
+ * Status of the webhook. Use "active" to return only active webhooks, "inactive" to return only inactive webhooks. Else if no status is provided, all configured webhooks will be returned.
4397
+ */
4398
+ status?: WebhookStatus;
4399
+ }): CancelablePromise<ListWebhooksResponse>;
4400
+ /**
4401
+ * Get a webhook by ID
4402
+ * Retrieves a webhook by ID.
4403
+ * @returns WebhookResponse
4404
+ * @throws ApiError
4405
+ */
4406
+ getWebhook({ id, }: {
4407
+ /**
4408
+ * The webhook identifier.
4409
+ */
4410
+ id: string;
4411
+ }): CancelablePromise<WebhookResponse>;
4412
+ /**
4413
+ * Deactivate a webhook
4414
+ * Deactivates a webhook by ID.
4415
+ * @returns WebhookResponse
4416
+ * @throws ApiError
4417
+ */
4418
+ deactivateWebhook({ id, }: {
4419
+ /**
4420
+ * The webhook identifier.
4421
+ */
4422
+ id: string;
4423
+ }): CancelablePromise<WebhookResponse>;
4424
+ /**
4425
+ * Update a webhook
4426
+ * Updates an existing webhook.
4427
+ * @returns WebhookResponse
4428
+ * @throws ApiError
4429
+ */
4430
+ updateWebhook({ id, requestBody, }: {
4431
+ /**
4432
+ * The webhook identifier.
4433
+ */
4434
+ id: string;
4435
+ requestBody: UpdateWebhookRequest;
4436
+ }): CancelablePromise<WebhookResponse>;
4437
+ /**
4438
+ * Generate a shared secret
4439
+ * Generates a new shared secret.
4440
+ * @returns SharedSecretsResponse
4441
+ * @throws ApiError
4442
+ */
4443
+ generateSharedSecret(): CancelablePromise<SharedSecretsResponse>;
4444
+ /**
4445
+ * Get a shared secret
4446
+ * Get a previously generated shared secret.
4447
+ * @returns SharedSecretsResponse
4448
+ * @throws ApiError
4449
+ */
4450
+ getSharedSecret(): CancelablePromise<SharedSecretsResponse>;
4451
+ }
4452
+
4440
4453
  type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
4441
4454
  declare class Glacier {
4442
4455
  readonly default: DefaultService;
@@ -4456,6 +4469,7 @@ declare class Glacier {
4456
4469
  readonly primaryNetworkUtxOs: PrimaryNetworkUtxOsService;
4457
4470
  readonly primaryNetworkVertices: PrimaryNetworkVerticesService;
4458
4471
  readonly teleporter: TeleporterService;
4472
+ readonly webhooks: WebhooksService;
4459
4473
  readonly request: BaseHttpRequest;
4460
4474
  constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
4461
4475
  }
@@ -4477,4 +4491,4 @@ declare class ApiError extends Error {
4477
4491
  constructor(request: ApiRequestOptions, response: ApiResult, message: string);
4478
4492
  }
4479
4493
 
4480
- export { ActiveDelegatorDetails, ActiveValidatorDetails, AddressActivityMetadata, AggregatedAssetAmount, ApiError, AssetAmount, AssetWithPriceInfo, BaseHttpRequest, Blockchain, BlockchainId, BlockchainIds, BlockchainInfo, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CancelError, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, ChainStatus, CompletedDelegatorDetails, CompletedValidatorDetails, ContractDeploymentDetails, ContractSubmissionBody, ContractSubmissionErc1155, ContractSubmissionErc20, ContractSubmissionErc721, ContractSubmissionUnknown, CreateEvmTransactionExportRequest, CreatePrimaryNetworkTransactionExportRequest, CurrencyCode, DefaultService, DelegationStatusType, DelegatorsDetails, DeliveredSourceNotIndexedTeleporterMessage, DeliveredTeleporterMessage, EVMInput, EVMOperationType, EVMOutput, Erc1155Contract, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Contract, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Contract, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, EventType, EvmBalancesService, EvmBlock, EvmBlocksService, EvmChainsService, EvmContractsService, EvmNetworkOptions, EvmTransactionsService, FullNativeTransactionDetails, GetChainResponse, GetEvmBlockResponse, GetNativeBalanceResponse, GetNetworkDetailsResponse, GetPrimaryNetworkBlockResponse, GetTransactionResponse, Glacier, GlacierApiFeature, HealthCheckService, HistoricalReward, ImageAsset, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlockchainsResponse, ListCChainAtomicBalancesResponse, ListCChainAtomicTransactionsResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListContractsResponse, ListDelegatorDetailsResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListEvmBlocksResponse, ListHistoricalRewardsResponse, ListInternalTransactionsResponse, ListNativeTransactionsResponse, ListNftTokens, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListPendingRewardsResponse, ListPrimaryNetworkBlocksResponse, ListSubnetsResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListValidatorDetailsResponse, ListWebhooksResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NetworkType, NextPageToken, NfTsService, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainBalance, PChainId, PChainSharedAsset, PChainTransaction, PChainTransactionType, PChainUtxo, PendingDelegatorDetails, PendingReward, PendingTeleporterMessage, PendingValidatorDetails, PricingProviders, PrimaryNetwork, PrimaryNetworkAssetCap, PrimaryNetworkAssetType, PrimaryNetworkBalancesService, PrimaryNetworkBlock, PrimaryNetworkBlocksService, PrimaryNetworkChainInfo, PrimaryNetworkChainName, PrimaryNetworkOperationType, PrimaryNetworkOptions, PrimaryNetworkRewardsService, PrimaryNetworkService, PrimaryNetworkTransactionsService, PrimaryNetworkTxType, PrimaryNetworkUtxOsService, PrimaryNetworkVerticesService, ProposerDetails, RegisterWebhookRequest, RemovedValidatorDetails, ResourceLink, ResourceLinkType, RewardType, Rewards, RichAddress, SharedSecretsResponse, SortOrder, StakingDistribution, Subnet, SubnetOwnershipInfo, TeleporterDestinationTransaction, TeleporterReceipt, TeleporterRewardDetails, TeleporterService, TeleporterSourceTransaction, TransactionDetails, TransactionExportMetadata, TransactionMethodType, TransactionStatus, TransactionVertexDetail, UnknownContract, UpdateContractResponse, UpdateWebhookRequest, UtilityAddresses, Utxo, UtxoCredential, UtxoType, ValidationStatusType, ValidatorHealthDetails, ValidatorsDetails, VmName, WebhookResponse, WebhookStatus, WebhookStatusType, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainTransactionType, XChainVertex };
4494
+ export { ActiveDelegatorDetails, ActiveValidatorDetails, AddressActivityMetadata, AggregatedAssetAmount, ApiError, AssetAmount, AssetWithPriceInfo, BaseHttpRequest, Blockchain, BlockchainId, BlockchainIds, BlockchainInfo, CChainAtomicBalances, CChainExportTransaction, CChainImportTransaction, CChainSharedAssetBalance, CancelError, CancelablePromise, ChainAddressChainIdMap, ChainAddressChainIdMapListResponse, ChainInfo, ChainStatus, CompletedDelegatorDetails, CompletedValidatorDetails, ContractDeploymentDetails, ContractSubmissionBody, ContractSubmissionErc1155, ContractSubmissionErc20, ContractSubmissionErc721, ContractSubmissionUnknown, CreateEvmTransactionExportRequest, CreatePrimaryNetworkTransactionExportRequest, CurrencyCode, DefaultService, DelegationStatusType, DelegatorsDetails, DeliveredSourceNotIndexedTeleporterMessage, DeliveredTeleporterMessage, EVMInput, EVMOperationType, EVMOutput, Erc1155Contract, Erc1155Token, Erc1155TokenBalance, Erc1155TokenMetadata, Erc1155Transfer, Erc1155TransferDetails, Erc20Contract, Erc20Token, Erc20TokenBalance, Erc20Transfer, Erc20TransferDetails, Erc721Contract, Erc721Token, Erc721TokenBalance, Erc721TokenMetadata, Erc721Transfer, Erc721TransferDetails, EventType, EvmBalancesService, EvmBlock, EvmBlocksService, EvmChainsService, EvmContractsService, EvmNetworkOptions, EvmTransactionsService, FullNativeTransactionDetails, GetChainResponse, GetEvmBlockResponse, GetNativeBalanceResponse, GetNetworkDetailsResponse, GetPrimaryNetworkBlockResponse, GetTransactionResponse, Glacier, GlacierApiFeature, HealthCheckService, HistoricalReward, ImageAsset, InternalTransaction, InternalTransactionDetails, InternalTransactionOpCall, ListBlockchainsResponse, ListCChainAtomicBalancesResponse, ListCChainAtomicTransactionsResponse, ListChainsResponse, ListCollectibleBalancesResponse, ListContractsResponse, ListDelegatorDetailsResponse, ListErc1155BalancesResponse, ListErc1155TransactionsResponse, ListErc20BalancesResponse, ListErc20TransactionsResponse, ListErc721BalancesResponse, ListErc721TransactionsResponse, ListEvmBlocksResponse, ListHistoricalRewardsResponse, ListInternalTransactionsResponse, ListNativeTransactionsResponse, ListNftTokens, ListPChainBalancesResponse, ListPChainTransactionsResponse, ListPChainUtxosResponse, ListPendingRewardsResponse, ListPrimaryNetworkBlocksResponse, ListSubnetsResponse, ListTransactionDetailsResponse, ListTransfersResponse, ListUtxosResponse, ListValidatorDetailsResponse, ListWebhooksResponse, ListXChainBalancesResponse, ListXChainTransactionsResponse, ListXChainVerticesResponse, Method, Money, NativeTokenBalance, NativeTransaction, Network, NetworkToken, NetworkTokenDetails, NetworkType, NextPageToken, NfTsService, NftTokenMetadataStatus, OpenAPI, OpenAPIConfig, OperationStatus, OperationStatusCode, OperationStatusResponse, OperationType, OperationsService, PChainBalance, PChainId, PChainSharedAsset, PChainTransaction, PChainTransactionType, PChainUtxo, PendingDelegatorDetails, PendingReward, PendingTeleporterMessage, PendingValidatorDetails, PricingProviders, PrimaryNetwork, PrimaryNetworkAssetCap, PrimaryNetworkAssetType, PrimaryNetworkBalancesService, PrimaryNetworkBlock, PrimaryNetworkBlocksService, PrimaryNetworkChainInfo, PrimaryNetworkChainName, PrimaryNetworkOperationType, PrimaryNetworkOptions, PrimaryNetworkRewardsService, PrimaryNetworkService, PrimaryNetworkTransactionsService, PrimaryNetworkTxType, PrimaryNetworkUtxOsService, PrimaryNetworkVerticesService, ProposerDetails, RegisterWebhookRequest, RemovedValidatorDetails, ResourceLink, ResourceLinkType, RewardType, Rewards, RichAddress, SharedSecretsResponse, SortOrder, StakingDistribution, Subnet, SubnetOwnershipInfo, TeleporterDestinationTransaction, TeleporterReceipt, TeleporterRewardDetails, TeleporterService, TeleporterSourceTransaction, TransactionDetails, TransactionExportMetadata, TransactionMethodType, TransactionStatus, TransactionVertexDetail, UnknownContract, UpdateContractResponse, UpdateWebhookRequest, UtilityAddresses, Utxo, UtxoCredential, UtxoType, ValidationStatusType, ValidatorHealthDetails, ValidatorsDetails, VmName, WebhookResponse, WebhookStatus, WebhookStatusType, WebhooksService, XChainAssetDetails, XChainBalances, XChainId, XChainLinearTransaction, XChainNonLinearTransaction, XChainSharedAssetBalance, XChainTransactionType, XChainVertex };
package/dist/index.js CHANGED
@@ -355,79 +355,6 @@ class DefaultService {
355
355
  url: "/v1/media/uploadImage"
356
356
  });
357
357
  }
358
- registerWebhook({
359
- requestBody
360
- }) {
361
- return this.httpRequest.request({
362
- method: "POST",
363
- url: "/v1/webhooks",
364
- body: requestBody,
365
- mediaType: "application/json"
366
- });
367
- }
368
- listWebhooks({
369
- pageToken,
370
- pageSize = 10,
371
- status
372
- }) {
373
- return this.httpRequest.request({
374
- method: "GET",
375
- url: "/v1/webhooks",
376
- query: {
377
- "pageToken": pageToken,
378
- "pageSize": pageSize,
379
- "status": status
380
- }
381
- });
382
- }
383
- getWebhook({
384
- id
385
- }) {
386
- return this.httpRequest.request({
387
- method: "GET",
388
- url: "/v1/webhooks/{id}",
389
- path: {
390
- "id": id
391
- }
392
- });
393
- }
394
- deactivateWebhook({
395
- id
396
- }) {
397
- return this.httpRequest.request({
398
- method: "DELETE",
399
- url: "/v1/webhooks/{id}",
400
- path: {
401
- "id": id
402
- }
403
- });
404
- }
405
- updateWebhook({
406
- id,
407
- requestBody
408
- }) {
409
- return this.httpRequest.request({
410
- method: "PATCH",
411
- url: "/v1/webhooks/{id}",
412
- path: {
413
- "id": id
414
- },
415
- body: requestBody,
416
- mediaType: "application/json"
417
- });
418
- }
419
- generateSharedSecret() {
420
- return this.httpRequest.request({
421
- method: "POST",
422
- url: "/v1/webhooks:generateOrRotateSharedSecret"
423
- });
424
- }
425
- getSharedSecret() {
426
- return this.httpRequest.request({
427
- method: "GET",
428
- url: "/v1/webhooks:getSharedSecret"
429
- });
430
- }
431
358
  }
432
359
 
433
360
  class EvmBalancesService {
@@ -1543,6 +1470,85 @@ class TeleporterService {
1543
1470
  }
1544
1471
  }
1545
1472
 
1473
+ class WebhooksService {
1474
+ constructor(httpRequest) {
1475
+ this.httpRequest = httpRequest;
1476
+ }
1477
+ registerWebhook({
1478
+ requestBody
1479
+ }) {
1480
+ return this.httpRequest.request({
1481
+ method: "POST",
1482
+ url: "/v1/webhooks",
1483
+ body: requestBody,
1484
+ mediaType: "application/json"
1485
+ });
1486
+ }
1487
+ listWebhooks({
1488
+ pageToken,
1489
+ pageSize = 10,
1490
+ status
1491
+ }) {
1492
+ return this.httpRequest.request({
1493
+ method: "GET",
1494
+ url: "/v1/webhooks",
1495
+ query: {
1496
+ "pageToken": pageToken,
1497
+ "pageSize": pageSize,
1498
+ "status": status
1499
+ }
1500
+ });
1501
+ }
1502
+ getWebhook({
1503
+ id
1504
+ }) {
1505
+ return this.httpRequest.request({
1506
+ method: "GET",
1507
+ url: "/v1/webhooks/{id}",
1508
+ path: {
1509
+ "id": id
1510
+ }
1511
+ });
1512
+ }
1513
+ deactivateWebhook({
1514
+ id
1515
+ }) {
1516
+ return this.httpRequest.request({
1517
+ method: "DELETE",
1518
+ url: "/v1/webhooks/{id}",
1519
+ path: {
1520
+ "id": id
1521
+ }
1522
+ });
1523
+ }
1524
+ updateWebhook({
1525
+ id,
1526
+ requestBody
1527
+ }) {
1528
+ return this.httpRequest.request({
1529
+ method: "PATCH",
1530
+ url: "/v1/webhooks/{id}",
1531
+ path: {
1532
+ "id": id
1533
+ },
1534
+ body: requestBody,
1535
+ mediaType: "application/json"
1536
+ });
1537
+ }
1538
+ generateSharedSecret() {
1539
+ return this.httpRequest.request({
1540
+ method: "POST",
1541
+ url: "/v1/webhooks:generateOrRotateSharedSecret"
1542
+ });
1543
+ }
1544
+ getSharedSecret() {
1545
+ return this.httpRequest.request({
1546
+ method: "GET",
1547
+ url: "/v1/webhooks:getSharedSecret"
1548
+ });
1549
+ }
1550
+ }
1551
+
1546
1552
  class Glacier {
1547
1553
  default;
1548
1554
  evmBalances;
@@ -1561,6 +1567,7 @@ class Glacier {
1561
1567
  primaryNetworkUtxOs;
1562
1568
  primaryNetworkVertices;
1563
1569
  teleporter;
1570
+ webhooks;
1564
1571
  request;
1565
1572
  constructor(config, HttpRequest = FetchHttpRequest) {
1566
1573
  this.request = new HttpRequest({
@@ -1591,6 +1598,7 @@ class Glacier {
1591
1598
  this.primaryNetworkUtxOs = new PrimaryNetworkUtxOsService(this.request);
1592
1599
  this.primaryNetworkVertices = new PrimaryNetworkVerticesService(this.request);
1593
1600
  this.teleporter = new TeleporterService(this.request);
1601
+ this.webhooks = new WebhooksService(this.request);
1594
1602
  }
1595
1603
  }
1596
1604
 
@@ -2173,5 +2181,6 @@ exports.ValidationStatusType = ValidationStatusType;
2173
2181
  exports.VmName = VmName;
2174
2182
  exports.WebhookStatus = WebhookStatus;
2175
2183
  exports.WebhookStatusType = WebhookStatusType;
2184
+ exports.WebhooksService = WebhooksService;
2176
2185
  exports.XChainId = XChainId;
2177
2186
  exports.XChainTransactionType = XChainTransactionType;
@@ -17,6 +17,7 @@ import { PrimaryNetworkTransactionsService } from './services/PrimaryNetworkTran
17
17
  import { PrimaryNetworkUtxOsService } from './services/PrimaryNetworkUtxOsService.js';
18
18
  import { PrimaryNetworkVerticesService } from './services/PrimaryNetworkVerticesService.js';
19
19
  import { TeleporterService } from './services/TeleporterService.js';
20
+ import { WebhooksService } from './services/WebhooksService.js';
20
21
 
21
22
  type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
22
23
  declare class Glacier {
@@ -37,6 +38,7 @@ declare class Glacier {
37
38
  readonly primaryNetworkUtxOs: PrimaryNetworkUtxOsService;
38
39
  readonly primaryNetworkVertices: PrimaryNetworkVerticesService;
39
40
  readonly teleporter: TeleporterService;
41
+ readonly webhooks: WebhooksService;
40
42
  readonly request: BaseHttpRequest;
41
43
  constructor(config?: Partial<OpenAPIConfig>, HttpRequest?: HttpRequestConstructor);
42
44
  }
@@ -16,6 +16,7 @@ import { PrimaryNetworkTransactionsService } from './services/PrimaryNetworkTran
16
16
  import { PrimaryNetworkUtxOsService } from './services/PrimaryNetworkUtxOsService.js';
17
17
  import { PrimaryNetworkVerticesService } from './services/PrimaryNetworkVerticesService.js';
18
18
  import { TeleporterService } from './services/TeleporterService.js';
19
+ import { WebhooksService } from './services/WebhooksService.js';
19
20
 
20
21
  class Glacier {
21
22
  default;
@@ -35,6 +36,7 @@ class Glacier {
35
36
  primaryNetworkUtxOs;
36
37
  primaryNetworkVertices;
37
38
  teleporter;
39
+ webhooks;
38
40
  request;
39
41
  constructor(config, HttpRequest = FetchHttpRequest) {
40
42
  this.request = new HttpRequest({
@@ -65,6 +67,7 @@ class Glacier {
65
67
  this.primaryNetworkUtxOs = new PrimaryNetworkUtxOsService(this.request);
66
68
  this.primaryNetworkVertices = new PrimaryNetworkVerticesService(this.request);
67
69
  this.teleporter = new TeleporterService(this.request);
70
+ this.webhooks = new WebhooksService(this.request);
68
71
  }
69
72
  }
70
73
 
@@ -7,14 +7,6 @@ type AddressActivityMetadata = {
7
7
  * Array of hexadecimal strings of the event signatures.
8
8
  */
9
9
  eventSignatures?: Array<string>;
10
- /**
11
- * Whether to include traces in the webhook payload.
12
- */
13
- includeTraces?: boolean;
14
- /**
15
- * Whether to include logs in the webhook payload.
16
- */
17
- includeLogs?: boolean;
18
10
  };
19
11
 
20
12
  export { AddressActivityMetadata };
@@ -6,6 +6,14 @@ type RegisterWebhookRequest = {
6
6
  chainId: string;
7
7
  eventType: EventType;
8
8
  metadata: AddressActivityMetadata;
9
+ /**
10
+ * Whether to include traces in the webhook payload.
11
+ */
12
+ includeTraces?: boolean;
13
+ /**
14
+ * Whether to include logs in the webhook payload.
15
+ */
16
+ includeLogs?: boolean;
9
17
  };
10
18
 
11
19
  export { RegisterWebhookRequest };
@@ -6,6 +6,14 @@ type WebhookResponse = {
6
6
  id: string;
7
7
  eventType: EventType;
8
8
  metadata: AddressActivityMetadata;
9
+ /**
10
+ * Whether to include traces in the webhook payload.
11
+ */
12
+ includeTraces?: boolean;
13
+ /**
14
+ * Whether to include logs in the webhook payload.
15
+ */
16
+ includeLogs?: boolean;
9
17
  url: string;
10
18
  chainId: string;
11
19
  status: WebhookStatusType;
@@ -1,9 +1,3 @@
1
- import { ListWebhooksResponse } from '../models/ListWebhooksResponse.js';
2
- import { RegisterWebhookRequest } from '../models/RegisterWebhookRequest.js';
3
- import { SharedSecretsResponse } from '../models/SharedSecretsResponse.js';
4
- import { UpdateWebhookRequest } from '../models/UpdateWebhookRequest.js';
5
- import { WebhookResponse } from '../models/WebhookResponse.js';
6
- import { WebhookStatus } from '../models/WebhookStatus.js';
7
1
  import { CancelablePromise } from '../core/CancelablePromise.js';
8
2
  import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
9
3
 
@@ -15,86 +9,6 @@ declare class DefaultService {
15
9
  * @throws ApiError
16
10
  */
17
11
  mediaControllerUploadImage(): CancelablePromise<any>;
18
- /**
19
- * Register a webhook
20
- * Registers a new webhook.
21
- * @returns WebhookResponse
22
- * @throws ApiError
23
- */
24
- registerWebhook({ requestBody, }: {
25
- requestBody: RegisterWebhookRequest;
26
- }): CancelablePromise<WebhookResponse>;
27
- /**
28
- * List webhooks
29
- * Lists webhooks for the user.
30
- * @returns ListWebhooksResponse
31
- * @throws ApiError
32
- */
33
- listWebhooks({ pageToken, pageSize, status, }: {
34
- /**
35
- * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
36
- */
37
- pageToken?: string;
38
- /**
39
- * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
40
- */
41
- pageSize?: number;
42
- /**
43
- * Status of the webhook. Use "active" to return only active webhooks, "inactive" to return only inactive webhooks. Else if no status is provided, all configured webhooks will be returned.
44
- */
45
- status?: WebhookStatus;
46
- }): CancelablePromise<ListWebhooksResponse>;
47
- /**
48
- * Get a webhook by ID
49
- * Retrieves a webhook by ID.
50
- * @returns WebhookResponse
51
- * @throws ApiError
52
- */
53
- getWebhook({ id, }: {
54
- /**
55
- * The webhook identifier.
56
- */
57
- id: string;
58
- }): CancelablePromise<WebhookResponse>;
59
- /**
60
- * Deactivate a webhook
61
- * Deactivates a webhook by ID.
62
- * @returns WebhookResponse
63
- * @throws ApiError
64
- */
65
- deactivateWebhook({ id, }: {
66
- /**
67
- * The webhook identifier.
68
- */
69
- id: string;
70
- }): CancelablePromise<WebhookResponse>;
71
- /**
72
- * Update a webhook
73
- * Updates an existing webhook.
74
- * @returns WebhookResponse
75
- * @throws ApiError
76
- */
77
- updateWebhook({ id, requestBody, }: {
78
- /**
79
- * The webhook identifier.
80
- */
81
- id: string;
82
- requestBody: UpdateWebhookRequest;
83
- }): CancelablePromise<WebhookResponse>;
84
- /**
85
- * Generate a shared secret
86
- * Generates a new shared secret.
87
- * @returns SharedSecretsResponse
88
- * @throws ApiError
89
- */
90
- generateSharedSecret(): CancelablePromise<SharedSecretsResponse>;
91
- /**
92
- * Get a shared secret
93
- * Get a previously generated shared secret.
94
- * @returns SharedSecretsResponse
95
- * @throws ApiError
96
- */
97
- getSharedSecret(): CancelablePromise<SharedSecretsResponse>;
98
12
  }
99
13
 
100
14
  export { DefaultService };
@@ -8,79 +8,6 @@ class DefaultService {
8
8
  url: "/v1/media/uploadImage"
9
9
  });
10
10
  }
11
- registerWebhook({
12
- requestBody
13
- }) {
14
- return this.httpRequest.request({
15
- method: "POST",
16
- url: "/v1/webhooks",
17
- body: requestBody,
18
- mediaType: "application/json"
19
- });
20
- }
21
- listWebhooks({
22
- pageToken,
23
- pageSize = 10,
24
- status
25
- }) {
26
- return this.httpRequest.request({
27
- method: "GET",
28
- url: "/v1/webhooks",
29
- query: {
30
- "pageToken": pageToken,
31
- "pageSize": pageSize,
32
- "status": status
33
- }
34
- });
35
- }
36
- getWebhook({
37
- id
38
- }) {
39
- return this.httpRequest.request({
40
- method: "GET",
41
- url: "/v1/webhooks/{id}",
42
- path: {
43
- "id": id
44
- }
45
- });
46
- }
47
- deactivateWebhook({
48
- id
49
- }) {
50
- return this.httpRequest.request({
51
- method: "DELETE",
52
- url: "/v1/webhooks/{id}",
53
- path: {
54
- "id": id
55
- }
56
- });
57
- }
58
- updateWebhook({
59
- id,
60
- requestBody
61
- }) {
62
- return this.httpRequest.request({
63
- method: "PATCH",
64
- url: "/v1/webhooks/{id}",
65
- path: {
66
- "id": id
67
- },
68
- body: requestBody,
69
- mediaType: "application/json"
70
- });
71
- }
72
- generateSharedSecret() {
73
- return this.httpRequest.request({
74
- method: "POST",
75
- url: "/v1/webhooks:generateOrRotateSharedSecret"
76
- });
77
- }
78
- getSharedSecret() {
79
- return this.httpRequest.request({
80
- method: "GET",
81
- url: "/v1/webhooks:getSharedSecret"
82
- });
83
- }
84
11
  }
85
12
 
86
13
  export { DefaultService };
@@ -170,7 +170,7 @@ declare class PrimaryNetworkService {
170
170
  /**
171
171
  * The subnet ID to filter by. If not provided, then all subnets will be returned.
172
172
  */
173
- subnetId?: string;
173
+ subnetId?: any;
174
174
  }): CancelablePromise<ListValidatorDetailsResponse>;
175
175
  /**
176
176
  * Get single validator details
@@ -0,0 +1,95 @@
1
+ import { ListWebhooksResponse } from '../models/ListWebhooksResponse.js';
2
+ import { RegisterWebhookRequest } from '../models/RegisterWebhookRequest.js';
3
+ import { SharedSecretsResponse } from '../models/SharedSecretsResponse.js';
4
+ import { UpdateWebhookRequest } from '../models/UpdateWebhookRequest.js';
5
+ import { WebhookResponse } from '../models/WebhookResponse.js';
6
+ import { WebhookStatus } from '../models/WebhookStatus.js';
7
+ import { CancelablePromise } from '../core/CancelablePromise.js';
8
+ import { BaseHttpRequest } from '../core/BaseHttpRequest.js';
9
+
10
+ declare class WebhooksService {
11
+ readonly httpRequest: BaseHttpRequest;
12
+ constructor(httpRequest: BaseHttpRequest);
13
+ /**
14
+ * Register a webhook
15
+ * Registers a new webhook.
16
+ * @returns WebhookResponse
17
+ * @throws ApiError
18
+ */
19
+ registerWebhook({ requestBody, }: {
20
+ requestBody: RegisterWebhookRequest;
21
+ }): CancelablePromise<WebhookResponse>;
22
+ /**
23
+ * List webhooks
24
+ * Lists webhooks for the user.
25
+ * @returns ListWebhooksResponse
26
+ * @throws ApiError
27
+ */
28
+ listWebhooks({ pageToken, pageSize, status, }: {
29
+ /**
30
+ * A page token, received from a previous list call. Provide this to retrieve the subsequent page.
31
+ */
32
+ pageToken?: string;
33
+ /**
34
+ * The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
35
+ */
36
+ pageSize?: number;
37
+ /**
38
+ * Status of the webhook. Use "active" to return only active webhooks, "inactive" to return only inactive webhooks. Else if no status is provided, all configured webhooks will be returned.
39
+ */
40
+ status?: WebhookStatus;
41
+ }): CancelablePromise<ListWebhooksResponse>;
42
+ /**
43
+ * Get a webhook by ID
44
+ * Retrieves a webhook by ID.
45
+ * @returns WebhookResponse
46
+ * @throws ApiError
47
+ */
48
+ getWebhook({ id, }: {
49
+ /**
50
+ * The webhook identifier.
51
+ */
52
+ id: string;
53
+ }): CancelablePromise<WebhookResponse>;
54
+ /**
55
+ * Deactivate a webhook
56
+ * Deactivates a webhook by ID.
57
+ * @returns WebhookResponse
58
+ * @throws ApiError
59
+ */
60
+ deactivateWebhook({ id, }: {
61
+ /**
62
+ * The webhook identifier.
63
+ */
64
+ id: string;
65
+ }): CancelablePromise<WebhookResponse>;
66
+ /**
67
+ * Update a webhook
68
+ * Updates an existing webhook.
69
+ * @returns WebhookResponse
70
+ * @throws ApiError
71
+ */
72
+ updateWebhook({ id, requestBody, }: {
73
+ /**
74
+ * The webhook identifier.
75
+ */
76
+ id: string;
77
+ requestBody: UpdateWebhookRequest;
78
+ }): CancelablePromise<WebhookResponse>;
79
+ /**
80
+ * Generate a shared secret
81
+ * Generates a new shared secret.
82
+ * @returns SharedSecretsResponse
83
+ * @throws ApiError
84
+ */
85
+ generateSharedSecret(): CancelablePromise<SharedSecretsResponse>;
86
+ /**
87
+ * Get a shared secret
88
+ * Get a previously generated shared secret.
89
+ * @returns SharedSecretsResponse
90
+ * @throws ApiError
91
+ */
92
+ getSharedSecret(): CancelablePromise<SharedSecretsResponse>;
93
+ }
94
+
95
+ export { WebhooksService };
@@ -0,0 +1,80 @@
1
+ class WebhooksService {
2
+ constructor(httpRequest) {
3
+ this.httpRequest = httpRequest;
4
+ }
5
+ registerWebhook({
6
+ requestBody
7
+ }) {
8
+ return this.httpRequest.request({
9
+ method: "POST",
10
+ url: "/v1/webhooks",
11
+ body: requestBody,
12
+ mediaType: "application/json"
13
+ });
14
+ }
15
+ listWebhooks({
16
+ pageToken,
17
+ pageSize = 10,
18
+ status
19
+ }) {
20
+ return this.httpRequest.request({
21
+ method: "GET",
22
+ url: "/v1/webhooks",
23
+ query: {
24
+ "pageToken": pageToken,
25
+ "pageSize": pageSize,
26
+ "status": status
27
+ }
28
+ });
29
+ }
30
+ getWebhook({
31
+ id
32
+ }) {
33
+ return this.httpRequest.request({
34
+ method: "GET",
35
+ url: "/v1/webhooks/{id}",
36
+ path: {
37
+ "id": id
38
+ }
39
+ });
40
+ }
41
+ deactivateWebhook({
42
+ id
43
+ }) {
44
+ return this.httpRequest.request({
45
+ method: "DELETE",
46
+ url: "/v1/webhooks/{id}",
47
+ path: {
48
+ "id": id
49
+ }
50
+ });
51
+ }
52
+ updateWebhook({
53
+ id,
54
+ requestBody
55
+ }) {
56
+ return this.httpRequest.request({
57
+ method: "PATCH",
58
+ url: "/v1/webhooks/{id}",
59
+ path: {
60
+ "id": id
61
+ },
62
+ body: requestBody,
63
+ mediaType: "application/json"
64
+ });
65
+ }
66
+ generateSharedSecret() {
67
+ return this.httpRequest.request({
68
+ method: "POST",
69
+ url: "/v1/webhooks:generateOrRotateSharedSecret"
70
+ });
71
+ }
72
+ getSharedSecret() {
73
+ return this.httpRequest.request({
74
+ method: "GET",
75
+ url: "/v1/webhooks:getSharedSecret"
76
+ });
77
+ }
78
+ }
79
+
80
+ export { WebhooksService };
package/esm/index.d.ts CHANGED
@@ -199,3 +199,4 @@ export { PrimaryNetworkTransactionsService } from './generated/services/PrimaryN
199
199
  export { PrimaryNetworkUtxOsService } from './generated/services/PrimaryNetworkUtxOsService.js';
200
200
  export { PrimaryNetworkVerticesService } from './generated/services/PrimaryNetworkVerticesService.js';
201
201
  export { TeleporterService } from './generated/services/TeleporterService.js';
202
+ export { WebhooksService } from './generated/services/WebhooksService.js';
package/esm/index.js CHANGED
@@ -84,3 +84,4 @@ export { PrimaryNetworkTransactionsService } from './generated/services/PrimaryN
84
84
  export { PrimaryNetworkUtxOsService } from './generated/services/PrimaryNetworkUtxOsService.js';
85
85
  export { PrimaryNetworkVerticesService } from './generated/services/PrimaryNetworkVerticesService.js';
86
86
  export { TeleporterService } from './generated/services/TeleporterService.js';
87
+ export { WebhooksService } from './generated/services/WebhooksService.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avalabs/glacier-sdk",
3
- "version": "2.8.0-canary.5083b17.0+5083b17",
3
+ "version": "2.8.0-canary.52adf67.0+52adf67",
4
4
  "description": "sdk for interacting with glacier-api",
5
5
  "author": "Oliver Wang <oliver.wang@avalabs.org>",
6
6
  "homepage": "https://github.com/ava-labs/avalanche-sdks#readme",
@@ -29,5 +29,5 @@
29
29
  "bugs": {
30
30
  "url": "https://github.com/ava-labs/avalanche-sdks/issues"
31
31
  },
32
- "gitHead": "5083b17fab6a5bc77aa845d8a77f7c3b35436b02"
32
+ "gitHead": "52adf67425817e560819f68cc05ccd40442cf35a"
33
33
  }