@mostfeatured/dbi 0.1.32 → 0.1.34
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/DBI.d.ts +4 -0
- package/dist/DBI.d.ts.map +1 -1
- package/dist/DBI.js +15 -71
- package/dist/DBI.js.map +1 -1
- package/dist/methods/hookInteractionListeners.d.ts.map +1 -1
- package/dist/methods/hookInteractionListeners.js +62 -20
- package/dist/methods/hookInteractionListeners.js.map +1 -1
- package/dist/types/ChatInput/ChatInputOptions.d.ts +1 -1
- package/dist/types/ChatInput/ChatInputOptions.d.ts.map +1 -1
- package/dist/types/ChatInput/ChatInputOptions.js.map +1 -1
- package/dist/types/Components/HTMLComponentsV2/HTMLComponentsV2Handlers.d.ts +53 -0
- package/dist/types/Components/HTMLComponentsV2/HTMLComponentsV2Handlers.d.ts.map +1 -0
- package/dist/types/Components/HTMLComponentsV2/HTMLComponentsV2Handlers.js +60 -0
- package/dist/types/Components/HTMLComponentsV2/HTMLComponentsV2Handlers.js.map +1 -0
- package/dist/types/Components/HTMLComponentsV2/index.d.ts +19 -0
- package/dist/types/Components/HTMLComponentsV2/index.d.ts.map +1 -0
- package/dist/types/Components/HTMLComponentsV2/index.js +28 -0
- package/dist/types/Components/HTMLComponentsV2/index.js.map +1 -0
- package/dist/types/Components/HTMLComponentsV2/parser.d.ts +4 -0
- package/dist/types/Components/HTMLComponentsV2/parser.d.ts.map +1 -0
- package/dist/types/Components/HTMLComponentsV2/parser.js +260 -0
- package/dist/types/Components/HTMLComponentsV2/parser.js.map +1 -0
- package/dist/types/Interaction.d.ts +6 -4
- package/dist/types/Interaction.d.ts.map +1 -1
- package/dist/types/Interaction.js.map +1 -1
- package/dist/utils/customId.d.ts +2 -1
- package/dist/utils/customId.d.ts.map +1 -1
- package/dist/utils/customId.js +6 -2
- package/dist/utils/customId.js.map +1 -1
- package/package.json +7 -4
- package/src/DBI.ts +30 -113
- package/src/methods/hookInteractionListeners.ts +79 -34
- package/src/types/ChatInput/ChatInputOptions.ts +6 -6
- package/src/types/Components/HTMLComponentsV2/HTMLComponentsV2Handlers.ts +78 -0
- package/src/types/Components/HTMLComponentsV2/index.ts +43 -0
- package/src/types/Components/HTMLComponentsV2/parser.ts +279 -0
- package/src/types/Interaction.ts +7 -4
- package/src/utils/customId.ts +6 -3
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { JSDOM } from "jsdom";
|
|
2
|
+
import { Eta } from "eta";
|
|
3
|
+
import { DBI } from "../../../DBI";
|
|
4
|
+
import { NamespaceEnums } from "../../../../generated/namespaceData";
|
|
5
|
+
import { ButtonStyle, ComponentType, TextInputStyle } from "discord.js";
|
|
6
|
+
import { buildCustomId } from "../../../utils/customId";
|
|
7
|
+
|
|
8
|
+
const eta = new Eta();
|
|
9
|
+
|
|
10
|
+
function parseElementDataAttributes(attributes: NamedNodeMap): any[] {
|
|
11
|
+
let list = Array.from(attributes)
|
|
12
|
+
.filter(attr => attr.nodeName.startsWith("data-"))
|
|
13
|
+
.map(attr => {
|
|
14
|
+
let splited = attr.nodeName.slice(5).split(":");
|
|
15
|
+
let index = parseInt(splited[0]);
|
|
16
|
+
let value;
|
|
17
|
+
switch (splited[1]) {
|
|
18
|
+
case "number": value = Number(attr.nodeValue!); break;
|
|
19
|
+
case "boolean": value = attr.nodeValue === "true"; break;
|
|
20
|
+
case "json": value = JSON.parse(attr.nodeValue!); break;
|
|
21
|
+
case "string":
|
|
22
|
+
default: value = attr.nodeValue; break;
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
index,
|
|
26
|
+
value
|
|
27
|
+
};
|
|
28
|
+
})
|
|
29
|
+
.sort((a, b) => a.index - b.index)
|
|
30
|
+
.map(i => i.value);
|
|
31
|
+
let data = attributes.getNamedItem("data")?.nodeValue;
|
|
32
|
+
return list.length ? list : data ? [data] : [];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function parseCustomIdAttributes(dbi: DBI<NamespaceEnums>, dbiName: string, element: Element): string {
|
|
36
|
+
let customId = element.getAttribute("custom-id");
|
|
37
|
+
if (!customId) {
|
|
38
|
+
let name = element.getAttribute("name");
|
|
39
|
+
if (!name) throw new Error("String Select Menu must have a name or custom-id attribute.");
|
|
40
|
+
customId = buildCustomId(
|
|
41
|
+
dbi,
|
|
42
|
+
dbiName,
|
|
43
|
+
[
|
|
44
|
+
name,
|
|
45
|
+
...parseElementDataAttributes(element.attributes),
|
|
46
|
+
],
|
|
47
|
+
element.hasAttribute("ttl") ? parseInt(element.getAttribute("ttl")!) : undefined,
|
|
48
|
+
true
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
return customId;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function parseActionRow(dbi: DBI<NamespaceEnums>, dbiName: string, actionRow: Element) {
|
|
55
|
+
return {
|
|
56
|
+
type: ComponentType.ActionRow,
|
|
57
|
+
components: Array.from(actionRow.children).map((element) => {
|
|
58
|
+
return parseElement(dbi, dbiName, element);
|
|
59
|
+
})
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function parseButton(dbi: DBI<NamespaceEnums>, dbiName: string, button: Element) {
|
|
64
|
+
return {
|
|
65
|
+
type: ComponentType.Button,
|
|
66
|
+
style: ButtonStyle[button.getAttribute("button-style") || button.getAttribute("style") || "Primary"],
|
|
67
|
+
label: button.textContent?.trim(),
|
|
68
|
+
emoji: button.getAttribute("emoji"),
|
|
69
|
+
custom_id: parseCustomIdAttributes(dbi, dbiName, button),
|
|
70
|
+
disabled: button.hasAttribute("disabled"),
|
|
71
|
+
url: button.getAttribute("url"),
|
|
72
|
+
sku_id: button.getAttribute("sku-id"),
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function parseStringSelect(dbi: DBI<NamespaceEnums>, dbiName: string, stringSelect: Element) {
|
|
77
|
+
let minValues = parseInt(stringSelect.getAttribute("min-values"));
|
|
78
|
+
let maxValues = parseInt(stringSelect.getAttribute("max-values"));
|
|
79
|
+
|
|
80
|
+
let options = Array.from(stringSelect.querySelectorAll("option")).map(option => {
|
|
81
|
+
return {
|
|
82
|
+
label: option.textContent?.trim(),
|
|
83
|
+
value: option.getAttribute("value"),
|
|
84
|
+
description: option.getAttribute("description"),
|
|
85
|
+
emoji: option.getAttribute("emoji"),
|
|
86
|
+
default: option.hasAttribute("default")
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
type: ComponentType.StringSelect,
|
|
92
|
+
custom_id: parseCustomIdAttributes(dbi, dbiName, stringSelect),
|
|
93
|
+
placeholder: stringSelect.getAttribute("placeholder"),
|
|
94
|
+
min_values: !isNaN(minValues) ? minValues : undefined,
|
|
95
|
+
max_values: !isNaN(maxValues) ? maxValues : undefined,
|
|
96
|
+
disabled: stringSelect.hasAttribute("disabled"),
|
|
97
|
+
options
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function parseNonStringSelect(dbi: DBI<NamespaceEnums>, dbiName: string, userSelect: Element, type: ComponentType) {
|
|
102
|
+
let minValues = parseInt(userSelect.getAttribute("min-values"));
|
|
103
|
+
let maxValues = parseInt(userSelect.getAttribute("max-values"));
|
|
104
|
+
|
|
105
|
+
let options = Array.from(userSelect.querySelectorAll("option")).map(option => {
|
|
106
|
+
return {
|
|
107
|
+
id: option.textContent?.trim() || option.getAttribute("id"),
|
|
108
|
+
type: option.getAttribute("type")
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
return {
|
|
113
|
+
type,
|
|
114
|
+
custom_id: parseCustomIdAttributes(dbi, dbiName, userSelect),
|
|
115
|
+
placeholder: userSelect.getAttribute("placeholder"),
|
|
116
|
+
min_values: !isNaN(minValues) ? minValues : undefined,
|
|
117
|
+
max_values: !isNaN(maxValues) ? maxValues : undefined,
|
|
118
|
+
disabled: userSelect.hasAttribute("disabled"),
|
|
119
|
+
options
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function parseSection(dbi: DBI<NamespaceEnums>, dbiName: string, sectionElement: Element) {
|
|
124
|
+
const childs = [...sectionElement.children];
|
|
125
|
+
const components = childs.find(el => el.tagName === "COMPONENTS");
|
|
126
|
+
const children = Array.from(components?.children || []);
|
|
127
|
+
|
|
128
|
+
const accessory = childs.find(el => el.tagName === "ACCESSORY")?.children?.[0];
|
|
129
|
+
|
|
130
|
+
return {
|
|
131
|
+
type: ComponentType.Section,
|
|
132
|
+
components: children.map((element) => {
|
|
133
|
+
return parseElement(dbi, dbiName, element);
|
|
134
|
+
}),
|
|
135
|
+
...(accessory ? { accessory: parseElement(dbi, dbiName, accessory) } : {})
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function parseTextDisplay(dbi: DBI<NamespaceEnums>, dbiName: string, textDisplayElement: Element) {
|
|
140
|
+
return {
|
|
141
|
+
type: ComponentType.TextDisplay,
|
|
142
|
+
content: textDisplayElement.textContent?.trim() || "",
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function parseThumbnail(dbi: DBI<NamespaceEnums>, dbiName: string, thumbnailElement: Element) {
|
|
147
|
+
return {
|
|
148
|
+
type: ComponentType.Thumbnail,
|
|
149
|
+
media: {
|
|
150
|
+
url: thumbnailElement.getAttribute("url")
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function parseMediaGallery(dbi: DBI<NamespaceEnums>, dbiName: string, mediaGalleryElement: Element) {
|
|
156
|
+
return {
|
|
157
|
+
type: ComponentType.MediaGallery,
|
|
158
|
+
items: Array.from(mediaGalleryElement.querySelectorAll("item")).map(item => {
|
|
159
|
+
return {
|
|
160
|
+
media: {
|
|
161
|
+
url: item.getAttribute("url")
|
|
162
|
+
},
|
|
163
|
+
description: item.textContent?.trim() || item.getAttribute("description") || "",
|
|
164
|
+
spoiler: item.hasAttribute("spoiler"),
|
|
165
|
+
};
|
|
166
|
+
})
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function parseFile(dbi: DBI<NamespaceEnums>, dbiName: string, fileElement: Element) {
|
|
171
|
+
return {
|
|
172
|
+
type: ComponentType.File,
|
|
173
|
+
file: {
|
|
174
|
+
url: fileElement.getAttribute("url"),
|
|
175
|
+
},
|
|
176
|
+
spoiler: fileElement.hasAttribute("spoiler"),
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function parseSeparator(dbi: DBI<NamespaceEnums>, dbiName: string, separatorElement: Element) {
|
|
181
|
+
return {
|
|
182
|
+
type: ComponentType.Separator,
|
|
183
|
+
divider: separatorElement.hasAttribute("divider"),
|
|
184
|
+
spacing: parseInt(separatorElement.getAttribute("spacing") || '1'),
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function parseContainer(dbi: DBI<NamespaceEnums>, dbiName: string, containerElement: Element) {
|
|
189
|
+
const components = [...containerElement.children].find(el => el.tagName === "COMPONENTS");
|
|
190
|
+
const children = Array.from(components?.children || []);
|
|
191
|
+
|
|
192
|
+
return {
|
|
193
|
+
type: ComponentType.Container,
|
|
194
|
+
components: children.map((element) => {
|
|
195
|
+
return parseElement(dbi, dbiName, element);
|
|
196
|
+
}),
|
|
197
|
+
accent_color: parseColor(containerElement.getAttribute("accent-color") || ""),
|
|
198
|
+
spoiler: containerElement.hasAttribute("spoiler"),
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function parseTextInput(dbi: DBI<NamespaceEnums>, dbiName: string, textInputSelect: Element) {
|
|
203
|
+
let minLength = parseInt(textInputSelect.getAttribute("min-length"));
|
|
204
|
+
let maxLength = parseInt(textInputSelect.getAttribute("max-length"));
|
|
205
|
+
|
|
206
|
+
return {
|
|
207
|
+
type: ComponentType.TextInput,
|
|
208
|
+
custom_id: textInputSelect.getAttribute("custom-id") || textInputSelect.getAttribute("id"),
|
|
209
|
+
style: TextInputStyle[textInputSelect.getAttribute("input-style") || textInputSelect.getAttribute("style") || "Short"],
|
|
210
|
+
label: textInputSelect.getAttribute("label"),
|
|
211
|
+
placeholder: textInputSelect.getAttribute("placeholder"),
|
|
212
|
+
min_length: !isNaN(minLength) ? minLength : undefined,
|
|
213
|
+
max_length: !isNaN(maxLength) ? maxLength : undefined,
|
|
214
|
+
required: textInputSelect.hasAttribute("required"),
|
|
215
|
+
value: textInputSelect.textContent?.trim() || textInputSelect.getAttribute("value"),
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function parseColor(color: string) {
|
|
220
|
+
if (!color) return;
|
|
221
|
+
if (/\d{3,6}/.test(color)) return parseInt(color, 10);
|
|
222
|
+
if (color.startsWith("#")) return parseInt(color.slice(1), 16);
|
|
223
|
+
if (color.startsWith("0x")) return parseInt(color.slice(2), 16);
|
|
224
|
+
if (color.startsWith("rgb(")) {
|
|
225
|
+
const rgb = color.slice(4, -1).split(",").map(Number);
|
|
226
|
+
return (rgb[0] << 16) + (rgb[1] << 8) + rgb[2];
|
|
227
|
+
}
|
|
228
|
+
return parseInt(color, 16);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function parseElement(dbi: DBI<NamespaceEnums>, dbiName: string, element: Element) {
|
|
232
|
+
switch (element.tagName) {
|
|
233
|
+
case "ACTION-ROW":
|
|
234
|
+
return parseActionRow(dbi, dbiName, element);
|
|
235
|
+
case "BUTTON":
|
|
236
|
+
return parseButton(dbi, dbiName, element);
|
|
237
|
+
case "STRING-SELECT":
|
|
238
|
+
return parseStringSelect(dbi, dbiName, element);
|
|
239
|
+
case "USER-SELECT":
|
|
240
|
+
return parseNonStringSelect(dbi, dbiName, element, ComponentType.UserSelect);
|
|
241
|
+
case "ROLE-SELECT":
|
|
242
|
+
return parseNonStringSelect(dbi, dbiName, element, ComponentType.RoleSelect);
|
|
243
|
+
case "MENTIONABLE-SELECT":
|
|
244
|
+
return parseNonStringSelect(dbi, dbiName, element, ComponentType.MentionableSelect);
|
|
245
|
+
case "CHANNEL-SELECT":
|
|
246
|
+
return parseNonStringSelect(dbi, dbiName, element, ComponentType.ChannelSelect);
|
|
247
|
+
case "SECTION":
|
|
248
|
+
return parseSection(dbi, dbiName, element);
|
|
249
|
+
case "TEXT-DISPLAY":
|
|
250
|
+
return parseTextDisplay(dbi, dbiName, element);
|
|
251
|
+
case "THUMBNAIL":
|
|
252
|
+
return parseThumbnail(dbi, dbiName, element);
|
|
253
|
+
case "MEDIA-GALLERY":
|
|
254
|
+
return parseMediaGallery(dbi, dbiName, element);
|
|
255
|
+
case "FILE":
|
|
256
|
+
return parseFile(dbi, dbiName, element);
|
|
257
|
+
case "SEPARATOR":
|
|
258
|
+
return parseSeparator(dbi, dbiName, element);
|
|
259
|
+
case "CONTAINER":
|
|
260
|
+
return parseContainer(dbi, dbiName, element);
|
|
261
|
+
case "TEXT-INPUT":
|
|
262
|
+
return parseTextInput(dbi, dbiName, element);
|
|
263
|
+
default:
|
|
264
|
+
throw new Error(`Unknown HTML component: ${element.tagName}`);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export function parseHTMLComponentsV2(dbi: DBI<NamespaceEnums>, template: string, dbiName: string, { data }: any = {}) {
|
|
269
|
+
const { window: { document } } = new JSDOM(eta.renderString(template, data));
|
|
270
|
+
|
|
271
|
+
const components = [...document.body.children].find(el => el.tagName === "COMPONENTS");
|
|
272
|
+
const children = Array.from(components?.children || []);
|
|
273
|
+
|
|
274
|
+
if (!children.length) throw new Error("No components found in the provided HTML template.");
|
|
275
|
+
|
|
276
|
+
return children.map((element) => {
|
|
277
|
+
return parseElement(dbi, dbiName, element);
|
|
278
|
+
});
|
|
279
|
+
}
|
package/src/types/Interaction.ts
CHANGED
|
@@ -8,8 +8,9 @@ import { DBIMessageContextMenu } from "./other/MessageContextMenu";
|
|
|
8
8
|
import { DBIModal } from "./Components/Modal";
|
|
9
9
|
import { DBIStringSelectMenu } from "./Components/StringSelectMenu";
|
|
10
10
|
import { DBIUserContextMenu } from "./other/UserContextMenu";
|
|
11
|
+
import { DBIHTMLComponentsV2 } from "./Components/HTMLComponentsV2";
|
|
11
12
|
|
|
12
|
-
export type TDBIInteractions<TNamespace extends NamespaceEnums> = DBIChatInput<TNamespace> | DBIButton<TNamespace> | DBIStringSelectMenu<TNamespace> | DBIMessageContextMenu<TNamespace> | DBIUserContextMenu<TNamespace> | DBIModal<TNamespace>;
|
|
13
|
+
export type TDBIInteractions<TNamespace extends NamespaceEnums> = DBIChatInput<TNamespace> | DBIButton<TNamespace> | DBIStringSelectMenu<TNamespace> | DBIMessageContextMenu<TNamespace> | DBIUserContextMenu<TNamespace> | DBIModal<TNamespace> | DBIHTMLComponentsV2<TNamespace>;
|
|
13
14
|
|
|
14
15
|
export interface IDBIBaseExecuteCtx<TNamespace extends NamespaceEnums> {
|
|
15
16
|
interaction:
|
|
@@ -29,6 +30,7 @@ export interface IDBIBaseExecuteCtx<TNamespace extends NamespaceEnums> {
|
|
|
29
30
|
setRateLimit(type: TDBIRateLimitTypes, duration: number): Promise<any>;
|
|
30
31
|
other: Record<string, any>;
|
|
31
32
|
clientNamespace: NamespaceData[TNamespace]["clientNamespaces"];
|
|
33
|
+
v2: boolean;
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
export type TDBIReferencedData = ({ [key: string]: any, $ref: string, $unRef(): boolean } | string | number);
|
|
@@ -44,7 +46,8 @@ export type TDBIInteractionTypes =
|
|
|
44
46
|
| "ChannelSelectMenu"
|
|
45
47
|
| "MentionableSelectMenu"
|
|
46
48
|
| "RoleSelectMenu"
|
|
47
|
-
| "Button"
|
|
49
|
+
| "Button"
|
|
50
|
+
| "HTMLComponentsV2";
|
|
48
51
|
|
|
49
52
|
export type TDBIRateLimitTypes =
|
|
50
53
|
| "User"
|
|
@@ -89,9 +92,9 @@ export class DBIBaseInteraction<TNamespace extends NamespaceEnums> {
|
|
|
89
92
|
flag?: string;
|
|
90
93
|
ttl?: number;
|
|
91
94
|
at?: number;
|
|
92
|
-
toJSON(overrides
|
|
95
|
+
toJSON(overrides?: any): any { }
|
|
93
96
|
|
|
94
|
-
onExecute(ctx: IDBIBaseExecuteCtx<TNamespace>): Promise<void> | void {
|
|
97
|
+
onExecute?(ctx: IDBIBaseExecuteCtx<TNamespace>): Promise<void> | void {
|
|
95
98
|
|
|
96
99
|
}
|
|
97
100
|
}
|
package/src/utils/customId.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { DBI } from "../DBI";
|
|
|
2
2
|
import * as stuffs from "stuffs";
|
|
3
3
|
import { NamespaceEnums } from "../../generated/namespaceData";
|
|
4
4
|
|
|
5
|
-
export function buildCustomId(dbi: DBI<NamespaceEnums>, name: string, data: any[], ttl?: number): string {
|
|
5
|
+
export function buildCustomId(dbi: DBI<NamespaceEnums>, name: string, data: any[], ttl?: number, v2 = false): string {
|
|
6
6
|
let customId = [
|
|
7
|
-
name
|
|
7
|
+
`${v2 ? 'v2:' : ''}${name}`,
|
|
8
8
|
...data.map(value => {
|
|
9
9
|
if (typeof value == "string") return value;
|
|
10
10
|
if (typeof value == "number") return `π${value}`;
|
|
@@ -26,9 +26,11 @@ export function buildCustomId(dbi: DBI<NamespaceEnums>, name: string, data: any[
|
|
|
26
26
|
return customId;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export function parseCustomId(dbi: DBI<NamespaceEnums>, customId: string): { name: string, data: any[] } {
|
|
29
|
+
export function parseCustomId(dbi: DBI<NamespaceEnums>, customId: string): { name: string, data: any[], v2: boolean } {
|
|
30
30
|
let splitted = customId.split("—");
|
|
31
31
|
let name = splitted.shift();
|
|
32
|
+
let v2 = name.startsWith("v2:");
|
|
33
|
+
if (v2) name = name.slice(3);
|
|
32
34
|
let data = splitted.map(value => {
|
|
33
35
|
if (value.startsWith("π")) return Number(value.slice(1));
|
|
34
36
|
if (value.startsWith("𝞫")) return !!Number(value.slice(1));
|
|
@@ -39,6 +41,7 @@ export function parseCustomId(dbi: DBI<NamespaceEnums>, customId: string): { nam
|
|
|
39
41
|
return value;
|
|
40
42
|
});
|
|
41
43
|
return {
|
|
44
|
+
v2,
|
|
42
45
|
name,
|
|
43
46
|
data
|
|
44
47
|
}
|