@proteos/sdk 0.91.0 → 0.92.1
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 +60 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +247 -1
- package/dist/index.d.ts +247 -1
- package/dist/index.js +60 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/auth/platform-entities.ts +2 -0
- package/src/conversation/index.ts +96 -0
- package/src/conversation/types.ts +221 -0
- package/src/index.ts +15 -1
package/dist/index.cjs
CHANGED
|
@@ -1077,6 +1077,8 @@ var PLATFORM_ENTITIES = [
|
|
|
1077
1077
|
// their preset catalog.
|
|
1078
1078
|
{ slug: "sending-rules", name: "Sending Rules" },
|
|
1079
1079
|
{ slug: "email-signatures", name: "Email Signatures" },
|
|
1080
|
+
// Reusable messages and snippets, the organisation's and each person's own.
|
|
1081
|
+
{ slug: "message-templates", name: "Message Templates" },
|
|
1080
1082
|
// The channel_action ledger: acts through a connection that are neither a
|
|
1081
1083
|
// message nor a reaction (LinkedIn invitations, profile visits, InMail).
|
|
1082
1084
|
{ slug: "channel-actions", name: "Channel Actions" },
|
|
@@ -1830,6 +1832,9 @@ function buildQuery(options) {
|
|
|
1830
1832
|
return queryString ? `?${queryString}` : "";
|
|
1831
1833
|
}
|
|
1832
1834
|
|
|
1835
|
+
// src/conversation/types.ts
|
|
1836
|
+
var UNSUBSCRIBE_URL_PLACEHOLDER = "https://unsubscribe.invalid/link";
|
|
1837
|
+
|
|
1833
1838
|
// src/conversation/index.ts
|
|
1834
1839
|
var CONVERSATION_BASE_PATH = "/conversations/v1";
|
|
1835
1840
|
var ConversationClient = class {
|
|
@@ -1844,6 +1849,8 @@ var ConversationClient = class {
|
|
|
1844
1849
|
/** Outbound send constraints: windows, connection limits, frequency caps + presets. */
|
|
1845
1850
|
sendingRules;
|
|
1846
1851
|
emailSignatures;
|
|
1852
|
+
/** Reusable messages and snippets, and rendering one for a recipient. */
|
|
1853
|
+
messageTemplates;
|
|
1847
1854
|
/**
|
|
1848
1855
|
* Channel actions: acts performed through a connection that are neither a
|
|
1849
1856
|
* message nor a reaction — LinkedIn invitations, profile visits, InMail.
|
|
@@ -1891,6 +1898,7 @@ var ConversationClient = class {
|
|
|
1891
1898
|
this.conversationFilters = new ConversationFilterServiceImpl(client);
|
|
1892
1899
|
this.sendingRules = new SendingRuleServiceImpl(client);
|
|
1893
1900
|
this.emailSignatures = new EmailSignatureServiceImpl(client);
|
|
1901
|
+
this.messageTemplates = new MessageTemplateServiceImpl(client);
|
|
1894
1902
|
this.channelActions = new ChannelActionServiceImpl(client);
|
|
1895
1903
|
this.channelEvents = new ChannelEventServiceImpl(client);
|
|
1896
1904
|
this.glossaryTerms = new GlossaryTermServiceImpl(client);
|
|
@@ -2162,6 +2170,12 @@ var ContactServiceImpl = class {
|
|
|
2162
2170
|
request
|
|
2163
2171
|
);
|
|
2164
2172
|
}
|
|
2173
|
+
listPermissionEvents(contactId) {
|
|
2174
|
+
return this.client.request(
|
|
2175
|
+
"GET",
|
|
2176
|
+
`${CONVERSATION_BASE_PATH}/contacts/${encodeURIComponent(contactId)}/permission-events`
|
|
2177
|
+
);
|
|
2178
|
+
}
|
|
2165
2179
|
recordPermissionEvent(contactId, request) {
|
|
2166
2180
|
return this.client.request(
|
|
2167
2181
|
"POST",
|
|
@@ -3070,6 +3084,51 @@ var EmailSignatureServiceImpl = class {
|
|
|
3070
3084
|
);
|
|
3071
3085
|
}
|
|
3072
3086
|
};
|
|
3087
|
+
var MessageTemplateServiceImpl = class {
|
|
3088
|
+
constructor(client) {
|
|
3089
|
+
this.client = client;
|
|
3090
|
+
}
|
|
3091
|
+
client;
|
|
3092
|
+
list(query = {}) {
|
|
3093
|
+
return this.client.requestWithQuery("GET", `${CONVERSATION_BASE_PATH}/message-templates`, query);
|
|
3094
|
+
}
|
|
3095
|
+
get(idOrKey) {
|
|
3096
|
+
return this.client.request(
|
|
3097
|
+
"GET",
|
|
3098
|
+
`${CONVERSATION_BASE_PATH}/message-templates/${encodeURIComponent(idOrKey)}`
|
|
3099
|
+
);
|
|
3100
|
+
}
|
|
3101
|
+
create(request) {
|
|
3102
|
+
return this.client.request("POST", `${CONVERSATION_BASE_PATH}/message-templates`, request);
|
|
3103
|
+
}
|
|
3104
|
+
update(id, request) {
|
|
3105
|
+
return this.client.request(
|
|
3106
|
+
"PATCH",
|
|
3107
|
+
`${CONVERSATION_BASE_PATH}/message-templates/${encodeURIComponent(id)}`,
|
|
3108
|
+
request
|
|
3109
|
+
);
|
|
3110
|
+
}
|
|
3111
|
+
upsertByKey(key, request) {
|
|
3112
|
+
return this.client.request(
|
|
3113
|
+
"PUT",
|
|
3114
|
+
`${CONVERSATION_BASE_PATH}/message-templates/${encodeURIComponent(key)}`,
|
|
3115
|
+
request
|
|
3116
|
+
);
|
|
3117
|
+
}
|
|
3118
|
+
async delete(id) {
|
|
3119
|
+
await this.client.request(
|
|
3120
|
+
"DELETE",
|
|
3121
|
+
`${CONVERSATION_BASE_PATH}/message-templates/${encodeURIComponent(id)}`
|
|
3122
|
+
);
|
|
3123
|
+
}
|
|
3124
|
+
render(request) {
|
|
3125
|
+
return this.client.request(
|
|
3126
|
+
"POST",
|
|
3127
|
+
`${CONVERSATION_BASE_PATH}/message-templates/render`,
|
|
3128
|
+
request
|
|
3129
|
+
);
|
|
3130
|
+
}
|
|
3131
|
+
};
|
|
3073
3132
|
var ChannelActionServiceImpl = class {
|
|
3074
3133
|
constructor(client) {
|
|
3075
3134
|
this.client = client;
|
|
@@ -5157,6 +5216,7 @@ exports.SCOPED_PLATFORM_ENTITY_SLUGS = SCOPED_PLATFORM_ENTITY_SLUGS;
|
|
|
5157
5216
|
exports.SchedulingClient = SchedulingClient;
|
|
5158
5217
|
exports.StorageClient = StorageClient;
|
|
5159
5218
|
exports.UNASSIGNED_SPACE_SLUG = UNASSIGNED_SPACE_SLUG;
|
|
5219
|
+
exports.UNSUBSCRIBE_URL_PLACEHOLDER = UNSUBSCRIBE_URL_PLACEHOLDER;
|
|
5160
5220
|
exports.UserProfileAssignmentSchema = UserProfileAssignmentSchema;
|
|
5161
5221
|
exports.UserRoleAssignmentSchema = UserRoleAssignmentSchema;
|
|
5162
5222
|
exports.UserSchema = UserSchema;
|