From d222088651a7b959c0c3e17a0f78f5489ddaea19 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 00:03:51 +0000 Subject: [PATCH 1/4] refactor(openapi): remove CanonicalKnowledgeBase and add OAuth2AuthenticationPlan --- fern/apis/api/openapi.json | 293 +++++++++++++++++-------------------- 1 file changed, 138 insertions(+), 155 deletions(-) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index db61683f5..1a6dfb255 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -1291,17 +1291,12 @@ { "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", "title": "CustomKnowledgeBaseDTO" - }, - { - "$ref": "#/components/schemas/CreateCanonicalKnowledgeBaseDTO", - "title": "CanonicalKnowledgeBaseDTO" } ], "discriminator": { "propertyName": "provider", "mapping": { "trieve": "#/components/schemas/CreateTrieveKnowledgeBaseDTO", - "canonical": "#/components/schemas/CreateCanonicalKnowledgeBaseDTO", "custom-knowledge-base": "#/components/schemas/CreateCustomKnowledgeBaseDTO" } } @@ -1323,18 +1318,13 @@ { "$ref": "#/components/schemas/CustomKnowledgeBase", "title": "CustomKnowledgeBase" - }, - { - "$ref": "#/components/schemas/CanonicalKnowledgeBase", - "title": "CanonicalKnowledgeBase" } ], "discriminator": { "propertyName": "provider", "mapping": { "trieve": "#/components/schemas/TrieveKnowledgeBase", - "custom-knowledge-base": "#/components/schemas/CustomKnowledgeBase", - "canonical": "#/components/schemas/CanonicalKnowledgeBase" + "custom-knowledge-base": "#/components/schemas/CustomKnowledgeBase" } } } @@ -1463,18 +1453,13 @@ { "$ref": "#/components/schemas/CustomKnowledgeBase", "title": "CustomKnowledgeBase" - }, - { - "$ref": "#/components/schemas/CanonicalKnowledgeBase", - "title": "CanonicalKnowledgeBase" } ], "discriminator": { "propertyName": "provider", "mapping": { "trieve": "#/components/schemas/TrieveKnowledgeBase", - "custom-knowledge-base": "#/components/schemas/CustomKnowledgeBase", - "canonical": "#/components/schemas/CanonicalKnowledgeBase" + "custom-knowledge-base": "#/components/schemas/CustomKnowledgeBase" } } } @@ -1521,18 +1506,13 @@ { "$ref": "#/components/schemas/CustomKnowledgeBase", "title": "CustomKnowledgeBase" - }, - { - "$ref": "#/components/schemas/CanonicalKnowledgeBase", - "title": "CanonicalKnowledgeBase" } ], "discriminator": { "propertyName": "provider", "mapping": { "trieve": "#/components/schemas/TrieveKnowledgeBase", - "custom-knowledge-base": "#/components/schemas/CustomKnowledgeBase", - "canonical": "#/components/schemas/CanonicalKnowledgeBase" + "custom-knowledge-base": "#/components/schemas/CustomKnowledgeBase" } } } @@ -1576,18 +1556,13 @@ { "$ref": "#/components/schemas/CustomKnowledgeBase", "title": "CustomKnowledgeBase" - }, - { - "$ref": "#/components/schemas/CanonicalKnowledgeBase", - "title": "CanonicalKnowledgeBase" } ], "discriminator": { "propertyName": "provider", "mapping": { "trieve": "#/components/schemas/TrieveKnowledgeBase", - "custom-knowledge-base": "#/components/schemas/CustomKnowledgeBase", - "canonical": "#/components/schemas/CanonicalKnowledgeBase" + "custom-knowledge-base": "#/components/schemas/CustomKnowledgeBase" } } } @@ -1631,18 +1606,13 @@ { "$ref": "#/components/schemas/CustomKnowledgeBase", "title": "CustomKnowledgeBase" - }, - { - "$ref": "#/components/schemas/CanonicalKnowledgeBase", - "title": "CanonicalKnowledgeBase" } ], "discriminator": { "propertyName": "provider", "mapping": { "trieve": "#/components/schemas/TrieveKnowledgeBase", - "custom-knowledge-base": "#/components/schemas/CustomKnowledgeBase", - "canonical": "#/components/schemas/CanonicalKnowledgeBase" + "custom-knowledge-base": "#/components/schemas/CustomKnowledgeBase" } } } @@ -4836,35 +4806,6 @@ "type" ] }, - "CreateCanonicalKnowledgeBaseDTO": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This knowledge base is provided by Canonical.", - "enum": [ - "canonical" - ] - }, - "topK": { - "type": "number", - "description": "This is the top K value for the knowledge base.", - "minimum": 1, - "maximum": 10 - }, - "fileIds": { - "description": "These are the file ids that can be used by the knowledge base.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "provider", - "fileIds" - ] - }, "CreateCustomKnowledgeBaseDTO": { "type": "object", "properties": { @@ -4969,10 +4910,6 @@ "knowledgeBase": { "description": "These are the options for the knowledge base.", "oneOf": [ - { - "$ref": "#/components/schemas/CreateCanonicalKnowledgeBaseDTO", - "title": "Canonical" - }, { "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", "title": "Custom" @@ -5076,10 +5013,6 @@ "knowledgeBase": { "description": "These are the options for the knowledge base.", "oneOf": [ - { - "$ref": "#/components/schemas/CreateCanonicalKnowledgeBaseDTO", - "title": "Canonical" - }, { "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", "title": "Custom" @@ -5191,10 +5124,6 @@ "knowledgeBase": { "description": "These are the options for the knowledge base.", "oneOf": [ - { - "$ref": "#/components/schemas/CreateCanonicalKnowledgeBaseDTO", - "title": "Canonical" - }, { "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", "title": "Custom" @@ -5313,10 +5242,6 @@ "knowledgeBase": { "description": "These are the options for the knowledge base.", "oneOf": [ - { - "$ref": "#/components/schemas/CreateCanonicalKnowledgeBaseDTO", - "title": "Canonical" - }, { "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", "title": "Custom" @@ -5420,10 +5345,6 @@ "knowledgeBase": { "description": "These are the options for the knowledge base.", "oneOf": [ - { - "$ref": "#/components/schemas/CreateCanonicalKnowledgeBaseDTO", - "title": "Canonical" - }, { "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", "title": "Custom" @@ -5534,10 +5455,6 @@ "knowledgeBase": { "description": "These are the options for the knowledge base.", "oneOf": [ - { - "$ref": "#/components/schemas/CreateCanonicalKnowledgeBaseDTO", - "title": "Canonical" - }, { "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", "title": "Custom" @@ -5653,10 +5570,6 @@ "knowledgeBase": { "description": "These are the options for the knowledge base.", "oneOf": [ - { - "$ref": "#/components/schemas/CreateCanonicalKnowledgeBaseDTO", - "title": "Canonical" - }, { "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", "title": "Custom" @@ -5763,10 +5676,6 @@ "knowledgeBase": { "description": "These are the options for the knowledge base.", "oneOf": [ - { - "$ref": "#/components/schemas/CreateCanonicalKnowledgeBaseDTO", - "title": "Canonical" - }, { "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", "title": "Custom" @@ -5949,10 +5858,6 @@ "knowledgeBase": { "description": "These are the options for the knowledge base.", "oneOf": [ - { - "$ref": "#/components/schemas/CreateCanonicalKnowledgeBaseDTO", - "title": "Canonical" - }, { "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", "title": "Custom" @@ -6056,10 +5961,6 @@ "knowledgeBase": { "description": "These are the options for the knowledge base.", "oneOf": [ - { - "$ref": "#/components/schemas/CreateCanonicalKnowledgeBaseDTO", - "title": "Canonical" - }, { "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", "title": "Custom" @@ -6163,10 +6064,6 @@ "knowledgeBase": { "description": "These are the options for the knowledge base.", "oneOf": [ - { - "$ref": "#/components/schemas/CreateCanonicalKnowledgeBaseDTO", - "title": "Canonical" - }, { "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", "title": "Custom" @@ -6270,10 +6167,6 @@ "knowledgeBase": { "description": "These are the options for the knowledge base.", "oneOf": [ - { - "$ref": "#/components/schemas/CreateCanonicalKnowledgeBaseDTO", - "title": "Canonical" - }, { "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", "title": "Custom" @@ -6392,10 +6285,6 @@ "knowledgeBase": { "description": "These are the options for the knowledge base.", "oneOf": [ - { - "$ref": "#/components/schemas/CreateCanonicalKnowledgeBaseDTO", - "title": "Canonical" - }, { "$ref": "#/components/schemas/CreateCustomKnowledgeBaseDTO", "title": "Custom" @@ -13045,45 +12934,6 @@ "orgId" ] }, - "CanonicalKnowledgeBase": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "This knowledge base is provided by Canonical.", - "enum": [ - "canonical" - ] - }, - "topK": { - "type": "number", - "description": "This is the top K value for the knowledge base.", - "minimum": 1, - "maximum": 10 - }, - "fileIds": { - "description": "These are the file ids that can be used by the knowledge base.", - "type": "array", - "items": { - "type": "string" - } - }, - "id": { - "type": "string", - "description": "This is the id of the knowledge base." - }, - "orgId": { - "type": "string", - "description": "This is the org id of the knowledge base." - } - }, - "required": [ - "provider", - "fileIds", - "id", - "orgId" - ] - }, "CreateTrieveKnowledgeBaseDTO": { "type": "object", "properties": { @@ -15701,6 +15551,35 @@ "updatedAt" ] }, + "OAuth2AuthenticationPlan": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "oauth2" + ] + }, + "url": { + "type": "string", + "description": "This is the OAuth2 URL." + }, + "clientId": { + "type": "string", + "description": "This is the OAuth2 client ID." + }, + "clientSecret": { + "type": "string", + "description": "This is the OAuth2 client secret." + } + }, + "required": [ + "type", + "url", + "clientId", + "clientSecret" + ] + }, "CustomLLMCredential": { "type": "object", "properties": { @@ -15715,6 +15594,14 @@ "maxLength": 10000, "description": "This is not returned in the API." }, + "authenticationPlan": { + "description": "This is the authentication plan. Currently supports OAuth2 RFC 6749. To use Bearer authentication, use apiKey", + "allOf": [ + { + "$ref": "#/components/schemas/OAuth2AuthenticationPlan" + } + ] + }, "id": { "type": "string", "description": "This is the unique identifier for the credential." @@ -17006,6 +16893,57 @@ "apiKey" ] }, + "WebhookCredential": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "webhook" + ] + }, + "authenticationPlan": { + "description": "This is the authentication plan. Currently supports OAuth2 RFC 6749.", + "allOf": [ + { + "$ref": "#/components/schemas/OAuth2AuthenticationPlan" + } + ] + }, + "id": { + "type": "string", + "description": "This is the unique identifier for the credential." + }, + "orgId": { + "type": "string", + "description": "This is the unique identifier for the org that this credential belongs to." + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the credential was created." + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "This is the ISO 8601 date-time string of when the assistant was last updated." + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "authenticationPlan", + "id", + "orgId", + "createdAt", + "updatedAt" + ] + }, "XAiCredential": { "type": "object", "properties": { @@ -17371,6 +17309,14 @@ "maxLength": 10000, "description": "This is not returned in the API." }, + "authenticationPlan": { + "description": "This is the authentication plan. Currently supports OAuth2 RFC 6749. To use Bearer authentication, use apiKey", + "allOf": [ + { + "$ref": "#/components/schemas/OAuth2AuthenticationPlan" + } + ] + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -18032,6 +17978,35 @@ "apiKey" ] }, + "CreateWebhookCredentialDTO": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "webhook" + ] + }, + "authenticationPlan": { + "description": "This is the authentication plan. Currently supports OAuth2 RFC 6749.", + "allOf": [ + { + "$ref": "#/components/schemas/OAuth2AuthenticationPlan" + } + ] + }, + "name": { + "type": "string", + "description": "This is the name of credential. This is just for your reference.", + "minLength": 1, + "maxLength": 40 + } + }, + "required": [ + "provider", + "authenticationPlan" + ] + }, "CreateXAiCredentialDTO": { "type": "object", "properties": { @@ -18375,6 +18350,14 @@ "maxLength": 10000, "description": "This is not returned in the API." }, + "authenticationPlan": { + "description": "This is the authentication plan. Currently supports OAuth2 RFC 6749. To use Bearer authentication, use apiKey", + "allOf": [ + { + "$ref": "#/components/schemas/OAuth2AuthenticationPlan" + } + ] + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", From e13f1c0e974ffc592eafb0b4692160edd83705ae Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Sat, 7 Dec 2024 00:03:57 +0000 Subject: [PATCH 2/4] feat(openapi.json): Add Oauth2AuthenticationSession and update XAiCredential This commit introduces a new object, Oauth2AuthenticationSession, which includes properties for the OAuth2 access token and its expiration. It also updates the XAiCredential schema to include an "authenticationSession" field, providing details about the authentication plan. --- fern/apis/api/openapi.json | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index 1a6dfb255..98d78d568 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -15580,6 +15580,20 @@ "clientSecret" ] }, + "Oauth2AuthenticationSession": { + "type": "object", + "properties": { + "accessToken": { + "type": "string", + "description": "This is the OAuth2 access token." + }, + "expiresAt": { + "format": "date-time", + "type": "string", + "description": "This is the OAuth2 access token expiration." + } + } + }, "CustomLLMCredential": { "type": "object", "properties": { @@ -15620,6 +15634,14 @@ "type": "string", "description": "This is the ISO 8601 date-time string of when the assistant was last updated." }, + "authenticationSession": { + "description": "This is the authentication session for the credential. Available for credentials that have an authentication plan.", + "allOf": [ + { + "$ref": "#/components/schemas/Oauth2AuthenticationSession" + } + ] + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -16928,6 +16950,14 @@ "type": "string", "description": "This is the ISO 8601 date-time string of when the assistant was last updated." }, + "authenticationSession": { + "description": "This is the authentication session for the credential. Available for credentials that have an authentication plan.", + "allOf": [ + { + "$ref": "#/components/schemas/Oauth2AuthenticationSession" + } + ] + }, "name": { "type": "string", "description": "This is the name of credential. This is just for your reference.", @@ -16941,7 +16971,8 @@ "id", "orgId", "createdAt", - "updatedAt" + "updatedAt", + "authenticationSession" ] }, "XAiCredential": { From 2293ffd666d2669b934d0c70dd90be33deb6be49 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 00:03:37 +0000 Subject: [PATCH 3/4] fix(fern/apis/api): add tavus video failure pipeline error code --- fern/apis/api/openapi.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index 98d78d568..309ce9d09 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -10367,6 +10367,7 @@ "pipeline-error-deepgram-returning-500-invalid-json", "pipeline-error-deepgram-returning-502-network-error", "pipeline-error-deepgram-returning-502-bad-gateway-ehostunreach", + "pipeline-error-tavus-video-failed", "pipeline-error-custom-transcriber-failed", "silence-timed-out", "sip-gateway-failed-to-connect-call", @@ -21100,6 +21101,7 @@ "pipeline-error-deepgram-returning-500-invalid-json", "pipeline-error-deepgram-returning-502-network-error", "pipeline-error-deepgram-returning-502-bad-gateway-ehostunreach", + "pipeline-error-tavus-video-failed", "pipeline-error-custom-transcriber-failed", "silence-timed-out", "sip-gateway-failed-to-connect-call", @@ -21879,6 +21881,7 @@ "pipeline-error-deepgram-returning-500-invalid-json", "pipeline-error-deepgram-returning-502-network-error", "pipeline-error-deepgram-returning-502-bad-gateway-ehostunreach", + "pipeline-error-tavus-video-failed", "pipeline-error-custom-transcriber-failed", "silence-timed-out", "sip-gateway-failed-to-connect-call", From f0706fb2d1f19f25b57b96f7ae1ae1b563a1e275 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 00:03:51 +0000 Subject: [PATCH 4/4] fix(fern/apis/api): remove tavus video error from openapi.json --- fern/apis/api/openapi.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/fern/apis/api/openapi.json b/fern/apis/api/openapi.json index 309ce9d09..98d78d568 100644 --- a/fern/apis/api/openapi.json +++ b/fern/apis/api/openapi.json @@ -10367,7 +10367,6 @@ "pipeline-error-deepgram-returning-500-invalid-json", "pipeline-error-deepgram-returning-502-network-error", "pipeline-error-deepgram-returning-502-bad-gateway-ehostunreach", - "pipeline-error-tavus-video-failed", "pipeline-error-custom-transcriber-failed", "silence-timed-out", "sip-gateway-failed-to-connect-call", @@ -21101,7 +21100,6 @@ "pipeline-error-deepgram-returning-500-invalid-json", "pipeline-error-deepgram-returning-502-network-error", "pipeline-error-deepgram-returning-502-bad-gateway-ehostunreach", - "pipeline-error-tavus-video-failed", "pipeline-error-custom-transcriber-failed", "silence-timed-out", "sip-gateway-failed-to-connect-call", @@ -21881,7 +21879,6 @@ "pipeline-error-deepgram-returning-500-invalid-json", "pipeline-error-deepgram-returning-502-network-error", "pipeline-error-deepgram-returning-502-bad-gateway-ehostunreach", - "pipeline-error-tavus-video-failed", "pipeline-error-custom-transcriber-failed", "silence-timed-out", "sip-gateway-failed-to-connect-call",