@lu71/sdk 0.1.0 → 0.1.1
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/api/drizzle.config.d.ts +3 -0
- package/dist/api/drizzle.config.d.ts.map +1 -0
- package/dist/api/src/crypto/sign.d.ts +27 -0
- package/dist/api/src/crypto/sign.d.ts.map +1 -0
- package/dist/api/src/db/index.d.ts +3 -0
- package/dist/api/src/db/index.d.ts.map +1 -0
- package/dist/api/src/db/schema.d.ts +6 -0
- package/dist/api/src/db/schema.d.ts.map +1 -0
- package/dist/api/src/db/seed.d.ts +2 -0
- package/dist/api/src/db/seed.d.ts.map +1 -0
- package/dist/api/src/email.d.ts +9 -0
- package/dist/api/src/email.d.ts.map +1 -0
- package/dist/api/src/evidence/mapper.d.ts +7 -0
- package/dist/api/src/evidence/mapper.d.ts.map +1 -0
- package/dist/api/src/index.d.ts +6 -0
- package/dist/api/src/index.d.ts.map +1 -0
- package/dist/api/src/middleware/auth.d.ts +2 -0
- package/dist/api/src/middleware/auth.d.ts.map +1 -0
- package/dist/api/src/pal/interface.d.ts +11 -0
- package/dist/api/src/pal/interface.d.ts.map +1 -0
- package/dist/api/src/pal/lithic.d.ts +25 -0
- package/dist/api/src/pal/lithic.d.ts.map +1 -0
- package/dist/api/src/pal/router.d.ts +11 -0
- package/dist/api/src/pal/router.d.ts.map +1 -0
- package/dist/api/src/pal/stripe.d.ts +22 -0
- package/dist/api/src/pal/stripe.d.ts.map +1 -0
- package/dist/api/src/routes/billing.d.ts +7 -0
- package/dist/api/src/routes/billing.d.ts.map +1 -0
- package/dist/api/src/routes/connect.d.ts +2 -0
- package/dist/api/src/routes/connect.d.ts.map +1 -0
- package/dist/api/src/routes/index.d.ts +4 -0
- package/dist/api/src/routes/index.d.ts.map +1 -0
- package/dist/api/src/routes/security.d.ts +2 -0
- package/dist/api/src/routes/security.d.ts.map +1 -0
- package/dist/api/src/routes/webhooks.d.ts +2 -0
- package/dist/api/src/routes/webhooks.d.ts.map +1 -0
- package/dist/mcp/src/index.d.ts +2 -0
- package/dist/mcp/src/index.d.ts.map +1 -0
- package/dist/mcp/src/install.d.ts +8 -0
- package/dist/mcp/src/install.d.ts.map +1 -0
- package/dist/sdk/src/index.d.ts +106 -0
- package/dist/sdk/src/index.d.ts.map +1 -0
- package/dist/shared/src/constants.d.ts +10 -0
- package/dist/shared/src/constants.d.ts.map +1 -0
- package/dist/shared/src/index.d.ts +4 -0
- package/dist/shared/src/index.d.ts.map +1 -0
- package/dist/shared/src/messages.d.ts +30 -0
- package/dist/shared/src/messages.d.ts.map +1 -0
- package/dist/shared/src/types.d.ts +153 -0
- package/dist/shared/src/types.d.ts.map +1 -0
- package/dist/web/next.config.d.ts +4 -0
- package/dist/web/next.config.d.ts.map +1 -0
- package/dist/web/src/app/dashboard/page.d.ts +2 -0
- package/dist/web/src/app/dashboard/page.d.ts.map +1 -0
- package/dist/web/src/app/docs/page.d.ts +2 -0
- package/dist/web/src/app/docs/page.d.ts.map +1 -0
- package/dist/web/src/app/forgot-password/page.d.ts +2 -0
- package/dist/web/src/app/forgot-password/page.d.ts.map +1 -0
- package/dist/web/src/app/how-it-works/page.d.ts +2 -0
- package/dist/web/src/app/how-it-works/page.d.ts.map +1 -0
- package/dist/web/src/app/integration/page.d.ts +2 -0
- package/dist/web/src/app/integration/page.d.ts.map +1 -0
- package/dist/web/src/app/layout.d.ts +7 -0
- package/dist/web/src/app/layout.d.ts.map +1 -0
- package/dist/web/src/app/login/page.d.ts +2 -0
- package/dist/web/src/app/login/page.d.ts.map +1 -0
- package/dist/web/src/app/page.d.ts +2 -0
- package/dist/web/src/app/page.d.ts.map +1 -0
- package/dist/web/src/app/pricing/page.d.ts +2 -0
- package/dist/web/src/app/pricing/page.d.ts.map +1 -0
- package/dist/web/src/app/security/page.d.ts +2 -0
- package/dist/web/src/app/security/page.d.ts.map +1 -0
- package/dist/web/src/app/signup/page.d.ts +2 -0
- package/dist/web/src/app/signup/page.d.ts.map +1 -0
- package/dist/web/src/components/code-block.d.ts +10 -0
- package/dist/web/src/components/code-block.d.ts.map +1 -0
- package/dist/web/src/components/nav.d.ts +2 -0
- package/dist/web/src/components/nav.d.ts.map +1 -0
- package/dist/web/src/lib/api.d.ts +12 -0
- package/dist/web/src/lib/api.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drizzle.config.d.ts","sourceRoot":"","sources":["../../../api/drizzle.config.ts"],"names":[],"mappings":";AAEA,wBAOG"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Signs an intent payload. The signature proves:
|
|
3
|
+
* 1. This intent was captured through Lu71 (not fabricated)
|
|
4
|
+
* 2. The content hasn't been tampered with since capture
|
|
5
|
+
* 3. The timestamp proves it was created BEFORE the purchase
|
|
6
|
+
*/
|
|
7
|
+
export declare function signIntent(payload: {
|
|
8
|
+
intentId: string;
|
|
9
|
+
customerId: string;
|
|
10
|
+
description: string;
|
|
11
|
+
maxAmount: number;
|
|
12
|
+
currency: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
}): string;
|
|
15
|
+
/**
|
|
16
|
+
* Verifies a signature matches the intent data.
|
|
17
|
+
* Uses timing-safe comparison to prevent timing attacks.
|
|
18
|
+
*/
|
|
19
|
+
export declare function verifyIntentSignature(signature: string, payload: {
|
|
20
|
+
intentId: string;
|
|
21
|
+
customerId: string;
|
|
22
|
+
description: string;
|
|
23
|
+
maxAmount: number;
|
|
24
|
+
currency: string;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
}): boolean;
|
|
27
|
+
//# sourceMappingURL=sign.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign.d.ts","sourceRoot":"","sources":["../../../../../api/src/crypto/sign.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,MAAM,CAGT;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE;IACP,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,GACA,OAAO,CAOT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../api/src/db/index.ts"],"names":[],"mappings":"AAMA,wBAAgB,KAAK,QAMpB;AAGD,eAAO,MAAM,EAAE,KAIb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../api/src/db/schema.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,KAiBpB,CAAC;AAEH,eAAO,MAAM,OAAO,KAYlB,CAAC;AAEH,eAAO,MAAM,MAAM,KAWjB,CAAC;AAEH,eAAO,MAAM,OAAO,KAWlB,CAAC;AAEH,eAAO,MAAM,QAAQ,KAiBnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../../../../../api/src/db/seed.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function sendVerificationEmail(to: string, code: string): Promise<void>;
|
|
2
|
+
export declare function sendResetPasswordEmail(to: string, code: string): Promise<void>;
|
|
3
|
+
export declare function generateCode(): string;
|
|
4
|
+
export declare function checkResendCooldown(email: string): {
|
|
5
|
+
allowed: boolean;
|
|
6
|
+
waitSeconds: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function recordResend(email: string): void;
|
|
9
|
+
//# sourceMappingURL=email.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../api/src/email.ts"],"names":[],"mappings":"AA4FA,wBAAsB,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,iBAEnE;AAED,wBAAsB,sBAAsB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,iBAEpE;AAED,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAKD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAgB5F;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,QAQzC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PurchaseIntent, DisputeReason, DisputeEvidence, PlatformEvidence } from "@lu71/shared";
|
|
2
|
+
/**
|
|
3
|
+
* Evidence Engine — compiles agent intent + all provided evidence fields
|
|
4
|
+
* into platform-ready dispute evidence that wins chargebacks.
|
|
5
|
+
*/
|
|
6
|
+
export declare function compileEvidence(intent: PurchaseIntent, reason: DisputeReason, evidence: DisputeEvidence): PlatformEvidence;
|
|
7
|
+
//# sourceMappingURL=mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapper.d.ts","sourceRoot":"","sources":["../../../../../api/src/evidence/mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErG;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,aAAa,EACrB,QAAQ,EAAE,eAAe,GACxB,gBAAgB,CAkBlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../api/src/index.ts"],"names":[],"mappings":";;;;AA4MA,wBAA0C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../../api/src/middleware/auth.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,IAAI,KAuCf,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CardConfig, IssuedCard, PlatformDisputeParams, PlatformDisputeResult, DisputeStatus, WebhookEvent } from "@lu71/shared";
|
|
2
|
+
export interface CardPlatform {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
issueCard(config: CardConfig): Promise<IssuedCard>;
|
|
5
|
+
freezeCard(platformCardId: string): Promise<void>;
|
|
6
|
+
fileDispute(params: PlatformDisputeParams): Promise<PlatformDisputeResult>;
|
|
7
|
+
getDisputeStatus(platformDisputeId: string): Promise<DisputeStatus>;
|
|
8
|
+
verifyWebhook(body: string, signature: string): boolean;
|
|
9
|
+
parseWebhook(body: string): WebhookEvent;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../../../../api/src/pal/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,qBAAqB,EACrB,qBAAqB,EACrB,aAAa,EACb,YAAY,EACb,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAGtB,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACnD,UAAU,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAGlD,WAAW,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC3E,gBAAgB,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAGpE,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACxD,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAAC;CAC1C"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { CardPlatform } from "./interface";
|
|
2
|
+
import type { CardConfig, IssuedCard, PlatformDisputeParams, PlatformDisputeResult, DisputeStatus, WebhookEvent } from "@lu71/shared";
|
|
3
|
+
export declare class LithicAdapter implements CardPlatform {
|
|
4
|
+
readonly name = "lithic";
|
|
5
|
+
private apiKey;
|
|
6
|
+
constructor(apiKey?: string);
|
|
7
|
+
private lithic;
|
|
8
|
+
issueCard(config: CardConfig): Promise<IssuedCard>;
|
|
9
|
+
freezeCard(platformCardId: string): Promise<void>;
|
|
10
|
+
fileDispute(params: PlatformDisputeParams): Promise<PlatformDisputeResult>;
|
|
11
|
+
getDisputeStatus(platformDisputeId: string): Promise<DisputeStatus>;
|
|
12
|
+
verifyWebhook(body: string, signature: string): boolean;
|
|
13
|
+
parseWebhook(body: string): WebhookEvent;
|
|
14
|
+
private mapStatus;
|
|
15
|
+
/**
|
|
16
|
+
* Build a comprehensive customer note from all evidence fields.
|
|
17
|
+
* Lithic uses this as the primary text evidence — equivalent to Stripe's per-reason fields.
|
|
18
|
+
*/
|
|
19
|
+
private buildCustomerNote;
|
|
20
|
+
/**
|
|
21
|
+
* Upload evidence to an existing dispute via Lithic's evidence endpoint.
|
|
22
|
+
*/
|
|
23
|
+
private uploadEvidence;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=lithic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lithic.d.ts","sourceRoot":"","sources":["../../../../../api/src/pal/lithic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,qBAAqB,EACrB,qBAAqB,EACrB,aAAa,EACb,YAAY,EACb,MAAM,cAAc,CAAC;AAKtB,qBAAa,aAAc,YAAW,YAAY;IAChD,QAAQ,CAAC,IAAI,YAAY;IACzB,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,CAAC,EAAE,MAAM;YAKb,MAAM;IAad,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAoBlD,UAAU,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOjD,WAAW,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IA6B1E,gBAAgB,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAKzE,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAQvD,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY;IAgBxC,OAAO,CAAC,SAAS;IAYjB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAmCzB;;OAEG;YACW,cAAc;CAgB7B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Platform } from "@lu71/shared";
|
|
2
|
+
import type { CardPlatform } from "./interface";
|
|
3
|
+
/**
|
|
4
|
+
* Creates a platform adapter for a customer's connected account.
|
|
5
|
+
*
|
|
6
|
+
* Stripe: OAuth mode (stripe_account_id → Stripe-Account header, no key stored)
|
|
7
|
+
* Lithic: Restricted key mode (encrypted key stored)
|
|
8
|
+
*/
|
|
9
|
+
export declare function getPlatformForCustomer(platform: Platform, credentials: Record<string, string>): CardPlatform;
|
|
10
|
+
export declare function getDefaultPlatform(geo?: string): Platform;
|
|
11
|
+
//# sourceMappingURL=router.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../../api/src/pal/router.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAClC,YAAY,CAcd;AAED,wBAAgB,kBAAkB,CAAC,GAAG,GAAE,MAAa,GAAG,QAAQ,CAG/D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { CardPlatform } from "./interface";
|
|
2
|
+
import type { CardConfig, IssuedCard, PlatformDisputeParams, PlatformDisputeResult, DisputeStatus, WebhookEvent } from "@lu71/shared";
|
|
3
|
+
export declare class StripeAdapter implements CardPlatform {
|
|
4
|
+
readonly name = "stripe";
|
|
5
|
+
private stripe;
|
|
6
|
+
private connectedAccountId;
|
|
7
|
+
/**
|
|
8
|
+
* OAuth-only mode. Uses OUR platform key + Stripe-Account header.
|
|
9
|
+
* Customer's key is NEVER stored or accepted.
|
|
10
|
+
*/
|
|
11
|
+
constructor(connectedAccountId: string);
|
|
12
|
+
private get stripeOptions();
|
|
13
|
+
issueCard(config: CardConfig): Promise<IssuedCard>;
|
|
14
|
+
freezeCard(platformCardId: string): Promise<void>;
|
|
15
|
+
fileDispute(params: PlatformDisputeParams): Promise<PlatformDisputeResult>;
|
|
16
|
+
getDisputeStatus(platformDisputeId: string): Promise<DisputeStatus>;
|
|
17
|
+
verifyWebhook(body: string, signature: string): boolean;
|
|
18
|
+
parseWebhook(body: string): WebhookEvent;
|
|
19
|
+
private mapStatus;
|
|
20
|
+
private buildReasonEvidence;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=stripe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stripe.d.ts","sourceRoot":"","sources":["../../../../../api/src/pal/stripe.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,qBAAqB,EACrB,qBAAqB,EACrB,aAAa,EACb,YAAY,EACb,MAAM,cAAc,CAAC;AAGtB,qBAAa,aAAc,YAAW,YAAY;IAChD,QAAQ,CAAC,IAAI,YAAY;IACzB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,kBAAkB,CAAS;IAEnC;;;OAGG;gBACS,kBAAkB,EAAE,MAAM;IAQtC,OAAO,KAAK,aAAa,GAExB;IAEK,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAqBlD,UAAU,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjD,WAAW,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAc1E,gBAAgB,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAKzE,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO;IAOvD,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY;IAYxC,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,mBAAmB;CAqB5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../../../../api/src/routes/billing.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,aAAa,KAAa,CAAC;AAmDxC,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;;;;GAsB7G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../../../api/src/routes/connect.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,aAAa,KAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../api/src/routes/index.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,WAAW,KAAa,CAAC;AACtC,eAAO,MAAM,YAAY,KAAa,CAAC;AACvC,eAAO,MAAM,aAAa,KAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../../../../api/src/routes/security.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,cAAc,KAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../../../../api/src/routes/webhooks.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,aAAa,KAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../mcp/src/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../../mcp/src/install.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { DisputeReason, Dispute } from "@lu71/shared";
|
|
2
|
+
export interface Lu71Config {
|
|
3
|
+
apiKey: string;
|
|
4
|
+
baseUrl?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface CaptureIntentParams {
|
|
7
|
+
agentId?: string;
|
|
8
|
+
description: string;
|
|
9
|
+
merchant?: string;
|
|
10
|
+
maxAmount: number;
|
|
11
|
+
currency?: string;
|
|
12
|
+
constraints?: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
export interface CaptureIntentResponse {
|
|
15
|
+
intentId: string;
|
|
16
|
+
signature: string;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
}
|
|
19
|
+
export interface FileDisputeParams {
|
|
20
|
+
agentId?: string;
|
|
21
|
+
platform?: "stripe" | "lithic";
|
|
22
|
+
intentId: string;
|
|
23
|
+
intentSignature: string;
|
|
24
|
+
transactionId: string;
|
|
25
|
+
reason: DisputeReason;
|
|
26
|
+
amount?: number;
|
|
27
|
+
description: string;
|
|
28
|
+
evidence?: {
|
|
29
|
+
whatWasReceived: string;
|
|
30
|
+
explanation?: string;
|
|
31
|
+
expectedAt?: string;
|
|
32
|
+
receivedAt?: string;
|
|
33
|
+
canceledAt?: string;
|
|
34
|
+
returnedAt?: string;
|
|
35
|
+
returnStatus?: "merchant_rejected" | "successful" | "not_applicable";
|
|
36
|
+
returnDescription?: string;
|
|
37
|
+
cancellationReason?: string;
|
|
38
|
+
cancellationPolicyProvidedAt?: string;
|
|
39
|
+
productDescription?: string;
|
|
40
|
+
productType?: "merchandise" | "service" | "digital_goods";
|
|
41
|
+
originalTransactionId?: string;
|
|
42
|
+
supportingDocs?: string[];
|
|
43
|
+
additionalContext?: string;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export interface FileDisputeResponse {
|
|
47
|
+
disputeId: string;
|
|
48
|
+
status: string;
|
|
49
|
+
platformDisputeId: string;
|
|
50
|
+
}
|
|
51
|
+
export interface WebhookConfig {
|
|
52
|
+
webhookUrl: string;
|
|
53
|
+
webhookSecret: string;
|
|
54
|
+
events: string[];
|
|
55
|
+
}
|
|
56
|
+
export declare class Lu71 {
|
|
57
|
+
private apiKey;
|
|
58
|
+
private baseUrl;
|
|
59
|
+
constructor(config: Lu71Config);
|
|
60
|
+
private request;
|
|
61
|
+
/** Get Stripe OAuth URL. Redirect customer to this URL to connect their account. */
|
|
62
|
+
getStripeConnectUrl(): Promise<{
|
|
63
|
+
url: string;
|
|
64
|
+
}>;
|
|
65
|
+
/** Connect Lithic with a restricted API key (disputes:write scope only). */
|
|
66
|
+
connectLithic(apiKey: string): Promise<{
|
|
67
|
+
message: string;
|
|
68
|
+
}>;
|
|
69
|
+
/** List connected platforms. */
|
|
70
|
+
listConnections(): Promise<{
|
|
71
|
+
platforms: Array<{
|
|
72
|
+
platform: string;
|
|
73
|
+
method: string;
|
|
74
|
+
}>;
|
|
75
|
+
}>;
|
|
76
|
+
/** Disconnect a platform. */
|
|
77
|
+
disconnect(platform: "stripe" | "lithic"): Promise<{
|
|
78
|
+
message: string;
|
|
79
|
+
}>;
|
|
80
|
+
/** Register a URL to receive dispute status updates. */
|
|
81
|
+
configureWebhook(url: string): Promise<WebhookConfig>;
|
|
82
|
+
/** Verify a webhook signature from Lu71. */
|
|
83
|
+
static verifyWebhook(body: string, signature: string, secret: string): boolean;
|
|
84
|
+
/** Capture purchase intent BEFORE making a purchase. Returns a signed receipt. */
|
|
85
|
+
captureIntent(params: CaptureIntentParams): Promise<CaptureIntentResponse>;
|
|
86
|
+
/** File a dispute. Requires the signature from captureIntent(). */
|
|
87
|
+
fileDispute(params: FileDisputeParams): Promise<FileDisputeResponse>;
|
|
88
|
+
/** Get a single dispute by ID. */
|
|
89
|
+
getDispute(disputeId: string): Promise<Dispute>;
|
|
90
|
+
/** List all disputes, optionally filtered by agent. */
|
|
91
|
+
listDisputes(agentId?: string): Promise<Dispute[]>;
|
|
92
|
+
/** Register an agent and issue a virtual card (only if not BYO card). */
|
|
93
|
+
registerAgent(params: {
|
|
94
|
+
name: string;
|
|
95
|
+
platform?: "stripe" | "lithic";
|
|
96
|
+
spendLimit: number;
|
|
97
|
+
currency?: string;
|
|
98
|
+
}): Promise<unknown>;
|
|
99
|
+
}
|
|
100
|
+
export declare class Lu71Error extends Error {
|
|
101
|
+
status: number;
|
|
102
|
+
details?: unknown;
|
|
103
|
+
constructor(message: string, status: number, details?: unknown);
|
|
104
|
+
}
|
|
105
|
+
export default Lu71;
|
|
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O,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAM7E,wDAAwD;IAClD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAI3D,4CAA4C;IAC5C,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAQ9E,kFAAkF;IAC5E,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAMhF,mEAAmE;IAC7D,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAI1E,kCAAkC;IAC5B,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIrD,uDAAuD;IACjD,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAOxD,yEAAyE;IACnE,aAAa,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE;CAGpH;AAED,qBAAa,SAAU,SAAQ,KAAK;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;gBACN,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAM/D;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DisputeReason } from "./types";
|
|
2
|
+
export declare const STRIPE_REASON_MAP: Record<DisputeReason, string>;
|
|
3
|
+
export declare const LITHIC_REASON_MAP: Record<DisputeReason, string>;
|
|
4
|
+
export declare const DISPUTE_STATUS_DISPLAY: Record<string, string>;
|
|
5
|
+
export declare const PRICING: {
|
|
6
|
+
readonly MONTHLY_FEE: 0;
|
|
7
|
+
readonly SUCCESS_FEE_PERCENT: 5;
|
|
8
|
+
readonly MINIMUM_FEE_PENCE: 100;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../shared/src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAQ3D,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAQ3D,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQzD,CAAC;AAGF,eAAO,MAAM,OAAO;;;;CAKV,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../shared/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const ERRORS: {
|
|
2
|
+
readonly MISSING_API_KEY: "API key is required. Pass it via x-api-key header.";
|
|
3
|
+
readonly INVALID_API_KEY: "Invalid API key.";
|
|
4
|
+
readonly AGENT_NOT_FOUND: "Agent not found.";
|
|
5
|
+
readonly AGENT_INACTIVE: "Agent is inactive.";
|
|
6
|
+
readonly AGENT_CARD_FAILED: "Failed to issue card on platform.";
|
|
7
|
+
readonly INTENT_NOT_FOUND: "Intent not found.";
|
|
8
|
+
readonly INTENT_AGENT_MISMATCH: "Intent does not belong to this agent.";
|
|
9
|
+
readonly DISPUTE_NOT_FOUND: "Dispute not found.";
|
|
10
|
+
readonly DISPUTE_FILING_FAILED: "Failed to file dispute on platform.";
|
|
11
|
+
readonly DISPUTE_ALREADY_FILED: "A dispute has already been filed for this transaction.";
|
|
12
|
+
readonly PLATFORM_UNAVAILABLE: "Platform is currently unavailable. Try again later.";
|
|
13
|
+
readonly PLATFORM_AUTH_FAILED: "Platform authentication failed. Check API credentials.";
|
|
14
|
+
readonly PLATFORM_INVALID_RESPONSE: "Received invalid response from platform.";
|
|
15
|
+
readonly VALIDATION_FAILED: "Request validation failed.";
|
|
16
|
+
readonly INVALID_REASON_CODE: "Invalid dispute reason code.";
|
|
17
|
+
readonly WEBHOOK_INVALID_SIGNATURE: "Invalid webhook signature.";
|
|
18
|
+
readonly WEBHOOK_UNKNOWN_PLATFORM: "Unknown platform in webhook URL.";
|
|
19
|
+
readonly INTERNAL_ERROR: "An internal error occurred.";
|
|
20
|
+
readonly NOT_FOUND: "Resource not found.";
|
|
21
|
+
};
|
|
22
|
+
export declare const MESSAGES: {
|
|
23
|
+
readonly AGENT_REGISTERED: "Agent registered successfully.";
|
|
24
|
+
readonly INTENT_CAPTURED: "Purchase intent captured.";
|
|
25
|
+
readonly DISPUTE_FILED: "Dispute filed successfully.";
|
|
26
|
+
readonly DISPUTE_UPDATED: "Dispute status updated.";
|
|
27
|
+
readonly WEBHOOK_RECEIVED: "Webhook processed.";
|
|
28
|
+
readonly HEALTH_OK: "Lu71 is operational.";
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../shared/src/messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;CAmCT,CAAC;AAEX,eAAO,MAAM,QAAQ;;;;;;;CAOX,CAAC"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
export type Platform = "stripe" | "lithic";
|
|
2
|
+
export type Geography = "us" | "uk" | "eu";
|
|
3
|
+
export type DisputeStatus = "draft" | "evidence_pending" | "submitted" | "under_review" | "won" | "lost" | "expired";
|
|
4
|
+
export type DisputeReason = "not_received" | "not_as_described" | "duplicate" | "unauthorized" | "cancelled" | "service_not_rendered" | "other";
|
|
5
|
+
export interface Agent {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
ownerId: string;
|
|
9
|
+
platform: Platform;
|
|
10
|
+
cardId: string;
|
|
11
|
+
cardLast4: string;
|
|
12
|
+
spendLimit: number;
|
|
13
|
+
currency: string;
|
|
14
|
+
active: boolean;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
}
|
|
17
|
+
export interface PurchaseIntent {
|
|
18
|
+
id: string;
|
|
19
|
+
agentId: string;
|
|
20
|
+
description: string;
|
|
21
|
+
merchant?: string;
|
|
22
|
+
maxAmount: number;
|
|
23
|
+
currency: string;
|
|
24
|
+
constraints?: Record<string, string>;
|
|
25
|
+
transactionId?: string;
|
|
26
|
+
createdAt: Date;
|
|
27
|
+
}
|
|
28
|
+
export interface Dispute {
|
|
29
|
+
id: string;
|
|
30
|
+
agentId: string;
|
|
31
|
+
intentId: string;
|
|
32
|
+
transactionId: string;
|
|
33
|
+
platform: Platform;
|
|
34
|
+
platformDisputeId?: string;
|
|
35
|
+
reason: DisputeReason;
|
|
36
|
+
amount: number;
|
|
37
|
+
currency: string;
|
|
38
|
+
status: DisputeStatus;
|
|
39
|
+
description: string;
|
|
40
|
+
evidence?: DisputeEvidence;
|
|
41
|
+
outcome?: DisputeOutcome;
|
|
42
|
+
filedAt: Date;
|
|
43
|
+
resolvedAt?: Date;
|
|
44
|
+
}
|
|
45
|
+
export interface DisputeEvidence {
|
|
46
|
+
agentIntentDescription: string;
|
|
47
|
+
whatWasReceived: string;
|
|
48
|
+
explanation?: string;
|
|
49
|
+
expectedAt?: string;
|
|
50
|
+
receivedAt?: string;
|
|
51
|
+
canceledAt?: string;
|
|
52
|
+
returnedAt?: string;
|
|
53
|
+
returnStatus?: "merchant_rejected" | "successful" | "not_applicable";
|
|
54
|
+
returnDescription?: string;
|
|
55
|
+
cancellationReason?: string;
|
|
56
|
+
cancellationPolicyProvidedAt?: string;
|
|
57
|
+
productDescription?: string;
|
|
58
|
+
productType?: "merchandise" | "service" | "digital_goods";
|
|
59
|
+
originalTransactionId?: string;
|
|
60
|
+
supportingDocs?: string[];
|
|
61
|
+
additionalContext?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface DisputeOutcome {
|
|
64
|
+
won: boolean;
|
|
65
|
+
amountRecovered: number;
|
|
66
|
+
networkReason?: string;
|
|
67
|
+
resolvedAt: Date;
|
|
68
|
+
}
|
|
69
|
+
export interface RegisterAgentRequest {
|
|
70
|
+
name: string;
|
|
71
|
+
ownerId: string;
|
|
72
|
+
platform?: Platform;
|
|
73
|
+
spendLimit: number;
|
|
74
|
+
currency?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface CaptureIntentRequest {
|
|
77
|
+
agentId: string;
|
|
78
|
+
description: string;
|
|
79
|
+
merchant?: string;
|
|
80
|
+
maxAmount: number;
|
|
81
|
+
currency?: string;
|
|
82
|
+
constraints?: Record<string, string>;
|
|
83
|
+
}
|
|
84
|
+
export interface FileDisputeRequest {
|
|
85
|
+
agentId: string;
|
|
86
|
+
intentId: string;
|
|
87
|
+
transactionId: string;
|
|
88
|
+
reason: DisputeReason;
|
|
89
|
+
amount?: number;
|
|
90
|
+
description: string;
|
|
91
|
+
evidence?: {
|
|
92
|
+
whatWasReceived: string;
|
|
93
|
+
explanation?: string;
|
|
94
|
+
expectedAt?: string;
|
|
95
|
+
receivedAt?: string;
|
|
96
|
+
canceledAt?: string;
|
|
97
|
+
returnedAt?: string;
|
|
98
|
+
returnStatus?: "merchant_rejected" | "successful" | "not_applicable";
|
|
99
|
+
returnDescription?: string;
|
|
100
|
+
cancellationReason?: string;
|
|
101
|
+
cancellationPolicyProvidedAt?: string;
|
|
102
|
+
productDescription?: string;
|
|
103
|
+
productType?: "merchandise" | "service" | "digital_goods";
|
|
104
|
+
originalTransactionId?: string;
|
|
105
|
+
supportingDocs?: string[];
|
|
106
|
+
additionalContext?: string;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
export interface CardConfig {
|
|
110
|
+
spendLimit: number;
|
|
111
|
+
currency: string;
|
|
112
|
+
metadata: Record<string, string>;
|
|
113
|
+
}
|
|
114
|
+
export interface IssuedCard {
|
|
115
|
+
platformCardId: string;
|
|
116
|
+
last4: string;
|
|
117
|
+
expMonth: number;
|
|
118
|
+
expYear: number;
|
|
119
|
+
brand: string;
|
|
120
|
+
}
|
|
121
|
+
export interface PlatformDisputeParams {
|
|
122
|
+
transactionId: string;
|
|
123
|
+
reason: DisputeReason;
|
|
124
|
+
amount: number;
|
|
125
|
+
currency: string;
|
|
126
|
+
evidence: PlatformEvidence;
|
|
127
|
+
}
|
|
128
|
+
export interface PlatformEvidence {
|
|
129
|
+
explanation: string;
|
|
130
|
+
productDescription?: string;
|
|
131
|
+
productType?: "merchandise" | "service" | "digital_goods";
|
|
132
|
+
expectedAt?: string;
|
|
133
|
+
receivedAt?: string;
|
|
134
|
+
canceledAt?: string;
|
|
135
|
+
returnedAt?: string;
|
|
136
|
+
returnStatus?: "merchant_rejected" | "successful" | "not_applicable";
|
|
137
|
+
returnDescription?: string;
|
|
138
|
+
cancellationReason?: string;
|
|
139
|
+
cancellationPolicyProvidedAt?: string;
|
|
140
|
+
originalTransactionId?: string;
|
|
141
|
+
additionalDocumentation?: string[];
|
|
142
|
+
}
|
|
143
|
+
export interface PlatformDisputeResult {
|
|
144
|
+
platformDisputeId: string;
|
|
145
|
+
status: DisputeStatus;
|
|
146
|
+
}
|
|
147
|
+
export interface WebhookEvent {
|
|
148
|
+
type: "transaction.settled" | "dispute.updated" | "dispute.won" | "dispute.lost";
|
|
149
|
+
platformDisputeId?: string;
|
|
150
|
+
platformTransactionId?: string;
|
|
151
|
+
data: Record<string, unknown>;
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../shared/src/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC3C,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C,MAAM,MAAM,aAAa,GACrB,OAAO,GACP,kBAAkB,GAClB,WAAW,GACX,cAAc,GACd,KAAK,GACL,MAAM,GACN,SAAS,CAAC;AAEd,MAAM,MAAM,aAAa,GACrB,cAAc,GACd,kBAAkB,GAClB,WAAW,GACX,cAAc,GACd,WAAW,GACX,sBAAsB,GACtB,OAAO,CAAC;AAEZ,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,E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AAE,CAAC;CACpC;AAED,MAAM,WAAW,qBAAqB;IACpC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,aAAa,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,qBAAqB,GAAG,iBAAiB,GAAG,aAAa,GAAG,cAAc,CAAC;IACjF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next.config.d.ts","sourceRoot":"","sources":["../../../web/next.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC,QAAA,MAAM,UAAU,EAAE,UAEjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../web/src/app/dashboard/page.tsx"],"names":[],"mappings":"AAiBA,MAAM,CAAC,OAAO,UAAU,aAAa,gCAymBpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../web/src/app/docs/page.tsx"],"names":[],"mappings":"AAsJA,MAAM,CAAC,OAAO,UAAU,QAAQ,gCA2K/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../web/src/app/forgot-password/page.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,kBAAkB,gCAuHzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../web/src/app/how-it-works/page.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,cAAc,gCAgErC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../web/src/app/integration/page.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,eAAe,gCA0FtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../../web/src/app/layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,eAAe,CAAC;AAEvB,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAQ7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../web/src/app/login/page.tsx"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,SAAS,gCA0EhC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../web/src/app/page.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,IAAI,gCAuH3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../web/src/app/pricing/page.tsx"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,UAAU,WAAW,gCA0HlC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../web/src/app/security/page.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,YAAY,gCAkFnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../web/src/app/signup/page.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,UAAU,gCA4HjC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface CodeBlockProps {
|
|
2
|
+
children: string;
|
|
3
|
+
lang?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function CodeBlock({ children, lang }: CodeBlockProps): import("react").JSX.Element;
|
|
6
|
+
export declare function InlineCode({ children }: {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=code-block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../../../../web/src/components/code-block.tsx"],"names":[],"mappings":"AAGA,UAAU,cAAc;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,cAAc,+BA6B3D;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,+BAMrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav.d.ts","sourceRoot":"","sources":["../../../../../web/src/components/nav.tsx"],"names":[],"mappings":"AAKA,wBAAgB,GAAG,gCAmClB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type RequestOptions = {
|
|
2
|
+
method?: string;
|
|
3
|
+
body?: unknown;
|
|
4
|
+
token?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function api<T = unknown>(path: string, opts?: RequestOptions): Promise<T>;
|
|
7
|
+
export declare class ApiError extends Error {
|
|
8
|
+
status: number;
|
|
9
|
+
constructor(message: string, status: number);
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../../web/src/lib/api.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GAAG;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,wBAAsB,GAAG,CAAC,CAAC,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,cAAmB,GAAG,OAAO,CAAC,CAAC,CAAC,CAa1F;AAED,qBAAa,QAAS,SAAQ,KAAK;IACjC,MAAM,EAAE,MAAM,CAAC;gBACH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAK5C"}
|