@albanian-xrm/cif-types 0.1.1 → 0.1.3
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 +1 -1
- package/package.json +1 -1
- package/v1.0/Events.d.ts +19 -13
- package/v1.0/index.d.ts +1 -0
- package/v2.0/Notification.d.ts +59 -0
- package/v2.0/index.d.ts +1 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @albanian-xrm/cif-types
|
|
2
2
|
Microsoft.CIFramework types from the community (us).
|
|
3
3
|
|
|
4
|
-
Read more about Channel Integration Framework on the Microsoft Docs [here](https://learn.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework).
|
|
4
|
+
Read more about Channel Integration Framework on the Microsoft Docs [here](https://learn.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework/channel-integration-framework).
|
|
5
5
|
|
|
6
6
|
These types are based on the api documentation on the Microsoft Docs [here](https://learn.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework/reference/microsoft-ciframework).
|
package/package.json
CHANGED
package/v1.0/Events.d.ts
CHANGED
|
@@ -160,19 +160,6 @@ declare namespace Microsoft {
|
|
|
160
160
|
): void;
|
|
161
161
|
|
|
162
162
|
namespace EventArgs {
|
|
163
|
-
/**
|
|
164
|
-
* The CIFInitDone event is raised by the Dynamics 365 Channel Integration Framework library when Channel Integration Framework is loaded.
|
|
165
|
-
* This event is used to determine whether the Channel Integration Framework APIs are ready to be consumed.
|
|
166
|
-
* @see {@link https://learn.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework/reference/events/cifinitdone External Link: CIFInitDone event}
|
|
167
|
-
* @example
|
|
168
|
-
* (function () {
|
|
169
|
-
* window.addEventListener("CIFInitDone", function () {
|
|
170
|
-
* //Code that consumes CIF library APIs.
|
|
171
|
-
* });
|
|
172
|
-
* })();
|
|
173
|
-
*/
|
|
174
|
-
export interface CIFInitDone {}
|
|
175
|
-
|
|
176
163
|
export interface ClickToAct {
|
|
177
164
|
value: any;
|
|
178
165
|
name: "string";
|
|
@@ -211,3 +198,22 @@ declare namespace Microsoft {
|
|
|
211
198
|
}
|
|
212
199
|
}
|
|
213
200
|
}
|
|
201
|
+
|
|
202
|
+
interface Window {
|
|
203
|
+
/**
|
|
204
|
+
* The CIFInitDone event is raised by the Dynamics 365 Channel Integration Framework library when Channel Integration Framework is loaded.
|
|
205
|
+
* This event is used to determine whether the Channel Integration Framework APIs are ready to be consumed.
|
|
206
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework/reference/events/cifinitdone External Link: CIFInitDone event}
|
|
207
|
+
* @example
|
|
208
|
+
* (function () {
|
|
209
|
+
* window.addEventListener("CIFInitDone", function () {
|
|
210
|
+
* //Code that consumes CIF library APIs.
|
|
211
|
+
* });
|
|
212
|
+
* })();
|
|
213
|
+
*/
|
|
214
|
+
addEventListener(
|
|
215
|
+
type: "CIFInitDone",
|
|
216
|
+
listener: () => void,
|
|
217
|
+
options?: boolean | AddEventListenerOptions
|
|
218
|
+
): void;
|
|
219
|
+
}
|
package/v1.0/index.d.ts
CHANGED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
declare namespace Microsoft {
|
|
2
|
+
namespace CIFramework {
|
|
3
|
+
/**
|
|
4
|
+
* Cancels the notification about incoming conversations based on the cancellation token.
|
|
5
|
+
* @param cancellationToken Unique string that was provided in the {@link notifyEvent} method to display notifications about incoming conversations.
|
|
6
|
+
* @param correlationId Used to group all related API calls together for diagnostic telemetry.
|
|
7
|
+
* @returns Returns the cancellation token.
|
|
8
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework/v2/reference/microsoft-ciframework/cancelevent External Link: cancelEvent}
|
|
9
|
+
* @example
|
|
10
|
+
* // Trying to cancel a notification, use the same cancelToken passed during creation of notification in notifyEvent
|
|
11
|
+
* Microsoft.CIFramework.cancelEvent(CancelToken).then(
|
|
12
|
+
* function success(result) {
|
|
13
|
+
* console.log(result);
|
|
14
|
+
* // Perform operations
|
|
15
|
+
* },
|
|
16
|
+
* function (error) {
|
|
17
|
+
* console.log(error.message);
|
|
18
|
+
* // Handle error conditions
|
|
19
|
+
* }
|
|
20
|
+
* );
|
|
21
|
+
*/
|
|
22
|
+
export function cancelEvent(
|
|
23
|
+
cancellationToken: string,
|
|
24
|
+
correlationId?: string
|
|
25
|
+
): Promise<string>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Displays a notification that can be used to inform the agent about incoming conversations.
|
|
29
|
+
* @param input JSON string
|
|
30
|
+
* @param correlationId Used to group all related API calls together for diagnostic telemetry.
|
|
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 Boolean value of success.
|
|
33
|
+
* @see {@link https://learn.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework/v2/reference/microsoft-ciframework/notifyevent External Link: notifyEvent}
|
|
34
|
+
* @example
|
|
35
|
+
* var canceltoken = "cancellationtoken"+ Math.ceil(Math.random() * 100000 + 100000).toString();
|
|
36
|
+
*
|
|
37
|
+
* var input = {
|
|
38
|
+
* templateName: "msdyn_chat_incoming_unauthenticated", // unique name of the configured template
|
|
39
|
+
* templateParameters: {},
|
|
40
|
+
* cancellationToken: canceltoken // unique random token, to identify the notification during cancelEvent call
|
|
41
|
+
* }
|
|
42
|
+
* Microsoft.CIFramework.notifyEvent(input).then(
|
|
43
|
+
* function success(result) {
|
|
44
|
+
* console.log(result);
|
|
45
|
+
* // Perform operations
|
|
46
|
+
* },
|
|
47
|
+
* function (error) {
|
|
48
|
+
* console.log(error.message);
|
|
49
|
+
* // Handle error conditions
|
|
50
|
+
* }
|
|
51
|
+
* );
|
|
52
|
+
*/
|
|
53
|
+
export function notifyEvent(
|
|
54
|
+
input: string,
|
|
55
|
+
correlationId?: string,
|
|
56
|
+
cancellationToken?: string
|
|
57
|
+
): Promise<string>;
|
|
58
|
+
}
|
|
59
|
+
}
|
package/v2.0/index.d.ts
CHANGED