@opengeni/api-router 6.8.0 → 6.9.1-canary.41937124785001
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/app.js +1 -1
- package/dist/auth/signup-challenge.d.ts +12 -0
- package/dist/billing-auto-top-up.d.ts +33 -0
- package/dist/{chunk-A2VKA7K3.js → chunk-XHNCHFTH.js} +2067 -1252
- package/dist/{chunk-A2VKA7K3.js.map → chunk-XHNCHFTH.js.map} +1 -1
- package/dist/codex-realtime.d.ts +28 -2
- package/dist/index.js +1 -1
- package/dist/mcp/scheduled-task-input.d.ts +6 -0
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/session-view.d.ts +1 -0
- package/dist/mcp/transport.d.ts +9 -0
- package/dist/meeting-calendar-title.d.ts +63 -6
- package/dist/meeting-join-links.d.ts +11 -0
- package/dist/routes/billing-auto-top-up.d.ts +8 -0
- package/dist/routes/billing.d.ts +4 -0
- package/package.json +29 -28
- package/src/app.ts +38 -7
- package/src/auth/managed-auth.ts +3 -1
- package/src/auth/signup-challenge.test.ts +57 -0
- package/src/auth/signup-challenge.ts +33 -0
- package/src/billing-auto-top-up.ts +551 -0
- package/src/claude-subscription-oauth.ts +5 -1
- package/src/claude-subscription-profile.ts +10 -8
- package/src/codex-realtime.ts +44 -1
- package/src/http/api-error.ts +22 -1
- package/src/integrations/slack-agent-proposals.ts +7 -7
- package/src/integrations/slack-agents.ts +28 -21
- package/src/integrations/slack-interactions.ts +1 -1
- package/src/integrations/slack-request-text.ts +1 -4
- package/src/mcp/action-schema-imports.gen.ts +4 -0
- package/src/mcp/secret-tools.ts +1 -1
- package/src/mcp/server.ts +32 -85
- package/src/mcp/transport.ts +21 -0
- package/src/meeting-calendar-title.ts +227 -35
- package/src/meeting-join-links.ts +95 -0
- package/src/model-calls/service.ts +18 -3
- package/src/routes/billing-auto-top-up.ts +161 -0
- package/src/routes/billing.ts +26 -6
- package/src/routes/documents.ts +3 -3
- package/src/routes/files.ts +3 -3
- package/src/routes/managed-auth-session-sets.ts +16 -5
- package/src/routes/recordings.ts +68 -15
- package/src/routes/sessions.ts +10 -2
- package/src/routes/site-runtime.ts +2 -0
- package/src/routes/transcriptions.ts +13 -8
- package/src/routes/workspaces.ts +20 -0
- package/src/site-publishing/agent-session.ts +1 -0
package/dist/app.js
CHANGED
|
@@ -5,3 +5,15 @@ export declare function requireSignupChallenge(settings: Settings): void;
|
|
|
5
5
|
export declare function oauthSignupChallengeVerified(value: string, provider: string, now?: number): boolean;
|
|
6
6
|
/** Cloudflare consumes tokens globally, so concurrent replicas cannot reuse a pass. */
|
|
7
7
|
export declare function verifySignupChallenge(settings: Settings, token: unknown, fetcher?: typeof fetch): Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* A Google or GitHub start may turn out to be a sign-in, which needs no
|
|
10
|
+
* challenge, so a token that can't be verified must not refuse it. The start
|
|
11
|
+
* then carries no proof, and the user-create hook still refuses a new account.
|
|
12
|
+
* `onUnverified` receives the refusal's code (`SIGNUP_CHALLENGE_FAILED`,
|
|
13
|
+
* `SIGNUP_CHALLENGE_UNAVAILABLE` or `SIGNUP_CHALLENGE_REQUIRED`) so a broken
|
|
14
|
+
* configuration or provider outage stays visible to operators.
|
|
15
|
+
*/
|
|
16
|
+
export declare function verifySocialSignupChallenge(settings: Settings, token: unknown, options?: {
|
|
17
|
+
fetcher?: typeof fetch;
|
|
18
|
+
onUnverified?: (code: string) => void;
|
|
19
|
+
}): Promise<boolean>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import Stripe from "stripe";
|
|
2
|
+
import type { BillingAutoTopUpSettings } from "@opengeni/contracts";
|
|
3
|
+
import { type AutoTopUpIntent, type AutoTopUpOperation, type AutoTopUpSettingsRow, type AutoTopUpStore } from "@opengeni/db";
|
|
4
|
+
export type AutoTopUpDecision = "off" | "payment_method_required" | "payment_failed" | "processing" | "cap_reached" | "ready";
|
|
5
|
+
export declare function decideAutoTopUp(input: {
|
|
6
|
+
settings: AutoTopUpSettingsRow | null;
|
|
7
|
+
pending: boolean;
|
|
8
|
+
spent: number;
|
|
9
|
+
chargeMicros?: number;
|
|
10
|
+
}): AutoTopUpDecision;
|
|
11
|
+
export declare function autoTopUpPaymentMetadata(operation: AutoTopUpOperation): Stripe.MetadataParam;
|
|
12
|
+
/** No network result grants money until its exact customer, mode, amount, currency,
|
|
13
|
+
* tax quote and immutable operation all match. Never trust webhook ordering. */
|
|
14
|
+
export declare function assertAutoTopUpPayment(operation: AutoTopUpOperation, payment: Stripe.PaymentIntent): void;
|
|
15
|
+
export declare class StripeAutoTopUps {
|
|
16
|
+
private readonly stripe;
|
|
17
|
+
private readonly store;
|
|
18
|
+
private readonly options;
|
|
19
|
+
constructor(stripe: Stripe, store: AutoTopUpStore, options: {
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
provider: AutoTopUpIntent["provider"];
|
|
22
|
+
creditsProductId?: string;
|
|
23
|
+
});
|
|
24
|
+
settings(accountId: string): Promise<BillingAutoTopUpSettings>;
|
|
25
|
+
/** Bounded one-operation pass. The caller's maintenance scheduler supplies account
|
|
26
|
+
* IDs; an advisory discovery result never grants consent or payment authority. */
|
|
27
|
+
process(accountId: string): Promise<void>;
|
|
28
|
+
private validCustomer;
|
|
29
|
+
private settle;
|
|
30
|
+
private cancel;
|
|
31
|
+
handlePaymentIntent(eventPayment: Stripe.PaymentIntent): Promise<boolean>;
|
|
32
|
+
handleSetup(session: Stripe.Checkout.Session): Promise<boolean>;
|
|
33
|
+
}
|