@fayz-ai/sdk 0.11.0 → 0.15.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/chunk-M5CVCRIL.js +135 -0
- package/dist/chunk-M5CVCRIL.js.map +1 -0
- package/dist/{chunk-5D2B7R3U.js → chunk-QLTIO3QK.js} +76 -8
- package/dist/chunk-QLTIO3QK.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/lib/app-shell-pwa.d.ts +13 -0
- package/dist/lib/app-shell-pwa.d.ts.map +1 -0
- package/dist/lib/boot-skeleton.d.ts +21 -8
- package/dist/lib/boot-skeleton.d.ts.map +1 -1
- package/dist/lib/dedupe-fetch.d.ts.map +1 -1
- package/dist/release-channels.js +1 -1
- package/dist/release-channels.json +93 -93
- package/dist/shop.d.ts +29 -1
- package/dist/shop.d.ts.map +1 -1
- package/dist/shop.js +1 -1
- package/dist/vite.d.ts +10 -0
- package/dist/vite.d.ts.map +1 -1
- package/dist/vite.js +299 -29
- package/dist/vite.js.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-5D2B7R3U.js.map +0 -1
- package/dist/chunk-U7SC2YFQ.js +0 -135
- package/dist/chunk-U7SC2YFQ.js.map +0 -1
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// src/release-channels.json
|
|
2
|
+
var release_channels_default = {
|
|
3
|
+
channels: {
|
|
4
|
+
stable: {
|
|
5
|
+
"@fayz-ai/sdk": "^0.15.0",
|
|
6
|
+
"@fayz-ai/admin": "^0.15.0",
|
|
7
|
+
"@fayz-ai/core": "^0.15.0",
|
|
8
|
+
"@fayz-ai/auth": "^0.15.0",
|
|
9
|
+
"@fayz-ai/ui": "^0.15.0",
|
|
10
|
+
"@fayz-ai/shop": "^0.15.0",
|
|
11
|
+
"@fayz-ai/storefront": "^0.15.0",
|
|
12
|
+
"@fayz-ai/portal": "^0.15.0",
|
|
13
|
+
"@fayz-ai/courses": "^0.15.0",
|
|
14
|
+
"@fayz-ai/db": "^0.12.0",
|
|
15
|
+
"@fayz-ai/plugin-agenda": "^0.11.0",
|
|
16
|
+
"@fayz-ai/plugin-auth": "^0.11.0",
|
|
17
|
+
"@fayz-ai/plugin-automations": "^0.11.0",
|
|
18
|
+
"@fayz-ai/plugin-blog": "^0.12.3",
|
|
19
|
+
"@fayz-ai/plugin-conversations": "^0.10.0",
|
|
20
|
+
"@fayz-ai/plugin-courses": "^0.10.3",
|
|
21
|
+
"@fayz-ai/plugin-crm": "^0.10.0",
|
|
22
|
+
"@fayz-ai/plugin-dashboard": "^0.9.5",
|
|
23
|
+
"@fayz-ai/plugin-financial": "^0.11.0",
|
|
24
|
+
"@fayz-ai/plugin-forms": "^0.10.0",
|
|
25
|
+
"@fayz-ai/plugin-inventory": "^0.10.0",
|
|
26
|
+
"@fayz-ai/plugin-marketing": "^0.11.0",
|
|
27
|
+
"@fayz-ai/plugin-menu": "^0.10.0",
|
|
28
|
+
"@fayz-ai/plugin-orders": "^0.11.0",
|
|
29
|
+
"@fayz-ai/plugin-payments": "^0.9.5",
|
|
30
|
+
"@fayz-ai/plugin-reports": "^0.12.0",
|
|
31
|
+
"@fayz-ai/plugin-reputation": "^0.10.0",
|
|
32
|
+
"@fayz-ai/plugin-shop": "^0.12.0",
|
|
33
|
+
"@fayz-ai/plugin-sites": "^0.9.5",
|
|
34
|
+
"@fayz-ai/plugin-tables": "^0.10.0",
|
|
35
|
+
"@fayz-ai/plugin-tasks": "^0.10.0"
|
|
36
|
+
},
|
|
37
|
+
latest: {
|
|
38
|
+
"@fayz-ai/sdk": "^0.15.0",
|
|
39
|
+
"@fayz-ai/admin": "^0.15.0",
|
|
40
|
+
"@fayz-ai/core": "^0.15.0",
|
|
41
|
+
"@fayz-ai/auth": "^0.15.0",
|
|
42
|
+
"@fayz-ai/ui": "^0.15.0",
|
|
43
|
+
"@fayz-ai/shop": "^0.15.0",
|
|
44
|
+
"@fayz-ai/storefront": "^0.15.0",
|
|
45
|
+
"@fayz-ai/portal": "^0.15.0",
|
|
46
|
+
"@fayz-ai/courses": "^0.15.0",
|
|
47
|
+
"@fayz-ai/db": "^0.12.0",
|
|
48
|
+
"@fayz-ai/plugin-agenda": "^0.11.0",
|
|
49
|
+
"@fayz-ai/plugin-auth": "^0.11.0",
|
|
50
|
+
"@fayz-ai/plugin-automations": "^0.11.0",
|
|
51
|
+
"@fayz-ai/plugin-blog": "^0.12.3",
|
|
52
|
+
"@fayz-ai/plugin-conversations": "^0.10.0",
|
|
53
|
+
"@fayz-ai/plugin-courses": "^0.10.3",
|
|
54
|
+
"@fayz-ai/plugin-crm": "^0.10.0",
|
|
55
|
+
"@fayz-ai/plugin-dashboard": "^0.9.5",
|
|
56
|
+
"@fayz-ai/plugin-financial": "^0.11.0",
|
|
57
|
+
"@fayz-ai/plugin-forms": "^0.10.0",
|
|
58
|
+
"@fayz-ai/plugin-inventory": "^0.10.0",
|
|
59
|
+
"@fayz-ai/plugin-marketing": "^0.11.0",
|
|
60
|
+
"@fayz-ai/plugin-menu": "^0.10.0",
|
|
61
|
+
"@fayz-ai/plugin-orders": "^0.11.0",
|
|
62
|
+
"@fayz-ai/plugin-payments": "^0.9.5",
|
|
63
|
+
"@fayz-ai/plugin-reports": "^0.12.0",
|
|
64
|
+
"@fayz-ai/plugin-reputation": "^0.10.0",
|
|
65
|
+
"@fayz-ai/plugin-shop": "^0.12.0",
|
|
66
|
+
"@fayz-ai/plugin-sites": "^0.9.5",
|
|
67
|
+
"@fayz-ai/plugin-tables": "^0.10.0",
|
|
68
|
+
"@fayz-ai/plugin-tasks": "^0.10.0"
|
|
69
|
+
},
|
|
70
|
+
preview: {
|
|
71
|
+
"@fayz-ai/sdk": "^0.15.0",
|
|
72
|
+
"@fayz-ai/admin": "^0.15.0",
|
|
73
|
+
"@fayz-ai/core": "^0.15.0",
|
|
74
|
+
"@fayz-ai/auth": "^0.15.0",
|
|
75
|
+
"@fayz-ai/ui": "^0.15.0",
|
|
76
|
+
"@fayz-ai/shop": "^0.15.0",
|
|
77
|
+
"@fayz-ai/storefront": "^0.15.0",
|
|
78
|
+
"@fayz-ai/portal": "^0.15.0",
|
|
79
|
+
"@fayz-ai/courses": "^0.15.0",
|
|
80
|
+
"@fayz-ai/db": "^0.12.0",
|
|
81
|
+
"@fayz-ai/plugin-agenda": "^0.11.0",
|
|
82
|
+
"@fayz-ai/plugin-auth": "^0.11.0",
|
|
83
|
+
"@fayz-ai/plugin-automations": "^0.11.0",
|
|
84
|
+
"@fayz-ai/plugin-blog": "^0.12.3",
|
|
85
|
+
"@fayz-ai/plugin-conversations": "^0.10.0",
|
|
86
|
+
"@fayz-ai/plugin-courses": "^0.10.3",
|
|
87
|
+
"@fayz-ai/plugin-crm": "^0.10.0",
|
|
88
|
+
"@fayz-ai/plugin-dashboard": "^0.9.5",
|
|
89
|
+
"@fayz-ai/plugin-financial": "^0.11.0",
|
|
90
|
+
"@fayz-ai/plugin-forms": "^0.10.0",
|
|
91
|
+
"@fayz-ai/plugin-inventory": "^0.10.0",
|
|
92
|
+
"@fayz-ai/plugin-marketing": "^0.11.0",
|
|
93
|
+
"@fayz-ai/plugin-menu": "^0.10.0",
|
|
94
|
+
"@fayz-ai/plugin-orders": "^0.11.0",
|
|
95
|
+
"@fayz-ai/plugin-payments": "^0.9.5",
|
|
96
|
+
"@fayz-ai/plugin-reports": "^0.12.0",
|
|
97
|
+
"@fayz-ai/plugin-reputation": "^0.10.0",
|
|
98
|
+
"@fayz-ai/plugin-shop": "^0.12.0",
|
|
99
|
+
"@fayz-ai/plugin-sites": "^0.9.5",
|
|
100
|
+
"@fayz-ai/plugin-tables": "^0.10.0",
|
|
101
|
+
"@fayz-ai/plugin-tasks": "^0.10.0"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
// src/release-channels.ts
|
|
107
|
+
var releaseChannelPackages = release_channels_default.channels;
|
|
108
|
+
function buildVersionSet(channel) {
|
|
109
|
+
return {
|
|
110
|
+
channel,
|
|
111
|
+
packages: { ...releaseChannelPackages[channel] }
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
var fayzPackageVersionSets = {
|
|
115
|
+
stable: buildVersionSet("stable"),
|
|
116
|
+
latest: buildVersionSet("latest"),
|
|
117
|
+
preview: buildVersionSet("preview")
|
|
118
|
+
};
|
|
119
|
+
function resolveFayzPackageVersions(channel = "stable") {
|
|
120
|
+
return fayzPackageVersionSets[channel];
|
|
121
|
+
}
|
|
122
|
+
function resolveFayzPackageDependencies(channel = "stable") {
|
|
123
|
+
return { ...resolveFayzPackageVersions(channel).packages };
|
|
124
|
+
}
|
|
125
|
+
function resolveFayzPackageVersion(packageName, channel = "stable") {
|
|
126
|
+
const version = resolveFayzPackageVersions(channel).packages[packageName];
|
|
127
|
+
if (!version) {
|
|
128
|
+
throw new Error(`No Fayz package version configured for ${packageName} in ${channel} channel`);
|
|
129
|
+
}
|
|
130
|
+
return version;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export { fayzPackageVersionSets, resolveFayzPackageDependencies, resolveFayzPackageVersion, resolveFayzPackageVersions };
|
|
134
|
+
//# sourceMappingURL=chunk-M5CVCRIL.js.map
|
|
135
|
+
//# sourceMappingURL=chunk-M5CVCRIL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/release-channels.json","../src/release-channels.ts"],"names":[],"mappings":";AAAA,IAAA,wBAAA,GAAA;AAAA,EACE,QAAA,EAAY;AAAA,IACV,MAAA,EAAU;AAAA,MACR,cAAA,EAAgB,SAAA;AAAA,MAChB,gBAAA,EAAkB,SAAA;AAAA,MAClB,eAAA,EAAiB,SAAA;AAAA,MACjB,eAAA,EAAiB,SAAA;AAAA,MACjB,aAAA,EAAe,SAAA;AAAA,MACf,eAAA,EAAiB,SAAA;AAAA,MACjB,qBAAA,EAAuB,SAAA;AAAA,MACvB,iBAAA,EAAmB,SAAA;AA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,CAAA,QAAA,CAAU,CAAA;AAAA,EAC/F;AAEA,EAAA,OAAO,OAAA;AACT","file":"chunk-M5CVCRIL.js","sourcesContent":["{\n \"channels\": {\n \"stable\": {\n \"@fayz-ai/sdk\": \"^0.15.0\",\n \"@fayz-ai/admin\": \"^0.15.0\",\n \"@fayz-ai/core\": \"^0.15.0\",\n \"@fayz-ai/auth\": \"^0.15.0\",\n \"@fayz-ai/ui\": \"^0.15.0\",\n \"@fayz-ai/shop\": \"^0.15.0\",\n \"@fayz-ai/storefront\": \"^0.15.0\",\n \"@fayz-ai/portal\": \"^0.15.0\",\n \"@fayz-ai/courses\": \"^0.15.0\",\n \"@fayz-ai/db\": \"^0.12.0\",\n \"@fayz-ai/plugin-agenda\": \"^0.11.0\",\n \"@fayz-ai/plugin-auth\": \"^0.11.0\",\n \"@fayz-ai/plugin-automations\": \"^0.11.0\",\n \"@fayz-ai/plugin-blog\": \"^0.12.3\",\n \"@fayz-ai/plugin-conversations\": \"^0.10.0\",\n \"@fayz-ai/plugin-courses\": \"^0.10.3\",\n \"@fayz-ai/plugin-crm\": \"^0.10.0\",\n \"@fayz-ai/plugin-dashboard\": \"^0.9.5\",\n \"@fayz-ai/plugin-financial\": \"^0.11.0\",\n \"@fayz-ai/plugin-forms\": \"^0.10.0\",\n \"@fayz-ai/plugin-inventory\": \"^0.10.0\",\n \"@fayz-ai/plugin-marketing\": \"^0.11.0\",\n \"@fayz-ai/plugin-menu\": \"^0.10.0\",\n \"@fayz-ai/plugin-orders\": \"^0.11.0\",\n \"@fayz-ai/plugin-payments\": \"^0.9.5\",\n \"@fayz-ai/plugin-reports\": \"^0.12.0\",\n \"@fayz-ai/plugin-reputation\": \"^0.10.0\",\n \"@fayz-ai/plugin-shop\": \"^0.12.0\",\n \"@fayz-ai/plugin-sites\": \"^0.9.5\",\n \"@fayz-ai/plugin-tables\": \"^0.10.0\",\n \"@fayz-ai/plugin-tasks\": \"^0.10.0\"\n },\n \"latest\": {\n \"@fayz-ai/sdk\": \"^0.15.0\",\n \"@fayz-ai/admin\": \"^0.15.0\",\n \"@fayz-ai/core\": \"^0.15.0\",\n \"@fayz-ai/auth\": \"^0.15.0\",\n \"@fayz-ai/ui\": \"^0.15.0\",\n \"@fayz-ai/shop\": \"^0.15.0\",\n \"@fayz-ai/storefront\": \"^0.15.0\",\n \"@fayz-ai/portal\": \"^0.15.0\",\n \"@fayz-ai/courses\": \"^0.15.0\",\n \"@fayz-ai/db\": \"^0.12.0\",\n \"@fayz-ai/plugin-agenda\": \"^0.11.0\",\n \"@fayz-ai/plugin-auth\": \"^0.11.0\",\n \"@fayz-ai/plugin-automations\": \"^0.11.0\",\n \"@fayz-ai/plugin-blog\": \"^0.12.3\",\n \"@fayz-ai/plugin-conversations\": \"^0.10.0\",\n \"@fayz-ai/plugin-courses\": \"^0.10.3\",\n \"@fayz-ai/plugin-crm\": \"^0.10.0\",\n \"@fayz-ai/plugin-dashboard\": \"^0.9.5\",\n \"@fayz-ai/plugin-financial\": \"^0.11.0\",\n \"@fayz-ai/plugin-forms\": \"^0.10.0\",\n \"@fayz-ai/plugin-inventory\": \"^0.10.0\",\n \"@fayz-ai/plugin-marketing\": \"^0.11.0\",\n \"@fayz-ai/plugin-menu\": \"^0.10.0\",\n \"@fayz-ai/plugin-orders\": \"^0.11.0\",\n \"@fayz-ai/plugin-payments\": \"^0.9.5\",\n \"@fayz-ai/plugin-reports\": \"^0.12.0\",\n \"@fayz-ai/plugin-reputation\": \"^0.10.0\",\n \"@fayz-ai/plugin-shop\": \"^0.12.0\",\n \"@fayz-ai/plugin-sites\": \"^0.9.5\",\n \"@fayz-ai/plugin-tables\": \"^0.10.0\",\n \"@fayz-ai/plugin-tasks\": \"^0.10.0\"\n },\n \"preview\": {\n \"@fayz-ai/sdk\": \"^0.15.0\",\n \"@fayz-ai/admin\": \"^0.15.0\",\n \"@fayz-ai/core\": \"^0.15.0\",\n \"@fayz-ai/auth\": \"^0.15.0\",\n \"@fayz-ai/ui\": \"^0.15.0\",\n \"@fayz-ai/shop\": \"^0.15.0\",\n \"@fayz-ai/storefront\": \"^0.15.0\",\n \"@fayz-ai/portal\": \"^0.15.0\",\n \"@fayz-ai/courses\": \"^0.15.0\",\n \"@fayz-ai/db\": \"^0.12.0\",\n \"@fayz-ai/plugin-agenda\": \"^0.11.0\",\n \"@fayz-ai/plugin-auth\": \"^0.11.0\",\n \"@fayz-ai/plugin-automations\": \"^0.11.0\",\n \"@fayz-ai/plugin-blog\": \"^0.12.3\",\n \"@fayz-ai/plugin-conversations\": \"^0.10.0\",\n \"@fayz-ai/plugin-courses\": \"^0.10.3\",\n \"@fayz-ai/plugin-crm\": \"^0.10.0\",\n \"@fayz-ai/plugin-dashboard\": \"^0.9.5\",\n \"@fayz-ai/plugin-financial\": \"^0.11.0\",\n \"@fayz-ai/plugin-forms\": \"^0.10.0\",\n \"@fayz-ai/plugin-inventory\": \"^0.10.0\",\n \"@fayz-ai/plugin-marketing\": \"^0.11.0\",\n \"@fayz-ai/plugin-menu\": \"^0.10.0\",\n \"@fayz-ai/plugin-orders\": \"^0.11.0\",\n \"@fayz-ai/plugin-payments\": \"^0.9.5\",\n \"@fayz-ai/plugin-reports\": \"^0.12.0\",\n \"@fayz-ai/plugin-reputation\": \"^0.10.0\",\n \"@fayz-ai/plugin-shop\": \"^0.12.0\",\n \"@fayz-ai/plugin-sites\": \"^0.9.5\",\n \"@fayz-ai/plugin-tables\": \"^0.10.0\",\n \"@fayz-ai/plugin-tasks\": \"^0.10.0\"\n }\n }\n}\n","import releaseChannels from './release-channels.json'\n\nexport type FayzPackageChannel = 'stable' | 'latest' | 'preview'\n\nexport interface FayzPackageVersionSet {\n channel: FayzPackageChannel\n packages: Record<string, string>\n}\n\nconst releaseChannelPackages = releaseChannels.channels as Record<FayzPackageChannel, Record<string, string>>\n\nfunction buildVersionSet(channel: FayzPackageChannel): FayzPackageVersionSet {\n return {\n channel,\n packages: { ...releaseChannelPackages[channel] },\n }\n}\n\nexport const fayzPackageVersionSets: Record<FayzPackageChannel, FayzPackageVersionSet> = {\n stable: buildVersionSet('stable'),\n latest: buildVersionSet('latest'),\n preview: buildVersionSet('preview'),\n}\n\nexport function resolveFayzPackageVersions(channel: FayzPackageChannel = 'stable'): FayzPackageVersionSet {\n return fayzPackageVersionSets[channel]\n}\n\nexport function resolveFayzPackageDependencies(channel: FayzPackageChannel = 'stable'): Record<string, string> {\n return { ...resolveFayzPackageVersions(channel).packages }\n}\n\nexport function resolveFayzPackageVersion(packageName: string, channel: FayzPackageChannel = 'stable'): string {\n const version = resolveFayzPackageVersions(channel).packages[packageName]\n\n if (!version) {\n throw new Error(`No Fayz package version configured for ${packageName} in ${channel} channel`)\n }\n\n return version\n}\n"]}
|
|
@@ -16,7 +16,11 @@ var DEFAULT_VARY = [
|
|
|
16
16
|
// count=exact changes Content-Range
|
|
17
17
|
"x-fayz-store",
|
|
18
18
|
// storefront tenant scope
|
|
19
|
-
"x-fayz-tenant"
|
|
19
|
+
"x-fayz-tenant",
|
|
20
|
+
// The active unit. Load-bearing, not decorative: two reads of the SAME url
|
|
21
|
+
// under different units are different questions, and without this line the
|
|
22
|
+
// second one joins the first and a franchisee is handed another unit's rows.
|
|
23
|
+
"x-fayz-unit"
|
|
20
24
|
];
|
|
21
25
|
var collapsed = 0;
|
|
22
26
|
var flights = /* @__PURE__ */ new Map();
|
|
@@ -86,6 +90,15 @@ function setShopAccessTokenResolver(resolver) {
|
|
|
86
90
|
}
|
|
87
91
|
var CARRIER_QUOTE_BUDGET_MS = 2500;
|
|
88
92
|
var CARRIER_OPTION_SEPARATOR = "::";
|
|
93
|
+
var CHECKOUT_GATEWAYS = {
|
|
94
|
+
abacatepay: { open: "shop-checkout-open", settle: "shop-checkout-settle", link: false },
|
|
95
|
+
vindi: { open: "vindi-checkout-open", settle: "vindi-checkout-settle", link: true }
|
|
96
|
+
};
|
|
97
|
+
function checkoutGateway(provider) {
|
|
98
|
+
const slug = String(provider ?? "").trim();
|
|
99
|
+
if (!slug) return null;
|
|
100
|
+
return CHECKOUT_GATEWAYS[slug] ?? null;
|
|
101
|
+
}
|
|
89
102
|
var _shippingItemsResolver = null;
|
|
90
103
|
function setShopShippingItemsResolver(resolver) {
|
|
91
104
|
_shippingItemsResolver = resolver;
|
|
@@ -646,7 +659,35 @@ function createFayzShopProvider(options) {
|
|
|
646
659
|
* its own — `settleCheckoutSession` is what turns it into an order, and only
|
|
647
660
|
* after the acquirer says the money is in.
|
|
648
661
|
*/
|
|
662
|
+
/**
|
|
663
|
+
* Remember the contact details of whoever is signed in.
|
|
664
|
+
*
|
|
665
|
+
* Called when the buyer leaves the contact step rather than when an order
|
|
666
|
+
* completes: an abandoned checkout teaches the store nothing, and the person
|
|
667
|
+
* who most needs their phone remembered is the one who did not finish. The
|
|
668
|
+
* function decides which columns may be written and to whose row — a shopper
|
|
669
|
+
* is not a tenant member, so there is no policy that would let this be a
|
|
670
|
+
* plain UPDATE, and RLS could not narrow one to two columns anyway.
|
|
671
|
+
*/
|
|
672
|
+
async saveCustomerContact(input) {
|
|
673
|
+
try {
|
|
674
|
+
await request("rpc/shop_save_customer_contact", {
|
|
675
|
+
method: "POST",
|
|
676
|
+
body: JSON.stringify({
|
|
677
|
+
p_tenant_id: storeId,
|
|
678
|
+
p_phone: input.phone ?? null,
|
|
679
|
+
p_document: input.document ?? null
|
|
680
|
+
})
|
|
681
|
+
});
|
|
682
|
+
} catch {
|
|
683
|
+
}
|
|
684
|
+
},
|
|
649
685
|
async openCheckoutSession(input) {
|
|
686
|
+
const provider = String(input.provider ?? "").trim() || "abacatepay";
|
|
687
|
+
const gateway = checkoutGateway(provider);
|
|
688
|
+
if (!gateway) {
|
|
689
|
+
throw new FayzShopError("Esta loja ainda n\xE3o recebe pagamento online.", 404);
|
|
690
|
+
}
|
|
650
691
|
const body = JSON.stringify({
|
|
651
692
|
tenantId: storeId,
|
|
652
693
|
items: input.items.map((item) => ({
|
|
@@ -656,9 +697,19 @@ function createFayzShopProvider(options) {
|
|
|
656
697
|
})),
|
|
657
698
|
customer: input.customer,
|
|
658
699
|
shippingAddress: input.shippingAddress ?? null,
|
|
659
|
-
discountCode: input.discountCode ?? null
|
|
700
|
+
discountCode: input.discountCode ?? null,
|
|
701
|
+
// O que o comprador escolheu, no vocabulário da loja. Quem traduz para
|
|
702
|
+
// o número do adquirente é a função, do lado de lá, onde também mora a
|
|
703
|
+
// lista do que o lojista habilitou.
|
|
704
|
+
method: input.paymentMethod ?? null,
|
|
705
|
+
// Para onde o adquirente devolve quem pagou fora daqui. A função confere
|
|
706
|
+
// este endereço contra a origem de quem pediu: é uma URL que entregamos
|
|
707
|
+
// a terceiro, e terceiro nenhum redireciona comprador nosso para onde
|
|
708
|
+
// quiser.
|
|
709
|
+
returnUrl: input.returnUrl ?? null,
|
|
710
|
+
asLink: input.asLink === true
|
|
660
711
|
});
|
|
661
|
-
const response = await (options.fetcher ?? fetch)(`${functionsUrl}
|
|
712
|
+
const response = await (options.fetcher ?? fetch)(`${functionsUrl}/${gateway.open}`, {
|
|
662
713
|
method: "POST",
|
|
663
714
|
headers: { apikey: key, Authorization: `Bearer ${key}`, "Content-Type": "application/json" },
|
|
664
715
|
body
|
|
@@ -674,6 +725,12 @@ function createFayzShopProvider(options) {
|
|
|
674
725
|
sessionId: payload.sessionId,
|
|
675
726
|
total: Number(payload.total ?? 0),
|
|
676
727
|
state: "open",
|
|
728
|
+
provider,
|
|
729
|
+
method: payload.method ?? input.paymentMethod ?? null,
|
|
730
|
+
// A página do adquirente: o link que o lojista manda e o endereço para
|
|
731
|
+
// onde o comprador de cartão é levado. São a mesma coisa vista de dois
|
|
732
|
+
// lugares — quem chama decide se copia ou se vai.
|
|
733
|
+
paymentUrl: payload.redirectUrl ?? payload.paymentUrl ?? null,
|
|
677
734
|
charge: payload.brCode ? {
|
|
678
735
|
emv: payload.brCode,
|
|
679
736
|
// O tipo promete base64 PURO, e a AbacatePay manda com o
|
|
@@ -681,6 +738,12 @@ function createFayzShopProvider(options) {
|
|
|
681
738
|
// Sem tirar aqui, a tela prefixava de novo e o QR não aparecia —
|
|
682
739
|
// um <img> com src inválido, silencioso.
|
|
683
740
|
qrcodeBase64: (payload.brCodeBase64 ?? "").replace(/^data:image\/\w+;base64,/u, "") || null,
|
|
741
|
+
// Vindi hosts the QR instead of inlining it, so the image arrives
|
|
742
|
+
// as an https URL to an SVG. It travels beside the base64 rather
|
|
743
|
+
// than inside it: the two cannot be told apart at the point of use
|
|
744
|
+
// without guessing at the string, and drawing either as the other
|
|
745
|
+
// is a silently broken <img> in front of someone trying to pay.
|
|
746
|
+
qrcodeUrl: String(payload.qrCodeUrl ?? "").trim() || null,
|
|
684
747
|
expiresAt: payload.expiresAt ?? ""
|
|
685
748
|
} : null
|
|
686
749
|
};
|
|
@@ -690,12 +753,17 @@ function createFayzShopProvider(options) {
|
|
|
690
753
|
* read as "still waiting" (`unknown`) and never as a payment that failed —
|
|
691
754
|
* one wrong `failed` here throws away a cart the buyer already paid for.
|
|
692
755
|
*/
|
|
693
|
-
async settleCheckoutSession(sessionId) {
|
|
756
|
+
async settleCheckoutSession(sessionId, provider, chargeToken) {
|
|
757
|
+
const gateway = checkoutGateway(String(provider ?? "").trim() || "abacatepay");
|
|
758
|
+
if (!gateway) return { state: "unknown" };
|
|
694
759
|
try {
|
|
695
|
-
const response = await (options.fetcher ?? fetch)(`${functionsUrl}
|
|
760
|
+
const response = await (options.fetcher ?? fetch)(`${functionsUrl}/${gateway.settle}`, {
|
|
696
761
|
method: "POST",
|
|
697
762
|
headers: { apikey: key, Authorization: `Bearer ${key}`, "Content-Type": "application/json" },
|
|
698
|
-
|
|
763
|
+
// `chargeToken` é PISTA, nunca afirmação: o adquirente pendura o token
|
|
764
|
+
// na volta do comprador, e o servidor confere com ele antes de aceitar.
|
|
765
|
+
// Serve para fechar a compra na hora em vez de esperar o webhook.
|
|
766
|
+
body: JSON.stringify({ tenantId: storeId, sessionId, ...chargeToken ? { chargeToken } : {} })
|
|
699
767
|
});
|
|
700
768
|
const payload = await response.json().catch(() => null);
|
|
701
769
|
if (!response.ok || !payload?.state) return { state: "unknown" };
|
|
@@ -1268,5 +1336,5 @@ function createBrokerShopProvider(options) {
|
|
|
1268
1336
|
}
|
|
1269
1337
|
|
|
1270
1338
|
export { FayzShopError, PRODUCT_METADATA_OVERLAY_DEPRECATION, createDedupedFetch, createFayzShopProvider, getDedupeStats, resetDedupeStats, resetProductMetadataOverlayDeprecationWarning, setShopAccessTokenResolver, setShopCarrierQuotesResolver, setShopShippingItemsResolver };
|
|
1271
|
-
//# sourceMappingURL=chunk-
|
|
1272
|
-
//# sourceMappingURL=chunk-
|
|
1339
|
+
//# sourceMappingURL=chunk-QLTIO3QK.js.map
|
|
1340
|
+
//# sourceMappingURL=chunk-QLTIO3QK.js.map
|