@proteos/sdk 0.90.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 CHANGED
@@ -283,6 +283,13 @@ var SessionServiceImpl = class {
283
283
  request
284
284
  );
285
285
  }
286
+ async transferVoice(id, request) {
287
+ return this.client.request(
288
+ "POST",
289
+ `${SESSIONS_BASE_PATH}/${id}/voice/transfer`,
290
+ request
291
+ );
292
+ }
286
293
  async appendSpeech(id, request, requestOptions) {
287
294
  const response = await this.client.request(
288
295
  "POST",
@@ -300,6 +307,15 @@ var SessionServiceImpl = class {
300
307
  requestOptions
301
308
  );
302
309
  }
310
+ async getVoiceRecording(id, voiceSessionId, requestOptions) {
311
+ const { response } = await this.client.requestRaw(
312
+ "GET",
313
+ `${SESSIONS_BASE_PATH}/${id}/voice/${voiceSessionId}/recording`,
314
+ void 0,
315
+ requestOptions
316
+ );
317
+ return await response.blob();
318
+ }
303
319
  };
304
320
  function parseEvent(data) {
305
321
  if (!data) return null;
@@ -1061,6 +1077,8 @@ var PLATFORM_ENTITIES = [
1061
1077
  // their preset catalog.
1062
1078
  { slug: "sending-rules", name: "Sending Rules" },
1063
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" },
1064
1082
  // The channel_action ledger: acts through a connection that are neither a
1065
1083
  // message nor a reaction (LinkedIn invitations, profile visits, InMail).
1066
1084
  { slug: "channel-actions", name: "Channel Actions" },
@@ -1094,7 +1112,10 @@ var PLATFORM_ENTITIES = [
1094
1112
  { slug: "availability-constraints", name: "Availability Constraints" },
1095
1113
  // Discovery (discovery-service): what users send Proteos to show how they
1096
1114
  // work — screenshots, recordings, written feedback. Mass noun, no plural.
1097
- { slug: "discovery-evidence", name: "Discovery Evidence" }
1115
+ { slug: "discovery-evidence", name: "Discovery Evidence" },
1116
+ // Interview guides an admin writes; whoever reads a definition reads its
1117
+ // interviews, and whoever writes it invites people.
1118
+ { slug: "discovery-interview-definitions", name: "Discovery Interview Definitions" }
1098
1119
  ];
1099
1120
  var PLATFORM_ENTITY_SLUGS = PLATFORM_ENTITIES.map(
1100
1121
  (entity) => entity.slug
@@ -1120,7 +1141,10 @@ var SCOPED_PLATFORM_ENTITY_SLUGS = [
1120
1141
  // discovery-service: evidence is owned by its creator; a caller holding no
1121
1142
  // grant at all is treated as scoped (own rows), so every org member can
1122
1143
  // send feedback and see what they sent.
1123
- "discovery-evidence"
1144
+ "discovery-evidence",
1145
+ // discovery-service: an interview definition is owned by its creator; its
1146
+ // interviews follow it.
1147
+ "discovery-interview-definitions"
1124
1148
  ];
1125
1149
  function isPlatformEntity(slug) {
1126
1150
  return PLATFORM_ENTITY_SLUGS.includes(slug);
@@ -1315,6 +1339,8 @@ var DEFAULT_OPTIONS = {
1315
1339
  timeout: 3e4,
1316
1340
  headers: {}
1317
1341
  };
1342
+ var INVOKE_TIMEOUT_MS = 75e3;
1343
+ var BATCH_INVOKE_TIMEOUT_MS = 315e3;
1318
1344
  function resolveOptions(options) {
1319
1345
  return {
1320
1346
  baseUrl: options.baseUrl.replace(/\/$/, ""),
@@ -1754,7 +1780,8 @@ var ConnectorConnectionServiceImpl = class {
1754
1780
  const response = await this.client.request(
1755
1781
  "POST",
1756
1782
  `${CONNECTOR_BASE_PATH}/connections/${encodeURIComponent(id)}/methods/${encodeURIComponent(method)}/invoke`,
1757
- params
1783
+ params,
1784
+ { timeout: INVOKE_TIMEOUT_MS }
1758
1785
  );
1759
1786
  return response.result;
1760
1787
  }
@@ -1805,6 +1832,9 @@ function buildQuery(options) {
1805
1832
  return queryString ? `?${queryString}` : "";
1806
1833
  }
1807
1834
 
1835
+ // src/conversation/types.ts
1836
+ var UNSUBSCRIBE_URL_PLACEHOLDER = "https://unsubscribe.invalid/link";
1837
+
1808
1838
  // src/conversation/index.ts
1809
1839
  var CONVERSATION_BASE_PATH = "/conversations/v1";
1810
1840
  var ConversationClient = class {
@@ -1819,6 +1849,8 @@ var ConversationClient = class {
1819
1849
  /** Outbound send constraints: windows, connection limits, frequency caps + presets. */
1820
1850
  sendingRules;
1821
1851
  emailSignatures;
1852
+ /** Reusable messages and snippets, and rendering one for a recipient. */
1853
+ messageTemplates;
1822
1854
  /**
1823
1855
  * Channel actions: acts performed through a connection that are neither a
1824
1856
  * message nor a reaction — LinkedIn invitations, profile visits, InMail.
@@ -1866,6 +1898,7 @@ var ConversationClient = class {
1866
1898
  this.conversationFilters = new ConversationFilterServiceImpl(client);
1867
1899
  this.sendingRules = new SendingRuleServiceImpl(client);
1868
1900
  this.emailSignatures = new EmailSignatureServiceImpl(client);
1901
+ this.messageTemplates = new MessageTemplateServiceImpl(client);
1869
1902
  this.channelActions = new ChannelActionServiceImpl(client);
1870
1903
  this.channelEvents = new ChannelEventServiceImpl(client);
1871
1904
  this.glossaryTerms = new GlossaryTermServiceImpl(client);
@@ -3045,6 +3078,51 @@ var EmailSignatureServiceImpl = class {
3045
3078
  );
3046
3079
  }
3047
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
+ };
3048
3126
  var ChannelActionServiceImpl = class {
3049
3127
  constructor(client) {
3050
3128
  this.client = client;
@@ -3403,10 +3481,14 @@ var DiscoveryClient = class {
3403
3481
  evidence;
3404
3482
  narrations;
3405
3483
  platform;
3484
+ interviewDefinitions;
3485
+ interviews;
3406
3486
  constructor(client) {
3407
3487
  this.evidence = new DiscoveryEvidenceServiceImpl(client);
3408
3488
  this.narrations = new DiscoveryEvidenceNarrationServiceImpl(client);
3409
3489
  this.platform = new PlatformDiscoveryEvidenceServiceImpl(client);
3490
+ this.interviewDefinitions = new DiscoveryInterviewDefinitionServiceImpl(client);
3491
+ this.interviews = new DiscoveryInterviewServiceImpl(client);
3410
3492
  }
3411
3493
  };
3412
3494
  var DiscoveryEvidenceServiceImpl = class {
@@ -3483,6 +3565,87 @@ var PlatformDiscoveryEvidenceServiceImpl = class {
3483
3565
  );
3484
3566
  }
3485
3567
  };
3568
+ var DiscoveryInterviewDefinitionServiceImpl = class {
3569
+ constructor(client) {
3570
+ this.client = client;
3571
+ }
3572
+ client;
3573
+ path(id, suffix = "") {
3574
+ const base = `${DISCOVERY_BASE_PATH}/interview-definitions`;
3575
+ return id === void 0 ? base : `${base}/${encode(id)}${suffix}`;
3576
+ }
3577
+ create(request) {
3578
+ return this.client.request("POST", this.path(), request);
3579
+ }
3580
+ list(query = {}) {
3581
+ return this.client.requestWithQuery("GET", this.path(), query);
3582
+ }
3583
+ get(id) {
3584
+ return this.client.request("GET", this.path(id));
3585
+ }
3586
+ update(id, request) {
3587
+ return this.client.request("PATCH", this.path(id), request);
3588
+ }
3589
+ async delete(id) {
3590
+ await this.client.request("DELETE", this.path(id));
3591
+ }
3592
+ publish(id) {
3593
+ return this.client.request("POST", this.path(id, "/publish"));
3594
+ }
3595
+ close(id) {
3596
+ return this.client.request("POST", this.path(id, "/close"));
3597
+ }
3598
+ reopen(id) {
3599
+ return this.client.request("POST", this.path(id, "/reopen"));
3600
+ }
3601
+ async invite(id, request) {
3602
+ const response = await this.client.request(
3603
+ "POST",
3604
+ this.path(id, "/interviews"),
3605
+ request
3606
+ );
3607
+ return response.data;
3608
+ }
3609
+ getParticipation(id) {
3610
+ return this.client.request("GET", this.path(id, "/participation"));
3611
+ }
3612
+ startParticipation(id, request) {
3613
+ return this.client.request("POST", this.path(id, "/participation/start"), request);
3614
+ }
3615
+ };
3616
+ var DiscoveryInterviewServiceImpl = class {
3617
+ constructor(client) {
3618
+ this.client = client;
3619
+ }
3620
+ client;
3621
+ path(id, suffix = "") {
3622
+ return `${DISCOVERY_BASE_PATH}/interviews/${encode(id)}${suffix}`;
3623
+ }
3624
+ list(query) {
3625
+ return this.client.requestWithQuery("GET", `${DISCOVERY_BASE_PATH}/interviews`, query);
3626
+ }
3627
+ get(id) {
3628
+ return this.client.request("GET", this.path(id));
3629
+ }
3630
+ async remind(id) {
3631
+ await this.client.request("POST", this.path(id, "/remind"));
3632
+ }
3633
+ synthesize(id) {
3634
+ return this.client.request("POST", this.path(id, "/synthesize"));
3635
+ }
3636
+ async delete(id) {
3637
+ await this.client.request("DELETE", this.path(id));
3638
+ }
3639
+ createDownloadUrl(id, fileId) {
3640
+ return this.client.request("POST", this.path(id, `/files/${encode(fileId)}/download-url`));
3641
+ }
3642
+ complete(id) {
3643
+ return this.client.request("POST", this.path(id, "/complete"), {});
3644
+ }
3645
+ getParticipation(id) {
3646
+ return this.client.request("GET", this.path(id, "/participation"));
3647
+ }
3648
+ };
3486
3649
 
3487
3650
  // src/events/index.ts
3488
3651
  var EVENTS_BASE_PATH = "/events/v1";
@@ -3603,7 +3766,8 @@ var ActionServiceImpl = class {
3603
3766
  const response = await this.client.request(
3604
3767
  "POST",
3605
3768
  `${ACTIONS_BASE_PATH}/${slug}/invoke`,
3606
- params
3769
+ params,
3770
+ { timeout: INVOKE_TIMEOUT_MS }
3607
3771
  );
3608
3772
  return response.result;
3609
3773
  }
@@ -3612,7 +3776,7 @@ var ActionServiceImpl = class {
3612
3776
  "POST",
3613
3777
  `/functions/v1/public/orgs/${encodeURIComponent(orgId)}/actions/${encodeURIComponent(slug)}/invoke`,
3614
3778
  params,
3615
- { skipAuth: true }
3779
+ { skipAuth: true, timeout: INVOKE_TIMEOUT_MS }
3616
3780
  );
3617
3781
  return response.result;
3618
3782
  }
@@ -3620,7 +3784,8 @@ var ActionServiceImpl = class {
3620
3784
  const response = await this.client.request(
3621
3785
  "POST",
3622
3786
  `/functions/v1/entities/${entitySlug}/records/${recordId}/actions/${slug}/invoke`,
3623
- params
3787
+ params,
3788
+ { timeout: INVOKE_TIMEOUT_MS }
3624
3789
  );
3625
3790
  return response.result;
3626
3791
  }
@@ -3628,7 +3793,8 @@ var ActionServiceImpl = class {
3628
3793
  const response = await this.client.request(
3629
3794
  "POST",
3630
3795
  `/functions/v1/entities/${entitySlug}/actions/${slug}/invoke`,
3631
- { record_ids: recordIds, params }
3796
+ { record_ids: recordIds, params },
3797
+ { timeout: BATCH_INVOKE_TIMEOUT_MS }
3632
3798
  );
3633
3799
  return response.result;
3634
3800
  }
@@ -3894,12 +4060,47 @@ var SpaceServiceImpl = class {
3894
4060
  await this.client.request("DELETE", `${SPACES_BASE_PATH}/${slug}`);
3895
4061
  }
3896
4062
  };
4063
+
4064
+ // src/knowledge/whiteboard-templates.ts
4065
+ var WHITEBOARD_TEMPLATES_BASE_PATH = "/knowledge/v1/whiteboard-templates";
4066
+ var WhiteboardTemplateServiceImpl = class {
4067
+ constructor(client) {
4068
+ this.client = client;
4069
+ }
4070
+ client;
4071
+ list(options = {}) {
4072
+ return new chunkSUS4QR63_cjs.PageIterator((opts) => this.listPage(opts), options);
4073
+ }
4074
+ async listPage(options = {}) {
4075
+ return this.client.requestWithQuery(
4076
+ "GET",
4077
+ WHITEBOARD_TEMPLATES_BASE_PATH,
4078
+ options
4079
+ );
4080
+ }
4081
+ async get(id) {
4082
+ return this.client.request("GET", `${WHITEBOARD_TEMPLATES_BASE_PATH}/${id}`);
4083
+ }
4084
+ async create(request) {
4085
+ return this.client.request("POST", WHITEBOARD_TEMPLATES_BASE_PATH, request);
4086
+ }
4087
+ async update(id, request) {
4088
+ return this.client.request(
4089
+ "PATCH",
4090
+ `${WHITEBOARD_TEMPLATES_BASE_PATH}/${id}`,
4091
+ request
4092
+ );
4093
+ }
4094
+ async delete(id) {
4095
+ await this.client.request("DELETE", `${WHITEBOARD_TEMPLATES_BASE_PATH}/${id}`);
4096
+ }
4097
+ };
3897
4098
  var UNASSIGNED_SPACE_SLUG = "__unassigned__";
3898
4099
  var KnowledgeNodeMetadataSchema = zod.z.object({
3899
4100
  id: zod.z.string(),
3900
4101
  org_id: zod.z.string(),
3901
4102
  title: zod.z.string(),
3902
- type: zod.z.enum(["markdown", "file", "url"]),
4103
+ type: zod.z.enum(["markdown", "file", "url", "whiteboard"]),
3903
4104
  status: zod.z.enum(["draft", "published", "archived"]),
3904
4105
  embedding_model: zod.z.string().nullish(),
3905
4106
  embedded_at: zod.z.string().nullish(),
@@ -3963,7 +4164,7 @@ var NodeNeighborhoodSchema = zod.z.object({
3963
4164
  zod.z.object({
3964
4165
  id: zod.z.string(),
3965
4166
  title: zod.z.string(),
3966
- type: zod.z.enum(["markdown", "file", "url"]),
4167
+ type: zod.z.enum(["markdown", "file", "url", "whiteboard"]),
3967
4168
  status: zod.z.enum(["draft", "published", "archived"]),
3968
4169
  distance: zod.z.number()
3969
4170
  })
@@ -3992,6 +4193,8 @@ var KnowledgeClient = class {
3992
4193
  spaces;
3993
4194
  /** Whole-org graph bulk read (radiant graph view): `knowledge.graph.get()`. */
3994
4195
  graph;
4196
+ /** Org-wide whiteboard templates: `knowledge.whiteboardTemplates`. */
4197
+ whiteboardTemplates;
3995
4198
  constructor(client) {
3996
4199
  this.nodes = new NodeServiceImpl(client);
3997
4200
  this.links = new LinkServiceImpl(client);
@@ -3999,6 +4202,7 @@ var KnowledgeClient = class {
3999
4202
  this.labels = new LabelServiceImpl(client);
4000
4203
  this.spaces = new SpaceServiceImpl(client);
4001
4204
  this.graph = new GraphServiceImpl(client);
4205
+ this.whiteboardTemplates = new WhiteboardTemplateServiceImpl(client);
4002
4206
  }
4003
4207
  };
4004
4208
 
@@ -5006,6 +5210,7 @@ exports.SCOPED_PLATFORM_ENTITY_SLUGS = SCOPED_PLATFORM_ENTITY_SLUGS;
5006
5210
  exports.SchedulingClient = SchedulingClient;
5007
5211
  exports.StorageClient = StorageClient;
5008
5212
  exports.UNASSIGNED_SPACE_SLUG = UNASSIGNED_SPACE_SLUG;
5213
+ exports.UNSUBSCRIBE_URL_PLACEHOLDER = UNSUBSCRIBE_URL_PLACEHOLDER;
5009
5214
  exports.UserProfileAssignmentSchema = UserProfileAssignmentSchema;
5010
5215
  exports.UserRoleAssignmentSchema = UserRoleAssignmentSchema;
5011
5216
  exports.UserSchema = UserSchema;