parlant-client 0.10.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Client.d.ts +23 -16
- package/src/Client.js +29 -24
- package/src/api/errors/GatewayTimeoutError.js +17 -7
- package/src/api/errors/NotFoundError.js +17 -7
- package/src/api/errors/ServiceUnavailableError.js +17 -7
- package/src/api/errors/UnprocessableEntityError.js +17 -7
- package/src/api/resources/agents/client/Client.d.ts +12 -6
- package/src/api/resources/agents/client/Client.js +47 -50
- package/src/api/resources/agents/client/requests/AgentCreationParams.d.ts +7 -1
- package/src/api/resources/agents/client/requests/AgentUpdateParams.d.ts +5 -1
- package/src/api/resources/contextVariables/client/Client.d.ts +46 -48
- package/src/api/resources/contextVariables/client/Client.js +111 -122
- package/src/api/resources/contextVariables/client/requests/ContextVariableCreationParams.d.ts +3 -1
- package/src/api/resources/contextVariables/client/requests/ContextVariableUpdateParams.d.ts +12 -2
- package/src/api/resources/contextVariables/client/requests/ContextVariablesDeleteManyRequest.d.ts +13 -0
- package/src/api/resources/contextVariables/client/requests/ContextVariablesListRequest.d.ts +13 -0
- package/src/api/resources/contextVariables/client/requests/ContextVariablesRetrieveRequest.d.ts +3 -1
- package/src/api/resources/contextVariables/client/requests/index.d.ts +2 -0
- package/src/api/resources/customers/client/Client.d.ts +7 -3
- package/src/api/resources/customers/client/Client.js +42 -47
- package/src/api/resources/customers/client/requests/CustomerCreationParams.d.ts +2 -0
- package/src/api/resources/glossary/client/Client.d.ts +30 -24
- package/src/api/resources/glossary/client/Client.js +71 -70
- package/src/api/resources/glossary/client/requests/GlossaryListTermsRequest.d.ts +13 -0
- package/src/api/resources/glossary/client/requests/TermCreationParams.d.ts +2 -0
- package/src/api/resources/glossary/client/requests/TermUpdateParams.d.ts +7 -1
- package/src/api/resources/glossary/client/requests/index.d.ts +1 -0
- package/src/api/resources/guidelines/client/Client.d.ts +44 -93
- package/src/api/resources/guidelines/client/Client.js +88 -144
- package/src/api/resources/guidelines/client/requests/GuidelineCreationParams.d.ts +17 -46
- package/src/api/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +20 -10
- package/src/api/resources/guidelines/client/requests/GuidelinesListRequest.d.ts +13 -0
- package/src/api/resources/guidelines/client/requests/index.d.ts +1 -0
- package/src/api/resources/index.d.ts +10 -8
- package/src/api/resources/index.js +28 -16
- package/src/api/resources/relationships/client/Client.d.ts +86 -0
- package/src/api/resources/relationships/client/Client.js +319 -0
- package/src/api/resources/relationships/client/requests/RelationshipCreationParams.d.ts +23 -0
- package/src/api/resources/relationships/client/requests/RelationshipsListRequest.d.ts +22 -0
- package/src/api/resources/relationships/client/requests/index.d.ts +2 -0
- package/src/api/resources/services/client/Client.d.ts +7 -9
- package/src/api/resources/services/client/Client.js +36 -44
- package/src/api/resources/sessions/client/Client.d.ts +31 -13
- package/src/api/resources/sessions/client/Client.js +98 -100
- package/src/api/resources/sessions/client/requests/SessionsDeleteEventsRequest.d.ts +1 -1
- package/src/api/resources/sessions/client/requests/SessionsDeleteManyRequest.d.ts +4 -1
- package/src/api/resources/sessions/client/requests/SessionsListEventsRequest.d.ts +5 -1
- package/src/api/resources/sessions/client/requests/SessionsListRequest.d.ts +4 -1
- package/src/api/resources/tags/client/Client.d.ts +6 -2
- package/src/api/resources/tags/client/Client.js +39 -44
- package/src/api/resources/utterances/client/Client.d.ts +102 -0
- package/src/api/resources/utterances/client/Client.js +382 -0
- package/src/api/resources/utterances/client/requests/UtteranceCreationParams.d.ts +23 -0
- package/src/api/resources/utterances/client/requests/UtteranceUpdateParams.d.ts +22 -0
- package/src/api/resources/utterances/client/requests/UtterancesListRequest.d.ts +13 -0
- package/src/api/resources/utterances/client/requests/index.d.ts +3 -0
- package/src/api/resources/utterances/client/requests/index.js +2 -0
- package/src/api/types/Agent.d.ts +5 -3
- package/src/api/types/AgentTagUpdateParams.d.ts +12 -0
- package/src/api/types/AgentTagUpdateParams.js +5 -0
- package/src/api/types/CoherenceCheckKindDto.d.ts +1 -1
- package/src/api/types/CompositionModeDto.d.ts +19 -0
- package/src/api/types/CompositionModeDto.js +12 -0
- package/src/api/types/ConnectionPropositionKindDto.d.ts +1 -1
- package/src/api/types/ContextVariable.d.ts +3 -5
- package/src/api/types/ContextVariableTagsUpdateParams.d.ts +12 -0
- package/src/api/types/ContextVariableTagsUpdateParams.js +5 -0
- package/src/api/types/Customer.d.ts +1 -1
- package/src/api/types/EvaluationCreationParams.d.ts +12 -0
- package/src/api/types/EvaluationCreationParams.js +5 -0
- package/src/api/types/EvaluationStatusDto.d.ts +1 -1
- package/src/api/types/EventKindDto.d.ts +1 -1
- package/src/api/types/EventSourceDto.d.ts +1 -1
- package/src/api/types/Guideline.d.ts +7 -1
- package/src/api/types/{GuidelineProposition.d.ts → GuidelineMatch.d.ts} +2 -2
- package/src/api/types/GuidelineMatch.js +5 -0
- package/src/api/types/{GuidelinePropositionInspection.d.ts → GuidelineMatchingInspection.d.ts} +3 -3
- package/src/api/types/GuidelineMatchingInspection.js +5 -0
- package/src/api/types/GuidelineMetadataUpdateParams.d.ts +12 -0
- package/src/api/types/GuidelineMetadataUpdateParams.js +5 -0
- package/src/api/types/GuidelinePayloadOperationDto.d.ts +1 -1
- package/src/api/types/GuidelineRelationshipKindDto.d.ts +11 -0
- package/src/api/types/GuidelineRelationshipKindDto.js +10 -0
- package/src/api/types/GuidelineTagsUpdateParams.d.ts +12 -0
- package/src/api/types/GuidelineTagsUpdateParams.js +5 -0
- package/src/api/types/GuidelineWithRelationshipsAndToolAssociations.d.ts +12 -0
- package/src/api/types/GuidelineWithRelationshipsAndToolAssociations.js +5 -0
- package/src/api/types/LegacyContextVariable.d.ts +22 -0
- package/src/api/types/LegacyContextVariable.js +5 -0
- package/src/api/types/LegacyContextVariableCreationParams.d.ts +16 -0
- package/src/api/types/LegacyContextVariableCreationParams.js +5 -0
- package/src/api/types/LegacyContextVariableReadResult.d.ts +12 -0
- package/src/api/types/LegacyContextVariableReadResult.js +5 -0
- package/src/api/types/LegacyContextVariableUpdateParams.d.ts +16 -0
- package/src/api/types/LegacyContextVariableUpdateParams.js +5 -0
- package/src/api/types/LegacyGuideline.d.ts +16 -0
- package/src/api/types/LegacyGuideline.js +5 -0
- package/src/api/types/{GuidelineConnection.d.ts → LegacyGuidelineConnection.d.ts} +4 -4
- package/src/api/types/LegacyGuidelineConnection.js +5 -0
- package/src/api/types/{GuidelineConnectionAddition.d.ts → LegacyGuidelineConnectionAddition.d.ts} +1 -1
- package/src/api/types/LegacyGuidelineConnectionAddition.js +5 -0
- package/src/api/types/{GuidelineConnectionUpdateParams.d.ts → LegacyGuidelineConnectionUpdateParams.d.ts} +3 -3
- package/src/api/types/LegacyGuidelineConnectionUpdateParams.js +5 -0
- package/src/api/types/LegacyGuidelineCreationParams.d.ts +10 -0
- package/src/api/types/LegacyGuidelineCreationParams.js +5 -0
- package/src/api/types/{GuidelineCreationResult.d.ts → LegacyGuidelineCreationResult.d.ts} +2 -2
- package/src/api/types/LegacyGuidelineCreationResult.js +5 -0
- package/src/api/types/LegacyGuidelineUpdateParams.d.ts +12 -0
- package/src/api/types/LegacyGuidelineUpdateParams.js +5 -0
- package/src/api/types/{GuidelineWithConnectionsAndToolAssociations.d.ts → LegacyGuidelineWithConnectionsAndToolAssociations.d.ts} +3 -3
- package/src/api/types/LegacyGuidelineWithConnectionsAndToolAssociations.js +5 -0
- package/src/api/types/LegacyTerm.d.ts +18 -0
- package/src/api/types/LegacyTerm.js +5 -0
- package/src/api/types/LegacyTermCreationParams.d.ts +16 -0
- package/src/api/types/LegacyTermCreationParams.js +5 -0
- package/src/api/types/LegacyTermUpdateParams.d.ts +16 -0
- package/src/api/types/LegacyTermUpdateParams.js +5 -0
- package/src/api/types/MessageGenerationInspection.d.ts +0 -1
- package/src/api/types/Moderation.d.ts +1 -1
- package/src/api/types/OpenApiServiceParams.d.ts +2 -2
- package/src/api/types/PayloadKindDto.d.ts +1 -1
- package/src/api/types/PreparationIteration.d.ts +3 -3
- package/src/api/types/PreparationIterationGenerations.d.ts +1 -1
- package/src/api/types/PreparationIterationTerm.d.ts +16 -0
- package/src/api/types/PreparationIterationTerm.js +5 -0
- package/src/api/types/Relationship.d.ts +21 -0
- package/src/api/types/Relationship.js +5 -0
- package/src/api/types/Tag.d.ts +0 -2
- package/src/api/types/Term.d.ts +2 -0
- package/src/api/types/TermTagsUpdateParams.d.ts +12 -0
- package/src/api/types/TermTagsUpdateParams.js +5 -0
- package/src/api/types/ToolParameterDtoEnumItem.d.ts +1 -1
- package/src/api/types/ToolParameterTypeDto.d.ts +1 -1
- package/src/api/types/ToolServiceKindDto.d.ts +5 -5
- package/src/api/types/Utterance.d.ts +16 -0
- package/src/api/types/Utterance.js +5 -0
- package/src/api/types/UtteranceField.d.ts +10 -0
- package/src/api/types/UtteranceField.js +5 -0
- package/src/api/types/UtteranceReasonDto.d.ts +1 -1
- package/src/api/types/UtteranceTagUpdateParams.d.ts +15 -0
- package/src/api/types/UtteranceTagUpdateParams.js +5 -0
- package/src/api/types/ValidationErrorLocItem.d.ts +1 -1
- package/src/api/types/index.d.ts +31 -7
- package/src/api/types/index.js +31 -7
- package/src/core/fetcher/APIResponse.d.ts +1 -1
- package/src/core/fetcher/Fetcher.d.ts +2 -2
- package/src/core/fetcher/Fetcher.js +6 -5
- package/src/core/fetcher/Supplier.d.ts +1 -1
- package/src/core/fetcher/createRequestUrl.d.ts +1 -1
- package/src/core/fetcher/createRequestUrl.js +1 -2
- package/src/core/fetcher/getFetchFn.js +18 -9
- package/src/core/fetcher/getHeader.js +1 -2
- package/src/core/fetcher/getRequestBody.js +5 -5
- package/src/core/fetcher/getResponseBody.js +1 -2
- package/src/core/fetcher/makeRequest.d.ts +1 -1
- package/src/core/fetcher/requestWithRetries.js +4 -5
- package/src/core/fetcher/signals.d.ts +0 -1
- package/src/core/fetcher/signals.js +2 -3
- package/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/src/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/src/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/src/core/index.js +17 -7
- package/src/core/json.d.ts +15 -0
- package/src/core/json.js +24 -0
- package/src/core/runtime/runtime.d.ts +1 -1
- package/src/core/runtime/runtime.js +51 -41
- package/src/core/schemas/Schema.d.ts +7 -5
- package/src/core/schemas/Schema.js +2 -0
- package/src/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/src/core/schemas/builders/bigint/bigint.js +22 -19
- package/src/core/schemas/builders/date/date.js +1 -2
- package/src/core/schemas/builders/enum/enum.js +1 -2
- package/src/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/src/core/schemas/builders/lazy/lazy.js +3 -4
- package/src/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/src/core/schemas/builders/list/list.js +1 -2
- package/src/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/src/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/src/core/schemas/builders/object/object.d.ts +1 -1
- package/src/core/schemas/builders/object/object.js +31 -3
- package/src/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/src/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/src/core/schemas/builders/object/property.js +2 -3
- package/src/core/schemas/builders/object/types.d.ts +16 -11
- package/src/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/src/core/schemas/builders/object-like/types.d.ts +1 -1
- package/src/core/schemas/builders/record/record.js +2 -4
- package/src/core/schemas/builders/record/types.d.ts +2 -2
- package/src/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/src/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
- package/src/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/src/core/schemas/builders/set/set.js +1 -2
- package/src/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/src/core/schemas/builders/union/discriminant.js +1 -2
- package/src/core/schemas/builders/union/types.d.ts +6 -6
- package/src/core/schemas/builders/union/union.d.ts +1 -1
- package/src/core/schemas/builders/union/union.js +1 -2
- package/src/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/src/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
- package/src/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/src/core/schemas/utils/entries.d.ts +1 -1
- package/src/core/schemas/utils/entries.js +1 -2
- package/src/core/schemas/utils/filterObject.d.ts +1 -1
- package/src/core/schemas/utils/filterObject.js +1 -2
- package/src/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/src/core/schemas/utils/isPlainObject.js +1 -2
- package/src/core/schemas/utils/keys.d.ts +1 -1
- package/src/core/schemas/utils/keys.js +1 -2
- package/src/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/src/core/schemas/utils/partition.js +1 -2
- package/src/errors/ParlantError.js +2 -1
- package/src/errors/ParlantTimeoutError.d.ts +1 -1
- package/src/errors/ParlantTimeoutError.js +2 -2
- package/src/index.d.ts +1 -0
- package/src/index.js +19 -8
- package/src/serialization/resources/agents/client/index.js +17 -7
- package/src/serialization/resources/agents/client/list.js +17 -7
- package/src/serialization/resources/agents/client/requests/AgentCreationParams.d.ts +3 -0
- package/src/serialization/resources/agents/client/requests/AgentCreationParams.js +20 -7
- package/src/serialization/resources/agents/client/requests/AgentUpdateParams.d.ts +4 -0
- package/src/serialization/resources/agents/client/requests/AgentUpdateParams.js +21 -7
- package/src/serialization/resources/contextVariables/client/index.js +17 -7
- package/src/serialization/resources/contextVariables/client/list.js +17 -7
- package/src/serialization/resources/contextVariables/client/requests/ContextVariableCreationParams.d.ts +1 -0
- package/src/serialization/resources/contextVariables/client/requests/ContextVariableCreationParams.js +18 -7
- package/src/serialization/resources/contextVariables/client/requests/ContextVariableUpdateParams.d.ts +2 -0
- package/src/serialization/resources/contextVariables/client/requests/ContextVariableUpdateParams.js +19 -7
- package/src/serialization/resources/contextVariables/client/requests/ContextVariableValueUpdateParams.js +17 -7
- package/src/serialization/resources/customers/client/index.js +17 -7
- package/src/serialization/resources/customers/client/list.js +17 -7
- package/src/serialization/resources/customers/client/requests/CustomerCreationParams.d.ts +1 -0
- package/src/serialization/resources/customers/client/requests/CustomerCreationParams.js +18 -7
- package/src/serialization/resources/customers/client/requests/CustomerUpdateParams.js +17 -7
- package/src/serialization/resources/glossary/client/index.js +17 -7
- package/src/serialization/resources/glossary/client/listTerms.js +17 -7
- package/src/serialization/resources/glossary/client/requests/TermCreationParams.d.ts +1 -0
- package/src/serialization/resources/glossary/client/requests/TermCreationParams.js +18 -7
- package/src/serialization/resources/glossary/client/requests/TermUpdateParams.d.ts +2 -0
- package/src/serialization/resources/glossary/client/requests/TermUpdateParams.js +19 -7
- package/src/serialization/resources/guidelines/client/index.js +17 -7
- package/src/serialization/resources/guidelines/client/list.js +17 -7
- package/src/serialization/resources/guidelines/client/requests/GuidelineCreationParams.d.ts +5 -2
- package/src/serialization/resources/guidelines/client/requests/GuidelineCreationParams.js +22 -9
- package/src/serialization/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +7 -2
- package/src/serialization/resources/guidelines/client/requests/GuidelineUpdateParams.js +24 -9
- package/src/serialization/resources/index.d.ts +10 -8
- package/src/serialization/resources/index.js +28 -16
- package/src/serialization/resources/relationships/client/index.d.ts +2 -0
- package/src/serialization/resources/relationships/client/index.js +41 -0
- package/src/serialization/resources/relationships/client/list.d.ts +11 -0
- package/src/serialization/resources/relationships/client/list.js +42 -0
- package/src/serialization/resources/relationships/client/requests/RelationshipCreationParams.d.ts +17 -0
- package/src/serialization/resources/relationships/client/requests/RelationshipCreationParams.js +48 -0
- package/src/serialization/resources/relationships/client/requests/index.d.ts +1 -0
- package/src/serialization/resources/relationships/client/requests/index.js +5 -0
- package/src/serialization/resources/relationships/index.d.ts +1 -0
- package/src/serialization/resources/relationships/index.js +17 -0
- package/src/serialization/resources/services/client/index.js +17 -7
- package/src/serialization/resources/services/client/list.js +17 -7
- package/src/serialization/resources/services/client/requests/ServiceUpdateParams.js +17 -7
- package/src/serialization/resources/sessions/client/index.js +17 -7
- package/src/serialization/resources/sessions/client/list.js +17 -7
- package/src/serialization/resources/sessions/client/listEvents.js +17 -7
- package/src/serialization/resources/sessions/client/requests/EventCreationParams.js +17 -7
- package/src/serialization/resources/sessions/client/requests/SessionCreationParams.js +17 -7
- package/src/serialization/resources/sessions/client/requests/SessionUpdateParams.js +17 -7
- package/src/serialization/resources/tags/client/index.js +17 -7
- package/src/serialization/resources/tags/client/list.js +17 -7
- package/src/serialization/resources/tags/client/requests/TagCreationParams.js +17 -7
- package/src/serialization/resources/tags/client/requests/TagUpdateParams.js +17 -7
- package/src/serialization/resources/utterances/client/index.d.ts +2 -0
- package/src/serialization/resources/utterances/client/index.js +41 -0
- package/src/serialization/resources/utterances/client/list.d.ts +11 -0
- package/src/serialization/resources/utterances/client/list.js +42 -0
- package/src/serialization/resources/utterances/client/requests/UtteranceCreationParams.d.ts +15 -0
- package/src/serialization/resources/utterances/client/requests/UtteranceCreationParams.js +46 -0
- package/src/serialization/resources/utterances/client/requests/UtteranceUpdateParams.d.ts +16 -0
- package/src/serialization/resources/utterances/client/requests/UtteranceUpdateParams.js +47 -0
- package/src/serialization/resources/utterances/client/requests/index.d.ts +2 -0
- package/src/serialization/resources/utterances/client/requests/index.js +7 -0
- package/src/serialization/resources/utterances/index.d.ts +1 -0
- package/src/serialization/resources/utterances/index.js +17 -0
- package/src/serialization/types/Agent.d.ts +4 -2
- package/src/serialization/types/Agent.js +21 -9
- package/src/serialization/types/AgentTagUpdateParams.d.ts +13 -0
- package/src/serialization/types/{GuidelineConnectionUpdateParams.js → AgentTagUpdateParams.js} +20 -11
- package/src/serialization/types/CoherenceCheck.js +17 -7
- package/src/serialization/types/CoherenceCheckKindDto.js +17 -7
- package/src/serialization/types/CompositionModeDto.d.ts +10 -0
- package/src/serialization/types/{GuidelineConnection.js → CompositionModeDto.js} +19 -15
- package/src/serialization/types/ConnectionProposition.js +17 -7
- package/src/serialization/types/ConnectionPropositionKindDto.js +17 -7
- package/src/serialization/types/ConsumptionOffsets.js +17 -7
- package/src/serialization/types/ConsumptionOffsetsUpdateParams.js +17 -7
- package/src/serialization/types/ContextVariable.d.ts +1 -0
- package/src/serialization/types/ContextVariable.js +18 -7
- package/src/serialization/types/ContextVariableAndValue.js +17 -7
- package/src/serialization/types/ContextVariableReadResult.js +17 -7
- package/src/serialization/types/ContextVariableTagsUpdateParams.d.ts +13 -0
- package/src/serialization/types/ContextVariableTagsUpdateParams.js +44 -0
- package/src/serialization/types/ContextVariableValue.js +17 -7
- package/src/serialization/types/Customer.js +17 -7
- package/src/serialization/types/CustomerExtraUpdateParams.js +17 -7
- package/src/serialization/types/CustomerTagUpdateParams.js +17 -7
- package/src/serialization/types/Evaluation.js +17 -7
- package/src/serialization/types/EvaluationCreationParams.d.ts +14 -0
- package/src/serialization/{resources/evaluations/client/requests → types}/EvaluationCreationParams.js +19 -9
- package/src/serialization/types/EvaluationStatusDto.js +17 -7
- package/src/serialization/types/Event.js +17 -7
- package/src/serialization/types/EventInspectionResult.js +17 -7
- package/src/serialization/types/EventKindDto.js +17 -7
- package/src/serialization/types/EventSourceDto.js +17 -7
- package/src/serialization/types/EventTrace.js +17 -7
- package/src/serialization/types/GenerationInfo.js +17 -7
- package/src/serialization/types/Guideline.d.ts +3 -0
- package/src/serialization/types/Guideline.js +20 -7
- package/src/serialization/types/GuidelineContent.js +17 -7
- package/src/serialization/types/GuidelineInvoiceData.js +17 -7
- package/src/serialization/types/{GuidelineProposition.d.ts → GuidelineMatch.d.ts} +2 -2
- package/src/serialization/types/{GuidelineProposition.js → GuidelineMatch.js} +19 -9
- package/src/serialization/types/{GuidelinePropositionInspection.d.ts → GuidelineMatchingInspection.d.ts} +2 -2
- package/src/serialization/types/{GuidelinePropositionInspection.js → GuidelineMatchingInspection.js} +19 -9
- package/src/serialization/types/GuidelineMetadataUpdateParams.d.ts +13 -0
- package/src/serialization/types/GuidelineMetadataUpdateParams.js +44 -0
- package/src/serialization/types/GuidelinePayload.js +17 -7
- package/src/serialization/types/GuidelinePayloadOperationDto.js +17 -7
- package/src/serialization/types/GuidelineRelationshipKindDto.d.ts +10 -0
- package/src/serialization/types/{GuidelineCreationResult.js → GuidelineRelationshipKindDto.js} +19 -12
- package/src/serialization/types/GuidelineTagsUpdateParams.d.ts +13 -0
- package/src/serialization/types/GuidelineTagsUpdateParams.js +44 -0
- package/src/serialization/types/GuidelineToolAssociation.js +17 -7
- package/src/serialization/types/GuidelineToolAssociationUpdateParams.js +17 -7
- package/src/serialization/types/{GuidelineWithConnectionsAndToolAssociations.d.ts → GuidelineWithRelationshipsAndToolAssociations.d.ts} +4 -4
- package/src/serialization/types/{GuidelineWithConnectionsAndToolAssociations.js → GuidelineWithRelationshipsAndToolAssociations.js} +21 -11
- package/src/serialization/types/HttpValidationError.js +17 -7
- package/src/serialization/types/Invoice.js +17 -7
- package/src/serialization/types/InvoiceData.js +17 -7
- package/src/serialization/types/LegacyContextVariable.d.ts +17 -0
- package/src/serialization/types/LegacyContextVariable.js +48 -0
- package/src/serialization/types/LegacyContextVariableCreationParams.d.ts +16 -0
- package/src/serialization/types/LegacyContextVariableCreationParams.js +47 -0
- package/src/serialization/types/LegacyContextVariableReadResult.d.ts +15 -0
- package/src/serialization/types/LegacyContextVariableReadResult.js +46 -0
- package/src/serialization/types/LegacyContextVariableUpdateParams.d.ts +16 -0
- package/src/serialization/types/LegacyContextVariableUpdateParams.js +47 -0
- package/src/serialization/types/LegacyGuideline.d.ts +15 -0
- package/src/serialization/types/LegacyGuideline.js +46 -0
- package/src/serialization/types/LegacyGuidelineConnection.d.ts +16 -0
- package/src/serialization/types/LegacyGuidelineConnection.js +47 -0
- package/src/serialization/types/{GuidelineConnectionAddition.d.ts → LegacyGuidelineConnectionAddition.d.ts} +2 -2
- package/src/serialization/types/{GuidelineConnectionAddition.js → LegacyGuidelineConnectionAddition.js} +19 -9
- package/src/serialization/types/LegacyGuidelineConnectionUpdateParams.d.ts +14 -0
- package/src/serialization/types/LegacyGuidelineConnectionUpdateParams.js +45 -0
- package/src/serialization/types/LegacyGuidelineCreationParams.d.ts +13 -0
- package/src/serialization/types/LegacyGuidelineCreationParams.js +44 -0
- package/src/serialization/types/LegacyGuidelineCreationResult.d.ts +13 -0
- package/src/serialization/types/LegacyGuidelineCreationResult.js +44 -0
- package/src/serialization/types/LegacyGuidelineUpdateParams.d.ts +16 -0
- package/src/serialization/types/LegacyGuidelineUpdateParams.js +47 -0
- package/src/serialization/types/LegacyGuidelineWithConnectionsAndToolAssociations.d.ts +17 -0
- package/src/serialization/types/LegacyGuidelineWithConnectionsAndToolAssociations.js +48 -0
- package/src/serialization/types/LegacyTerm.d.ts +15 -0
- package/src/serialization/types/LegacyTerm.js +46 -0
- package/src/serialization/types/LegacyTermCreationParams.d.ts +14 -0
- package/src/serialization/types/LegacyTermCreationParams.js +45 -0
- package/src/serialization/types/LegacyTermUpdateParams.d.ts +14 -0
- package/src/serialization/types/LegacyTermUpdateParams.js +45 -0
- package/src/serialization/types/MessageGenerationInspection.js +17 -7
- package/src/serialization/types/Moderation.js +17 -7
- package/src/serialization/types/OpenApiServiceParams.js +17 -7
- package/src/serialization/types/Payload.js +17 -7
- package/src/serialization/types/PayloadKindDto.js +17 -7
- package/src/serialization/types/PreparationIteration.d.ts +4 -4
- package/src/serialization/types/PreparationIteration.js +21 -11
- package/src/serialization/types/PreparationIterationGenerations.d.ts +2 -2
- package/src/serialization/types/PreparationIterationGenerations.js +19 -9
- package/src/serialization/types/PreparationIterationTerm.d.ts +15 -0
- package/src/serialization/types/PreparationIterationTerm.js +46 -0
- package/src/serialization/types/Relationship.d.ts +21 -0
- package/src/serialization/types/Relationship.js +52 -0
- package/src/serialization/types/SdkServiceParams.js +17 -7
- package/src/serialization/types/Service.js +17 -7
- package/src/serialization/types/Session.js +17 -7
- package/src/serialization/types/Tag.d.ts +0 -1
- package/src/serialization/types/Tag.js +17 -8
- package/src/serialization/types/Term.d.ts +1 -0
- package/src/serialization/types/Term.js +18 -7
- package/src/serialization/types/TermTagsUpdateParams.d.ts +13 -0
- package/src/serialization/types/TermTagsUpdateParams.js +44 -0
- package/src/serialization/types/Tool.js +17 -7
- package/src/serialization/types/ToolCall.js +17 -7
- package/src/serialization/types/ToolId.js +17 -7
- package/src/serialization/types/ToolParameter.js +17 -7
- package/src/serialization/types/ToolParameterDtoEnumItem.js +17 -7
- package/src/serialization/types/ToolParameterTypeDto.js +17 -7
- package/src/serialization/types/ToolResult.js +17 -7
- package/src/serialization/types/ToolServiceKindDto.js +17 -7
- package/src/serialization/types/UsageInfo.js +17 -7
- package/src/serialization/types/Utterance.d.ts +17 -0
- package/src/serialization/types/Utterance.js +48 -0
- package/src/serialization/types/UtteranceField.d.ts +14 -0
- package/src/serialization/types/UtteranceField.js +45 -0
- package/src/serialization/types/UtteranceReasonDto.js +17 -7
- package/src/serialization/types/UtteranceRequest.js +17 -7
- package/src/serialization/types/UtteranceTagUpdateParams.d.ts +13 -0
- package/src/serialization/types/UtteranceTagUpdateParams.js +44 -0
- package/src/serialization/types/ValidationError.js +17 -7
- package/src/serialization/types/ValidationErrorLocItem.js +17 -7
- package/src/serialization/types/index.d.ts +31 -7
- package/src/serialization/types/index.js +31 -7
- package/src/api/resources/evaluations/client/Client.d.ts +0 -79
- package/src/api/resources/evaluations/client/Client.js +0 -218
- package/src/api/resources/evaluations/client/requests/EvaluationCreationParams.d.ts +0 -27
- package/src/api/resources/evaluations/client/requests/EvaluationsRetrieveRequest.d.ts +0 -13
- package/src/api/resources/evaluations/client/requests/index.d.ts +0 -2
- package/src/serialization/resources/evaluations/client/requests/EvaluationCreationParams.d.ts +0 -14
- package/src/serialization/resources/evaluations/client/requests/index.d.ts +0 -1
- package/src/serialization/resources/evaluations/client/requests/index.js +0 -5
- package/src/serialization/types/GuidelineConnection.d.ts +0 -16
- package/src/serialization/types/GuidelineConnectionUpdateParams.d.ts +0 -14
- package/src/serialization/types/GuidelineCreationResult.d.ts +0 -13
- /package/src/api/resources/{evaluations/client/requests/EvaluationCreationParams.js → contextVariables/client/requests/ContextVariablesDeleteManyRequest.js} +0 -0
- /package/src/api/resources/{evaluations/client/requests/EvaluationsRetrieveRequest.js → contextVariables/client/requests/ContextVariablesListRequest.js} +0 -0
- /package/src/api/{types/GuidelineConnection.js → resources/glossary/client/requests/GlossaryListTermsRequest.js} +0 -0
- /package/src/api/{types/GuidelineConnectionAddition.js → resources/guidelines/client/requests/GuidelinesListRequest.js} +0 -0
- /package/src/api/resources/{evaluations → relationships}/client/index.d.ts +0 -0
- /package/src/api/resources/{evaluations → relationships}/client/index.js +0 -0
- /package/src/api/{types/GuidelineConnectionUpdateParams.js → resources/relationships/client/requests/RelationshipCreationParams.js} +0 -0
- /package/src/api/{types/GuidelineCreationResult.js → resources/relationships/client/requests/RelationshipsListRequest.js} +0 -0
- /package/src/api/resources/{evaluations → relationships}/client/requests/index.js +0 -0
- /package/src/api/resources/{evaluations → relationships}/index.d.ts +0 -0
- /package/src/api/resources/{evaluations → relationships}/index.js +0 -0
- /package/src/{serialization/resources/evaluations → api/resources/utterances}/client/index.d.ts +0 -0
- /package/src/{serialization/resources/evaluations → api/resources/utterances}/client/index.js +0 -0
- /package/src/api/{types/GuidelineProposition.js → resources/utterances/client/requests/UtteranceCreationParams.js} +0 -0
- /package/src/api/{types/GuidelinePropositionInspection.js → resources/utterances/client/requests/UtteranceUpdateParams.js} +0 -0
- /package/src/api/{types/GuidelineWithConnectionsAndToolAssociations.js → resources/utterances/client/requests/UtterancesListRequest.js} +0 -0
- /package/src/{serialization/resources/evaluations → api/resources/utterances}/index.d.ts +0 -0
- /package/src/{serialization/resources/evaluations → api/resources/utterances}/index.js +0 -0
package/package.json
CHANGED
package/src/Client.d.ts
CHANGED
|
@@ -3,17 +3,20 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as core from "./core";
|
|
5
5
|
import { Agents } from "./api/resources/agents/client/Client";
|
|
6
|
-
import { Guidelines } from "./api/resources/guidelines/client/Client";
|
|
7
|
-
import { Glossary } from "./api/resources/glossary/client/Client";
|
|
8
|
-
import { ContextVariables } from "./api/resources/contextVariables/client/Client";
|
|
9
6
|
import { Sessions } from "./api/resources/sessions/client/Client";
|
|
10
|
-
import { Evaluations } from "./api/resources/evaluations/client/Client";
|
|
11
7
|
import { Services } from "./api/resources/services/client/Client";
|
|
12
8
|
import { Tags } from "./api/resources/tags/client/Client";
|
|
9
|
+
import { Glossary } from "./api/resources/glossary/client/Client";
|
|
13
10
|
import { Customers } from "./api/resources/customers/client/Client";
|
|
11
|
+
import { Utterances } from "./api/resources/utterances/client/Client";
|
|
12
|
+
import { ContextVariables } from "./api/resources/contextVariables/client/Client";
|
|
13
|
+
import { Guidelines } from "./api/resources/guidelines/client/Client";
|
|
14
|
+
import { Relationships } from "./api/resources/relationships/client/Client";
|
|
14
15
|
export declare namespace ParlantClient {
|
|
15
16
|
interface Options {
|
|
16
17
|
environment: core.Supplier<string>;
|
|
18
|
+
/** Specify a custom URL to connect the client to. */
|
|
19
|
+
baseUrl?: core.Supplier<string>;
|
|
17
20
|
}
|
|
18
21
|
interface RequestOptions {
|
|
19
22
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -22,27 +25,31 @@ export declare namespace ParlantClient {
|
|
|
22
25
|
maxRetries?: number;
|
|
23
26
|
/** A hook to abort the request. */
|
|
24
27
|
abortSignal?: AbortSignal;
|
|
28
|
+
/** Additional headers to include in the request. */
|
|
29
|
+
headers?: Record<string, string>;
|
|
25
30
|
}
|
|
26
31
|
}
|
|
27
32
|
export declare class ParlantClient {
|
|
28
33
|
protected readonly _options: ParlantClient.Options;
|
|
29
|
-
constructor(_options: ParlantClient.Options);
|
|
30
34
|
protected _agents: Agents | undefined;
|
|
31
|
-
|
|
32
|
-
protected
|
|
33
|
-
|
|
35
|
+
protected _sessions: Sessions | undefined;
|
|
36
|
+
protected _services: Services | undefined;
|
|
37
|
+
protected _tags: Tags | undefined;
|
|
34
38
|
protected _glossary: Glossary | undefined;
|
|
35
|
-
|
|
39
|
+
protected _customers: Customers | undefined;
|
|
40
|
+
protected _utterances: Utterances | undefined;
|
|
36
41
|
protected _contextVariables: ContextVariables | undefined;
|
|
37
|
-
|
|
38
|
-
protected
|
|
42
|
+
protected _guidelines: Guidelines | undefined;
|
|
43
|
+
protected _relationships: Relationships | undefined;
|
|
44
|
+
constructor(_options: ParlantClient.Options);
|
|
45
|
+
get agents(): Agents;
|
|
39
46
|
get sessions(): Sessions;
|
|
40
|
-
protected _evaluations: Evaluations | undefined;
|
|
41
|
-
get evaluations(): Evaluations;
|
|
42
|
-
protected _services: Services | undefined;
|
|
43
47
|
get services(): Services;
|
|
44
|
-
protected _tags: Tags | undefined;
|
|
45
48
|
get tags(): Tags;
|
|
46
|
-
|
|
49
|
+
get glossary(): Glossary;
|
|
47
50
|
get customers(): Customers;
|
|
51
|
+
get utterances(): Utterances;
|
|
52
|
+
get contextVariables(): ContextVariables;
|
|
53
|
+
get guidelines(): Guidelines;
|
|
54
|
+
get relationships(): Relationships;
|
|
48
55
|
}
|
package/src/Client.js
CHANGED
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ParlantClient = void 0;
|
|
7
7
|
const Client_1 = require("./api/resources/agents/client/Client");
|
|
8
|
-
const Client_2 = require("./api/resources/
|
|
9
|
-
const Client_3 = require("./api/resources/
|
|
10
|
-
const Client_4 = require("./api/resources/
|
|
11
|
-
const Client_5 = require("./api/resources/
|
|
12
|
-
const Client_6 = require("./api/resources/
|
|
13
|
-
const Client_7 = require("./api/resources/
|
|
14
|
-
const Client_8 = require("./api/resources/
|
|
15
|
-
const Client_9 = require("./api/resources/
|
|
8
|
+
const Client_2 = require("./api/resources/sessions/client/Client");
|
|
9
|
+
const Client_3 = require("./api/resources/services/client/Client");
|
|
10
|
+
const Client_4 = require("./api/resources/tags/client/Client");
|
|
11
|
+
const Client_5 = require("./api/resources/glossary/client/Client");
|
|
12
|
+
const Client_6 = require("./api/resources/customers/client/Client");
|
|
13
|
+
const Client_7 = require("./api/resources/utterances/client/Client");
|
|
14
|
+
const Client_8 = require("./api/resources/contextVariables/client/Client");
|
|
15
|
+
const Client_9 = require("./api/resources/guidelines/client/Client");
|
|
16
|
+
const Client_10 = require("./api/resources/relationships/client/Client");
|
|
16
17
|
class ParlantClient {
|
|
17
18
|
constructor(_options) {
|
|
18
19
|
this._options = _options;
|
|
@@ -21,37 +22,41 @@ class ParlantClient {
|
|
|
21
22
|
var _a;
|
|
22
23
|
return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Client_1.Agents(this._options)));
|
|
23
24
|
}
|
|
24
|
-
get
|
|
25
|
+
get sessions() {
|
|
25
26
|
var _a;
|
|
26
|
-
return ((_a = this.
|
|
27
|
+
return ((_a = this._sessions) !== null && _a !== void 0 ? _a : (this._sessions = new Client_2.Sessions(this._options)));
|
|
27
28
|
}
|
|
28
|
-
get
|
|
29
|
+
get services() {
|
|
29
30
|
var _a;
|
|
30
|
-
return ((_a = this.
|
|
31
|
+
return ((_a = this._services) !== null && _a !== void 0 ? _a : (this._services = new Client_3.Services(this._options)));
|
|
31
32
|
}
|
|
32
|
-
get
|
|
33
|
+
get tags() {
|
|
33
34
|
var _a;
|
|
34
|
-
return ((_a = this.
|
|
35
|
+
return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new Client_4.Tags(this._options)));
|
|
35
36
|
}
|
|
36
|
-
get
|
|
37
|
+
get glossary() {
|
|
37
38
|
var _a;
|
|
38
|
-
return ((_a = this.
|
|
39
|
+
return ((_a = this._glossary) !== null && _a !== void 0 ? _a : (this._glossary = new Client_5.Glossary(this._options)));
|
|
39
40
|
}
|
|
40
|
-
get
|
|
41
|
+
get customers() {
|
|
41
42
|
var _a;
|
|
42
|
-
return ((_a = this.
|
|
43
|
+
return ((_a = this._customers) !== null && _a !== void 0 ? _a : (this._customers = new Client_6.Customers(this._options)));
|
|
43
44
|
}
|
|
44
|
-
get
|
|
45
|
+
get utterances() {
|
|
45
46
|
var _a;
|
|
46
|
-
return ((_a = this.
|
|
47
|
+
return ((_a = this._utterances) !== null && _a !== void 0 ? _a : (this._utterances = new Client_7.Utterances(this._options)));
|
|
47
48
|
}
|
|
48
|
-
get
|
|
49
|
+
get contextVariables() {
|
|
49
50
|
var _a;
|
|
50
|
-
return ((_a = this.
|
|
51
|
+
return ((_a = this._contextVariables) !== null && _a !== void 0 ? _a : (this._contextVariables = new Client_8.ContextVariables(this._options)));
|
|
51
52
|
}
|
|
52
|
-
get
|
|
53
|
+
get guidelines() {
|
|
54
|
+
var _a;
|
|
55
|
+
return ((_a = this._guidelines) !== null && _a !== void 0 ? _a : (this._guidelines = new Client_9.Guidelines(this._options)));
|
|
56
|
+
}
|
|
57
|
+
get relationships() {
|
|
53
58
|
var _a;
|
|
54
|
-
return ((_a = this.
|
|
59
|
+
return ((_a = this._relationships) !== null && _a !== void 0 ? _a : (this._relationships = new Client_10.Relationships(this._options)));
|
|
55
60
|
}
|
|
56
61
|
}
|
|
57
62
|
exports.ParlantClient = ParlantClient;
|
|
@@ -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.GatewayTimeoutError = void 0;
|
|
30
40
|
const errors = __importStar(require("../../errors/index"));
|
|
@@ -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.NotFoundError = void 0;
|
|
30
40
|
const errors = __importStar(require("../../errors/index"));
|
|
@@ -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.ServiceUnavailableError = void 0;
|
|
30
40
|
const errors = __importStar(require("../../errors/index"));
|
|
@@ -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.UnprocessableEntityError = void 0;
|
|
30
40
|
const errors = __importStar(require("../../errors/index"));
|
|
@@ -6,6 +6,8 @@ import * as Parlant from "../../../index";
|
|
|
6
6
|
export declare namespace Agents {
|
|
7
7
|
interface Options {
|
|
8
8
|
environment: core.Supplier<string>;
|
|
9
|
+
/** Specify a custom URL to connect the client to. */
|
|
10
|
+
baseUrl?: core.Supplier<string>;
|
|
9
11
|
}
|
|
10
12
|
interface RequestOptions {
|
|
11
13
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -14,6 +16,8 @@ export declare namespace Agents {
|
|
|
14
16
|
maxRetries?: number;
|
|
15
17
|
/** A hook to abort the request. */
|
|
16
18
|
abortSignal?: AbortSignal;
|
|
19
|
+
/** Additional headers to include in the request. */
|
|
20
|
+
headers?: Record<string, string>;
|
|
17
21
|
}
|
|
18
22
|
}
|
|
19
23
|
export declare class Agents {
|
|
@@ -38,7 +42,6 @@ export declare class Agents {
|
|
|
38
42
|
* A unique identifier will be automatically generated.
|
|
39
43
|
*
|
|
40
44
|
* Default behaviors:
|
|
41
|
-
*
|
|
42
45
|
* - `name` defaults to `"Unnamed Agent"` if not provided
|
|
43
46
|
* - `description` defaults to `None`
|
|
44
47
|
* - `max_engine_iterations` defaults to `None` (uses system default)
|
|
@@ -52,7 +55,9 @@ export declare class Agents {
|
|
|
52
55
|
* await client.agents.create({
|
|
53
56
|
* name: "Haxon",
|
|
54
57
|
* description: "Technical Support Assistant",
|
|
55
|
-
* maxEngineIterations: 3
|
|
58
|
+
* maxEngineIterations: 3,
|
|
59
|
+
* compositionMode: "fluid",
|
|
60
|
+
* tags: ["tag1", "tag2"]
|
|
56
61
|
* })
|
|
57
62
|
*/
|
|
58
63
|
create(request: Parlant.AgentCreationParams, requestOptions?: Agents.RequestOptions): Promise<Parlant.Agent>;
|
|
@@ -66,7 +71,7 @@ export declare class Agents {
|
|
|
66
71
|
* @throws {@link Parlant.UnprocessableEntityError}
|
|
67
72
|
*
|
|
68
73
|
* @example
|
|
69
|
-
* await client.agents.retrieve("
|
|
74
|
+
* await client.agents.retrieve("IUCGT-lvpS")
|
|
70
75
|
*/
|
|
71
76
|
retrieve(agentId: string, requestOptions?: Agents.RequestOptions): Promise<Parlant.Agent>;
|
|
72
77
|
/**
|
|
@@ -82,7 +87,7 @@ export declare class Agents {
|
|
|
82
87
|
* @throws {@link Parlant.UnprocessableEntityError}
|
|
83
88
|
*
|
|
84
89
|
* @example
|
|
85
|
-
* await client.agents.delete("
|
|
90
|
+
* await client.agents.delete("IUCGT-lvpS")
|
|
86
91
|
*/
|
|
87
92
|
delete(agentId: string, requestOptions?: Agents.RequestOptions): Promise<void>;
|
|
88
93
|
/**
|
|
@@ -99,10 +104,11 @@ export declare class Agents {
|
|
|
99
104
|
* @throws {@link Parlant.UnprocessableEntityError}
|
|
100
105
|
*
|
|
101
106
|
* @example
|
|
102
|
-
* await client.agents.update("
|
|
107
|
+
* await client.agents.update("IUCGT-lvpS", {
|
|
103
108
|
* name: "Haxon",
|
|
104
109
|
* description: "Technical Support Assistant",
|
|
105
|
-
* maxEngineIterations: 3
|
|
110
|
+
* maxEngineIterations: 3,
|
|
111
|
+
* compositionMode: "fluid"
|
|
106
112
|
* })
|
|
107
113
|
*/
|
|
108
114
|
update(agentId: string, request?: Parlant.AgentUpdateParams, requestOptions?: Agents.RequestOptions): Promise<Parlant.Agent>;
|
|
@@ -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
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -61,14 +71,11 @@ class Agents {
|
|
|
61
71
|
*/
|
|
62
72
|
list(requestOptions) {
|
|
63
73
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
var _a;
|
|
64
75
|
const _response = yield core.fetcher({
|
|
65
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "agents"),
|
|
76
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "agents"),
|
|
66
77
|
method: "GET",
|
|
67
|
-
headers: {
|
|
68
|
-
"X-Fern-Language": "JavaScript",
|
|
69
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
70
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
71
|
-
},
|
|
78
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
72
79
|
contentType: "application/json",
|
|
73
80
|
requestType: "json",
|
|
74
81
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -96,7 +103,7 @@ class Agents {
|
|
|
96
103
|
body: _response.error.rawBody,
|
|
97
104
|
});
|
|
98
105
|
case "timeout":
|
|
99
|
-
throw new errors.ParlantTimeoutError();
|
|
106
|
+
throw new errors.ParlantTimeoutError("Timeout exceeded when calling GET /agents.");
|
|
100
107
|
case "unknown":
|
|
101
108
|
throw new errors.ParlantError({
|
|
102
109
|
message: _response.error.errorMessage,
|
|
@@ -111,7 +118,6 @@ class Agents {
|
|
|
111
118
|
* A unique identifier will be automatically generated.
|
|
112
119
|
*
|
|
113
120
|
* Default behaviors:
|
|
114
|
-
*
|
|
115
121
|
* - `name` defaults to `"Unnamed Agent"` if not provided
|
|
116
122
|
* - `description` defaults to `None`
|
|
117
123
|
* - `max_engine_iterations` defaults to `None` (uses system default)
|
|
@@ -125,19 +131,18 @@ class Agents {
|
|
|
125
131
|
* await client.agents.create({
|
|
126
132
|
* name: "Haxon",
|
|
127
133
|
* description: "Technical Support Assistant",
|
|
128
|
-
* maxEngineIterations: 3
|
|
134
|
+
* maxEngineIterations: 3,
|
|
135
|
+
* compositionMode: "fluid",
|
|
136
|
+
* tags: ["tag1", "tag2"]
|
|
129
137
|
* })
|
|
130
138
|
*/
|
|
131
139
|
create(request, requestOptions) {
|
|
132
140
|
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
var _a;
|
|
133
142
|
const _response = yield core.fetcher({
|
|
134
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "agents"),
|
|
143
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "agents"),
|
|
135
144
|
method: "POST",
|
|
136
|
-
headers: {
|
|
137
|
-
"X-Fern-Language": "JavaScript",
|
|
138
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
139
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
140
|
-
},
|
|
145
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
141
146
|
contentType: "application/json",
|
|
142
147
|
requestType: "json",
|
|
143
148
|
body: serializers.AgentCreationParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -171,7 +176,7 @@ class Agents {
|
|
|
171
176
|
body: _response.error.rawBody,
|
|
172
177
|
});
|
|
173
178
|
case "timeout":
|
|
174
|
-
throw new errors.ParlantTimeoutError();
|
|
179
|
+
throw new errors.ParlantTimeoutError("Timeout exceeded when calling POST /agents.");
|
|
175
180
|
case "unknown":
|
|
176
181
|
throw new errors.ParlantError({
|
|
177
182
|
message: _response.error.errorMessage,
|
|
@@ -189,18 +194,15 @@ class Agents {
|
|
|
189
194
|
* @throws {@link Parlant.UnprocessableEntityError}
|
|
190
195
|
*
|
|
191
196
|
* @example
|
|
192
|
-
* await client.agents.retrieve("
|
|
197
|
+
* await client.agents.retrieve("IUCGT-lvpS")
|
|
193
198
|
*/
|
|
194
199
|
retrieve(agentId, requestOptions) {
|
|
195
200
|
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
+
var _a;
|
|
196
202
|
const _response = yield core.fetcher({
|
|
197
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `agents/${encodeURIComponent(agentId)}`),
|
|
203
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `agents/${encodeURIComponent(agentId)}`),
|
|
198
204
|
method: "GET",
|
|
199
|
-
headers: {
|
|
200
|
-
"X-Fern-Language": "JavaScript",
|
|
201
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
202
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
203
|
-
},
|
|
205
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
204
206
|
contentType: "application/json",
|
|
205
207
|
requestType: "json",
|
|
206
208
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -235,7 +237,7 @@ class Agents {
|
|
|
235
237
|
body: _response.error.rawBody,
|
|
236
238
|
});
|
|
237
239
|
case "timeout":
|
|
238
|
-
throw new errors.ParlantTimeoutError();
|
|
240
|
+
throw new errors.ParlantTimeoutError("Timeout exceeded when calling GET /agents/{agent_id}.");
|
|
239
241
|
case "unknown":
|
|
240
242
|
throw new errors.ParlantError({
|
|
241
243
|
message: _response.error.errorMessage,
|
|
@@ -256,18 +258,15 @@ class Agents {
|
|
|
256
258
|
* @throws {@link Parlant.UnprocessableEntityError}
|
|
257
259
|
*
|
|
258
260
|
* @example
|
|
259
|
-
* await client.agents.delete("
|
|
261
|
+
* await client.agents.delete("IUCGT-lvpS")
|
|
260
262
|
*/
|
|
261
263
|
delete(agentId, requestOptions) {
|
|
262
264
|
return __awaiter(this, void 0, void 0, function* () {
|
|
265
|
+
var _a;
|
|
263
266
|
const _response = yield core.fetcher({
|
|
264
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `agents/${encodeURIComponent(agentId)}`),
|
|
267
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `agents/${encodeURIComponent(agentId)}`),
|
|
265
268
|
method: "DELETE",
|
|
266
|
-
headers: {
|
|
267
|
-
"X-Fern-Language": "JavaScript",
|
|
268
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
269
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
270
|
-
},
|
|
269
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
271
270
|
contentType: "application/json",
|
|
272
271
|
requestType: "json",
|
|
273
272
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -297,7 +296,7 @@ class Agents {
|
|
|
297
296
|
body: _response.error.rawBody,
|
|
298
297
|
});
|
|
299
298
|
case "timeout":
|
|
300
|
-
throw new errors.ParlantTimeoutError();
|
|
299
|
+
throw new errors.ParlantTimeoutError("Timeout exceeded when calling DELETE /agents/{agent_id}.");
|
|
301
300
|
case "unknown":
|
|
302
301
|
throw new errors.ParlantError({
|
|
303
302
|
message: _response.error.errorMessage,
|
|
@@ -319,22 +318,20 @@ class Agents {
|
|
|
319
318
|
* @throws {@link Parlant.UnprocessableEntityError}
|
|
320
319
|
*
|
|
321
320
|
* @example
|
|
322
|
-
* await client.agents.update("
|
|
321
|
+
* await client.agents.update("IUCGT-lvpS", {
|
|
323
322
|
* name: "Haxon",
|
|
324
323
|
* description: "Technical Support Assistant",
|
|
325
|
-
* maxEngineIterations: 3
|
|
324
|
+
* maxEngineIterations: 3,
|
|
325
|
+
* compositionMode: "fluid"
|
|
326
326
|
* })
|
|
327
327
|
*/
|
|
328
|
-
update(
|
|
329
|
-
return __awaiter(this,
|
|
328
|
+
update(agentId_1) {
|
|
329
|
+
return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
|
|
330
|
+
var _a;
|
|
330
331
|
const _response = yield core.fetcher({
|
|
331
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `agents/${encodeURIComponent(agentId)}`),
|
|
332
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `agents/${encodeURIComponent(agentId)}`),
|
|
332
333
|
method: "PATCH",
|
|
333
|
-
headers: {
|
|
334
|
-
"X-Fern-Language": "JavaScript",
|
|
335
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
336
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
337
|
-
},
|
|
334
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
338
335
|
contentType: "application/json",
|
|
339
336
|
requestType: "json",
|
|
340
337
|
body: serializers.AgentUpdateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -370,7 +367,7 @@ class Agents {
|
|
|
370
367
|
body: _response.error.rawBody,
|
|
371
368
|
});
|
|
372
369
|
case "timeout":
|
|
373
|
-
throw new errors.ParlantTimeoutError();
|
|
370
|
+
throw new errors.ParlantTimeoutError("Timeout exceeded when calling PATCH /agents/{agent_id}.");
|
|
374
371
|
case "unknown":
|
|
375
372
|
throw new errors.ParlantError({
|
|
376
373
|
message: _response.error.errorMessage,
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Parlant from "../../../../index";
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
6
7
|
* {
|
|
7
8
|
* name: "Haxon",
|
|
8
9
|
* description: "Technical Support Assistant",
|
|
9
|
-
* maxEngineIterations: 3
|
|
10
|
+
* maxEngineIterations: 3,
|
|
11
|
+
* compositionMode: "fluid",
|
|
12
|
+
* tags: ["tag1", "tag2"]
|
|
10
13
|
* }
|
|
11
14
|
*/
|
|
12
15
|
export interface AgentCreationParams {
|
|
@@ -16,4 +19,7 @@ export interface AgentCreationParams {
|
|
|
16
19
|
description?: string;
|
|
17
20
|
/** Maximum number of processing iterations the agent can perform per request */
|
|
18
21
|
maxEngineIterations?: number;
|
|
22
|
+
compositionMode?: Parlant.CompositionModeDto;
|
|
23
|
+
/** List of tag IDs associated with the agent */
|
|
24
|
+
tags?: string[];
|
|
19
25
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Parlant from "../../../../index";
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
6
7
|
* {
|
|
7
8
|
* name: "Haxon",
|
|
8
9
|
* description: "Technical Support Assistant",
|
|
9
|
-
* maxEngineIterations: 3
|
|
10
|
+
* maxEngineIterations: 3,
|
|
11
|
+
* compositionMode: "fluid"
|
|
10
12
|
* }
|
|
11
13
|
*/
|
|
12
14
|
export interface AgentUpdateParams {
|
|
@@ -16,4 +18,6 @@ export interface AgentUpdateParams {
|
|
|
16
18
|
description?: string;
|
|
17
19
|
/** Maximum number of processing iterations the agent can perform per request */
|
|
18
20
|
maxEngineIterations?: number;
|
|
21
|
+
compositionMode?: Parlant.CompositionModeDto;
|
|
22
|
+
tags?: Parlant.AgentTagUpdateParams;
|
|
19
23
|
}
|