@wildix/wilma-copilot-sessions-client 1.0.4 → 1.0.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-cjs/WilmaCopilotSessions.js +14 -4
- package/dist-cjs/commands/{GetCopilotSessionEventsCommand.js → AskCommand.js} +6 -6
- package/dist-cjs/commands/EnrichCommand.js +20 -0
- package/dist-cjs/commands/GetSessionEventsCommand.js +20 -0
- package/dist-cjs/commands/ListSessionsCommand.js +20 -0
- package/dist-cjs/commands/OpenCommand.js +20 -0
- package/dist-cjs/commands/ResolveCommand.js +20 -0
- package/dist-cjs/commands/{StreamCopilotSessionEventsCommand.js → StreamSessionEventsCommand.js} +6 -6
- package/dist-cjs/commands/index.js +7 -2
- package/dist-cjs/models/enums.js +22 -3
- package/dist-cjs/schemas/schemas_0.js +187 -33
- package/dist-es/WilmaCopilotSessions.js +14 -4
- package/dist-es/commands/{GetCopilotSessionEventsCommand.js → AskCommand.js} +5 -5
- package/dist-es/commands/{StreamCopilotSessionEventsCommand.js → EnrichCommand.js} +5 -5
- package/dist-es/commands/GetSessionEventsCommand.js +16 -0
- package/dist-es/commands/ListSessionsCommand.js +16 -0
- package/dist-es/commands/OpenCommand.js +16 -0
- package/dist-es/commands/ResolveCommand.js +16 -0
- package/dist-es/commands/StreamSessionEventsCommand.js +16 -0
- package/dist-es/commands/index.js +7 -2
- package/dist-es/models/enums.js +21 -2
- package/dist-es/schemas/schemas_0.js +185 -32
- package/dist-types/WilmaCopilotSessions.d.ts +53 -10
- package/dist-types/WilmaCopilotSessionsClient.d.ts +15 -4
- package/dist-types/commands/AskCommand.d.ts +87 -0
- package/dist-types/commands/EnrichCommand.d.ts +116 -0
- package/dist-types/commands/{GetCopilotSessionEventsCommand.d.ts → GetSessionEventsCommand.d.ts} +38 -24
- package/dist-types/commands/ListSessionsCommand.d.ts +93 -0
- package/dist-types/commands/OpenCommand.d.ts +117 -0
- package/dist-types/commands/ResolveCommand.d.ts +110 -0
- package/dist-types/commands/{StreamCopilotSessionEventsCommand.d.ts → StreamSessionEventsCommand.d.ts} +23 -23
- package/dist-types/commands/index.d.ts +7 -2
- package/dist-types/index.d.ts +6 -0
- package/dist-types/models/enums.d.ts +79 -6
- package/dist-types/models/models_0.d.ts +369 -9
- package/dist-types/schemas/schemas_0.d.ts +28 -6
- package/package.json +1 -1
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { EnrichInput, EnrichOutput } from "../models/models_0";
|
|
4
|
+
import type { ServiceInputTypes, ServiceOutputTypes, WilmaCopilotSessionsClientResolvedConfig } from "../WilmaCopilotSessionsClient";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link EnrichCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface EnrichCommandInput extends EnrichInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link EnrichCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface EnrichCommandOutput extends EnrichOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const EnrichCommand_base: {
|
|
25
|
+
new (input: EnrichCommandInput): import("@smithy/core/client").CommandImpl<EnrichCommandInput, EnrichCommandOutput, WilmaCopilotSessionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (input: EnrichCommandInput): import("@smithy/core/client").CommandImpl<EnrichCommandInput, EnrichCommandOutput, WilmaCopilotSessionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Attaches late-arriving lookup evidence to a relationship — e.g. a CRM match the iframe
|
|
31
|
+
* resolved after Open, or a human wrong-match correction. `relationshipId` is the
|
|
32
|
+
* client's current belief, not an instruction: evidence runs through the same resolution rules,
|
|
33
|
+
* and when it proves the customer is someone else (e.g. a human-confirmed entity bound
|
|
34
|
+
* elsewhere), the response returns the authoritative relationship — which may differ from the
|
|
35
|
+
* input. Fresh values refresh `contact.*` / `crm.*` state in the relationship's active sessions
|
|
36
|
+
* and re-evaluate conditions, so assets can appear mid-call the moment a match lands.
|
|
37
|
+
* @example
|
|
38
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
39
|
+
* ```javascript
|
|
40
|
+
* import { WilmaCopilotSessionsClient, EnrichCommand } from "@wildix/wilma-copilot-sessions-client"; // ES Modules import
|
|
41
|
+
* // const { WilmaCopilotSessionsClient, EnrichCommand } = require("@wildix/wilma-copilot-sessions-client"); // CommonJS import
|
|
42
|
+
* // import type { WilmaCopilotSessionsClientConfig } from "@wildix/wilma-copilot-sessions-client";
|
|
43
|
+
* const config = {}; // type is WilmaCopilotSessionsClientConfig
|
|
44
|
+
* const client = new WilmaCopilotSessionsClient(config);
|
|
45
|
+
* const input = { // EnrichInput
|
|
46
|
+
* company: "STRING_VALUE",
|
|
47
|
+
* relationshipId: "STRING_VALUE", // required
|
|
48
|
+
* lookup: { // CopilotContextLookup
|
|
49
|
+
* emails: [ // CopilotContextEmailList
|
|
50
|
+
* "STRING_VALUE",
|
|
51
|
+
* ],
|
|
52
|
+
* phones: [ // CopilotContextPhoneList
|
|
53
|
+
* "STRING_VALUE",
|
|
54
|
+
* ],
|
|
55
|
+
* entities: [ // CopilotContextEntityList
|
|
56
|
+
* { // CopilotContextEntity
|
|
57
|
+
* id: "STRING_VALUE", // required
|
|
58
|
+
* type: "STRING_VALUE", // required
|
|
59
|
+
* },
|
|
60
|
+
* ],
|
|
61
|
+
* attributes: { // CopilotContextAttributes
|
|
62
|
+
* "<keys>": "STRING_VALUE",
|
|
63
|
+
* },
|
|
64
|
+
* },
|
|
65
|
+
* };
|
|
66
|
+
* const command = new EnrichCommand(input);
|
|
67
|
+
* const response = await client.send(command);
|
|
68
|
+
* // { // EnrichOutput
|
|
69
|
+
* // relationshipId: "STRING_VALUE", // required
|
|
70
|
+
* // related: [ // CopilotSessionSummaryList // required
|
|
71
|
+
* // { // CopilotSessionSummary
|
|
72
|
+
* // id: "STRING_VALUE", // required
|
|
73
|
+
* // status: "active" || "idle" || "archived" || "failed", // required
|
|
74
|
+
* // conversation: { // CopilotContextConversation
|
|
75
|
+
* // id: "STRING_VALUE", // required
|
|
76
|
+
* // kind: "call" || "chat" || "conference" || "app", // required
|
|
77
|
+
* // },
|
|
78
|
+
* // startedAt: "STRING_VALUE",
|
|
79
|
+
* // lastActivityAt: "STRING_VALUE",
|
|
80
|
+
* // },
|
|
81
|
+
* // ],
|
|
82
|
+
* // };
|
|
83
|
+
*
|
|
84
|
+
* ```
|
|
85
|
+
*
|
|
86
|
+
* @param EnrichCommandInput - {@link EnrichCommandInput}
|
|
87
|
+
* @returns {@link EnrichCommandOutput}
|
|
88
|
+
* @see {@link EnrichCommandInput} for command's `input` shape.
|
|
89
|
+
* @see {@link EnrichCommandOutput} for command's `response` shape.
|
|
90
|
+
* @see {@link WilmaCopilotSessionsClientResolvedConfig | config} for WilmaCopilotSessionsClient's `config` shape.
|
|
91
|
+
*
|
|
92
|
+
* @throws {@link ValidationException} (client fault)
|
|
93
|
+
*
|
|
94
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
95
|
+
*
|
|
96
|
+
* @throws {@link NotFoundException} (client fault)
|
|
97
|
+
*
|
|
98
|
+
* @throws {@link WilmaCopilotSessionsServiceException}
|
|
99
|
+
* <p>Base exception class for all service exceptions from WilmaCopilotSessions service.</p>
|
|
100
|
+
*
|
|
101
|
+
*
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
export declare class EnrichCommand extends EnrichCommand_base {
|
|
105
|
+
/** @internal type navigation helper, not in runtime. */
|
|
106
|
+
protected static __types: {
|
|
107
|
+
api: {
|
|
108
|
+
input: EnrichInput;
|
|
109
|
+
output: EnrichOutput;
|
|
110
|
+
};
|
|
111
|
+
sdk: {
|
|
112
|
+
input: EnrichCommandInput;
|
|
113
|
+
output: EnrichCommandOutput;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
}
|
package/dist-types/commands/{GetCopilotSessionEventsCommand.d.ts → GetSessionEventsCommand.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command as $Command } from "@smithy/core/client";
|
|
2
2
|
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
-
import type {
|
|
3
|
+
import type { GetSessionEventsInput, GetSessionEventsOutput } from "../models/models_0";
|
|
4
4
|
import type { ServiceInputTypes, ServiceOutputTypes, WilmaCopilotSessionsClientResolvedConfig } from "../WilmaCopilotSessionsClient";
|
|
5
5
|
/**
|
|
6
6
|
* @public
|
|
@@ -10,48 +10,49 @@ export { $Command };
|
|
|
10
10
|
/**
|
|
11
11
|
* @public
|
|
12
12
|
*
|
|
13
|
-
* The input for {@link
|
|
13
|
+
* The input for {@link GetSessionEventsCommand}.
|
|
14
14
|
*/
|
|
15
|
-
export interface
|
|
15
|
+
export interface GetSessionEventsCommandInput extends GetSessionEventsInput {
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* @public
|
|
19
19
|
*
|
|
20
|
-
* The output of {@link
|
|
20
|
+
* The output of {@link GetSessionEventsCommand}.
|
|
21
21
|
*/
|
|
22
|
-
export interface
|
|
22
|
+
export interface GetSessionEventsCommandOutput extends GetSessionEventsOutput, __MetadataBearer {
|
|
23
23
|
}
|
|
24
|
-
declare const
|
|
25
|
-
new (input:
|
|
26
|
-
new (input:
|
|
24
|
+
declare const GetSessionEventsCommand_base: {
|
|
25
|
+
new (input: GetSessionEventsCommandInput): import("@smithy/core/client").CommandImpl<GetSessionEventsCommandInput, GetSessionEventsCommandOutput, WilmaCopilotSessionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (input: GetSessionEventsCommandInput): import("@smithy/core/client").CommandImpl<GetSessionEventsCommandInput, GetSessionEventsCommandOutput, WilmaCopilotSessionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* Returns recorded copilot session events as a plain JSON page, without streaming. Use it to inspect past sessions or to catch up before subscribing to
|
|
30
|
+
* Returns recorded copilot session events as a plain JSON page, without streaming. Use it to inspect past sessions or to catch up before subscribing to StreamSessionEvents.
|
|
31
31
|
* @example
|
|
32
32
|
* Use a bare-bones client and the command you need to make an API call.
|
|
33
33
|
* ```javascript
|
|
34
|
-
* import { WilmaCopilotSessionsClient,
|
|
35
|
-
* // const { WilmaCopilotSessionsClient,
|
|
34
|
+
* import { WilmaCopilotSessionsClient, GetSessionEventsCommand } from "@wildix/wilma-copilot-sessions-client"; // ES Modules import
|
|
35
|
+
* // const { WilmaCopilotSessionsClient, GetSessionEventsCommand } = require("@wildix/wilma-copilot-sessions-client"); // CommonJS import
|
|
36
36
|
* // import type { WilmaCopilotSessionsClientConfig } from "@wildix/wilma-copilot-sessions-client";
|
|
37
37
|
* const config = {}; // type is WilmaCopilotSessionsClientConfig
|
|
38
38
|
* const client = new WilmaCopilotSessionsClient(config);
|
|
39
|
-
* const input = { //
|
|
39
|
+
* const input = { // GetSessionEventsInput
|
|
40
40
|
* sessionId: "STRING_VALUE", // required
|
|
41
41
|
* company: "STRING_VALUE",
|
|
42
42
|
* startIndex: Number("int"),
|
|
43
43
|
* limit: Number("int"),
|
|
44
44
|
* };
|
|
45
|
-
* const command = new
|
|
45
|
+
* const command = new GetSessionEventsCommand(input);
|
|
46
46
|
* const response = await client.send(command);
|
|
47
|
-
* // { //
|
|
47
|
+
* // { // GetSessionEventsOutput
|
|
48
48
|
* // events: [ // CopilotSessionEvents // required
|
|
49
49
|
* // { // CopilotSessionEvent Union: only one key present
|
|
50
50
|
* // lifecycle: { // CopilotLifecycleEvent
|
|
51
51
|
* // index: Number("int"), // required
|
|
52
52
|
* // timestamp: "STRING_VALUE", // required
|
|
53
53
|
* // sessionId: "STRING_VALUE", // required
|
|
54
|
-
* // status: "active" || "
|
|
54
|
+
* // status: "active" || "idle" || "archived" || "failed", // required
|
|
55
|
+
* // reason: "created" || "ended" || "stopped" || "inactivity" || "archive_timer" || "revived" || "error",
|
|
55
56
|
* // },
|
|
56
57
|
* // transcript: { // CopilotTranscriptionEvent
|
|
57
58
|
* // index: Number("int"), // required
|
|
@@ -340,6 +341,19 @@ declare const GetCopilotSessionEventsCommand_base: {
|
|
|
340
341
|
* // id: "STRING_VALUE", // required
|
|
341
342
|
* // state: "DOCUMENT_VALUE", // required
|
|
342
343
|
* // },
|
|
344
|
+
* // relationship: { // CopilotRelationshipEvent
|
|
345
|
+
* // index: Number("int"), // required
|
|
346
|
+
* // timestamp: "STRING_VALUE", // required
|
|
347
|
+
* // relationshipId: "STRING_VALUE", // required
|
|
348
|
+
* // sessionId: "STRING_VALUE",
|
|
349
|
+
* // },
|
|
350
|
+
* // ask: { // CopilotAskEvent
|
|
351
|
+
* // index: Number("int"), // required
|
|
352
|
+
* // timestamp: "STRING_VALUE", // required
|
|
353
|
+
* // userId: "STRING_VALUE", // required
|
|
354
|
+
* // wilmaSessionId: "STRING_VALUE", // required
|
|
355
|
+
* // accessToken: "STRING_VALUE",
|
|
356
|
+
* // },
|
|
343
357
|
* // },
|
|
344
358
|
* // ],
|
|
345
359
|
* // nextStartIndex: Number("int"),
|
|
@@ -347,10 +361,10 @@ declare const GetCopilotSessionEventsCommand_base: {
|
|
|
347
361
|
*
|
|
348
362
|
* ```
|
|
349
363
|
*
|
|
350
|
-
* @param
|
|
351
|
-
* @returns {@link
|
|
352
|
-
* @see {@link
|
|
353
|
-
* @see {@link
|
|
364
|
+
* @param GetSessionEventsCommandInput - {@link GetSessionEventsCommandInput}
|
|
365
|
+
* @returns {@link GetSessionEventsCommandOutput}
|
|
366
|
+
* @see {@link GetSessionEventsCommandInput} for command's `input` shape.
|
|
367
|
+
* @see {@link GetSessionEventsCommandOutput} for command's `response` shape.
|
|
354
368
|
* @see {@link WilmaCopilotSessionsClientResolvedConfig | config} for WilmaCopilotSessionsClient's `config` shape.
|
|
355
369
|
*
|
|
356
370
|
* @throws {@link ValidationException} (client fault)
|
|
@@ -365,16 +379,16 @@ declare const GetCopilotSessionEventsCommand_base: {
|
|
|
365
379
|
*
|
|
366
380
|
* @public
|
|
367
381
|
*/
|
|
368
|
-
export declare class
|
|
382
|
+
export declare class GetSessionEventsCommand extends GetSessionEventsCommand_base {
|
|
369
383
|
/** @internal type navigation helper, not in runtime. */
|
|
370
384
|
protected static __types: {
|
|
371
385
|
api: {
|
|
372
|
-
input:
|
|
373
|
-
output:
|
|
386
|
+
input: GetSessionEventsInput;
|
|
387
|
+
output: GetSessionEventsOutput;
|
|
374
388
|
};
|
|
375
389
|
sdk: {
|
|
376
|
-
input:
|
|
377
|
-
output:
|
|
390
|
+
input: GetSessionEventsCommandInput;
|
|
391
|
+
output: GetSessionEventsCommandOutput;
|
|
378
392
|
};
|
|
379
393
|
};
|
|
380
394
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { ListSessionsInput, ListSessionsOutput } from "../models/models_0";
|
|
4
|
+
import type { ServiceInputTypes, ServiceOutputTypes, WilmaCopilotSessionsClientResolvedConfig } from "../WilmaCopilotSessionsClient";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link ListSessionsCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface ListSessionsCommandInput extends ListSessionsInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link ListSessionsCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface ListSessionsCommandOutput extends ListSessionsOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const ListSessionsCommand_base: {
|
|
25
|
+
new (input: ListSessionsCommandInput): import("@smithy/core/client").CommandImpl<ListSessionsCommandInput, ListSessionsCommandOutput, WilmaCopilotSessionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (...[input]: [] | [ListSessionsCommandInput]): import("@smithy/core/client").CommandImpl<ListSessionsCommandInput, ListSessionsCommandOutput, WilmaCopilotSessionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Lists copilot sessions a user participated in, most recent first. Lets a user find a session they opened earlier without knowing the relationship.
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { WilmaCopilotSessionsClient, ListSessionsCommand } from "@wildix/wilma-copilot-sessions-client"; // ES Modules import
|
|
35
|
+
* // const { WilmaCopilotSessionsClient, ListSessionsCommand } = require("@wildix/wilma-copilot-sessions-client"); // CommonJS import
|
|
36
|
+
* // import type { WilmaCopilotSessionsClientConfig } from "@wildix/wilma-copilot-sessions-client";
|
|
37
|
+
* const config = {}; // type is WilmaCopilotSessionsClientConfig
|
|
38
|
+
* const client = new WilmaCopilotSessionsClient(config);
|
|
39
|
+
* const input = { // ListSessionsInput
|
|
40
|
+
* company: "STRING_VALUE",
|
|
41
|
+
* user: "STRING_VALUE",
|
|
42
|
+
* limit: Number("int"),
|
|
43
|
+
* cursor: "STRING_VALUE",
|
|
44
|
+
* };
|
|
45
|
+
* const command = new ListSessionsCommand(input);
|
|
46
|
+
* const response = await client.send(command);
|
|
47
|
+
* // { // ListSessionsOutput
|
|
48
|
+
* // sessions: [ // CopilotSessionSummaryList // required
|
|
49
|
+
* // { // CopilotSessionSummary
|
|
50
|
+
* // id: "STRING_VALUE", // required
|
|
51
|
+
* // status: "active" || "idle" || "archived" || "failed", // required
|
|
52
|
+
* // conversation: { // CopilotContextConversation
|
|
53
|
+
* // id: "STRING_VALUE", // required
|
|
54
|
+
* // kind: "call" || "chat" || "conference" || "app", // required
|
|
55
|
+
* // },
|
|
56
|
+
* // startedAt: "STRING_VALUE",
|
|
57
|
+
* // lastActivityAt: "STRING_VALUE",
|
|
58
|
+
* // },
|
|
59
|
+
* // ],
|
|
60
|
+
* // nextCursor: "STRING_VALUE",
|
|
61
|
+
* // };
|
|
62
|
+
*
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* @param ListSessionsCommandInput - {@link ListSessionsCommandInput}
|
|
66
|
+
* @returns {@link ListSessionsCommandOutput}
|
|
67
|
+
* @see {@link ListSessionsCommandInput} for command's `input` shape.
|
|
68
|
+
* @see {@link ListSessionsCommandOutput} for command's `response` shape.
|
|
69
|
+
* @see {@link WilmaCopilotSessionsClientResolvedConfig | config} for WilmaCopilotSessionsClient's `config` shape.
|
|
70
|
+
*
|
|
71
|
+
* @throws {@link ValidationException} (client fault)
|
|
72
|
+
*
|
|
73
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link WilmaCopilotSessionsServiceException}
|
|
76
|
+
* <p>Base exception class for all service exceptions from WilmaCopilotSessions service.</p>
|
|
77
|
+
*
|
|
78
|
+
*
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
export declare class ListSessionsCommand extends ListSessionsCommand_base {
|
|
82
|
+
/** @internal type navigation helper, not in runtime. */
|
|
83
|
+
protected static __types: {
|
|
84
|
+
api: {
|
|
85
|
+
input: ListSessionsInput;
|
|
86
|
+
output: ListSessionsOutput;
|
|
87
|
+
};
|
|
88
|
+
sdk: {
|
|
89
|
+
input: ListSessionsCommandInput;
|
|
90
|
+
output: ListSessionsCommandOutput;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { OpenInput, OpenOutput } from "../models/models_0";
|
|
4
|
+
import type { ServiceInputTypes, ServiceOutputTypes, WilmaCopilotSessionsClientResolvedConfig } from "../WilmaCopilotSessionsClient";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link OpenCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface OpenCommandInput extends OpenInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link OpenCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface OpenCommandOutput extends OpenOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const OpenCommand_base: {
|
|
25
|
+
new (input: OpenCommandInput): import("@smithy/core/client").CommandImpl<OpenCommandInput, OpenCommandOutput, WilmaCopilotSessionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (...[input]: [] | [OpenCommandInput]): import("@smithy/core/client").CommandImpl<OpenCommandInput, OpenCommandOutput, WilmaCopilotSessionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Opens copilot for a client surface. `lookup` (when present) is treated as hints: emails,
|
|
31
|
+
* phones and entity references are resolved authoritatively server-side and merged into a
|
|
32
|
+
* relationship. Routing picks the session — clients never pass conversation ids: the
|
|
33
|
+
* relationship's live conversation session (calls and chats are created by the WDA stream)
|
|
34
|
+
* when one exists, otherwise the relationship's `app` session (server-minted, reused while
|
|
35
|
+
* idle). The response returns the sessions already associated with the relationship, so the client
|
|
36
|
+
* can render cross-channel history without a second call.
|
|
37
|
+
* @example
|
|
38
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
39
|
+
* ```javascript
|
|
40
|
+
* import { WilmaCopilotSessionsClient, OpenCommand } from "@wildix/wilma-copilot-sessions-client"; // ES Modules import
|
|
41
|
+
* // const { WilmaCopilotSessionsClient, OpenCommand } = require("@wildix/wilma-copilot-sessions-client"); // CommonJS import
|
|
42
|
+
* // import type { WilmaCopilotSessionsClientConfig } from "@wildix/wilma-copilot-sessions-client";
|
|
43
|
+
* const config = {}; // type is WilmaCopilotSessionsClientConfig
|
|
44
|
+
* const client = new WilmaCopilotSessionsClient(config);
|
|
45
|
+
* const input = { // OpenInput
|
|
46
|
+
* company: "STRING_VALUE",
|
|
47
|
+
* lookup: { // CopilotContextLookup
|
|
48
|
+
* emails: [ // CopilotContextEmailList
|
|
49
|
+
* "STRING_VALUE",
|
|
50
|
+
* ],
|
|
51
|
+
* phones: [ // CopilotContextPhoneList
|
|
52
|
+
* "STRING_VALUE",
|
|
53
|
+
* ],
|
|
54
|
+
* entities: [ // CopilotContextEntityList
|
|
55
|
+
* { // CopilotContextEntity
|
|
56
|
+
* id: "STRING_VALUE", // required
|
|
57
|
+
* type: "STRING_VALUE", // required
|
|
58
|
+
* },
|
|
59
|
+
* ],
|
|
60
|
+
* attributes: { // CopilotContextAttributes
|
|
61
|
+
* "<keys>": "STRING_VALUE",
|
|
62
|
+
* },
|
|
63
|
+
* },
|
|
64
|
+
* };
|
|
65
|
+
* const command = new OpenCommand(input);
|
|
66
|
+
* const response = await client.send(command);
|
|
67
|
+
* // { // OpenOutput
|
|
68
|
+
* // relationshipId: "STRING_VALUE", // required
|
|
69
|
+
* // session: { // CopilotIngestedSession
|
|
70
|
+
* // id: "STRING_VALUE", // required
|
|
71
|
+
* // state: "created" || "reused", // required
|
|
72
|
+
* // },
|
|
73
|
+
* // related: [ // CopilotSessionSummaryList // required
|
|
74
|
+
* // { // CopilotSessionSummary
|
|
75
|
+
* // id: "STRING_VALUE", // required
|
|
76
|
+
* // status: "active" || "idle" || "archived" || "failed", // required
|
|
77
|
+
* // conversation: { // CopilotContextConversation
|
|
78
|
+
* // id: "STRING_VALUE", // required
|
|
79
|
+
* // kind: "call" || "chat" || "conference" || "app", // required
|
|
80
|
+
* // },
|
|
81
|
+
* // startedAt: "STRING_VALUE",
|
|
82
|
+
* // lastActivityAt: "STRING_VALUE",
|
|
83
|
+
* // },
|
|
84
|
+
* // ],
|
|
85
|
+
* // };
|
|
86
|
+
*
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* @param OpenCommandInput - {@link OpenCommandInput}
|
|
90
|
+
* @returns {@link OpenCommandOutput}
|
|
91
|
+
* @see {@link OpenCommandInput} for command's `input` shape.
|
|
92
|
+
* @see {@link OpenCommandOutput} for command's `response` shape.
|
|
93
|
+
* @see {@link WilmaCopilotSessionsClientResolvedConfig | config} for WilmaCopilotSessionsClient's `config` shape.
|
|
94
|
+
*
|
|
95
|
+
* @throws {@link ValidationException} (client fault)
|
|
96
|
+
*
|
|
97
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
98
|
+
*
|
|
99
|
+
* @throws {@link WilmaCopilotSessionsServiceException}
|
|
100
|
+
* <p>Base exception class for all service exceptions from WilmaCopilotSessions service.</p>
|
|
101
|
+
*
|
|
102
|
+
*
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
export declare class OpenCommand extends OpenCommand_base {
|
|
106
|
+
/** @internal type navigation helper, not in runtime. */
|
|
107
|
+
protected static __types: {
|
|
108
|
+
api: {
|
|
109
|
+
input: OpenInput;
|
|
110
|
+
output: OpenOutput;
|
|
111
|
+
};
|
|
112
|
+
sdk: {
|
|
113
|
+
input: OpenCommandInput;
|
|
114
|
+
output: OpenCommandOutput;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { ResolveInput, ResolveOutput } from "../models/models_0";
|
|
4
|
+
import type { ServiceInputTypes, ServiceOutputTypes, WilmaCopilotSessionsClientResolvedConfig } from "../WilmaCopilotSessionsClient";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link ResolveCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface ResolveCommandInput extends ResolveInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link ResolveCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface ResolveCommandOutput extends ResolveOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const ResolveCommand_base: {
|
|
25
|
+
new (input: ResolveCommandInput): import("@smithy/core/client").CommandImpl<ResolveCommandInput, ResolveCommandOutput, WilmaCopilotSessionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (input: ResolveCommandInput): import("@smithy/core/client").CommandImpl<ResolveCommandInput, ResolveCommandOutput, WilmaCopilotSessionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Resolves a lookup to a relationship and its sessions without opening copilot or creating
|
|
31
|
+
* anything — a read-only peek. Use it to decide whether a customer has history before opening,
|
|
32
|
+
* e.g. to badge the Wilma button. Returns no relationship when nothing matches; relationships
|
|
33
|
+
* are only created by Open.
|
|
34
|
+
* @example
|
|
35
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
36
|
+
* ```javascript
|
|
37
|
+
* import { WilmaCopilotSessionsClient, ResolveCommand } from "@wildix/wilma-copilot-sessions-client"; // ES Modules import
|
|
38
|
+
* // const { WilmaCopilotSessionsClient, ResolveCommand } = require("@wildix/wilma-copilot-sessions-client"); // CommonJS import
|
|
39
|
+
* // import type { WilmaCopilotSessionsClientConfig } from "@wildix/wilma-copilot-sessions-client";
|
|
40
|
+
* const config = {}; // type is WilmaCopilotSessionsClientConfig
|
|
41
|
+
* const client = new WilmaCopilotSessionsClient(config);
|
|
42
|
+
* const input = { // ResolveInput
|
|
43
|
+
* company: "STRING_VALUE",
|
|
44
|
+
* lookup: { // CopilotContextLookup
|
|
45
|
+
* emails: [ // CopilotContextEmailList
|
|
46
|
+
* "STRING_VALUE",
|
|
47
|
+
* ],
|
|
48
|
+
* phones: [ // CopilotContextPhoneList
|
|
49
|
+
* "STRING_VALUE",
|
|
50
|
+
* ],
|
|
51
|
+
* entities: [ // CopilotContextEntityList
|
|
52
|
+
* { // CopilotContextEntity
|
|
53
|
+
* id: "STRING_VALUE", // required
|
|
54
|
+
* type: "STRING_VALUE", // required
|
|
55
|
+
* },
|
|
56
|
+
* ],
|
|
57
|
+
* attributes: { // CopilotContextAttributes
|
|
58
|
+
* "<keys>": "STRING_VALUE",
|
|
59
|
+
* },
|
|
60
|
+
* },
|
|
61
|
+
* };
|
|
62
|
+
* const command = new ResolveCommand(input);
|
|
63
|
+
* const response = await client.send(command);
|
|
64
|
+
* // { // ResolveOutput
|
|
65
|
+
* // relationshipId: "STRING_VALUE",
|
|
66
|
+
* // sessions: [ // CopilotSessionSummaryList // required
|
|
67
|
+
* // { // CopilotSessionSummary
|
|
68
|
+
* // id: "STRING_VALUE", // required
|
|
69
|
+
* // status: "active" || "idle" || "archived" || "failed", // required
|
|
70
|
+
* // conversation: { // CopilotContextConversation
|
|
71
|
+
* // id: "STRING_VALUE", // required
|
|
72
|
+
* // kind: "call" || "chat" || "conference" || "app", // required
|
|
73
|
+
* // },
|
|
74
|
+
* // startedAt: "STRING_VALUE",
|
|
75
|
+
* // lastActivityAt: "STRING_VALUE",
|
|
76
|
+
* // },
|
|
77
|
+
* // ],
|
|
78
|
+
* // };
|
|
79
|
+
*
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* @param ResolveCommandInput - {@link ResolveCommandInput}
|
|
83
|
+
* @returns {@link ResolveCommandOutput}
|
|
84
|
+
* @see {@link ResolveCommandInput} for command's `input` shape.
|
|
85
|
+
* @see {@link ResolveCommandOutput} for command's `response` shape.
|
|
86
|
+
* @see {@link WilmaCopilotSessionsClientResolvedConfig | config} for WilmaCopilotSessionsClient's `config` shape.
|
|
87
|
+
*
|
|
88
|
+
* @throws {@link ValidationException} (client fault)
|
|
89
|
+
*
|
|
90
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
91
|
+
*
|
|
92
|
+
* @throws {@link WilmaCopilotSessionsServiceException}
|
|
93
|
+
* <p>Base exception class for all service exceptions from WilmaCopilotSessions service.</p>
|
|
94
|
+
*
|
|
95
|
+
*
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
export declare class ResolveCommand extends ResolveCommand_base {
|
|
99
|
+
/** @internal type navigation helper, not in runtime. */
|
|
100
|
+
protected static __types: {
|
|
101
|
+
api: {
|
|
102
|
+
input: ResolveInput;
|
|
103
|
+
output: ResolveOutput;
|
|
104
|
+
};
|
|
105
|
+
sdk: {
|
|
106
|
+
input: ResolveCommandInput;
|
|
107
|
+
output: ResolveCommandOutput;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
}
|