@proteos/sdk 0.91.0 → 0.92.0
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 +54 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +204 -1
- package/dist/index.d.ts +204 -1
- package/dist/index.js +54 -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 +86 -0
- package/src/conversation/types.ts +194 -0
- package/src/index.ts +11 -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);
|
|
@@ -3070,6 +3078,51 @@ var EmailSignatureServiceImpl = class {
|
|
|
3070
3078
|
);
|
|
3071
3079
|
}
|
|
3072
3080
|
};
|
|
3081
|
+
var MessageTemplateServiceImpl = class {
|
|
3082
|
+
constructor(client) {
|
|
3083
|
+
this.client = client;
|
|
3084
|
+
}
|
|
3085
|
+
client;
|
|
3086
|
+
list(query = {}) {
|
|
3087
|
+
return this.client.requestWithQuery("GET", `${CONVERSATION_BASE_PATH}/message-templates`, query);
|
|
3088
|
+
}
|
|
3089
|
+
get(idOrKey) {
|
|
3090
|
+
return this.client.request(
|
|
3091
|
+
"GET",
|
|
3092
|
+
`${CONVERSATION_BASE_PATH}/message-templates/${encodeURIComponent(idOrKey)}`
|
|
3093
|
+
);
|
|
3094
|
+
}
|
|
3095
|
+
create(request) {
|
|
3096
|
+
return this.client.request("POST", `${CONVERSATION_BASE_PATH}/message-templates`, request);
|
|
3097
|
+
}
|
|
3098
|
+
update(id, request) {
|
|
3099
|
+
return this.client.request(
|
|
3100
|
+
"PATCH",
|
|
3101
|
+
`${CONVERSATION_BASE_PATH}/message-templates/${encodeURIComponent(id)}`,
|
|
3102
|
+
request
|
|
3103
|
+
);
|
|
3104
|
+
}
|
|
3105
|
+
upsertByKey(key, request) {
|
|
3106
|
+
return this.client.request(
|
|
3107
|
+
"PUT",
|
|
3108
|
+
`${CONVERSATION_BASE_PATH}/message-templates/${encodeURIComponent(key)}`,
|
|
3109
|
+
request
|
|
3110
|
+
);
|
|
3111
|
+
}
|
|
3112
|
+
async delete(id) {
|
|
3113
|
+
await this.client.request(
|
|
3114
|
+
"DELETE",
|
|
3115
|
+
`${CONVERSATION_BASE_PATH}/message-templates/${encodeURIComponent(id)}`
|
|
3116
|
+
);
|
|
3117
|
+
}
|
|
3118
|
+
render(request) {
|
|
3119
|
+
return this.client.request(
|
|
3120
|
+
"POST",
|
|
3121
|
+
`${CONVERSATION_BASE_PATH}/message-templates/render`,
|
|
3122
|
+
request
|
|
3123
|
+
);
|
|
3124
|
+
}
|
|
3125
|
+
};
|
|
3073
3126
|
var ChannelActionServiceImpl = class {
|
|
3074
3127
|
constructor(client) {
|
|
3075
3128
|
this.client = client;
|
|
@@ -5157,6 +5210,7 @@ exports.SCOPED_PLATFORM_ENTITY_SLUGS = SCOPED_PLATFORM_ENTITY_SLUGS;
|
|
|
5157
5210
|
exports.SchedulingClient = SchedulingClient;
|
|
5158
5211
|
exports.StorageClient = StorageClient;
|
|
5159
5212
|
exports.UNASSIGNED_SPACE_SLUG = UNASSIGNED_SPACE_SLUG;
|
|
5213
|
+
exports.UNSUBSCRIBE_URL_PLACEHOLDER = UNSUBSCRIBE_URL_PLACEHOLDER;
|
|
5160
5214
|
exports.UserProfileAssignmentSchema = UserProfileAssignmentSchema;
|
|
5161
5215
|
exports.UserRoleAssignmentSchema = UserRoleAssignmentSchema;
|
|
5162
5216
|
exports.UserSchema = UserSchema;
|