@xoxno/sdk-js 0.1.127-alpha → 0.1.128-alpha

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,53 @@
1
+ import type { ComponentProps } from 'react';
2
+ export declare const locales: readonly ["en", "de"];
3
+ export type ILocale = (typeof locales)[number];
4
+ export type Translations<T = object> = {
5
+ namespace: string;
6
+ translations: {
7
+ en: T;
8
+ } & Partial<{
9
+ [key in Exclude<ILocale, 'en'>]: Partial<T>;
10
+ }>;
11
+ };
12
+ import { IBaseNotification, IEmailActivityType, type IBidTypes, type IDepositTypes, type IOfferTypes, type ITradeTypes } from './types';
13
+ import React from 'react';
14
+ export type ITradeProps = {
15
+ activityType: Extract<IEmailActivityType, ITradeTypes>;
16
+ payload: {
17
+ name: string;
18
+ nft: Pick<IBaseNotification, 'asset' | 'owner' | 'activity'>;
19
+ address: string;
20
+ };
21
+ };
22
+ export type IDepositProps = {
23
+ activityType: Extract<IEmailActivityType, IDepositTypes>;
24
+ payload: {
25
+ name: string;
26
+ nft: Pick<IBaseNotification, 'asset' | 'owner' | 'activity'>;
27
+ address: string;
28
+ };
29
+ };
30
+ export type IBidProps = {
31
+ activityType: Extract<IEmailActivityType, IBidTypes>;
32
+ payload: {
33
+ name: string;
34
+ nft: Pick<IBaseNotification, 'asset' | 'owner' | 'activity'>;
35
+ address: string;
36
+ };
37
+ };
38
+ export type IOfferProps = {
39
+ activityType: Extract<IEmailActivityType, IOfferTypes>;
40
+ payload: {
41
+ name: string;
42
+ nft: Pick<IBaseNotification, 'asset' | 'owner' | 'activity'>;
43
+ address: string;
44
+ };
45
+ };
46
+ export type IProps = ITradeProps | IDepositProps | IOfferProps | IBidProps;
47
+ export default function XOXNOEmail(props: IProps): React.JSX.Element;
48
+ export declare function renderEmail(props: ComponentProps<typeof XOXNOEmail>): Promise<{
49
+ html: string;
50
+ plainText: string;
51
+ subject: string | undefined;
52
+ }>;
53
+ //# sourceMappingURL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D,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,YAAY,EAAE,OAAO,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;IACrD,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC,CAAC;QAC7D,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY,EAAE,OAAO,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC;IACvD,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC,CAAC;QAC7D,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,WAAW,GAAG,aAAa,GAAG,WAAW,GAAG,SAAS,CAAC;AAmC3E,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,qBAgI/C;AAqDD,wBAAsB,WAAW,CAC/B,KAAK,EAAE,cAAc,CAAC,OAAO,UAAU,CAAC,GACvC,OAAO,CAAC;IACT,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B,CAAC,CAcD"}
@@ -0,0 +1,51 @@
1
+ import { NftActivityType } from '../types';
2
+ export declare const tradeTypes: readonly [NftActivityType.TRADE, NftActivityType.BULK_TRADE, NftActivityType.OTHER_TRADE, NftActivityType.OFFER_TRADE, NftActivityType.GLOBAL_OFFER_TRADE];
3
+ export declare const offerTypes: readonly [NftActivityType.OFFER_CREATE, NftActivityType.OFFER_REJECT];
4
+ export declare const bidTypes: readonly [NftActivityType.AUCTION_BID, NftActivityType.AUCTION_OUT_BID];
5
+ export declare const depositTypes: readonly ["deposit", "withdrawDeposit"];
6
+ export type ITradeTypes = (typeof tradeTypes)[number];
7
+ export type IDepositTypes = (typeof depositTypes)[number];
8
+ export type IBidTypes = (typeof bidTypes)[number];
9
+ export type IOfferTypes = (typeof offerTypes)[number];
10
+ declare const emailActivityTypes: readonly [NftActivityType.TRADE, NftActivityType.BULK_TRADE, NftActivityType.OTHER_TRADE, NftActivityType.OFFER_TRADE, NftActivityType.GLOBAL_OFFER_TRADE, NftActivityType.OFFER_CREATE, NftActivityType.OFFER_REJECT, "deposit", "withdrawDeposit", NftActivityType.AUCTION_BID, NftActivityType.AUCTION_OUT_BID];
11
+ export type IEmailActivityType = (typeof emailActivityTypes)[number];
12
+ export declare enum NotificationAssetType {
13
+ NFT = "nft",
14
+ USER = "user",
15
+ CHAT = "chat"
16
+ }
17
+ export interface IBaseNotification {
18
+ id: string;
19
+ isRead: boolean;
20
+ txHash: string;
21
+ source: string;
22
+ activityType: IEmailActivityType | '';
23
+ message?: string;
24
+ asset: {
25
+ type: NotificationAssetType;
26
+ collection?: string;
27
+ identifier?: string;
28
+ address?: string;
29
+ name?: string;
30
+ url?: string;
31
+ };
32
+ activity: {
33
+ price?: number;
34
+ paymentToken?: string;
35
+ quantity?: number;
36
+ buyer?: string;
37
+ seller?: string;
38
+ previousBidder?: string;
39
+ deadline?: number;
40
+ unreadCount?: number;
41
+ };
42
+ owner: string;
43
+ timestamp: number;
44
+ }
45
+ export interface INotification extends Omit<IBaseNotification, 'asset'> {
46
+ asset: Omit<IBaseNotification['asset'], 'url'> & {
47
+ url: string[];
48
+ };
49
+ }
50
+ export {};
51
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/email/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,eAAO,MAAM,UA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AM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACrE,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG;QAAE,GAAG,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CACpE"}
@@ -0,0 +1,2 @@
1
+ export * from './email';
2
+ //# sourceMappingURL=email.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../src/email.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
File without changes
@@ -0,0 +1,90 @@
1
+ /*!
2
+ * The buffer module from node.js, for the browser.
3
+ *
4
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
5
+ * @license MIT
6
+ */
7
+
8
+ /*!
9
+ * The buffer module from node.js, for the browser.
10
+ *
11
+ * @author Feross Aboukhadijeh <https://feross.org>
12
+ * @license MIT
13
+ */
14
+
15
+ /*!
16
+ * fill-range <https://github.com/jonschlinkert/fill-range>
17
+ *
18
+ * Copyright (c) 2014-present, Jon Schlinkert.
19
+ * Licensed under the MIT License.
20
+ */
21
+
22
+ /*!
23
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
24
+ *
25
+ * Copyright (c) 2014-2016, Jon Schlinkert.
26
+ * Licensed under the MIT License.
27
+ */
28
+
29
+ /*!
30
+ * is-number <https://github.com/jonschlinkert/is-number>
31
+ *
32
+ * Copyright (c) 2014-present, Jon Schlinkert.
33
+ * Released under the MIT License.
34
+ */
35
+
36
+ /*!
37
+ * normalize-path <https://github.com/jonschlinkert/normalize-path>
38
+ *
39
+ * Copyright (c) 2014-2018, Jon Schlinkert.
40
+ * Released under the MIT License.
41
+ */
42
+
43
+ /*!
44
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
45
+ *
46
+ * Copyright (c) 2015-present, Jon Schlinkert.
47
+ * Released under the MIT License.
48
+ */
49
+
50
+ /*! https://mths.be/cssesc v3.0.0 by @mathias */
51
+
52
+ /*! https://mths.be/punycode v1.4.1 by @mathias */
53
+
54
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
55
+
56
+ /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
57
+
58
+ /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
59
+
60
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
61
+
62
+ /**
63
+ * @license React
64
+ * react-dom-server-legacy.browser.production.min.js
65
+ *
66
+ * Copyright (c) Facebook, Inc. and its affiliates.
67
+ *
68
+ * This source code is licensed under the MIT license found in the
69
+ * LICENSE file in the root directory of this source tree.
70
+ */
71
+
72
+ /**
73
+ * @license React
74
+ * react-dom-server.browser.production.min.js
75
+ *
76
+ * Copyright (c) Facebook, Inc. and its affiliates.
77
+ *
78
+ * This source code is licensed under the MIT license found in the
79
+ * LICENSE file in the root directory of this source tree.
80
+ */
81
+
82
+ /**
83
+ * @license React
84
+ * react-jsx-runtime.production.min.js
85
+ *
86
+ * Copyright (c) Facebook, Inc. and its affiliates.
87
+ *
88
+ * This source code is licensed under the MIT license found in the
89
+ * LICENSE file in the root directory of this source tree.
90
+ */
package/dist/email.js ADDED
@@ -0,0 +1 @@
1
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports["@xoxno/sdk-js"]=o():e["@xoxno/sdk-js"]=o()}(this,(()=>(()=>{"use strict";var e={r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};return e.r(o),o})()));
@@ -0,0 +1,90 @@
1
+ /*!
2
+ * The buffer module from node.js, for the browser.
3
+ *
4
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
5
+ * @license MIT
6
+ */
7
+
8
+ /*!
9
+ * The buffer module from node.js, for the browser.
10
+ *
11
+ * @author Feross Aboukhadijeh <https://feross.org>
12
+ * @license MIT
13
+ */
14
+
15
+ /*!
16
+ * fill-range <https://github.com/jonschlinkert/fill-range>
17
+ *
18
+ * Copyright (c) 2014-present, Jon Schlinkert.
19
+ * Licensed under the MIT License.
20
+ */
21
+
22
+ /*!
23
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
24
+ *
25
+ * Copyright (c) 2014-2016, Jon Schlinkert.
26
+ * Licensed under the MIT License.
27
+ */
28
+
29
+ /*!
30
+ * is-number <https://github.com/jonschlinkert/is-number>
31
+ *
32
+ * Copyright (c) 2014-present, Jon Schlinkert.
33
+ * Released under the MIT License.
34
+ */
35
+
36
+ /*!
37
+ * normalize-path <https://github.com/jonschlinkert/normalize-path>
38
+ *
39
+ * Copyright (c) 2014-2018, Jon Schlinkert.
40
+ * Released under the MIT License.
41
+ */
42
+
43
+ /*!
44
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
45
+ *
46
+ * Copyright (c) 2015-present, Jon Schlinkert.
47
+ * Released under the MIT License.
48
+ */
49
+
50
+ /*! https://mths.be/cssesc v3.0.0 by @mathias */
51
+
52
+ /*! https://mths.be/punycode v1.4.1 by @mathias */
53
+
54
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
55
+
56
+ /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
57
+
58
+ /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
59
+
60
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
61
+
62
+ /**
63
+ * @license React
64
+ * react-dom-server-legacy.browser.production.min.js
65
+ *
66
+ * Copyright (c) Facebook, Inc. and its affiliates.
67
+ *
68
+ * This source code is licensed under the MIT license found in the
69
+ * LICENSE file in the root directory of this source tree.
70
+ */
71
+
72
+ /**
73
+ * @license React
74
+ * react-dom-server.browser.production.min.js
75
+ *
76
+ * Copyright (c) Facebook, Inc. and its affiliates.
77
+ *
78
+ * This source code is licensed under the MIT license found in the
79
+ * LICENSE file in the root directory of this source tree.
80
+ */
81
+
82
+ /**
83
+ * @license React
84
+ * react-jsx-runtime.production.min.js
85
+ *
86
+ * Copyright (c) Facebook, Inc. and its affiliates.
87
+ *
88
+ * This source code is licensed under the MIT license found in the
89
+ * LICENSE file in the root directory of this source tree.
90
+ */
@@ -0,0 +1,53 @@
1
+ import type { ComponentProps } from 'react';
2
+ export declare const locales: readonly ["en", "de"];
3
+ export type ILocale = (typeof locales)[number];
4
+ export type Translations<T = object> = {
5
+ namespace: string;
6
+ translations: {
7
+ en: T;
8
+ } & Partial<{
9
+ [key in Exclude<ILocale, 'en'>]: Partial<T>;
10
+ }>;
11
+ };
12
+ import { IBaseNotification, IEmailActivityType, type IBidTypes, type IDepositTypes, type IOfferTypes, type ITradeTypes } from './types';
13
+ import React from 'react';
14
+ export type ITradeProps = {
15
+ activityType: Extract<IEmailActivityType, ITradeTypes>;
16
+ payload: {
17
+ name: string;
18
+ nft: Pick<IBaseNotification, 'asset' | 'owner' | 'activity'>;
19
+ address: string;
20
+ };
21
+ };
22
+ export type IDepositProps = {
23
+ activityType: Extract<IEmailActivityType, IDepositTypes>;
24
+ payload: {
25
+ name: string;
26
+ nft: Pick<IBaseNotification, 'asset' | 'owner' | 'activity'>;
27
+ address: string;
28
+ };
29
+ };
30
+ export type IBidProps = {
31
+ activityType: Extract<IEmailActivityType, IBidTypes>;
32
+ payload: {
33
+ name: string;
34
+ nft: Pick<IBaseNotification, 'asset' | 'owner' | 'activity'>;
35
+ address: string;
36
+ };
37
+ };
38
+ export type IOfferProps = {
39
+ activityType: Extract<IEmailActivityType, IOfferTypes>;
40
+ payload: {
41
+ name: string;
42
+ nft: Pick<IBaseNotification, 'asset' | 'owner' | 'activity'>;
43
+ address: string;
44
+ };
45
+ };
46
+ export type IProps = ITradeProps | IDepositProps | IOfferProps | IBidProps;
47
+ export default function XOXNOEmail(props: IProps): React.JSX.Element;
48
+ export declare function renderEmail(props: ComponentProps<typeof XOXNOEmail>): Promise<{
49
+ html: string;
50
+ plainText: string;
51
+ subject: string | undefined;
52
+ }>;
53
+ //# sourceMappingURL=email.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/emails/email.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,OAAO,CAAC;AAmB3D,eAAO,MAAM,OAAO,uBAAwB,CAAC;AAE7C,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/C,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,MAAM,IAAI;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE;QACZ,EAAE,EAAE,CAAC,CAAC;KACP,GAAG,OAAO,CAAC;SAAG,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;KAAE,CAAC,CAAC;CAC9D,CAAC;AAEF,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAKlB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,WAAW,EACjB,MAAM,SAAS,CAAC;AAGjB,OAAO,KAAK,MAAM,OAAO,CAAC;AA8G1B,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY,EAAE,OAAO,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC;IAC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AAU,CAAC;;;;GAczE"}
@@ -0,0 +1,53 @@
1
+ import type { ComponentProps } from 'react';
2
+ export declare const locales: readonly ["en", "de"];
3
+ export type ILocale = (typeof locales)[number];
4
+ export type Translations<T = object> = {
5
+ namespace: string;
6
+ translations: {
7
+ en: T;
8
+ } & Partial<{
9
+ [key in Exclude<ILocale, 'en'>]: Partial<T>;
10
+ }>;
11
+ };
12
+ import { IBaseNotification, IEmailActivityType, type IBidTypes, type IDepositTypes, type IOfferTypes, type ITradeTypes } from './types';
13
+ import React from 'react';
14
+ export type ITradeProps = {
15
+ activityType: Extract<IEmailActivityType, ITradeTypes>;
16
+ payload: {
17
+ name: string;
18
+ nft: Pick<IBaseNotification, 'asset' | 'owner' | 'activity'>;
19
+ address: string;
20
+ };
21
+ };
22
+ export type IDepositProps = {
23
+ activityType: Extract<IEmailActivityType, IDepositTypes>;
24
+ payload: {
25
+ name: string;
26
+ nft: Pick<IBaseNotification, 'asset' | 'owner' | 'activity'>;
27
+ address: string;
28
+ };
29
+ };
30
+ export type IBidProps = {
31
+ activityType: Extract<IEmailActivityType, IBidTypes>;
32
+ payload: {
33
+ name: string;
34
+ nft: Pick<IBaseNotification, 'asset' | 'owner' | 'activity'>;
35
+ address: string;
36
+ };
37
+ };
38
+ export type IOfferProps = {
39
+ activityType: Extract<IEmailActivityType, IOfferTypes>;
40
+ payload: {
41
+ name: string;
42
+ nft: Pick<IBaseNotification, 'asset' | 'owner' | 'activity'>;
43
+ address: string;
44
+ };
45
+ };
46
+ export type IProps = ITradeProps | IDepositProps | IOfferProps | IBidProps;
47
+ export default function XOXNOEmail(props: IProps): React.JSX.Element;
48
+ export declare function renderEmail(props: ComponentProps<typeof XOXNOEmail>): Promise<{
49
+ html: string;
50
+ plainText: string;
51
+ subject: string | undefined;
52
+ }>;
53
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/emails/index.tsx"],"names":[],"mappings":"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AAO,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;IACrD,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC,CAAC;QAC7D,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,YAAY,EAAE,OAAO,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC;IACvD,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC,CAAC;QAC7D,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,WAAW,GAAG,aAAa,GAAG,WAAW,GAAG,SAAS,CAAC;AAmC3E,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,qBAgI/C;AAqDD,wBAAsB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,UAAU,CAAC;;;;GAczE"}
@@ -0,0 +1,51 @@
1
+ import { NftActivityType } from '../types';
2
+ export declare const tradeTypes: readonly [NftActivityType.TRADE, NftActivityType.BULK_TRADE, NftActivityType.OTHER_TRADE, NftActivityType.OFFER_TRADE, NftActivityType.GLOBAL_OFFER_TRADE];
3
+ export declare const offerTypes: readonly [NftActivityType.OFFER_CREATE, NftActivityType.OFFER_REJECT];
4
+ export declare const bidTypes: readonly [NftActivityType.AUCTION_BID, NftActivityType.AUCTION_OUT_BID];
5
+ export declare const depositTypes: readonly ["deposit", "withdrawDeposit"];
6
+ export type ITradeTypes = (typeof tradeTypes)[number];
7
+ export type IDepositTypes = (typeof depositTypes)[number];
8
+ export type IBidTypes = (typeof bidTypes)[number];
9
+ export type IOfferTypes = (typeof offerTypes)[number];
10
+ declare const emailActivityTypes: readonly [NftActivityType.TRADE, NftActivityType.BULK_TRADE, NftActivityType.OTHER_TRADE, NftActivityType.OFFER_TRADE, NftActivityType.GLOBAL_OFFER_TRADE, NftActivityType.OFFER_CREATE, NftActivityType.OFFER_REJECT, "deposit", "withdrawDeposit", NftActivityType.AUCTION_BID, NftActivityType.AUCTION_OUT_BID];
11
+ export type IEmailActivityType = (typeof emailActivityTypes)[number];
12
+ export declare enum NotificationAssetType {
13
+ NFT = "nft",
14
+ USER = "user",
15
+ CHAT = "chat"
16
+ }
17
+ export interface IBaseNotification {
18
+ id: string;
19
+ isRead: boolean;
20
+ txHash: string;
21
+ source: string;
22
+ activityType: IEmailActivityType | '';
23
+ message?: string;
24
+ asset: {
25
+ type: NotificationAssetType;
26
+ collection?: string;
27
+ identifier?: string;
28
+ address?: string;
29
+ name?: string;
30
+ url?: string;
31
+ };
32
+ activity: {
33
+ price?: number;
34
+ paymentToken?: string;
35
+ quantity?: number;
36
+ buyer?: string;
37
+ seller?: string;
38
+ previousBidder?: string;
39
+ deadline?: number;
40
+ unreadCount?: number;
41
+ };
42
+ owner: string;
43
+ timestamp: number;
44
+ }
45
+ export interface INotification extends Omit<IBaseNotification, 'asset'> {
46
+ asset: Omit<IBaseNotification['asset'], 'url'> & {
47
+ url: string[];
48
+ };
49
+ }
50
+ export {};
51
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/emails/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,eAAO,MAAM,UAAU,4JAMb,CAAC;AAEX,eAAO,MAAM,UAAU,uEAGb,CAAC;AAEX,eAAO,MAAM,QAAQ,yEAGX,CAAC;AAEX,eAAO,MAAM,YAAY,yCAA0C,CAAC;AAEpE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,MA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AAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACrE,KAAK,EAAE,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG;QAAE,GAAG,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CACpE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoxno/sdk-js",
3
- "version": "0.1.127-alpha",
3
+ "version": "0.1.128-alpha",
4
4
  "description": "The SDK to interact with the XOXNO Protocol!",
5
5
  "type": "commonjs",
6
6
  "exports": {
@@ -11,6 +11,10 @@
11
11
  "./interactor": {
12
12
  "import": "./dist/interactor.js",
13
13
  "types": "./dist/interactor.d.ts"
14
+ },
15
+ "./email": {
16
+ "import": "./dist/email.js",
17
+ "types": "./dist/email.d.ts"
14
18
  }
15
19
  },
16
20
  "types": "./dist/index.d.ts",
@@ -91,6 +95,9 @@
91
95
  "dependencies": {
92
96
  "@multiversx/sdk-core": "^13.2.1",
93
97
  "@multiversx/sdk-network-providers": "^2.4.3",
98
+ "@react-email/components": "0.0.19",
99
+ "@react-email/render": "^0.0.15",
100
+ "next-intl": "^3.15.2",
94
101
  "webpack-bundle-analyzer": "^4.10.2"
95
102
  }
96
103
  }