@credal/sdk 0.0.23 → 0.0.25
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/Client.d.ts +10 -9
- package/Client.js +12 -17
- package/api/resources/common/types/Operator.d.ts +1 -1
- package/api/resources/common/types/ResourceIdentifier.d.ts +1 -1
- package/api/resources/common/types/ResourceType.d.ts +1 -1
- package/api/resources/common/types/Role.d.ts +1 -1
- package/api/resources/copilots/client/Client.d.ts +4 -0
- package/api/resources/copilots/client/Client.js +55 -117
- package/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.d.ts +2 -8
- package/api/resources/copilots/client/requests/CreateConversationRequest.d.ts +2 -8
- package/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +3 -12
- package/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +4 -16
- package/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.d.ts +2 -8
- package/api/resources/copilots/client/requests/SendMessageRequest.d.ts +5 -20
- package/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +19 -20
- package/api/resources/copilots/client/requests/UpdateConfigurationRequest.d.ts +1 -4
- package/api/resources/copilots/types/ErrorChunk.d.ts +7 -0
- package/{dist/api/resources/actions/types/DirectMessage.d.ts → api/resources/copilots/types/ErrorChunkData.d.ts} +2 -2
- package/api/resources/copilots/types/FeedbackEnum.d.ts +1 -1
- package/api/resources/copilots/types/Filter.d.ts +1 -1
- package/api/resources/copilots/types/SendMessageResponse.d.ts +3 -5
- package/api/resources/copilots/types/StreamingChunk.d.ts +4 -1
- package/api/resources/copilots/types/index.d.ts +2 -0
- package/api/resources/copilots/types/index.js +2 -0
- package/api/resources/documentCatalog/client/Client.d.ts +4 -0
- package/api/resources/documentCatalog/client/Client.js +31 -45
- package/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.ts +10 -40
- package/api/resources/documentCollections/client/Client.d.ts +4 -0
- package/api/resources/documentCollections/client/Client.js +43 -81
- package/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.ts +1 -4
- package/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +3 -12
- package/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +1 -4
- package/api/resources/index.d.ts +0 -3
- package/api/resources/index.js +18 -11
- package/api/resources/permissionsService/client/Client.d.ts +4 -0
- package/api/resources/permissionsService/client/Client.js +31 -45
- package/api/resources/permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.d.ts +3 -12
- package/api/resources/permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.d.ts +3 -12
- package/api/resources/permissionsService/client/requests/ListCachedAuthorizedResourcesForUserRequest.d.ts +4 -16
- package/api/resources/permissionsService/types/Action.d.ts +1 -1
- package/api/resources/permissionsService/types/AuthorizedResourceListPage.d.ts +1 -1
- package/api/resources/permissionsService/types/CheckBulkResourcesAuthorizationResponse.d.ts +1 -1
- package/api/resources/permissionsService/types/Principal.d.ts +1 -1
- package/api/resources/search/client/Client.d.ts +4 -0
- package/api/resources/search/client/Client.js +23 -21
- package/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +3 -12
- package/api/resources/users/client/Client.d.ts +4 -0
- package/api/resources/users/client/Client.js +23 -21
- package/core/auth/BearerToken.d.ts +1 -1
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +2 -2
- package/core/fetcher/Fetcher.js +6 -5
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/createRequestUrl.js +1 -2
- package/core/fetcher/getFetchFn.js +18 -9
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.js +5 -5
- package/core/fetcher/getResponseBody.js +1 -2
- package/core/fetcher/makeRequest.d.ts +1 -1
- package/core/fetcher/requestWithRetries.js +4 -5
- package/core/fetcher/signals.d.ts +0 -1
- package/core/fetcher/signals.js +2 -3
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/core/index.js +17 -7
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/runtime/runtime.d.ts +1 -1
- package/core/runtime/runtime.js +51 -41
- package/core/schemas/Schema.d.ts +7 -5
- package/core/schemas/Schema.js +2 -0
- package/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/core/schemas/builders/bigint/bigint.js +22 -19
- package/core/schemas/builders/date/date.js +1 -2
- package/core/schemas/builders/enum/enum.js +1 -2
- package/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/core/schemas/builders/lazy/lazy.js +3 -4
- package/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/core/schemas/builders/list/list.js +1 -2
- package/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/core/schemas/builders/object/object.d.ts +1 -1
- package/core/schemas/builders/object/object.js +31 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/core/schemas/builders/object/property.js +2 -3
- package/core/schemas/builders/object/types.d.ts +16 -11
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/core/schemas/builders/object-like/types.d.ts +1 -1
- package/core/schemas/builders/record/record.js +2 -4
- package/core/schemas/builders/record/types.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/core/schemas/builders/set/set.js +1 -2
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/core/schemas/builders/union/discriminant.js +1 -2
- package/core/schemas/builders/union/types.d.ts +6 -6
- package/core/schemas/builders/union/union.d.ts +1 -1
- package/core/schemas/builders/union/union.js +1 -2
- package/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
- package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/core/schemas/utils/entries.d.ts +1 -1
- package/core/schemas/utils/entries.js +1 -2
- package/core/schemas/utils/filterObject.d.ts +1 -1
- package/core/schemas/utils/filterObject.js +1 -2
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/core/schemas/utils/isPlainObject.js +1 -2
- package/core/schemas/utils/keys.d.ts +1 -1
- package/core/schemas/utils/keys.js +1 -2
- package/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/core/schemas/utils/partition.js +1 -2
- package/core/streaming-fetcher/Stream.d.ts +0 -1
- package/core/streaming-fetcher/Stream.js +20 -21
- package/dist/Client.d.ts +10 -9
- package/dist/Client.js +12 -17
- package/dist/api/resources/common/types/Operator.d.ts +1 -1
- package/dist/api/resources/common/types/ResourceIdentifier.d.ts +1 -1
- package/dist/api/resources/common/types/ResourceType.d.ts +1 -1
- package/dist/api/resources/common/types/Role.d.ts +1 -1
- package/dist/api/resources/copilots/client/Client.d.ts +4 -0
- package/dist/api/resources/copilots/client/Client.js +55 -117
- package/dist/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.d.ts +2 -8
- package/dist/api/resources/copilots/client/requests/CreateConversationRequest.d.ts +2 -8
- package/dist/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +3 -12
- package/dist/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +4 -16
- package/dist/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.d.ts +2 -8
- package/dist/api/resources/copilots/client/requests/SendMessageRequest.d.ts +5 -20
- package/dist/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +19 -20
- package/dist/api/resources/copilots/client/requests/UpdateConfigurationRequest.d.ts +1 -4
- package/dist/api/resources/copilots/types/ErrorChunk.d.ts +7 -0
- package/{api/resources/actions/types/DirectMessage.d.ts → dist/api/resources/copilots/types/ErrorChunkData.d.ts} +2 -2
- package/dist/api/resources/copilots/types/FeedbackEnum.d.ts +1 -1
- package/dist/api/resources/copilots/types/Filter.d.ts +1 -1
- package/dist/api/resources/copilots/types/SendMessageResponse.d.ts +3 -5
- package/dist/api/resources/copilots/types/StreamingChunk.d.ts +4 -1
- package/dist/api/resources/copilots/types/index.d.ts +2 -0
- package/dist/api/resources/copilots/types/index.js +2 -0
- package/dist/api/resources/documentCatalog/client/Client.d.ts +4 -0
- package/dist/api/resources/documentCatalog/client/Client.js +31 -45
- package/dist/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.ts +10 -40
- package/dist/api/resources/documentCollections/client/Client.d.ts +4 -0
- package/dist/api/resources/documentCollections/client/Client.js +43 -81
- package/dist/api/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.d.ts +1 -4
- package/dist/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +3 -12
- package/dist/api/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.d.ts +1 -4
- package/dist/api/resources/index.d.ts +0 -3
- package/dist/api/resources/index.js +18 -11
- package/dist/api/resources/permissionsService/client/Client.d.ts +4 -0
- package/dist/api/resources/permissionsService/client/Client.js +31 -45
- package/dist/api/resources/permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.d.ts +3 -12
- package/dist/api/resources/permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.d.ts +3 -12
- package/dist/api/resources/permissionsService/client/requests/ListCachedAuthorizedResourcesForUserRequest.d.ts +4 -16
- package/dist/api/resources/permissionsService/types/Action.d.ts +1 -1
- package/dist/api/resources/permissionsService/types/AuthorizedResourceListPage.d.ts +1 -1
- package/dist/api/resources/permissionsService/types/CheckBulkResourcesAuthorizationResponse.d.ts +1 -1
- package/dist/api/resources/permissionsService/types/Principal.d.ts +1 -1
- package/dist/api/resources/search/client/Client.d.ts +4 -0
- package/dist/api/resources/search/client/Client.js +23 -21
- package/dist/api/resources/search/client/requests/SearchDocumentCollectionRequest.d.ts +3 -12
- package/dist/api/resources/users/client/Client.d.ts +4 -0
- package/dist/api/resources/users/client/Client.js +23 -21
- package/dist/core/auth/BearerToken.d.ts +1 -1
- package/dist/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +2 -2
- package/dist/core/fetcher/Fetcher.js +6 -5
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.js +1 -2
- package/dist/core/fetcher/getFetchFn.js +18 -9
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.js +5 -5
- package/dist/core/fetcher/getResponseBody.js +1 -2
- package/dist/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/core/fetcher/requestWithRetries.js +4 -5
- package/dist/core/fetcher/signals.d.ts +0 -1
- package/dist/core/fetcher/signals.js +2 -3
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/dist/core/index.js +17 -7
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/runtime/runtime.d.ts +1 -1
- package/dist/core/runtime/runtime.js +51 -41
- package/dist/core/schemas/Schema.d.ts +7 -5
- package/dist/core/schemas/Schema.js +2 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/dist/core/schemas/builders/bigint/bigint.js +22 -19
- package/dist/core/schemas/builders/date/date.js +1 -2
- package/dist/core/schemas/builders/enum/enum.js +1 -2
- package/dist/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/dist/core/schemas/builders/lazy/lazy.js +3 -4
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/dist/core/schemas/builders/list/list.js +1 -2
- package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/dist/core/schemas/builders/object/object.d.ts +1 -1
- package/dist/core/schemas/builders/object/object.js +31 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/dist/core/schemas/builders/object/property.js +2 -3
- package/dist/core/schemas/builders/object/types.d.ts +16 -11
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
- package/dist/core/schemas/builders/record/record.js +2 -4
- package/dist/core/schemas/builders/record/types.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/dist/core/schemas/builders/set/set.js +1 -2
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/dist/core/schemas/builders/union/discriminant.js +1 -2
- package/dist/core/schemas/builders/union/types.d.ts +6 -6
- package/dist/core/schemas/builders/union/union.d.ts +1 -1
- package/dist/core/schemas/builders/union/union.js +1 -2
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/dist/core/schemas/utils/entries.d.ts +1 -1
- package/dist/core/schemas/utils/entries.js +1 -2
- package/dist/core/schemas/utils/filterObject.d.ts +1 -1
- package/dist/core/schemas/utils/filterObject.js +1 -2
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/dist/core/schemas/utils/isPlainObject.js +1 -2
- package/dist/core/schemas/utils/keys.d.ts +1 -1
- package/dist/core/schemas/utils/keys.js +1 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/dist/core/schemas/utils/partition.js +1 -2
- package/dist/core/streaming-fetcher/Stream.d.ts +0 -1
- package/dist/core/streaming-fetcher/Stream.js +20 -21
- package/dist/environments.d.ts +1 -1
- package/dist/errors/CredalError.js +2 -1
- package/dist/errors/CredalTimeoutError.d.ts +1 -1
- package/dist/errors/CredalTimeoutError.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19 -8
- package/dist/serialization/resources/common/types/Collaborator.js +17 -7
- package/dist/serialization/resources/common/types/ExternalResourceId.js +17 -7
- package/dist/serialization/resources/common/types/Operator.js +17 -7
- package/dist/serialization/resources/common/types/ResourceIdentifier.js +17 -7
- package/dist/serialization/resources/common/types/ResourceType.js +17 -7
- package/dist/serialization/resources/common/types/Role.js +17 -7
- package/dist/serialization/resources/common/types/Url.js +17 -7
- package/dist/serialization/resources/copilots/client/requests/AddCollectionToCopilotRequest.js +17 -7
- package/dist/serialization/resources/copilots/client/requests/CreateConversationRequest.js +17 -7
- package/dist/serialization/resources/copilots/client/requests/CreateCopilotRequest.js +17 -7
- package/dist/serialization/resources/copilots/client/requests/DeleteCopilotRequest.js +17 -7
- package/dist/serialization/resources/copilots/client/requests/ProvideMessageFeedbackRequest.js +17 -7
- package/dist/serialization/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.js +17 -7
- package/dist/serialization/resources/copilots/client/requests/SendMessageRequest.js +17 -7
- package/dist/serialization/resources/copilots/client/requests/StreamMessageRequest.js +17 -7
- package/dist/serialization/resources/copilots/client/requests/UpdateConfigurationRequest.js +17 -7
- package/dist/serialization/resources/copilots/types/AiEndpointConfiguration.js +17 -7
- package/dist/serialization/resources/copilots/types/BlockedChunk.js +17 -7
- package/dist/serialization/resources/copilots/types/BooleanFieldSchema.js +17 -7
- package/dist/serialization/resources/copilots/types/CollectionFilteredData.js +17 -7
- package/dist/serialization/resources/copilots/types/Configuration.js +17 -7
- package/dist/serialization/resources/copilots/types/CreateConversationResponse.js +17 -7
- package/dist/serialization/resources/copilots/types/CreateCopilotResponse.js +17 -7
- package/dist/serialization/resources/copilots/types/DataChunk.js +17 -7
- package/dist/serialization/resources/copilots/types/DataFilter.js +17 -7
- package/dist/serialization/resources/copilots/types/DatetimeFieldSchema.js +17 -7
- package/dist/serialization/resources/copilots/types/DeleteCopilotResponse.js +17 -7
- package/dist/serialization/resources/copilots/types/EndOfMessageChunk.js +17 -7
- package/dist/serialization/resources/{actions/types/SlackThread.d.ts → copilots/types/ErrorChunk.d.ts} +4 -4
- package/dist/serialization/resources/{actions/types/HumanConfirmationChannel.js → copilots/types/ErrorChunk.js} +21 -20
- package/dist/serialization/resources/{actions/types/DirectMessage.d.ts → copilots/types/ErrorChunkData.d.ts} +3 -3
- package/dist/serialization/resources/{actions/types/InvokeActionResponse.js → copilots/types/ErrorChunkData.js} +20 -12
- package/dist/serialization/resources/copilots/types/FeedbackEnum.js +17 -7
- package/dist/serialization/resources/copilots/types/Filter.js +17 -7
- package/dist/serialization/resources/copilots/types/FinalChunk.js +17 -7
- package/dist/serialization/resources/copilots/types/InitialChunk.js +17 -7
- package/dist/serialization/resources/copilots/types/InputVariable.js +17 -7
- package/dist/serialization/resources/copilots/types/InsertedAuditLog.js +17 -7
- package/dist/serialization/resources/copilots/types/MessageBlocked.js +17 -7
- package/dist/serialization/resources/copilots/types/MessageFeedback.js +17 -7
- package/dist/serialization/resources/copilots/types/MessageReply.js +17 -7
- package/dist/serialization/resources/copilots/types/NumberFieldSchema.js +17 -7
- package/dist/serialization/resources/copilots/types/PolicyTrigger.js +17 -7
- package/dist/serialization/resources/copilots/types/ReferencedSource.js +17 -7
- package/dist/serialization/resources/copilots/types/ResponseChunk.js +17 -7
- package/dist/serialization/resources/copilots/types/SendAgentMessageResponse.js +17 -7
- package/dist/serialization/resources/copilots/types/SendMessageResponse.js +17 -7
- package/dist/serialization/resources/copilots/types/StreamingChunk.d.ts +5 -1
- package/dist/serialization/resources/copilots/types/StreamingChunk.js +19 -7
- package/dist/serialization/resources/copilots/types/StringFieldSchema.js +17 -7
- package/dist/serialization/resources/copilots/types/WebSearchResult.js +17 -7
- package/dist/serialization/resources/copilots/types/index.d.ts +2 -0
- package/dist/serialization/resources/copilots/types/index.js +2 -0
- package/dist/serialization/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.js +17 -7
- package/dist/serialization/resources/documentCatalog/types/DocumentMetadataPatch.js +17 -7
- package/dist/serialization/resources/documentCatalog/types/DocumentMetadataPatchRequest.js +17 -7
- package/dist/serialization/resources/documentCatalog/types/SyncSourceByUrlRequest.js +17 -7
- package/dist/serialization/resources/documentCatalog/types/SyncSourceByUrlResponse.js +17 -7
- package/dist/serialization/resources/documentCatalog/types/UploadDocumentResponse.js +17 -7
- package/dist/serialization/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.js +17 -7
- package/dist/serialization/resources/documentCollections/client/requests/CreateCollectionRequest.js +17 -7
- package/dist/serialization/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.js +17 -7
- package/dist/serialization/resources/documentCollections/client/requests/DeleteCollectionRequest.js +17 -7
- package/dist/serialization/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.js +17 -7
- package/dist/serialization/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.js +17 -7
- package/dist/serialization/resources/documentCollections/types/CreateCollectionResponse.js +17 -7
- package/dist/serialization/resources/documentCollections/types/DeleteCollectionResponse.js +17 -7
- package/dist/serialization/resources/documentCollections/types/MongoCollectionSyncConfig.js +17 -7
- package/dist/serialization/resources/documentCollections/types/MongoCollectionSyncResponse.js +17 -7
- package/dist/serialization/resources/documentCollections/types/MongoSourceFieldsConfig.js +17 -7
- package/dist/serialization/resources/index.d.ts +0 -3
- package/dist/serialization/resources/index.js +18 -11
- package/dist/serialization/resources/permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.js +17 -7
- package/dist/serialization/resources/permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.js +17 -7
- package/dist/serialization/resources/permissionsService/client/requests/ListCachedAuthorizedResourcesForUserRequest.js +17 -7
- package/dist/serialization/resources/permissionsService/types/Action.js +17 -7
- package/dist/serialization/resources/permissionsService/types/AuthorizedResource.js +17 -7
- package/dist/serialization/resources/permissionsService/types/AuthorizedResourceListPage.js +17 -7
- package/dist/serialization/resources/permissionsService/types/CheckBulkResourcesAuthorizationResponse.js +17 -7
- package/dist/serialization/resources/permissionsService/types/CheckResourceAuthorizationResponse.js +17 -7
- package/dist/serialization/resources/permissionsService/types/Group.js +17 -7
- package/dist/serialization/resources/permissionsService/types/Principal.js +17 -7
- package/dist/serialization/resources/permissionsService/types/PrincipalListPage.js +17 -7
- package/dist/serialization/resources/permissionsService/types/ResourceAuthorizationResult.js +17 -7
- package/dist/serialization/resources/permissionsService/types/User.js +17 -7
- package/dist/serialization/resources/search/client/requests/SearchDocumentCollectionRequest.js +17 -7
- package/dist/serialization/resources/search/types/DocumentCollectionSearchOptions.js +17 -7
- package/dist/serialization/resources/search/types/DocumentCollectionSearchResult.js +17 -7
- package/dist/serialization/resources/search/types/SearchDocumentCollectionResponse.js +17 -7
- package/dist/serialization/resources/search/types/SearchResultChunk.js +17 -7
- package/dist/serialization/resources/search/types/SingleFieldFilter.js +17 -7
- package/dist/serialization/resources/users/client/index.js +17 -7
- package/dist/serialization/resources/users/client/metadata.js +17 -7
- package/dist/serialization/resources/users/types/UserMetadataPatch.js +17 -7
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/environments.d.ts +1 -1
- package/errors/CredalError.js +2 -1
- package/errors/CredalTimeoutError.d.ts +1 -1
- package/errors/CredalTimeoutError.js +2 -2
- package/index.d.ts +1 -0
- package/index.js +19 -8
- package/{jest.config.js → jest.config.mjs} +4 -1
- package/package.json +16 -17
- package/reference.md +0 -79
- package/scripts/rename-to-esm-files.js +115 -0
- package/serialization/resources/common/types/Collaborator.js +17 -7
- package/serialization/resources/common/types/ExternalResourceId.js +17 -7
- package/serialization/resources/common/types/Operator.js +17 -7
- package/serialization/resources/common/types/ResourceIdentifier.js +17 -7
- package/serialization/resources/common/types/ResourceType.js +17 -7
- package/serialization/resources/common/types/Role.js +17 -7
- package/serialization/resources/common/types/Url.js +17 -7
- package/serialization/resources/copilots/client/requests/AddCollectionToCopilotRequest.js +17 -7
- package/serialization/resources/copilots/client/requests/CreateConversationRequest.js +17 -7
- package/serialization/resources/copilots/client/requests/CreateCopilotRequest.js +17 -7
- package/serialization/resources/copilots/client/requests/DeleteCopilotRequest.js +17 -7
- package/serialization/resources/copilots/client/requests/ProvideMessageFeedbackRequest.js +17 -7
- package/serialization/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.js +17 -7
- package/serialization/resources/copilots/client/requests/SendMessageRequest.js +17 -7
- package/serialization/resources/copilots/client/requests/StreamMessageRequest.js +17 -7
- package/serialization/resources/copilots/client/requests/UpdateConfigurationRequest.js +17 -7
- package/serialization/resources/copilots/types/AiEndpointConfiguration.js +17 -7
- package/serialization/resources/copilots/types/BlockedChunk.js +17 -7
- package/serialization/resources/copilots/types/BooleanFieldSchema.js +17 -7
- package/serialization/resources/copilots/types/CollectionFilteredData.js +17 -7
- package/serialization/resources/copilots/types/Configuration.js +17 -7
- package/serialization/resources/copilots/types/CreateConversationResponse.js +17 -7
- package/serialization/resources/copilots/types/CreateCopilotResponse.js +17 -7
- package/serialization/resources/copilots/types/DataChunk.js +17 -7
- package/serialization/resources/copilots/types/DataFilter.js +17 -7
- package/serialization/resources/copilots/types/DatetimeFieldSchema.js +17 -7
- package/serialization/resources/copilots/types/DeleteCopilotResponse.js +17 -7
- package/serialization/resources/copilots/types/EndOfMessageChunk.js +17 -7
- package/serialization/resources/{actions/types/Conversation.d.ts → copilots/types/ErrorChunk.d.ts} +4 -3
- package/{dist/serialization/resources/actions/types/Conversation.js → serialization/resources/copilots/types/ErrorChunk.js} +21 -10
- package/{dist/serialization/resources/actions/types/Conversation.d.ts → serialization/resources/copilots/types/ErrorChunkData.d.ts} +3 -3
- package/{dist/serialization/resources/actions/types/SlackThread.js → serialization/resources/copilots/types/ErrorChunkData.js} +20 -11
- package/serialization/resources/copilots/types/FeedbackEnum.js +17 -7
- package/serialization/resources/copilots/types/Filter.js +17 -7
- package/serialization/resources/copilots/types/FinalChunk.js +17 -7
- package/serialization/resources/copilots/types/InitialChunk.js +17 -7
- package/serialization/resources/copilots/types/InputVariable.js +17 -7
- package/serialization/resources/copilots/types/InsertedAuditLog.js +17 -7
- package/serialization/resources/copilots/types/MessageBlocked.js +17 -7
- package/serialization/resources/copilots/types/MessageFeedback.js +17 -7
- package/serialization/resources/copilots/types/MessageReply.js +17 -7
- package/serialization/resources/copilots/types/NumberFieldSchema.js +17 -7
- package/serialization/resources/copilots/types/PolicyTrigger.js +17 -7
- package/serialization/resources/copilots/types/ReferencedSource.js +17 -7
- package/serialization/resources/copilots/types/ResponseChunk.js +17 -7
- package/serialization/resources/copilots/types/SendAgentMessageResponse.js +17 -7
- package/serialization/resources/copilots/types/SendMessageResponse.js +17 -7
- package/serialization/resources/copilots/types/StreamingChunk.d.ts +5 -1
- package/serialization/resources/copilots/types/StreamingChunk.js +19 -7
- package/serialization/resources/copilots/types/StringFieldSchema.js +17 -7
- package/serialization/resources/copilots/types/WebSearchResult.js +17 -7
- package/serialization/resources/copilots/types/index.d.ts +2 -0
- package/serialization/resources/copilots/types/index.js +2 -0
- package/serialization/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.js +17 -7
- package/serialization/resources/documentCatalog/types/DocumentMetadataPatch.js +17 -7
- package/serialization/resources/documentCatalog/types/DocumentMetadataPatchRequest.js +17 -7
- package/serialization/resources/documentCatalog/types/SyncSourceByUrlRequest.js +17 -7
- package/serialization/resources/documentCatalog/types/SyncSourceByUrlResponse.js +17 -7
- package/serialization/resources/documentCatalog/types/UploadDocumentResponse.js +17 -7
- package/serialization/resources/documentCollections/client/requests/AddDocumentsToCollectionRequest.js +17 -7
- package/serialization/resources/documentCollections/client/requests/CreateCollectionRequest.js +17 -7
- package/serialization/resources/documentCollections/client/requests/CreateMongoCollectionSyncRequest.js +17 -7
- package/serialization/resources/documentCollections/client/requests/DeleteCollectionRequest.js +17 -7
- package/serialization/resources/documentCollections/client/requests/RemoveDocumentsFromCollectionRequest.js +17 -7
- package/serialization/resources/documentCollections/client/requests/UpdateMongoCollectionSyncRequest.js +17 -7
- package/serialization/resources/documentCollections/types/CreateCollectionResponse.js +17 -7
- package/serialization/resources/documentCollections/types/DeleteCollectionResponse.js +17 -7
- package/serialization/resources/documentCollections/types/MongoCollectionSyncConfig.js +17 -7
- package/serialization/resources/documentCollections/types/MongoCollectionSyncResponse.js +17 -7
- package/serialization/resources/documentCollections/types/MongoSourceFieldsConfig.js +17 -7
- package/serialization/resources/index.d.ts +0 -3
- package/serialization/resources/index.js +18 -11
- package/serialization/resources/permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.js +17 -7
- package/serialization/resources/permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.js +17 -7
- package/serialization/resources/permissionsService/client/requests/ListCachedAuthorizedResourcesForUserRequest.js +17 -7
- package/serialization/resources/permissionsService/types/Action.js +17 -7
- package/serialization/resources/permissionsService/types/AuthorizedResource.js +17 -7
- package/serialization/resources/permissionsService/types/AuthorizedResourceListPage.js +17 -7
- package/serialization/resources/permissionsService/types/CheckBulkResourcesAuthorizationResponse.js +17 -7
- package/serialization/resources/permissionsService/types/CheckResourceAuthorizationResponse.js +17 -7
- package/serialization/resources/permissionsService/types/Group.js +17 -7
- package/serialization/resources/permissionsService/types/Principal.js +17 -7
- package/serialization/resources/permissionsService/types/PrincipalListPage.js +17 -7
- package/serialization/resources/permissionsService/types/ResourceAuthorizationResult.js +17 -7
- package/serialization/resources/permissionsService/types/User.js +17 -7
- package/serialization/resources/search/client/requests/SearchDocumentCollectionRequest.js +17 -7
- package/serialization/resources/search/types/DocumentCollectionSearchOptions.js +17 -7
- package/serialization/resources/search/types/DocumentCollectionSearchResult.js +17 -7
- package/serialization/resources/search/types/SearchDocumentCollectionResponse.js +17 -7
- package/serialization/resources/search/types/SearchResultChunk.js +17 -7
- package/serialization/resources/search/types/SingleFieldFilter.js +17 -7
- package/serialization/resources/users/client/index.js +17 -7
- package/serialization/resources/users/client/metadata.js +17 -7
- package/serialization/resources/users/types/UserMetadataPatch.js +17 -7
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/actions/client/Client.d.ts +0 -50
- package/api/resources/actions/client/Client.js +0 -138
- package/api/resources/actions/client/index.d.ts +0 -1
- package/api/resources/actions/client/index.js +0 -17
- package/api/resources/actions/client/requests/InvokeActionRequest.d.ts +0 -55
- package/api/resources/actions/client/requests/index.d.ts +0 -1
- package/api/resources/actions/client/requests/index.js +0 -2
- package/api/resources/actions/index.d.ts +0 -2
- package/api/resources/actions/index.js +0 -18
- package/api/resources/actions/types/ActionStatus.d.ts +0 -13
- package/api/resources/actions/types/ActionStatus.js +0 -15
- package/api/resources/actions/types/Conversation.d.ts +0 -6
- package/api/resources/actions/types/HumanConfirmationChannel.d.ts +0 -16
- package/api/resources/actions/types/InvokeActionResponse.d.ts +0 -8
- package/api/resources/actions/types/InvokeActionResponse.js +0 -5
- package/api/resources/actions/types/SlackThread.d.ts +0 -7
- package/api/resources/actions/types/SlackThread.js +0 -5
- package/api/resources/actions/types/index.d.ts +0 -6
- package/api/resources/actions/types/index.js +0 -22
- package/dist/api/resources/actions/client/Client.d.ts +0 -50
- package/dist/api/resources/actions/client/Client.js +0 -138
- package/dist/api/resources/actions/client/index.d.ts +0 -1
- package/dist/api/resources/actions/client/index.js +0 -17
- package/dist/api/resources/actions/client/requests/InvokeActionRequest.d.ts +0 -55
- package/dist/api/resources/actions/client/requests/InvokeActionRequest.js +0 -5
- package/dist/api/resources/actions/client/requests/index.d.ts +0 -1
- package/dist/api/resources/actions/client/requests/index.js +0 -2
- package/dist/api/resources/actions/index.d.ts +0 -2
- package/dist/api/resources/actions/index.js +0 -18
- package/dist/api/resources/actions/types/ActionStatus.d.ts +0 -13
- package/dist/api/resources/actions/types/ActionStatus.js +0 -15
- package/dist/api/resources/actions/types/Conversation.d.ts +0 -6
- package/dist/api/resources/actions/types/Conversation.js +0 -5
- package/dist/api/resources/actions/types/DirectMessage.js +0 -5
- package/dist/api/resources/actions/types/HumanConfirmationChannel.d.ts +0 -16
- package/dist/api/resources/actions/types/HumanConfirmationChannel.js +0 -5
- package/dist/api/resources/actions/types/InvokeActionResponse.d.ts +0 -8
- package/dist/api/resources/actions/types/InvokeActionResponse.js +0 -5
- package/dist/api/resources/actions/types/SlackThread.d.ts +0 -7
- package/dist/api/resources/actions/types/SlackThread.js +0 -5
- package/dist/api/resources/actions/types/index.d.ts +0 -6
- package/dist/api/resources/actions/types/index.js +0 -22
- package/dist/serialization/resources/actions/client/index.d.ts +0 -1
- package/dist/serialization/resources/actions/client/index.js +0 -17
- package/dist/serialization/resources/actions/client/requests/InvokeActionRequest.d.ts +0 -19
- package/dist/serialization/resources/actions/client/requests/InvokeActionRequest.js +0 -40
- package/dist/serialization/resources/actions/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/actions/client/requests/index.js +0 -5
- package/dist/serialization/resources/actions/index.d.ts +0 -2
- package/dist/serialization/resources/actions/index.js +0 -18
- package/dist/serialization/resources/actions/types/ActionStatus.d.ts +0 -10
- package/dist/serialization/resources/actions/types/ActionStatus.js +0 -39
- package/dist/serialization/resources/actions/types/DirectMessage.js +0 -33
- package/dist/serialization/resources/actions/types/HumanConfirmationChannel.d.ts +0 -22
- package/dist/serialization/resources/actions/types/InvokeActionResponse.d.ts +0 -14
- package/dist/serialization/resources/actions/types/index.d.ts +0 -6
- package/dist/serialization/resources/actions/types/index.js +0 -22
- package/serialization/resources/actions/client/index.d.ts +0 -1
- package/serialization/resources/actions/client/index.js +0 -17
- package/serialization/resources/actions/client/requests/InvokeActionRequest.d.ts +0 -19
- package/serialization/resources/actions/client/requests/InvokeActionRequest.js +0 -40
- package/serialization/resources/actions/client/requests/index.d.ts +0 -1
- package/serialization/resources/actions/client/requests/index.js +0 -5
- package/serialization/resources/actions/index.d.ts +0 -2
- package/serialization/resources/actions/index.js +0 -18
- package/serialization/resources/actions/types/ActionStatus.d.ts +0 -10
- package/serialization/resources/actions/types/ActionStatus.js +0 -39
- package/serialization/resources/actions/types/Conversation.js +0 -33
- package/serialization/resources/actions/types/DirectMessage.d.ts +0 -12
- package/serialization/resources/actions/types/DirectMessage.js +0 -33
- package/serialization/resources/actions/types/HumanConfirmationChannel.d.ts +0 -22
- package/serialization/resources/actions/types/HumanConfirmationChannel.js +0 -43
- package/serialization/resources/actions/types/InvokeActionResponse.d.ts +0 -14
- package/serialization/resources/actions/types/InvokeActionResponse.js +0 -35
- package/serialization/resources/actions/types/SlackThread.d.ts +0 -13
- package/serialization/resources/actions/types/SlackThread.js +0 -34
- package/serialization/resources/actions/types/index.d.ts +0 -6
- package/serialization/resources/actions/types/index.js +0 -22
- /package/api/resources/{actions/client/requests/InvokeActionRequest.js → copilots/types/ErrorChunk.js} +0 -0
- /package/api/resources/{actions/types/Conversation.js → copilots/types/ErrorChunkData.js} +0 -0
- /package/{api/resources/actions/types/DirectMessage.js → dist/api/resources/copilots/types/ErrorChunk.js} +0 -0
- /package/{api/resources/actions/types/HumanConfirmationChannel.js → dist/api/resources/copilots/types/ErrorChunkData.js} +0 -0
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Request = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.UserMetadataPatch = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.25";
|
package/dist/version.js
CHANGED
package/environments.d.ts
CHANGED
package/errors/CredalError.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CredalError = void 0;
|
|
7
|
+
const json_1 = require("../core/json");
|
|
7
8
|
class CredalError extends Error {
|
|
8
9
|
constructor({ message, statusCode, body }) {
|
|
9
10
|
super(buildMessage({ message, statusCode, body }));
|
|
@@ -26,7 +27,7 @@ function buildMessage({ message, statusCode, body, }) {
|
|
|
26
27
|
lines.push(`Status code: ${statusCode.toString()}`);
|
|
27
28
|
}
|
|
28
29
|
if (body != null) {
|
|
29
|
-
lines.push(`Body: ${
|
|
30
|
+
lines.push(`Body: ${(0, json_1.toJson)(body, undefined, 2)}`);
|
|
30
31
|
}
|
|
31
32
|
return lines.join("\n");
|
|
32
33
|
}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.CredalTimeoutError = void 0;
|
|
7
7
|
class CredalTimeoutError extends Error {
|
|
8
|
-
constructor() {
|
|
9
|
-
super(
|
|
8
|
+
constructor(message) {
|
|
9
|
+
super(message);
|
|
10
10
|
Object.setPrototypeOf(this, CredalTimeoutError.prototype);
|
|
11
11
|
}
|
|
12
12
|
}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -15,15 +15,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.CredalTimeoutError = exports.CredalError = exports.CredalEnvironment = exports.CredalClient = exports.Credal = void 0;
|
|
36
|
+
exports.serialization = exports.CredalTimeoutError = exports.CredalError = exports.CredalEnvironment = exports.CredalClient = exports.Credal = void 0;
|
|
27
37
|
exports.Credal = __importStar(require("./api"));
|
|
28
38
|
var Client_1 = require("./Client");
|
|
29
39
|
Object.defineProperty(exports, "CredalClient", { enumerable: true, get: function () { return Client_1.CredalClient; } });
|
|
@@ -32,3 +42,4 @@ Object.defineProperty(exports, "CredalEnvironment", { enumerable: true, get: fun
|
|
|
32
42
|
var errors_1 = require("./errors");
|
|
33
43
|
Object.defineProperty(exports, "CredalError", { enumerable: true, get: function () { return errors_1.CredalError; } });
|
|
34
44
|
Object.defineProperty(exports, "CredalTimeoutError", { enumerable: true, get: function () { return errors_1.CredalTimeoutError; } });
|
|
45
|
+
exports.serialization = __importStar(require("./serialization"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@credal/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": "https://github.com/credal-ai/credal-typescript-sdk",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -15,26 +15,25 @@
|
|
|
15
15
|
"url-join": "4.0.1",
|
|
16
16
|
"form-data": "^4.0.0",
|
|
17
17
|
"formdata-node": "^6.0.3",
|
|
18
|
-
"node-fetch": "2.7.0",
|
|
19
|
-
"qs": "6.
|
|
18
|
+
"node-fetch": "^2.7.0",
|
|
19
|
+
"qs": "^6.13.1",
|
|
20
20
|
"readable-stream": "^4.5.2",
|
|
21
|
-
"js-base64": "3.7.
|
|
21
|
+
"js-base64": "3.7.7"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/url-join": "4.0.1",
|
|
25
|
-
"@types/qs": "6.9.
|
|
26
|
-
"@types/node-fetch": "2.6.
|
|
27
|
-
"@types/readable-stream": "^4.0.
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"jest": "29.
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"typescript": "4.6.4"
|
|
25
|
+
"@types/qs": "^6.9.17",
|
|
26
|
+
"@types/node-fetch": "^2.6.12",
|
|
27
|
+
"@types/readable-stream": "^4.0.18",
|
|
28
|
+
"webpack": "^5.97.1",
|
|
29
|
+
"ts-loader": "^9.5.1",
|
|
30
|
+
"jest": "^29.7.0",
|
|
31
|
+
"@types/jest": "^29.5.14",
|
|
32
|
+
"ts-jest": "^29.1.1",
|
|
33
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
34
|
+
"@types/node": "^18.19.70",
|
|
35
|
+
"prettier": "^3.4.2",
|
|
36
|
+
"typescript": "~5.7.2"
|
|
38
37
|
},
|
|
39
38
|
"browser": {
|
|
40
39
|
"fs": false,
|
package/reference.md
CHANGED
|
@@ -1,84 +1,5 @@
|
|
|
1
1
|
# Reference
|
|
2
2
|
|
|
3
|
-
## Actions
|
|
4
|
-
|
|
5
|
-
<details><summary><code>client.actions.<a href="/src/api/resources/actions/client/Client.ts">invokeAction</a>({ ...params }) -> Credal.InvokeActionResponse</code></summary>
|
|
6
|
-
<dl>
|
|
7
|
-
<dd>
|
|
8
|
-
|
|
9
|
-
#### 📝 Description
|
|
10
|
-
|
|
11
|
-
<dl>
|
|
12
|
-
<dd>
|
|
13
|
-
|
|
14
|
-
<dl>
|
|
15
|
-
<dd>
|
|
16
|
-
|
|
17
|
-
Invoke an action, asking for human confirmation if necessary
|
|
18
|
-
|
|
19
|
-
</dd>
|
|
20
|
-
</dl>
|
|
21
|
-
</dd>
|
|
22
|
-
</dl>
|
|
23
|
-
|
|
24
|
-
#### 🔌 Usage
|
|
25
|
-
|
|
26
|
-
<dl>
|
|
27
|
-
<dd>
|
|
28
|
-
|
|
29
|
-
<dl>
|
|
30
|
-
<dd>
|
|
31
|
-
|
|
32
|
-
```typescript
|
|
33
|
-
await client.actions.invokeAction({
|
|
34
|
-
actionId: "2b5cf2b8-3df3-11ef-9a96-332d4470d189",
|
|
35
|
-
actionInputs: {
|
|
36
|
-
textToAppend: "If you need more help, please contact your direct manager.",
|
|
37
|
-
},
|
|
38
|
-
userEmail: "ben@credal.ai",
|
|
39
|
-
requireHumanConfirmation: true,
|
|
40
|
-
humanConfirmationChannel: {
|
|
41
|
-
type: "slackThread",
|
|
42
|
-
channelId: "ABC123",
|
|
43
|
-
threadTimestamp: "123456789",
|
|
44
|
-
},
|
|
45
|
-
justification: "The user directly asked to update the Relocations Confluence document with this text.",
|
|
46
|
-
auditLogId: "3df3f2b8-3df3-11ef-9a96-332d447011ef",
|
|
47
|
-
});
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
</dd>
|
|
51
|
-
</dl>
|
|
52
|
-
</dd>
|
|
53
|
-
</dl>
|
|
54
|
-
|
|
55
|
-
#### ⚙️ Parameters
|
|
56
|
-
|
|
57
|
-
<dl>
|
|
58
|
-
<dd>
|
|
59
|
-
|
|
60
|
-
<dl>
|
|
61
|
-
<dd>
|
|
62
|
-
|
|
63
|
-
**request:** `Credal.InvokeActionRequest`
|
|
64
|
-
|
|
65
|
-
</dd>
|
|
66
|
-
</dl>
|
|
67
|
-
|
|
68
|
-
<dl>
|
|
69
|
-
<dd>
|
|
70
|
-
|
|
71
|
-
**requestOptions:** `Actions.RequestOptions`
|
|
72
|
-
|
|
73
|
-
</dd>
|
|
74
|
-
</dl>
|
|
75
|
-
</dd>
|
|
76
|
-
</dl>
|
|
77
|
-
|
|
78
|
-
</dd>
|
|
79
|
-
</dl>
|
|
80
|
-
</details>
|
|
81
|
-
|
|
82
3
|
## Copilots
|
|
83
4
|
|
|
84
5
|
<details><summary><code>client.copilots.<a href="/src/api/resources/copilots/client/Client.ts">createCopilot</a>({ ...params }) -> Credal.CreateCopilotResponse</code></summary>
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require("fs").promises;
|
|
4
|
+
const path = require("path");
|
|
5
|
+
|
|
6
|
+
const extensionMap = {
|
|
7
|
+
".js": ".mjs",
|
|
8
|
+
".d.ts": ".d.mts",
|
|
9
|
+
};
|
|
10
|
+
const oldExtensions = Object.keys(extensionMap);
|
|
11
|
+
|
|
12
|
+
async function findFiles(rootPath) {
|
|
13
|
+
const files = [];
|
|
14
|
+
|
|
15
|
+
async function scan(directory) {
|
|
16
|
+
const entries = await fs.readdir(directory, { withFileTypes: true });
|
|
17
|
+
|
|
18
|
+
for (const entry of entries) {
|
|
19
|
+
const fullPath = path.join(directory, entry.name);
|
|
20
|
+
|
|
21
|
+
if (entry.isDirectory()) {
|
|
22
|
+
if (entry.name !== "node_modules" && !entry.name.startsWith(".")) {
|
|
23
|
+
await scan(fullPath);
|
|
24
|
+
}
|
|
25
|
+
} else if (entry.isFile()) {
|
|
26
|
+
if (oldExtensions.some((ext) => entry.name.endsWith(ext))) {
|
|
27
|
+
files.push(fullPath);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
await scan(rootPath);
|
|
34
|
+
return files;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async function updateFiles(files) {
|
|
38
|
+
const updatedFiles = [];
|
|
39
|
+
for (const file of files) {
|
|
40
|
+
const updated = await updateFileContents(file);
|
|
41
|
+
updatedFiles.push(updated);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
console.log(`Updated imports in ${updatedFiles.length} files.`);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async function updateFileContents(file) {
|
|
48
|
+
const content = await fs.readFile(file, "utf8");
|
|
49
|
+
|
|
50
|
+
let newContent = content;
|
|
51
|
+
// Update each extension type defined in the map
|
|
52
|
+
for (const [oldExt, newExt] of Object.entries(extensionMap)) {
|
|
53
|
+
const regex = new RegExp(`(import|export)(.+from\\s+['"])(\\.\\.?\\/[^'"]+)(\\${oldExt})(['"])`, "g");
|
|
54
|
+
newContent = newContent.replace(regex, `$1$2$3${newExt}$5`);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (content !== newContent) {
|
|
58
|
+
await fs.writeFile(file, newContent, "utf8");
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async function renameFiles(files) {
|
|
65
|
+
let counter = 0;
|
|
66
|
+
for (const file of files) {
|
|
67
|
+
const ext = oldExtensions.find((ext) => file.endsWith(ext));
|
|
68
|
+
const newExt = extensionMap[ext];
|
|
69
|
+
|
|
70
|
+
if (newExt) {
|
|
71
|
+
const newPath = file.slice(0, -ext.length) + newExt;
|
|
72
|
+
await fs.rename(file, newPath);
|
|
73
|
+
counter++;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
console.log(`Renamed ${counter} files.`);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async function main() {
|
|
81
|
+
try {
|
|
82
|
+
const targetDir = process.argv[2];
|
|
83
|
+
if (!targetDir) {
|
|
84
|
+
console.error("Please provide a target directory");
|
|
85
|
+
process.exit(1);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const targetPath = path.resolve(targetDir);
|
|
89
|
+
const targetStats = await fs.stat(targetPath);
|
|
90
|
+
|
|
91
|
+
if (!targetStats.isDirectory()) {
|
|
92
|
+
console.error("The provided path is not a directory");
|
|
93
|
+
process.exit(1);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
console.log(`Scanning directory: ${targetDir}`);
|
|
97
|
+
|
|
98
|
+
const files = await findFiles(targetDir);
|
|
99
|
+
|
|
100
|
+
if (files.length === 0) {
|
|
101
|
+
console.log("No matching files found.");
|
|
102
|
+
process.exit(0);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
console.log(`Found ${files.length} files.`);
|
|
106
|
+
await updateFiles(files);
|
|
107
|
+
await renameFiles(files);
|
|
108
|
+
console.log("\nDone!");
|
|
109
|
+
} catch (error) {
|
|
110
|
+
console.error("An error occurred:", error.message);
|
|
111
|
+
process.exit(1);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
main();
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Collaborator = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.ExternalResourceId = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Operator = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.ResourceIdentifier = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.ResourceType = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Role = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Url = void 0;
|
|
30
40
|
const core = __importStar(require("../../../../core"));
|