@sekyro/node 0.1.0-rc.5 → 0.1.0-rc.7
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/CHANGELOG.md +20 -0
- package/README.md +132 -5
- package/dist/chunk-O5GJ3YJV.js +1 -0
- package/dist/chunk-TAPXGI3Q.js +1 -0
- package/dist/client-DUMp_I-1.d.cts +1485 -0
- package/dist/client-DUMp_I-1.d.ts +1485 -0
- package/dist/connect/express/index.cjs +1 -0
- package/dist/connect/express/index.d.cts +35 -0
- package/dist/connect/express/index.d.ts +35 -0
- package/dist/connect/express/index.js +1 -0
- package/dist/connect/index.cjs +1 -0
- package/dist/connect/index.d.cts +29 -0
- package/dist/connect/index.d.ts +29 -0
- package/dist/connect/index.js +1 -0
- package/dist/connect/next/index.cjs +1 -0
- package/dist/connect/next/index.d.cts +43 -0
- package/dist/connect/next/index.d.ts +43 -0
- package/dist/connect/next/index.js +1 -0
- package/dist/connector-CMHuC-CU.d.ts +384 -0
- package/dist/connector-D1bhSLBl.d.cts +384 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +107 -1209
- package/dist/index.d.ts +107 -1209
- package/dist/index.js +1 -1
- package/package.json +37 -4
- package/sbom.cdx.json +47 -6
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import { W as WebhookEventType, L as Locale, C as CreatedSession, S as Sekyro, F as FetchLike } from './client-DUMp_I-1.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The Sekyro claim contract and its only state machine, `mergeClaim` (spec
|
|
5
|
+
* 2026-10-29 §4). Pure: no I/O, no `jose`, no `node:` built-ins, so it runs in
|
|
6
|
+
* an edge runtime as well as on Node.
|
|
7
|
+
*/
|
|
8
|
+
/** The claim contract version this SDK writes and reads. @public */
|
|
9
|
+
declare const CLAIM_VERSION = 1;
|
|
10
|
+
/**
|
|
11
|
+
* Security facts a claim can carry: `face_mismatch` (a step-up failed because
|
|
12
|
+
* the face belongs to another subject), `duplicate` (the face matched another
|
|
13
|
+
* subject), `revoked` (the subject was revoked or deleted).
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
type ClaimFlag = "face_mismatch" | "duplicate" | "revoked";
|
|
17
|
+
/**
|
|
18
|
+
* The small object a connector stores on the auth provider's user and the
|
|
19
|
+
* session token carries (spec §4.1). Timestamps are unix seconds. It never
|
|
20
|
+
* carries a name, a document number, a photo, a score or the risk block.
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
interface SekyroClaim {
|
|
24
|
+
/** Contract version; a reader refuses a higher one. */
|
|
25
|
+
v: 1;
|
|
26
|
+
/** The highest level the person proved for this app; `0` after a revocation. */
|
|
27
|
+
level: 0 | 1 | 2 | 3;
|
|
28
|
+
/** The assurance of the session that proved `level` (`none` when it had none). */
|
|
29
|
+
assurance: string;
|
|
30
|
+
/** Unix seconds: when `level` was proved. */
|
|
31
|
+
verified_at: number;
|
|
32
|
+
/** Unix seconds: the latest approved re-check; absent until one ran. */
|
|
33
|
+
rechecked_at?: number;
|
|
34
|
+
/** The session that set `level`. */
|
|
35
|
+
session_id: string;
|
|
36
|
+
/** The Sekyro subject, when known (needed to apply a revocation). */
|
|
37
|
+
subject_id?: string;
|
|
38
|
+
/** The environment the proof comes from. */
|
|
39
|
+
env: "live" | "sandbox";
|
|
40
|
+
/** Sorted and deduplicated; absent when empty. */
|
|
41
|
+
flags?: ClaimFlag[];
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A terminal session result in the shape {@link mergeClaim} reads, built from
|
|
45
|
+
* a verified result token, a webhook or a session view.
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
interface VerificationResultInput {
|
|
49
|
+
sessionId: string;
|
|
50
|
+
outcome: "approved" | "rejected" | "review" | null;
|
|
51
|
+
level: 0 | 1 | 2 | 3 | null;
|
|
52
|
+
assurance: string | null;
|
|
53
|
+
/** ISO 8601. */
|
|
54
|
+
verifiedAt: string;
|
|
55
|
+
env: "live" | "sandbox";
|
|
56
|
+
subjectId?: string;
|
|
57
|
+
reuseMode?: "recheck" | "step_up";
|
|
58
|
+
returning?: boolean;
|
|
59
|
+
subjectConflict?: boolean;
|
|
60
|
+
/** `true` when the session reported at least one duplicate subject. */
|
|
61
|
+
duplicates?: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* What happened, as {@link mergeClaim} sees it. On a revocation or deletion,
|
|
65
|
+
* `userInExternalRefs` is `true` when the event's external references (or the
|
|
66
|
+
* subject's, read with the API key) include this user's id: a stored claim
|
|
67
|
+
* without `subject_id` is revoked only then, otherwise it is `subject_mismatch`.
|
|
68
|
+
* @public
|
|
69
|
+
*/
|
|
70
|
+
type MergeEvent = {
|
|
71
|
+
kind: "result";
|
|
72
|
+
result: VerificationResultInput;
|
|
73
|
+
} | {
|
|
74
|
+
kind: "revoked";
|
|
75
|
+
subjectId: string;
|
|
76
|
+
userInExternalRefs?: boolean;
|
|
77
|
+
} | {
|
|
78
|
+
kind: "deleted";
|
|
79
|
+
subjectId: string;
|
|
80
|
+
userInExternalRefs?: boolean;
|
|
81
|
+
};
|
|
82
|
+
/** The rule {@link mergeClaim} applied. @public */
|
|
83
|
+
type MergeRule = "created" | "raised" | "renewed" | "rechecked" | "face_mismatch" | "revoked" | "revoked_ignored" | "not_approved" | "stale_ignored" | "env_mismatch" | "unsupported_version" | "subject_mismatch" | "no_change";
|
|
84
|
+
/** Result of {@link mergeClaim}: write `claim` only when `changed`. @public */
|
|
85
|
+
interface MergeOutcome {
|
|
86
|
+
claim: SekyroClaim | null;
|
|
87
|
+
changed: boolean;
|
|
88
|
+
rule: MergeRule;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Read a stored or token-carried claim: an object or its JSON string.
|
|
92
|
+
* Returns `null` when the value is not a claim. A claim with a higher
|
|
93
|
+
* version than {@link CLAIM_VERSION} is returned as-is (the caller refuses
|
|
94
|
+
* it); unknown keys and unknown flags of a current claim are dropped.
|
|
95
|
+
* @public
|
|
96
|
+
*/
|
|
97
|
+
declare function parseClaim(value: unknown): SekyroClaim | null;
|
|
98
|
+
/**
|
|
99
|
+
* Apply one event to the stored claim (spec §4.2) and say whether to write.
|
|
100
|
+
* Pure and idempotent: the webhook and the return-URL path converge on one
|
|
101
|
+
* write, a retry is a no-op, an older result never overwrites a newer one, a
|
|
102
|
+
* failed attempt never erases a proof, a weaker proof never lowers the level,
|
|
103
|
+
* a result from another environment is refused, and a revoked claim stays
|
|
104
|
+
* revoked (`revoked_ignored`) until a session of another, known subject
|
|
105
|
+
* proves a level again.
|
|
106
|
+
*
|
|
107
|
+
* @param previous - The stored value (object, JSON string or nothing).
|
|
108
|
+
* @param event - A session result, or a revocation or deletion of a subject.
|
|
109
|
+
* @param opts - `env`: the connector's environment; `now`: epoch milliseconds
|
|
110
|
+
* (used only when a result's `verifiedAt` is not a date).
|
|
111
|
+
* @public
|
|
112
|
+
*/
|
|
113
|
+
declare function mergeClaim(previous: unknown, event: MergeEvent, opts: {
|
|
114
|
+
env: "live" | "sandbox";
|
|
115
|
+
now?: () => number;
|
|
116
|
+
}): MergeOutcome;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The gate: a claim and a policy in, `{ ok }` or a reason and an action out
|
|
120
|
+
* (spec 2026-10-29 §5.3). Pure and framework-free; edge-runtime safe.
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* What a route requires of the person's claim.
|
|
125
|
+
* @public
|
|
126
|
+
*/
|
|
127
|
+
interface GatePolicy {
|
|
128
|
+
/** The lowest level that passes. */
|
|
129
|
+
level: 1 | 2 | 3;
|
|
130
|
+
/** Maximum age of `verified_at`, in days. */
|
|
131
|
+
maxAgeDays?: number;
|
|
132
|
+
/** Maximum age of `rechecked_at` (falling back to `verified_at` when absent), in minutes. */
|
|
133
|
+
maxRecheckAgeMinutes?: number;
|
|
134
|
+
/** The assurances that pass; any when omitted. */
|
|
135
|
+
assurance?: string[];
|
|
136
|
+
/** The environment that passes; any when omitted. */
|
|
137
|
+
env?: "live" | "sandbox";
|
|
138
|
+
/** Flags that block. Default `["revoked", "face_mismatch"]`. */
|
|
139
|
+
denyFlags?: ClaimFlag[];
|
|
140
|
+
}
|
|
141
|
+
/** Why a gate failed. @public */
|
|
142
|
+
type GateReason = "no_claim" | "unsupported_version" | "wrong_env" | "flagged" | "level_too_low" | "stale" | "recheck_stale" | "assurance_not_allowed";
|
|
143
|
+
/**
|
|
144
|
+
* What the app should do about a failed gate: start a verification
|
|
145
|
+
* (`verify`), a step-up (`step_up`), a re-check (`recheck`), or refuse
|
|
146
|
+
* (`block`).
|
|
147
|
+
* @public
|
|
148
|
+
*/
|
|
149
|
+
type GateAction = "verify" | "step_up" | "recheck" | "block";
|
|
150
|
+
/** Result of {@link evaluateGate}. @public */
|
|
151
|
+
type GateResult = {
|
|
152
|
+
ok: true;
|
|
153
|
+
claim: SekyroClaim;
|
|
154
|
+
} | {
|
|
155
|
+
ok: false;
|
|
156
|
+
reason: GateReason;
|
|
157
|
+
action: GateAction;
|
|
158
|
+
claim: SekyroClaim | null;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Check a claim (as read from the session token, an object or its JSON
|
|
162
|
+
* string) against a policy. The checks run in this order: present, version,
|
|
163
|
+
* environment, flags, level, age, re-check age, assurance.
|
|
164
|
+
*
|
|
165
|
+
* @param claim - The claim value, or anything else (`no_claim`).
|
|
166
|
+
* @param policy - What the route requires.
|
|
167
|
+
* @param nowSec - Unix seconds. Default the current time.
|
|
168
|
+
* @public
|
|
169
|
+
*/
|
|
170
|
+
declare function evaluateGate(claim: unknown, policy: GatePolicy, nowSec?: number): GateResult;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The connector's small state: delivery and token ids already handled (a
|
|
174
|
+
* retry is skipped) and, optionally, which user a subject belongs to (to
|
|
175
|
+
* resolve a `subject.deleted` that carries no external references).
|
|
176
|
+
* @public
|
|
177
|
+
*/
|
|
178
|
+
interface ConnectorStore {
|
|
179
|
+
/** Record `id` for `ttlSec`; resolves `true` when it was already recorded (a retry). */
|
|
180
|
+
seen(id: string, ttlSec: number): Promise<boolean>;
|
|
181
|
+
/** Forget a recorded `id` so a retry is handled again; called when handling failed. Optional. */
|
|
182
|
+
forget?(id: string): Promise<void>;
|
|
183
|
+
setSubjectUser?(subjectId: string, userId: string): Promise<void>;
|
|
184
|
+
getSubjectUser?(subjectId: string): Promise<string | undefined>;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* The in-process store of {@link memoryStore}. Its content is lost on restart
|
|
188
|
+
* and not shared between processes; use your own {@link ConnectorStore} (a
|
|
189
|
+
* cache or a table) when you run several instances.
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
192
|
+
interface MemoryStore extends ConnectorStore {
|
|
193
|
+
forget(id: string): Promise<void>;
|
|
194
|
+
setSubjectUser(subjectId: string, userId: string): Promise<void>;
|
|
195
|
+
getSubjectUser(subjectId: string): Promise<string | undefined>;
|
|
196
|
+
/** The number of recorded ids not yet expired. */
|
|
197
|
+
size(): number;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* An in-memory {@link ConnectorStore}, the connector's default. Expired ids
|
|
201
|
+
* are evicted on every call, so it never grows past the ids of one TTL window.
|
|
202
|
+
* @param opts - `now`: a clock returning epoch milliseconds (default `Date.now`).
|
|
203
|
+
* @public
|
|
204
|
+
*/
|
|
205
|
+
declare function memoryStore(opts?: {
|
|
206
|
+
now?: () => number;
|
|
207
|
+
}): MemoryStore;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Where a provider keeps the claim. A provider package (`@sekyro/connect-zitadel`,
|
|
211
|
+
* `@sekyro/connect-supabase`, ...) ships one; any object of this shape works.
|
|
212
|
+
* @public
|
|
213
|
+
*/
|
|
214
|
+
interface ProviderAdapter {
|
|
215
|
+
/** The provider's name, for example `zitadel` or `supabase`. */
|
|
216
|
+
readonly name: string;
|
|
217
|
+
/** The value stored at the provider's claim key for this user, or `null`. */
|
|
218
|
+
readUser(userId: string): Promise<unknown>;
|
|
219
|
+
/** Store the claim at the provider's claim key for this user. */
|
|
220
|
+
writeUser(userId: string, claim: SekyroClaim): Promise<void>;
|
|
221
|
+
/** The value at the provider's claim path inside a decoded session token. */
|
|
222
|
+
readClaimFromToken(tokenClaims: Record<string, unknown>): unknown;
|
|
223
|
+
/**
|
|
224
|
+
* Optional read-merge-write for one user. Read the stored value, call `fn`
|
|
225
|
+
* with it, store `claim` when the outcome is `changed` and `claim` is not
|
|
226
|
+
* `null`, and resolve to the outcome. Make it atomic for the user against
|
|
227
|
+
* every other `update` the adapter can see (a per-user lock, a transaction
|
|
228
|
+
* or a compare-and-set retry; `fn` is pure and may be called again).
|
|
229
|
+
* Without it, the connector serialises `readUser` then `writeUser` per user
|
|
230
|
+
* in this process only.
|
|
231
|
+
*/
|
|
232
|
+
update?(userId: string, fn: (previous: unknown) => MergeOutcome): Promise<MergeOutcome>;
|
|
233
|
+
}
|
|
234
|
+
/** Why a webhook was not written. @public */
|
|
235
|
+
type WebhookSkipReason = "duplicate_delivery" | "ignored_event" | "other_app" | "no_external_ref" | "result_token_required" | "revocation_unresolved" | "env_mismatch" | "unsupported_version" | "stale_ignored" | "not_approved" | "no_change";
|
|
236
|
+
/**
|
|
237
|
+
* Structured events of the connector, for your logger. Ids, enums and rules
|
|
238
|
+
* only: never a claim body, a token, a secret or a return URL.
|
|
239
|
+
* @public
|
|
240
|
+
*/
|
|
241
|
+
type ConnectorLogEvent = {
|
|
242
|
+
type: "write";
|
|
243
|
+
userId: string;
|
|
244
|
+
sessionId?: string;
|
|
245
|
+
rule: MergeRule;
|
|
246
|
+
} | {
|
|
247
|
+
type: "skip";
|
|
248
|
+
reason: WebhookSkipReason;
|
|
249
|
+
sessionId?: string;
|
|
250
|
+
subjectId?: string;
|
|
251
|
+
} | {
|
|
252
|
+
type: "result_token_absent";
|
|
253
|
+
sessionId: string;
|
|
254
|
+
} | {
|
|
255
|
+
type: "revocation_unresolved";
|
|
256
|
+
subjectId: string;
|
|
257
|
+
} | {
|
|
258
|
+
type: "env_mismatch";
|
|
259
|
+
sessionId: string;
|
|
260
|
+
} | {
|
|
261
|
+
type: "flag_cleared";
|
|
262
|
+
userId: string;
|
|
263
|
+
flag: ClaimFlag;
|
|
264
|
+
};
|
|
265
|
+
/** Options of {@link createConnector}. @public */
|
|
266
|
+
interface ConnectorOptions {
|
|
267
|
+
/** A client with this environment's API key. */
|
|
268
|
+
sekyro: Sekyro;
|
|
269
|
+
/** Your app id, or every app id this connector serves. */
|
|
270
|
+
appId: string | string[];
|
|
271
|
+
/** The environment of the API key and webhook secret; a claim from the other one is never written. */
|
|
272
|
+
env: "live" | "sandbox";
|
|
273
|
+
/** The webhook endpoint secret. */
|
|
274
|
+
webhookSecret: string;
|
|
275
|
+
/** Where the claim is stored. */
|
|
276
|
+
provider: ProviderAdapter;
|
|
277
|
+
/** What {@link Connector.userDeleted} does with the person's subjects. Default `ignore`. */
|
|
278
|
+
onUserDeleted?: "ignore" | "revoke" | "delete";
|
|
279
|
+
/** Delivery de-duplication and the subject-to-user map. Default {@link memoryStore}. */
|
|
280
|
+
store?: ConnectorStore;
|
|
281
|
+
/** Refuse to write a terminal webhook without a result token. Default `false`. */
|
|
282
|
+
requireResultToken?: boolean;
|
|
283
|
+
/** Passed to `verifyResultToken`. */
|
|
284
|
+
issuer?: string;
|
|
285
|
+
/** Passed to `verifyResultToken`. */
|
|
286
|
+
jwksUrl?: string;
|
|
287
|
+
/** `fetch` for the result-token key set. Default `globalThis.fetch`. */
|
|
288
|
+
fetch?: FetchLike;
|
|
289
|
+
/** Clock returning epoch milliseconds. Default `Date.now`. */
|
|
290
|
+
now?: () => number;
|
|
291
|
+
/** Receives every {@link ConnectorLogEvent}; the connector never writes to the console. */
|
|
292
|
+
logger?: (event: ConnectorLogEvent) => void;
|
|
293
|
+
}
|
|
294
|
+
/** Result of {@link Connector.webhook}. @public */
|
|
295
|
+
type WebhookOutcome = {
|
|
296
|
+
handled: true;
|
|
297
|
+
event: WebhookEventType;
|
|
298
|
+
userId: string;
|
|
299
|
+
claim: SekyroClaim | null;
|
|
300
|
+
rule: MergeRule;
|
|
301
|
+
} | {
|
|
302
|
+
handled: false;
|
|
303
|
+
event: WebhookEventType | null;
|
|
304
|
+
reason: WebhookSkipReason;
|
|
305
|
+
};
|
|
306
|
+
/** Options of {@link Connector.start}, {@link Connector.recheck} and {@link Connector.stepUp}. @public */
|
|
307
|
+
interface StartOptions {
|
|
308
|
+
/** A flow slug or id; the app's default flow when omitted. */
|
|
309
|
+
flow?: string;
|
|
310
|
+
locale?: Locale;
|
|
311
|
+
/** Where the hosted flow sends the person at the end. */
|
|
312
|
+
returnUrl?: string;
|
|
313
|
+
/** A value you store against the user and check on the return. */
|
|
314
|
+
state?: string;
|
|
315
|
+
ttlMinutes?: number;
|
|
316
|
+
}
|
|
317
|
+
/** The object {@link createConnector} returns. @public */
|
|
318
|
+
interface Connector {
|
|
319
|
+
/** The environment the connector writes claims for. */
|
|
320
|
+
readonly env: "live" | "sandbox";
|
|
321
|
+
/** The app ids whose webhooks and result tokens the connector accepts. */
|
|
322
|
+
readonly appIds: readonly string[];
|
|
323
|
+
/**
|
|
324
|
+
* Verify and apply a Sekyro webhook. Pass the raw body exactly as received.
|
|
325
|
+
* Throws `SekyroWebhookError` (bad signature), `SekyroResultTokenError` (bad
|
|
326
|
+
* token) or {@link SekyroConnectError} (token for another session or user):
|
|
327
|
+
* answer those with a 4xx, except `SekyroConnectError` with code
|
|
328
|
+
* `unavailable` (the key set could not be fetched): answer it with a 503 so
|
|
329
|
+
* Sekyro retries. Answer 2xx once it resolves.
|
|
330
|
+
*/
|
|
331
|
+
webhook(rawBody: string, headers: Headers | Record<string, string | string[] | undefined>): Promise<WebhookOutcome>;
|
|
332
|
+
/**
|
|
333
|
+
* The return-URL path: read the session and its signed result token with
|
|
334
|
+
* the API key, verify the token (audience = your app ids, environment) and
|
|
335
|
+
* apply it. A session created without an app or for another app is refused
|
|
336
|
+
* (`SekyroResultTokenError` `wrong_audience`), as is a session of another
|
|
337
|
+
* user ({@link SekyroConnectError} `external_ref_mismatch`). Check your
|
|
338
|
+
* `state` first: store the session id with the state when you create the
|
|
339
|
+
* session, and compare both on the return.
|
|
340
|
+
*/
|
|
341
|
+
sync(userId: string, sessionId: string): Promise<{
|
|
342
|
+
claim: SekyroClaim | null;
|
|
343
|
+
rule: MergeRule;
|
|
344
|
+
}>;
|
|
345
|
+
/** Create a verification session for your user (`subject.externalRef` = `userId`). */
|
|
346
|
+
start(userId: string, opts?: StartOptions): Promise<CreatedSession>;
|
|
347
|
+
/** Create a re-check session for your user's subject. */
|
|
348
|
+
recheck(userId: string, opts?: Omit<StartOptions, "flow">): Promise<CreatedSession>;
|
|
349
|
+
/** Create a step-up session for your user's subject with an identity flow. */
|
|
350
|
+
stepUp(userId: string, opts: StartOptions & {
|
|
351
|
+
flow: string;
|
|
352
|
+
}): Promise<CreatedSession>;
|
|
353
|
+
/** Your app deleted the user: apply the `onUserDeleted` policy to the person's subjects. */
|
|
354
|
+
userDeleted(userId: string): Promise<{
|
|
355
|
+
policy: "ignore" | "revoke" | "delete";
|
|
356
|
+
subjects: number;
|
|
357
|
+
}>;
|
|
358
|
+
/** The stored claim, read from the provider (no token lag). */
|
|
359
|
+
claimOf(userId: string): Promise<SekyroClaim | null>;
|
|
360
|
+
/** Remove a flag from the stored claim (for example after a manual review of a `face_mismatch`). */
|
|
361
|
+
clearFlag(userId: string, flag: ClaimFlag): Promise<SekyroClaim | null>;
|
|
362
|
+
/** Check a decoded session token against a policy; `env` defaults to the connector's. */
|
|
363
|
+
gate(tokenClaims: Record<string, unknown>, policy: GatePolicy): GateResult;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Tie Sekyro to an auth provider: verified webhooks and return-URL reads
|
|
367
|
+
* become one idempotent claim write on the provider's user, and the gate
|
|
368
|
+
* reads that claim from the session token.
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* ```ts
|
|
372
|
+
* const connector = createConnector({
|
|
373
|
+
* sekyro: new Sekyro({ apiKey: process.env.SEKYRO_API_KEY! }),
|
|
374
|
+
* appId: process.env.SEKYRO_APP_ID!,
|
|
375
|
+
* env: "live",
|
|
376
|
+
* webhookSecret: process.env.SEKYRO_WEBHOOK_SECRET!,
|
|
377
|
+
* provider,
|
|
378
|
+
* });
|
|
379
|
+
* ```
|
|
380
|
+
* @public
|
|
381
|
+
*/
|
|
382
|
+
declare function createConnector(opts: ConnectorOptions): Connector;
|
|
383
|
+
|
|
384
|
+
export { type Connector as C, type GatePolicy as G, type MemoryStore as M, type ProviderAdapter as P, type SekyroClaim as S, type VerificationResultInput as V, type WebhookOutcome as W, type GateResult as a, CLAIM_VERSION as b, type ClaimFlag as c, type ConnectorLogEvent as d, type ConnectorOptions as e, type ConnectorStore as f, type GateAction as g, type GateReason as h, type MergeEvent as i, type MergeOutcome as j, type MergeRule as k, type StartOptions as l, type WebhookSkipReason as m, createConnector as n, evaluateGate as o, memoryStore as p, mergeClaim as q, parseClaim as r };
|