botshield-sdk 2.2.1 → 2.3.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/README.md +15 -7
- package/bin/mcp-server.js +422 -87
- package/bin/mcp-server.js.map +20 -15
- package/dist/commonjs/funcs/inline-passkey-complete.d.ts +20 -0
- package/dist/commonjs/funcs/inline-passkey-complete.d.ts.map +1 -0
- package/dist/commonjs/funcs/inline-passkey-complete.js +116 -0
- package/dist/commonjs/funcs/inline-passkey-complete.js.map +1 -0
- package/dist/commonjs/funcs/inline-passkey-get-options.d.ts +20 -0
- package/dist/commonjs/funcs/inline-passkey-get-options.d.ts.map +1 -0
- package/dist/commonjs/funcs/inline-passkey-get-options.js +116 -0
- package/dist/commonjs/funcs/inline-passkey-get-options.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +20 -4
- package/dist/commonjs/lib/config.d.ts.map +1 -1
- package/dist/commonjs/lib/config.js +22 -18
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/command.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/command.js +4 -3
- package/dist/commonjs/mcp-server/cli/start/command.js.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.d.ts +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/cli/start/impl.js +2 -2
- package/dist/commonjs/mcp-server/cli/start/impl.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +2 -2
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/models/error-body.d.ts +6 -1
- package/dist/commonjs/models/error-body.d.ts.map +1 -1
- package/dist/commonjs/models/error-body.js +2 -0
- package/dist/commonjs/models/error-body.js.map +1 -1
- package/dist/commonjs/models/gate-human-verified-event.d.ts +93 -0
- package/dist/commonjs/models/gate-human-verified-event.d.ts.map +1 -0
- package/dist/commonjs/models/gate-human-verified-event.js +119 -0
- package/dist/commonjs/models/gate-human-verified-event.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +3 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +3 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/inline-passkey-assertion.d.ts +66 -0
- package/dist/commonjs/models/inline-passkey-assertion.d.ts.map +1 -0
- package/dist/commonjs/models/inline-passkey-assertion.js +98 -0
- package/dist/commonjs/models/inline-passkey-assertion.js.map +1 -0
- package/dist/commonjs/models/inline-passkey-request-options.d.ts +78 -0
- package/dist/commonjs/models/inline-passkey-request-options.d.ts.map +1 -0
- package/dist/commonjs/models/inline-passkey-request-options.js +107 -0
- package/dist/commonjs/models/inline-passkey-request-options.js.map +1 -0
- package/dist/commonjs/models/operations/gates-api-actions-request-status.d.ts +7 -1
- package/dist/commonjs/models/operations/gates-api-actions-request-status.d.ts.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-request-status.js.map +1 -1
- package/dist/commonjs/models/operations/gates-api-actions-request.d.ts +1 -1
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/request-passkey-complete.d.ts +107 -0
- package/dist/commonjs/models/operations/request-passkey-complete.d.ts.map +1 -0
- package/dist/commonjs/models/operations/request-passkey-complete.js +141 -0
- package/dist/commonjs/models/operations/request-passkey-complete.js.map +1 -0
- package/dist/commonjs/models/operations/request-passkey-options.d.ts +178 -0
- package/dist/commonjs/models/operations/request-passkey-options.d.ts.map +1 -0
- package/dist/commonjs/models/operations/request-passkey-options.js +193 -0
- package/dist/commonjs/models/operations/request-passkey-options.js.map +1 -0
- package/dist/commonjs/models/operations/verification-get-status.d.ts +47 -20
- package/dist/commonjs/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/commonjs/models/operations/verification-get-status.js +38 -17
- package/dist/commonjs/models/operations/verification-get-status.js.map +1 -1
- package/dist/commonjs/sdk/inline-passkey.d.ts +23 -0
- package/dist/commonjs/sdk/inline-passkey.d.ts.map +1 -0
- package/dist/commonjs/sdk/inline-passkey.js +36 -0
- package/dist/commonjs/sdk/inline-passkey.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +5 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/inline-passkey-complete.d.ts +20 -0
- package/dist/esm/funcs/inline-passkey-complete.d.ts.map +1 -0
- package/dist/esm/funcs/inline-passkey-complete.js +80 -0
- package/dist/esm/funcs/inline-passkey-complete.js.map +1 -0
- package/dist/esm/funcs/inline-passkey-get-options.d.ts +20 -0
- package/dist/esm/funcs/inline-passkey-get-options.d.ts.map +1 -0
- package/dist/esm/funcs/inline-passkey-get-options.js +80 -0
- package/dist/esm/funcs/inline-passkey-get-options.js.map +1 -0
- package/dist/esm/lib/config.d.ts +20 -4
- package/dist/esm/lib/config.d.ts.map +1 -1
- package/dist/esm/lib/config.js +21 -17
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/mcp-server/cli/start/command.d.ts.map +1 -1
- package/dist/esm/mcp-server/cli/start/command.js +5 -4
- package/dist/esm/mcp-server/cli/start/command.js.map +1 -1
- package/dist/esm/mcp-server/cli/start/impl.d.ts +1 -1
- package/dist/esm/mcp-server/cli/start/impl.d.ts.map +1 -1
- package/dist/esm/mcp-server/cli/start/impl.js +2 -2
- package/dist/esm/mcp-server/cli/start/impl.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +2 -2
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/models/error-body.d.ts +6 -1
- package/dist/esm/models/error-body.d.ts.map +1 -1
- package/dist/esm/models/error-body.js +2 -0
- package/dist/esm/models/error-body.js.map +1 -1
- package/dist/esm/models/gate-human-verified-event.d.ts +93 -0
- package/dist/esm/models/gate-human-verified-event.d.ts.map +1 -0
- package/dist/esm/models/gate-human-verified-event.js +81 -0
- package/dist/esm/models/gate-human-verified-event.js.map +1 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +3 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/inline-passkey-assertion.d.ts +66 -0
- package/dist/esm/models/inline-passkey-assertion.d.ts.map +1 -0
- package/dist/esm/models/inline-passkey-assertion.js +58 -0
- package/dist/esm/models/inline-passkey-assertion.js.map +1 -0
- package/dist/esm/models/inline-passkey-request-options.d.ts +78 -0
- package/dist/esm/models/inline-passkey-request-options.d.ts.map +1 -0
- package/dist/esm/models/inline-passkey-request-options.js +67 -0
- package/dist/esm/models/inline-passkey-request-options.js.map +1 -0
- package/dist/esm/models/operations/gates-api-actions-request-status.d.ts +7 -1
- package/dist/esm/models/operations/gates-api-actions-request-status.d.ts.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-request-status.js.map +1 -1
- package/dist/esm/models/operations/gates-api-actions-request.d.ts +1 -1
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/request-passkey-complete.d.ts +107 -0
- package/dist/esm/models/operations/request-passkey-complete.d.ts.map +1 -0
- package/dist/esm/models/operations/request-passkey-complete.js +97 -0
- package/dist/esm/models/operations/request-passkey-complete.js.map +1 -0
- package/dist/esm/models/operations/request-passkey-options.d.ts +178 -0
- package/dist/esm/models/operations/request-passkey-options.d.ts.map +1 -0
- package/dist/esm/models/operations/request-passkey-options.js +149 -0
- package/dist/esm/models/operations/request-passkey-options.js.map +1 -0
- package/dist/esm/models/operations/verification-get-status.d.ts +47 -20
- package/dist/esm/models/operations/verification-get-status.d.ts.map +1 -1
- package/dist/esm/models/operations/verification-get-status.js +37 -16
- package/dist/esm/models/operations/verification-get-status.js.map +1 -1
- package/dist/esm/sdk/inline-passkey.d.ts +23 -0
- package/dist/esm/sdk/inline-passkey.d.ts.map +1 -0
- package/dist/esm/sdk/inline-passkey.js +32 -0
- package/dist/esm/sdk/inline-passkey.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +5 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/inline-passkey-complete.ts +172 -0
- package/src/funcs/inline-passkey-get-options.ts +172 -0
- package/src/lib/config.ts +22 -18
- package/src/mcp-server/cli/start/command.ts +5 -4
- package/src/mcp-server/cli/start/impl.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -3
- package/src/models/error-body.ts +8 -1
- package/src/models/gate-human-verified-event.ts +181 -0
- package/src/models/index.ts +3 -0
- package/src/models/inline-passkey-assertion.ts +147 -0
- package/src/models/inline-passkey-request-options.ts +175 -0
- package/src/models/operations/gates-api-actions-request-status.ts +7 -1
- package/src/models/operations/gates-api-actions-request.ts +1 -1
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/request-passkey-complete.ts +272 -0
- package/src/models/operations/request-passkey-options.ts +372 -0
- package/src/models/operations/verification-get-status.ts +85 -34
- package/src/sdk/inline-passkey.ts +49 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -59,23 +59,6 @@ export type Metadata = {
|
|
|
59
59
|
parentRequestId?: string | null | undefined;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
/**
|
|
63
|
-
* Why a request ended `failed`. Null while pending and on success. `already_trusted`: this BotShield ID already secures another account on your platform. `rebind_requires_prior_id`: this account is already secured by another BotShield ID. `pass_limit_reached`: the person has used the passes the gate allows. `real_days_not_met`: the BotShield ID has not yet proved a person on as many days as the gate asks. `unavailable`: the standard Unavailable result.
|
|
64
|
-
*/
|
|
65
|
-
export const VerificationGetStatusReason = {
|
|
66
|
-
AlreadyTrusted: "already_trusted",
|
|
67
|
-
RebindRequiresPriorId: "rebind_requires_prior_id",
|
|
68
|
-
PassLimitReached: "pass_limit_reached",
|
|
69
|
-
RealDaysNotMet: "real_days_not_met",
|
|
70
|
-
Unavailable: "unavailable",
|
|
71
|
-
} as const;
|
|
72
|
-
/**
|
|
73
|
-
* Why a request ended `failed`. Null while pending and on success. `already_trusted`: this BotShield ID already secures another account on your platform. `rebind_requires_prior_id`: this account is already secured by another BotShield ID. `pass_limit_reached`: the person has used the passes the gate allows. `real_days_not_met`: the BotShield ID has not yet proved a person on as many days as the gate asks. `unavailable`: the standard Unavailable result.
|
|
74
|
-
*/
|
|
75
|
-
export type VerificationGetStatusReason = OpenEnum<
|
|
76
|
-
typeof VerificationGetStatusReason
|
|
77
|
-
>;
|
|
78
|
-
|
|
79
62
|
export const VerificationGetStatusPreset = {
|
|
80
63
|
Presale: "presale",
|
|
81
64
|
Promo: "promo",
|
|
@@ -169,6 +152,20 @@ export type VerificationGetStatusAction = {
|
|
|
169
152
|
linked: boolean | null;
|
|
170
153
|
};
|
|
171
154
|
|
|
155
|
+
/**
|
|
156
|
+
* The gate kind this request runs. `human` on every non-gate request.
|
|
157
|
+
*/
|
|
158
|
+
export const VerificationGetStatusGateType = {
|
|
159
|
+
Human: "human",
|
|
160
|
+
Age: "age",
|
|
161
|
+
} as const;
|
|
162
|
+
/**
|
|
163
|
+
* The gate kind this request runs. `human` on every non-gate request.
|
|
164
|
+
*/
|
|
165
|
+
export type VerificationGetStatusGateType = OpenEnum<
|
|
166
|
+
typeof VerificationGetStatusGateType
|
|
167
|
+
>;
|
|
168
|
+
|
|
172
169
|
export type VerificationGetStatusData = {
|
|
173
170
|
found?: boolean | undefined;
|
|
174
171
|
/**
|
|
@@ -202,9 +199,9 @@ export type VerificationGetStatusData = {
|
|
|
202
199
|
*/
|
|
203
200
|
error?: models.ErrorBody | undefined;
|
|
204
201
|
/**
|
|
205
|
-
* Why a request ended `failed`. Null while pending and on success. `already_trusted`: this BotShield ID already secures another account on your platform. `rebind_requires_prior_id`: this account is already secured by another BotShield ID. `pass_limit_reached`: the person has used the passes the gate allows. `real_days_not_met`: the BotShield ID has not yet proved a person on as many days as the gate asks. `unavailable`: the standard Unavailable result.
|
|
202
|
+
* Why a request ended `failed`. Null while pending and on success. An open set — treat unknown values as `unavailable`. `already_trusted`: this BotShield ID already secures another account on your platform. `rebind_requires_prior_id`: this account is already secured by another BotShield ID. `pass_limit_reached`: the person has used the passes the gate allows. `real_days_not_met`: the BotShield ID has not yet proved a person on as many days as the gate asks. `gate_not_open`, `signup_required`, `link_requires_user_ref`: the gate's policy refused. `action_off`: the BotShield Action was turned off mid-tap. `action_requires_user_ref`: an action request without a linking ceremony. `unavailable`: the standard Unavailable result.
|
|
206
203
|
*/
|
|
207
|
-
reason?:
|
|
204
|
+
reason?: string | null | undefined;
|
|
208
205
|
/**
|
|
209
206
|
* GA 3.0: on a completed ceremony, whether an active Secured Account binding exists for (your platform, platform-user-ref). Null until completed.
|
|
210
207
|
*/
|
|
@@ -229,6 +226,30 @@ export type VerificationGetStatusData = {
|
|
|
229
226
|
* BotShield Actions: what this tap confirms. Null on every non-action request. The `act` string itself is never shown here.
|
|
230
227
|
*/
|
|
231
228
|
action?: VerificationGetStatusAction | null | undefined;
|
|
229
|
+
/**
|
|
230
|
+
* Your organization's mark (logo) URL, if set.
|
|
231
|
+
*/
|
|
232
|
+
organizationMarkUrl?: string | null | undefined;
|
|
233
|
+
/**
|
|
234
|
+
* Number matching: the number the screen shows once the phone has scanned, while the request waits for the person's pick. Null otherwise.
|
|
235
|
+
*/
|
|
236
|
+
matchNumber?: number | null | undefined;
|
|
237
|
+
/**
|
|
238
|
+
* The gate kind this request runs. `human` on every non-gate request.
|
|
239
|
+
*/
|
|
240
|
+
gateType?: VerificationGetStatusGateType | undefined;
|
|
241
|
+
/**
|
|
242
|
+
* Age Gate only: the threshold asked (13, 18 or 21).
|
|
243
|
+
*/
|
|
244
|
+
ageThreshold?: number | null | undefined;
|
|
245
|
+
/**
|
|
246
|
+
* Age Gate only, once completed. Positive-only: `over_<n>` or `unavailable`.
|
|
247
|
+
*/
|
|
248
|
+
ageVerdict?: string | null | undefined;
|
|
249
|
+
/**
|
|
250
|
+
* Age Gate only, once completed: where the age answer came from.
|
|
251
|
+
*/
|
|
252
|
+
ageSource?: string | null | undefined;
|
|
232
253
|
};
|
|
233
254
|
|
|
234
255
|
/**
|
|
@@ -416,19 +437,6 @@ export function metadataFromJSON(
|
|
|
416
437
|
);
|
|
417
438
|
}
|
|
418
439
|
|
|
419
|
-
/** @internal */
|
|
420
|
-
export const VerificationGetStatusReason$inboundSchema: z.ZodType<
|
|
421
|
-
VerificationGetStatusReason,
|
|
422
|
-
z.ZodTypeDef,
|
|
423
|
-
unknown
|
|
424
|
-
> = openEnums.inboundSchema(VerificationGetStatusReason);
|
|
425
|
-
/** @internal */
|
|
426
|
-
export const VerificationGetStatusReason$outboundSchema: z.ZodType<
|
|
427
|
-
string,
|
|
428
|
-
z.ZodTypeDef,
|
|
429
|
-
VerificationGetStatusReason
|
|
430
|
-
> = openEnums.outboundSchema(VerificationGetStatusReason);
|
|
431
|
-
|
|
432
440
|
/** @internal */
|
|
433
441
|
export const VerificationGetStatusPreset$inboundSchema: z.ZodType<
|
|
434
442
|
VerificationGetStatusPreset,
|
|
@@ -601,6 +609,19 @@ export function verificationGetStatusActionFromJSON(
|
|
|
601
609
|
);
|
|
602
610
|
}
|
|
603
611
|
|
|
612
|
+
/** @internal */
|
|
613
|
+
export const VerificationGetStatusGateType$inboundSchema: z.ZodType<
|
|
614
|
+
VerificationGetStatusGateType,
|
|
615
|
+
z.ZodTypeDef,
|
|
616
|
+
unknown
|
|
617
|
+
> = openEnums.inboundSchema(VerificationGetStatusGateType);
|
|
618
|
+
/** @internal */
|
|
619
|
+
export const VerificationGetStatusGateType$outboundSchema: z.ZodType<
|
|
620
|
+
string,
|
|
621
|
+
z.ZodTypeDef,
|
|
622
|
+
VerificationGetStatusGateType
|
|
623
|
+
> = openEnums.outboundSchema(VerificationGetStatusGateType);
|
|
624
|
+
|
|
604
625
|
/** @internal */
|
|
605
626
|
export const VerificationGetStatusData$inboundSchema: z.ZodType<
|
|
606
627
|
VerificationGetStatusData,
|
|
@@ -623,7 +644,7 @@ export const VerificationGetStatusData$inboundSchema: z.ZodType<
|
|
|
623
644
|
metadata: z.nullable(z.lazy(() => Metadata$inboundSchema)).optional(),
|
|
624
645
|
message: types.optional(types.string()),
|
|
625
646
|
error: types.optional(models.ErrorBody$inboundSchema),
|
|
626
|
-
reason: z.nullable(
|
|
647
|
+
reason: z.nullable(types.string()).optional(),
|
|
627
648
|
trusted: z.nullable(types.boolean()).optional(),
|
|
628
649
|
first_time: z.nullable(types.boolean()).optional(),
|
|
629
650
|
notarize: types.optional(types.boolean()),
|
|
@@ -631,6 +652,12 @@ export const VerificationGetStatusData$inboundSchema: z.ZodType<
|
|
|
631
652
|
gate: z.nullable(z.lazy(() => Gate$inboundSchema)).optional(),
|
|
632
653
|
action: z.nullable(z.lazy(() => VerificationGetStatusAction$inboundSchema))
|
|
633
654
|
.optional(),
|
|
655
|
+
organization_mark_url: z.nullable(types.string()).optional(),
|
|
656
|
+
match_number: z.nullable(types.number()).optional(),
|
|
657
|
+
gate_type: types.optional(VerificationGetStatusGateType$inboundSchema),
|
|
658
|
+
age_threshold: z.nullable(types.number()).optional(),
|
|
659
|
+
age_verdict: z.nullable(types.string()).optional(),
|
|
660
|
+
age_source: z.nullable(types.string()).optional(),
|
|
634
661
|
}).transform((v) => {
|
|
635
662
|
return remap$(v, {
|
|
636
663
|
"request_id": "requestId",
|
|
@@ -645,6 +672,12 @@ export const VerificationGetStatusData$inboundSchema: z.ZodType<
|
|
|
645
672
|
"presence_address": "presenceAddress",
|
|
646
673
|
"first_time": "firstTime",
|
|
647
674
|
"organization_name": "organizationName",
|
|
675
|
+
"organization_mark_url": "organizationMarkUrl",
|
|
676
|
+
"match_number": "matchNumber",
|
|
677
|
+
"gate_type": "gateType",
|
|
678
|
+
"age_threshold": "ageThreshold",
|
|
679
|
+
"age_verdict": "ageVerdict",
|
|
680
|
+
"age_source": "ageSource",
|
|
648
681
|
});
|
|
649
682
|
});
|
|
650
683
|
/** @internal */
|
|
@@ -672,6 +705,12 @@ export type VerificationGetStatusData$Outbound = {
|
|
|
672
705
|
organization_name?: string | null | undefined;
|
|
673
706
|
gate?: Gate$Outbound | null | undefined;
|
|
674
707
|
action?: VerificationGetStatusAction$Outbound | null | undefined;
|
|
708
|
+
organization_mark_url?: string | null | undefined;
|
|
709
|
+
match_number?: number | null | undefined;
|
|
710
|
+
gate_type?: string | undefined;
|
|
711
|
+
age_threshold?: number | null | undefined;
|
|
712
|
+
age_verdict?: string | null | undefined;
|
|
713
|
+
age_source?: string | null | undefined;
|
|
675
714
|
};
|
|
676
715
|
|
|
677
716
|
/** @internal */
|
|
@@ -696,7 +735,7 @@ export const VerificationGetStatusData$outboundSchema: z.ZodType<
|
|
|
696
735
|
metadata: z.nullable(z.lazy(() => Metadata$outboundSchema)).optional(),
|
|
697
736
|
message: z.string().optional(),
|
|
698
737
|
error: models.ErrorBody$outboundSchema.optional(),
|
|
699
|
-
reason: z.nullable(
|
|
738
|
+
reason: z.nullable(z.string()).optional(),
|
|
700
739
|
trusted: z.nullable(z.boolean()).optional(),
|
|
701
740
|
firstTime: z.nullable(z.boolean()).optional(),
|
|
702
741
|
notarize: z.boolean().optional(),
|
|
@@ -704,6 +743,12 @@ export const VerificationGetStatusData$outboundSchema: z.ZodType<
|
|
|
704
743
|
gate: z.nullable(z.lazy(() => Gate$outboundSchema)).optional(),
|
|
705
744
|
action: z.nullable(z.lazy(() => VerificationGetStatusAction$outboundSchema))
|
|
706
745
|
.optional(),
|
|
746
|
+
organizationMarkUrl: z.nullable(z.string()).optional(),
|
|
747
|
+
matchNumber: z.nullable(z.number().int()).optional(),
|
|
748
|
+
gateType: VerificationGetStatusGateType$outboundSchema.optional(),
|
|
749
|
+
ageThreshold: z.nullable(z.number().int()).optional(),
|
|
750
|
+
ageVerdict: z.nullable(z.string()).optional(),
|
|
751
|
+
ageSource: z.nullable(z.string()).optional(),
|
|
707
752
|
}).transform((v) => {
|
|
708
753
|
return remap$(v, {
|
|
709
754
|
requestId: "request_id",
|
|
@@ -718,6 +763,12 @@ export const VerificationGetStatusData$outboundSchema: z.ZodType<
|
|
|
718
763
|
presenceAddress: "presence_address",
|
|
719
764
|
firstTime: "first_time",
|
|
720
765
|
organizationName: "organization_name",
|
|
766
|
+
organizationMarkUrl: "organization_mark_url",
|
|
767
|
+
matchNumber: "match_number",
|
|
768
|
+
gateType: "gate_type",
|
|
769
|
+
ageThreshold: "age_threshold",
|
|
770
|
+
ageVerdict: "age_verdict",
|
|
771
|
+
ageSource: "age_source",
|
|
721
772
|
});
|
|
722
773
|
});
|
|
723
774
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { inlinePasskeyComplete } from "../funcs/inline-passkey-complete.js";
|
|
6
|
+
import { inlinePasskeyGetOptions } from "../funcs/inline-passkey-get-options.js";
|
|
7
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
10
|
+
|
|
11
|
+
export class InlinePasskey extends ClientSDK {
|
|
12
|
+
/**
|
|
13
|
+
* Start the inline passkey for one request
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Partner inline lane, step 1. Returns WebAuthn request options whose `allowCredentials` are the passkeys of the ONE BotShield ID this request is for (the id it was issued for, else the active link for its `partner_user_ref`), or the app fallback. Public — no API key; the request_id is the credential. Works for gate requests and BotShield Action requests (`act`); refuses an Age Gate.
|
|
17
|
+
*
|
|
18
|
+
* Wire: HTTP 200 with the result at `data.data`; a refusal at `data.error`.
|
|
19
|
+
*/
|
|
20
|
+
async getOptions(
|
|
21
|
+
request: operations.RequestPasskeyOptionsRequest,
|
|
22
|
+
options?: RequestOptions,
|
|
23
|
+
): Promise<operations.RequestPasskeyOptionsResponse> {
|
|
24
|
+
return unwrapAsync(inlinePasskeyGetOptions(
|
|
25
|
+
this,
|
|
26
|
+
request,
|
|
27
|
+
options,
|
|
28
|
+
));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Finish the inline passkey for one request
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* Partner inline lane, step 2. Verifies the assertion against the challenge bound to THIS request and its one BotShield ID (user verification required), then runs the same completion as the BotShield app (token minted, partner webhook, gate / act events). Returns `{ outcome, code? }` only. The challenge is single use and is burned on every path.
|
|
36
|
+
*
|
|
37
|
+
* Wire: HTTP 200 with the result at `data.data`; a refusal at `data.error`.
|
|
38
|
+
*/
|
|
39
|
+
async complete(
|
|
40
|
+
request: operations.RequestPasskeyCompleteRequest,
|
|
41
|
+
options?: RequestOptions,
|
|
42
|
+
): Promise<operations.RequestPasskeyCompleteResponse> {
|
|
43
|
+
return unwrapAsync(inlinePasskeyComplete(
|
|
44
|
+
this,
|
|
45
|
+
request,
|
|
46
|
+
options,
|
|
47
|
+
));
|
|
48
|
+
}
|
|
49
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { ClientSDK } from "../lib/sdks.js";
|
|
|
6
6
|
import { Actions } from "./actions.js";
|
|
7
7
|
import { Census } from "./census.js";
|
|
8
8
|
import { Gates } from "./gates.js";
|
|
9
|
+
import { InlinePasskey } from "./inline-passkey.js";
|
|
9
10
|
import { SecuredAccounts } from "./secured-accounts.js";
|
|
10
11
|
import { Verification } from "./verification.js";
|
|
11
12
|
|
|
@@ -34,4 +35,9 @@ export class BotShield extends ClientSDK {
|
|
|
34
35
|
get gates(): Gates {
|
|
35
36
|
return (this._gates ??= new Gates(this._options));
|
|
36
37
|
}
|
|
38
|
+
|
|
39
|
+
private _inlinePasskey?: InlinePasskey;
|
|
40
|
+
get inlinePasskey(): InlinePasskey {
|
|
41
|
+
return (this._inlinePasskey ??= new InlinePasskey(this._options));
|
|
42
|
+
}
|
|
37
43
|
}
|