parlant-client 0.5.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/README.md +2 -0
- package/package.json +31 -0
- package/src/Client.d.ts +55 -0
- package/src/Client.js +137 -0
- package/src/api/errors/UnprocessableEntityError.d.ts +8 -0
- package/src/api/errors/UnprocessableEntityError.js +41 -0
- package/src/api/errors/index.d.ts +1 -0
- package/src/api/errors/index.js +17 -0
- package/src/api/index.d.ts +3 -0
- package/src/api/index.js +19 -0
- package/src/api/resources/agents/client/Client.d.ts +72 -0
- package/src/api/resources/agents/client/Client.js +359 -0
- package/src/api/resources/agents/client/index.d.ts +1 -0
- package/src/api/resources/agents/client/index.js +17 -0
- package/src/api/resources/agents/client/requests/AgentCreationParams.d.ts +14 -0
- package/src/api/resources/agents/client/requests/AgentCreationParams.js +5 -0
- package/src/api/resources/agents/client/requests/AgentUpdateParams.d.ts +12 -0
- package/src/api/resources/agents/client/requests/AgentUpdateParams.js +5 -0
- package/src/api/resources/agents/client/requests/index.d.ts +2 -0
- package/src/api/resources/agents/client/requests/index.js +2 -0
- package/src/api/resources/agents/index.d.ts +1 -0
- package/src/api/resources/agents/index.js +17 -0
- package/src/api/resources/contextVariables/client/Client.d.ts +131 -0
- package/src/api/resources/contextVariables/client/Client.js +643 -0
- package/src/api/resources/contextVariables/client/index.d.ts +1 -0
- package/src/api/resources/contextVariables/client/index.js +17 -0
- package/src/api/resources/contextVariables/client/requests/ContextVariableCreationParams.d.ts +16 -0
- package/src/api/resources/contextVariables/client/requests/ContextVariableCreationParams.js +5 -0
- package/src/api/resources/contextVariables/client/requests/ContextVariableUpdateParams.d.ts +14 -0
- package/src/api/resources/contextVariables/client/requests/ContextVariableUpdateParams.js +5 -0
- package/src/api/resources/contextVariables/client/requests/ContextVariableValueUpdateParams.d.ts +14 -0
- package/src/api/resources/contextVariables/client/requests/ContextVariableValueUpdateParams.js +5 -0
- package/src/api/resources/contextVariables/client/requests/ContextVariablesRetrieveRequest.d.ts +10 -0
- package/src/api/resources/contextVariables/client/requests/ContextVariablesRetrieveRequest.js +5 -0
- package/src/api/resources/contextVariables/client/requests/index.d.ts +4 -0
- package/src/api/resources/contextVariables/client/requests/index.js +2 -0
- package/src/api/resources/contextVariables/index.d.ts +1 -0
- package/src/api/resources/contextVariables/index.js +17 -0
- package/src/api/resources/customers/client/Client.d.ts +72 -0
- package/src/api/resources/customers/client/Client.js +359 -0
- package/src/api/resources/customers/client/index.d.ts +1 -0
- package/src/api/resources/customers/client/index.js +17 -0
- package/src/api/resources/customers/client/requests/CustomerCreationParams.d.ts +13 -0
- package/src/api/resources/customers/client/requests/CustomerCreationParams.js +5 -0
- package/src/api/resources/customers/client/requests/CustomerUpdateParams.d.ts +13 -0
- package/src/api/resources/customers/client/requests/CustomerUpdateParams.js +5 -0
- package/src/api/resources/customers/client/requests/index.d.ts +2 -0
- package/src/api/resources/customers/client/requests/index.js +2 -0
- package/src/api/resources/customers/index.d.ts +1 -0
- package/src/api/resources/customers/index.js +17 -0
- package/src/api/resources/evaluations/client/Client.d.ts +48 -0
- package/src/api/resources/evaluations/client/Client.js +193 -0
- package/src/api/resources/evaluations/client/index.d.ts +1 -0
- package/src/api/resources/evaluations/client/index.js +17 -0
- package/src/api/resources/evaluations/client/requests/EvaluationCreationParams.d.ts +17 -0
- package/src/api/resources/evaluations/client/requests/EvaluationCreationParams.js +5 -0
- package/src/api/resources/evaluations/client/requests/EvaluationsRetrieveRequest.d.ts +10 -0
- package/src/api/resources/evaluations/client/requests/EvaluationsRetrieveRequest.js +5 -0
- package/src/api/resources/evaluations/client/requests/index.d.ts +2 -0
- package/src/api/resources/evaluations/client/requests/index.js +2 -0
- package/src/api/resources/evaluations/index.d.ts +1 -0
- package/src/api/resources/evaluations/index.js +17 -0
- package/src/api/resources/glossary/client/Client.d.ts +80 -0
- package/src/api/resources/glossary/client/Client.js +377 -0
- package/src/api/resources/glossary/client/index.d.ts +1 -0
- package/src/api/resources/glossary/client/index.js +17 -0
- package/src/api/resources/glossary/client/requests/TermCreationParams.d.ts +15 -0
- package/src/api/resources/glossary/client/requests/TermCreationParams.js +5 -0
- package/src/api/resources/glossary/client/requests/TermUpdateParams.d.ts +12 -0
- package/src/api/resources/glossary/client/requests/TermUpdateParams.js +5 -0
- package/src/api/resources/glossary/client/requests/index.d.ts +2 -0
- package/src/api/resources/glossary/client/requests/index.js +2 -0
- package/src/api/resources/glossary/index.d.ts +1 -0
- package/src/api/resources/glossary/index.js +17 -0
- package/src/api/resources/guidelines/client/Client.d.ts +85 -0
- package/src/api/resources/guidelines/client/Client.js +382 -0
- package/src/api/resources/guidelines/client/index.d.ts +1 -0
- package/src/api/resources/guidelines/client/index.js +17 -0
- package/src/api/resources/guidelines/client/requests/GuidelineCreationParams.d.ts +19 -0
- package/src/api/resources/guidelines/client/requests/GuidelineCreationParams.js +5 -0
- package/src/api/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +12 -0
- package/src/api/resources/guidelines/client/requests/GuidelineUpdateParams.js +5 -0
- package/src/api/resources/guidelines/client/requests/index.d.ts +2 -0
- package/src/api/resources/guidelines/client/requests/index.js +2 -0
- package/src/api/resources/guidelines/index.d.ts +1 -0
- package/src/api/resources/guidelines/index.js +17 -0
- package/src/api/resources/index.d.ts +18 -0
- package/src/api/resources/index.js +47 -0
- package/src/api/resources/services/client/Client.d.ts +62 -0
- package/src/api/resources/services/client/Client.js +294 -0
- package/src/api/resources/services/client/index.d.ts +1 -0
- package/src/api/resources/services/client/index.js +17 -0
- package/src/api/resources/services/client/requests/ServiceUpdateParams.d.ts +15 -0
- package/src/api/resources/services/client/requests/ServiceUpdateParams.js +5 -0
- package/src/api/resources/services/client/requests/index.d.ts +1 -0
- package/src/api/resources/services/client/requests/index.js +2 -0
- package/src/api/resources/services/index.d.ts +1 -0
- package/src/api/resources/services/index.js +17 -0
- package/src/api/resources/sessions/client/Client.d.ts +134 -0
- package/src/api/resources/sessions/client/Client.js +755 -0
- package/src/api/resources/sessions/client/index.d.ts +1 -0
- package/src/api/resources/sessions/client/index.js +17 -0
- package/src/api/resources/sessions/client/requests/EventCreationParams.d.ts +17 -0
- package/src/api/resources/sessions/client/requests/EventCreationParams.js +5 -0
- package/src/api/resources/sessions/client/requests/SessionCreationParams.d.ts +15 -0
- package/src/api/resources/sessions/client/requests/SessionCreationParams.js +5 -0
- package/src/api/resources/sessions/client/requests/SessionUpdateParams.d.ts +12 -0
- package/src/api/resources/sessions/client/requests/SessionUpdateParams.js +5 -0
- package/src/api/resources/sessions/client/requests/SessionsDeleteEventsRequest.d.ts +12 -0
- package/src/api/resources/sessions/client/requests/SessionsDeleteEventsRequest.js +5 -0
- package/src/api/resources/sessions/client/requests/SessionsDeleteManyRequest.d.ts +11 -0
- package/src/api/resources/sessions/client/requests/SessionsDeleteManyRequest.js +5 -0
- package/src/api/resources/sessions/client/requests/SessionsListEventsRequest.d.ts +18 -0
- package/src/api/resources/sessions/client/requests/SessionsListEventsRequest.js +5 -0
- package/src/api/resources/sessions/client/requests/SessionsListRequest.d.ts +11 -0
- package/src/api/resources/sessions/client/requests/SessionsListRequest.js +5 -0
- package/src/api/resources/sessions/client/requests/index.d.ts +7 -0
- package/src/api/resources/sessions/client/requests/index.js +2 -0
- package/src/api/resources/sessions/index.d.ts +1 -0
- package/src/api/resources/sessions/index.js +17 -0
- package/src/api/resources/tags/client/Client.d.ts +74 -0
- package/src/api/resources/tags/client/Client.js +356 -0
- package/src/api/resources/tags/client/index.d.ts +1 -0
- package/src/api/resources/tags/client/index.js +17 -0
- package/src/api/resources/tags/client/requests/TagCreationParams.d.ts +12 -0
- package/src/api/resources/tags/client/requests/TagCreationParams.js +5 -0
- package/src/api/resources/tags/client/requests/TagUpdateParams.d.ts +12 -0
- package/src/api/resources/tags/client/requests/TagUpdateParams.js +5 -0
- package/src/api/resources/tags/client/requests/index.d.ts +2 -0
- package/src/api/resources/tags/client/requests/index.js +2 -0
- package/src/api/resources/tags/index.d.ts +1 -0
- package/src/api/resources/tags/index.js +17 -0
- package/src/api/types/Agent.d.ts +10 -0
- package/src/api/types/Agent.js +5 -0
- package/src/api/types/CoherenceCheck.d.ts +11 -0
- package/src/api/types/CoherenceCheck.js +5 -0
- package/src/api/types/CoherenceCheckKindDto.d.ts +8 -0
- package/src/api/types/CoherenceCheckKindDto.js +10 -0
- package/src/api/types/ConnectionKindDto.d.ts +8 -0
- package/src/api/types/ConnectionKindDto.js +10 -0
- package/src/api/types/ConnectionProposition.d.ts +10 -0
- package/src/api/types/ConnectionProposition.js +5 -0
- package/src/api/types/ConnectionPropositionKindDto.d.ts +8 -0
- package/src/api/types/ConnectionPropositionKindDto.js +10 -0
- package/src/api/types/ConsumptionOffsets.d.ts +6 -0
- package/src/api/types/ConsumptionOffsets.js +5 -0
- package/src/api/types/ConsumptionOffsetsUpdateParams.d.ts +6 -0
- package/src/api/types/ConsumptionOffsetsUpdateParams.js +5 -0
- package/src/api/types/ContextVariable.d.ts +11 -0
- package/src/api/types/ContextVariable.js +5 -0
- package/src/api/types/ContextVariableAndValue.d.ts +10 -0
- package/src/api/types/ContextVariableAndValue.js +5 -0
- package/src/api/types/ContextVariableReadResult.d.ts +8 -0
- package/src/api/types/ContextVariableReadResult.js +5 -0
- package/src/api/types/ContextVariableValue.d.ts +8 -0
- package/src/api/types/ContextVariableValue.js +5 -0
- package/src/api/types/Customer.d.ts +10 -0
- package/src/api/types/Customer.js +5 -0
- package/src/api/types/CustomerExtraUpdateParams.d.ts +7 -0
- package/src/api/types/CustomerExtraUpdateParams.js +5 -0
- package/src/api/types/DayOfWeekDto.d.ts +13 -0
- package/src/api/types/DayOfWeekDto.js +15 -0
- package/src/api/types/Evaluation.d.ts +12 -0
- package/src/api/types/Evaluation.js +5 -0
- package/src/api/types/EvaluationStatusDto.d.ts +10 -0
- package/src/api/types/EvaluationStatusDto.js +12 -0
- package/src/api/types/Event.d.ts +13 -0
- package/src/api/types/Event.js +5 -0
- package/src/api/types/EventInspectionResult.d.ts +9 -0
- package/src/api/types/EventInspectionResult.js +5 -0
- package/src/api/types/EventKindDto.d.ts +10 -0
- package/src/api/types/EventKindDto.js +12 -0
- package/src/api/types/EventSourceDto.d.ts +12 -0
- package/src/api/types/EventSourceDto.js +14 -0
- package/src/api/types/EventTrace.d.ts +9 -0
- package/src/api/types/EventTrace.js +5 -0
- package/src/api/types/FreshnessRules.d.ts +12 -0
- package/src/api/types/FreshnessRules.js +5 -0
- package/src/api/types/GenerationInfo.d.ts +10 -0
- package/src/api/types/GenerationInfo.js +5 -0
- package/src/api/types/Guideline.d.ts +8 -0
- package/src/api/types/Guideline.js +5 -0
- package/src/api/types/GuidelineConnection.d.ts +11 -0
- package/src/api/types/GuidelineConnection.js +5 -0
- package/src/api/types/GuidelineConnectionAddition.d.ts +9 -0
- package/src/api/types/GuidelineConnectionAddition.js +5 -0
- package/src/api/types/GuidelineConnectionUpdateParams.d.ts +8 -0
- package/src/api/types/GuidelineConnectionUpdateParams.js +5 -0
- package/src/api/types/GuidelineContent.d.ts +7 -0
- package/src/api/types/GuidelineContent.js +5 -0
- package/src/api/types/GuidelineCreationResult.d.ts +7 -0
- package/src/api/types/GuidelineCreationResult.js +5 -0
- package/src/api/types/GuidelineInvoiceData.d.ts +8 -0
- package/src/api/types/GuidelineInvoiceData.js +5 -0
- package/src/api/types/GuidelinePayload.d.ts +11 -0
- package/src/api/types/GuidelinePayload.js +5 -0
- package/src/api/types/GuidelinePayloadOperationDto.d.ts +8 -0
- package/src/api/types/GuidelinePayloadOperationDto.js +10 -0
- package/src/api/types/GuidelineProposition.d.ts +10 -0
- package/src/api/types/GuidelineProposition.js +5 -0
- package/src/api/types/GuidelinePropositionInspection.d.ts +8 -0
- package/src/api/types/GuidelinePropositionInspection.js +5 -0
- package/src/api/types/GuidelineToolAssociation.d.ts +9 -0
- package/src/api/types/GuidelineToolAssociation.js +5 -0
- package/src/api/types/GuidelineToolAssociationUpdateParams.d.ts +8 -0
- package/src/api/types/GuidelineToolAssociationUpdateParams.js +5 -0
- package/src/api/types/GuidelineWithConnectionsAndToolAssociations.d.ts +9 -0
- package/src/api/types/GuidelineWithConnectionsAndToolAssociations.js +5 -0
- package/src/api/types/HttpValidationError.d.ts +7 -0
- package/src/api/types/HttpValidationError.js +5 -0
- package/src/api/types/Invoice.d.ts +11 -0
- package/src/api/types/Invoice.js +5 -0
- package/src/api/types/InvoiceData.d.ts +7 -0
- package/src/api/types/InvoiceData.js +5 -0
- package/src/api/types/MessageGenerationInspection.d.ts +8 -0
- package/src/api/types/MessageGenerationInspection.js +5 -0
- package/src/api/types/Moderation.d.ts +9 -0
- package/src/api/types/Moderation.js +11 -0
- package/src/api/types/OpenApiServiceParams.d.ts +7 -0
- package/src/api/types/OpenApiServiceParams.js +5 -0
- package/src/api/types/Payload.d.ts +8 -0
- package/src/api/types/Payload.js +5 -0
- package/src/api/types/PayloadKindDto.d.ts +4 -0
- package/src/api/types/PayloadKindDto.js +5 -0
- package/src/api/types/PreparationIteration.d.ts +11 -0
- package/src/api/types/PreparationIteration.js +5 -0
- package/src/api/types/PreparationIterationGenerations.d.ts +8 -0
- package/src/api/types/PreparationIterationGenerations.js +5 -0
- package/src/api/types/SdkServiceParams.d.ts +6 -0
- package/src/api/types/SdkServiceParams.js +5 -0
- package/src/api/types/Service.d.ts +10 -0
- package/src/api/types/Service.js +5 -0
- package/src/api/types/Session.d.ts +12 -0
- package/src/api/types/Session.js +5 -0
- package/src/api/types/Tag.d.ts +8 -0
- package/src/api/types/Tag.js +5 -0
- package/src/api/types/TagsUpdateParams.d.ts +7 -0
- package/src/api/types/TagsUpdateParams.js +5 -0
- package/src/api/types/Term.d.ts +9 -0
- package/src/api/types/Term.js +5 -0
- package/src/api/types/Tool.d.ts +11 -0
- package/src/api/types/Tool.js +5 -0
- package/src/api/types/ToolCall.d.ts +9 -0
- package/src/api/types/ToolCall.js +5 -0
- package/src/api/types/ToolId.d.ts +7 -0
- package/src/api/types/ToolId.js +5 -0
- package/src/api/types/ToolParameter.d.ts +9 -0
- package/src/api/types/ToolParameter.js +5 -0
- package/src/api/types/ToolParameterDtoEnumItem.d.ts +4 -0
- package/src/api/types/ToolParameterDtoEnumItem.js +5 -0
- package/src/api/types/ToolParameterTypeDto.d.ts +10 -0
- package/src/api/types/ToolParameterTypeDto.js +12 -0
- package/src/api/types/ToolResult.d.ts +7 -0
- package/src/api/types/ToolResult.js +5 -0
- package/src/api/types/ToolServiceKindDto.d.ts +8 -0
- package/src/api/types/ToolServiceKindDto.js +10 -0
- package/src/api/types/UsageInfo.d.ts +8 -0
- package/src/api/types/UsageInfo.js +5 -0
- package/src/api/types/ValidationError.d.ts +9 -0
- package/src/api/types/ValidationError.js +5 -0
- package/src/api/types/ValidationErrorLocItem.d.ts +4 -0
- package/src/api/types/ValidationErrorLocItem.js +5 -0
- package/src/api/types/index.d.ts +65 -0
- package/src/api/types/index.js +81 -0
- package/src/core/fetcher/APIResponse.d.ts +10 -0
- package/src/core/fetcher/APIResponse.js +2 -0
- package/src/core/fetcher/Fetcher.d.ts +39 -0
- package/src/core/fetcher/Fetcher.js +99 -0
- package/src/core/fetcher/Supplier.d.ts +4 -0
- package/src/core/fetcher/Supplier.js +22 -0
- package/src/core/fetcher/createRequestUrl.d.ts +1 -0
- package/src/core/fetcher/createRequestUrl.js +13 -0
- package/src/core/fetcher/getFetchFn.d.ts +4 -0
- package/src/core/fetcher/getFetchFn.js +59 -0
- package/src/core/fetcher/getHeader.d.ts +1 -0
- package/src/core/fetcher/getHeader.js +12 -0
- package/src/core/fetcher/getRequestBody.d.ts +7 -0
- package/src/core/fetcher/getRequestBody.js +23 -0
- package/src/core/fetcher/getResponseBody.d.ts +1 -0
- package/src/core/fetcher/getResponseBody.js +55 -0
- package/src/core/fetcher/index.d.ts +5 -0
- package/src/core/fetcher/index.js +9 -0
- package/src/core/fetcher/makeRequest.d.ts +1 -0
- package/src/core/fetcher/makeRequest.js +42 -0
- package/src/core/fetcher/requestWithRetries.d.ts +1 -0
- package/src/core/fetcher/requestWithRetries.js +41 -0
- package/src/core/fetcher/signals.d.ts +12 -0
- package/src/core/fetcher/signals.js +37 -0
- package/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
- package/src/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
- package/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +22 -0
- package/src/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +124 -0
- package/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
- package/src/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
- package/src/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
- package/src/core/fetcher/stream-wrappers/chooseStreamWrapper.js +50 -0
- package/src/core/index.d.ts +3 -0
- package/src/core/index.js +32 -0
- package/src/core/runtime/index.d.ts +1 -0
- package/src/core/runtime/index.js +5 -0
- package/src/core/runtime/runtime.d.ts +9 -0
- package/src/core/runtime/runtime.js +93 -0
- package/src/core/schemas/Schema.d.ts +85 -0
- package/src/core/schemas/Schema.js +22 -0
- package/src/core/schemas/builders/bigint/bigint.d.ts +2 -0
- package/src/core/schemas/builders/bigint/bigint.js +50 -0
- package/src/core/schemas/builders/bigint/index.d.ts +1 -0
- package/src/core/schemas/builders/bigint/index.js +5 -0
- package/src/core/schemas/builders/date/date.d.ts +2 -0
- package/src/core/schemas/builders/date/date.js +63 -0
- package/src/core/schemas/builders/date/index.d.ts +1 -0
- package/src/core/schemas/builders/date/index.js +5 -0
- package/src/core/schemas/builders/enum/enum.d.ts +2 -0
- package/src/core/schemas/builders/enum/enum.js +39 -0
- package/src/core/schemas/builders/enum/index.d.ts +1 -0
- package/src/core/schemas/builders/enum/index.js +5 -0
- package/src/core/schemas/builders/index.d.ts +14 -0
- package/src/core/schemas/builders/index.js +30 -0
- package/src/core/schemas/builders/lazy/index.d.ts +3 -0
- package/src/core/schemas/builders/lazy/index.js +7 -0
- package/src/core/schemas/builders/lazy/lazy.d.ts +5 -0
- package/src/core/schemas/builders/lazy/lazy.js +25 -0
- package/src/core/schemas/builders/lazy/lazyObject.d.ts +3 -0
- package/src/core/schemas/builders/lazy/lazyObject.js +12 -0
- package/src/core/schemas/builders/list/index.d.ts +1 -0
- package/src/core/schemas/builders/list/index.js +5 -0
- package/src/core/schemas/builders/list/list.d.ts +2 -0
- package/src/core/schemas/builders/list/list.js +55 -0
- package/src/core/schemas/builders/literals/booleanLiteral.d.ts +2 -0
- package/src/core/schemas/builders/literals/booleanLiteral.js +29 -0
- package/src/core/schemas/builders/literals/index.d.ts +2 -0
- package/src/core/schemas/builders/literals/index.js +7 -0
- package/src/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/src/core/schemas/builders/literals/stringLiteral.js +29 -0
- package/src/core/schemas/builders/object/index.d.ts +6 -0
- package/src/core/schemas/builders/object/index.js +11 -0
- package/src/core/schemas/builders/object/object.d.ts +3 -0
- package/src/core/schemas/builders/object/object.js +233 -0
- package/src/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +6 -0
- package/src/core/schemas/builders/object/objectWithoutOptionalProperties.js +8 -0
- package/src/core/schemas/builders/object/property.d.ts +8 -0
- package/src/core/schemas/builders/object/property.js +16 -0
- package/src/core/schemas/builders/object/types.d.ts +26 -0
- package/src/core/schemas/builders/object/types.js +2 -0
- package/src/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/src/core/schemas/builders/object-like/getObjectLikeUtils.js +54 -0
- package/src/core/schemas/builders/object-like/index.d.ts +2 -0
- package/src/core/schemas/builders/object-like/index.js +6 -0
- package/src/core/schemas/builders/object-like/types.d.ts +7 -0
- package/src/core/schemas/builders/object-like/types.js +2 -0
- package/src/core/schemas/builders/primitives/any.d.ts +1 -0
- package/src/core/schemas/builders/primitives/any.js +6 -0
- package/src/core/schemas/builders/primitives/boolean.d.ts +1 -0
- package/src/core/schemas/builders/primitives/boolean.js +25 -0
- package/src/core/schemas/builders/primitives/index.d.ts +5 -0
- package/src/core/schemas/builders/primitives/index.js +13 -0
- package/src/core/schemas/builders/primitives/number.d.ts +1 -0
- package/src/core/schemas/builders/primitives/number.js +25 -0
- package/src/core/schemas/builders/primitives/string.d.ts +1 -0
- package/src/core/schemas/builders/primitives/string.js +25 -0
- package/src/core/schemas/builders/primitives/unknown.d.ts +1 -0
- package/src/core/schemas/builders/primitives/unknown.js +6 -0
- package/src/core/schemas/builders/record/index.d.ts +2 -0
- package/src/core/schemas/builders/record/index.js +5 -0
- package/src/core/schemas/builders/record/record.d.ts +3 -0
- package/src/core/schemas/builders/record/record.js +95 -0
- package/src/core/schemas/builders/record/types.d.ts +4 -0
- package/src/core/schemas/builders/record/types.js +2 -0
- package/src/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/src/core/schemas/builders/schema-utils/JsonError.js +12 -0
- package/src/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/src/core/schemas/builders/schema-utils/ParseError.js +12 -0
- package/src/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
- package/src/core/schemas/builders/schema-utils/getSchemaUtils.js +82 -0
- package/src/core/schemas/builders/schema-utils/index.d.ts +4 -0
- package/src/core/schemas/builders/schema-utils/index.js +11 -0
- package/src/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/src/core/schemas/builders/schema-utils/stringifyValidationErrors.js +10 -0
- package/src/core/schemas/builders/set/index.d.ts +1 -0
- package/src/core/schemas/builders/set/index.js +5 -0
- package/src/core/schemas/builders/set/set.d.ts +2 -0
- package/src/core/schemas/builders/set/set.js +44 -0
- package/src/core/schemas/builders/undiscriminated-union/index.d.ts +2 -0
- package/src/core/schemas/builders/undiscriminated-union/index.js +5 -0
- package/src/core/schemas/builders/undiscriminated-union/types.d.ts +4 -0
- package/src/core/schemas/builders/undiscriminated-union/types.js +2 -0
- package/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.d.ts +3 -0
- package/src/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +40 -0
- package/src/core/schemas/builders/union/discriminant.d.ts +5 -0
- package/src/core/schemas/builders/union/discriminant.js +10 -0
- package/src/core/schemas/builders/union/index.d.ts +4 -0
- package/src/core/schemas/builders/union/index.js +7 -0
- package/src/core/schemas/builders/union/types.d.ts +13 -0
- package/src/core/schemas/builders/union/types.js +2 -0
- package/src/core/schemas/builders/union/union.d.ts +4 -0
- package/src/core/schemas/builders/union/union.js +130 -0
- package/src/core/schemas/index.d.ts +2 -0
- package/src/core/schemas/index.js +17 -0
- package/src/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/src/core/schemas/utils/MaybePromise.js +2 -0
- package/src/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/src/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
- package/src/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/src/core/schemas/utils/createIdentitySchemaCreator.js +16 -0
- package/src/core/schemas/utils/entries.d.ts +1 -0
- package/src/core/schemas/utils/entries.js +7 -0
- package/src/core/schemas/utils/filterObject.d.ts +1 -0
- package/src/core/schemas/utils/filterObject.js +14 -0
- package/src/core/schemas/utils/getErrorMessageForIncorrectType.d.ts +1 -0
- package/src/core/schemas/utils/getErrorMessageForIncorrectType.js +28 -0
- package/src/core/schemas/utils/isPlainObject.d.ts +1 -0
- package/src/core/schemas/utils/isPlainObject.js +18 -0
- package/src/core/schemas/utils/keys.d.ts +1 -0
- package/src/core/schemas/utils/keys.js +7 -0
- package/src/core/schemas/utils/maybeSkipValidation.d.ts +2 -0
- package/src/core/schemas/utils/maybeSkipValidation.js +28 -0
- package/src/core/schemas/utils/partition.d.ts +1 -0
- package/src/core/schemas/utils/partition.js +16 -0
- package/src/errors/ParlantError.d.ts +12 -0
- package/src/errors/ParlantError.js +32 -0
- package/src/errors/ParlantTimeoutError.d.ts +6 -0
- package/src/errors/ParlantTimeoutError.js +13 -0
- package/src/errors/index.d.ts +2 -0
- package/src/errors/index.js +7 -0
- package/src/index.d.ts +3 -0
- package/src/index.js +32 -0
- package/src/serialization/index.d.ts +2 -0
- package/src/serialization/index.js +18 -0
- package/src/serialization/resources/agents/client/index.d.ts +2 -0
- package/src/serialization/resources/agents/client/index.js +31 -0
- package/src/serialization/resources/agents/client/list.d.ts +11 -0
- package/src/serialization/resources/agents/client/list.js +32 -0
- package/src/serialization/resources/agents/client/requests/AgentCreationParams.d.ts +14 -0
- package/src/serialization/resources/agents/client/requests/AgentCreationParams.js +35 -0
- package/src/serialization/resources/agents/client/requests/AgentUpdateParams.d.ts +14 -0
- package/src/serialization/resources/agents/client/requests/AgentUpdateParams.js +35 -0
- package/src/serialization/resources/agents/client/requests/index.d.ts +2 -0
- package/src/serialization/resources/agents/client/requests/index.js +7 -0
- package/src/serialization/resources/agents/index.d.ts +1 -0
- package/src/serialization/resources/agents/index.js +17 -0
- package/src/serialization/resources/contextVariables/client/index.d.ts +2 -0
- package/src/serialization/resources/contextVariables/client/index.js +31 -0
- package/src/serialization/resources/contextVariables/client/list.d.ts +11 -0
- package/src/serialization/resources/contextVariables/client/list.js +32 -0
- package/src/serialization/resources/contextVariables/client/requests/ContextVariableCreationParams.d.ts +17 -0
- package/src/serialization/resources/contextVariables/client/requests/ContextVariableCreationParams.js +38 -0
- package/src/serialization/resources/contextVariables/client/requests/ContextVariableUpdateParams.d.ts +17 -0
- package/src/serialization/resources/contextVariables/client/requests/ContextVariableUpdateParams.js +38 -0
- package/src/serialization/resources/contextVariables/client/requests/ContextVariableValueUpdateParams.d.ts +12 -0
- package/src/serialization/resources/contextVariables/client/requests/ContextVariableValueUpdateParams.js +33 -0
- package/src/serialization/resources/contextVariables/client/requests/index.d.ts +3 -0
- package/src/serialization/resources/contextVariables/client/requests/index.js +9 -0
- package/src/serialization/resources/contextVariables/index.d.ts +1 -0
- package/src/serialization/resources/contextVariables/index.js +17 -0
- package/src/serialization/resources/customers/client/index.d.ts +2 -0
- package/src/serialization/resources/customers/client/index.js +31 -0
- package/src/serialization/resources/customers/client/list.d.ts +11 -0
- package/src/serialization/resources/customers/client/list.js +32 -0
- package/src/serialization/resources/customers/client/requests/CustomerCreationParams.d.ts +13 -0
- package/src/serialization/resources/customers/client/requests/CustomerCreationParams.js +34 -0
- package/src/serialization/resources/customers/client/requests/CustomerUpdateParams.d.ts +16 -0
- package/src/serialization/resources/customers/client/requests/CustomerUpdateParams.js +37 -0
- package/src/serialization/resources/customers/client/requests/index.d.ts +2 -0
- package/src/serialization/resources/customers/client/requests/index.js +7 -0
- package/src/serialization/resources/customers/index.d.ts +1 -0
- package/src/serialization/resources/customers/index.js +17 -0
- package/src/serialization/resources/evaluations/client/index.d.ts +1 -0
- package/src/serialization/resources/evaluations/client/index.js +17 -0
- package/src/serialization/resources/evaluations/client/requests/EvaluationCreationParams.d.ts +14 -0
- package/src/serialization/resources/evaluations/client/requests/EvaluationCreationParams.js +35 -0
- package/src/serialization/resources/evaluations/client/requests/index.d.ts +1 -0
- package/src/serialization/resources/evaluations/client/requests/index.js +5 -0
- package/src/serialization/resources/evaluations/index.d.ts +1 -0
- package/src/serialization/resources/evaluations/index.js +17 -0
- package/src/serialization/resources/glossary/client/index.d.ts +2 -0
- package/src/serialization/resources/glossary/client/index.js +31 -0
- package/src/serialization/resources/glossary/client/listTerms.d.ts +11 -0
- package/src/serialization/resources/glossary/client/listTerms.js +32 -0
- package/src/serialization/resources/glossary/client/requests/TermCreationParams.d.ts +14 -0
- package/src/serialization/resources/glossary/client/requests/TermCreationParams.js +35 -0
- package/src/serialization/resources/glossary/client/requests/TermUpdateParams.d.ts +14 -0
- package/src/serialization/resources/glossary/client/requests/TermUpdateParams.js +35 -0
- package/src/serialization/resources/glossary/client/requests/index.d.ts +2 -0
- package/src/serialization/resources/glossary/client/requests/index.js +7 -0
- package/src/serialization/resources/glossary/index.d.ts +1 -0
- package/src/serialization/resources/glossary/index.js +17 -0
- package/src/serialization/resources/guidelines/client/index.d.ts +2 -0
- package/src/serialization/resources/guidelines/client/index.js +31 -0
- package/src/serialization/resources/guidelines/client/list.d.ts +11 -0
- package/src/serialization/resources/guidelines/client/list.js +32 -0
- package/src/serialization/resources/guidelines/client/requests/GuidelineCreationParams.d.ts +13 -0
- package/src/serialization/resources/guidelines/client/requests/GuidelineCreationParams.js +34 -0
- package/src/serialization/resources/guidelines/client/requests/GuidelineUpdateParams.d.ts +15 -0
- package/src/serialization/resources/guidelines/client/requests/GuidelineUpdateParams.js +36 -0
- package/src/serialization/resources/guidelines/client/requests/index.d.ts +2 -0
- package/src/serialization/resources/guidelines/client/requests/index.js +7 -0
- package/src/serialization/resources/guidelines/index.d.ts +1 -0
- package/src/serialization/resources/guidelines/index.js +17 -0
- package/src/serialization/resources/index.d.ts +18 -0
- package/src/serialization/resources/index.js +47 -0
- package/src/serialization/resources/services/client/index.d.ts +2 -0
- package/src/serialization/resources/services/client/index.js +31 -0
- package/src/serialization/resources/services/client/list.d.ts +11 -0
- package/src/serialization/resources/services/client/list.js +32 -0
- package/src/serialization/resources/services/client/requests/ServiceUpdateParams.d.ts +17 -0
- package/src/serialization/resources/services/client/requests/ServiceUpdateParams.js +38 -0
- package/src/serialization/resources/services/client/requests/index.d.ts +1 -0
- package/src/serialization/resources/services/client/requests/index.js +5 -0
- package/src/serialization/resources/services/index.d.ts +1 -0
- package/src/serialization/resources/services/index.js +17 -0
- package/src/serialization/resources/sessions/client/index.d.ts +3 -0
- package/src/serialization/resources/sessions/client/index.js +32 -0
- package/src/serialization/resources/sessions/client/list.d.ts +11 -0
- package/src/serialization/resources/sessions/client/list.js +32 -0
- package/src/serialization/resources/sessions/client/listEvents.d.ts +11 -0
- package/src/serialization/resources/sessions/client/listEvents.js +32 -0
- package/src/serialization/resources/sessions/client/requests/EventCreationParams.d.ts +16 -0
- package/src/serialization/resources/sessions/client/requests/EventCreationParams.js +37 -0
- package/src/serialization/resources/sessions/client/requests/SessionCreationParams.d.ts +14 -0
- package/src/serialization/resources/sessions/client/requests/SessionCreationParams.js +35 -0
- package/src/serialization/resources/sessions/client/requests/SessionUpdateParams.d.ts +14 -0
- package/src/serialization/resources/sessions/client/requests/SessionUpdateParams.js +35 -0
- package/src/serialization/resources/sessions/client/requests/index.d.ts +3 -0
- package/src/serialization/resources/sessions/client/requests/index.js +9 -0
- package/src/serialization/resources/sessions/index.d.ts +1 -0
- package/src/serialization/resources/sessions/index.js +17 -0
- package/src/serialization/resources/tags/client/index.d.ts +2 -0
- package/src/serialization/resources/tags/client/index.js +31 -0
- package/src/serialization/resources/tags/client/list.d.ts +11 -0
- package/src/serialization/resources/tags/client/list.js +32 -0
- package/src/serialization/resources/tags/client/requests/TagCreationParams.d.ts +12 -0
- package/src/serialization/resources/tags/client/requests/TagCreationParams.js +33 -0
- package/src/serialization/resources/tags/client/requests/TagUpdateParams.d.ts +12 -0
- package/src/serialization/resources/tags/client/requests/TagUpdateParams.js +33 -0
- package/src/serialization/resources/tags/client/requests/index.d.ts +2 -0
- package/src/serialization/resources/tags/client/requests/index.js +7 -0
- package/src/serialization/resources/tags/index.d.ts +1 -0
- package/src/serialization/resources/tags/index.js +17 -0
- package/src/serialization/types/Agent.d.ts +16 -0
- package/src/serialization/types/Agent.js +37 -0
- package/src/serialization/types/CoherenceCheck.d.ts +18 -0
- package/src/serialization/types/CoherenceCheck.js +39 -0
- package/src/serialization/types/CoherenceCheckKindDto.d.ts +10 -0
- package/src/serialization/types/CoherenceCheckKindDto.js +34 -0
- package/src/serialization/types/ConnectionKindDto.d.ts +10 -0
- package/src/serialization/types/ConnectionKindDto.js +31 -0
- package/src/serialization/types/ConnectionProposition.d.ts +18 -0
- package/src/serialization/types/ConnectionProposition.js +39 -0
- package/src/serialization/types/ConnectionPropositionKindDto.d.ts +10 -0
- package/src/serialization/types/ConnectionPropositionKindDto.js +31 -0
- package/src/serialization/types/ConsumptionOffsets.d.ts +12 -0
- package/src/serialization/types/ConsumptionOffsets.js +33 -0
- package/src/serialization/types/ConsumptionOffsetsUpdateParams.d.ts +12 -0
- package/src/serialization/types/ConsumptionOffsetsUpdateParams.js +33 -0
- package/src/serialization/types/ContextVariable.d.ts +18 -0
- package/src/serialization/types/ContextVariable.js +39 -0
- package/src/serialization/types/ContextVariableAndValue.d.ts +16 -0
- package/src/serialization/types/ContextVariableAndValue.js +37 -0
- package/src/serialization/types/ContextVariableReadResult.d.ts +15 -0
- package/src/serialization/types/ContextVariableReadResult.js +36 -0
- package/src/serialization/types/ContextVariableValue.d.ts +14 -0
- package/src/serialization/types/ContextVariableValue.js +35 -0
- package/src/serialization/types/Customer.d.ts +16 -0
- package/src/serialization/types/Customer.js +37 -0
- package/src/serialization/types/CustomerExtraUpdateParams.d.ts +13 -0
- package/src/serialization/types/CustomerExtraUpdateParams.js +34 -0
- package/src/serialization/types/DayOfWeekDto.d.ts +10 -0
- package/src/serialization/types/DayOfWeekDto.js +31 -0
- package/src/serialization/types/Evaluation.d.ts +19 -0
- package/src/serialization/types/Evaluation.js +40 -0
- package/src/serialization/types/EvaluationStatusDto.d.ts +10 -0
- package/src/serialization/types/EvaluationStatusDto.js +31 -0
- package/src/serialization/types/Event.d.ts +19 -0
- package/src/serialization/types/Event.js +40 -0
- package/src/serialization/types/EventInspectionResult.d.ts +16 -0
- package/src/serialization/types/EventInspectionResult.js +37 -0
- package/src/serialization/types/EventKindDto.d.ts +10 -0
- package/src/serialization/types/EventKindDto.js +31 -0
- package/src/serialization/types/EventSourceDto.d.ts +10 -0
- package/src/serialization/types/EventSourceDto.js +38 -0
- package/src/serialization/types/EventTrace.d.ts +17 -0
- package/src/serialization/types/EventTrace.js +38 -0
- package/src/serialization/types/FreshnessRules.d.ts +18 -0
- package/src/serialization/types/FreshnessRules.js +39 -0
- package/src/serialization/types/GenerationInfo.d.ts +16 -0
- package/src/serialization/types/GenerationInfo.js +37 -0
- package/src/serialization/types/Guideline.d.ts +14 -0
- package/src/serialization/types/Guideline.js +35 -0
- package/src/serialization/types/GuidelineConnection.d.ts +18 -0
- package/src/serialization/types/GuidelineConnection.js +39 -0
- package/src/serialization/types/GuidelineConnectionAddition.d.ts +15 -0
- package/src/serialization/types/GuidelineConnectionAddition.js +36 -0
- package/src/serialization/types/GuidelineConnectionUpdateParams.d.ts +14 -0
- package/src/serialization/types/GuidelineConnectionUpdateParams.js +35 -0
- package/src/serialization/types/GuidelineContent.d.ts +13 -0
- package/src/serialization/types/GuidelineContent.js +34 -0
- package/src/serialization/types/GuidelineCreationResult.d.ts +13 -0
- package/src/serialization/types/GuidelineCreationResult.js +34 -0
- package/src/serialization/types/GuidelineInvoiceData.d.ts +15 -0
- package/src/serialization/types/GuidelineInvoiceData.js +36 -0
- package/src/serialization/types/GuidelinePayload.d.ts +18 -0
- package/src/serialization/types/GuidelinePayload.js +39 -0
- package/src/serialization/types/GuidelinePayloadOperationDto.d.ts +10 -0
- package/src/serialization/types/GuidelinePayloadOperationDto.js +31 -0
- package/src/serialization/types/GuidelineProposition.d.ts +16 -0
- package/src/serialization/types/GuidelineProposition.js +37 -0
- package/src/serialization/types/GuidelinePropositionInspection.d.ts +14 -0
- package/src/serialization/types/GuidelinePropositionInspection.js +35 -0
- package/src/serialization/types/GuidelineToolAssociation.d.ts +15 -0
- package/src/serialization/types/GuidelineToolAssociation.js +36 -0
- package/src/serialization/types/GuidelineToolAssociationUpdateParams.d.ts +14 -0
- package/src/serialization/types/GuidelineToolAssociationUpdateParams.js +35 -0
- package/src/serialization/types/GuidelineWithConnectionsAndToolAssociations.d.ts +17 -0
- package/src/serialization/types/GuidelineWithConnectionsAndToolAssociations.js +38 -0
- package/src/serialization/types/HttpValidationError.d.ts +13 -0
- package/src/serialization/types/HttpValidationError.js +34 -0
- package/src/serialization/types/Invoice.d.ts +18 -0
- package/src/serialization/types/Invoice.js +39 -0
- package/src/serialization/types/InvoiceData.d.ts +13 -0
- package/src/serialization/types/InvoiceData.js +34 -0
- package/src/serialization/types/MessageGenerationInspection.d.ts +14 -0
- package/src/serialization/types/MessageGenerationInspection.js +35 -0
- package/src/serialization/types/Moderation.d.ts +10 -0
- package/src/serialization/types/Moderation.js +31 -0
- package/src/serialization/types/OpenApiServiceParams.d.ts +13 -0
- package/src/serialization/types/OpenApiServiceParams.js +34 -0
- package/src/serialization/types/Payload.d.ts +15 -0
- package/src/serialization/types/Payload.js +36 -0
- package/src/serialization/types/PayloadKindDto.d.ts +10 -0
- package/src/serialization/types/PayloadKindDto.js +31 -0
- package/src/serialization/types/PreparationIteration.d.ts +21 -0
- package/src/serialization/types/PreparationIteration.js +42 -0
- package/src/serialization/types/PreparationIterationGenerations.d.ts +15 -0
- package/src/serialization/types/PreparationIterationGenerations.js +36 -0
- package/src/serialization/types/SdkServiceParams.d.ts +12 -0
- package/src/serialization/types/SdkServiceParams.js +33 -0
- package/src/serialization/types/Service.d.ts +17 -0
- package/src/serialization/types/Service.js +38 -0
- package/src/serialization/types/Session.d.ts +18 -0
- package/src/serialization/types/Session.js +39 -0
- package/src/serialization/types/Tag.d.ts +14 -0
- package/src/serialization/types/Tag.js +35 -0
- package/src/serialization/types/TagsUpdateParams.d.ts +13 -0
- package/src/serialization/types/TagsUpdateParams.js +34 -0
- package/src/serialization/types/Term.d.ts +15 -0
- package/src/serialization/types/Term.js +36 -0
- package/src/serialization/types/Tool.d.ts +17 -0
- package/src/serialization/types/Tool.js +38 -0
- package/src/serialization/types/ToolCall.d.ts +15 -0
- package/src/serialization/types/ToolCall.js +36 -0
- package/src/serialization/types/ToolId.d.ts +13 -0
- package/src/serialization/types/ToolId.js +34 -0
- package/src/serialization/types/ToolParameter.d.ts +16 -0
- package/src/serialization/types/ToolParameter.js +37 -0
- package/src/serialization/types/ToolParameterDtoEnumItem.d.ts +10 -0
- package/src/serialization/types/ToolParameterDtoEnumItem.js +31 -0
- package/src/serialization/types/ToolParameterTypeDto.d.ts +10 -0
- package/src/serialization/types/ToolParameterTypeDto.js +31 -0
- package/src/serialization/types/ToolResult.d.ts +13 -0
- package/src/serialization/types/ToolResult.js +34 -0
- package/src/serialization/types/ToolServiceKindDto.d.ts +10 -0
- package/src/serialization/types/ToolServiceKindDto.js +31 -0
- package/src/serialization/types/UsageInfo.d.ts +14 -0
- package/src/serialization/types/UsageInfo.js +37 -0
- package/src/serialization/types/ValidationError.d.ts +15 -0
- package/src/serialization/types/ValidationError.js +36 -0
- package/src/serialization/types/ValidationErrorLocItem.d.ts +10 -0
- package/src/serialization/types/ValidationErrorLocItem.js +31 -0
- package/src/serialization/types/index.d.ts +65 -0
- package/src/serialization/types/index.js +81 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Parlant from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* kind: "message",
|
|
9
|
+
* source: "customer"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface EventCreationParams {
|
|
13
|
+
moderation?: Parlant.Moderation;
|
|
14
|
+
kind: Parlant.EventKindDto;
|
|
15
|
+
source: Parlant.EventSourceDto;
|
|
16
|
+
message?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* agentId: "agent_id"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface SessionCreationParams {
|
|
11
|
+
allowGreeting?: boolean;
|
|
12
|
+
agentId: string;
|
|
13
|
+
customerId?: string;
|
|
14
|
+
title?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Parlant from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {}
|
|
8
|
+
*/
|
|
9
|
+
export interface SessionUpdateParams {
|
|
10
|
+
consumptionOffsets?: Parlant.ConsumptionOffsetsUpdateParams;
|
|
11
|
+
title?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Parlant from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {}
|
|
8
|
+
*/
|
|
9
|
+
export interface SessionsListEventsRequest {
|
|
10
|
+
minOffset?: number;
|
|
11
|
+
source?: Parlant.EventSourceDto;
|
|
12
|
+
correlationId?: string;
|
|
13
|
+
/**
|
|
14
|
+
* If set, only list events of the specified kinds (separated by commas)
|
|
15
|
+
*/
|
|
16
|
+
kinds?: string;
|
|
17
|
+
waitForData?: number;
|
|
18
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { type SessionsListRequest } from "./SessionsListRequest";
|
|
2
|
+
export { type SessionCreationParams } from "./SessionCreationParams";
|
|
3
|
+
export { type SessionsDeleteManyRequest } from "./SessionsDeleteManyRequest";
|
|
4
|
+
export { type SessionUpdateParams } from "./SessionUpdateParams";
|
|
5
|
+
export { type SessionsListEventsRequest } from "./SessionsListEventsRequest";
|
|
6
|
+
export { type EventCreationParams } from "./EventCreationParams";
|
|
7
|
+
export { type SessionsDeleteEventsRequest } from "./SessionsDeleteEventsRequest";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client"), exports);
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as core from "../../../../core";
|
|
5
|
+
import * as Parlant from "../../../index";
|
|
6
|
+
export declare namespace Tags {
|
|
7
|
+
interface Options {
|
|
8
|
+
environment: core.Supplier<string>;
|
|
9
|
+
}
|
|
10
|
+
interface RequestOptions {
|
|
11
|
+
/** The maximum time to wait for a response in seconds. */
|
|
12
|
+
timeoutInSeconds?: number;
|
|
13
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
14
|
+
maxRetries?: number;
|
|
15
|
+
/** A hook to abort the request. */
|
|
16
|
+
abortSignal?: AbortSignal;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export declare class Tags {
|
|
20
|
+
protected readonly _options: Tags.Options;
|
|
21
|
+
constructor(_options: Tags.Options);
|
|
22
|
+
/**
|
|
23
|
+
* @param {Tags.RequestOptions} requestOptions - Request-specific configuration.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* await client.tags.list()
|
|
27
|
+
*/
|
|
28
|
+
list(requestOptions?: Tags.RequestOptions): Promise<Parlant.Tag[]>;
|
|
29
|
+
/**
|
|
30
|
+
* @param {Parlant.TagCreationParams} request
|
|
31
|
+
* @param {Tags.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
|
+
*
|
|
33
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await client.tags.create({
|
|
37
|
+
* name: "name"
|
|
38
|
+
* })
|
|
39
|
+
*/
|
|
40
|
+
create(request: Parlant.TagCreationParams, requestOptions?: Tags.RequestOptions): Promise<Parlant.Tag>;
|
|
41
|
+
/**
|
|
42
|
+
* @param {string} tagId
|
|
43
|
+
* @param {Tags.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
|
+
*
|
|
45
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* await client.tags.retrieve("tag_id")
|
|
49
|
+
*/
|
|
50
|
+
retrieve(tagId: string, requestOptions?: Tags.RequestOptions): Promise<Parlant.Tag>;
|
|
51
|
+
/**
|
|
52
|
+
* @param {string} tagId
|
|
53
|
+
* @param {Tags.RequestOptions} requestOptions - Request-specific configuration.
|
|
54
|
+
*
|
|
55
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* await client.tags.delete("tag_id")
|
|
59
|
+
*/
|
|
60
|
+
delete(tagId: string, requestOptions?: Tags.RequestOptions): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* @param {string} tagId
|
|
63
|
+
* @param {Parlant.TagUpdateParams} request
|
|
64
|
+
* @param {Tags.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* await client.tags.update("tag_id", {
|
|
70
|
+
* name: "name"
|
|
71
|
+
* })
|
|
72
|
+
*/
|
|
73
|
+
update(tagId: string, request: Parlant.TagUpdateParams, requestOptions?: Tags.RequestOptions): Promise<void>;
|
|
74
|
+
}
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
38
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
39
|
+
};
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.Tags = void 0;
|
|
42
|
+
const core = __importStar(require("../../../../core"));
|
|
43
|
+
const Parlant = __importStar(require("../../../index"));
|
|
44
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
45
|
+
const serializers = __importStar(require("../../../../serialization/index"));
|
|
46
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
47
|
+
class Tags {
|
|
48
|
+
constructor(_options) {
|
|
49
|
+
this._options = _options;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* @param {Tags.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* await client.tags.list()
|
|
56
|
+
*/
|
|
57
|
+
list(requestOptions) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const _response = yield core.fetcher({
|
|
60
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "tags/"),
|
|
61
|
+
method: "GET",
|
|
62
|
+
headers: {
|
|
63
|
+
"X-Fern-Language": "JavaScript",
|
|
64
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
65
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
66
|
+
},
|
|
67
|
+
contentType: "application/json",
|
|
68
|
+
requestType: "json",
|
|
69
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
70
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
71
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
72
|
+
});
|
|
73
|
+
if (_response.ok) {
|
|
74
|
+
return serializers.tags.list.Response.parseOrThrow(_response.body, {
|
|
75
|
+
unrecognizedObjectKeys: "passthrough",
|
|
76
|
+
allowUnrecognizedUnionMembers: true,
|
|
77
|
+
allowUnrecognizedEnumValues: true,
|
|
78
|
+
breadcrumbsPrefix: ["response"],
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
if (_response.error.reason === "status-code") {
|
|
82
|
+
throw new errors.ParlantError({
|
|
83
|
+
statusCode: _response.error.statusCode,
|
|
84
|
+
body: _response.error.body,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
switch (_response.error.reason) {
|
|
88
|
+
case "non-json":
|
|
89
|
+
throw new errors.ParlantError({
|
|
90
|
+
statusCode: _response.error.statusCode,
|
|
91
|
+
body: _response.error.rawBody,
|
|
92
|
+
});
|
|
93
|
+
case "timeout":
|
|
94
|
+
throw new errors.ParlantTimeoutError();
|
|
95
|
+
case "unknown":
|
|
96
|
+
throw new errors.ParlantError({
|
|
97
|
+
message: _response.error.errorMessage,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* @param {Parlant.TagCreationParams} request
|
|
104
|
+
* @param {Tags.RequestOptions} requestOptions - Request-specific configuration.
|
|
105
|
+
*
|
|
106
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* await client.tags.create({
|
|
110
|
+
* name: "name"
|
|
111
|
+
* })
|
|
112
|
+
*/
|
|
113
|
+
create(request, requestOptions) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
const _response = yield core.fetcher({
|
|
116
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "tags/"),
|
|
117
|
+
method: "POST",
|
|
118
|
+
headers: {
|
|
119
|
+
"X-Fern-Language": "JavaScript",
|
|
120
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
121
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
122
|
+
},
|
|
123
|
+
contentType: "application/json",
|
|
124
|
+
requestType: "json",
|
|
125
|
+
body: serializers.TagCreationParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
126
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
127
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
128
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
129
|
+
});
|
|
130
|
+
if (_response.ok) {
|
|
131
|
+
return serializers.Tag.parseOrThrow(_response.body, {
|
|
132
|
+
unrecognizedObjectKeys: "passthrough",
|
|
133
|
+
allowUnrecognizedUnionMembers: true,
|
|
134
|
+
allowUnrecognizedEnumValues: true,
|
|
135
|
+
breadcrumbsPrefix: ["response"],
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
if (_response.error.reason === "status-code") {
|
|
139
|
+
switch (_response.error.statusCode) {
|
|
140
|
+
case 422:
|
|
141
|
+
throw new Parlant.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
142
|
+
unrecognizedObjectKeys: "passthrough",
|
|
143
|
+
allowUnrecognizedUnionMembers: true,
|
|
144
|
+
allowUnrecognizedEnumValues: true,
|
|
145
|
+
breadcrumbsPrefix: ["response"],
|
|
146
|
+
}));
|
|
147
|
+
default:
|
|
148
|
+
throw new errors.ParlantError({
|
|
149
|
+
statusCode: _response.error.statusCode,
|
|
150
|
+
body: _response.error.body,
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
switch (_response.error.reason) {
|
|
155
|
+
case "non-json":
|
|
156
|
+
throw new errors.ParlantError({
|
|
157
|
+
statusCode: _response.error.statusCode,
|
|
158
|
+
body: _response.error.rawBody,
|
|
159
|
+
});
|
|
160
|
+
case "timeout":
|
|
161
|
+
throw new errors.ParlantTimeoutError();
|
|
162
|
+
case "unknown":
|
|
163
|
+
throw new errors.ParlantError({
|
|
164
|
+
message: _response.error.errorMessage,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* @param {string} tagId
|
|
171
|
+
* @param {Tags.RequestOptions} requestOptions - Request-specific configuration.
|
|
172
|
+
*
|
|
173
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* await client.tags.retrieve("tag_id")
|
|
177
|
+
*/
|
|
178
|
+
retrieve(tagId, requestOptions) {
|
|
179
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
180
|
+
const _response = yield core.fetcher({
|
|
181
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `tags/${encodeURIComponent(tagId)}`),
|
|
182
|
+
method: "GET",
|
|
183
|
+
headers: {
|
|
184
|
+
"X-Fern-Language": "JavaScript",
|
|
185
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
186
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
187
|
+
},
|
|
188
|
+
contentType: "application/json",
|
|
189
|
+
requestType: "json",
|
|
190
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
191
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
192
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
193
|
+
});
|
|
194
|
+
if (_response.ok) {
|
|
195
|
+
return serializers.Tag.parseOrThrow(_response.body, {
|
|
196
|
+
unrecognizedObjectKeys: "passthrough",
|
|
197
|
+
allowUnrecognizedUnionMembers: true,
|
|
198
|
+
allowUnrecognizedEnumValues: true,
|
|
199
|
+
breadcrumbsPrefix: ["response"],
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
if (_response.error.reason === "status-code") {
|
|
203
|
+
switch (_response.error.statusCode) {
|
|
204
|
+
case 422:
|
|
205
|
+
throw new Parlant.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
206
|
+
unrecognizedObjectKeys: "passthrough",
|
|
207
|
+
allowUnrecognizedUnionMembers: true,
|
|
208
|
+
allowUnrecognizedEnumValues: true,
|
|
209
|
+
breadcrumbsPrefix: ["response"],
|
|
210
|
+
}));
|
|
211
|
+
default:
|
|
212
|
+
throw new errors.ParlantError({
|
|
213
|
+
statusCode: _response.error.statusCode,
|
|
214
|
+
body: _response.error.body,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
switch (_response.error.reason) {
|
|
219
|
+
case "non-json":
|
|
220
|
+
throw new errors.ParlantError({
|
|
221
|
+
statusCode: _response.error.statusCode,
|
|
222
|
+
body: _response.error.rawBody,
|
|
223
|
+
});
|
|
224
|
+
case "timeout":
|
|
225
|
+
throw new errors.ParlantTimeoutError();
|
|
226
|
+
case "unknown":
|
|
227
|
+
throw new errors.ParlantError({
|
|
228
|
+
message: _response.error.errorMessage,
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* @param {string} tagId
|
|
235
|
+
* @param {Tags.RequestOptions} requestOptions - Request-specific configuration.
|
|
236
|
+
*
|
|
237
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
238
|
+
*
|
|
239
|
+
* @example
|
|
240
|
+
* await client.tags.delete("tag_id")
|
|
241
|
+
*/
|
|
242
|
+
delete(tagId, requestOptions) {
|
|
243
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
244
|
+
const _response = yield core.fetcher({
|
|
245
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `tags/${encodeURIComponent(tagId)}`),
|
|
246
|
+
method: "DELETE",
|
|
247
|
+
headers: {
|
|
248
|
+
"X-Fern-Language": "JavaScript",
|
|
249
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
250
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
251
|
+
},
|
|
252
|
+
contentType: "application/json",
|
|
253
|
+
requestType: "json",
|
|
254
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
255
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
256
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
257
|
+
});
|
|
258
|
+
if (_response.ok) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
if (_response.error.reason === "status-code") {
|
|
262
|
+
switch (_response.error.statusCode) {
|
|
263
|
+
case 422:
|
|
264
|
+
throw new Parlant.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
265
|
+
unrecognizedObjectKeys: "passthrough",
|
|
266
|
+
allowUnrecognizedUnionMembers: true,
|
|
267
|
+
allowUnrecognizedEnumValues: true,
|
|
268
|
+
breadcrumbsPrefix: ["response"],
|
|
269
|
+
}));
|
|
270
|
+
default:
|
|
271
|
+
throw new errors.ParlantError({
|
|
272
|
+
statusCode: _response.error.statusCode,
|
|
273
|
+
body: _response.error.body,
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
switch (_response.error.reason) {
|
|
278
|
+
case "non-json":
|
|
279
|
+
throw new errors.ParlantError({
|
|
280
|
+
statusCode: _response.error.statusCode,
|
|
281
|
+
body: _response.error.rawBody,
|
|
282
|
+
});
|
|
283
|
+
case "timeout":
|
|
284
|
+
throw new errors.ParlantTimeoutError();
|
|
285
|
+
case "unknown":
|
|
286
|
+
throw new errors.ParlantError({
|
|
287
|
+
message: _response.error.errorMessage,
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* @param {string} tagId
|
|
294
|
+
* @param {Parlant.TagUpdateParams} request
|
|
295
|
+
* @param {Tags.RequestOptions} requestOptions - Request-specific configuration.
|
|
296
|
+
*
|
|
297
|
+
* @throws {@link Parlant.UnprocessableEntityError}
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
* await client.tags.update("tag_id", {
|
|
301
|
+
* name: "name"
|
|
302
|
+
* })
|
|
303
|
+
*/
|
|
304
|
+
update(tagId, request, requestOptions) {
|
|
305
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
306
|
+
const _response = yield core.fetcher({
|
|
307
|
+
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `tags/${encodeURIComponent(tagId)}`),
|
|
308
|
+
method: "PATCH",
|
|
309
|
+
headers: {
|
|
310
|
+
"X-Fern-Language": "JavaScript",
|
|
311
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
312
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
313
|
+
},
|
|
314
|
+
contentType: "application/json",
|
|
315
|
+
requestType: "json",
|
|
316
|
+
body: serializers.TagUpdateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
317
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
318
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
319
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
320
|
+
});
|
|
321
|
+
if (_response.ok) {
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
if (_response.error.reason === "status-code") {
|
|
325
|
+
switch (_response.error.statusCode) {
|
|
326
|
+
case 422:
|
|
327
|
+
throw new Parlant.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
328
|
+
unrecognizedObjectKeys: "passthrough",
|
|
329
|
+
allowUnrecognizedUnionMembers: true,
|
|
330
|
+
allowUnrecognizedEnumValues: true,
|
|
331
|
+
breadcrumbsPrefix: ["response"],
|
|
332
|
+
}));
|
|
333
|
+
default:
|
|
334
|
+
throw new errors.ParlantError({
|
|
335
|
+
statusCode: _response.error.statusCode,
|
|
336
|
+
body: _response.error.body,
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
switch (_response.error.reason) {
|
|
341
|
+
case "non-json":
|
|
342
|
+
throw new errors.ParlantError({
|
|
343
|
+
statusCode: _response.error.statusCode,
|
|
344
|
+
body: _response.error.rawBody,
|
|
345
|
+
});
|
|
346
|
+
case "timeout":
|
|
347
|
+
throw new errors.ParlantTimeoutError();
|
|
348
|
+
case "unknown":
|
|
349
|
+
throw new errors.ParlantError({
|
|
350
|
+
message: _response.error.errorMessage,
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
exports.Tags = Tags;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|