@lpextend/node-sdk 1.1.5 → 1.1.6
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.d.mts +61 -1
- package/dist/index.d.ts +61 -1
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2285,6 +2285,31 @@ interface LPExtendSDKConfig {
|
|
|
2285
2285
|
* @default 30000
|
|
2286
2286
|
*/
|
|
2287
2287
|
timeout?: number;
|
|
2288
|
+
/**
|
|
2289
|
+
* SDK mode controls how scopes are verified:
|
|
2290
|
+
* - 'shell' (default): Verifies scopes with the LP Extend shell backend.
|
|
2291
|
+
* Requires shell connectivity.
|
|
2292
|
+
* - 'local': Skips all shell contact. Grants all requested scopes locally.
|
|
2293
|
+
* Requires `accessToken` to be provided directly (e.g. from LP Login Service API).
|
|
2294
|
+
* Use this for local development when the shell is not running.
|
|
2295
|
+
*
|
|
2296
|
+
* @default 'shell'
|
|
2297
|
+
*/
|
|
2298
|
+
mode?: 'shell' | 'local';
|
|
2299
|
+
/**
|
|
2300
|
+
* Skip app registration verification with the shell backend.
|
|
2301
|
+
* When true, the SDK will not call /api/v1/lp/{accountId}/sdk/init to verify
|
|
2302
|
+
* that the app is registered. Instead, it grants all requested scopes locally.
|
|
2303
|
+
*
|
|
2304
|
+
* Use this for local development when your app is not yet registered
|
|
2305
|
+
* for the target account in the LP Extend shell.
|
|
2306
|
+
*
|
|
2307
|
+
* WARNING: Do not enable in production — app registration ensures proper
|
|
2308
|
+
* scope governance and access control.
|
|
2309
|
+
*
|
|
2310
|
+
* @default false
|
|
2311
|
+
*/
|
|
2312
|
+
skipRegistration?: boolean;
|
|
2288
2313
|
}
|
|
2289
2314
|
/**
|
|
2290
2315
|
* SDK initialization result
|
|
@@ -4123,6 +4148,41 @@ declare function initializeSDK(config: LPExtendSDKConfig): Promise<LPExtendSDK>;
|
|
|
4123
4148
|
* ```
|
|
4124
4149
|
*/
|
|
4125
4150
|
declare function createSDKFromEnv(extendToken: string): Promise<LPExtendSDK>;
|
|
4151
|
+
/**
|
|
4152
|
+
* Create an SDK in local mode — no shell required
|
|
4153
|
+
*
|
|
4154
|
+
* Convenience wrapper around `createSDK({ mode: 'local', ... })`.
|
|
4155
|
+
* Skips all shell verification and grants the requested scopes locally.
|
|
4156
|
+
*
|
|
4157
|
+
* Use this for local development when the shell is not running.
|
|
4158
|
+
* Obtain the `accessToken` from the LP Login Service API
|
|
4159
|
+
* (POST https://{domain}/api/account/{accountId}/login).
|
|
4160
|
+
*
|
|
4161
|
+
* @param config - SDK config (accessToken is required)
|
|
4162
|
+
* @returns Promise resolving to initialized SDK instance
|
|
4163
|
+
*
|
|
4164
|
+
* @example
|
|
4165
|
+
* ```typescript
|
|
4166
|
+
* import { createLocalSDK, Scopes } from '@lpextend/node-sdk';
|
|
4167
|
+
*
|
|
4168
|
+
* const sdk = await createLocalSDK({
|
|
4169
|
+
* appId: 'my-app',
|
|
4170
|
+
* accountId: '12345678',
|
|
4171
|
+
* accessToken: bearerTokenFromLPLogin,
|
|
4172
|
+
* scopes: [Scopes.SKILLS, Scopes.USERS],
|
|
4173
|
+
* });
|
|
4174
|
+
*
|
|
4175
|
+
* const { data: skills } = await sdk.skills.getAll();
|
|
4176
|
+
* ```
|
|
4177
|
+
*/
|
|
4178
|
+
declare function createLocalSDK(config: {
|
|
4179
|
+
appId: string;
|
|
4180
|
+
accountId: string;
|
|
4181
|
+
accessToken: string;
|
|
4182
|
+
scopes?: string[];
|
|
4183
|
+
debug?: boolean;
|
|
4184
|
+
timeout?: number;
|
|
4185
|
+
}): Promise<LPExtendSDK>;
|
|
4126
4186
|
/**
|
|
4127
4187
|
* SDK Version
|
|
4128
4188
|
*/
|
|
@@ -4217,4 +4277,4 @@ type Scope = (typeof Scopes)[keyof typeof Scopes];
|
|
|
4217
4277
|
*/
|
|
4218
4278
|
declare function getShellToken(config: ShellTokenConfig): Promise<ShellTokenResponse>;
|
|
4219
4279
|
|
|
4220
|
-
export { type CreateConversationRequest$1 as AICreateConversationRequest, AIStudioAPI, type AIStudioCategory, type AIStudioConversation, type AIStudioFlow, type AIStudioMessage, type AIStudioSimulation, type AIStudioSummary, type AIStudioUser, AIStudioUsersAPI, type UpdateConversationRequest as AIUpdateConversationRequest, type APIResponse, type ActivityRecord, type AgentActivity, AgentActivityAPI, type AgentActivityQuery, AgentGroupsAPI, type AgentMetrics, AgentMetricsAPI, type AgentMetricsQuery, type AgentParticipant, type AgentStatus, type ApiKeyAuthResponse, AutomaticMessagesAPI, type BatchSummaryRequest, BotAgentsAPI, BotGroupsAPI, BotsAPI, type CBAddBotAgentRequest, type CBAllBotAgentsStatusQueryParams, type CBApiResponse, type CBAuthCredentials, type CBAuthInfo, type CBBot, type CBBotEnvironment, type CBBotGroup, type CBBotGroupsQueryParams, type CBBotInstanceStatus, type CBBotPlatform, type CBBotUser, type CBBotsByGroupQueryParams, type CBChatBot, type CBChatBotMetrics, type CBChatBotPlatformUser, type CBChatBotSummary, type CBChatBotSummaryList, type CBConsumerQueryEventType, type CBConsumerQueryMetric, type CBConsumerQueryMetricsExtendedParams, type CBConsumerQueryMetricsParams, type CBConsumerQueryMetricsResponse, type CBCredential, type CBDialog, type CBDialogGroup, type CBDialogTemplateSummary, type CBDomainList, type CBDuplicatePhrase, type CBDuplicatePhrases, type CBGlobalFunctions, type CBIntent, type CBInteraction, type CBInteractionContent, type CBInteractionList, type CBKAIOnDemandConfig, type CBKAISearchRequest, type CBKAISearchResponse, type CBKAISearchResultItem, type CBKBArticle, type CBKBArticlesQueryParams, type CBKBContentSource, type CBKBLandingPageMetrics, type CBKnowledgeBase, type CBKnowledgeBaseDetail, type CBKnowledgeBaseList, type CBLPAppCredentials, type CBLPSkill, type CBNLUDomain, type CBPCSBotsStatusQueryParams, type CBPageContext, type CBPaginatedResult, type CBResponder, type CBResponseMatch, type CBSuccessResult, type CBSyncStatusDetails, type CBTileData, CampaignsAPI, CategoriesAPI, type CloseConversationRequest, type CoBrowseSession, ConnectToMessagingAPI, type ConsumerParticipant, type ConsumerProfile, type ContentToRetrieve, ConversationBuilderAPI, type ConversationContext, type ConversationInteraction, type ConversationParticipant, type ConversationQueryParams, type ConversationSummary, type ConversationTransfer, ConversationsAPI, type CreateAIStudioUserRequest, type CreateAgentGroupRequest, type CreateAutomaticMessageRequest, type CreateCampaignRequest, type CreateCategoryRequest, type CreateConversationResponse, type CreateEngagementRequest, type CreateLOBRequest, type CreateLPPromptRequest, type CreatePredefinedContentRequest, type CreateProfileRequest, type CreatePromptRequest, type CreateSimulationRequest, type CreateSkillRequest, type CreateSpecialOccasionRequest, type CreateTranscriptAnalysisRequest, type CreateUserRequest, type CreateWorkingHoursRequest, DialogsAPI, EngagementsAPI, type ErrorCode, ErrorCodes, EvaluatorsAPI, type FileMessage, FlowsAPI, type GeneratedQuestion, type GeneratedRoute, GeneratorsAPI, type GuidedRoute, type GuidedRoutingEvaluationRequest, type GuidedRoutingEvaluationResponse, IntegrationsAPI, InteractionsAPI, type InvokeFlowRequest, type InvokeFlowResponse, type KAIRouteGenerationStatus, type KAIRouteGeneratorRequest, type KAIRouteGeneratorResponse, KnowledgeBasesAPI, type Knowledgebase, type KnowledgebaseHealth, type KnowledgebaseItem, type KnowledgebaseSearchRequest, type KnowledgebaseSearchResult, type KnowledgebaseTextItem, KnowledgebasesAPI, type LLMModel, type LLMProvider, LOBsAPI, type LPAgentGroup, type LPAutomaticMessage, type LPAutomaticMessageData, type LPCampaign, type LPEngagement, LPExtendSDK, type LPExtendSDKConfig, LPExtendSDKError, type LPLLMProviderModels, type LPLLMProviderSubscription, type LPLLMType, type LPLOB, type LPPermission, type LPPredefinedContent, type LPPredefinedContentData, type LPProfile, type LPPrompt, type LPPromptClientConfig, type LPPromptClientType, type LPPromptConfiguration, type LPPromptGenericConfig, type LPPromptStatus, type LPPromptVariable, type LPPromptVariableSourceType, type LPPromptVersionDetail, LPPromptsAPI, type LPPromptsQueryParams, type LPShift, type LPSkill, type LPSkillRoutingConfig, type LPSpecialOccasion, type LPSpecialOccasionEvent, type LPUser, type LPWorkingDay, type LPWorkingHours, type MemberOf, type MessageData, type MessageRecord, MessagingAPI, type MessagingConversation, type CreateConversationRequest as MessagingCreateConversationRequest, MessagingHistoryAPI, type MessagingHistoryQuery, type MessagingHistoryResponse, type MessagingInteraction, MessagingOperationsAPI, NLUDomainsAPI, type OutboundCampaignReport, type OutboundReportQuery, OutboundReportingAPI, type PaginatedResponse, PredefinedContentAPI, ProfilesAPI, type Prompt, PromptLibraryAPI, type PromptVariable, QueryAPI, type QueryGenerateRequest, type QueryGenerateResponse, type QuestionGeneratorRequest, type QuestionGeneratorResponse, type ResolutionEvaluationRequest, type ResolutionEvaluationResponse, type RichContentMessage, type SDEEvent, type SDERecord, type SDKInitResult, type Scope, Scopes, type SendMessageRequest, SentinelAPI, type SentinelAppSetting, type SentinelAppSettings, type SentinelAppUser, type SentinelAuthRequest, type SentinelCCUser, type SentinelDomainsResponse, type SentinelLoginUrlResponse, type SentinelLpToken, type SentinelLpUser, type SentinelManagerOf, type SentinelMemberOf, type SentinelProfile, type SentinelToken, type SentinelTokenExchange, type SentinelUserData, type SentinelUserSkill, type ShellTokenConfig, type ShellTokenResponse, type ShellTokenUser, type SimilarityEvaluationRequest, type SimilarityEvaluationResponse, type SimulationConfig, type SimulationJobResult, type SimulationQueryParams, type SimulationResults, type SimulationTestCase, SimulationsAPI, SkillsAPI, SpecialOccasionsAPI, SummaryAPI, type SummaryRequest, type SurveyRecord, type TextMessage, type TranscriptAnalysis, TranscriptAnalysisAPI, type TranscriptConversation, type TranscriptQuestion, type TransferConversationRequest, type UpdateAIStudioUserModelsRequest, type UpdateAIStudioUserRequest, type UpdateAgentGroupRequest, type UpdateAutomaticMessageRequest, type UpdateCampaignRequest, type UpdateCategoryRequest, type UpdateConversationAttributesRequest, type UpdateEngagementRequest, type UpdateLOBRequest, type UpdateLPPromptRequest, type UpdatePredefinedContentRequest, type UpdateProfileRequest, type UpdatePromptRequest, type UpdateSimulationRequest, type UpdateSkillRequest, type UpdateSpecialOccasionRequest, type UpdateTranscriptAnalysisRequest, type UpdateUserRequest, type UpdateWorkingHoursRequest, UsersAPI, VERSION, WorkingHoursAPI, createSDK, createSDKFromEnv, getShellToken, initializeSDK };
|
|
4280
|
+
export { type CreateConversationRequest$1 as AICreateConversationRequest, AIStudioAPI, type AIStudioCategory, type AIStudioConversation, type AIStudioFlow, type AIStudioMessage, type AIStudioSimulation, type AIStudioSummary, type AIStudioUser, AIStudioUsersAPI, type UpdateConversationRequest as AIUpdateConversationRequest, type APIResponse, type ActivityRecord, type AgentActivity, AgentActivityAPI, type AgentActivityQuery, AgentGroupsAPI, type AgentMetrics, AgentMetricsAPI, type AgentMetricsQuery, type AgentParticipant, type AgentStatus, type ApiKeyAuthResponse, AutomaticMessagesAPI, type BatchSummaryRequest, BotAgentsAPI, BotGroupsAPI, BotsAPI, type CBAddBotAgentRequest, type CBAllBotAgentsStatusQueryParams, type CBApiResponse, type CBAuthCredentials, type CBAuthInfo, type CBBot, type CBBotEnvironment, type CBBotGroup, type CBBotGroupsQueryParams, type CBBotInstanceStatus, type CBBotPlatform, type CBBotUser, type CBBotsByGroupQueryParams, type CBChatBot, type CBChatBotMetrics, type CBChatBotPlatformUser, type CBChatBotSummary, type CBChatBotSummaryList, type CBConsumerQueryEventType, type CBConsumerQueryMetric, type CBConsumerQueryMetricsExtendedParams, type CBConsumerQueryMetricsParams, type CBConsumerQueryMetricsResponse, type CBCredential, type CBDialog, type CBDialogGroup, type CBDialogTemplateSummary, type CBDomainList, type CBDuplicatePhrase, type CBDuplicatePhrases, type CBGlobalFunctions, type CBIntent, type CBInteraction, type CBInteractionContent, type CBInteractionList, type CBKAIOnDemandConfig, type CBKAISearchRequest, type CBKAISearchResponse, type CBKAISearchResultItem, type CBKBArticle, type CBKBArticlesQueryParams, type CBKBContentSource, type CBKBLandingPageMetrics, type CBKnowledgeBase, type CBKnowledgeBaseDetail, type CBKnowledgeBaseList, type CBLPAppCredentials, type CBLPSkill, type CBNLUDomain, type CBPCSBotsStatusQueryParams, type CBPageContext, type CBPaginatedResult, type CBResponder, type CBResponseMatch, type CBSuccessResult, type CBSyncStatusDetails, type CBTileData, CampaignsAPI, CategoriesAPI, type CloseConversationRequest, type CoBrowseSession, ConnectToMessagingAPI, type ConsumerParticipant, type ConsumerProfile, type ContentToRetrieve, ConversationBuilderAPI, type ConversationContext, type ConversationInteraction, type ConversationParticipant, type ConversationQueryParams, type ConversationSummary, type ConversationTransfer, ConversationsAPI, type CreateAIStudioUserRequest, type CreateAgentGroupRequest, type CreateAutomaticMessageRequest, type CreateCampaignRequest, type CreateCategoryRequest, type CreateConversationResponse, type CreateEngagementRequest, type CreateLOBRequest, type CreateLPPromptRequest, type CreatePredefinedContentRequest, type CreateProfileRequest, type CreatePromptRequest, type CreateSimulationRequest, type CreateSkillRequest, type CreateSpecialOccasionRequest, type CreateTranscriptAnalysisRequest, type CreateUserRequest, type CreateWorkingHoursRequest, DialogsAPI, EngagementsAPI, type ErrorCode, ErrorCodes, EvaluatorsAPI, type FileMessage, FlowsAPI, type GeneratedQuestion, type GeneratedRoute, GeneratorsAPI, type GuidedRoute, type GuidedRoutingEvaluationRequest, type GuidedRoutingEvaluationResponse, IntegrationsAPI, InteractionsAPI, type InvokeFlowRequest, type InvokeFlowResponse, type KAIRouteGenerationStatus, type KAIRouteGeneratorRequest, type KAIRouteGeneratorResponse, KnowledgeBasesAPI, type Knowledgebase, type KnowledgebaseHealth, type KnowledgebaseItem, type KnowledgebaseSearchRequest, type KnowledgebaseSearchResult, type KnowledgebaseTextItem, KnowledgebasesAPI, type LLMModel, type LLMProvider, LOBsAPI, type LPAgentGroup, type LPAutomaticMessage, type LPAutomaticMessageData, type LPCampaign, type LPEngagement, LPExtendSDK, type LPExtendSDKConfig, LPExtendSDKError, type LPLLMProviderModels, type LPLLMProviderSubscription, type LPLLMType, type LPLOB, type LPPermission, type LPPredefinedContent, type LPPredefinedContentData, type LPProfile, type LPPrompt, type LPPromptClientConfig, type LPPromptClientType, type LPPromptConfiguration, type LPPromptGenericConfig, type LPPromptStatus, type LPPromptVariable, type LPPromptVariableSourceType, type LPPromptVersionDetail, LPPromptsAPI, type LPPromptsQueryParams, type LPShift, type LPSkill, type LPSkillRoutingConfig, type LPSpecialOccasion, type LPSpecialOccasionEvent, type LPUser, type LPWorkingDay, type LPWorkingHours, type MemberOf, type MessageData, type MessageRecord, MessagingAPI, type MessagingConversation, type CreateConversationRequest as MessagingCreateConversationRequest, MessagingHistoryAPI, type MessagingHistoryQuery, type MessagingHistoryResponse, type MessagingInteraction, MessagingOperationsAPI, NLUDomainsAPI, type OutboundCampaignReport, type OutboundReportQuery, OutboundReportingAPI, type PaginatedResponse, PredefinedContentAPI, ProfilesAPI, type Prompt, PromptLibraryAPI, type PromptVariable, QueryAPI, type QueryGenerateRequest, type QueryGenerateResponse, type QuestionGeneratorRequest, type QuestionGeneratorResponse, type ResolutionEvaluationRequest, type ResolutionEvaluationResponse, type RichContentMessage, type SDEEvent, type SDERecord, type SDKInitResult, type Scope, Scopes, type SendMessageRequest, SentinelAPI, type SentinelAppSetting, type SentinelAppSettings, type SentinelAppUser, type SentinelAuthRequest, type SentinelCCUser, type SentinelDomainsResponse, type SentinelLoginUrlResponse, type SentinelLpToken, type SentinelLpUser, type SentinelManagerOf, type SentinelMemberOf, type SentinelProfile, type SentinelToken, type SentinelTokenExchange, type SentinelUserData, type SentinelUserSkill, type ShellTokenConfig, type ShellTokenResponse, type ShellTokenUser, type SimilarityEvaluationRequest, type SimilarityEvaluationResponse, type SimulationConfig, type SimulationJobResult, type SimulationQueryParams, type SimulationResults, type SimulationTestCase, SimulationsAPI, SkillsAPI, SpecialOccasionsAPI, SummaryAPI, type SummaryRequest, type SurveyRecord, type TextMessage, type TranscriptAnalysis, TranscriptAnalysisAPI, type TranscriptConversation, type TranscriptQuestion, type TransferConversationRequest, type UpdateAIStudioUserModelsRequest, type UpdateAIStudioUserRequest, type UpdateAgentGroupRequest, type UpdateAutomaticMessageRequest, type UpdateCampaignRequest, type UpdateCategoryRequest, type UpdateConversationAttributesRequest, type UpdateEngagementRequest, type UpdateLOBRequest, type UpdateLPPromptRequest, type UpdatePredefinedContentRequest, type UpdateProfileRequest, type UpdatePromptRequest, type UpdateSimulationRequest, type UpdateSkillRequest, type UpdateSpecialOccasionRequest, type UpdateTranscriptAnalysisRequest, type UpdateUserRequest, type UpdateWorkingHoursRequest, UsersAPI, VERSION, WorkingHoursAPI, createLocalSDK, createSDK, createSDKFromEnv, getShellToken, initializeSDK };
|
package/dist/index.d.ts
CHANGED
|
@@ -2285,6 +2285,31 @@ interface LPExtendSDKConfig {
|
|
|
2285
2285
|
* @default 30000
|
|
2286
2286
|
*/
|
|
2287
2287
|
timeout?: number;
|
|
2288
|
+
/**
|
|
2289
|
+
* SDK mode controls how scopes are verified:
|
|
2290
|
+
* - 'shell' (default): Verifies scopes with the LP Extend shell backend.
|
|
2291
|
+
* Requires shell connectivity.
|
|
2292
|
+
* - 'local': Skips all shell contact. Grants all requested scopes locally.
|
|
2293
|
+
* Requires `accessToken` to be provided directly (e.g. from LP Login Service API).
|
|
2294
|
+
* Use this for local development when the shell is not running.
|
|
2295
|
+
*
|
|
2296
|
+
* @default 'shell'
|
|
2297
|
+
*/
|
|
2298
|
+
mode?: 'shell' | 'local';
|
|
2299
|
+
/**
|
|
2300
|
+
* Skip app registration verification with the shell backend.
|
|
2301
|
+
* When true, the SDK will not call /api/v1/lp/{accountId}/sdk/init to verify
|
|
2302
|
+
* that the app is registered. Instead, it grants all requested scopes locally.
|
|
2303
|
+
*
|
|
2304
|
+
* Use this for local development when your app is not yet registered
|
|
2305
|
+
* for the target account in the LP Extend shell.
|
|
2306
|
+
*
|
|
2307
|
+
* WARNING: Do not enable in production — app registration ensures proper
|
|
2308
|
+
* scope governance and access control.
|
|
2309
|
+
*
|
|
2310
|
+
* @default false
|
|
2311
|
+
*/
|
|
2312
|
+
skipRegistration?: boolean;
|
|
2288
2313
|
}
|
|
2289
2314
|
/**
|
|
2290
2315
|
* SDK initialization result
|
|
@@ -4123,6 +4148,41 @@ declare function initializeSDK(config: LPExtendSDKConfig): Promise<LPExtendSDK>;
|
|
|
4123
4148
|
* ```
|
|
4124
4149
|
*/
|
|
4125
4150
|
declare function createSDKFromEnv(extendToken: string): Promise<LPExtendSDK>;
|
|
4151
|
+
/**
|
|
4152
|
+
* Create an SDK in local mode — no shell required
|
|
4153
|
+
*
|
|
4154
|
+
* Convenience wrapper around `createSDK({ mode: 'local', ... })`.
|
|
4155
|
+
* Skips all shell verification and grants the requested scopes locally.
|
|
4156
|
+
*
|
|
4157
|
+
* Use this for local development when the shell is not running.
|
|
4158
|
+
* Obtain the `accessToken` from the LP Login Service API
|
|
4159
|
+
* (POST https://{domain}/api/account/{accountId}/login).
|
|
4160
|
+
*
|
|
4161
|
+
* @param config - SDK config (accessToken is required)
|
|
4162
|
+
* @returns Promise resolving to initialized SDK instance
|
|
4163
|
+
*
|
|
4164
|
+
* @example
|
|
4165
|
+
* ```typescript
|
|
4166
|
+
* import { createLocalSDK, Scopes } from '@lpextend/node-sdk';
|
|
4167
|
+
*
|
|
4168
|
+
* const sdk = await createLocalSDK({
|
|
4169
|
+
* appId: 'my-app',
|
|
4170
|
+
* accountId: '12345678',
|
|
4171
|
+
* accessToken: bearerTokenFromLPLogin,
|
|
4172
|
+
* scopes: [Scopes.SKILLS, Scopes.USERS],
|
|
4173
|
+
* });
|
|
4174
|
+
*
|
|
4175
|
+
* const { data: skills } = await sdk.skills.getAll();
|
|
4176
|
+
* ```
|
|
4177
|
+
*/
|
|
4178
|
+
declare function createLocalSDK(config: {
|
|
4179
|
+
appId: string;
|
|
4180
|
+
accountId: string;
|
|
4181
|
+
accessToken: string;
|
|
4182
|
+
scopes?: string[];
|
|
4183
|
+
debug?: boolean;
|
|
4184
|
+
timeout?: number;
|
|
4185
|
+
}): Promise<LPExtendSDK>;
|
|
4126
4186
|
/**
|
|
4127
4187
|
* SDK Version
|
|
4128
4188
|
*/
|
|
@@ -4217,4 +4277,4 @@ type Scope = (typeof Scopes)[keyof typeof Scopes];
|
|
|
4217
4277
|
*/
|
|
4218
4278
|
declare function getShellToken(config: ShellTokenConfig): Promise<ShellTokenResponse>;
|
|
4219
4279
|
|
|
4220
|
-
export { type CreateConversationRequest$1 as AICreateConversationRequest, AIStudioAPI, type AIStudioCategory, type AIStudioConversation, type AIStudioFlow, type AIStudioMessage, type AIStudioSimulation, type AIStudioSummary, type AIStudioUser, AIStudioUsersAPI, type UpdateConversationRequest as AIUpdateConversationRequest, type APIResponse, type ActivityRecord, type AgentActivity, AgentActivityAPI, type AgentActivityQuery, AgentGroupsAPI, type AgentMetrics, AgentMetricsAPI, type AgentMetricsQuery, type AgentParticipant, type AgentStatus, type ApiKeyAuthResponse, AutomaticMessagesAPI, type BatchSummaryRequest, BotAgentsAPI, BotGroupsAPI, BotsAPI, type CBAddBotAgentRequest, type CBAllBotAgentsStatusQueryParams, type CBApiResponse, type CBAuthCredentials, type CBAuthInfo, type CBBot, type CBBotEnvironment, type CBBotGroup, type CBBotGroupsQueryParams, type CBBotInstanceStatus, type CBBotPlatform, type CBBotUser, type CBBotsByGroupQueryParams, type CBChatBot, type CBChatBotMetrics, type CBChatBotPlatformUser, type CBChatBotSummary, type CBChatBotSummaryList, type CBConsumerQueryEventType, type CBConsumerQueryMetric, type CBConsumerQueryMetricsExtendedParams, type CBConsumerQueryMetricsParams, type CBConsumerQueryMetricsResponse, type CBCredential, type CBDialog, type CBDialogGroup, type CBDialogTemplateSummary, type CBDomainList, type CBDuplicatePhrase, type CBDuplicatePhrases, type CBGlobalFunctions, type CBIntent, type CBInteraction, type CBInteractionContent, type CBInteractionList, type CBKAIOnDemandConfig, type CBKAISearchRequest, type CBKAISearchResponse, type CBKAISearchResultItem, type CBKBArticle, type CBKBArticlesQueryParams, type CBKBContentSource, type CBKBLandingPageMetrics, type CBKnowledgeBase, type CBKnowledgeBaseDetail, type CBKnowledgeBaseList, type CBLPAppCredentials, type CBLPSkill, type CBNLUDomain, type CBPCSBotsStatusQueryParams, type CBPageContext, type CBPaginatedResult, type CBResponder, type CBResponseMatch, type CBSuccessResult, type CBSyncStatusDetails, type CBTileData, CampaignsAPI, CategoriesAPI, type CloseConversationRequest, type CoBrowseSession, ConnectToMessagingAPI, type ConsumerParticipant, type ConsumerProfile, type ContentToRetrieve, ConversationBuilderAPI, type ConversationContext, type ConversationInteraction, type ConversationParticipant, type ConversationQueryParams, type ConversationSummary, type ConversationTransfer, ConversationsAPI, type CreateAIStudioUserRequest, type CreateAgentGroupRequest, type CreateAutomaticMessageRequest, type CreateCampaignRequest, type CreateCategoryRequest, type CreateConversationResponse, type CreateEngagementRequest, type CreateLOBRequest, type CreateLPPromptRequest, type CreatePredefinedContentRequest, type CreateProfileRequest, type CreatePromptRequest, type CreateSimulationRequest, type CreateSkillRequest, type CreateSpecialOccasionRequest, type CreateTranscriptAnalysisRequest, type CreateUserRequest, type CreateWorkingHoursRequest, DialogsAPI, EngagementsAPI, type ErrorCode, ErrorCodes, EvaluatorsAPI, type FileMessage, FlowsAPI, type GeneratedQuestion, type GeneratedRoute, GeneratorsAPI, type GuidedRoute, type GuidedRoutingEvaluationRequest, type GuidedRoutingEvaluationResponse, IntegrationsAPI, InteractionsAPI, type InvokeFlowRequest, type InvokeFlowResponse, type KAIRouteGenerationStatus, type KAIRouteGeneratorRequest, type KAIRouteGeneratorResponse, KnowledgeBasesAPI, type Knowledgebase, type KnowledgebaseHealth, type KnowledgebaseItem, type KnowledgebaseSearchRequest, type KnowledgebaseSearchResult, type KnowledgebaseTextItem, KnowledgebasesAPI, type LLMModel, type LLMProvider, LOBsAPI, type LPAgentGroup, type LPAutomaticMessage, type LPAutomaticMessageData, type LPCampaign, type LPEngagement, LPExtendSDK, type LPExtendSDKConfig, LPExtendSDKError, type LPLLMProviderModels, type LPLLMProviderSubscription, type LPLLMType, type LPLOB, type LPPermission, type LPPredefinedContent, type LPPredefinedContentData, type LPProfile, type LPPrompt, type LPPromptClientConfig, type LPPromptClientType, type LPPromptConfiguration, type LPPromptGenericConfig, type LPPromptStatus, type LPPromptVariable, type LPPromptVariableSourceType, type LPPromptVersionDetail, LPPromptsAPI, type LPPromptsQueryParams, type LPShift, type LPSkill, type LPSkillRoutingConfig, type LPSpecialOccasion, type LPSpecialOccasionEvent, type LPUser, type LPWorkingDay, type LPWorkingHours, type MemberOf, type MessageData, type MessageRecord, MessagingAPI, type MessagingConversation, type CreateConversationRequest as MessagingCreateConversationRequest, MessagingHistoryAPI, type MessagingHistoryQuery, type MessagingHistoryResponse, type MessagingInteraction, MessagingOperationsAPI, NLUDomainsAPI, type OutboundCampaignReport, type OutboundReportQuery, OutboundReportingAPI, type PaginatedResponse, PredefinedContentAPI, ProfilesAPI, type Prompt, PromptLibraryAPI, type PromptVariable, QueryAPI, type QueryGenerateRequest, type QueryGenerateResponse, type QuestionGeneratorRequest, type QuestionGeneratorResponse, type ResolutionEvaluationRequest, type ResolutionEvaluationResponse, type RichContentMessage, type SDEEvent, type SDERecord, type SDKInitResult, type Scope, Scopes, type SendMessageRequest, SentinelAPI, type SentinelAppSetting, type SentinelAppSettings, type SentinelAppUser, type SentinelAuthRequest, type SentinelCCUser, type SentinelDomainsResponse, type SentinelLoginUrlResponse, type SentinelLpToken, type SentinelLpUser, type SentinelManagerOf, type SentinelMemberOf, type SentinelProfile, type SentinelToken, type SentinelTokenExchange, type SentinelUserData, type SentinelUserSkill, type ShellTokenConfig, type ShellTokenResponse, type ShellTokenUser, type SimilarityEvaluationRequest, type SimilarityEvaluationResponse, type SimulationConfig, type SimulationJobResult, type SimulationQueryParams, type SimulationResults, type SimulationTestCase, SimulationsAPI, SkillsAPI, SpecialOccasionsAPI, SummaryAPI, type SummaryRequest, type SurveyRecord, type TextMessage, type TranscriptAnalysis, TranscriptAnalysisAPI, type TranscriptConversation, type TranscriptQuestion, type TransferConversationRequest, type UpdateAIStudioUserModelsRequest, type UpdateAIStudioUserRequest, type UpdateAgentGroupRequest, type UpdateAutomaticMessageRequest, type UpdateCampaignRequest, type UpdateCategoryRequest, type UpdateConversationAttributesRequest, type UpdateEngagementRequest, type UpdateLOBRequest, type UpdateLPPromptRequest, type UpdatePredefinedContentRequest, type UpdateProfileRequest, type UpdatePromptRequest, type UpdateSimulationRequest, type UpdateSkillRequest, type UpdateSpecialOccasionRequest, type UpdateTranscriptAnalysisRequest, type UpdateUserRequest, type UpdateWorkingHoursRequest, UsersAPI, VERSION, WorkingHoursAPI, createSDK, createSDKFromEnv, getShellToken, initializeSDK };
|
|
4280
|
+
export { type CreateConversationRequest$1 as AICreateConversationRequest, AIStudioAPI, type AIStudioCategory, type AIStudioConversation, type AIStudioFlow, type AIStudioMessage, type AIStudioSimulation, type AIStudioSummary, type AIStudioUser, AIStudioUsersAPI, type UpdateConversationRequest as AIUpdateConversationRequest, type APIResponse, type ActivityRecord, type AgentActivity, AgentActivityAPI, type AgentActivityQuery, AgentGroupsAPI, type AgentMetrics, AgentMetricsAPI, type AgentMetricsQuery, type AgentParticipant, type AgentStatus, type ApiKeyAuthResponse, AutomaticMessagesAPI, type BatchSummaryRequest, BotAgentsAPI, BotGroupsAPI, BotsAPI, type CBAddBotAgentRequest, type CBAllBotAgentsStatusQueryParams, type CBApiResponse, type CBAuthCredentials, type CBAuthInfo, type CBBot, type CBBotEnvironment, type CBBotGroup, type CBBotGroupsQueryParams, type CBBotInstanceStatus, type CBBotPlatform, type CBBotUser, type CBBotsByGroupQueryParams, type CBChatBot, type CBChatBotMetrics, type CBChatBotPlatformUser, type CBChatBotSummary, type CBChatBotSummaryList, type CBConsumerQueryEventType, type CBConsumerQueryMetric, type CBConsumerQueryMetricsExtendedParams, type CBConsumerQueryMetricsParams, type CBConsumerQueryMetricsResponse, type CBCredential, type CBDialog, type CBDialogGroup, type CBDialogTemplateSummary, type CBDomainList, type CBDuplicatePhrase, type CBDuplicatePhrases, type CBGlobalFunctions, type CBIntent, type CBInteraction, type CBInteractionContent, type CBInteractionList, type CBKAIOnDemandConfig, type CBKAISearchRequest, type CBKAISearchResponse, type CBKAISearchResultItem, type CBKBArticle, type CBKBArticlesQueryParams, type CBKBContentSource, type CBKBLandingPageMetrics, type CBKnowledgeBase, type CBKnowledgeBaseDetail, type CBKnowledgeBaseList, type CBLPAppCredentials, type CBLPSkill, type CBNLUDomain, type CBPCSBotsStatusQueryParams, type CBPageContext, type CBPaginatedResult, type CBResponder, type CBResponseMatch, type CBSuccessResult, type CBSyncStatusDetails, type CBTileData, CampaignsAPI, CategoriesAPI, type CloseConversationRequest, type CoBrowseSession, ConnectToMessagingAPI, type ConsumerParticipant, type ConsumerProfile, type ContentToRetrieve, ConversationBuilderAPI, type ConversationContext, type ConversationInteraction, type ConversationParticipant, type ConversationQueryParams, type ConversationSummary, type ConversationTransfer, ConversationsAPI, type CreateAIStudioUserRequest, type CreateAgentGroupRequest, type CreateAutomaticMessageRequest, type CreateCampaignRequest, type CreateCategoryRequest, type CreateConversationResponse, type CreateEngagementRequest, type CreateLOBRequest, type CreateLPPromptRequest, type CreatePredefinedContentRequest, type CreateProfileRequest, type CreatePromptRequest, type CreateSimulationRequest, type CreateSkillRequest, type CreateSpecialOccasionRequest, type CreateTranscriptAnalysisRequest, type CreateUserRequest, type CreateWorkingHoursRequest, DialogsAPI, EngagementsAPI, type ErrorCode, ErrorCodes, EvaluatorsAPI, type FileMessage, FlowsAPI, type GeneratedQuestion, type GeneratedRoute, GeneratorsAPI, type GuidedRoute, type GuidedRoutingEvaluationRequest, type GuidedRoutingEvaluationResponse, IntegrationsAPI, InteractionsAPI, type InvokeFlowRequest, type InvokeFlowResponse, type KAIRouteGenerationStatus, type KAIRouteGeneratorRequest, type KAIRouteGeneratorResponse, KnowledgeBasesAPI, type Knowledgebase, type KnowledgebaseHealth, type KnowledgebaseItem, type KnowledgebaseSearchRequest, type KnowledgebaseSearchResult, type KnowledgebaseTextItem, KnowledgebasesAPI, type LLMModel, type LLMProvider, LOBsAPI, type LPAgentGroup, type LPAutomaticMessage, type LPAutomaticMessageData, type LPCampaign, type LPEngagement, LPExtendSDK, type LPExtendSDKConfig, LPExtendSDKError, type LPLLMProviderModels, type LPLLMProviderSubscription, type LPLLMType, type LPLOB, type LPPermission, type LPPredefinedContent, type LPPredefinedContentData, type LPProfile, type LPPrompt, type LPPromptClientConfig, type LPPromptClientType, type LPPromptConfiguration, type LPPromptGenericConfig, type LPPromptStatus, type LPPromptVariable, type LPPromptVariableSourceType, type LPPromptVersionDetail, LPPromptsAPI, type LPPromptsQueryParams, type LPShift, type LPSkill, type LPSkillRoutingConfig, type LPSpecialOccasion, type LPSpecialOccasionEvent, type LPUser, type LPWorkingDay, type LPWorkingHours, type MemberOf, type MessageData, type MessageRecord, MessagingAPI, type MessagingConversation, type CreateConversationRequest as MessagingCreateConversationRequest, MessagingHistoryAPI, type MessagingHistoryQuery, type MessagingHistoryResponse, type MessagingInteraction, MessagingOperationsAPI, NLUDomainsAPI, type OutboundCampaignReport, type OutboundReportQuery, OutboundReportingAPI, type PaginatedResponse, PredefinedContentAPI, ProfilesAPI, type Prompt, PromptLibraryAPI, type PromptVariable, QueryAPI, type QueryGenerateRequest, type QueryGenerateResponse, type QuestionGeneratorRequest, type QuestionGeneratorResponse, type ResolutionEvaluationRequest, type ResolutionEvaluationResponse, type RichContentMessage, type SDEEvent, type SDERecord, type SDKInitResult, type Scope, Scopes, type SendMessageRequest, SentinelAPI, type SentinelAppSetting, type SentinelAppSettings, type SentinelAppUser, type SentinelAuthRequest, type SentinelCCUser, type SentinelDomainsResponse, type SentinelLoginUrlResponse, type SentinelLpToken, type SentinelLpUser, type SentinelManagerOf, type SentinelMemberOf, type SentinelProfile, type SentinelToken, type SentinelTokenExchange, type SentinelUserData, type SentinelUserSkill, type ShellTokenConfig, type ShellTokenResponse, type ShellTokenUser, type SimilarityEvaluationRequest, type SimilarityEvaluationResponse, type SimulationConfig, type SimulationJobResult, type SimulationQueryParams, type SimulationResults, type SimulationTestCase, SimulationsAPI, SkillsAPI, SpecialOccasionsAPI, SummaryAPI, type SummaryRequest, type SurveyRecord, type TextMessage, type TranscriptAnalysis, TranscriptAnalysisAPI, type TranscriptConversation, type TranscriptQuestion, type TransferConversationRequest, type UpdateAIStudioUserModelsRequest, type UpdateAIStudioUserRequest, type UpdateAgentGroupRequest, type UpdateAutomaticMessageRequest, type UpdateCampaignRequest, type UpdateCategoryRequest, type UpdateConversationAttributesRequest, type UpdateEngagementRequest, type UpdateLOBRequest, type UpdateLPPromptRequest, type UpdatePredefinedContentRequest, type UpdateProfileRequest, type UpdatePromptRequest, type UpdateSimulationRequest, type UpdateSkillRequest, type UpdateSpecialOccasionRequest, type UpdateTranscriptAnalysisRequest, type UpdateUserRequest, type UpdateWorkingHoursRequest, UsersAPI, VERSION, WorkingHoursAPI, createLocalSDK, createSDK, createSDKFromEnv, getShellToken, initializeSDK };
|
package/dist/index.js
CHANGED
|
@@ -2398,6 +2398,26 @@ async function createSDK(config) {
|
|
|
2398
2398
|
}
|
|
2399
2399
|
}
|
|
2400
2400
|
let accessToken = config.accessToken;
|
|
2401
|
+
if (config.mode === "local") {
|
|
2402
|
+
if (!accessToken) {
|
|
2403
|
+
throw new LPExtendSDKError(
|
|
2404
|
+
"Local mode requires accessToken to be provided directly. Use the LP Login Service API to obtain a bearer token.",
|
|
2405
|
+
ErrorCodes.INVALID_CONFIG
|
|
2406
|
+
);
|
|
2407
|
+
}
|
|
2408
|
+
if (debug) {
|
|
2409
|
+
console.log("[LP-Extend-SDK] Local mode \u2014 skipping shell verification");
|
|
2410
|
+
console.log("[LP-Extend-SDK] Granting scopes locally:", config.scopes || ["*"]);
|
|
2411
|
+
}
|
|
2412
|
+
const initResult = {
|
|
2413
|
+
appId: config.appId,
|
|
2414
|
+
accountId: config.accountId,
|
|
2415
|
+
grantedScopes: config.scopes || ["*"],
|
|
2416
|
+
appName: config.appId,
|
|
2417
|
+
version: "1.0.0"
|
|
2418
|
+
};
|
|
2419
|
+
return new LPExtendSDK({ ...config, accessToken }, initResult);
|
|
2420
|
+
}
|
|
2401
2421
|
if (!accessToken && config.apiKey && config.extendToken) {
|
|
2402
2422
|
const verifyUrl = `${shellBaseUrl}/api/v1/apps/verify`;
|
|
2403
2423
|
if (debug) {
|
|
@@ -2636,6 +2656,20 @@ async function createSDK(config) {
|
|
|
2636
2656
|
);
|
|
2637
2657
|
}
|
|
2638
2658
|
}
|
|
2659
|
+
if (config.skipRegistration) {
|
|
2660
|
+
if (debug) {
|
|
2661
|
+
console.log("[LP-Extend-SDK] skipRegistration=true \u2014 bypassing shell app verification");
|
|
2662
|
+
console.log("[LP-Extend-SDK] Granting scopes locally:", config.scopes || ["*"]);
|
|
2663
|
+
}
|
|
2664
|
+
const initResult = {
|
|
2665
|
+
appId: config.appId,
|
|
2666
|
+
accountId: config.accountId,
|
|
2667
|
+
grantedScopes: config.scopes || ["*"],
|
|
2668
|
+
appName: config.appId,
|
|
2669
|
+
version: "1.0.0"
|
|
2670
|
+
};
|
|
2671
|
+
return new LPExtendSDK({ ...config, accessToken }, initResult);
|
|
2672
|
+
}
|
|
2639
2673
|
if (debug) {
|
|
2640
2674
|
console.log("[LP-Extend-SDK] Verifying scopes with shell:", shellBaseUrl);
|
|
2641
2675
|
}
|
|
@@ -2758,6 +2792,9 @@ async function createSDKFromEnv(extendToken) {
|
|
|
2758
2792
|
debug
|
|
2759
2793
|
});
|
|
2760
2794
|
}
|
|
2795
|
+
async function createLocalSDK(config) {
|
|
2796
|
+
return createSDK({ ...config, mode: "local" });
|
|
2797
|
+
}
|
|
2761
2798
|
var VERSION = "1.0.0";
|
|
2762
2799
|
var Scopes = {
|
|
2763
2800
|
// Account Configuration
|
|
@@ -2920,6 +2957,7 @@ exports.TranscriptAnalysisAPI = TranscriptAnalysisAPI;
|
|
|
2920
2957
|
exports.UsersAPI = UsersAPI;
|
|
2921
2958
|
exports.VERSION = VERSION;
|
|
2922
2959
|
exports.WorkingHoursAPI = WorkingHoursAPI;
|
|
2960
|
+
exports.createLocalSDK = createLocalSDK;
|
|
2923
2961
|
exports.createSDK = createSDK;
|
|
2924
2962
|
exports.createSDKFromEnv = createSDKFromEnv;
|
|
2925
2963
|
exports.getShellToken = getShellToken;
|