@atlasauth/pca-connectors 0.0.0-stage → 0.1.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/dist/authorize.d.ts +72 -0
- package/dist/authorize.js +100 -0
- package/dist/authorize.js.map +1 -0
- package/dist/exchange.d.ts +100 -0
- package/dist/exchange.js +220 -0
- package/dist/exchange.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +85 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest.d.ts +93 -0
- package/dist/manifest.js +256 -0
- package/dist/manifest.js.map +1 -0
- package/dist/providers/index.d.ts +41 -0
- package/dist/providers/index.js +260 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/registry.d.ts +32 -0
- package/dist/registry.js +70 -0
- package/dist/registry.js.map +1 -0
- package/package.json +31 -3
- package/README.md +0 -3
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The declarative unit of the connector catalog: a {@link ProviderManifest}.
|
|
3
|
+
*
|
|
4
|
+
* A manifest is PURE DATA (no secrets): it names a SaaS provider's OAuth 2.0 authorize/token endpoints,
|
|
5
|
+
* the scopes it offers, how its access token is presented to the API, and how (if at all) it refreshes.
|
|
6
|
+
* Wiring a new outbound tool is therefore a data edit, not code. Every connection minted from a manifest
|
|
7
|
+
* is stored in the `@atlasauth/pca-connect` vault bound to a PCA capability, so each outbound token is a
|
|
8
|
+
* proof-carrying, least-privilege capability — the property Composio / Descope / Auth0 Token Vault lack.
|
|
9
|
+
*/
|
|
10
|
+
/** How a provider's ACCESS token is presented to its API on an outbound call. */
|
|
11
|
+
export type TokenPlacement = 'bearer' | 'header' | 'query';
|
|
12
|
+
/** Whether (and how) a provider's access token can be refreshed. */
|
|
13
|
+
export type RefreshMode = 'refresh_token' | 'none';
|
|
14
|
+
/** How client credentials are presented at the token endpoint (RFC 6749 §2.3.1). */
|
|
15
|
+
export type ClientAuthMethod = 'post' | 'basic';
|
|
16
|
+
/** The refresh contract for a provider: how a stale access token is renewed. */
|
|
17
|
+
export interface RefreshSpec {
|
|
18
|
+
/** `refresh_token` = standard OAuth refresh-token grant; `none` = tokens do not refresh (static/long-lived). */
|
|
19
|
+
mode: RefreshMode;
|
|
20
|
+
/** Token endpoint used for refresh. Defaults to the manifest's `tokenUrl`. */
|
|
21
|
+
tokenEndpoint?: string;
|
|
22
|
+
/** When true, a narrowed `scope` is sent on refresh so the minted token is no wider than requested. */
|
|
23
|
+
supportsScopeNarrowing?: boolean;
|
|
24
|
+
/** Extra static form parameters merged into every refresh request. */
|
|
25
|
+
extraParams?: Record<string, string>;
|
|
26
|
+
}
|
|
27
|
+
/** A declarative outbound-provider definition. See the module doc. */
|
|
28
|
+
export interface ProviderManifest {
|
|
29
|
+
/** Stable, lowercase, globally-unique registry id (e.g. `google`, `microsoft`). */
|
|
30
|
+
id: string;
|
|
31
|
+
/** Human label for consent / directory UIs. */
|
|
32
|
+
displayName: string;
|
|
33
|
+
/** OAuth 2.0 authorization endpoint (RFC 6749 §3.1). May carry `{var}` placeholders (see `requiredVars`). */
|
|
34
|
+
authorizeUrl: string;
|
|
35
|
+
/** OAuth 2.0 token endpoint (RFC 6749 §3.2). May carry `{var}` placeholders. */
|
|
36
|
+
tokenUrl: string;
|
|
37
|
+
/** The full set of scopes this connector knows about (catalog/consent UI surface). */
|
|
38
|
+
scopesAvailable: string[];
|
|
39
|
+
/** The least-privilege default requested when a caller names no scopes. Must be ⊆ `scopesAvailable`. */
|
|
40
|
+
defaultScopes: string[];
|
|
41
|
+
/** The refresh contract. */
|
|
42
|
+
refresh: RefreshSpec;
|
|
43
|
+
/** How the access token is presented to the provider API. */
|
|
44
|
+
tokenPlacement: TokenPlacement;
|
|
45
|
+
/** Whether this provider supports / requires PKCE (RFC 7636). */
|
|
46
|
+
pkce?: boolean;
|
|
47
|
+
/** Scope delimiter in the authorize request. Default `' '`; some providers use `','` (Slack, Shopify, Linear). */
|
|
48
|
+
scopeSeparator?: string;
|
|
49
|
+
/** Static extra parameters added to the authorize URL (e.g. Google `access_type=offline`). */
|
|
50
|
+
authParams?: Record<string, string>;
|
|
51
|
+
/** How client credentials are sent at the token endpoint. Default `'post'`; `'basic'` for Notion / Zoom. */
|
|
52
|
+
clientAuth?: ClientAuthMethod;
|
|
53
|
+
/** Header name to carry the token when `tokenPlacement === 'header'`. */
|
|
54
|
+
headerName?: string;
|
|
55
|
+
/** Query-parameter name to carry the token when `tokenPlacement === 'query'`. */
|
|
56
|
+
queryParam?: string;
|
|
57
|
+
/** `{var}` placeholder names that must be substituted in `authorizeUrl` / `tokenUrl` (e.g. `['shop']`). */
|
|
58
|
+
requiredVars?: string[];
|
|
59
|
+
/** Optional human documentation link. */
|
|
60
|
+
docsUrl?: string;
|
|
61
|
+
}
|
|
62
|
+
/** Base class for every runtime refusal this package raises. */
|
|
63
|
+
export declare class ConnectorError extends Error {
|
|
64
|
+
constructor(message: string);
|
|
65
|
+
}
|
|
66
|
+
/** A manifest failed structural validation. `issues` lists every problem found. */
|
|
67
|
+
export declare class ManifestValidationError extends ConnectorError {
|
|
68
|
+
readonly issues: readonly string[];
|
|
69
|
+
constructor(issues: readonly string[]);
|
|
70
|
+
}
|
|
71
|
+
/** No manifest is registered for the requested provider id. */
|
|
72
|
+
export declare class UnknownProviderError extends ConnectorError {
|
|
73
|
+
readonly providerId: string;
|
|
74
|
+
constructor(providerId: string);
|
|
75
|
+
}
|
|
76
|
+
/** The result of validating an untrusted manifest. */
|
|
77
|
+
export type ManifestValidation = {
|
|
78
|
+
ok: true;
|
|
79
|
+
manifest: ProviderManifest;
|
|
80
|
+
} | {
|
|
81
|
+
ok: false;
|
|
82
|
+
issues: string[];
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Structurally validate an untrusted value as a {@link ProviderManifest}. Pure (no I/O); collects every
|
|
86
|
+
* issue rather than failing on the first, so a custom-manifest author sees all problems at once. Enforces
|
|
87
|
+
* the catalog invariants: a well-formed id, HTTPS endpoints, string scope lists, `defaultScopes ⊆
|
|
88
|
+
* scopesAvailable`, a known `tokenPlacement` / `refresh.mode` / `clientAuth`, a `headerName`/`queryParam`
|
|
89
|
+
* present for the matching placement, and that every `{var}` in the URLs is declared in `requiredVars`.
|
|
90
|
+
*/
|
|
91
|
+
export declare function validateManifest(input: unknown): ManifestValidation;
|
|
92
|
+
/** Validate `input`, returning the manifest or throwing {@link ManifestValidationError}. */
|
|
93
|
+
export declare function assertManifest(input: unknown): ProviderManifest;
|
package/dist/manifest.js
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The declarative unit of the connector catalog: a {@link ProviderManifest}.
|
|
4
|
+
*
|
|
5
|
+
* A manifest is PURE DATA (no secrets): it names a SaaS provider's OAuth 2.0 authorize/token endpoints,
|
|
6
|
+
* the scopes it offers, how its access token is presented to the API, and how (if at all) it refreshes.
|
|
7
|
+
* Wiring a new outbound tool is therefore a data edit, not code. Every connection minted from a manifest
|
|
8
|
+
* is stored in the `@atlasauth/pca-connect` vault bound to a PCA capability, so each outbound token is a
|
|
9
|
+
* proof-carrying, least-privilege capability — the property Composio / Descope / Auth0 Token Vault lack.
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UnknownProviderError = exports.ManifestValidationError = exports.ConnectorError = void 0;
|
|
13
|
+
exports.validateManifest = validateManifest;
|
|
14
|
+
exports.assertManifest = assertManifest;
|
|
15
|
+
// ---- errors -----------------------------------------------------------------------------------
|
|
16
|
+
/** Base class for every runtime refusal this package raises. */
|
|
17
|
+
class ConnectorError extends Error {
|
|
18
|
+
constructor(message) {
|
|
19
|
+
super(message);
|
|
20
|
+
this.name = 'ConnectorError';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ConnectorError = ConnectorError;
|
|
24
|
+
/** A manifest failed structural validation. `issues` lists every problem found. */
|
|
25
|
+
class ManifestValidationError extends ConnectorError {
|
|
26
|
+
issues;
|
|
27
|
+
constructor(issues) {
|
|
28
|
+
super(`invalid provider manifest: ${issues.join('; ')}`);
|
|
29
|
+
this.name = 'ManifestValidationError';
|
|
30
|
+
this.issues = issues;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.ManifestValidationError = ManifestValidationError;
|
|
34
|
+
/** No manifest is registered for the requested provider id. */
|
|
35
|
+
class UnknownProviderError extends ConnectorError {
|
|
36
|
+
providerId;
|
|
37
|
+
constructor(providerId) {
|
|
38
|
+
super(`no connector registered for provider '${providerId}'`);
|
|
39
|
+
this.name = 'UnknownProviderError';
|
|
40
|
+
this.providerId = providerId;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.UnknownProviderError = UnknownProviderError;
|
|
44
|
+
// ---- validation -------------------------------------------------------------------------------
|
|
45
|
+
/** Read own property `k` off `o` as `unknown`, without a cast. Absent => `undefined`. */
|
|
46
|
+
function prop(o, k) {
|
|
47
|
+
return Object.prototype.hasOwnProperty.call(o, k) ? Reflect.get(o, k) : undefined;
|
|
48
|
+
}
|
|
49
|
+
function isRecord(v) {
|
|
50
|
+
return v !== null && typeof v === 'object' && !Array.isArray(v);
|
|
51
|
+
}
|
|
52
|
+
function isNonEmptyString(v) {
|
|
53
|
+
return typeof v === 'string' && v.length > 0;
|
|
54
|
+
}
|
|
55
|
+
function isStringArray(v) {
|
|
56
|
+
return Array.isArray(v) && v.every((x) => typeof x === 'string');
|
|
57
|
+
}
|
|
58
|
+
function isStringRecord(v) {
|
|
59
|
+
return isRecord(v) && Object.values(v).every((x) => typeof x === 'string');
|
|
60
|
+
}
|
|
61
|
+
const ID_PATTERN = /^[a-z0-9][a-z0-9._-]*$/;
|
|
62
|
+
const TOKEN_PLACEMENTS = new Set(['bearer', 'header', 'query']);
|
|
63
|
+
const REFRESH_MODES = new Set(['refresh_token', 'none']);
|
|
64
|
+
const CLIENT_AUTHS = new Set(['post', 'basic']);
|
|
65
|
+
const oneOf = (s) => [...s].join(' | ');
|
|
66
|
+
function isHttpsUrl(v) {
|
|
67
|
+
return typeof v === 'string' && v.startsWith('https://');
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Structurally validate an untrusted value as a {@link ProviderManifest}. Pure (no I/O); collects every
|
|
71
|
+
* issue rather than failing on the first, so a custom-manifest author sees all problems at once. Enforces
|
|
72
|
+
* the catalog invariants: a well-formed id, HTTPS endpoints, string scope lists, `defaultScopes ⊆
|
|
73
|
+
* scopesAvailable`, a known `tokenPlacement` / `refresh.mode` / `clientAuth`, a `headerName`/`queryParam`
|
|
74
|
+
* present for the matching placement, and that every `{var}` in the URLs is declared in `requiredVars`.
|
|
75
|
+
*/
|
|
76
|
+
function validateManifest(input) {
|
|
77
|
+
const issues = [];
|
|
78
|
+
if (!isRecord(input)) {
|
|
79
|
+
return { ok: false, issues: ['manifest must be an object'] };
|
|
80
|
+
}
|
|
81
|
+
const id = prop(input, 'id');
|
|
82
|
+
if (!isNonEmptyString(id))
|
|
83
|
+
issues.push('id must be a non-empty string');
|
|
84
|
+
else if (!ID_PATTERN.test(id))
|
|
85
|
+
issues.push(`id '${id}' must be lowercase and match ${ID_PATTERN.source}`);
|
|
86
|
+
if (!isNonEmptyString(prop(input, 'displayName')))
|
|
87
|
+
issues.push('displayName must be a non-empty string');
|
|
88
|
+
const authorizeUrl = prop(input, 'authorizeUrl');
|
|
89
|
+
if (!isHttpsUrl(authorizeUrl))
|
|
90
|
+
issues.push('authorizeUrl must be an https:// URL');
|
|
91
|
+
const tokenUrl = prop(input, 'tokenUrl');
|
|
92
|
+
if (!isHttpsUrl(tokenUrl))
|
|
93
|
+
issues.push('tokenUrl must be an https:// URL');
|
|
94
|
+
const scopesAvailable = prop(input, 'scopesAvailable');
|
|
95
|
+
if (!isStringArray(scopesAvailable))
|
|
96
|
+
issues.push('scopesAvailable must be an array of strings');
|
|
97
|
+
const defaultScopes = prop(input, 'defaultScopes');
|
|
98
|
+
if (!isStringArray(defaultScopes))
|
|
99
|
+
issues.push('defaultScopes must be an array of strings');
|
|
100
|
+
if (isStringArray(scopesAvailable) && isStringArray(defaultScopes) && scopesAvailable.length > 0) {
|
|
101
|
+
const available = new Set(scopesAvailable);
|
|
102
|
+
const missing = defaultScopes.filter((s) => !available.has(s));
|
|
103
|
+
if (missing.length > 0)
|
|
104
|
+
issues.push(`defaultScopes must be a subset of scopesAvailable (unknown: ${missing.join(', ')})`);
|
|
105
|
+
}
|
|
106
|
+
const refresh = prop(input, 'refresh');
|
|
107
|
+
if (!isRecord(refresh)) {
|
|
108
|
+
issues.push('refresh must be an object');
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
const mode = prop(refresh, 'mode');
|
|
112
|
+
if (typeof mode !== 'string' || !REFRESH_MODES.has(mode)) {
|
|
113
|
+
issues.push(`refresh.mode must be one of ${oneOf(REFRESH_MODES)}`);
|
|
114
|
+
}
|
|
115
|
+
const te = prop(refresh, 'tokenEndpoint');
|
|
116
|
+
if (te !== undefined && !isHttpsUrl(te))
|
|
117
|
+
issues.push('refresh.tokenEndpoint, when present, must be an https:// URL');
|
|
118
|
+
const sn = prop(refresh, 'supportsScopeNarrowing');
|
|
119
|
+
if (sn !== undefined && typeof sn !== 'boolean')
|
|
120
|
+
issues.push('refresh.supportsScopeNarrowing must be a boolean');
|
|
121
|
+
const ep = prop(refresh, 'extraParams');
|
|
122
|
+
if (ep !== undefined && !isStringRecord(ep))
|
|
123
|
+
issues.push('refresh.extraParams must be a string→string map');
|
|
124
|
+
}
|
|
125
|
+
const tokenPlacement = prop(input, 'tokenPlacement');
|
|
126
|
+
if (typeof tokenPlacement !== 'string' || !TOKEN_PLACEMENTS.has(tokenPlacement)) {
|
|
127
|
+
issues.push(`tokenPlacement must be one of ${oneOf(TOKEN_PLACEMENTS)}`);
|
|
128
|
+
}
|
|
129
|
+
else if (tokenPlacement === 'header' && !isNonEmptyString(prop(input, 'headerName'))) {
|
|
130
|
+
issues.push("tokenPlacement 'header' requires a non-empty headerName");
|
|
131
|
+
}
|
|
132
|
+
else if (tokenPlacement === 'query' && !isNonEmptyString(prop(input, 'queryParam'))) {
|
|
133
|
+
issues.push("tokenPlacement 'query' requires a non-empty queryParam");
|
|
134
|
+
}
|
|
135
|
+
const pkce = prop(input, 'pkce');
|
|
136
|
+
if (pkce !== undefined && typeof pkce !== 'boolean')
|
|
137
|
+
issues.push('pkce must be a boolean');
|
|
138
|
+
const scopeSeparator = prop(input, 'scopeSeparator');
|
|
139
|
+
if (scopeSeparator !== undefined && typeof scopeSeparator !== 'string')
|
|
140
|
+
issues.push('scopeSeparator must be a string');
|
|
141
|
+
const authParams = prop(input, 'authParams');
|
|
142
|
+
if (authParams !== undefined && !isStringRecord(authParams))
|
|
143
|
+
issues.push('authParams must be a string→string map');
|
|
144
|
+
const clientAuth = prop(input, 'clientAuth');
|
|
145
|
+
if (clientAuth !== undefined && (typeof clientAuth !== 'string' || !CLIENT_AUTHS.has(clientAuth))) {
|
|
146
|
+
issues.push(`clientAuth must be one of ${oneOf(CLIENT_AUTHS)}`);
|
|
147
|
+
}
|
|
148
|
+
const requiredVars = prop(input, 'requiredVars');
|
|
149
|
+
if (requiredVars !== undefined && !isStringArray(requiredVars))
|
|
150
|
+
issues.push('requiredVars must be an array of strings');
|
|
151
|
+
// Every `{var}` that appears in a URL must be declared, and vice-versa, so substitution can never silently
|
|
152
|
+
// leave a placeholder in a live request.
|
|
153
|
+
if (isHttpsUrl(authorizeUrl) && isHttpsUrl(tokenUrl)) {
|
|
154
|
+
const declared = new Set(isStringArray(requiredVars) ? requiredVars : []);
|
|
155
|
+
const used = new Set([...urlVars(authorizeUrl), ...urlVars(tokenUrl)]);
|
|
156
|
+
for (const v of used)
|
|
157
|
+
if (!declared.has(v))
|
|
158
|
+
issues.push(`url uses '{${v}}' but requiredVars does not declare it`);
|
|
159
|
+
for (const v of declared)
|
|
160
|
+
if (!used.has(v))
|
|
161
|
+
issues.push(`requiredVars declares '${v}' but no URL uses '{${v}}'`);
|
|
162
|
+
}
|
|
163
|
+
const docsUrl = prop(input, 'docsUrl');
|
|
164
|
+
if (docsUrl !== undefined && typeof docsUrl !== 'string')
|
|
165
|
+
issues.push('docsUrl must be a string');
|
|
166
|
+
if (issues.length > 0)
|
|
167
|
+
return { ok: false, issues };
|
|
168
|
+
// Every branch above has narrowed the fields; rebuild a clean manifest from the validated values so the
|
|
169
|
+
// returned object carries only known keys.
|
|
170
|
+
return { ok: true, manifest: freezeManifest(input) };
|
|
171
|
+
}
|
|
172
|
+
/** Collect the `{var}` placeholder names used in a URL. */
|
|
173
|
+
function urlVars(url) {
|
|
174
|
+
const out = [];
|
|
175
|
+
const re = /\{(\w+)\}/g;
|
|
176
|
+
let m = re.exec(url);
|
|
177
|
+
while (m !== null) {
|
|
178
|
+
const name = m[1];
|
|
179
|
+
if (name !== undefined)
|
|
180
|
+
out.push(name);
|
|
181
|
+
m = re.exec(url);
|
|
182
|
+
}
|
|
183
|
+
return out;
|
|
184
|
+
}
|
|
185
|
+
/** Build a {@link ProviderManifest} from an already-validated record, copying only known fields. */
|
|
186
|
+
function freezeManifest(input) {
|
|
187
|
+
// Each read is guarded by validateManifest having passed; the casts here are to the ALREADY-CHECKED
|
|
188
|
+
// shapes, expressed as narrowing helpers rather than `as` on raw unknown.
|
|
189
|
+
const refreshRaw = prop(input, 'refresh');
|
|
190
|
+
const refreshRec = isRecord(refreshRaw) ? refreshRaw : {};
|
|
191
|
+
const refresh = { mode: readRefreshMode(prop(refreshRec, 'mode')) };
|
|
192
|
+
const te = prop(refreshRec, 'tokenEndpoint');
|
|
193
|
+
if (typeof te === 'string')
|
|
194
|
+
refresh.tokenEndpoint = te;
|
|
195
|
+
const sn = prop(refreshRec, 'supportsScopeNarrowing');
|
|
196
|
+
if (typeof sn === 'boolean')
|
|
197
|
+
refresh.supportsScopeNarrowing = sn;
|
|
198
|
+
const ep = prop(refreshRec, 'extraParams');
|
|
199
|
+
if (isStringRecord(ep))
|
|
200
|
+
refresh.extraParams = { ...ep };
|
|
201
|
+
const manifest = {
|
|
202
|
+
id: readString(prop(input, 'id')),
|
|
203
|
+
displayName: readString(prop(input, 'displayName')),
|
|
204
|
+
authorizeUrl: readString(prop(input, 'authorizeUrl')),
|
|
205
|
+
tokenUrl: readString(prop(input, 'tokenUrl')),
|
|
206
|
+
scopesAvailable: readStringArray(prop(input, 'scopesAvailable')),
|
|
207
|
+
defaultScopes: readStringArray(prop(input, 'defaultScopes')),
|
|
208
|
+
refresh,
|
|
209
|
+
tokenPlacement: readTokenPlacement(prop(input, 'tokenPlacement')),
|
|
210
|
+
};
|
|
211
|
+
const pkce = prop(input, 'pkce');
|
|
212
|
+
if (typeof pkce === 'boolean')
|
|
213
|
+
manifest.pkce = pkce;
|
|
214
|
+
const sep = prop(input, 'scopeSeparator');
|
|
215
|
+
if (typeof sep === 'string')
|
|
216
|
+
manifest.scopeSeparator = sep;
|
|
217
|
+
const authParams = prop(input, 'authParams');
|
|
218
|
+
if (isStringRecord(authParams))
|
|
219
|
+
manifest.authParams = { ...authParams };
|
|
220
|
+
const clientAuth = prop(input, 'clientAuth');
|
|
221
|
+
if (clientAuth === 'post' || clientAuth === 'basic')
|
|
222
|
+
manifest.clientAuth = clientAuth;
|
|
223
|
+
const headerName = prop(input, 'headerName');
|
|
224
|
+
if (typeof headerName === 'string')
|
|
225
|
+
manifest.headerName = headerName;
|
|
226
|
+
const queryParam = prop(input, 'queryParam');
|
|
227
|
+
if (typeof queryParam === 'string')
|
|
228
|
+
manifest.queryParam = queryParam;
|
|
229
|
+
const requiredVars = prop(input, 'requiredVars');
|
|
230
|
+
if (isStringArray(requiredVars))
|
|
231
|
+
manifest.requiredVars = [...requiredVars];
|
|
232
|
+
const docsUrl = prop(input, 'docsUrl');
|
|
233
|
+
if (typeof docsUrl === 'string')
|
|
234
|
+
manifest.docsUrl = docsUrl;
|
|
235
|
+
return manifest;
|
|
236
|
+
}
|
|
237
|
+
function readString(v) {
|
|
238
|
+
return typeof v === 'string' ? v : '';
|
|
239
|
+
}
|
|
240
|
+
function readStringArray(v) {
|
|
241
|
+
return isStringArray(v) ? [...v] : [];
|
|
242
|
+
}
|
|
243
|
+
function readRefreshMode(v) {
|
|
244
|
+
return v === 'none' ? 'none' : 'refresh_token';
|
|
245
|
+
}
|
|
246
|
+
function readTokenPlacement(v) {
|
|
247
|
+
return v === 'header' ? 'header' : v === 'query' ? 'query' : 'bearer';
|
|
248
|
+
}
|
|
249
|
+
/** Validate `input`, returning the manifest or throwing {@link ManifestValidationError}. */
|
|
250
|
+
function assertManifest(input) {
|
|
251
|
+
const result = validateManifest(input);
|
|
252
|
+
if (!result.ok)
|
|
253
|
+
throw new ManifestValidationError(result.issues);
|
|
254
|
+
return result.manifest;
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAsIH,4CAiFC;AAwED,wCAIC;AAxOD,kGAAkG;AAElG,gEAAgE;AAChE,MAAa,cAAe,SAAQ,KAAK;IACvC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;IAC/B,CAAC;CACF;AALD,wCAKC;AAED,mFAAmF;AACnF,MAAa,uBAAwB,SAAQ,cAAc;IAChD,MAAM,CAAoB;IACnC,YAAY,MAAyB;QACnC,KAAK,CAAC,8BAA8B,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACzD,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAPD,0DAOC;AAED,+DAA+D;AAC/D,MAAa,oBAAqB,SAAQ,cAAc;IAC7C,UAAU,CAAS;IAC5B,YAAY,UAAkB;QAC5B,KAAK,CAAC,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AAC,CAAC;IACjE,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The seeded connector catalog: declarative {@link ProviderManifest}s for the top outbound SaaS tools.
|
|
3
|
+
*
|
|
4
|
+
* These carry NO secrets — only public OAuth 2.0 endpoints, the scopes a provider offers, how its token is
|
|
5
|
+
* presented, and its refresh contract. A consumer supplies the `clientId` / `clientSecret` at call time.
|
|
6
|
+
* Endpoints and scope strings are the providers' documented production values; `defaultScopes` is a
|
|
7
|
+
* least-privilege starting set, always a subset of `scopesAvailable`.
|
|
8
|
+
*/
|
|
9
|
+
import type { ProviderManifest } from '../manifest';
|
|
10
|
+
/** Google Workspace / Gmail / Drive / Calendar. PKCE-capable; `access_type=offline` is required for a refresh token. */
|
|
11
|
+
export declare const google: ProviderManifest;
|
|
12
|
+
/** GitHub OAuth (classic app). Tokens are long-lived and do not refresh. Authorize scopes are space-delimited. */
|
|
13
|
+
export declare const github: ProviderManifest;
|
|
14
|
+
/** Slack (OAuth v2). Bot tokens are long-lived; scopes are COMMA-delimited. */
|
|
15
|
+
export declare const slack: ProviderManifest;
|
|
16
|
+
/** Notion. Scopes are integration-level (none in the request); client credentials go via HTTP Basic. */
|
|
17
|
+
export declare const notion: ProviderManifest;
|
|
18
|
+
/** HubSpot CRM. Supports the refresh-token grant. */
|
|
19
|
+
export declare const hubspot: ProviderManifest;
|
|
20
|
+
/** Atlassian (Jira / Confluence). PKCE + `offline_access` for refresh; `audience` names the API. */
|
|
21
|
+
export declare const atlassian: ProviderManifest;
|
|
22
|
+
/** Salesforce. Refresh-token grant; `refresh_token`/`offline_access` scopes enable it. */
|
|
23
|
+
export declare const salesforce: ProviderManifest;
|
|
24
|
+
/** Microsoft Graph (identity platform v2). `offline_access` yields a refresh token. */
|
|
25
|
+
export declare const microsoft: ProviderManifest;
|
|
26
|
+
/** Shopify Admin. Per-shop host via the `{shop}` placeholder; scopes are COMMA-delimited. */
|
|
27
|
+
export declare const shopify: ProviderManifest;
|
|
28
|
+
/** Snowflake (OAuth). Per-account host via the `{account}` placeholder; refresh-token grant. */
|
|
29
|
+
export declare const snowflake: ProviderManifest;
|
|
30
|
+
/** Linear. Long-lived tokens (no refresh); scopes are COMMA-delimited. */
|
|
31
|
+
export declare const linear: ProviderManifest;
|
|
32
|
+
/** Zoom. Access tokens expire hourly; refresh-token grant with HTTP Basic client auth. */
|
|
33
|
+
export declare const zoom: ProviderManifest;
|
|
34
|
+
/** Stripe Connect (OAuth). Refresh-token grant; `read_only` is least-privilege. */
|
|
35
|
+
export declare const stripe: ProviderManifest;
|
|
36
|
+
/** Dropbox. `token_access_type=offline` yields a refresh token; PKCE-capable. */
|
|
37
|
+
export declare const dropbox: ProviderManifest;
|
|
38
|
+
/** Airtable. PKCE is REQUIRED; refresh-token grant. */
|
|
39
|
+
export declare const airtable: ProviderManifest;
|
|
40
|
+
/** The full seeded catalog, in a stable order. */
|
|
41
|
+
export declare const BUILTIN_MANIFESTS: readonly ProviderManifest[];
|