vessels-sdk 0.1.2 → 0.1.4
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/index.cjs +3 -1
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -86,7 +86,8 @@ var Vessels = class {
|
|
|
86
86
|
id: e.vessel?.id,
|
|
87
87
|
externalId: e.vessel?.external_id ?? null,
|
|
88
88
|
title: e.vessel?.title ?? null,
|
|
89
|
-
metadata: e.vessel?.metadata ?? {}
|
|
89
|
+
metadata: e.vessel?.metadata ?? {},
|
|
90
|
+
labels: e.vessel?.labels ?? []
|
|
90
91
|
};
|
|
91
92
|
if (e.type === "interaction.response") {
|
|
92
93
|
return {
|
|
@@ -97,6 +98,7 @@ var Vessels = class {
|
|
|
97
98
|
messageId: e.message_id,
|
|
98
99
|
interactionType: e.interaction_type,
|
|
99
100
|
response: e.response,
|
|
101
|
+
interactionMetadata: e.interaction_metadata ?? null,
|
|
100
102
|
user: e.user ?? null
|
|
101
103
|
};
|
|
102
104
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -32,6 +32,7 @@ interface VesselContext {
|
|
|
32
32
|
externalId: string | null;
|
|
33
33
|
title: string | null;
|
|
34
34
|
metadata: Record<string, unknown>;
|
|
35
|
+
labels: string[];
|
|
35
36
|
}
|
|
36
37
|
interface InteractionResponseEvent {
|
|
37
38
|
id: string;
|
|
@@ -41,6 +42,7 @@ interface InteractionResponseEvent {
|
|
|
41
42
|
messageId: string;
|
|
42
43
|
interactionType: string;
|
|
43
44
|
response: Record<string, unknown>;
|
|
45
|
+
interactionMetadata: Record<string, unknown> | null;
|
|
44
46
|
user: {
|
|
45
47
|
id: string;
|
|
46
48
|
email: string;
|
|
@@ -72,6 +74,7 @@ declare class Vessels {
|
|
|
72
74
|
approveLabel?: string;
|
|
73
75
|
rejectLabel?: string;
|
|
74
76
|
reasonRequired?: boolean;
|
|
77
|
+
metadata?: Record<string, unknown>;
|
|
75
78
|
}): _vessels_types.ApprovalInteraction;
|
|
76
79
|
choice(opts: {
|
|
77
80
|
prompt: string;
|
|
@@ -81,6 +84,7 @@ declare class Vessels {
|
|
|
81
84
|
}>;
|
|
82
85
|
allowCustom?: boolean;
|
|
83
86
|
customPlaceholder?: string;
|
|
87
|
+
metadata?: Record<string, unknown>;
|
|
84
88
|
}): _vessels_types.ChoiceInteraction;
|
|
85
89
|
checklist(opts: {
|
|
86
90
|
prompt: string;
|
|
@@ -91,12 +95,14 @@ declare class Vessels {
|
|
|
91
95
|
}>;
|
|
92
96
|
minSelections?: number;
|
|
93
97
|
submitLabel?: string;
|
|
98
|
+
metadata?: Record<string, unknown>;
|
|
94
99
|
}): _vessels_types.ChecklistInteraction;
|
|
95
100
|
textInput(opts: {
|
|
96
101
|
prompt: string;
|
|
97
102
|
placeholder?: string;
|
|
98
103
|
multiline?: boolean;
|
|
99
104
|
submitLabel?: string;
|
|
105
|
+
metadata?: Record<string, unknown>;
|
|
100
106
|
}): _vessels_types.TextInputInteraction;
|
|
101
107
|
confirmPreview(opts: {
|
|
102
108
|
prompt: string;
|
|
@@ -105,6 +111,7 @@ declare class Vessels {
|
|
|
105
111
|
approveLabel?: string;
|
|
106
112
|
rejectLabel?: string;
|
|
107
113
|
reasonRequiredOnReject?: boolean;
|
|
114
|
+
metadata?: Record<string, unknown>;
|
|
108
115
|
}): _vessels_types.ConfirmPreviewInteraction;
|
|
109
116
|
poll(options?: PollOptions): Promise<PollResponse>;
|
|
110
117
|
verifyWebhook(body: string, signature: string, webhookSecret: string): boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ interface VesselContext {
|
|
|
32
32
|
externalId: string | null;
|
|
33
33
|
title: string | null;
|
|
34
34
|
metadata: Record<string, unknown>;
|
|
35
|
+
labels: string[];
|
|
35
36
|
}
|
|
36
37
|
interface InteractionResponseEvent {
|
|
37
38
|
id: string;
|
|
@@ -41,6 +42,7 @@ interface InteractionResponseEvent {
|
|
|
41
42
|
messageId: string;
|
|
42
43
|
interactionType: string;
|
|
43
44
|
response: Record<string, unknown>;
|
|
45
|
+
interactionMetadata: Record<string, unknown> | null;
|
|
44
46
|
user: {
|
|
45
47
|
id: string;
|
|
46
48
|
email: string;
|
|
@@ -72,6 +74,7 @@ declare class Vessels {
|
|
|
72
74
|
approveLabel?: string;
|
|
73
75
|
rejectLabel?: string;
|
|
74
76
|
reasonRequired?: boolean;
|
|
77
|
+
metadata?: Record<string, unknown>;
|
|
75
78
|
}): _vessels_types.ApprovalInteraction;
|
|
76
79
|
choice(opts: {
|
|
77
80
|
prompt: string;
|
|
@@ -81,6 +84,7 @@ declare class Vessels {
|
|
|
81
84
|
}>;
|
|
82
85
|
allowCustom?: boolean;
|
|
83
86
|
customPlaceholder?: string;
|
|
87
|
+
metadata?: Record<string, unknown>;
|
|
84
88
|
}): _vessels_types.ChoiceInteraction;
|
|
85
89
|
checklist(opts: {
|
|
86
90
|
prompt: string;
|
|
@@ -91,12 +95,14 @@ declare class Vessels {
|
|
|
91
95
|
}>;
|
|
92
96
|
minSelections?: number;
|
|
93
97
|
submitLabel?: string;
|
|
98
|
+
metadata?: Record<string, unknown>;
|
|
94
99
|
}): _vessels_types.ChecklistInteraction;
|
|
95
100
|
textInput(opts: {
|
|
96
101
|
prompt: string;
|
|
97
102
|
placeholder?: string;
|
|
98
103
|
multiline?: boolean;
|
|
99
104
|
submitLabel?: string;
|
|
105
|
+
metadata?: Record<string, unknown>;
|
|
100
106
|
}): _vessels_types.TextInputInteraction;
|
|
101
107
|
confirmPreview(opts: {
|
|
102
108
|
prompt: string;
|
|
@@ -105,6 +111,7 @@ declare class Vessels {
|
|
|
105
111
|
approveLabel?: string;
|
|
106
112
|
rejectLabel?: string;
|
|
107
113
|
reasonRequiredOnReject?: boolean;
|
|
114
|
+
metadata?: Record<string, unknown>;
|
|
108
115
|
}): _vessels_types.ConfirmPreviewInteraction;
|
|
109
116
|
poll(options?: PollOptions): Promise<PollResponse>;
|
|
110
117
|
verifyWebhook(body: string, signature: string, webhookSecret: string): boolean;
|
package/dist/index.js
CHANGED
|
@@ -84,7 +84,8 @@ var Vessels = class {
|
|
|
84
84
|
id: e.vessel?.id,
|
|
85
85
|
externalId: e.vessel?.external_id ?? null,
|
|
86
86
|
title: e.vessel?.title ?? null,
|
|
87
|
-
metadata: e.vessel?.metadata ?? {}
|
|
87
|
+
metadata: e.vessel?.metadata ?? {},
|
|
88
|
+
labels: e.vessel?.labels ?? []
|
|
88
89
|
};
|
|
89
90
|
if (e.type === "interaction.response") {
|
|
90
91
|
return {
|
|
@@ -95,6 +96,7 @@ var Vessels = class {
|
|
|
95
96
|
messageId: e.message_id,
|
|
96
97
|
interactionType: e.interaction_type,
|
|
97
98
|
response: e.response,
|
|
99
|
+
interactionMetadata: e.interaction_metadata ?? null,
|
|
98
100
|
user: e.user ?? null
|
|
99
101
|
};
|
|
100
102
|
}
|