From cc73c4812a225930c9674c39af765898a6fe972b Mon Sep 17 00:00:00 2001 From: Pascal Lohscheidt Date: Sat, 8 Mar 2025 15:28:00 +0100 Subject: [PATCH 1/4] added stepsailor integration --- integrations/stepsailor/assets/logo.png | Bin 0 -> 11165 bytes integrations/stepsailor/gitbook-manifest.yaml | 56 ++++++++++++++++++ integrations/stepsailor/package.json | 15 +++++ integrations/stepsailor/src/index.ts | 55 +++++++++++++++++ integrations/stepsailor/src/script.raw.js | 10 ++++ integrations/stepsailor/tsconfig.json | 3 + 6 files changed, 139 insertions(+) create mode 100644 integrations/stepsailor/assets/logo.png create mode 100644 integrations/stepsailor/gitbook-manifest.yaml create mode 100644 integrations/stepsailor/package.json create mode 100644 integrations/stepsailor/src/index.ts create mode 100644 integrations/stepsailor/src/script.raw.js create mode 100644 integrations/stepsailor/tsconfig.json diff --git a/integrations/stepsailor/assets/logo.png b/integrations/stepsailor/assets/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..52e7e75d8bece69cf6515b378882675bcf619dc2 GIT binary patch literal 11165 zcmV;OD`M1%P)6w$K~#7F-FU|1rjB zk6rElNED8Q6=qs((5!}AtD#^eoIlDq)ZAj8AJBmBSIf?@>v^wEXa zFX23+^9BHKz4>$VOrslu#QTHdW{E2G7HjR49PcF{umnOATdWV9jt^TP*zl401rISg zMp(Q3=)xP0;XI&o8USzk$bXz;Zr&ND`9P<17zGdwTPBjbFKuMJSDaE9Fcz=Q$O|b_ z4hXN({kIZ6mVoBa(S_?)aE{VB34k|u*3Jisd0s0yS(=`B*KM<-X!J@F82}V0m_!)x z!REoklOun21y~hi(K!WxH{bl3`8D8RL(M$6zgH%hisG_jjqB#bi9qBl zODc>M6s&h}T6=kgQuHuzV(Cga9QxG4bw_cI&^ZBs`Jnh9$ieosy>@NQShG@|aoe>A zaMbO@^rB2p%_R(I87**}Qj+(&i*|W==;I659L2Lt&nf`sZ$2_+(2?MJ=j8;umRn7* zZ+(5BNHHISR@<)xdZ1K%2b2lZuHs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mbR5USDj|JarB1s`M%{aZyhI~igW`EK zG;vR?4G5x^MSRTY1z*bSy=5G$Wv5)?>g?THdJ6tX3!&6#a%l3@@x5nT`7NDw4&o(^}^b^^iBlz+>?waVi@n>com{0 zoEqJD?4~mx>xbxB1wf(zg!eQwI@pB;ST~&hJc`Z(`a4!}F;vLX_QI?ZY+0j{OX;R% zFC^o1cijS@`|~a45%6?yc6^q?=b>XC_&ZB@mg$@TK%y%aKk}ZSkAq=C$90l8Ej~{x ztCd-mn}kezp}M5I*Z$ zI!_h=uvT6tUi}%PvfkWg$T~FuKoAgfLItLU6ydvCSHFfsU%ctuQGB9v5&((j77vfZ zQ^v(0<7p{+>C?QzAOM?Hn{KEa6XIfnS=oXb-Be# vRChRHCAjk^(BE4DomyVH>BbfOgwbCC;O!Rl>~35V00000NkvXXu0mjfTG!L# literal 0 HcmV?d00001 diff --git a/integrations/stepsailor/gitbook-manifest.yaml b/integrations/stepsailor/gitbook-manifest.yaml new file mode 100644 index 000000000..e4a80ebd6 --- /dev/null +++ b/integrations/stepsailor/gitbook-manifest.yaml @@ -0,0 +1,56 @@ +name: stepsailor +title: Stepsailor Assistant +script: src/index.ts +icon: ./assets/logo.png +description: 'Add the Stepsailor assistant to your documentation' +externalLinks: + - label: Website + url: https://www.stepsailor.com/ +visibility: public +target: site +scopes: + - site:script:inject +contentSecurityPolicy: + font-src: | + static.api.stepsailor.com + script-src: | + static.api.stepsailor.com; + https://static.api.stepsailor.com/orion-ai/index.js; + style-src: | + static.api.stepsailor.com + https://static.api.stepsailor.com/orion-ai/main.css; +summary: | + # Overview + + The Stepsailor integration for GitBook brings Orion, an AI-powered assistant, to your documentation that enables your users to ask questions and get answers directly within your documentation. + + # How it works + + Orion provides an in-app AI assistant that answers product questions, displays educational videos within your published content. + + # Configure + + You can configure the integration on your GitBook spaces by providing your organization ID, deployConfig ID and API Key. These credentials connect your documentation to Stepsailor's knowledge base and enable the AI-powered features in your published content. +configurations: + site: + properties: + organizationId: + type: string + title: Organization ID + description: You can copy that in the deploy config page + deployConfigId: + type: number + title: Deploy Config ID + description: You can copy that in the deploy config page + apiKey: + type: string + title: API Key + description: You can copy that in the deploy config page + required: + - organizationId + - deployConfigId + - apiKey +categories: + - ai +organization: GXGct7gbl46efsxXM5JQ +secrets: {} diff --git a/integrations/stepsailor/package.json b/integrations/stepsailor/package.json new file mode 100644 index 000000000..4026db486 --- /dev/null +++ b/integrations/stepsailor/package.json @@ -0,0 +1,15 @@ +{ + "name": "gitbook-orion", + "private": true, + "scripts": { + "typecheck": "tsc --noEmit", + "publish": "gitbook publish ." + }, + "dependencies": { + "@gitbook/runtime": "*" + }, + "devDependencies": { + "@gitbook/cli": "^0.20.1", + "@gitbook/tsconfig": "*" + } +} diff --git a/integrations/stepsailor/src/index.ts b/integrations/stepsailor/src/index.ts new file mode 100644 index 000000000..2e7c388ec --- /dev/null +++ b/integrations/stepsailor/src/index.ts @@ -0,0 +1,55 @@ +import { + createIntegration, + FetchPublishScriptEventCallback, + RuntimeContext, + RuntimeEnvironment, +} from '@gitbook/runtime'; + +import script from './script.raw.js'; + +type StepsailorRuntimeContext = RuntimeContext< + RuntimeEnvironment< + {}, + { + organizationId?: string; + deployConfigId?: string; + apiKey?: string; + } + > +>; + +export const handleFetchEvent: FetchPublishScriptEventCallback = async ( + event, + { environment }: StepsailorRuntimeContext +) => { + const organizationId = + environment.siteInstallation?.configuration?.organizationId; + const deployConfigId = + environment.siteInstallation?.configuration?.deployConfigId; + const apiKey = environment.siteInstallation?.configuration?.apiKey; + + if (!organizationId || !deployConfigId || !apiKey) { + throw new Error( + `The Stepsailor organization ID, deploy config ID and API key are missing from the configuration (ID: ${ + 'spaceId' in event ? event.spaceId : event.siteId + }).` + ); + } + + return new Response( + (script as string) + .replace('', organizationId) + .replace('', deployConfigId) + .replace('', apiKey), + { + headers: { + 'Content-Type': 'application/javascript', + 'Cache-Control': 'max-age=604800', + }, + } + ); +}; + +export default createIntegration({ + fetch_published_script: handleFetchEvent, +}); diff --git a/integrations/stepsailor/src/script.raw.js b/integrations/stepsailor/src/script.raw.js new file mode 100644 index 000000000..baad5ac90 --- /dev/null +++ b/integrations/stepsailor/src/script.raw.js @@ -0,0 +1,10 @@ +(function (d, s) { + d = document; + s = d.createElement('script'); + s.src = 'https://static.api.stepsailor.com/orion-ai/index.js'; + s.setAttribute('data-organization-id', ''); + s.setAttribute('data-deploy-config-id', ''); + s.setAttribute('data-api-key', ''); + s.async = 1; + d.getElementsByTagName('body')[0].appendChild(s); +})(window, document); diff --git a/integrations/stepsailor/tsconfig.json b/integrations/stepsailor/tsconfig.json new file mode 100644 index 000000000..f839d1833 --- /dev/null +++ b/integrations/stepsailor/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@gitbook/tsconfig/integration.json" +} \ No newline at end of file From 08f0f938cd31201f3b6605d84b1d2ec5770accf2 Mon Sep 17 00:00:00 2001 From: Pascal Lohscheidt Date: Sat, 8 Mar 2025 15:37:30 +0100 Subject: [PATCH 2/4] added version --- integrations/stepsailor/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/integrations/stepsailor/package.json b/integrations/stepsailor/package.json index 4026db486..4e4a2483b 100644 --- a/integrations/stepsailor/package.json +++ b/integrations/stepsailor/package.json @@ -1,6 +1,7 @@ { "name": "gitbook-orion", "private": true, + "version": "0.1.0", "scripts": { "typecheck": "tsc --noEmit", "publish": "gitbook publish ." From e169e0f18fdf0fa52d5edda624b615aef35bfeba Mon Sep 17 00:00:00 2001 From: Pascal Lohscheidt Date: Thu, 13 Mar 2025 14:35:36 +0100 Subject: [PATCH 3/4] fixed stepsailor integration --- integrations/stepsailor/gitbook-manifest.yaml | 6 +- integrations/stepsailor/src/index.ts | 75 +++++++++---------- integrations/stepsailor/src/script.raw.js | 16 ++-- 3 files changed, 47 insertions(+), 50 deletions(-) diff --git a/integrations/stepsailor/gitbook-manifest.yaml b/integrations/stepsailor/gitbook-manifest.yaml index e4a80ebd6..303002ee4 100644 --- a/integrations/stepsailor/gitbook-manifest.yaml +++ b/integrations/stepsailor/gitbook-manifest.yaml @@ -9,7 +9,7 @@ externalLinks: visibility: public target: site scopes: - - site:script:inject + - site:script:inject contentSecurityPolicy: font-src: | static.api.stepsailor.com @@ -39,7 +39,7 @@ configurations: title: Organization ID description: You can copy that in the deploy config page deployConfigId: - type: number + type: string title: Deploy Config ID description: You can copy that in the deploy config page apiKey: @@ -51,6 +51,6 @@ configurations: - deployConfigId - apiKey categories: - - ai + - other organization: GXGct7gbl46efsxXM5JQ secrets: {} diff --git a/integrations/stepsailor/src/index.ts b/integrations/stepsailor/src/index.ts index 2e7c388ec..abe5fa32a 100644 --- a/integrations/stepsailor/src/index.ts +++ b/integrations/stepsailor/src/index.ts @@ -1,55 +1,52 @@ import { - createIntegration, - FetchPublishScriptEventCallback, - RuntimeContext, - RuntimeEnvironment, + createIntegration, + FetchPublishScriptEventCallback, + RuntimeContext, + RuntimeEnvironment, } from '@gitbook/runtime'; import script from './script.raw.js'; type StepsailorRuntimeContext = RuntimeContext< - RuntimeEnvironment< - {}, - { - organizationId?: string; - deployConfigId?: string; - apiKey?: string; - } - > + RuntimeEnvironment< + {}, + { + organizationId?: string; + deployConfigId?: string; + apiKey?: string; + } + > >; export const handleFetchEvent: FetchPublishScriptEventCallback = async ( - event, - { environment }: StepsailorRuntimeContext + event, + { environment }: StepsailorRuntimeContext, ) => { - const organizationId = - environment.siteInstallation?.configuration?.organizationId; - const deployConfigId = - environment.siteInstallation?.configuration?.deployConfigId; - const apiKey = environment.siteInstallation?.configuration?.apiKey; - - if (!organizationId || !deployConfigId || !apiKey) { - throw new Error( - `The Stepsailor organization ID, deploy config ID and API key are missing from the configuration (ID: ${ - 'spaceId' in event ? event.spaceId : event.siteId - }).` - ); - } + const organizationId = environment.siteInstallation?.configuration?.organizationId; + const deployConfigId = environment.siteInstallation?.configuration?.deployConfigId; + const apiKey = environment.siteInstallation?.configuration?.apiKey; - return new Response( - (script as string) - .replace('', organizationId) - .replace('', deployConfigId) - .replace('', apiKey), - { - headers: { - 'Content-Type': 'application/javascript', - 'Cache-Control': 'max-age=604800', - }, + if (!organizationId || !deployConfigId || !apiKey) { + throw new Error( + `The Stepsailor organization ID, deploy config ID and API key are missing from the configuration (ID: ${ + 'spaceId' in event ? event.spaceId : event.siteId + }).`, + ); } - ); + + const scriptContent = (script as string) + .replace('', organizationId) + .replace('', deployConfigId) + .replace('', apiKey); + + return new Response(scriptContent, { + headers: { + 'Content-Type': 'application/javascript', + 'Cache-Control': 'max-age=604800', + }, + }); }; export default createIntegration({ - fetch_published_script: handleFetchEvent, + fetch_published_script: handleFetchEvent, }); diff --git a/integrations/stepsailor/src/script.raw.js b/integrations/stepsailor/src/script.raw.js index baad5ac90..70c19e0a4 100644 --- a/integrations/stepsailor/src/script.raw.js +++ b/integrations/stepsailor/src/script.raw.js @@ -1,10 +1,10 @@ (function (d, s) { - d = document; - s = d.createElement('script'); - s.src = 'https://static.api.stepsailor.com/orion-ai/index.js'; - s.setAttribute('data-organization-id', ''); - s.setAttribute('data-deploy-config-id', ''); - s.setAttribute('data-api-key', ''); - s.async = 1; - d.getElementsByTagName('body')[0].appendChild(s); + d = document; + s = d.createElement('script'); + s.src = 'https://static.api.stepsailor.com/orion-ai/index.js'; + s.setAttribute('data-company-id', ''); + s.setAttribute('data-deploy-config-id', ''); + s.setAttribute('data-secret', ''); + s.async = 1; + d.getElementsByTagName('body')[0].appendChild(s); })(window, document); From 41c4c1d532b2f7245b4e5d8dea64efc945375210 Mon Sep 17 00:00:00 2001 From: Pascal Lohscheidt Date: Thu, 13 Mar 2025 14:42:42 +0100 Subject: [PATCH 4/4] fixed stepsailor integration --- integrations/stepsailor/gitbook-manifest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/stepsailor/gitbook-manifest.yaml b/integrations/stepsailor/gitbook-manifest.yaml index 303002ee4..ca34f9251 100644 --- a/integrations/stepsailor/gitbook-manifest.yaml +++ b/integrations/stepsailor/gitbook-manifest.yaml @@ -51,6 +51,6 @@ configurations: - deployConfigId - apiKey categories: - - other + - content organization: GXGct7gbl46efsxXM5JQ secrets: {}