@credenza3/passport-sui 0.1.10 → 0.1.12

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.
Files changed (88) hide show
  1. package/dist/{App-BgNenBZk.js → App-CCqleyA9.js} +18 -18
  2. package/dist/{App-BgNenBZk.js.map → App-CCqleyA9.js.map} +1 -1
  3. package/dist/{Button-OHov6eXd.js → Button-DAy_umSd.js} +4 -4
  4. package/dist/{Button-OHov6eXd.js.map → Button-DAy_umSd.js.map} +1 -1
  5. package/dist/{ButtonBack-tT2V5PQf.js → ButtonBack-BkUKUIsw.js} +4 -4
  6. package/dist/{ButtonBack-tT2V5PQf.js.map → ButtonBack-BkUKUIsw.js.map} +1 -1
  7. package/dist/{ButtonLink-BcNeNAnT.js → ButtonLink-dIXfKKup.js} +3 -3
  8. package/dist/{ButtonLink-BcNeNAnT.js.map → ButtonLink-dIXfKKup.js.map} +1 -1
  9. package/dist/{ConfirmAccount-B9g7gpaB.js → ConfirmAccount-B7b6KLqs.js} +9 -9
  10. package/dist/{ConfirmAccount-B9g7gpaB.js.map → ConfirmAccount-B7b6KLqs.js.map} +1 -1
  11. package/dist/{ContentHeader-CN5mY_EI.js → ContentHeader-CVumJwvG.js} +3 -3
  12. package/dist/{ContentHeader-CN5mY_EI.js.map → ContentHeader-CVumJwvG.js.map} +1 -1
  13. package/dist/{Error-C1Y4N30A.js → Error-DcbLpmXf.js} +5 -5
  14. package/dist/{Error-C1Y4N30A.js.map → Error-DcbLpmXf.js.map} +1 -1
  15. package/dist/{Input-C7c35Njj.js → Input-BHT27RVM.js} +4 -4
  16. package/dist/{Input-C7c35Njj.js.map → Input-BHT27RVM.js.map} +1 -1
  17. package/dist/{Label-DcMHoGi2.js → Label-Bf8cAqMv.js} +3 -3
  18. package/dist/{Label-DcMHoGi2.js.map → Label-Bf8cAqMv.js.map} +1 -1
  19. package/dist/{Loader-hEgPdNjW.js → Loader-Ck8Qf90h.js} +3 -3
  20. package/dist/{Loader-hEgPdNjW.js.map → Loader-Ck8Qf90h.js.map} +1 -1
  21. package/dist/{Login-CLbnawha.js → Login-DmuALQOZ.js} +9 -9
  22. package/dist/{Login-CLbnawha.js.map → Login-DmuALQOZ.js.map} +1 -1
  23. package/dist/Logout-DtZQa3PS.js +96 -0
  24. package/dist/Logout-DtZQa3PS.js.map +1 -0
  25. package/dist/{Nav-CMk6wqla.js → Nav-hlhnBpCA.js} +5 -5
  26. package/dist/{Nav-CMk6wqla.js.map → Nav-hlhnBpCA.js.map} +1 -1
  27. package/dist/{PassportId-Dq93qrlP.js → PassportId-CT8seyyl.js} +7 -7
  28. package/dist/{PassportId-Dq93qrlP.js.map → PassportId-CT8seyyl.js.map} +1 -1
  29. package/dist/Payment-BNT5dOy3.js +1179 -0
  30. package/dist/Payment-BNT5dOy3.js.map +1 -0
  31. package/dist/PaymentResult-iREwxUTO.js +292 -0
  32. package/dist/PaymentResult-iREwxUTO.js.map +1 -0
  33. package/dist/{Profile-CHAGS1Rz.js → Profile-G2t70NsO.js} +7 -7
  34. package/dist/{Profile-CHAGS1Rz.js.map → Profile-G2t70NsO.js.map} +1 -1
  35. package/dist/{ProgressVideo-CyHro4TM.js → ProgressVideo-oh7nRG8_.js} +6 -6
  36. package/dist/{ProgressVideo-CyHro4TM.js.map → ProgressVideo-oh7nRG8_.js.map} +1 -1
  37. package/dist/{ProgressVideo.service-C5ZBidgs.js → ProgressVideo.service-CVnZS8ec.js} +2 -2
  38. package/dist/{ProgressVideo.service-C5ZBidgs.js.map → ProgressVideo.service-CVnZS8ec.js.map} +1 -1
  39. package/dist/{RichAlert-DOXrdOSp.js → RichAlert-17dhVxyd.js} +13 -13
  40. package/dist/{RichAlert-DOXrdOSp.js.map → RichAlert-17dhVxyd.js.map} +1 -1
  41. package/dist/{Scanner-CP7zZLmb.js → Scanner-B_IyknFU.js} +32 -32
  42. package/dist/{Scanner-CP7zZLmb.js.map → Scanner-B_IyknFU.js.map} +1 -1
  43. package/dist/{SendTokens-DcWtNKZU.js → SendTokens-_Zq1xtui.js} +7 -7
  44. package/dist/{SendTokens-DcWtNKZU.js.map → SendTokens-_Zq1xtui.js.map} +1 -1
  45. package/dist/{Sign-CVIrZkub.js → Sign-D20a5-Eh.js} +7 -7
  46. package/dist/{Sign-CVIrZkub.js.map → Sign-D20a5-Eh.js.map} +1 -1
  47. package/dist/Stripe.service-d8J1Nj0-.js +13 -0
  48. package/dist/Stripe.service-d8J1Nj0-.js.map +1 -0
  49. package/dist/{UpdateProfile-CPUOEBMo.js → UpdateProfile-BS4vHKox.js} +10 -10
  50. package/dist/{UpdateProfile-CPUOEBMo.js.map → UpdateProfile-BS4vHKox.js.map} +1 -1
  51. package/dist/{UserInfo-wgTHlE5j.js → UserInfo-FF1YiHB_.js} +4 -4
  52. package/dist/{UserInfo-wgTHlE5j.js.map → UserInfo-FF1YiHB_.js.map} +1 -1
  53. package/dist/{Wallet-BEmYMCut.js → Wallet-CLL_Ao5n.js} +8 -8
  54. package/dist/{Wallet-BEmYMCut.js.map → Wallet-CLL_Ao5n.js.map} +1 -1
  55. package/dist/{each-sGAWFUwm.js → each-ChczGHVd.js} +10 -10
  56. package/dist/{each-sGAWFUwm.js.map → each-ChczGHVd.js.map} +1 -1
  57. package/dist/{html-nUzEbV7C.js → html-BIHkWqNq.js} +3 -3
  58. package/dist/{html-nUzEbV7C.js.map → html-BIHkWqNq.js.map} +1 -1
  59. package/dist/{index-By5ED3Yb.js → index-Cpr_yChD.js} +9090 -8989
  60. package/dist/index-Cpr_yChD.js.map +1 -0
  61. package/dist/{index-client-BsxnbQnl.js → index-client-CJ3dIYTW.js} +2 -2
  62. package/dist/{index-client-BsxnbQnl.js.map → index-client-CJ3dIYTW.js.map} +1 -1
  63. package/dist/{input-J57TPqRp.js → input-BJ8poX2h.js} +3 -3
  64. package/dist/{input-J57TPqRp.js.map → input-BJ8poX2h.js.map} +1 -1
  65. package/dist/{legacy-DjyLhwW_.js → legacy-YR9wiUnf.js} +2 -2
  66. package/dist/{legacy-DjyLhwW_.js.map → legacy-YR9wiUnf.js.map} +1 -1
  67. package/dist/passport.es.js +1 -1
  68. package/dist/passport.umd.js +156 -154
  69. package/dist/passport.umd.js.map +1 -1
  70. package/dist/{socket-io-CvJnsIiD.js → socket-io-DDnfOdoo.js} +2 -2
  71. package/dist/{socket-io-CvJnsIiD.js.map → socket-io-DDnfOdoo.js.map} +1 -1
  72. package/dist/types/app/pages/payment/Payment.service.d.ts +12 -0
  73. package/dist/types/app/pages/payment/oder.types.d.ts +8 -0
  74. package/dist/types/app/pages/payment/order.service.d.ts +4 -0
  75. package/dist/types/app/pages/payment/payment.constants.d.ts +1 -0
  76. package/dist/types/app/pages/payment/paystack/Paystack.svelte.d.ts +1 -0
  77. package/dist/types/app/pages/payment/stripe/Stripe.service.d.ts +1 -2
  78. package/dist/types/app/pages/payment/stripe/stripe.helper.d.ts +6 -10
  79. package/package.json +1 -1
  80. package/dist/Logout-C7UvmtHw.js +0 -96
  81. package/dist/Logout-C7UvmtHw.js.map +0 -1
  82. package/dist/Payment-D_PmGbx9.js +0 -990
  83. package/dist/Payment-D_PmGbx9.js.map +0 -1
  84. package/dist/PaymentResult-DKsYHo0Y.js +0 -330
  85. package/dist/PaymentResult-DKsYHo0Y.js.map +0 -1
  86. package/dist/Stripe.service-ChsNBYNx.js +0 -77
  87. package/dist/Stripe.service-ChsNBYNx.js.map +0 -1
  88. package/dist/index-By5ED3Yb.js.map +0 -1
