@vendasta/ai-assistants 0.27.0 → 0.29.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.
@@ -111,6 +111,7 @@ var ChatChannel;
111
111
  ChatChannel[ChatChannel["CHAT_CHANNEL_FACEBOOK"] = 5] = "CHAT_CHANNEL_FACEBOOK";
112
112
  ChatChannel[ChatChannel["CHAT_CHANNEL_INSTAGRAM"] = 7] = "CHAT_CHANNEL_INSTAGRAM";
113
113
  ChatChannel[ChatChannel["CHAT_CHANNEL_AUTOMATION"] = 8] = "CHAT_CHANNEL_AUTOMATION";
114
+ ChatChannel[ChatChannel["CHAT_CHANNEL_PLATFORM"] = 9] = "CHAT_CHANNEL_PLATFORM";
114
115
  })(ChatChannel || (ChatChannel = {}));
115
116
  var ChatMessageRole;
116
117
  (function (ChatMessageRole) {
@@ -322,6 +323,9 @@ class Function {
322
323
  if (proto.headers) {
323
324
  m.headers = proto.headers.map(FunctionHeader.fromProto);
324
325
  }
326
+ if (proto.authStrategy) {
327
+ m.authStrategy = FunctionAuthStrategy.fromProto(proto.authStrategy);
328
+ }
325
329
  return m;
326
330
  }
327
331
  constructor(kwargs) {
@@ -362,6 +366,38 @@ class Function {
362
366
  if (typeof this.managed !== 'undefined') {
363
367
  toReturn['managed'] = this.managed;
364
368
  }
369
+ if (typeof this.authStrategy !== 'undefined' && this.authStrategy !== null) {
370
+ toReturn['authStrategy'] = 'toApiJson' in this.authStrategy ? this.authStrategy.toApiJson() : this.authStrategy;
371
+ }
372
+ return toReturn;
373
+ }
374
+ }
375
+ class FunctionAuthStrategy {
376
+ static fromProto(proto) {
377
+ let m = new FunctionAuthStrategy();
378
+ m = Object.assign(m, proto);
379
+ if (proto.unspecified) {
380
+ m.unspecified = FunctionAuthStrategyUnspecifiedFunctionAuthStrategy.fromProto(proto.unspecified);
381
+ }
382
+ if (proto.platformManaged) {
383
+ m.platformManaged = FunctionAuthStrategyPlatformManagedFunctionAuthStrategy.fromProto(proto.platformManaged);
384
+ }
385
+ return m;
386
+ }
387
+ constructor(kwargs) {
388
+ if (!kwargs) {
389
+ return;
390
+ }
391
+ Object.assign(this, kwargs);
392
+ }
393
+ toApiJson() {
394
+ const toReturn = {};
395
+ if (typeof this.unspecified !== 'undefined' && this.unspecified !== null) {
396
+ toReturn['unspecified'] = 'toApiJson' in this.unspecified ? this.unspecified.toApiJson() : this.unspecified;
397
+ }
398
+ if (typeof this.platformManaged !== 'undefined' && this.platformManaged !== null) {
399
+ toReturn['platformManaged'] = 'toApiJson' in this.platformManaged ? this.platformManaged.toApiJson() : this.platformManaged;
400
+ }
365
401
  return toReturn;
366
402
  }
367
403
  }
@@ -461,6 +497,43 @@ class FunctionParameter {
461
497
  return toReturn;
462
498
  }
463
499
  }
500
+ class FunctionAuthStrategyPlatformManagedFunctionAuthStrategy {
501
+ static fromProto(proto) {
502
+ let m = new FunctionAuthStrategyPlatformManagedFunctionAuthStrategy();
503
+ m = Object.assign(m, proto);
504
+ return m;
505
+ }
506
+ constructor(kwargs) {
507
+ if (!kwargs) {
508
+ return;
509
+ }
510
+ Object.assign(this, kwargs);
511
+ }
512
+ toApiJson() {
513
+ const toReturn = {};
514
+ if (typeof this.requiredScopes !== 'undefined') {
515
+ toReturn['requiredScopes'] = this.requiredScopes;
516
+ }
517
+ return toReturn;
518
+ }
519
+ }
520
+ class FunctionAuthStrategyUnspecifiedFunctionAuthStrategy {
521
+ static fromProto(proto) {
522
+ let m = new FunctionAuthStrategyUnspecifiedFunctionAuthStrategy();
523
+ m = Object.assign(m, proto);
524
+ return m;
525
+ }
526
+ constructor(kwargs) {
527
+ if (!kwargs) {
528
+ return;
529
+ }
530
+ Object.assign(this, kwargs);
531
+ }
532
+ toApiJson() {
533
+ const toReturn = {};
534
+ return toReturn;
535
+ }
536
+ }
464
537
 
465
538
  function enumStringToValue$8(enumRef, value) {
466
539
  if (typeof value === 'number') {
@@ -849,6 +922,9 @@ class Assistant {
849
922
  if (typeof this.configurableGoals !== 'undefined' && this.configurableGoals !== null) {
850
923
  toReturn['configurableGoals'] = 'toApiJson' in this.configurableGoals ? this.configurableGoals.toApiJson() : this.configurableGoals;
851
924
  }
925
+ if (typeof this.userId !== 'undefined') {
926
+ toReturn['userId'] = this.userId;
927
+ }
852
928
  return toReturn;
853
929
  }
854
930
  }
@@ -2105,6 +2181,9 @@ class GenerateChatAnswerRequest {
2105
2181
  if (proto.options) {
2106
2182
  m.options = GenerateChatAnswerRequestOptions.fromProto(proto.options);
2107
2183
  }
2184
+ if (proto.assistantKey) {
2185
+ m.assistantKey = AssistantKey.fromProto(proto.assistantKey);
2186
+ }
2108
2187
  return m;
2109
2188
  }
2110
2189
  constructor(kwargs) {
@@ -2130,6 +2209,9 @@ class GenerateChatAnswerRequest {
2130
2209
  if (typeof this.options !== 'undefined' && this.options !== null) {
2131
2210
  toReturn['options'] = 'toApiJson' in this.options ? this.options.toApiJson() : this.options;
2132
2211
  }
2212
+ if (typeof this.assistantKey !== 'undefined' && this.assistantKey !== null) {
2213
+ toReturn['assistantKey'] = 'toApiJson' in this.assistantKey ? this.assistantKey.toApiJson() : this.assistantKey;
2214
+ }
2133
2215
  return toReturn;
2134
2216
  }
2135
2217
  }
@@ -4223,5 +4305,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4223
4305
  * Generated bundle index. Do not edit.
4224
4306
  */
4225
4307
 
4226
- export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, CreateGoalRequest, CreateGoalResponse, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, CreatePromptRequest, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeployPromptModuleRequest, DeployPromptRequest, ExecuteFunctionRequest, ExecuteFunctionResponse, Function, FunctionApiService, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptModuleVersionRequest, GetDeployedPromptModuleVersionResponse, GetDeployedPromptVersionRequest, GetDeployedPromptVersionResponse, GetFunctionRequest, GetFunctionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiDeployedPromptVersionRequest, GetMultiDeployedPromptVersionResponse, GetMultiFunctionRequest, GetMultiFunctionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, HostService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListFunctionRequest, ListFunctionRequestFilters, ListFunctionResponse, ListGoalsRequest, ListGoalsRequestFilters, ListGoalsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, ModelConfig, Namespace, NamespaceAccountGroupNamespace, NamespaceAccountGroupsForGroupNamespace, NamespaceAccountGroupsForPartnerNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, UpdateGoalRequest, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, VendorModel };
4308
+ export { Access, Assistant, AssistantApiService, AssistantKey, AssistantType, BuildDefaultAssistantRequest, BuildDefaultAssistantResponse, ChatAnswerFunctionExecutionJob, ChatAnswerFunctionExecutionJobResult, ChatAnswerFunctionExecutionJobStatus, ChatChannel, ChatMessage, ChatMessageRole, ChatUserInfo, Config, ConfigInboxConfig, ConfigVoiceConfig, ConfigurableGoal, Connection, ConnectionApiService, ConnectionKey, CreateGoalRequest, CreateGoalResponse, CreatePromptModuleRequest, CreatePromptModuleResponse, CreatePromptModuleVersionRequest, CreatePromptModuleVersionRequestOptions, CreatePromptRequest, DeepgramConfig, DeleteAssistantRequest, DeleteConnectionRequest, DeleteFunctionRequest, DeleteGoalRequest, DeletePromptModuleRequest, DeletePromptRequest, DeployPromptModuleRequest, DeployPromptRequest, ExecuteFunctionRequest, ExecuteFunctionResponse, Function, FunctionApiService, FunctionAuthStrategy, FunctionAuthStrategyPlatformManagedFunctionAuthStrategy, FunctionAuthStrategyUnspecifiedFunctionAuthStrategy, FunctionHeader, FunctionKey, FunctionParameter, FunctionParameterParameterLocation, GenerateChatAnswerRequest, GenerateChatAnswerRequestOptions, GenerateChatAnswerResponse, GetAssistantRequest, GetAssistantResponse, GetChatAnswerFunctionExecutionJobRequest, GetChatAnswerFunctionExecutionJobResponse, GetConnectionRequest, GetConnectionResponse, GetDeployedPromptModuleVersionRequest, GetDeployedPromptModuleVersionResponse, GetDeployedPromptVersionRequest, GetDeployedPromptVersionResponse, GetFunctionRequest, GetFunctionResponse, GetGoalRequest, GetGoalResponse, GetHydratedDeployedPromptModuleVersionRequest, GetHydratedDeployedPromptModuleVersionResponse, GetMultiDeployedPromptVersionRequest, GetMultiDeployedPromptVersionResponse, GetMultiFunctionRequest, GetMultiFunctionResponse, GetMultiGoalRequest, GetMultiGoalResponse, GetMultiHydratedDeployedPromptModuleVersionRequest, GetMultiHydratedDeployedPromptModuleVersionResponse, GetPromptModuleRequest, GetPromptModuleResponse, GetPromptModuleVersionRequest, GetPromptModuleVersionResponse, GetPromptRequest, GetPromptResponse, GetPromptVersionRequest, GetPromptVersionResponse, Goal, GoalApiService, GoalChannel, GoalKey, GoalType, GoalsDisabledForAccountGroupRequest, GoalsDisabledForAccountGroupResponse, HostService, KeyValuePair, ListAllAssistantsAssociatedToConnectionRequest, ListAllAssistantsAssociatedToConnectionRequestFilters, ListAllAssistantsAssociatedToConnectionResponse, ListAssistantRequest, ListAssistantRequestFilters, ListAssistantResponse, ListConnectionsRequest, ListConnectionsRequestFilters, ListConnectionsResponse, ListFunctionRequest, ListFunctionRequestFilters, ListFunctionResponse, ListGoalsRequest, ListGoalsRequestFilters, ListGoalsResponse, ListPromptModuleRequest, ListPromptModuleRequestFilters, ListPromptModuleResponse, ListPromptModuleVersionsRequest, ListPromptModuleVersionsResponse, ListPromptRequest, ListPromptResponse, ListPromptVersionsRequest, ListPromptVersionsResponse, ModelConfig, Namespace, NamespaceAccountGroupNamespace, NamespaceAccountGroupsForGroupNamespace, NamespaceAccountGroupsForPartnerNamespace, NamespaceGlobalNamespace, NamespacePartnerNamespace, NamespaceSystemNamespace, OpenAIRealtimeConfig, OpenAIRealtimeConfigTurnDetection, PagedRequestOptions, PagedResponseMetadata, Prompt, PromptApiService, PromptModule, PromptModuleApiService, PromptModuleKey, PromptModuleVersion, PromptVersion, SetAssistantConnectionsRequest, SetAssistantConnectionsRequestConnectionState, UpdateGoalRequest, UpdatePromptModuleRequest, UpdatePromptRequest, UpsertAssistantRequest, UpsertAssistantRequestOptions, UpsertAssistantResponse, UpsertConnectionRequest, UpsertFunctionRequest, UpsertGoalRequest, VendorModel };
4227
4309
  //# sourceMappingURL=vendasta-ai-assistants.mjs.map