@hydradb/sdk 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -23
- package/dist/Client.d.ts +29 -1
- package/dist/Client.js +124 -14
- package/dist/api/client/requests/ListProvidersRequest.d.ts +10 -0
- package/dist/api/client/requests/ListProvidersRequest.js +3 -0
- package/dist/api/client/requests/SearchQueryRequest.d.ts +29 -0
- package/dist/api/client/requests/index.d.ts +1 -0
- package/dist/api/errors/BadGatewayError.d.ts +6 -0
- package/dist/api/errors/BadGatewayError.js +54 -0
- package/dist/api/errors/ContentTooLargeError.d.ts +6 -0
- package/dist/api/errors/ContentTooLargeError.js +54 -0
- package/dist/api/errors/NotFoundError.d.ts +1 -2
- package/dist/api/errors/ServiceUnavailableError.d.ts +6 -0
- package/dist/api/errors/ServiceUnavailableError.js +54 -0
- package/dist/api/errors/index.d.ts +3 -0
- package/dist/api/errors/index.js +3 -0
- package/dist/api/resources/connectors/client/Client.d.ts +240 -0
- package/dist/api/resources/connectors/client/Client.js +1034 -0
- package/dist/api/resources/connectors/client/index.d.ts +1 -0
- package/dist/api/resources/connectors/client/index.js +17 -0
- package/dist/api/resources/connectors/client/requests/DeleteConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/DeleteConnectorsRequest.js +3 -0
- package/dist/api/resources/connectors/client/requests/DeleteResourceConnectorsRequest.d.ts +13 -0
- package/dist/api/resources/connectors/client/requests/DeleteResourceConnectorsRequest.js +3 -0
- package/dist/api/resources/connectors/client/requests/DiscoverConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/DiscoverConnectorsRequest.js +3 -0
- package/dist/api/resources/connectors/client/requests/GetConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/GetConnectorsRequest.js +3 -0
- package/dist/api/resources/connectors/client/requests/HandlerConfigureReq.d.ts +34 -0
- package/dist/api/resources/connectors/client/requests/HandlerConfigureReq.js +3 -0
- package/dist/api/resources/connectors/client/requests/HandlerConnectorCreateReq.d.ts +41 -0
- package/dist/api/resources/connectors/client/requests/HandlerConnectorCreateReq.js +3 -0
- package/dist/api/resources/connectors/client/requests/HandlerDiscoverPreviewReq.d.ts +17 -0
- package/dist/api/resources/connectors/client/requests/HandlerDiscoverPreviewReq.js +3 -0
- package/dist/api/resources/connectors/client/requests/HandlerResourceCreateReq.d.ts +34 -0
- package/dist/api/resources/connectors/client/requests/HandlerResourceCreateReq.js +3 -0
- package/dist/api/resources/connectors/client/requests/ListConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/ListConnectorsRequest.js +3 -0
- package/dist/api/resources/connectors/client/requests/ListResourcesConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/ListResourcesConnectorsRequest.js +3 -0
- package/dist/api/resources/connectors/client/requests/PatchConnectorsIdCredentialsRequest.d.ts +14 -0
- package/dist/api/resources/connectors/client/requests/PatchConnectorsIdCredentialsRequest.js +3 -0
- package/dist/api/resources/connectors/client/requests/SyncConnectorsRequest.d.ts +10 -0
- package/dist/api/resources/connectors/client/requests/SyncConnectorsRequest.js +3 -0
- package/dist/api/resources/connectors/client/requests/index.d.ts +12 -0
- package/dist/api/resources/connectors/client/requests/index.js +2 -0
- package/dist/api/resources/connectors/exports.d.ts +2 -0
- package/dist/api/resources/connectors/exports.js +21 -0
- package/dist/api/resources/connectors/index.d.ts +1 -0
- package/dist/api/resources/connectors/index.js +17 -0
- package/dist/api/resources/context/client/Client.d.ts +30 -20
- package/dist/api/resources/context/client/Client.js +104 -78
- package/dist/api/resources/context/client/requests/HandlerContextMetadataUpdateRequest.d.ts +17 -2
- package/dist/api/resources/context/client/requests/IngestContextRequest.d.ts +6 -3
- package/dist/api/resources/context/client/requests/InspectContextRequest.d.ts +12 -5
- package/dist/api/resources/context/client/requests/ListV2ListContentRequest.d.ts +7 -1
- package/dist/api/resources/context/client/requests/RelationsContextRequest.d.ts +14 -6
- package/dist/api/resources/context/client/requests/SourcesV2SourceDeleteRequest.d.ts +5 -1
- package/dist/api/resources/context/client/requests/StatusContextRequest.d.ts +10 -3
- package/dist/api/resources/context/index.d.ts +1 -0
- package/dist/api/resources/context/index.js +1 -0
- package/dist/api/resources/context/types/IngestContextRequestType.d.ts +5 -0
- package/dist/api/resources/context/types/IngestContextRequestType.js +8 -0
- package/dist/api/resources/context/types/ListV2ListContentRequestType.d.ts +6 -0
- package/dist/api/resources/context/types/ListV2ListContentRequestType.js +9 -0
- package/dist/api/resources/context/types/RelationsContextRequestType.d.ts +5 -0
- package/dist/api/resources/context/types/RelationsContextRequestType.js +8 -0
- package/dist/api/resources/context/types/SourcesV2SourceDeleteRequestType.d.ts +6 -0
- package/dist/api/resources/context/types/SourcesV2SourceDeleteRequestType.js +9 -0
- package/dist/api/resources/context/types/index.d.ts +4 -0
- package/dist/api/resources/context/types/index.js +20 -0
- package/dist/api/resources/databases/client/Client.d.ts +23 -5
- package/dist/api/resources/databases/client/Client.js +96 -28
- package/dist/api/resources/databases/client/requests/CollectionsDatabasesRequest.d.ts +1 -1
- package/dist/api/resources/databases/client/requests/DeleteDatabasesRequest.d.ts +1 -1
- package/dist/api/resources/databases/client/requests/StatsDatabasesRequest.d.ts +1 -1
- package/dist/api/resources/databases/client/requests/StatusDatabasesRequest.d.ts +1 -1
- package/dist/api/resources/databases/client/requests/TenantsTenantCreateRequest.d.ts +5 -0
- package/dist/api/resources/databases/client/requests/TenantsTenantMetadataSchemaUpdateRequest.d.ts +13 -0
- package/dist/api/resources/databases/client/requests/TenantsTenantMetadataSchemaUpdateRequest.js +3 -0
- package/dist/api/resources/databases/client/requests/index.d.ts +1 -0
- package/dist/api/resources/index.d.ts +3 -0
- package/dist/api/resources/index.js +4 -1
- package/dist/api/resources/webhooks/client/Client.d.ts +15 -3
- package/dist/api/resources/webhooks/client/Client.js +19 -31
- package/dist/api/resources/webhooks/client/requests/GetDeliveryWebhooksRequest.d.ts +1 -1
- package/dist/api/resources/webhooks/client/requests/RetryDeliveryWebhooksRequest.d.ts +1 -1
- package/dist/api/resources/webhooks/client/requests/WebhooksWebhookRegisterRequest.d.ts +3 -0
- package/dist/api/types/ConnectorsConnector.d.ts +58 -0
- package/dist/api/types/ConnectorsConnector.js +3 -0
- package/dist/api/types/ConnectorsResource.d.ts +71 -0
- package/dist/api/types/ConnectorsResource.js +3 -0
- package/dist/api/types/DashboardPaginationMeta.d.ts +6 -0
- package/dist/api/types/FetchV2SourceFetchResponse.d.ts +10 -0
- package/dist/api/types/GithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.d.ts +13 -0
- package/dist/api/types/GraphEntity.d.ts +12 -0
- package/dist/api/types/GraphGraphRelationsResponse.d.ts +4 -0
- package/dist/api/types/GraphRelationEvidence.d.ts +6 -0
- package/dist/api/types/GraphTripletWithEvidence.d.ts +2 -0
- package/dist/api/types/HandlerApiError.d.ts +2 -0
- package/dist/api/types/HandlerDeprecationNotice.d.ts +5 -0
- package/dist/api/types/HandlerEnvelopeFetchV2SourceFetchResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeGithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeGraphGraphRelationsResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeIngestionV2BatchProcessingStatus.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeIngestionV2SourceUploadResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeListV2SourceListResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeSearchV2RetrievalResult.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeSourcesMemoryDeleteResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeTenantsInfraStatusResponseV2.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeTenantsSubTenantIdsResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeTenantsTenantCreateAcceptedResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeTenantsTenantDeleteResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeTenantsTenantIdsResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeTenantsTenantStatsResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeWebhooksDeliveryItem.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeWebhooksDeliveryListResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeWebhooksRetryResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeWebhooksWebhookDeleteResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeWebhooksWebhookGetResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeWebhooksWebhookRegisterResponse.d.ts +2 -0
- package/dist/api/types/HandlerEnvelopeWebhooksWebhookTestResponse.d.ts +2 -0
- package/dist/api/types/HandlerErrorDetail.d.ts +6 -0
- package/dist/api/types/HandlerErrorResponse.d.ts +1 -0
- package/dist/api/types/HandlerMetadataSchemaUpdateResponse.d.ts +7 -0
- package/dist/api/types/HandlerMetadataSchemaUpdateResponse.js +3 -0
- package/dist/api/types/HandlerResourceMapping.d.ts +46 -0
- package/dist/api/types/HandlerResourceMapping.js +3 -0
- package/dist/api/types/HandlerResponseMeta.d.ts +5 -0
- package/dist/api/types/IngestionV2BatchProcessingStatus.d.ts +1 -0
- package/dist/api/types/IngestionV2ProcessingStatus.d.ts +6 -0
- package/dist/api/types/IngestionV2SourceUploadResponse.d.ts +5 -0
- package/dist/api/types/IngestionV2SourceUploadResultItem.d.ts +7 -0
- package/dist/api/types/ListSourceListResponse.d.ts +4 -0
- package/dist/api/types/SearchGraphContext.d.ts +4 -0
- package/dist/api/types/SearchPathTriplet.d.ts +3 -0
- package/dist/api/types/SearchScoredPathResponse.d.ts +5 -0
- package/dist/api/types/SearchSourceInfo.d.ts +10 -0
- package/dist/api/types/SearchV2Chunk.d.ts +12 -0
- package/dist/api/types/SearchV2RetrievalResult.d.ts +3 -0
- package/dist/api/types/SourcesMemoryDeleteResponse.d.ts +5 -0
- package/dist/api/types/SourcesSourceDeleteResultItem.d.ts +3 -0
- package/dist/api/types/TenantsCollectionStats.d.ts +2 -0
- package/dist/api/types/TenantsCustomPropertyDefinition.d.ts +7 -0
- package/dist/api/types/TenantsFailedTenant.d.ts +2 -0
- package/dist/api/types/TenantsInfraStatusResponseV2.d.ts +3 -0
- package/dist/api/types/TenantsInfraV2.d.ts +2 -0
- package/dist/api/types/TenantsSubTenantIdsResponse.d.ts +3 -0
- package/dist/api/types/TenantsTenantCreateAcceptedResponse.d.ts +3 -0
- package/dist/api/types/TenantsTenantDeleteResponse.d.ts +3 -0
- package/dist/api/types/TenantsTenantIdsResponse.d.ts +5 -0
- package/dist/api/types/TenantsTenantStatsResponse.d.ts +2 -0
- package/dist/api/types/TenantsVectorstoreStatusV2.d.ts +2 -0
- package/dist/api/types/WebhooksDeliveryItem.d.ts +10 -0
- package/dist/api/types/WebhooksDeliveryListResponse.d.ts +3 -0
- package/dist/api/types/WebhooksRetryResponse.d.ts +3 -0
- package/dist/api/types/WebhooksWebhookDeleteResponse.d.ts +2 -0
- package/dist/api/types/WebhooksWebhookGetResponse.d.ts +4 -0
- package/dist/api/types/WebhooksWebhookRegisterResponse.d.ts +5 -0
- package/dist/api/types/WebhooksWebhookTestResponse.d.ts +3 -0
- package/dist/api/types/index.d.ts +4 -0
- package/dist/api/types/index.js +4 -0
- package/dist/auth/BearerAuthProvider.d.ts +1 -1
- package/dist/serialization/client/catalog.d.ts +6 -0
- package/dist/serialization/client/catalog.js +39 -0
- package/dist/serialization/client/index.d.ts +2 -0
- package/dist/serialization/client/index.js +25 -0
- package/dist/serialization/client/listProviders.d.ts +6 -0
- package/dist/serialization/client/listProviders.js +39 -0
- package/dist/serialization/client/requests/SearchQueryRequest.d.ts +2 -0
- package/dist/serialization/client/requests/SearchQueryRequest.js +2 -0
- package/dist/serialization/resources/connectors/client/configure.d.ts +6 -0
- package/dist/serialization/resources/connectors/client/configure.js +39 -0
- package/dist/serialization/resources/connectors/client/delete.d.ts +6 -0
- package/dist/serialization/resources/connectors/client/delete.js +39 -0
- package/dist/serialization/resources/connectors/client/deleteResource.d.ts +6 -0
- package/dist/serialization/resources/connectors/client/deleteResource.js +39 -0
- package/dist/serialization/resources/connectors/client/discover.d.ts +6 -0
- package/dist/serialization/resources/connectors/client/discover.js +39 -0
- package/dist/serialization/resources/connectors/client/discoverPreview.d.ts +6 -0
- package/dist/serialization/resources/connectors/client/discoverPreview.js +39 -0
- package/dist/serialization/resources/connectors/client/index.d.ts +10 -0
- package/dist/serialization/resources/connectors/client/index.js +49 -0
- package/dist/serialization/resources/connectors/client/list.d.ts +6 -0
- package/dist/serialization/resources/connectors/client/list.js +39 -0
- package/dist/serialization/resources/connectors/client/listResources.d.ts +6 -0
- package/dist/serialization/resources/connectors/client/listResources.js +39 -0
- package/dist/serialization/resources/connectors/client/requests/HandlerConfigureReq.d.ts +12 -0
- package/dist/serialization/resources/connectors/client/requests/HandlerConfigureReq.js +44 -0
- package/dist/serialization/resources/connectors/client/requests/HandlerConnectorCreateReq.d.ts +21 -0
- package/dist/serialization/resources/connectors/client/requests/HandlerConnectorCreateReq.js +53 -0
- package/dist/serialization/resources/connectors/client/requests/HandlerDiscoverPreviewReq.d.ts +11 -0
- package/dist/serialization/resources/connectors/client/requests/HandlerDiscoverPreviewReq.js +43 -0
- package/dist/serialization/resources/connectors/client/requests/HandlerResourceCreateReq.d.ts +19 -0
- package/dist/serialization/resources/connectors/client/requests/HandlerResourceCreateReq.js +51 -0
- package/dist/serialization/resources/connectors/client/requests/index.d.ts +4 -0
- package/dist/serialization/resources/connectors/client/requests/index.js +11 -0
- package/dist/serialization/resources/connectors/client/rotateAConnectorsStoredOAuthRefreshToken.d.ts +10 -0
- package/dist/serialization/resources/connectors/client/rotateAConnectorsStoredOAuthRefreshToken.js +40 -0
- package/dist/serialization/resources/connectors/client/sync.d.ts +6 -0
- package/dist/serialization/resources/connectors/client/sync.js +39 -0
- package/dist/serialization/resources/connectors/index.d.ts +1 -0
- package/dist/serialization/resources/connectors/index.js +17 -0
- package/dist/serialization/resources/context/client/requests/HandlerContextMetadataUpdateRequest.d.ts +4 -1
- package/dist/serialization/resources/context/client/requests/HandlerContextMetadataUpdateRequest.js +3 -0
- package/dist/serialization/resources/context/client/requests/ListV2ListContentRequest.d.ts +2 -1
- package/dist/serialization/resources/context/client/requests/ListV2ListContentRequest.js +2 -1
- package/dist/serialization/resources/context/client/requests/SourcesV2SourceDeleteRequest.d.ts +2 -1
- package/dist/serialization/resources/context/client/requests/SourcesV2SourceDeleteRequest.js +2 -1
- package/dist/serialization/resources/context/index.d.ts +1 -0
- package/dist/serialization/resources/context/index.js +1 -0
- package/dist/serialization/resources/context/types/IngestContextRequestType.d.ts +7 -0
- package/dist/serialization/resources/context/types/IngestContextRequestType.js +39 -0
- package/dist/serialization/resources/context/types/ListV2ListContentRequestType.d.ts +7 -0
- package/dist/serialization/resources/context/types/ListV2ListContentRequestType.js +39 -0
- package/dist/serialization/resources/context/types/RelationsContextRequestType.d.ts +7 -0
- package/dist/serialization/resources/context/types/RelationsContextRequestType.js +39 -0
- package/dist/serialization/resources/context/types/SourcesV2SourceDeleteRequestType.d.ts +7 -0
- package/dist/serialization/resources/context/types/SourcesV2SourceDeleteRequestType.js +39 -0
- package/dist/serialization/resources/context/types/index.d.ts +4 -0
- package/dist/serialization/resources/context/types/index.js +20 -0
- package/dist/serialization/resources/databases/client/requests/TenantsTenantCreateRequest.d.ts +1 -0
- package/dist/serialization/resources/databases/client/requests/TenantsTenantCreateRequest.js +1 -0
- package/dist/serialization/resources/databases/client/requests/TenantsTenantMetadataSchemaUpdateRequest.d.ts +10 -0
- package/dist/serialization/resources/databases/client/requests/TenantsTenantMetadataSchemaUpdateRequest.js +42 -0
- package/dist/serialization/resources/databases/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/databases/client/requests/index.js +3 -1
- package/dist/serialization/resources/index.d.ts +3 -0
- package/dist/serialization/resources/index.js +4 -1
- package/dist/serialization/types/ConnectorsConnector.d.ts +30 -0
- package/dist/serialization/types/ConnectorsConnector.js +62 -0
- package/dist/serialization/types/ConnectorsResource.d.ts +26 -0
- package/dist/serialization/types/ConnectorsResource.js +58 -0
- package/dist/serialization/types/GithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.d.ts +1 -0
- package/dist/serialization/types/GithubComHydradbHydradbApplicationInternalServiceMetadataEditResult.js +1 -0
- package/dist/serialization/types/GraphEntity.d.ts +1 -0
- package/dist/serialization/types/GraphEntity.js +1 -0
- package/dist/serialization/types/HandlerMetadataSchemaUpdateResponse.d.ts +11 -0
- package/dist/serialization/types/HandlerMetadataSchemaUpdateResponse.js +43 -0
- package/dist/serialization/types/HandlerResourceMapping.d.ts +17 -0
- package/dist/serialization/types/HandlerResourceMapping.js +49 -0
- package/dist/serialization/types/index.d.ts +4 -0
- package/dist/serialization/types/index.js +4 -0
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ export declare namespace DatabasesClient {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class DatabasesClient {
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<DatabasesClient.Options>;
|
|
12
|
-
constructor(options
|
|
12
|
+
constructor(options?: DatabasesClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* List all databases for the authenticated user
|
|
15
15
|
*
|
|
@@ -50,7 +50,7 @@ export declare class DatabasesClient {
|
|
|
50
50
|
*
|
|
51
51
|
* @example
|
|
52
52
|
* await client.databases.delete({
|
|
53
|
-
* database: "
|
|
53
|
+
* database: "acme_corp"
|
|
54
54
|
* })
|
|
55
55
|
*/
|
|
56
56
|
delete(request: HydraDB.DeleteDatabasesRequest, requestOptions?: DatabasesClient.RequestOptions): core.HttpResponsePromise<HydraDB.HandlerEnvelopeTenantsTenantDeleteResponse>;
|
|
@@ -67,7 +67,7 @@ export declare class DatabasesClient {
|
|
|
67
67
|
*
|
|
68
68
|
* @example
|
|
69
69
|
* await client.databases.collections({
|
|
70
|
-
* database: "
|
|
70
|
+
* database: "acme_corp"
|
|
71
71
|
* })
|
|
72
72
|
*/
|
|
73
73
|
collections(request: HydraDB.CollectionsDatabasesRequest, requestOptions?: DatabasesClient.RequestOptions): core.HttpResponsePromise<HydraDB.HandlerEnvelopeTenantsSubTenantIdsResponse>;
|
|
@@ -84,7 +84,7 @@ export declare class DatabasesClient {
|
|
|
84
84
|
*
|
|
85
85
|
* @example
|
|
86
86
|
* await client.databases.stats({
|
|
87
|
-
* database: "
|
|
87
|
+
* database: "acme_corp"
|
|
88
88
|
* })
|
|
89
89
|
*/
|
|
90
90
|
stats(request: HydraDB.StatsDatabasesRequest, requestOptions?: DatabasesClient.RequestOptions): core.HttpResponsePromise<HydraDB.HandlerEnvelopeTenantsTenantStatsResponse>;
|
|
@@ -101,9 +101,27 @@ export declare class DatabasesClient {
|
|
|
101
101
|
*
|
|
102
102
|
* @example
|
|
103
103
|
* await client.databases.status({
|
|
104
|
-
* database: "
|
|
104
|
+
* database: "acme_corp"
|
|
105
105
|
* })
|
|
106
106
|
*/
|
|
107
107
|
status(request: HydraDB.StatusDatabasesRequest, requestOptions?: DatabasesClient.RequestOptions): core.HttpResponsePromise<HydraDB.HandlerEnvelopeTenantsInfraStatusResponseV2>;
|
|
108
108
|
private __status;
|
|
109
|
+
/**
|
|
110
|
+
* Add new metadata schema fields to an existing database. Additive only — existing fields cannot be deleted or retyped.
|
|
111
|
+
*
|
|
112
|
+
* @param {HydraDB.TenantsTenantMetadataSchemaUpdateRequest} request
|
|
113
|
+
* @param {DatabasesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
114
|
+
*
|
|
115
|
+
* @throws {@link HydraDB.BadRequestError}
|
|
116
|
+
* @throws {@link HydraDB.NotFoundError}
|
|
117
|
+
* @throws {@link HydraDB.ConflictError}
|
|
118
|
+
* @throws {@link HydraDB.InternalServerError}
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* await client.databases.updateMetadataSchema({
|
|
122
|
+
* database: "acme_corp"
|
|
123
|
+
* })
|
|
124
|
+
*/
|
|
125
|
+
updateMetadataSchema(request: HydraDB.TenantsTenantMetadataSchemaUpdateRequest, requestOptions?: DatabasesClient.RequestOptions): core.HttpResponsePromise<HydraDB.HandlerMetadataSchemaUpdateResponse>;
|
|
126
|
+
private __updateMetadataSchema;
|
|
109
127
|
}
|
|
@@ -44,7 +44,7 @@ const errors = __importStar(require("../../../../errors/index.js"));
|
|
|
44
44
|
const serializers = __importStar(require("../../../../serialization/index.js"));
|
|
45
45
|
const HydraDB = __importStar(require("../../../index.js"));
|
|
46
46
|
class DatabasesClient {
|
|
47
|
-
constructor(options) {
|
|
47
|
+
constructor(options = {}) {
|
|
48
48
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
@@ -215,7 +215,7 @@ class DatabasesClient {
|
|
|
215
215
|
*
|
|
216
216
|
* @example
|
|
217
217
|
* await client.databases.delete({
|
|
218
|
-
* database: "
|
|
218
|
+
* database: "acme_corp"
|
|
219
219
|
* })
|
|
220
220
|
*/
|
|
221
221
|
delete(request, requestOptions) {
|
|
@@ -268,13 +268,7 @@ class DatabasesClient {
|
|
|
268
268
|
breadcrumbsPrefix: ["response"],
|
|
269
269
|
}), _response.rawResponse);
|
|
270
270
|
case 404:
|
|
271
|
-
throw new HydraDB.NotFoundError(
|
|
272
|
-
unrecognizedObjectKeys: "passthrough",
|
|
273
|
-
allowUnrecognizedUnionMembers: true,
|
|
274
|
-
allowUnrecognizedEnumValues: true,
|
|
275
|
-
skipValidation: true,
|
|
276
|
-
breadcrumbsPrefix: ["response"],
|
|
277
|
-
}), _response.rawResponse);
|
|
271
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
278
272
|
case 500:
|
|
279
273
|
throw new HydraDB.InternalServerError(serializers.HandlerErrorResponse.parseOrThrow(_response.error.body, {
|
|
280
274
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -305,7 +299,7 @@ class DatabasesClient {
|
|
|
305
299
|
*
|
|
306
300
|
* @example
|
|
307
301
|
* await client.databases.collections({
|
|
308
|
-
* database: "
|
|
302
|
+
* database: "acme_corp"
|
|
309
303
|
* })
|
|
310
304
|
*/
|
|
311
305
|
collections(request, requestOptions) {
|
|
@@ -358,13 +352,7 @@ class DatabasesClient {
|
|
|
358
352
|
breadcrumbsPrefix: ["response"],
|
|
359
353
|
}), _response.rawResponse);
|
|
360
354
|
case 404:
|
|
361
|
-
throw new HydraDB.NotFoundError(
|
|
362
|
-
unrecognizedObjectKeys: "passthrough",
|
|
363
|
-
allowUnrecognizedUnionMembers: true,
|
|
364
|
-
allowUnrecognizedEnumValues: true,
|
|
365
|
-
skipValidation: true,
|
|
366
|
-
breadcrumbsPrefix: ["response"],
|
|
367
|
-
}), _response.rawResponse);
|
|
355
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
368
356
|
case 500:
|
|
369
357
|
throw new HydraDB.InternalServerError(serializers.HandlerErrorResponse.parseOrThrow(_response.error.body, {
|
|
370
358
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -395,7 +383,7 @@ class DatabasesClient {
|
|
|
395
383
|
*
|
|
396
384
|
* @example
|
|
397
385
|
* await client.databases.stats({
|
|
398
|
-
* database: "
|
|
386
|
+
* database: "acme_corp"
|
|
399
387
|
* })
|
|
400
388
|
*/
|
|
401
389
|
stats(request, requestOptions) {
|
|
@@ -448,13 +436,7 @@ class DatabasesClient {
|
|
|
448
436
|
breadcrumbsPrefix: ["response"],
|
|
449
437
|
}), _response.rawResponse);
|
|
450
438
|
case 404:
|
|
451
|
-
throw new HydraDB.NotFoundError(
|
|
452
|
-
unrecognizedObjectKeys: "passthrough",
|
|
453
|
-
allowUnrecognizedUnionMembers: true,
|
|
454
|
-
allowUnrecognizedEnumValues: true,
|
|
455
|
-
skipValidation: true,
|
|
456
|
-
breadcrumbsPrefix: ["response"],
|
|
457
|
-
}), _response.rawResponse);
|
|
439
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
458
440
|
case 500:
|
|
459
441
|
throw new HydraDB.InternalServerError(serializers.HandlerErrorResponse.parseOrThrow(_response.error.body, {
|
|
460
442
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -485,7 +467,7 @@ class DatabasesClient {
|
|
|
485
467
|
*
|
|
486
468
|
* @example
|
|
487
469
|
* await client.databases.status({
|
|
488
|
-
* database: "
|
|
470
|
+
* database: "acme_corp"
|
|
489
471
|
* })
|
|
490
472
|
*/
|
|
491
473
|
status(request, requestOptions) {
|
|
@@ -538,7 +520,93 @@ class DatabasesClient {
|
|
|
538
520
|
breadcrumbsPrefix: ["response"],
|
|
539
521
|
}), _response.rawResponse);
|
|
540
522
|
case 404:
|
|
541
|
-
throw new HydraDB.NotFoundError(
|
|
523
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
524
|
+
case 500:
|
|
525
|
+
throw new HydraDB.InternalServerError(serializers.HandlerErrorResponse.parseOrThrow(_response.error.body, {
|
|
526
|
+
unrecognizedObjectKeys: "passthrough",
|
|
527
|
+
allowUnrecognizedUnionMembers: true,
|
|
528
|
+
allowUnrecognizedEnumValues: true,
|
|
529
|
+
skipValidation: true,
|
|
530
|
+
breadcrumbsPrefix: ["response"],
|
|
531
|
+
}), _response.rawResponse);
|
|
532
|
+
default:
|
|
533
|
+
throw new errors.HydraDBError({
|
|
534
|
+
statusCode: _response.error.statusCode,
|
|
535
|
+
body: _response.error.body,
|
|
536
|
+
rawResponse: _response.rawResponse,
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/databases/status");
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Add new metadata schema fields to an existing database. Additive only — existing fields cannot be deleted or retyped.
|
|
544
|
+
*
|
|
545
|
+
* @param {HydraDB.TenantsTenantMetadataSchemaUpdateRequest} request
|
|
546
|
+
* @param {DatabasesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
547
|
+
*
|
|
548
|
+
* @throws {@link HydraDB.BadRequestError}
|
|
549
|
+
* @throws {@link HydraDB.NotFoundError}
|
|
550
|
+
* @throws {@link HydraDB.ConflictError}
|
|
551
|
+
* @throws {@link HydraDB.InternalServerError}
|
|
552
|
+
*
|
|
553
|
+
* @example
|
|
554
|
+
* await client.databases.updateMetadataSchema({
|
|
555
|
+
* database: "acme_corp"
|
|
556
|
+
* })
|
|
557
|
+
*/
|
|
558
|
+
updateMetadataSchema(request, requestOptions) {
|
|
559
|
+
return core.HttpResponsePromise.fromPromise(this.__updateMetadataSchema(request, requestOptions));
|
|
560
|
+
}
|
|
561
|
+
async __updateMetadataSchema(request, requestOptions) {
|
|
562
|
+
const { database, ..._body } = request;
|
|
563
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
564
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "API-Version": requestOptions?.apiVersion ?? this._options?.apiVersion ?? "2" }), requestOptions?.headers);
|
|
565
|
+
const _response = await core.fetcher({
|
|
566
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
567
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
568
|
+
environments.HydraDBEnvironment.Default, `databases/${core.url.encodePathParam(database)}/metadata-schema`),
|
|
569
|
+
method: "PATCH",
|
|
570
|
+
headers: _headers,
|
|
571
|
+
contentType: "application/json",
|
|
572
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
573
|
+
requestType: "json",
|
|
574
|
+
body: serializers.TenantsTenantMetadataSchemaUpdateRequest.jsonOrThrow(_body, {
|
|
575
|
+
unrecognizedObjectKeys: "strip",
|
|
576
|
+
omitUndefined: true,
|
|
577
|
+
}),
|
|
578
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
579
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
580
|
+
abortSignal: requestOptions?.abortSignal,
|
|
581
|
+
fetchFn: this._options?.fetch,
|
|
582
|
+
logging: this._options.logging,
|
|
583
|
+
});
|
|
584
|
+
if (_response.ok) {
|
|
585
|
+
return {
|
|
586
|
+
data: serializers.HandlerMetadataSchemaUpdateResponse.parseOrThrow(_response.body, {
|
|
587
|
+
unrecognizedObjectKeys: "passthrough",
|
|
588
|
+
allowUnrecognizedUnionMembers: true,
|
|
589
|
+
allowUnrecognizedEnumValues: true,
|
|
590
|
+
skipValidation: true,
|
|
591
|
+
breadcrumbsPrefix: ["response"],
|
|
592
|
+
}),
|
|
593
|
+
rawResponse: _response.rawResponse,
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
if (_response.error.reason === "status-code") {
|
|
597
|
+
switch (_response.error.statusCode) {
|
|
598
|
+
case 400:
|
|
599
|
+
throw new HydraDB.BadRequestError(serializers.HandlerErrorResponse.parseOrThrow(_response.error.body, {
|
|
600
|
+
unrecognizedObjectKeys: "passthrough",
|
|
601
|
+
allowUnrecognizedUnionMembers: true,
|
|
602
|
+
allowUnrecognizedEnumValues: true,
|
|
603
|
+
skipValidation: true,
|
|
604
|
+
breadcrumbsPrefix: ["response"],
|
|
605
|
+
}), _response.rawResponse);
|
|
606
|
+
case 404:
|
|
607
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
608
|
+
case 409:
|
|
609
|
+
throw new HydraDB.ConflictError(serializers.HandlerErrorResponse.parseOrThrow(_response.error.body, {
|
|
542
610
|
unrecognizedObjectKeys: "passthrough",
|
|
543
611
|
allowUnrecognizedUnionMembers: true,
|
|
544
612
|
allowUnrecognizedEnumValues: true,
|
|
@@ -561,7 +629,7 @@ class DatabasesClient {
|
|
|
561
629
|
});
|
|
562
630
|
}
|
|
563
631
|
}
|
|
564
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "
|
|
632
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/databases/{database}/metadata-schema");
|
|
565
633
|
}
|
|
566
634
|
}
|
|
567
635
|
exports.DatabasesClient = DatabasesClient;
|
|
@@ -10,9 +10,14 @@ export interface TenantsTenantCreateRequest {
|
|
|
10
10
|
* this binds, so TenantID is always populated.
|
|
11
11
|
*/
|
|
12
12
|
database?: string;
|
|
13
|
+
/** Defines database-level metadata fields for exact-match filtering and semantic/BM25 search. Canonical name; `tenant_metadata_schema` is a deprecated alias. Schema field names are immutable after database creation. */
|
|
14
|
+
databaseMetadataSchema?: HydraDB.TenantsCustomPropertyDefinition[];
|
|
15
|
+
/** Override for the embedding vector dimension. Default: 1536. */
|
|
13
16
|
embeddingsDimension?: number;
|
|
17
|
+
/** Internal flag for embedding-only databases. */
|
|
14
18
|
isEmbeddingsTenant?: boolean;
|
|
15
19
|
/** deprecated: use database */
|
|
16
20
|
tenantId?: string;
|
|
21
|
+
/** deprecated: use database_metadata_schema */
|
|
17
22
|
tenantMetadataSchema?: HydraDB.TenantsCustomPropertyDefinition[];
|
|
18
23
|
}
|
package/dist/api/resources/databases/client/requests/TenantsTenantMetadataSchemaUpdateRequest.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as HydraDB from "../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* database: "acme_corp"
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface TenantsTenantMetadataSchemaUpdateRequest {
|
|
9
|
+
/** Database identifier */
|
|
10
|
+
database: string;
|
|
11
|
+
/** New metadata schema fields to add to the database. Additive only — no deletes, renames, or type changes. */
|
|
12
|
+
addFields?: HydraDB.TenantsCustomPropertyDefinition[];
|
|
13
|
+
}
|
|
@@ -3,3 +3,4 @@ export type { DeleteDatabasesRequest } from "./DeleteDatabasesRequest.js";
|
|
|
3
3
|
export type { StatsDatabasesRequest } from "./StatsDatabasesRequest.js";
|
|
4
4
|
export type { StatusDatabasesRequest } from "./StatusDatabasesRequest.js";
|
|
5
5
|
export type { TenantsTenantCreateRequest } from "./TenantsTenantCreateRequest.js";
|
|
6
|
+
export type { TenantsTenantMetadataSchemaUpdateRequest } from "./TenantsTenantMetadataSchemaUpdateRequest.js";
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
export * from "./connectors/client/requests/index.js";
|
|
2
|
+
export * as connectors from "./connectors/index.js";
|
|
1
3
|
export * from "./context/client/requests/index.js";
|
|
2
4
|
export * as context from "./context/index.js";
|
|
5
|
+
export * from "./context/types/index.js";
|
|
3
6
|
export * from "./databases/client/requests/index.js";
|
|
4
7
|
export * as databases from "./databases/index.js";
|
|
5
8
|
export * from "./webhooks/client/requests/index.js";
|
|
@@ -36,9 +36,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.webhooks = exports.databases = exports.context = void 0;
|
|
39
|
+
exports.webhooks = exports.databases = exports.context = exports.connectors = void 0;
|
|
40
|
+
__exportStar(require("./connectors/client/requests/index.js"), exports);
|
|
41
|
+
exports.connectors = __importStar(require("./connectors/index.js"));
|
|
40
42
|
__exportStar(require("./context/client/requests/index.js"), exports);
|
|
41
43
|
exports.context = __importStar(require("./context/index.js"));
|
|
44
|
+
__exportStar(require("./context/types/index.js"), exports);
|
|
42
45
|
__exportStar(require("./databases/client/requests/index.js"), exports);
|
|
43
46
|
exports.databases = __importStar(require("./databases/index.js"));
|
|
44
47
|
__exportStar(require("./webhooks/client/requests/index.js"), exports);
|
|
@@ -9,8 +9,10 @@ export declare namespace WebhooksClient {
|
|
|
9
9
|
}
|
|
10
10
|
export declare class WebhooksClient {
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<WebhooksClient.Options>;
|
|
12
|
-
constructor(options
|
|
12
|
+
constructor(options?: WebhooksClient.Options);
|
|
13
13
|
/**
|
|
14
|
+
* Get the registered indexing webhook configuration for this API key.
|
|
15
|
+
*
|
|
14
16
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
15
17
|
*
|
|
16
18
|
* @example
|
|
@@ -32,6 +34,8 @@ export declare class WebhooksClient {
|
|
|
32
34
|
register(request?: HydraDB.WebhooksWebhookRegisterRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<HydraDB.HandlerEnvelopeWebhooksWebhookRegisterResponse>;
|
|
33
35
|
private __register;
|
|
34
36
|
/**
|
|
37
|
+
* Unregister the indexing webhook for this API key.
|
|
38
|
+
*
|
|
35
39
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
40
|
*
|
|
37
41
|
* @throws {@link HydraDB.NotFoundError}
|
|
@@ -42,6 +46,8 @@ export declare class WebhooksClient {
|
|
|
42
46
|
delete(requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<HydraDB.HandlerEnvelopeWebhooksWebhookDeleteResponse>;
|
|
43
47
|
private __delete;
|
|
44
48
|
/**
|
|
49
|
+
* List recent webhook delivery attempts with optional cursor-based pagination.
|
|
50
|
+
*
|
|
45
51
|
* @param {HydraDB.ListDeliveriesWebhooksRequest} request
|
|
46
52
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
47
53
|
*
|
|
@@ -51,6 +57,8 @@ export declare class WebhooksClient {
|
|
|
51
57
|
listDeliveries(request?: HydraDB.ListDeliveriesWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<HydraDB.HandlerEnvelopeWebhooksDeliveryListResponse>;
|
|
52
58
|
private __listDeliveries;
|
|
53
59
|
/**
|
|
60
|
+
* Get a single webhook delivery attempt by ID.
|
|
61
|
+
*
|
|
54
62
|
* @param {HydraDB.GetDeliveryWebhooksRequest} request
|
|
55
63
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
64
|
*
|
|
@@ -58,12 +66,14 @@ export declare class WebhooksClient {
|
|
|
58
66
|
*
|
|
59
67
|
* @example
|
|
60
68
|
* await client.webhooks.getDelivery({
|
|
61
|
-
* deliveryId: "
|
|
69
|
+
* deliveryId: "dlv_9f8e7d6c"
|
|
62
70
|
* })
|
|
63
71
|
*/
|
|
64
72
|
getDelivery(request: HydraDB.GetDeliveryWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<HydraDB.HandlerEnvelopeWebhooksDeliveryItem>;
|
|
65
73
|
private __getDelivery;
|
|
66
74
|
/**
|
|
75
|
+
* Queue a failed or permanently-failed delivery for retry.
|
|
76
|
+
*
|
|
67
77
|
* @param {HydraDB.RetryDeliveryWebhooksRequest} request
|
|
68
78
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
69
79
|
*
|
|
@@ -71,12 +81,14 @@ export declare class WebhooksClient {
|
|
|
71
81
|
*
|
|
72
82
|
* @example
|
|
73
83
|
* await client.webhooks.retryDelivery({
|
|
74
|
-
* deliveryId: "
|
|
84
|
+
* deliveryId: "dlv_9f8e7d6c"
|
|
75
85
|
* })
|
|
76
86
|
*/
|
|
77
87
|
retryDelivery(request: HydraDB.RetryDeliveryWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<HydraDB.HandlerEnvelopeWebhooksRetryResponse>;
|
|
78
88
|
private __retryDelivery;
|
|
79
89
|
/**
|
|
90
|
+
* Send a test webhook event to the registered endpoint to verify connectivity.
|
|
91
|
+
*
|
|
80
92
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
93
|
*
|
|
82
94
|
* @throws {@link HydraDB.NotFoundError}
|
|
@@ -44,10 +44,12 @@ const errors = __importStar(require("../../../../errors/index.js"));
|
|
|
44
44
|
const serializers = __importStar(require("../../../../serialization/index.js"));
|
|
45
45
|
const HydraDB = __importStar(require("../../../index.js"));
|
|
46
46
|
class WebhooksClient {
|
|
47
|
-
constructor(options) {
|
|
47
|
+
constructor(options = {}) {
|
|
48
48
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
|
+
* Get the registered indexing webhook configuration for this API key.
|
|
52
|
+
*
|
|
51
53
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
52
54
|
*
|
|
53
55
|
* @example
|
|
@@ -162,6 +164,8 @@ class WebhooksClient {
|
|
|
162
164
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/webhooks/indexing");
|
|
163
165
|
}
|
|
164
166
|
/**
|
|
167
|
+
* Unregister the indexing webhook for this API key.
|
|
168
|
+
*
|
|
165
169
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
166
170
|
*
|
|
167
171
|
* @throws {@link HydraDB.NotFoundError}
|
|
@@ -203,13 +207,7 @@ class WebhooksClient {
|
|
|
203
207
|
if (_response.error.reason === "status-code") {
|
|
204
208
|
switch (_response.error.statusCode) {
|
|
205
209
|
case 404:
|
|
206
|
-
throw new HydraDB.NotFoundError(
|
|
207
|
-
unrecognizedObjectKeys: "passthrough",
|
|
208
|
-
allowUnrecognizedUnionMembers: true,
|
|
209
|
-
allowUnrecognizedEnumValues: true,
|
|
210
|
-
skipValidation: true,
|
|
211
|
-
breadcrumbsPrefix: ["response"],
|
|
212
|
-
}), _response.rawResponse);
|
|
210
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
213
211
|
default:
|
|
214
212
|
throw new errors.HydraDBError({
|
|
215
213
|
statusCode: _response.error.statusCode,
|
|
@@ -221,6 +219,8 @@ class WebhooksClient {
|
|
|
221
219
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/webhooks/indexing");
|
|
222
220
|
}
|
|
223
221
|
/**
|
|
222
|
+
* List recent webhook delivery attempts with optional cursor-based pagination.
|
|
223
|
+
*
|
|
224
224
|
* @param {HydraDB.ListDeliveriesWebhooksRequest} request
|
|
225
225
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
226
226
|
*
|
|
@@ -278,6 +278,8 @@ class WebhooksClient {
|
|
|
278
278
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/webhooks/indexing/deliveries");
|
|
279
279
|
}
|
|
280
280
|
/**
|
|
281
|
+
* Get a single webhook delivery attempt by ID.
|
|
282
|
+
*
|
|
281
283
|
* @param {HydraDB.GetDeliveryWebhooksRequest} request
|
|
282
284
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
283
285
|
*
|
|
@@ -285,7 +287,7 @@ class WebhooksClient {
|
|
|
285
287
|
*
|
|
286
288
|
* @example
|
|
287
289
|
* await client.webhooks.getDelivery({
|
|
288
|
-
* deliveryId: "
|
|
290
|
+
* deliveryId: "dlv_9f8e7d6c"
|
|
289
291
|
* })
|
|
290
292
|
*/
|
|
291
293
|
getDelivery(request, requestOptions) {
|
|
@@ -323,13 +325,7 @@ class WebhooksClient {
|
|
|
323
325
|
if (_response.error.reason === "status-code") {
|
|
324
326
|
switch (_response.error.statusCode) {
|
|
325
327
|
case 404:
|
|
326
|
-
throw new HydraDB.NotFoundError(
|
|
327
|
-
unrecognizedObjectKeys: "passthrough",
|
|
328
|
-
allowUnrecognizedUnionMembers: true,
|
|
329
|
-
allowUnrecognizedEnumValues: true,
|
|
330
|
-
skipValidation: true,
|
|
331
|
-
breadcrumbsPrefix: ["response"],
|
|
332
|
-
}), _response.rawResponse);
|
|
328
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
333
329
|
default:
|
|
334
330
|
throw new errors.HydraDBError({
|
|
335
331
|
statusCode: _response.error.statusCode,
|
|
@@ -341,6 +337,8 @@ class WebhooksClient {
|
|
|
341
337
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/webhooks/indexing/deliveries/{delivery_id}");
|
|
342
338
|
}
|
|
343
339
|
/**
|
|
340
|
+
* Queue a failed or permanently-failed delivery for retry.
|
|
341
|
+
*
|
|
344
342
|
* @param {HydraDB.RetryDeliveryWebhooksRequest} request
|
|
345
343
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
346
344
|
*
|
|
@@ -348,7 +346,7 @@ class WebhooksClient {
|
|
|
348
346
|
*
|
|
349
347
|
* @example
|
|
350
348
|
* await client.webhooks.retryDelivery({
|
|
351
|
-
* deliveryId: "
|
|
349
|
+
* deliveryId: "dlv_9f8e7d6c"
|
|
352
350
|
* })
|
|
353
351
|
*/
|
|
354
352
|
retryDelivery(request, requestOptions) {
|
|
@@ -386,13 +384,7 @@ class WebhooksClient {
|
|
|
386
384
|
if (_response.error.reason === "status-code") {
|
|
387
385
|
switch (_response.error.statusCode) {
|
|
388
386
|
case 404:
|
|
389
|
-
throw new HydraDB.NotFoundError(
|
|
390
|
-
unrecognizedObjectKeys: "passthrough",
|
|
391
|
-
allowUnrecognizedUnionMembers: true,
|
|
392
|
-
allowUnrecognizedEnumValues: true,
|
|
393
|
-
skipValidation: true,
|
|
394
|
-
breadcrumbsPrefix: ["response"],
|
|
395
|
-
}), _response.rawResponse);
|
|
387
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
396
388
|
default:
|
|
397
389
|
throw new errors.HydraDBError({
|
|
398
390
|
statusCode: _response.error.statusCode,
|
|
@@ -404,6 +396,8 @@ class WebhooksClient {
|
|
|
404
396
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/webhooks/indexing/deliveries/{delivery_id}/retry");
|
|
405
397
|
}
|
|
406
398
|
/**
|
|
399
|
+
* Send a test webhook event to the registered endpoint to verify connectivity.
|
|
400
|
+
*
|
|
407
401
|
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
408
402
|
*
|
|
409
403
|
* @throws {@link HydraDB.NotFoundError}
|
|
@@ -445,13 +439,7 @@ class WebhooksClient {
|
|
|
445
439
|
if (_response.error.reason === "status-code") {
|
|
446
440
|
switch (_response.error.statusCode) {
|
|
447
441
|
case 404:
|
|
448
|
-
throw new HydraDB.NotFoundError(
|
|
449
|
-
unrecognizedObjectKeys: "passthrough",
|
|
450
|
-
allowUnrecognizedUnionMembers: true,
|
|
451
|
-
allowUnrecognizedEnumValues: true,
|
|
452
|
-
skipValidation: true,
|
|
453
|
-
breadcrumbsPrefix: ["response"],
|
|
454
|
-
}), _response.rawResponse);
|
|
442
|
+
throw new HydraDB.NotFoundError(_response.error.body, _response.rawResponse);
|
|
455
443
|
default:
|
|
456
444
|
throw new errors.HydraDBError({
|
|
457
445
|
statusCode: _response.error.statusCode,
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
* {}
|
|
4
4
|
*/
|
|
5
5
|
export interface WebhooksWebhookRegisterRequest {
|
|
6
|
+
/** Event types to subscribe to (e.g. `["indexing.status_changed"]`). */
|
|
6
7
|
eventTypes?: string[];
|
|
8
|
+
/** Optional secret used to sign webhook payloads for verification. Minimum 32 characters. */
|
|
7
9
|
signingSecret?: string;
|
|
10
|
+
/** Endpoint URL to deliver webhook events to. */
|
|
8
11
|
url?: string;
|
|
9
12
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface ConnectorsConnector {
|
|
2
|
+
/** Authentication method for the provider connection (e.g. `api_token`, `oauth`). */
|
|
3
|
+
authType?: string;
|
|
4
|
+
/** Default collection partition for synced objects. Canonical name; mirrors the deprecated `sub_tenant_id` alias. */
|
|
5
|
+
collection?: string;
|
|
6
|
+
/** Connector this resource belongs to. */
|
|
7
|
+
connectorId?: string;
|
|
8
|
+
/** Internal reference to the stored credential record. */
|
|
9
|
+
credentialRef?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Database/Collection are the canonical v2 names for the deprecated
|
|
12
|
+
* tenant_id/sub_tenant_id wire fields. They mirror the same values so a v2
|
|
13
|
+
* client sees the canonical names on responses while a legacy client keeps
|
|
14
|
+
* reading tenant_id/sub_tenant_id. Not persisted (dynamodbav:"-"): the store
|
|
15
|
+
* builds items from tenant_id/sub_tenant_id and mirrors these on load. They
|
|
16
|
+
* are populated at every construction point (toConnector, connectorFromItem)
|
|
17
|
+
* rather than via MarshalJSON so Temporal's JSON data converter round-trips
|
|
18
|
+
* Connector activity inputs without spuriously populating them.
|
|
19
|
+
*/
|
|
20
|
+
database?: string;
|
|
21
|
+
/** Internal deployment context for this connector. */
|
|
22
|
+
deploymentId?: string;
|
|
23
|
+
/** RFC3339 timestamp of the most recent sync attempt (successful or not). */
|
|
24
|
+
lastAttemptedSyncAt?: string;
|
|
25
|
+
/** Error message from the most recent failed sync, empty string when no error. */
|
|
26
|
+
lastError?: string;
|
|
27
|
+
/** RFC3339 timestamp of the last successful sync completion. */
|
|
28
|
+
lastSuccessfulSyncAt?: string;
|
|
29
|
+
/** Human-readable label for this connector. */
|
|
30
|
+
name?: string;
|
|
31
|
+
/** RFC3339 timestamp when the next scheduled sync will run. */
|
|
32
|
+
nextSyncAt?: string;
|
|
33
|
+
/** Organization that owns this resource. */
|
|
34
|
+
orgId?: string;
|
|
35
|
+
/** Subscription plan this connector runs under. */
|
|
36
|
+
plan?: string;
|
|
37
|
+
/** External provider being synced (e.g. `slack`, `github`, `linear`, `notion`, `gmail`). */
|
|
38
|
+
provider?: string;
|
|
39
|
+
/** Identifier for the external account (e.g. Slack workspace ID, GitHub org name). Must be distinct across connectors for the same provider. */
|
|
40
|
+
providerAccountScope?: string;
|
|
41
|
+
/** Lifecycle status of the connector (e.g. `active`, `paused`, `error`). */
|
|
42
|
+
status?: string;
|
|
43
|
+
/** Default collection partition for synced objects. Deprecated — use `collection`. */
|
|
44
|
+
subTenantId?: string;
|
|
45
|
+
/**
|
|
46
|
+
* SyncEngine is "classic" (default, empty treated as classic) or "moveit".
|
|
47
|
+
* See the SyncEngine* constants; the scheduler branches on it.
|
|
48
|
+
*/
|
|
49
|
+
syncEngine?: string;
|
|
50
|
+
/** How frequently the scheduler triggers incremental syncs, in seconds. */
|
|
51
|
+
syncIntervalSeconds?: number;
|
|
52
|
+
/** Current sync operation state (e.g. `idle`, `running`). */
|
|
53
|
+
syncStatus?: string;
|
|
54
|
+
/** Database that receives synced data. Deprecated — use `database`. */
|
|
55
|
+
tenantId?: string;
|
|
56
|
+
/** User that created or owns this resource. */
|
|
57
|
+
userId?: string;
|
|
58
|
+
}
|