@@ -1,3 +1,5 @@
1
+ import { TPaymentAsset } from './payment.constants';
2
+ import { TPaymentReturn } from '../../../../../utils/types';
1
3
  export declare const requestSuiReceipt: ({ stripeChargeId, title, digest, subtitle, amount, currency, }: {
2
4
  stripeChargeId?: string;
3
5
  digest?: string;
@@ -6,3 +8,13 @@ export declare const requestSuiReceipt: ({ stripeChargeId, title, digest, subtit
6
8
  title: string;
7
9
  subtitle: string;
8
10
  }) => Promise<boolean>;
11
+ export declare const afterPaymentProcess: ({ res, priceCents, purchaseConfig }: {
12
+ res: TPaymentReturn;
13
+ priceCents: number;
14
+ purchaseConfig: {
15
+ assets: TPaymentAsset[];
16
+ title: string;
17
+ subtitle: string;
18
+ };
19
+ }) => Promise<void>;
20
+ export declare const enrichAssetsWithMetadata: (items: TPaymentReturn["items"]) => Promise<void>;
@@ -0,0 +1,8 @@
1
+ import { TPaymentAsset } from './payment.constants';
2
+ export type TBasicPaymentData = {
3
+ assets: TPaymentAsset[];
4
+ card_token?: string;
5
+ payment_provider: string;
6
+ client_id: string;
7
+ currency: string;
8
+ };
@@ -0,0 +1,4 @@
1
+ import { TBasicPaymentData } from './oder.types';
2
+ import { TPaymentReturn } from '../../../../../utils/types';
3
+ export declare const createOrder: (paymentData: TBasicPaymentData) => Promise<string>;
4
+ export declare const processOrder: (orderId: string) => Promise<TPaymentReturn>;
@@ -9,4 +9,5 @@ export type TPaymentAsset = {
9
9
  packageId: string;
10
10
  amount?: number;
11
11
  assetId?: string;
12
+ metadata?: any;
12
13
  };
@@ -0,0 +1 @@
1
+ export { SvelteComponent as default } from 'svelte';
@@ -1,3 +1,2 @@
1
1
  import { TPaymentAsset } from '../payment.constants';
2
- import { TPaymentReturn } from '../../../../../../utils/types';
3
- export declare const processPayment: (stripeTokenId: string, asset: TPaymentAsset) => Promise<TPaymentReturn>;
2
+ export declare const processPayment: (stripeTokenId: string, assets: TPaymentAsset[]) => Promise<import('../../../../../../utils/types').TPaymentReturn>;
@@ -1,12 +1,8 @@
1
1
  import { TPaymentAsset } from '../payment.constants';
2
- export declare const getEdpointUrlByAssetType: (assetType: string) => string;
3
- export declare const buildPaymentDataByAssetType: (stripeTokenId: string, asset: TPaymentAsset) => {
4
- source: string;
2
+ export declare const buildPaymentData: (stripeTokenId: string, assets: TPaymentAsset[]) => Promise<{
3
+ assets: TPaymentAsset[];
5
4
  card_token: string;
6
- membership_type?: string;
7
- token_type?: string;
8
- coin_type?: string;
9
- asset_id?: string;
10
- asset_type: string;
11
- amount?: number;
12
- };
5
+ client_id: string;
6
+ payment_provider: string;
7
+ currency: string;
8
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@credenza3/passport-sui",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "type": "module",
5
5
  "description": "Credenza Passport",
6
6
  "types": "dist/types/index.d.ts",
@@ -1,96 +0,0 @@
1
- import { c as v, p as B, f as q, b as z, d as h, u as w, h as E } from "./legacy-DjyLhwW_.js";
2
- import { v as C, y as H, E as I, z as x, u as K, L as y, $ as N, N as T, K as j, I as A } from "./index-By5ED3Yb.js";
3
- import { C as D } from "./App-BgNenBZk.js";
4
- import { C as F } from "./ContentHeader-CN5mY_EI.js";
5
- import { B as G } from "./Button-OHov6eXd.js";
6
- var J = q("<!> <!>", 1);
7
- function k(r, s) {
8
- if (new.target) return v({ component: k, ...r });
9
- C(s, !1);
10
- let a = B(s, "options", 12), { title: c, description: d, onClick: g } = a();
11
- var f = J(), l = H(f);
12
- F(l, {
13
- get text() {
14
- return c;
15
- },
16
- get description() {
17
- return d;
18
- }
19
- });
20
- var o = I(l, 2);
21
- return D(o, {
22
- children: (t, n) => {
23
- G(t, {
24
- text: "Sign out now",
25
- get onClick() {
26
- return g;
27
- }
28
- });
29
- },
30
- $$slots: { default: !0 }
31
- }), z(r, f), x({
32
- get options() {
33
- return a();
34
- },
35
- set options(t) {
36
- a(t), K();
37
- },
38
- $set: w,
39
- $on: (t, n) => h(s, t, n)
40
- });
41
- }
42
- function M(r, s) {
43
- if (new.target) return v({ component: M, ...r });
44
- C(s, !1);
45
- var a = this && this.__awaiter || function(o, t, n, e) {
46
- function L(u) {
47
- return u instanceof n ? u : new n(function(p) {
48
- p(u);
49
- });
50
- }
51
- return new (n || (n = Promise))(function(u, p) {
52
- function S(i) {
53
- try {
54
- m(e.next(i));
55
- } catch (_) {
56
- p(_);
57
- }
58
- }
59
- function b(i) {
60
- try {
61
- m(e.throw(i));
62
- } catch (_) {
63
- p(_);
64
- }
65
- }
66
- function m(i) {
67
- i.done ? u(i.value) : L(i.value).then(S, b);
68
- }
69
- m((e = e.apply(o, t || [])).next());
70
- });
71
- };
72
- const c = y(N), { logout: d, close: g } = y(T), f = () => a(void 0, void 0, void 0, function* () {
73
- d(), g();
74
- });
75
- E();
76
- const l = A(() => {
77
- var o, t, n, e;
78
- return {
79
- title: ((t = (o = c.content) == null ? void 0 : o.logout) == null ? void 0 : t.title) || "Sign out",
80
- description: ((e = (n = c.content) == null ? void 0 : n.logout) == null ? void 0 : e.description) || "This will sign you out and you will be asked to verify your identity next time you sign in.",
81
- onClick: f
82
- };
83
- });
84
- return k(r, {
85
- get options() {
86
- return j(l);
87
- }
88
- }), x({
89
- $set: w,
90
- $on: (o, t) => h(s, o, t)
91
- });
92
- }
93
- export {
94
- M as default
95
- };
96
- //# sourceMappingURL=Logout-C7UvmtHw.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Logout-C7UvmtHw.js","sources":["../../ui/main/logout/Logout.svelte","../src/app/pages/logout/Logout.svelte"],"sourcesContent":["<script lang=\"ts\">\n import Container from \"../shared/Container.svelte\";\n import ContentHeader from \"../shared/ContentHeader.svelte\";\n import Button from \"../shared/inputs/button/Button.svelte\";\n\n export let options: {\n title: string;\n description: string;\n onClick: () => Promise<void>;\n };\n\n let { title, description, onClick } = options;\n</script>\n\n<ContentHeader text={title} {description} />\n\n<Container>\n <Button text=\"Sign out now\" {onClick} />\n</Container>\n","<script lang=\"ts\">\n import { get } from 'svelte/store'\n import { fn } from '@packages/stores'\n import { Logout } from '@packages/ui'\n import { configStore } from '@src/stores/config'\n\n const config = get(configStore)\n const { logout, close } = get(fn)\n\n const executeLogout = async () => {\n logout()\n close()\n }\n</script>\n\n<Logout\n options={{\n title: config.content?.logout?.title || 'Sign out',\n description:\n config.content?.logout?.description ||\n 'This will sign you out and you will be asked to verify your identity next time you sign in.',\n onClick: executeLogout,\n }}\n/>\n"],"names":["options","$.prop","$$props","title","description","onClick","__awaiter","thisArg","_arguments","P","generator","config","get","configStore","logout","close","fn","executeLogout","_b","_a","_d","_c"],"mappings":";;;;;;;;;MAKaA,IAIVC,EAAAC,GAAA,WAAA,EAAA,GAEK,EAAA,OAAAC,GAAO,aAAAC,GAAa,SAAAC,EAAO,IAAKL,EAAO;;;;aAG1BG;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACdJ,MAAAG,IAAA,QAAA,KAAA,aAAA,SAAAC,GAAAC,GAAAC,GAAAC,GAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;QAMTC,IAASC,EAAIC,CAAW,GACtB,EAAA,QAAAC,GAAQ,OAAAC,MAAUH,EAAII,CAAE,GAE1BC,IAA2B,MAAAX,EAAA,QAAA,QAAA,QAAA,aAAA;AAC/B,IAAAQ,EAAM,GACNC,EAAK;AAAA,GACN;;;;;MAKC,SAAOG,KAAAC,IAAAR,EAAO,YAAP,gBAAAQ,EAAgB,WAAhB,gBAAAD,EAAwB,UAAS;AAAA,MACxC,eACEE,KAAAC,IAAAV,EAAO,YAAP,gBAAAU,EAAgB,WAAhB,gBAAAD,EAAwB,gBACxB;AAAA,MACF,SAASH;AAAA;;;;;;;;;;;"}