@albanian-xrm/cif-types 0.1.4 → 0.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/README.md +16 -6
- package/package.json +1 -1
- package/v1.0/CRUD.d.ts +4 -4
- package/v1.0/ClickToAct.d.ts +3 -3
- package/v1.0/EntityMetadata.d.ts +1 -1
- package/v1.0/Environment.d.ts +1 -1
- package/v1.0/Events.d.ts +15 -15
- package/v1.0/Form.d.ts +3 -1
- package/v1.0/PanelMode.d.ts +14 -14
- package/v1.0/PanelWidth.d.ts +2 -2
- package/v1.0/Search.d.ts +14 -11
- package/v1.0/index.d.ts +0 -1
- package/v2.0/ApplicationTabManagement.d.ts +97 -0
- package/v2.0/ChannelAnalytics.d.ts +64 -0
- package/v2.0/ClickToAct.d.ts +3 -3
- package/v2.0/Context.d.ts +1 -1
- package/v2.0/Conversation.d.ts +2 -2
- package/v2.0/Notification.d.ts +7 -4
- package/v2.0/Presence.d.ts +6 -4
- package/v2.0/Session.d.ts +63 -20
- package/v2.0/index.d.ts +3 -1
- package/v1.0/Context.d.ts +0 -31
package/README.md
CHANGED
|
@@ -1,19 +1,29 @@
|
|
|
1
|
-
# @albanian-xrm/cif-types
|
|
2
|
-
Microsoft.CIFramework types from the community (us).
|
|
1
|
+
# @albanian-xrm/cif-types 
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
Microsoft.CIFramework types from the community (us).
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
Read more about Channel Integration Framework on the [Microsoft Docs](https://learn.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework/channel-integration-framework).
|
|
7
6
|
|
|
7
|
+
These types are based on the api documentation on the [Microsoft Docs](https://learn.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework/reference/microsoft-ciframework).
|
|
8
8
|
|
|
9
9
|
To use the types install `@albanian-xrm/cif-types` and add the following to your `tsconfig.json`:
|
|
10
10
|
|
|
11
11
|
```json
|
|
12
12
|
"compilerOptions": {
|
|
13
13
|
"types": [
|
|
14
|
-
"@albanian-xrm/cif-types
|
|
14
|
+
"@albanian-xrm/cif-types"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
If you want CIFv1 then use the following configuration:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
"compilerOptions": {
|
|
23
|
+
"types": [
|
|
24
|
+
"@albanian-xrm/cif-types/v1.0"
|
|
15
25
|
]
|
|
16
26
|
}
|
|
17
27
|
```
|
|
18
28
|
|
|
19
|
-
You will get the Intellisense in your IDE with the global `Microsoft.CIFramework` types.
|
|
29
|
+
You will get the Intellisense in your IDE with the global `Microsoft.CIFramework` types.
|
package/package.json
CHANGED
package/v1.0/CRUD.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare namespace Microsoft {
|
|
|
5
5
|
* @param entityLogicalName Logical name of the entity you want to create. For example: "account".
|
|
6
6
|
* @param data String defining the attributes and values for the new entity record.
|
|
7
7
|
* @returns On success, returns a promise containing a string with the attributes and their values.
|
|
8
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
8
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/createrecord External Link: createRecord}
|
|
9
9
|
* @example
|
|
10
10
|
* var entityLogicalName = "contact";
|
|
11
11
|
* var data = {
|
|
@@ -49,7 +49,7 @@ declare namespace Microsoft {
|
|
|
49
49
|
* ?$select=name&$expand=primarycontactid($select=contactid,fullname)
|
|
50
50
|
* ```
|
|
51
51
|
* @returns On success, returns a promise containing a string with the retrieved attributes and their values.
|
|
52
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
52
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/retrieverecord External Link: retrieveRecord}
|
|
53
53
|
* @example
|
|
54
54
|
* // retrieve contact record
|
|
55
55
|
* var id = "b44d31ac-5fd1-e811-8158-000d3af97055";
|
|
@@ -78,7 +78,7 @@ declare namespace Microsoft {
|
|
|
78
78
|
* @param id GUID of the entity record you want to update.
|
|
79
79
|
* @param data String containing key: value pairs, where key is the property of the entity and value is the value of the property you want to update.
|
|
80
80
|
* @returns On success, returns a promise containing a string with the updated attributes and their values.
|
|
81
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
81
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/updaterecord External Link: deleteRecord}
|
|
82
82
|
* @example
|
|
83
83
|
* //// define the data to update a record
|
|
84
84
|
* var entityLogicalName = "contact";
|
|
@@ -117,7 +117,7 @@ declare namespace Microsoft {
|
|
|
117
117
|
* @param entityLogicalName The entity logical name of the record you want to delete. For example: "account".
|
|
118
118
|
* @param id GUID of the entity record you want to delete.
|
|
119
119
|
* @returns On success, returns a promise containing a string with the attributes and their values.
|
|
120
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
120
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/deleterecord External Link: deleteRecord}
|
|
121
121
|
* @example
|
|
122
122
|
* // delete contact record with the id=b44d31ac-5fd1-e811-8158-000d3af97055d
|
|
123
123
|
* var id = "b44d31ac-5fd1-e811-8158-000d3af97055";
|
package/v1.0/ClickToAct.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ declare namespace Microsoft {
|
|
|
3
3
|
/**
|
|
4
4
|
* Returns a Boolean value to indicate whether the outbound communication (ClickToAct) is enabled or not.
|
|
5
5
|
* @returns Returns Promise object with the value. `true` if ClickToAct is enabled; `false` otherwise.
|
|
6
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
6
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/getclicktoact External Link: getClickToAct}
|
|
7
7
|
*/
|
|
8
8
|
export function getClickToAct(): Promise<boolean>;
|
|
9
9
|
|
|
@@ -11,8 +11,8 @@ declare namespace Microsoft {
|
|
|
11
11
|
* Sets a Boolean value to enable or disable the outbound communication (ClickToAct).
|
|
12
12
|
* @param value Sets the value to enable or disable ClickToAct.
|
|
13
13
|
* @returns Returns Promise object without value.
|
|
14
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
14
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/setclicktoact External Link: setClickToAct}
|
|
15
15
|
*/
|
|
16
|
-
export function setClickToAct(value: boolean): Promise<
|
|
16
|
+
export function setClickToAct(value: boolean): Promise<void>;
|
|
17
17
|
}
|
|
18
18
|
}
|
package/v1.0/EntityMetadata.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ declare namespace Microsoft {
|
|
|
3
3
|
/**
|
|
4
4
|
* Returns the entity metadata for the specified entity.
|
|
5
5
|
* @returns An object containing the entity metadata information with the following form {@link EntityMetadata}.
|
|
6
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
6
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/getentitymetadata External Link: getEntityMetadata}
|
|
7
7
|
*/
|
|
8
8
|
export function getEntityMetadata(
|
|
9
9
|
entityName: string,
|
package/v1.0/Environment.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ declare namespace Microsoft {
|
|
|
3
3
|
/**
|
|
4
4
|
* Gets the current Unified Interface app and page details.
|
|
5
5
|
* @returns Returns a Promise object of type String with details of the current Unified Interface app and page. See {@link Environment}
|
|
6
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
6
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/getenvironment External Link: getEnvironment}
|
|
7
7
|
*/
|
|
8
8
|
export function getEnvironment(): Promise<string>;
|
|
9
9
|
|
package/v1.0/Events.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare namespace Microsoft {
|
|
|
13
13
|
* You can also pass custom events in the `eventName` parameter.
|
|
14
14
|
* @param handlerFunction The handler function is invoked when any of the supported events are triggered.
|
|
15
15
|
* @returns Promise with a value as Boolean.
|
|
16
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
16
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/raiseevent External Link: raiseEvent}
|
|
17
17
|
* @example
|
|
18
18
|
* handlerFunction = function(eventData) {
|
|
19
19
|
* console.log(eventData)
|
|
@@ -24,7 +24,7 @@ declare namespace Microsoft {
|
|
|
24
24
|
*/
|
|
25
25
|
export function addHandler(
|
|
26
26
|
eventName: string,
|
|
27
|
-
handlerFunction: (...args) => Promise<void>
|
|
27
|
+
handlerFunction: (...args) => (void | Promise<void>)
|
|
28
28
|
): Promise<boolean>;
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -33,11 +33,11 @@ declare namespace Microsoft {
|
|
|
33
33
|
* @param eventName Name of the event for which the handler is set. The event is invoked when the outbound communication (ClickToAct) field is enabled.
|
|
34
34
|
* @param handlerFunction The handler function is invoked when any of the supported events are triggered.
|
|
35
35
|
* @returns Promise with a value as Boolean.
|
|
36
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
36
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/raiseevent External Link: raiseEvent}
|
|
37
37
|
*/
|
|
38
38
|
export function addHandler(
|
|
39
39
|
eventName: "onclicktoact",
|
|
40
|
-
handlerFunction: (eventData: EventArgs.ClickToAct) => Promise<void>
|
|
40
|
+
handlerFunction: (eventData: EventArgs.ClickToAct) => (void | Promise<void>)
|
|
41
41
|
): Promise<boolean>;
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -46,7 +46,7 @@ declare namespace Microsoft {
|
|
|
46
46
|
* @param eventName Name of the event for which the handler is set. The 'OnModeChanged' event is invoked when the panel mode is manually toggled between Minimized (0) and Docked (1).
|
|
47
47
|
* @param handlerFunction The handler function is invoked when any of the supported events are triggered.
|
|
48
48
|
* @returns Promise with a value as Boolean.
|
|
49
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
49
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/raiseevent External Link: raiseEvent}
|
|
50
50
|
* @example
|
|
51
51
|
* handlerFunction = function(eventData) {
|
|
52
52
|
* console.log(eventData)
|
|
@@ -57,7 +57,7 @@ declare namespace Microsoft {
|
|
|
57
57
|
*/
|
|
58
58
|
export function addHandler(
|
|
59
59
|
eventName: "onmodechanged",
|
|
60
|
-
handlerFunction: (eventData: EventArgs.ModeChanged) => Promise<void>
|
|
60
|
+
handlerFunction: (eventData: EventArgs.ModeChanged) => (void | Promise<void>)
|
|
61
61
|
): Promise<boolean>;
|
|
62
62
|
|
|
63
63
|
/**
|
|
@@ -66,11 +66,11 @@ declare namespace Microsoft {
|
|
|
66
66
|
* @param eventName Name of the event for which the handler is set.
|
|
67
67
|
* @param handlerFunction The handler function is invoked when any of the supported events are triggered.
|
|
68
68
|
* @returns Promise with a value as Boolean.
|
|
69
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
69
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/raiseevent External Link: raiseEvent}
|
|
70
70
|
*/
|
|
71
71
|
export function addHandler(
|
|
72
72
|
eventName: "onpagenavigate",
|
|
73
|
-
handlerFunction: (eventData: EventArgs.PageNavigate) => Promise<void>
|
|
73
|
+
handlerFunction: (eventData: EventArgs.PageNavigate) => (void | Promise<void>)
|
|
74
74
|
): Promise<boolean>;
|
|
75
75
|
|
|
76
76
|
/**
|
|
@@ -79,11 +79,11 @@ declare namespace Microsoft {
|
|
|
79
79
|
* @param eventName Name of the event for which the handler is set.
|
|
80
80
|
* @param handlerFunction The handler function is invoked when any of the supported events are triggered.
|
|
81
81
|
* @returns Promise with a value as Boolean.
|
|
82
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
82
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/raiseevent External Link: raiseEvent}
|
|
83
83
|
*/
|
|
84
84
|
export function addHandler(
|
|
85
85
|
eventName: "onsendkbarticle",
|
|
86
|
-
handlerFunction: (eventData: EventArgs.SendKBArticle) => Promise<void>
|
|
86
|
+
handlerFunction: (eventData: EventArgs.SendKBArticle) => (void | Promise<void>)
|
|
87
87
|
): Promise<boolean>;
|
|
88
88
|
|
|
89
89
|
/**
|
|
@@ -92,11 +92,11 @@ declare namespace Microsoft {
|
|
|
92
92
|
* @param eventName Name of the event for which the handler is set.
|
|
93
93
|
* @param handlerFunction The handler function is invoked when any of the supported events are triggered.
|
|
94
94
|
* @returns Promise with a value as Boolean.
|
|
95
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
95
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/raiseevent External Link: raiseEvent}
|
|
96
96
|
*/
|
|
97
97
|
export function addHandler(
|
|
98
98
|
eventName: "onsizechanged",
|
|
99
|
-
handlerFunction: (eventData: EventArgs.SizeChanged) => Promise<void>
|
|
99
|
+
handlerFunction: (eventData: EventArgs.SizeChanged) => (void | Promise<void>)
|
|
100
100
|
): Promise<boolean>;
|
|
101
101
|
|
|
102
102
|
/**
|
|
@@ -106,7 +106,7 @@ declare namespace Microsoft {
|
|
|
106
106
|
* @param correlationId Is used to group all related API calls together for diagnostic telemetry.
|
|
107
107
|
* @remark If you've created custom events using the {@link addHandler} method, then you can raise those events by passing the event name as parameter in this method.
|
|
108
108
|
* @returns Promise with a value as Boolean.
|
|
109
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
109
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/raiseevent External Link: raiseEvent}
|
|
110
110
|
* @example
|
|
111
111
|
* // Let there be an event registered to a subscriber.
|
|
112
112
|
* handlerFunction = function(eventInput)
|
|
@@ -152,11 +152,11 @@ declare namespace Microsoft {
|
|
|
152
152
|
*
|
|
153
153
|
* You can also pass custom events in the `eventName` parameter.
|
|
154
154
|
* @param handlerFunction The handler function that is to removed.
|
|
155
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
155
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/raiseevent External Link: raiseEvent}
|
|
156
156
|
*/
|
|
157
157
|
export function removeHandler(
|
|
158
158
|
eventName: string,
|
|
159
|
-
handlerFunction: (eventData: EventArgs.SizeChanged) => Promise<void>
|
|
159
|
+
handlerFunction: (eventData: EventArgs.SizeChanged) => (void | Promise<void>)
|
|
160
160
|
): void;
|
|
161
161
|
|
|
162
162
|
namespace EventArgs {
|
package/v1.0/Form.d.ts
CHANGED
|
@@ -2,8 +2,10 @@ declare namespace Microsoft {
|
|
|
2
2
|
namespace CIFramework {
|
|
3
3
|
/**
|
|
4
4
|
* Opens an entity form or a quick create form.
|
|
5
|
+
* @param entityFormOptions Entity form options for opening the form. This parameter is a serialized from {@link Microsoft.CIFramework.EntityFormOptions EntityFormOptions}
|
|
6
|
+
* @param formParameters A dictionary object that passes extra parameters to the form. Invalid parameters will cause an error. For information about passing parameters to a form, see {@link https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/set-field-values-using-parameters-passed-form External Link: Set field values using parameters passed to a form} and {@link https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/configure-form-accept-custom-querystring-parameters External Link: Configure a form to accept custom querystring parameters}
|
|
5
7
|
* @returns On success, returns a Promise object containing string.
|
|
6
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
8
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/openform External Link: openForm}
|
|
7
9
|
* @example
|
|
8
10
|
* var id = "5af02e2a-d0d1-e811-8158-000d3af97055"
|
|
9
11
|
* var title = "Sample Case Form"
|
package/v1.0/PanelMode.d.ts
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
declare namespace Microsoft {
|
|
2
2
|
namespace CIFramework {
|
|
3
3
|
/**
|
|
4
|
+
* Gets the current state of the panel.
|
|
5
|
+
* @returns Promise object with the value (current state of the panel). Values are defined in {@link PanelMode}
|
|
6
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/getmode External Link: getMode}
|
|
7
|
+
*/
|
|
8
|
+
export function getMode(): Promise<PanelMode>;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Sets the state of the panel.
|
|
12
|
+
* @param value The value to set the mode of the panel.
|
|
13
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/setmode External Link: setMode}
|
|
14
|
+
*/
|
|
15
|
+
export function setMode(value: PanelMode): Promise<void>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
4
18
|
* The value to set the mode of the panel.
|
|
5
19
|
*/
|
|
6
20
|
export const enum PanelMode {
|
|
@@ -13,19 +27,5 @@ declare namespace Microsoft {
|
|
|
13
27
|
*/
|
|
14
28
|
Docked = 1,
|
|
15
29
|
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Gets the current state of the panel.
|
|
19
|
-
* @returns Promise object with the value (current state of the panel). Values are defined in {@link PanelMode}
|
|
20
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework/reference/microsoft-ciframework/getmode External Link: getMode}
|
|
21
|
-
*/
|
|
22
|
-
export function getMode(): Promise<PanelMode>;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Sets the state of the panel.
|
|
26
|
-
* @param value The value to set the mode of the panel.
|
|
27
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework/reference/microsoft-ciframework/setmode External Link: setMode}
|
|
28
|
-
*/
|
|
29
|
-
export function setMode(value: PanelMode): Promise<void>;
|
|
30
30
|
}
|
|
31
31
|
}
|
package/v1.0/PanelWidth.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ declare namespace Microsoft {
|
|
|
3
3
|
/**
|
|
4
4
|
* Gets the panel width in pixels.
|
|
5
5
|
* @returns Returns a promise object containing the width of the panel, in pixels.
|
|
6
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
6
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/getwidth External Link: getWidth}
|
|
7
7
|
*/
|
|
8
8
|
export function getWidth(): Promise<number>;
|
|
9
9
|
|
|
@@ -14,7 +14,7 @@ declare namespace Microsoft {
|
|
|
14
14
|
* - If the value parameter passed for setWidth is greater than half of screen width, the side panel will collapse.
|
|
15
15
|
* - The width should be greater than or equal to 300. The API doesn't consider any value less than 300.
|
|
16
16
|
* @returns Returns a promise object with a value.
|
|
17
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
17
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/setwidth External Link: setWidth}
|
|
18
18
|
*/
|
|
19
19
|
export function setWidth(value: number): Promise<void>;
|
|
20
20
|
}
|
package/v1.0/Search.d.ts
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
declare namespace Microsoft {
|
|
2
2
|
namespace CIFramework {
|
|
3
|
+
/**
|
|
4
|
+
* Allows you to search among the records of a particular entity type. This API opens the Unified Interface entity page with the search field on it prepopulated with the search string that is passed as a parameter.
|
|
5
|
+
* @param entityLogicalName The entity logical name of the record you want to query such as "account".
|
|
6
|
+
* @param searchString String to search among the attributes of the entity records.
|
|
7
|
+
* @param Type of search page to open. `0` for relevance search and `1` for categorized search. If no parameter is provided, the records are searched by category. For information on relevance search, see {@link https://learn.microsoft.com/en-us/power-platform/admin/configure-relevance-search-organization External Link: Configure Dataverse search}.
|
|
8
|
+
*/
|
|
9
|
+
export function renderSearchPage(
|
|
10
|
+
entityLogicalName: string,
|
|
11
|
+
searchString: string,
|
|
12
|
+
searchType?: SearchType
|
|
13
|
+
): Promise<void>;
|
|
14
|
+
|
|
3
15
|
/**
|
|
4
16
|
* The method searches for the record from the communication widget during the inbound communication and opens the record.
|
|
5
17
|
* @param entityLogicalName Name of the entity to search and open.
|
|
@@ -20,7 +32,7 @@ declare namespace Microsoft {
|
|
|
20
32
|
* @returns Returns a Promise object of type String. On success, the method returns the search results as per the search query.
|
|
21
33
|
* @remarks You can fetch a maximum of 5000 records at once (if more than 5000 records exist). You can narrow down the results by using query options such as `$filter`, `$select`, and `$top` in the method parameters. See {@link https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview External Link: Query options overview}
|
|
22
34
|
* @remarks To search based on relevance, you must configure relevance search. If relevance search isn't enabled, then the search will be performed based on category. See {@link https://learn.microsoft.com/en-us/power-platform/admin/configure-relevance-search-organization External Link: Configure Relevance Seach}
|
|
23
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
35
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v1/develop/reference/microsoft-ciframework/searchandopenrecords External Link: searchAndOpenRecords}
|
|
24
36
|
* @example
|
|
25
37
|
* // retrieve contact record
|
|
26
38
|
* Microsoft.CIFramework.searchAndOpenRecords("contact", "?$select=fullname,telephone1", false).
|
|
@@ -61,17 +73,8 @@ declare namespace Microsoft {
|
|
|
61
73
|
): Promise<string>;
|
|
62
74
|
|
|
63
75
|
/**
|
|
64
|
-
*
|
|
65
|
-
* @param entityLogicalName The entity logical name of the record you want to query such as "account".
|
|
66
|
-
* @param searchString String to search among the attributes of the entity records.
|
|
67
|
-
* @param Type of search page to open. `0` for relevance search and `1` for categorized search. If no parameter is provided, the records are searched by category. For information on relevance search, see {@link https://learn.microsoft.com/en-us/power-platform/admin/configure-relevance-search-organization External Link: Configure Dataverse search}.
|
|
76
|
+
* Type of search page to open. 0 for relevance search and 1 for categorized search. If no parameter is provided, the records are searched by category.
|
|
68
77
|
*/
|
|
69
|
-
export function renderSearchPage(
|
|
70
|
-
entityLogicalName: string,
|
|
71
|
-
searchString: string,
|
|
72
|
-
searchType?: SearchType
|
|
73
|
-
): Promise<void>;
|
|
74
|
-
|
|
75
78
|
export const enum SearchType {
|
|
76
79
|
RelevanceSearch = 0,
|
|
77
80
|
CategorizedSearch = 1,
|
package/v1.0/index.d.ts
CHANGED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
declare namespace Microsoft {
|
|
2
|
+
namespace CIFramework {
|
|
3
|
+
/**
|
|
4
|
+
* Creates a tab in a focused session and returns the unique identifier of the created tab.
|
|
5
|
+
* @param input JSON input
|
|
6
|
+
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
7
|
+
* @returns None.
|
|
8
|
+
* @remarks Use this API only when the focused session belongs to the provider or if it is the home or default session.
|
|
9
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/closetab External Link: closeTab}
|
|
10
|
+
*/
|
|
11
|
+
export function closeTab(input: TabInput,correlationId?: string): Promise<void>;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Creates a tab in a focused session and returns the unique identifier of the created tab.
|
|
15
|
+
* @param input JSON input
|
|
16
|
+
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
17
|
+
* @returns Promise with the value of tab ID as String.
|
|
18
|
+
* @remarks Use this API only when the focused session belongs to the provider or if it is the home or default session.
|
|
19
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/createtab External Link: createTab}
|
|
20
|
+
*/
|
|
21
|
+
export function createTab(input: TabInput,correlationId?: string): Promise<string>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Sets the focus on a tab, if:
|
|
25
|
+
* - The focused session belongs to the provider or if it is either the home or default session.
|
|
26
|
+
* - The tab belongs to the session in focus.
|
|
27
|
+
* @param tabId Unique identifier of the tab
|
|
28
|
+
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
29
|
+
* @returns Promise with no value.
|
|
30
|
+
* @remarks Use this API only when the focused session belongs to the provider or if it is the home or default session.
|
|
31
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/focustab External Link: focusTab}
|
|
32
|
+
*/
|
|
33
|
+
export function focusTab(tabId: string, correlationId?: string): Promise<void>;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Returns the focused tab's identifier in a focused session, if the session belongs to the channel provider.
|
|
37
|
+
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
38
|
+
* @returns Promise with the value as String
|
|
39
|
+
* @remarks Use this API only when the focused session belongs to the provider or if it is the home or default session.
|
|
40
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/getfocusedtab External Link: getFocusedTab}
|
|
41
|
+
*/
|
|
42
|
+
export function getFocusedTab(correlationId?: string): Promise<string>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Returns an array of tab Ids associated with template name or template tags for tabs in the session in focus, if the session belongs to the channel provider.
|
|
46
|
+
* @param tabtemplatename Unique Name of the application tab template
|
|
47
|
+
* @param tags Tags associated with the application tab
|
|
48
|
+
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
49
|
+
* @returns Promise with the value of tab ID as String.
|
|
50
|
+
* @remarks Use this API only when the focused session belongs to the provider or if it is the home or default session.
|
|
51
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/gettabs External Link: getTabs}
|
|
52
|
+
*/
|
|
53
|
+
export function getTabs(tabtemplatename?: string, tags?:string, correlationId?: string): Promise<string[]>;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Refreshes the tab.
|
|
57
|
+
* @param tabId Unique identifier of the tab
|
|
58
|
+
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
59
|
+
* @returns Promise with no value.
|
|
60
|
+
* @remarks Use this API only when the focused session belongs to the provider or if it is the home or default session.
|
|
61
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/refreshtab External Link: refreshTab}
|
|
62
|
+
*/
|
|
63
|
+
export function refreshTab(tabId: string, correlationId?: string): Promise<void>;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Refreshes the tab.
|
|
67
|
+
* @param tabId Unique identifier of the tab
|
|
68
|
+
* @param title JSON containing the title of the tab.
|
|
69
|
+
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
70
|
+
* @returns none.
|
|
71
|
+
* @remarks Use this API only when the focused session belongs to the provider or if it is the home or default session.
|
|
72
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/settabtitle External Link: setTabTitle}
|
|
73
|
+
*/
|
|
74
|
+
export function setTabTitle(tabId: string, title: TabTitle, correlationId?: string): Promise<void>;
|
|
75
|
+
|
|
76
|
+
export type TabInput = {
|
|
77
|
+
/**
|
|
78
|
+
* Unique name of the tab
|
|
79
|
+
*/
|
|
80
|
+
templateName: string;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Additional context for tab creation and tab slugs
|
|
84
|
+
*/
|
|
85
|
+
templateParameters?: { [key: string]: string;};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Should this tab be focused after the creation
|
|
89
|
+
*/
|
|
90
|
+
isFocused?: boolean;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export type TabTitle = {
|
|
94
|
+
title: string;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
declare namespace Microsoft {
|
|
2
|
+
namespace CIFramework {
|
|
3
|
+
/**
|
|
4
|
+
* Invoke this method to log analytics for custom events.
|
|
5
|
+
* @param data Key-value pairs representing the analytics data to be logged.
|
|
6
|
+
* @param eventName Name of the event to be logged.
|
|
7
|
+
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
8
|
+
* @returns Promise with value as string
|
|
9
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/loganalyticsevent External Link: logAnalyticsEvent}
|
|
10
|
+
*/
|
|
11
|
+
export function logAnalyticsEvent(data: AnalyticsData, eventName:string, correlationId?: string): Promise<string>;
|
|
12
|
+
|
|
13
|
+
interface AnalyticsData {
|
|
14
|
+
/**
|
|
15
|
+
* Conversation identifier
|
|
16
|
+
*/
|
|
17
|
+
conversationId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Channel Integration Framework Provider Id
|
|
20
|
+
*/
|
|
21
|
+
providerSessionId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Client session identifier
|
|
24
|
+
*/
|
|
25
|
+
clientSessionId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Participant identifier
|
|
28
|
+
*/
|
|
29
|
+
participantId?: string;
|
|
30
|
+
events?: AnalyticsEventData[];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
interface AnalyticsEventData{
|
|
34
|
+
/**
|
|
35
|
+
* Name of the associated KPI event
|
|
36
|
+
*/
|
|
37
|
+
kpiEventName?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Reason due to which the KPI event was created
|
|
40
|
+
*/
|
|
41
|
+
kpiEventReason?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Timestamp at which the event occurred
|
|
44
|
+
*/
|
|
45
|
+
eventTimestamp?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Additional data related to the session
|
|
48
|
+
*/
|
|
49
|
+
additionalData?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Agent notification response action value
|
|
52
|
+
*/
|
|
53
|
+
notificationResponseAction?: string;
|
|
54
|
+
/**
|
|
55
|
+
* External system correlation Id
|
|
56
|
+
*/
|
|
57
|
+
externalCorrelationId?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Custom data
|
|
60
|
+
*/
|
|
61
|
+
customData?: {attribute: string; value: string}[];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
package/v2.0/ClickToAct.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ declare namespace Microsoft {
|
|
|
4
4
|
* Returns a Boolean value to indicate whether the outbound communication (ClickToAct) is enabled or not.
|
|
5
5
|
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
6
6
|
* @returns Returns Promise object with the value. `true` if ClickToAct is enabled; `false` otherwise.
|
|
7
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
7
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/getclicktoact External Link: getClickToAct}
|
|
8
8
|
*/
|
|
9
9
|
export function getClickToAct(correlationId?: string): Promise<boolean>;
|
|
10
10
|
|
|
@@ -13,11 +13,11 @@ declare namespace Microsoft {
|
|
|
13
13
|
* @param value Sets the value to enable or disable ClickToAct.
|
|
14
14
|
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
15
15
|
* @returns Returns Promise object without value.
|
|
16
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
16
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/setclicktoact External Link: setClickToAct}
|
|
17
17
|
*/
|
|
18
18
|
export function setClickToAct(
|
|
19
19
|
value: boolean,
|
|
20
20
|
correlationId?: string
|
|
21
|
-
): Promise<
|
|
21
|
+
): Promise<void>;
|
|
22
22
|
}
|
|
23
23
|
}
|
package/v2.0/Context.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare namespace Microsoft {
|
|
|
7
7
|
* @param isDelete Set isDelete to `true` if the list of parameters in input JSON are to be deleted. If isDelete is set to `true`, the slug values will be deleted and will no longer be available for subsequent macro invocations.
|
|
8
8
|
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
9
9
|
* @returns Returns a promise with string value.
|
|
10
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
10
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/updatecontext External Link: updateContext}
|
|
11
11
|
* @example
|
|
12
12
|
* var input = { "customerName" : "Contosso" };
|
|
13
13
|
* Microsoft.CIFramework.updateContext(input).then(
|
package/v2.0/Conversation.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
declare namespace Microsoft {
|
|
2
2
|
namespace CIFramework {
|
|
3
3
|
/**
|
|
4
|
-
* This method allows you to update a Conversation(msdyn_ocliveworkitem) record.
|
|
4
|
+
* This method allows you to update a Conversation({@link https://learn.microsoft.com/en-us/dynamics365/customer-service/develop/reference/entities/msdyn_ocliveworkitem msdyn_ocliveworkitem}) record.
|
|
5
5
|
* @param id Unique identifier of the conversation returned by {@link Microsoft.CIFramework.getSession Microsoft.CIFramework.getSession} API.
|
|
6
6
|
* @param data JSON string
|
|
7
7
|
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
8
8
|
* @returns Returns a promise with string value.
|
|
9
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
9
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/updateconversation External Link: updateConversation}
|
|
10
10
|
* @example
|
|
11
11
|
* var data = {
|
|
12
12
|
* "subject": "Troubleshooting printer malfunction",
|
package/v2.0/Notification.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare namespace Microsoft {
|
|
|
5
5
|
* @param cancellationToken Unique string that was provided in the {@link notifyEvent} method to display notifications about incoming conversations.
|
|
6
6
|
* @param correlationId Used to group all related API calls together for diagnostic telemetry.
|
|
7
7
|
* @returns Returns the cancellation token.
|
|
8
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
8
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/cancelevent External Link: cancelEvent}
|
|
9
9
|
* @example
|
|
10
10
|
* // Trying to cancel a notification, use the same cancelToken passed during creation of notification in notifyEvent
|
|
11
11
|
* Microsoft.CIFramework.cancelEvent(CancelToken).then(
|
|
@@ -29,8 +29,8 @@ declare namespace Microsoft {
|
|
|
29
29
|
* @param input JSON string
|
|
30
30
|
* @param correlationId Used to group all related API calls together for diagnostic telemetry.
|
|
31
31
|
* @param cancellationToken Is the unique string that's used by the {@link cancelEvent} method to cancel notifications about incoming conversations.
|
|
32
|
-
* @returns Returns a
|
|
33
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
32
|
+
* @returns Returns a Promise with a string value.
|
|
33
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/notifyevent External Link: notifyEvent}
|
|
34
34
|
* @example
|
|
35
35
|
* var canceltoken = "cancellationtoken"+ Math.ceil(Math.random() * 100000 + 100000).toString();
|
|
36
36
|
*
|
|
@@ -53,7 +53,10 @@ declare namespace Microsoft {
|
|
|
53
53
|
export function notifyEvent(
|
|
54
54
|
input: NotifyEventArgs,
|
|
55
55
|
correlationId?: string
|
|
56
|
-
): Promise<
|
|
56
|
+
): Promise<'{actionName: "Timeout", responseReason: "DisplayTimeout"}' |
|
|
57
|
+
'{actionName: "Reject", responseReason: "DeclinedByAgent"}' |
|
|
58
|
+
'{"actionName":"Accept","responseReason":"Accept"}' |
|
|
59
|
+
void>;
|
|
57
60
|
|
|
58
61
|
export interface NotifyEventArgs {
|
|
59
62
|
eventType?: string;
|
package/v2.0/Presence.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ declare namespace Microsoft {
|
|
|
2
2
|
namespace CIFramework {
|
|
3
3
|
/**
|
|
4
4
|
* Returns the presence text of the agent in the client session.
|
|
5
|
+
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
5
6
|
* @returns Promise with the presence text of the current agent, as String.
|
|
6
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
7
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/getpresence External Link: getPresence}
|
|
7
8
|
* @example
|
|
8
9
|
* function getPresence() {
|
|
9
10
|
* return new Promise((resolve, reject) => {
|
|
@@ -21,13 +22,14 @@ declare namespace Microsoft {
|
|
|
21
22
|
* });
|
|
22
23
|
* });
|
|
23
24
|
*/
|
|
24
|
-
export function getPresence(): Promise<string>;
|
|
25
|
+
export function getPresence(correlationId?: string): Promise<string>;
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
28
|
* Sets the presence text of the agent in the client session.
|
|
28
29
|
* @param presenceText Presence text for current agent in Omnichannel for Customer Service. For the presence to be set correctly, the string should exactly match the text used in the admin app. To create custom presence, see {@link https://learn.microsoft.com/en-us/dynamics365/customer-service/presence-custom-presence External Link: Configure and manage custom presence} .
|
|
30
|
+
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
29
31
|
* @returns Returns a Boolean value of success.
|
|
30
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
32
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/setpresence External Link: setPresence}
|
|
31
33
|
* @example
|
|
32
34
|
* Microsoft.CIFramework.setPresence(custompresence).then(
|
|
33
35
|
* function (result) {
|
|
@@ -41,6 +43,6 @@ declare namespace Microsoft {
|
|
|
41
43
|
* });
|
|
42
44
|
*
|
|
43
45
|
*/
|
|
44
|
-
export function setPresence(presenceText: string): Promise<boolean>;
|
|
46
|
+
export function setPresence(presenceText: string, correlationId?: string): Promise<boolean>;
|
|
45
47
|
}
|
|
46
48
|
}
|
package/v2.0/Session.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ declare namespace Microsoft {
|
|
|
4
4
|
* Allows you to check if a new session can be created.
|
|
5
5
|
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
6
6
|
* @returns Promise with the value as Boolean.
|
|
7
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
7
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/cancreatesession External Link: canCreateSession}
|
|
8
8
|
*/
|
|
9
9
|
export function canCreateSession(correlationId?: string): Promise<boolean>;
|
|
10
10
|
|
|
@@ -14,7 +14,7 @@ declare namespace Microsoft {
|
|
|
14
14
|
* If your organization uses single or multiple channel providers, then you can use this method to start a default session. More information: {@link https://learn.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework/v2/support-multiple-providers External Link: Configure support for single and multiple channel providers}
|
|
15
15
|
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
16
16
|
* @returns Promise with the value as Boolean.
|
|
17
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
17
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/cancreatesession External Link: canCreateSession}
|
|
18
18
|
* @example
|
|
19
19
|
* var input = {
|
|
20
20
|
* // unique name of the configured template
|
|
@@ -36,36 +36,28 @@ declare namespace Microsoft {
|
|
|
36
36
|
correlationId?: string
|
|
37
37
|
): Promise<boolean>;
|
|
38
38
|
|
|
39
|
-
/**
|
|
40
|
-
* Input for {@link Microsoft.CIFramework.createSession createSession}
|
|
41
|
-
*/
|
|
42
|
-
interface CreateSessionInput {
|
|
43
|
-
/**
|
|
44
|
-
* Unique name of session template
|
|
45
|
-
*/
|
|
46
|
-
templateName: string;
|
|
47
|
-
/**
|
|
48
|
-
* Global and application tab template parameters, these values will override configured values
|
|
49
|
-
*/
|
|
50
|
-
templateParameters: {
|
|
51
|
-
[key: string]: number | boolean | string;
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
39
|
/**
|
|
56
40
|
* Returns an array of session identifiers for a provider.
|
|
57
41
|
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
58
42
|
* @returns Promise with the value as array of strings.
|
|
59
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
43
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/getallsessions External Link: getAllSessions}
|
|
60
44
|
*/
|
|
61
45
|
export function getAllSessions(correlationId?: string): Promise<string[]>;
|
|
62
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Returns the unique identifier of the session that is in focus, if it belongs to the channel provider else returns null. The session ID is null if the connector attempts to retrieve a focused session created using a different connector.
|
|
49
|
+
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
50
|
+
* @returns Promise with the value as a string.
|
|
51
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/getfocusedsession External Link: getAllSessions}
|
|
52
|
+
*/
|
|
53
|
+
export function getFocusedSession(correlationId?: string): Promise<string>;
|
|
54
|
+
|
|
63
55
|
/**
|
|
64
56
|
* Returns an object containing the unique identifier of the session, unique identifier of the conversation, context and the value of isFocused parameter, in case the session belongs to the channel provider.
|
|
65
57
|
* @param sessionId Id of the current session.
|
|
66
58
|
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
67
59
|
* @returns Object containing session Id, conversation Id, context and isFocused parameter
|
|
68
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/
|
|
60
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/getsession External Link: getSession}
|
|
69
61
|
* @example
|
|
70
62
|
* Microsoft.CIFramework.getSession("session-id-1").then(
|
|
71
63
|
* function success(result) {
|
|
@@ -82,5 +74,56 @@ declare namespace Microsoft {
|
|
|
82
74
|
sessionId: string,
|
|
83
75
|
correlationId?: string
|
|
84
76
|
): Promise<string>;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Shows a notification indicator on the session whose Session Id is passed as a parameter, if the session belongs to the channel provider. The notification indicator draws the user's attention to switch between sessions.
|
|
80
|
+
* @param sessionId Id of the session to be focused.
|
|
81
|
+
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
82
|
+
* @returns None.
|
|
83
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/requestfocussession External Link: requestFocusSession}
|
|
84
|
+
*/
|
|
85
|
+
export function requestFocusSession(sessionId: string, correlationId?: string): Promise<void>;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Returns an object containing the unique identifier of the session, unique identifier of the conversation, context and the value of isFocused parameter, in case the session belongs to the channel provider.
|
|
89
|
+
* @param sessionId Id of the current session.
|
|
90
|
+
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
91
|
+
* @returns Object containing session Id, conversation Id, context and isFocused parameter
|
|
92
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/channel-integration-framework/v2/develop/reference/microsoft-ciframework/getsession External Link: getSession}
|
|
93
|
+
* @example
|
|
94
|
+
* var input = {
|
|
95
|
+
* sessionId: "session-id-16",
|
|
96
|
+
* customer: "John"
|
|
97
|
+
* };
|
|
98
|
+
* // setSessionTitle needs two params in input bag.
|
|
99
|
+
* // 1. sessionId
|
|
100
|
+
* // 2. slug name which we use in title field of session template record.. In sample, we have given value as "Call from {customer}"
|
|
101
|
+
* // hence we pass "customer" in the input bag parameter.
|
|
102
|
+
* Microsoft.CIFramework.setSessionTitle(input);
|
|
103
|
+
*/
|
|
104
|
+
export function setSessionTitle(
|
|
105
|
+
input: SessionInfo,
|
|
106
|
+
correlationId?: string
|
|
107
|
+
): Promise<string>;
|
|
108
|
+
|
|
109
|
+
interface SessionInfo {
|
|
110
|
+
[prop:string]: 'sessionId' extends typeof prop? string : number | boolean | string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Input for {@link Microsoft.CIFramework.createSession createSession}
|
|
115
|
+
*/
|
|
116
|
+
interface CreateSessionInput {
|
|
117
|
+
/**
|
|
118
|
+
* Unique name of session template
|
|
119
|
+
*/
|
|
120
|
+
templateName: string;
|
|
121
|
+
/**
|
|
122
|
+
* Global and application tab template parameters, these values will override configured values
|
|
123
|
+
*/
|
|
124
|
+
templateParameters: {
|
|
125
|
+
[key: string]: number | boolean | string;
|
|
126
|
+
};
|
|
127
|
+
}
|
|
85
128
|
}
|
|
86
129
|
}
|
package/v2.0/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
/// <reference path="./ApplicationTabManagement.d.ts" />
|
|
2
|
+
/// <reference path="./ChannelAnalytics.d.ts" />
|
|
1
3
|
/// <reference path="./ClickToAct.d.ts" />
|
|
2
|
-
/// <reference path="
|
|
4
|
+
/// <reference path="./Context.d.ts" />
|
|
3
5
|
/// <reference path="./Conversation.d.ts" />
|
|
4
6
|
/// <reference path="../v1.0/CRUD.d.ts" />
|
|
5
7
|
/// <reference path="../v1.0/EntityMetadata.d.ts" />
|
package/v1.0/Context.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
declare namespace Microsoft {
|
|
2
|
-
namespace CIFramework {
|
|
3
|
-
/**
|
|
4
|
-
* This method allows you to set automation dictionary. It enables providers to add, modify and remove values of slugs and the updated values are subsequently available for future macro invocations.
|
|
5
|
-
* @param input JSON string
|
|
6
|
-
* @param sessionId Unique identifier of the current session.
|
|
7
|
-
* @param isDelete Set isDelete to `true` if the list of parameters in input JSON are to be deleted. If isDelete is set to `true`, the slug values will be deleted and will no longer be available for subsequent macro invocations.
|
|
8
|
-
* @param correlationId Used to group all related API calls together for diagnostic telemetry
|
|
9
|
-
* @returns Returns a promise with string value.
|
|
10
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework/reference/microsoft-ciframework/updatecontext External Link: updateContext}
|
|
11
|
-
* @example
|
|
12
|
-
* var input = { "customerName" : "Contosso" };
|
|
13
|
-
* Microsoft.CIFramework.updateContext(input).then(
|
|
14
|
-
* function success(result) {
|
|
15
|
-
* console.log(result);
|
|
16
|
-
* // Perform operations upon record retrieval and opening
|
|
17
|
-
* },
|
|
18
|
-
* function (error) {
|
|
19
|
-
* console.log(error.message);
|
|
20
|
-
* // Handle error conditions
|
|
21
|
-
* }
|
|
22
|
-
* );
|
|
23
|
-
*/
|
|
24
|
-
export function updateContext(
|
|
25
|
-
input: string,
|
|
26
|
-
sessionId?: string,
|
|
27
|
-
isDelete?: boolean,
|
|
28
|
-
correlationId?: string
|
|
29
|
-
): Promise<string>;
|
|
30
|
-
}
|
|
31
|
-
}
|