@fayz-ai/plugin-shop 0.16.16 → 0.17.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/dist/index.js CHANGED
@@ -5792,6 +5792,15 @@ var STRIPE_CONNECT_SETTINGS = [
5792
5792
  defaultValue: ["card"]
5793
5793
  }
5794
5794
  ];
5795
+ var STRIPE_CONNECT_FIELDS = [
5796
+ {
5797
+ key: "secretKey",
5798
+ label: "Chave secreta (sk_\u2026)",
5799
+ type: "password",
5800
+ secret: true,
5801
+ placeholder: "Stripe \u2192 Developers \u2192 API keys \u2192 Secret key"
5802
+ }
5803
+ ];
5795
5804
  var store4 = createConnectionStore(STRIPE_CONNECT_CONNECTOR_ID, {
5796
5805
  settings: STRIPE_CONNECT_SETTINGS
5797
5806
  });
@@ -5833,8 +5842,8 @@ var stripeConnectConnectorDef = {
5833
5842
  description: "Cart\xE3o, Pix e boleto pela Stripe. A loja recebe na conta dela e a Fayz ret\xE9m a taxa na pr\xF3pria cobran\xE7a.",
5834
5843
  icon: "CreditCard",
5835
5844
  category: "payments",
5836
- // Hosted onboarding rather than a pasted key: the merchant authorizes at
5837
- // Stripe and nothing secret ever reaches this file.
5845
+ // The OAuth grant on an account the merchant already owns (Connect's OAuth
5846
+ // flow, served by the vault); nothing secret ever reaches this file.
5838
5847
  authKind: "oauth",
5839
5848
  planes: ["request", "sync"],
5840
5849
  direction: "outbound",
@@ -5859,8 +5868,10 @@ var stripeConnectConnectorDef = {
5859
5868
  // Same verdict as the other two gateways: an order that reads as confirmed
5860
5869
  // without a payment is worse than a refused checkout.
5861
5870
  onFailure: "block",
5862
- // OAuth-shaped: consent is the whole form, and no value is collected here.
5863
- fields: [],
5871
+ // OAuth-shaped, with a key as the second door: consent is the usual form,
5872
+ // and a merchant who already holds the account may paste its secret key
5873
+ // instead. Either one lands in the vault under this connector.
5874
+ fields: STRIPE_CONNECT_FIELDS,
5864
5875
  settings: STRIPE_CONNECT_SETTINGS,
5865
5876
  invokedAt: [
5866
5877
  {
@@ -5888,10 +5899,10 @@ var stripeConnectConnectorDef = {
5888
5899
  ),
5889
5900
  ...connectionSettings(store4),
5890
5901
  startOAuth: fayzConnectorOAuth(STRIPE_CONNECT_CONNECTOR_ID),
5891
- // Reached with no values when the browser returns marked `connected`. It is
5892
- // required even though nothing is collected here: the platform callback stores
5893
- // the credential but deliberately never touches the pool, so this is the only
5894
- // thing that writes the tenant's `connections` row.
5902
+ // Reached with no values when the browser returns marked `connected`, and
5903
+ // with none again after a pasted key (the secret goes to the vault, not
5904
+ // here). Required either way: the vault never touches the pool, so this is
5905
+ // the only thing that writes the tenant's `connections` row.
5895
5906
  saveConnection: async () => {
5896
5907
  await store4.save({ active: true });
5897
5908
  },