@fayz-ai/plugin-shop 0.10.0 → 0.11.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.
@@ -0,0 +1,76 @@
1
+ import { type ConnectorDefinition, type ConnectorField, type ConnectorSetting } from '@fayz-ai/core';
2
+ export declare const VINDI_CONNECTOR_ID = "vindi";
3
+ /**
4
+ * Six seconds, the same budget the other three gateways carry: it is spent after
5
+ * the buyer pressed "pagar", where waiting is expected and a premature refusal
6
+ * costs a sale that was about to happen.
7
+ *
8
+ * Not measured against Vindi yet — no account exists to measure with. It is
9
+ * copied from the two gateways that WERE measured (AbacatePay answered 640–830ms
10
+ * from São Paulo) on the reading that a Brazilian gateway called from a Brazilian
11
+ * pool sits in the same band. If a real sandbox says otherwise, this number moves
12
+ * and this paragraph goes with it.
13
+ */
14
+ export declare const VINDI_LATENCY_BUDGET_MS = 6000;
15
+ /**
16
+ * The one thing that authorizes the connection.
17
+ *
18
+ * `type: 'password'` is what routes it to the platform's credential sink
19
+ * (packages/admin/.../connect/credentials.ts) instead of to `saveConnection`;
20
+ * `secret: true` states the same thing on the field itself, so the intent
21
+ * survives a future change of input type.
22
+ *
23
+ * ── why there is no second field, and what it costs ─────────────────────────
24
+ *
25
+ * `token_account` opens a transaction and reads it back, which is the buyer's
26
+ * whole path. It cannot CANCEL one: `PATCH /transactions/cancel` takes an
27
+ * `access_token` and nothing else.
28
+ *
29
+ * Getting an access_token is not a matter of asking for one more secret. Vindi's
30
+ * chain is consumer_key → **CODE** → access_token, the CODE is copied out of a
31
+ * browser's address bar by the account owner "uma vez por ambiente", and the
32
+ * resulting token lives 24 hours and has to be renewed daily against a refresh
33
+ * token that would have to be written back somewhere. The platform refreshes
34
+ * credentials for `oauth` connectors registered in its broker, and Vindi cannot
35
+ * be one (see the file header). So the machinery does not exist, and asking a
36
+ * merchant for a consumer pair we cannot turn into a token would be asking for a
37
+ * secret in exchange for nothing.
38
+ *
39
+ * **The consequence, stated rather than hidden:** when a payment lands and the
40
+ * order cannot be written, this connector does NOT give the money back by itself
41
+ * — unlike the AbacatePay path, where *dinheiro recebido sem pedido tem um final
42
+ * correto só*. `vindi-checkout-settle` marks the session failed and reports the
43
+ * transaction id loudly; the merchant refunds in Vindi's own panel. Automatic
44
+ * reversal is phase 2, and it arrives with the token lifecycle or not at all.
45
+ */
46
+ export declare const VINDI_FIELDS: ConnectorField[];
47
+ /**
48
+ * Which world the credential is valid against.
49
+ *
50
+ * Deliberately WITHOUT a `defaultValue`. Every other setting on this shelf can
51
+ * afford a sensible default; this one decides whether a charge is real money or a
52
+ * simulation, and a default here is a number nobody chose making that call. Until
53
+ * the merchant answers, the connection reads "conectado, falta configurar" — which
54
+ * is true, and is a state the column already has.
55
+ *
56
+ * A `select` and not a toggle: "produção" and "não-sandbox" are not the same
57
+ * sentence to read at speed.
58
+ */
59
+ export declare const VINDI_ENVIRONMENT_SETTING: ConnectorSetting;
60
+ /**
61
+ * Which methods the storefront may offer — commercial policy, not a credential.
62
+ *
63
+ * The values are Vindi's own `payment_method_id`, as numbers-in-strings, because
64
+ * that is what travels to it on the wire. A translation table between what the
65
+ * merchant picked and what the API accepts is one more place for a method to
66
+ * silently stop being offered.
67
+ *
68
+ * Credit card (`3`) is absent on purpose. Vindi's transparent card flow takes
69
+ * `card_number` in the request body, which would put a PAN inside our edge
70
+ * function — the same rule that already kept card off the AbacatePay path. Card
71
+ * arrives through Vindi's hosted `url_payment` page, in phase 2, and offering it
72
+ * here today would promise a checkout option nothing can open.
73
+ */
74
+ export declare const VINDI_SETTINGS: ConnectorSetting[];
75
+ export declare const vindiConnectorDef: ConnectorDefinition;
76
+ //# sourceMappingURL=connectorDef.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectorDef.d.ts","sourceRoot":"","sources":["../../../src/integrations/vindi/connectorDef.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAKL,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAA;AAEtB,eAAO,MAAM,kBAAkB,UAAU,CAAA;AAEzC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,OAAO,CAAA;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,YAAY,EAAE,cAAc,EAQxC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yBAAyB,EAAE,gBAUvC,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,EAAE,gBAAgB,EAc5C,CAAA;AAqED,eAAO,MAAM,iBAAiB,EAAE,mBA8F/B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"NewOrderPage.d.ts","sourceRoot":"","sources":["../../src/views/NewOrderPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAA;AAWxE,OAAO,KAAK,EAC8C,YAAY,EACrE,MAAM,eAAe,CAAA;AAkGtB,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,YAAY,CAAA;IAC5B,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,iBAAiB,qBAkc7E"}
1
+ {"version":3,"file":"NewOrderPage.d.ts","sourceRoot":"","sources":["../../src/views/NewOrderPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAA;AAYxE,OAAO,KAAK,EAC8C,YAAY,EACrE,MAAM,eAAe,CAAA;AAkGtB,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,YAAY,CAAA;IAC5B,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,iBAAiB,qBAkc7E"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "fayz": {
4
4
  "status": "preview"
5
5
  },
6
- "version": "0.10.0",
6
+ "version": "0.11.0",
7
7
  "description": "[experimental] Fayz SDK — plugin-shop plugin",
8
8
  "type": "module",
9
9
  "sideEffects": false,
@@ -27,10 +27,10 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@tanstack/react-table": "^8.20.0",
30
- "@fayz-ai/core": "^0.11.0",
31
- "@fayz-ai/admin": "^0.11.0",
32
- "@fayz-ai/shop": "^0.11.0",
33
- "@fayz-ai/ui": "^0.11.0"
30
+ "@fayz-ai/core": "^0.12.0",
31
+ "@fayz-ai/admin": "^0.12.0",
32
+ "@fayz-ai/shop": "^0.12.0",
33
+ "@fayz-ai/ui": "^0.12.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/react": "^18.3.0",