@fayz-ai/plugin-financial 0.9.1 → 0.9.2

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.
@@ -0,0 +1,14 @@
1
+ import { type ConnectorDefinition, type ConnectorSetting } from '@fayz-ai/core';
2
+ export declare const STRIPE_CONNECTOR_ID = "stripe";
3
+ /**
4
+ * What the merchant may offer on a Stripe invoice — commercial policy, decided
5
+ * after the account is linked and changed whenever they like.
6
+ *
7
+ * A multi-select over what Stripe actually supports in BR, so the value cannot
8
+ * be a misspelling the invoice then silently does not offer. Required to
9
+ * OPERATE: an invoice with no method selected has no way to be paid, so the
10
+ * connection is real and reported as "conectado, falta configurar".
11
+ */
12
+ export declare const STRIPE_SETTINGS: ConnectorSetting[];
13
+ export declare const stripeConnectorDef: ConnectorDefinition;
14
+ //# sourceMappingURL=connectorDef.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorDef.d.ts","sourceRoot":"","sources":["../../../src/integrations/stripe/connectorDef.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAKL,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAA;AAItB,eAAO,MAAM,mBAAmB,WAAW,CAAA;AAE3C;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,gBAAgB,EAiC7C,CAAA;AAeD,eAAO,MAAM,kBAAkB,EAAE,mBAwGhC,CAAA"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * The edge function that will hold every Stripe call this connector makes.
3
+ * It exists in no repo and is deployed to no pool yet (FAY-1393) — which is
4
+ * why connectorDef.tsx declares no startOAuth.
5
+ */
6
+ export declare const STRIPE_FUNCTION = "stripe-financial-sync";
7
+ /** What the tenant gets back after asking Stripe to charge an invoice. */
8
+ export interface StripeCharge {
9
+ /** `in_…` — the invoice at Stripe. Mirrored onto `Invoice.metadata`. */
10
+ stripeInvoiceId: string;
11
+ /** Where to send the customer. Absent while the invoice is still a draft. */
12
+ paymentUrl?: string;
13
+ /** Stripe's own word for where the charge stands. */
14
+ stripeStatus: string;
15
+ }
16
+ /**
17
+ * Ask Stripe who this grant belongs to.
18
+ *
19
+ * The credential is not in this app, so the browser cannot check it. What comes
20
+ * back is the account's name — the only answer a person can verify. "Sim, é a
21
+ * minha conta" is a different statement from "a chamada não deu erro".
22
+ */
23
+ export declare function checkAccount(): Promise<{
24
+ ok: boolean;
25
+ message?: string;
26
+ }>;
27
+ /**
28
+ * Raise this receivable at Stripe and get back somewhere to pay it.
29
+ *
30
+ * Idempotent on the Fayz invoice id: pressing "Cobrar no Stripe" twice returns
31
+ * the SAME Stripe invoice rather than billing the customer twice, which is the
32
+ * one mistake here that costs real money and cannot be taken back quietly.
33
+ */
34
+ export declare function chargeInvoice(invoiceId: string): Promise<StripeCharge>;
35
+ /**
36
+ * Re-read one invoice's status from Stripe.
37
+ *
38
+ * The webhook is what normally moves a receivable to paid; this is the manual
39
+ * "conferir agora" for when someone is looking at the screen and does not want
40
+ * to wonder whether the webhook arrived.
41
+ */
42
+ export declare function refreshInvoice(invoiceId: string): Promise<StripeCharge>;
43
+ //# sourceMappingURL=data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/integrations/stripe/data.ts"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,eAAO,MAAM,eAAe,0BAA0B,CAAA;AAEtD,0EAA0E;AAC1E,MAAM,WAAW,YAAY;IAC3B,wEAAwE;IACxE,eAAe,EAAE,MAAM,CAAA;IACvB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,qDAAqD;IACrD,YAAY,EAAE,MAAM,CAAA;CACrB;AAqCD;;;;;;GAMG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAEzE;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAEtE;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAEvE"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "fayz": {
4
4
  "status": "beta"
5
5
  },
6
- "version": "0.9.1",
6
+ "version": "0.9.2",
7
7
  "description": "Fayz SDK — plugin-financial plugin",
8
8
  "type": "module",
9
9
  "sideEffects": false,
@@ -27,9 +27,9 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@tanstack/react-table": "^8.20.0",
30
- "@fayz-ai/admin": "^0.10.0",
31
- "@fayz-ai/core": "^0.10.0",
32
- "@fayz-ai/ui": "^0.10.0"
30
+ "@fayz-ai/admin": "^0.11.0",
31
+ "@fayz-ai/core": "^0.11.0",
32
+ "@fayz-ai/ui": "^0.11.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/react": "^18.3.0",