{#if !express} ({ key })) : undefined} bind:filteredItems={filteredConnects} f={(x) => resourceTypeSearchText(x.key, resourceTypeDescriptions[x.key])} /> resourceTypeSearchText(x.key, resourceTypeDescriptions[x.key])} /> {#if step == 1}
{#snippet sectionHeading(title: string, count: number)}

{title}{#if searching}{count}{/if}

{/snippet} {#snippet resourceButton(key: string, index: number, oauth: boolean)} {#snippet icon()} {/snippet} {#snippet title()} {resourceTypeDisplayName(key)} {key} {/snippet} {#snippet subtitle()} {plainDescription(resourceTypeDescriptions[key])} {/snippet} highlight.hovered(index)} onClick={() => (oauth ? connectOauth(key) : selectFromOthers(key))} /> {/snippet}
{#if searching && listsLoaded && navItems.length === 0}
No resource type matches “{filter.trim()}” Search on the name, the product or what the resource holds — or sync resource types with the hub for more.
{:else}
{#if customKeys.length > 0}
{@render sectionHeading('Custom resource types', customKeys.length)}
{#each customKeys as key, i} {@render resourceButton(key, i, false)} {/each}
{/if} {#if !searching || (rankedConnects?.length ?? 0) > 0}
{@render sectionHeading( 'Instance-configured OAuth APIs', rankedConnects?.length ?? 0 )}
{#if rankedConnects} {#each rankedConnects as { key }, i} {@render resourceButton(key, oauthRowOffset + i, true)} {/each} {:else} {#each new Array(3) as _} {/each} {/if}
{#if !searching && connects && connects.filter(isSharedConnect).length == 0}
No OAuth APIs have been set up on this instance. To add OAuth APIs, first sync the resource types with the hub, then add OAuth configuration. See documentation
{/if}
{/if} {#if !searching || otherKeys.length > 0}
{@render sectionHeading('Others', otherKeys.length)} {#if !searching && connectsManual && connectsManual?.length < 10}
Resource types have not been synced with the hub
{/if}
{#if rankedConnectsManual} {#each otherKeys as key, i} {@render resourceButton(key, otherRowOffset + i, false)} {/each} {:else} {#each new Array(9) as _} {/each} {/if}
{/if}
{/if}
{ connectsManual = undefined await loadResourceTypes() connects = undefined await loadConnects() }} />
{:else if step == 2 && manual}
{#if !emptyString(resourceTypeInfo?.description)} {/if} {#if deployTo} {/if} {#if apiTokenApps[resourceType]}

Instructions

    {#each apiTokenApps[resourceType].instructions as step}
  1. {@html step}
  2. {/each}
{#if apiTokenApps[resourceType].img}
connect
{/if} {/if} {#if resourceType == 'postgresql' || resourceType == 'mysql' || resourceType == 'mongodb'} {/if}
{#if renderDescription}
GH Markdown
{:else if description == undefined || description == ''}
No description provided
{:else} {/if}
{#if resourceTypeNotFound}

Resource type '{resourceType}' not found in your workspace

{/if} {#if registryCcCapable()} {/if}
{#key resourceTypeInfo} {/key}
{:else if step == 2 && !manual} {#if manual == false && resourceType != ''}

{resourceType}

Create a resource backed by an OAuth connection, whose token is fetched from the external services and refreshed automatically if needed before expiration.
{#if ccBringYourOwn} {/if}
{#if resourceTypeInfo?.description} {/if} {#if supportsClientCredentials}

Authentication

{#if ccOnly || ccBringYourOwn}
{#if useSharedInstanceCreds} {resourceType} connects server-to-server using the credentials configured for this instance. The token is acquired and refreshed automatically. {:else} {resourceType} connects server-to-server. Enter a client ID and secret; the token is acquired and refreshed automatically. {/if}
{:else}
enableClientCredentials()} />
{/if} {#if useClientCredentials && !useSharedInstanceCreds}
{#if ccInstanceMeta} {:else} {/if}
{/if}
{/if}

Scopes

{#if editScopes} {:else}
{#each scopes as scope}
- {scope}
{/each}
{/if}
{/if} {:else if step == 3 && !manual && !express} {#if useClientCredentials} Connecting with client credentials... {:else} Finish connection in popup window {/if} {:else} {#if deployTo} {/if} {#if apiTokenApps[resourceType] || !manual}
  • 1. A secret variable containing the {apiTokenApps[resourceType]?.linkedSecret ?? 'token'} {truncateRev(value, 5, '*****')} will be stored a {path}.
  • 2. The resource containing that token will be stored at the same path {path}. The Variable and Resource will be "linked together", they will be deleted and renamed together.
{/if} {/if} {/if}