@salesforce/sdk-core 1.52.1 → 1.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/jsonrpc-client.d.ts
CHANGED
|
@@ -57,5 +57,29 @@ export declare class JsonRpcClient {
|
|
|
57
57
|
* });
|
|
58
58
|
*/
|
|
59
59
|
protected request<TParams = unknown, TResult = unknown>(method: string, params: TParams): Promise<TResult>;
|
|
60
|
+
/**
|
|
61
|
+
* Send a JSON-RPC notification to the parent window
|
|
62
|
+
*
|
|
63
|
+
* Notifications are one-way messages that do not expect a response.
|
|
64
|
+
* Use notifications for:
|
|
65
|
+
* - Informing the host of state changes
|
|
66
|
+
* - Fire-and-forget operations
|
|
67
|
+
* - Events that don't require confirmation
|
|
68
|
+
*
|
|
69
|
+
* Use request() instead when you need:
|
|
70
|
+
* - A response from the host
|
|
71
|
+
* - Confirmation of success/failure
|
|
72
|
+
* - Return values from the operation
|
|
73
|
+
*
|
|
74
|
+
* @param method - The JSON-RPC method name
|
|
75
|
+
* @param params - Optional method parameters
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* this.sendNotification("ui/notifications/size-changed", {
|
|
79
|
+
* width: 800,
|
|
80
|
+
* height: 600
|
|
81
|
+
* });
|
|
82
|
+
*/
|
|
83
|
+
protected sendNotification<TParams = unknown>(method: string, params?: TParams): void;
|
|
60
84
|
}
|
|
61
85
|
//# sourceMappingURL=jsonrpc-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonrpc-client.d.ts","sourceRoot":"","sources":["../src/jsonrpc-client.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,aAAa;IACzB,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,OAAO,CAAuC;IACtD,OAAO,CAAC,oBAAoB,CAAgD;;IAO5E;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI;IAI/F;;;OAGG;IACH,OAAO,CAAC,SAAS,CA4Bf;IAEF;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,OAAO,CAAC,OAAO,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO,EACrD,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,GACb,OAAO,CAAC,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"jsonrpc-client.d.ts","sourceRoot":"","sources":["../src/jsonrpc-client.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,aAAa;IACzB,OAAO,CAAC,aAAa,CAAK;IAC1B,OAAO,CAAC,OAAO,CAAuC;IACtD,OAAO,CAAC,oBAAoB,CAAgD;;IAO5E;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI;IAI/F;;;OAGG;IACH,OAAO,CAAC,SAAS,CA4Bf;IAEF;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,OAAO,CAAC,OAAO,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO,EACrD,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,GACb,OAAO,CAAC,OAAO,CAAC;IAkBnB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAS,CAAC,gBAAgB,CAAC,OAAO,GAAG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI;CAQrF"}
|
package/dist/jsonrpc-client.js
CHANGED
|
@@ -103,4 +103,35 @@ export class JsonRpcClient {
|
|
|
103
103
|
window.parent?.postMessage(message, "*");
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Send a JSON-RPC notification to the parent window
|
|
108
|
+
*
|
|
109
|
+
* Notifications are one-way messages that do not expect a response.
|
|
110
|
+
* Use notifications for:
|
|
111
|
+
* - Informing the host of state changes
|
|
112
|
+
* - Fire-and-forget operations
|
|
113
|
+
* - Events that don't require confirmation
|
|
114
|
+
*
|
|
115
|
+
* Use request() instead when you need:
|
|
116
|
+
* - A response from the host
|
|
117
|
+
* - Confirmation of success/failure
|
|
118
|
+
* - Return values from the operation
|
|
119
|
+
*
|
|
120
|
+
* @param method - The JSON-RPC method name
|
|
121
|
+
* @param params - Optional method parameters
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* this.sendNotification("ui/notifications/size-changed", {
|
|
125
|
+
* width: 800,
|
|
126
|
+
* height: 600
|
|
127
|
+
* });
|
|
128
|
+
*/
|
|
129
|
+
sendNotification(method, params) {
|
|
130
|
+
const message = {
|
|
131
|
+
jsonrpc: "2.0",
|
|
132
|
+
method,
|
|
133
|
+
params,
|
|
134
|
+
};
|
|
135
|
+
window.parent?.postMessage(message, "*");
|
|
136
|
+
}
|
|
106
137
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/sdk-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.53.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "ecdad417f3e8de0f911ff1113ff9fe7fb1360f22"
|
|
35
35
|
}
|