@fayz-ai/plugin-shop 0.11.2 → 0.12.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/{ShopPage-YB5ZWECJ.js → ShopPage-VVLOH3RF.js} +67 -28
- package/dist/ShopPage-VVLOH3RF.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +684 -141
- package/dist/index.js.map +1 -1
- package/dist/integrations/abacatepay/connectorDef.d.ts.map +1 -1
- package/dist/integrations/abacatepay/data.d.ts +40 -0
- package/dist/integrations/abacatepay/data.d.ts.map +1 -0
- package/dist/integrations/abacatepay/limits.d.ts +26 -0
- package/dist/integrations/abacatepay/limits.d.ts.map +1 -0
- package/dist/integrations/abacatepay/sync.d.ts +88 -0
- package/dist/integrations/abacatepay/sync.d.ts.map +1 -0
- package/dist/integrations/neochef/connectorDef.d.ts +12 -0
- package/dist/integrations/neochef/connectorDef.d.ts.map +1 -0
- package/dist/integrations/neochef/data.d.ts +54 -0
- package/dist/integrations/neochef/data.d.ts.map +1 -0
- package/dist/integrations/neochef/index.d.ts +8 -0
- package/dist/integrations/neochef/index.d.ts.map +1 -0
- package/dist/integrations/neochef/limits.d.ts +26 -0
- package/dist/integrations/neochef/limits.d.ts.map +1 -0
- package/dist/integrations/neochef/mapping.d.ts +31 -0
- package/dist/integrations/neochef/mapping.d.ts.map +1 -0
- package/dist/integrations/neochef/mark.d.ts +21 -0
- package/dist/integrations/neochef/mark.d.ts.map +1 -0
- package/dist/integrations/neochef/types.d.ts +71 -0
- package/dist/integrations/neochef/types.d.ts.map +1 -0
- package/dist/integrations/vindi/connectorDef.d.ts +25 -6
- package/dist/integrations/vindi/connectorDef.d.ts.map +1 -1
- package/dist/views/ContentPage.d.ts.map +1 -1
- package/dist/views/NewOrderCharge.d.ts +14 -2
- package/dist/views/NewOrderCharge.d.ts.map +1 -1
- package/dist/views/NewOrderPage.d.ts.map +1 -1
- package/dist/views/new-order-rules.d.ts +10 -1
- package/dist/views/new-order-rules.d.ts.map +1 -1
- package/package.json +5 -5
- package/dist/ShopPage-YB5ZWECJ.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectorDef.d.ts","sourceRoot":"","sources":["../../../src/integrations/abacatepay/connectorDef.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connectorDef.d.ts","sourceRoot":"","sources":["../../../src/integrations/abacatepay/connectorDef.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAKL,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAA;AAEtB,eAAO,MAAM,uBAAuB,eAAe,CAAA;AAEnD;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,OAAO,CAAA;AAEhD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,EAAE,cAAc,EAQ7C,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,EAAE,gBAAgB,EAkBjD,CAAA;AA4KD,eAAO,MAAM,sBAAsB,EAAE,mBA2FpC,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** The edge function that holds every catalogue call this connector makes. */
|
|
2
|
+
export declare const ABACATEPAY_FUNCTION = "abacatepay-sync";
|
|
3
|
+
export interface AbacatePaySyncResult {
|
|
4
|
+
ok: boolean;
|
|
5
|
+
/** Products created in the provider's catalogue on this run. */
|
|
6
|
+
pushed: number;
|
|
7
|
+
/** Already there and still at the same price. */
|
|
8
|
+
unchanged: number;
|
|
9
|
+
/** Refused before sending: no name, or a price of zero. */
|
|
10
|
+
skipped: Array<{
|
|
11
|
+
productId: string;
|
|
12
|
+
reason: string;
|
|
13
|
+
}>;
|
|
14
|
+
/** The provider said no. One bad product does not end a run. */
|
|
15
|
+
failed: Array<{
|
|
16
|
+
productId: string;
|
|
17
|
+
error: string;
|
|
18
|
+
}>;
|
|
19
|
+
/** Created, but AbacatePay refused the photo, so it went without one. */
|
|
20
|
+
withoutImage: string[];
|
|
21
|
+
/** Linked, but the store's price has moved since. Reported, never repaired. */
|
|
22
|
+
drifted?: Array<{
|
|
23
|
+
productId: string;
|
|
24
|
+
externalId: string;
|
|
25
|
+
}>;
|
|
26
|
+
/** The per-run cap stopped it short — press again. */
|
|
27
|
+
hasMore: boolean;
|
|
28
|
+
total: number;
|
|
29
|
+
}
|
|
30
|
+
/** Read-only probe: is the key good? Listing an empty catalogue is a success. */
|
|
31
|
+
export declare function testAbacatePay(): Promise<{
|
|
32
|
+
ok: boolean;
|
|
33
|
+
remoteProducts?: number;
|
|
34
|
+
error?: string;
|
|
35
|
+
}>;
|
|
36
|
+
/** Send the products that have no link yet. Additive — nothing is ever deleted. */
|
|
37
|
+
export declare function pushCatalogue(): Promise<AbacatePaySyncResult>;
|
|
38
|
+
/** Push, then report which linked products have drifted from the sent price. */
|
|
39
|
+
export declare function reconcileCatalogue(): Promise<AbacatePaySyncResult>;
|
|
40
|
+
//# sourceMappingURL=data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/integrations/abacatepay/data.ts"],"names":[],"mappings":"AAaA,8EAA8E;AAC9E,eAAO,MAAM,mBAAmB,oBAAoB,CAAA;AAEpD,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,OAAO,CAAA;IACX,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAA;IACd,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAA;IACjB,2DAA2D;IAC3D,OAAO,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACrD,gEAAgE;IAChE,MAAM,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACnD,yEAAyE;IACzE,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC1D,sDAAsD;IACtD,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CACd;AAgDD,iFAAiF;AACjF,wBAAgB,cAAc,IAAI,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAElG;AAED,mFAAmF;AACnF,wBAAgB,aAAa,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAE7D;AAED,gFAAgF;AAChF,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAElE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { RateLimitBudget } from '@fayz-ai/core';
|
|
2
|
+
export declare const ABACATEPAY_CONNECTOR_ID = "abacatepay";
|
|
3
|
+
/** The `source` written into plg_shop_product_links. */
|
|
4
|
+
export declare const ABACATEPAY_LINK_SOURCE = "abacatepay";
|
|
5
|
+
/** One row per product today. `plan` is what a subscription would file under. */
|
|
6
|
+
export declare const ABACATEPAY_LINK_KIND = "product";
|
|
7
|
+
/**
|
|
8
|
+
* Products per run.
|
|
9
|
+
*
|
|
10
|
+
* The catalogue has no bulk endpoint — it is one POST per product — and this
|
|
11
|
+
* runs inside an edge function with a wall clock. A store connecting after a
|
|
12
|
+
* year of selling files that year on its first run; capped, it drains over a few
|
|
13
|
+
* runs instead of dying halfway through and leaving the operator unsure which
|
|
14
|
+
* half landed.
|
|
15
|
+
*/
|
|
16
|
+
export declare const ABACATEPAY_PUSH_LIMIT = 40;
|
|
17
|
+
/**
|
|
18
|
+
* Requests per second against api.abacatepay.com.
|
|
19
|
+
*
|
|
20
|
+
* Not a documented figure — their docs publish no rate limit — so this is a
|
|
21
|
+
* deliberately conservative floor rather than a measured ceiling. A catalogue
|
|
22
|
+
* push is never urgent; being slower than allowed costs nothing, being faster
|
|
23
|
+
* than allowed costs a half-written catalogue.
|
|
24
|
+
*/
|
|
25
|
+
export declare const ABACATEPAY_RATE_LIMIT: RateLimitBudget;
|
|
26
|
+
//# sourceMappingURL=limits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../../src/integrations/abacatepay/limits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAIpD,eAAO,MAAM,uBAAuB,eAAe,CAAA;AAEnD,wDAAwD;AACxD,eAAO,MAAM,sBAAsB,eAAe,CAAA;AAElD,iFAAiF;AACjF,eAAO,MAAM,oBAAoB,YAAY,CAAA;AAE7C;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,KAAK,CAAA;AAEvC;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,EAAE,eAAkC,CAAA"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/** A store product, in the shape the push needs and no wider. */
|
|
2
|
+
export interface SyncProduct {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
price: number;
|
|
6
|
+
description?: string | null;
|
|
7
|
+
imageUrl?: string | null;
|
|
8
|
+
status?: string | null;
|
|
9
|
+
}
|
|
10
|
+
/** An existing row of plg_shop_product_links. */
|
|
11
|
+
export interface ProductLink {
|
|
12
|
+
product_id: string;
|
|
13
|
+
external_id: string;
|
|
14
|
+
synced_price_cents?: number | null;
|
|
15
|
+
/** Which of the provider's worlds this id exists in. */
|
|
16
|
+
dev_mode?: boolean | null;
|
|
17
|
+
}
|
|
18
|
+
/** What the caller must give us to reach the provider. One product per call. */
|
|
19
|
+
export type CreateProductTransport = (body: Record<string, unknown>) => Promise<{
|
|
20
|
+
id: string;
|
|
21
|
+
raw?: unknown;
|
|
22
|
+
}>;
|
|
23
|
+
export interface PushProductsOptions {
|
|
24
|
+
products: readonly SyncProduct[];
|
|
25
|
+
links: readonly ProductLink[];
|
|
26
|
+
createProduct: CreateProductTransport;
|
|
27
|
+
limit?: number;
|
|
28
|
+
/** Pure builder from the deployed runtime — injected to keep this file free of
|
|
29
|
+
* the .js/.ts boundary the edge bundle lives on. */
|
|
30
|
+
buildProduct: (product: SyncProduct) => Record<string, unknown> | null;
|
|
31
|
+
priceDrifted: (link: ProductLink, product: SyncProduct) => boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface PushedLink {
|
|
34
|
+
productId: string;
|
|
35
|
+
externalId: string;
|
|
36
|
+
priceCents: number;
|
|
37
|
+
raw?: unknown;
|
|
38
|
+
}
|
|
39
|
+
export interface PushProductsResult {
|
|
40
|
+
/** Links to write. The caller owns the database. */
|
|
41
|
+
created: PushedLink[];
|
|
42
|
+
/** Already linked, price unchanged — nothing to do. */
|
|
43
|
+
unchanged: number;
|
|
44
|
+
/** Linked, but the store's price has moved since. Reported, never repaired. */
|
|
45
|
+
drifted: Array<{
|
|
46
|
+
productId: string;
|
|
47
|
+
externalId: string;
|
|
48
|
+
}>;
|
|
49
|
+
/** Refused by the builder: no name, no id, or a price of zero. */
|
|
50
|
+
skipped: Array<{
|
|
51
|
+
productId: string;
|
|
52
|
+
reason: string;
|
|
53
|
+
}>;
|
|
54
|
+
/** Created, but the provider would not take the photo — so it went without one. */
|
|
55
|
+
withoutImage: string[];
|
|
56
|
+
/** The provider said no. The run continues; a bad product is not a bad run. */
|
|
57
|
+
failed: Array<{
|
|
58
|
+
productId: string;
|
|
59
|
+
error: string;
|
|
60
|
+
}>;
|
|
61
|
+
/** True when the cap stopped us short and another run has work left. */
|
|
62
|
+
hasMore: boolean;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Products with no link yet, oldest first by the order given.
|
|
66
|
+
*
|
|
67
|
+
* Archived products are excluded: pushing one creates a catalogue entry for
|
|
68
|
+
* something the store will not sell, and the catalogue has no update to walk it
|
|
69
|
+
* back — only a delete that breaks whatever it is attached to.
|
|
70
|
+
*/
|
|
71
|
+
export declare function pushQueue(products: readonly SyncProduct[], links: readonly ProductLink[], limit?: number): SyncProduct[];
|
|
72
|
+
/** Which already-linked products no longer agree with the provider on price. */
|
|
73
|
+
export declare function driftedLinks(products: readonly SyncProduct[], links: readonly ProductLink[], priceDrifted: PushProductsOptions['priceDrifted']): Array<{
|
|
74
|
+
productId: string;
|
|
75
|
+
externalId: string;
|
|
76
|
+
}>;
|
|
77
|
+
/**
|
|
78
|
+
* Push the absent products, one at a time.
|
|
79
|
+
*
|
|
80
|
+
* Sequential on purpose. There is no bulk endpoint, the provider publishes no
|
|
81
|
+
* rate limit, and a catalogue push is never the urgent thing — the caller paces
|
|
82
|
+
* it with the rate limiter. Parallelism here would only buy the chance of being
|
|
83
|
+
* throttled halfway through.
|
|
84
|
+
*/
|
|
85
|
+
export declare function pushProducts(options: PushProductsOptions): Promise<PushProductsResult>;
|
|
86
|
+
/** The rows `pushProducts` produced, ready for an upsert into plg_shop_product_links. */
|
|
87
|
+
export declare function linkRows(tenantId: string, created: readonly PushedLink[], now: string, devMode?: boolean): Array<Record<string, unknown>>;
|
|
88
|
+
//# sourceMappingURL=sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../src/integrations/abacatepay/sync.ts"],"names":[],"mappings":"AA0BA,iEAAiE;AACjE,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA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,OAAO,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACrD,mFAAmF;IACnF,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,+EAA+E;IAC/E,MAAM,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACnD,wEAAwE;IACxE,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,QAAQ,EAAE,SAAS,WAAW,EAAE,EAChC,KAAK,EAAE,SAAS,WAAW,EAAE,EAC7B,KAAK,GAAE,MAA8B,GACpC,WAAW,EAAE,CAMf;AAED,gFAAgF;AAChF,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,SAAS,WAAW,EAAE,EAChC,KAAK,EAAE,SAAS,WAAW,EAAE,EAC7B,YAAY,EAAE,mBAAmB,CAAC,cAAc,CAAC,GAChD,KAAK,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAUlD;AAED;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAqE5F;AAED,yFAAyF;AACzF,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,SAAS,UAAU,EAAE,EAC9B,GAAG,EAAE,MAAM,EACX,OAAO,UAAQ,GACd,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAchC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ConnectorDefinition } from '@fayz-ai/core';
|
|
2
|
+
/**
|
|
3
|
+
* `settingsKeys` and not `fields`: nothing here is asked for in a form.
|
|
4
|
+
*
|
|
5
|
+
* The merchant authorizes on NeoChef's consent screen and comes back — which
|
|
6
|
+
* kitchen, and what it is called, are learned from the grant. There is no
|
|
7
|
+
* credential to route either: the platform holds it, and this connection has no
|
|
8
|
+
* secret field to route in the first place.
|
|
9
|
+
*/
|
|
10
|
+
export declare const neoChefConnectionStore: () => import("@fayz-ai/core").ConnectionStore;
|
|
11
|
+
export declare const neoChefConnectorDef: ConnectorDefinition;
|
|
12
|
+
//# sourceMappingURL=connectorDef.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectorDef.d.ts","sourceRoot":"","sources":["../../../src/integrations/neochef/connectorDef.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAOxD;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,+CAG/B,CAAA;AAEJ,eAAO,MAAM,mBAAmB,EAAE,mBA4KjC,CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type ConnectorDelivery } from '@fayz-ai/core';
|
|
2
|
+
/** The edge function that holds every NeoChef call this connector makes. */
|
|
3
|
+
export declare const NEOCHEF_FUNCTION = "neochef-sync";
|
|
4
|
+
/** What a push leg answers with. Every field is a count the merchant can check. */
|
|
5
|
+
export interface NeoChefPushResult {
|
|
6
|
+
runId?: string;
|
|
7
|
+
/** What the run settled as. The toast reads this, not "it did not throw". */
|
|
8
|
+
status?: 'success' | 'partial' | 'error';
|
|
9
|
+
filed: number;
|
|
10
|
+
skipped?: number;
|
|
11
|
+
considered: number;
|
|
12
|
+
failures?: number;
|
|
13
|
+
message: string;
|
|
14
|
+
}
|
|
15
|
+
export interface NeoChefPullResult {
|
|
16
|
+
runId?: string;
|
|
17
|
+
fetched: number;
|
|
18
|
+
inserted: number;
|
|
19
|
+
updated: number;
|
|
20
|
+
untouched: number;
|
|
21
|
+
sample: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** Read one product. Writes nothing anywhere — the probe, not a sync. */
|
|
24
|
+
export declare function testNeoChef(): Promise<{
|
|
25
|
+
ok: boolean;
|
|
26
|
+
message?: string;
|
|
27
|
+
}>;
|
|
28
|
+
/** Bring the catalogue and the stock down. `sample` is the first, fast answer. */
|
|
29
|
+
export declare function pullCatalogue(mode?: 'sample' | 'full'): Promise<NeoChefPullResult>;
|
|
30
|
+
/** Send every paid order not filed yet, as an order in the kitchen. */
|
|
31
|
+
export declare function pushOrders(): Promise<NeoChefPushResult>;
|
|
32
|
+
/** Both legs, in the order somebody does them on an ordinary day. */
|
|
33
|
+
export declare function reconcile(): Promise<{
|
|
34
|
+
pull?: NeoChefPullResult;
|
|
35
|
+
push?: Record<string, NeoChefPushResult>;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* How many orders still have to go up.
|
|
39
|
+
*
|
|
40
|
+
* The same ABSENCE the function uses as its queue: a paid order with no link
|
|
41
|
+
* row. Counted from here so the row can say "em dia" instead of offering a
|
|
42
|
+
* button that would send nothing.
|
|
43
|
+
*/
|
|
44
|
+
export declare function pendingOrders(): Promise<number | null>;
|
|
45
|
+
/**
|
|
46
|
+
* Record by record, for the automations screen.
|
|
47
|
+
*
|
|
48
|
+
* The managed automation says a paid order goes to the kitchen; this is what
|
|
49
|
+
* says whether it arrived. Orders first and links second, so an order that has
|
|
50
|
+
* NOT gone up still appears — a list built from links alone shows only the
|
|
51
|
+
* successes, which reads as health.
|
|
52
|
+
*/
|
|
53
|
+
export declare function listOrderDeliveries(limit?: number): Promise<ConnectorDelivery[]>;
|
|
54
|
+
//# sourceMappingURL=data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/integrations/neochef/data.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,eAAe,CAAA;AAGtB,4EAA4E;AAC5E,eAAO,MAAM,gBAAgB,iBAAiB,CAAA;AAE9C,mFAAmF;AACnF,MAAM,WAAW,iBAAiB;IA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ChefConnectorDef, neoChefConnectionStore } from './connectorDef';
|
|
2
|
+
export { NEOCHEF_CONNECTOR_ID, NEOCHEF_RATE_LIMIT, NEOCHEF_PAGE_SIZE, NEOCHEF_SAMPLE_SIZE, NEOCHEF_CURSOR_OVERLAP_MS, NEOCHEF_TOKEN_LEAD_MS, } from './limits';
|
|
3
|
+
export { toMirroredNeoChefProduct, toNeoChefOrder, advanceNeoChefCursor } from './mapping';
|
|
4
|
+
export { NEOCHEF_MARK } from './mark';
|
|
5
|
+
export { NEOCHEF_FUNCTION, pullCatalogue, pushOrders, reconcile, testNeoChef, pendingOrders, listOrderDeliveries, } from './data';
|
|
6
|
+
export type { NeoChefPullResult, NeoChefPushResult } from './data';
|
|
7
|
+
export type { NeoChefProductRow, NeoChefOrderRow, NeoChefSettings, MirroredNeoChefProduct, ShopOrderForNeoChef, } from './types';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/neochef/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAC5E,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,wBAAwB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAC1F,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,SAAS,EACT,WAAW,EACX,aAAa,EACb,mBAAmB,GACpB,MAAM,QAAQ,CAAA;AACf,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAClE,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { RateLimitBudget } from '@fayz-ai/core/connector-runtime';
|
|
2
|
+
export declare const NEOCHEF_CONNECTOR_ID = "neochef";
|
|
3
|
+
/**
|
|
4
|
+
* Per connection.
|
|
5
|
+
*
|
|
6
|
+
* Not a limit NeoChef publishes — it is one we choose, because the far side is
|
|
7
|
+
* a platform serving every other tenant too. A connector with no budget is a
|
|
8
|
+
* connector whose worst day is someone else's outage.
|
|
9
|
+
*/
|
|
10
|
+
export declare const NEOCHEF_RATE_LIMIT: RateLimitBudget;
|
|
11
|
+
/** Rows per page on the data plane's row endpoints. */
|
|
12
|
+
export declare const NEOCHEF_PAGE_SIZE = 100;
|
|
13
|
+
/**
|
|
14
|
+
* The first answer, and why it is one page.
|
|
15
|
+
*
|
|
16
|
+
* The same argument as Bling's, at a different speed: a connect screen must
|
|
17
|
+
* settle in seconds, and a kitchen with a thousand products would otherwise
|
|
18
|
+
* make the merchant watch a spinner to find out whether the connection worked.
|
|
19
|
+
* The backfill finishes the mirror behind it.
|
|
20
|
+
*/
|
|
21
|
+
export declare const NEOCHEF_SAMPLE_SIZE = 100;
|
|
22
|
+
/** Re-read this much before the last cursor. See the header. */
|
|
23
|
+
export declare const NEOCHEF_CURSOR_OVERLAP_MS = 60000;
|
|
24
|
+
/** Renew well before the hour is up — never at the deadline. */
|
|
25
|
+
export declare const NEOCHEF_TOKEN_LEAD_MS: number;
|
|
26
|
+
//# sourceMappingURL=limits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../../src/integrations/neochef/limits.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAEtE,eAAO,MAAM,oBAAoB,YAAY,CAAA;AAE7C;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,eAAkD,CAAA;AAEnF,uDAAuD;AACvD,eAAO,MAAM,iBAAiB,MAAM,CAAA;AAEpC;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,MAAM,CAAA;AAEtC,gEAAgE;AAChE,eAAO,MAAM,yBAAyB,QAAS,CAAA;AAE/C,gEAAgE;AAChE,eAAO,MAAM,qBAAqB,QAAc,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { MirroredNeoChefProduct, NeoChefOrderRow, NeoChefProductRow, ShopOrderForNeoChef } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* One NeoChef product as the mirror stores it, or null when it carries no id.
|
|
4
|
+
*
|
|
5
|
+
* `is_active` maps to archived and never to a delete. An inactive product in
|
|
6
|
+
* the kitchen is still a product, and this connector has no vocabulary for
|
|
7
|
+
* deletion at all — a store that empties its catalogue because a row left a
|
|
8
|
+
* page is the failure `reconcileMirror` exists to prevent.
|
|
9
|
+
*/
|
|
10
|
+
export declare function toMirroredNeoChefProduct(raw: NeoChefProductRow | null | undefined): MirroredNeoChefProduct | null;
|
|
11
|
+
/**
|
|
12
|
+
* A paid store order as a NeoChef order row.
|
|
13
|
+
*
|
|
14
|
+
* `kind` is the only real decision here: NeoChef's orders are `takeout` or
|
|
15
|
+
* `delivery`, and which one a web order is depends on whether the buyer
|
|
16
|
+
* collects. Guessing one would put every online sale on the wrong board in the
|
|
17
|
+
* kitchen, so it is read from the order and defaults to delivery — the answer
|
|
18
|
+
* that is wrong in the safer direction, since a delivery order nobody drives is
|
|
19
|
+
* visible and a takeout order nobody prepared is not.
|
|
20
|
+
*/
|
|
21
|
+
export declare function toNeoChefOrder(order: ShopOrderForNeoChef): NeoChefOrderRow;
|
|
22
|
+
/**
|
|
23
|
+
* The cursor for the next pull.
|
|
24
|
+
*
|
|
25
|
+
* The newest `updated_at` OBSERVED, minus an overlap, and never the clock: the
|
|
26
|
+
* two sides do not share one, and a cursor taken from ours skips whatever the
|
|
27
|
+
* far side stamped in between. Null when nothing carried a stamp, which asks
|
|
28
|
+
* the next run to repeat the window rather than to invent one.
|
|
29
|
+
*/
|
|
30
|
+
export declare function advanceNeoChefCursor(products: MirroredNeoChefProduct[], overlapMs: number): string | null;
|
|
31
|
+
//# sourceMappingURL=mapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapping.d.ts","sourceRoot":"","sources":["../../../src/integrations/neochef/mapping.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,SAAS,CAAA;AAQhB;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,iBAAiB,GAAG,IAAI,GAAG,SAAS,GACxC,sBAAsB,GAAG,IAAI,CAsB/B;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,eAAe,CAa1E;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,sBAAsB,EAAE,EAClC,SAAS,EAAE,MAAM,GAChB,MAAM,GAAG,IAAI,CAMf"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NeoChef's mark, inlined.
|
|
3
|
+
*
|
|
4
|
+
* Same reasoning as `client-marks.ts` in @fayz-ai/admin: a brand a row wears
|
|
5
|
+
* cannot fail to load, on an app served from anywhere. A first-party mark has
|
|
6
|
+
* no reason to depend on a bucket being reachable.
|
|
7
|
+
*
|
|
8
|
+
* It is COMPOSED rather than copied, and that is the part worth knowing. The
|
|
9
|
+
* app's own asset (`public/logo/neochef-icon.png`) is a MASK — the stroke is
|
|
10
|
+
* white and the shape lives in the alpha channel, because the app paints it
|
|
11
|
+
* with `currentColor` so one file serves the ink rail and the login card. Used
|
|
12
|
+
* as an `<img>` that file is invisible on a light surface, which is what a
|
|
13
|
+
* connector row is. So the hat sits on the brand's own turmeric (#e0a906),
|
|
14
|
+
* giving the row a mark that is legible on both themes — the same shape the
|
|
15
|
+
* consent screen shows, in a form a plain image tag can render.
|
|
16
|
+
*
|
|
17
|
+
* Replace with an `assets.fayz.ai/connectors/neochef.png` URL whenever the
|
|
18
|
+
* bucket has one; nothing else has to change.
|
|
19
|
+
*/
|
|
20
|
+
export declare const NEOCHEF_MARK = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAATp0lEQVR42u1da2xcx3WeMzP3sU/uksunKIl6y7JkyZYsSzYtuUlrGE1ctClao3kVadMkRVPYTQIXbdKkSIPWBYqkSZ00qYOmllGgRpu0aOEisBPXEuVHJFmmLFsv6kFJlCi+ltz3fcyd0x+zd3dJy7YSU+Ry9w5ACAtSd++955vvnPnmnDNAbuIYflpHEoz3PPoecuBmXRsCgzc3ICAwfHMDAQLDNzcQIDB8cwOBBsZvnPGL2IYGxm9uEEBg+OZ2CTQwfnOzAQ2M39wgoMErau5Bg9nf3CxAA+M3NwhoYPzmBkEQAwQxQDD7m5kFAgYIGCCY/c3MAgEDBAwQzP5mZoGAAQIGCEYAgGA07YDA/zf34I0JayoJIYSgpIQQQvXWaSO166yZ6i9qia1RLdrXBlpLtJwQg+hmC6JwccqZOZazJ1807clX1nr2RFv5YkiASoIeCxig/h9nlrGM1O7j0b6PzphdD6zh4d6eG72KZ10bK117dqgw/FTUGj+wTV2aeQpQCAEA6nXWl2e80bbzzZZNXyyGuh+4s/J7lBJRCEIIAaCUEEoJABBEJERKRCnV7xgjwCqz3Rp7/mjmxF8za2Jg69zvCQBQN0/BPIIeA6o7ic1/+XJ8wyP9yoiIKF0XgFIC/MbdHQqBKCUA5wQoJYSQ3NB3Dkwf/9J2FIWI/30BAOrI+Dy84kpq1760kdq9RRleCDWblQE9a2zcnnzpvJ0+bLvZ0yFpT4ZRWhyoIajRXtRi60pG6w7dSN29ioV6uqqs4Xn+dZzpwVOTr3zUdHNDfY0CgqUNgLIR9MSWM+39/x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Xtla6mPetaXhRHLM8ak541xqST1qSb0VHkDSkKBpEuQ+nwuXv6wAwXqC6AR23KozbVEw7V2wQLdUlmdjIW6g3zUHecmp2tTG9LEqDUj0mY0cFVgysuqgWu1d5AAQDmgQn8mAB4LO+VRqftqUMXnfSrlpN9MyLy59u84pUOKXJdNxuMVG+d4eHeM1psfVprudUxWnfGCfH3AlQLON99LYWxSC1igkECKTgYdQGAvoec4AiXJh19DzkQMEDgAoIRACAYzQ2AIA5oTv8fMEAwqgAIWKD5Zn/AAMGYDYCABZpr9gcMEIy3AiBggeaZ/W/LAAEImsP47+gCAhA0vvGDGCAY7wyAgAUae/bfEAMEIGhc4xMyt8HNu4wge6hxDP8LxQABGzSW8X+hIDAAQeMY/+d2AYFLaBzDzwsAAiAsXcPPKwACICw9w98UAASAqH+Dzx3/Dzwey48k2VW1AAAAAElFTkSuQmCC";
|
|
21
|
+
//# sourceMappingURL=mark.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mark.d.ts","sourceRoot":"","sources":["../../../src/integrations/neochef/mark.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,YAAY,2pNACioN,CAAA"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A product row as NeoChef's data plane returns it.
|
|
3
|
+
*
|
|
4
|
+
* snake_case, because these are columns and not a serialized model — the row
|
|
5
|
+
* endpoints hand back what Postgres holds. `stock` is on the row, so catalogue
|
|
6
|
+
* and stock arrive together: one request per PAGE, never one per product.
|
|
7
|
+
*/
|
|
8
|
+
export interface NeoChefProductRow {
|
|
9
|
+
id: string;
|
|
10
|
+
name?: string | null;
|
|
11
|
+
sku?: string | null;
|
|
12
|
+
price?: number | string | null;
|
|
13
|
+
cost?: number | string | null;
|
|
14
|
+
stock?: number | string | null;
|
|
15
|
+
image_url?: string | null;
|
|
16
|
+
status?: string | null;
|
|
17
|
+
is_active?: boolean | null;
|
|
18
|
+
updated_at?: string | null;
|
|
19
|
+
}
|
|
20
|
+
/** What the mirror stores for one product. Canonical Fayz, on both sides. */
|
|
21
|
+
export interface MirroredNeoChefProduct {
|
|
22
|
+
externalId: string;
|
|
23
|
+
sku: string | null;
|
|
24
|
+
name: string;
|
|
25
|
+
price: number | null;
|
|
26
|
+
/** NeoChef owns this number once connected — see `stockOwner`. */
|
|
27
|
+
inventoryCount: number | null;
|
|
28
|
+
status: 'active' | 'archived';
|
|
29
|
+
imageUrl: string | null;
|
|
30
|
+
updatedAt: string | null;
|
|
31
|
+
}
|
|
32
|
+
/** The store-side order this connector files, narrowed to what NeoChef needs. */
|
|
33
|
+
export interface ShopOrderForNeoChef {
|
|
34
|
+
id: string;
|
|
35
|
+
referenceNumber?: string | null;
|
|
36
|
+
total?: number | string | null;
|
|
37
|
+
subtotal?: number | string | null;
|
|
38
|
+
notes?: string | null;
|
|
39
|
+
/** True when the buyer collects. It is what decides `kind` on the far side. */
|
|
40
|
+
pickup?: boolean | null;
|
|
41
|
+
createdAt?: string | null;
|
|
42
|
+
}
|
|
43
|
+
/** An order row as NeoChef's `orders` table takes it. */
|
|
44
|
+
export interface NeoChefOrderRow {
|
|
45
|
+
kind: 'takeout' | 'delivery';
|
|
46
|
+
reference_number: string;
|
|
47
|
+
status: string;
|
|
48
|
+
total: number | null;
|
|
49
|
+
subtotal: number | null;
|
|
50
|
+
notes: string | null;
|
|
51
|
+
}
|
|
52
|
+
/** Non-secret connection settings. The OAuth credential is never among them. */
|
|
53
|
+
export interface NeoChefSettings {
|
|
54
|
+
/**
|
|
55
|
+
* The NeoChef organization the merchant picked on the consent screen.
|
|
56
|
+
*
|
|
57
|
+
* Discovered, never typed: the tenant is fixed inside the token by the
|
|
58
|
+
* consent, and this is only the label that lets the row say which kitchen.
|
|
59
|
+
*/
|
|
60
|
+
kitchenId?: string;
|
|
61
|
+
/** How far back the first backfill reaches. */
|
|
62
|
+
backfillFrom?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Who owns the stock number once NeoChef is connected.
|
|
65
|
+
*
|
|
66
|
+
* Always `neochef` today. Declared so the answer lives in the connection
|
|
67
|
+
* rather than in someone's memory — the same reason Bling declares it.
|
|
68
|
+
*/
|
|
69
|
+
stockOwner?: 'neochef' | 'shop';
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/integrations/neochef/types.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAC9B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B;AAED,6EAA6E;AAC7E,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAA;IAClB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,kEAAkE;IAClE,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC7B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED,iFAAiF;AACjF,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAC9B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IACjC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAED,yDAAyD;AACzD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,SAAS,GAAG,UAAU,CAAA;IAC5B,gBAAgB,EAAE,MAAM,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB;AAED,gFAAgF;AAChF,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;CAChC"}
|
|
@@ -57,20 +57,39 @@ export declare const VINDI_FIELDS: ConnectorField[];
|
|
|
57
57
|
* sentence to read at speed.
|
|
58
58
|
*/
|
|
59
59
|
export declare const VINDI_ENVIRONMENT_SETTING: ConnectorSetting;
|
|
60
|
+
/** Vindi's credit card id — the one method that is not paid on our page. */
|
|
61
|
+
export declare const VINDI_CARD_METHOD = "3";
|
|
60
62
|
/**
|
|
61
|
-
* Which methods the
|
|
63
|
+
* Which methods the merchant offers — commercial policy, not a credential.
|
|
62
64
|
*
|
|
63
65
|
* The values are Vindi's own `payment_method_id`, as numbers-in-strings, because
|
|
64
66
|
* that is what travels to it on the wire. A translation table between what the
|
|
65
67
|
* merchant picked and what the API accepts is one more place for a method to
|
|
66
68
|
* silently stop being offered.
|
|
67
69
|
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
70
|
+
* ── card is here, and it is NOT the same kind of thing as the others ────────
|
|
71
|
+
*
|
|
72
|
+
* Pix, Bolepix and boleto are opened by our own edge function and paid inside
|
|
73
|
+
* the store: a QR code and a barcode are public strings, so nothing sensitive
|
|
74
|
+
* is ever ours to hold.
|
|
75
|
+
*
|
|
76
|
+
* Card cannot work that way. Vindi's transparent card call takes `card_number`,
|
|
77
|
+
* `card_cvv` and the expiry in the request body, and a PAN crossing our edge
|
|
78
|
+
* function drags the whole pool into PCI scope — an audit and an architecture,
|
|
79
|
+
* not a feature. So card is opened as a CART and paid on Vindi's own page: the
|
|
80
|
+
* buyer is redirected, types the number under Vindi's certificate, and comes
|
|
81
|
+
* back. That is the cost, and it is stated to the merchant in the panel below
|
|
82
|
+
* rather than discovered by a buyer.
|
|
73
83
|
*/
|
|
74
84
|
export declare const VINDI_SETTINGS: ConnectorSetting[];
|
|
85
|
+
/**
|
|
86
|
+
* The required-to-operate list for THIS connection, which is not a constant.
|
|
87
|
+
*
|
|
88
|
+
* A merchant who enabled card owes us a postcode; one who did not, does not. A
|
|
89
|
+
* static declaration could only choose between nagging every Pix-only store
|
|
90
|
+
* forever and letting a card checkout fail at the moment of paying — and the
|
|
91
|
+
* second is a buyer's problem, which is the one kind we do not get to ship.
|
|
92
|
+
*/
|
|
93
|
+
export declare function requiredSettingsFor(settings: Record<string, unknown> | undefined): ConnectorSetting[];
|
|
75
94
|
export declare const vindiConnectorDef: ConnectorDefinition;
|
|
76
95
|
//# sourceMappingURL=connectorDef.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectorDef.d.ts","sourceRoot":"","sources":["../../../src/integrations/vindi/connectorDef.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connectorDef.d.ts","sourceRoot":"","sources":["../../../src/integrations/vindi/connectorDef.tsx"],"names":[],"mappings":"AAmCA,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,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,MAAM,CAAA;AAEpC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,cAAc,EAAE,gBAAgB,EAwD5C,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,gBAAgB,EAAE,CASrG;AAgFD,eAAO,MAAM,iBAAiB,EAAE,mBAiG/B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPage.d.ts","sourceRoot":"","sources":["../../src/views/ContentPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ContentPage.d.ts","sourceRoot":"","sources":["../../src/views/ContentPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAyCtD,MAAM,WAAW,gBAAgB;IAC/B,eAAe,CAAC,EAAE,oBAAoB,CAAA;CACvC;AAED,wBAAgB,WAAW,CAAC,EAAE,eAAe,EAAE,EAAE,gBAAgB,qBA+OhE"}
|
|
@@ -4,8 +4,20 @@ export interface NewOrderChargeProps {
|
|
|
4
4
|
open: boolean;
|
|
5
5
|
provider: () => ShopProvider;
|
|
6
6
|
sessionId: string;
|
|
7
|
-
|
|
7
|
+
/** Pix copy-and-paste. Null when the sale was closed with a link instead. */
|
|
8
|
+
emv: string | null;
|
|
8
9
|
qrcodeBase64: string | null;
|
|
10
|
+
/** The acquirer's own page — one address, sent to whoever is buying. */
|
|
11
|
+
paymentUrl?: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* WHICH acquirer opened this session.
|
|
14
|
+
*
|
|
15
|
+
* Not cosmetic: without it the settle call defaults to AbacatePay, and a store
|
|
16
|
+
* on any other gateway had its charge polled against a provider that has never
|
|
17
|
+
* heard of the transaction — a Pix that stayed "aguardando" forever while the
|
|
18
|
+
* money was already in.
|
|
19
|
+
*/
|
|
20
|
+
acquirer?: string | null;
|
|
9
21
|
total: number;
|
|
10
22
|
currency: string;
|
|
11
23
|
customerName: string;
|
|
@@ -13,5 +25,5 @@ export interface NewOrderChargeProps {
|
|
|
13
25
|
onPaid: (orderId?: string) => void;
|
|
14
26
|
onClose: () => void;
|
|
15
27
|
}
|
|
16
|
-
export declare function NewOrderCharge({ open, provider, sessionId, emv, qrcodeBase64, total, currency, customerName, customerPhone, onPaid, onClose, }: NewOrderChargeProps): React.JSX.Element;
|
|
28
|
+
export declare function NewOrderCharge({ open, provider, sessionId, emv, qrcodeBase64, paymentUrl, acquirer, total, currency, customerName, customerPhone, onPaid, onClose, }: NewOrderChargeProps): React.JSX.Element;
|
|
17
29
|
//# sourceMappingURL=NewOrderCharge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewOrderCharge.d.ts","sourceRoot":"","sources":["../../src/views/NewOrderCharge.tsx"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EAAE,mBAAmB,qBAoKrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewOrderPage.d.ts","sourceRoot":"","sources":["../../src/views/NewOrderPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"NewOrderPage.d.ts","sourceRoot":"","sources":["../../src/views/NewOrderPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAA;AAkBxE,OAAO,KAAK,EAC8C,YAAY,EACrE,MAAM,eAAe,CAAA;AAoGtB,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,qBAue7E"}
|
|
@@ -10,7 +10,16 @@ export type ChargeOutcome = 'waiting' | 'paid' | 'expired' | 'failed';
|
|
|
10
10
|
* never heard of — keeps waiting.
|
|
11
11
|
*/
|
|
12
12
|
export declare function chargeOutcome(state: CheckoutSettlement['state'] | undefined): ChargeOutcome;
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* How the merchant ends the sale they just typed.
|
|
15
|
+
*
|
|
16
|
+
* `link` is the one where nobody is present: the cart is frozen and the
|
|
17
|
+
* acquirer hands back an address to send. It is a separate ending rather than a
|
|
18
|
+
* flavour of `charge` because it asks for different things — a phone to send it
|
|
19
|
+
* to, and no document, since the customer fills that in on the acquirer's own
|
|
20
|
+
* page.
|
|
21
|
+
*/
|
|
22
|
+
export type NewOrderEnding = 'charge' | 'link' | 'received' | 'later';
|
|
14
23
|
export interface NewOrderDraft {
|
|
15
24
|
lineCount: number;
|
|
16
25
|
/** Lines whose product has options but no variant chosen yet. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new-order-rules.d.ts","sourceRoot":"","sources":["../../src/views/new-order-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAOvD,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAA;AAErE;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,GAAG,SAAS,GAAG,aAAa,CAK3F;AAED,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"new-order-rules.d.ts","sourceRoot":"","sources":["../../src/views/new-order-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAOvD,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAA;AAErE;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,GAAG,SAAS,GAAG,aAAa,CAK3F;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,CAAA;AAErE,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,iEAAiE;IACjE,kBAAkB,EAAE,MAAM,CAAA;IAC1B,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,+DAA+D;IAC/D,gBAAgB,EAAE,MAAM,CAAA;IACxB,aAAa,EAAE,OAAO,CAAA;IACtB,oEAAoE;IACpE,QAAQ,EAAE,OAAO,CAAA;IACjB,eAAe,EAAE,OAAO,CAAA;CACzB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,GAAG,IAAI,CAqC5F;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAKxD;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAG3E"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"fayz": {
|
|
4
4
|
"status": "preview"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.12.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.
|
|
31
|
-
"@fayz-ai/admin": "^0.
|
|
32
|
-
"@fayz-ai/shop": "^0.
|
|
33
|
-
"@fayz-ai/ui": "^0.
|
|
30
|
+
"@fayz-ai/core": "^0.15.0",
|
|
31
|
+
"@fayz-ai/admin": "^0.15.0",
|
|
32
|
+
"@fayz-ai/shop": "^0.15.0",
|
|
33
|
+
"@fayz-ai/ui": "^0.15.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/node": "^20.0.0",
|