@forge/realtime 0.5.0 → 0.5.1-next.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/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signRealtimeToken.d.ts","sourceRoot":"","sources":["../src/signRealtimeToken.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"signRealtimeToken.d.ts","sourceRoot":"","sources":["../src/signRealtimeToken.ts"],"names":[],"mappings":"AA8BA,aAAK,gBAAgB,GAAG,WAAW,GAAG,SAAS,CAAC;AAChD,oBAAY,wBAAwB,GAAG,CAAC,gBAAgB,EAAE,GAAG,gBAAgB,EAAE,CAAC,CAAC;AAEjF,eAAO,MAAM,iBAAiB,gBACf,MAAM,UAEX,GAAG,gBACG,wBAAwB;;;;;;;;EA6DvC,CAAC"}
|
package/out/signRealtimeToken.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.signRealtimeToken = void 0;
|
|
4
4
|
const utils_1 = require("./utils");
|
|
5
|
+
const runtime_1 = require("./runtime");
|
|
5
6
|
const graphqlBody = `mutation signRealtimeToken(
|
|
6
7
|
$channelName: String!
|
|
7
8
|
$claims: JSON!
|
|
@@ -29,6 +30,7 @@ const graphqlBody = `mutation signRealtimeToken(
|
|
|
29
30
|
}
|
|
30
31
|
}`;
|
|
31
32
|
const signRealtimeToken = async (channelName, claims, permissions) => {
|
|
33
|
+
const { appContext } = (0, runtime_1.__getRuntime)();
|
|
32
34
|
const response = await global.__forge_fetch__({
|
|
33
35
|
type: 'realtime'
|
|
34
36
|
}, '/', {
|
|
@@ -43,7 +45,9 @@ const signRealtimeToken = async (channelName, claims, permissions) => {
|
|
|
43
45
|
}),
|
|
44
46
|
errors: [],
|
|
45
47
|
headers: {
|
|
46
|
-
'Content-Type': 'application/json'
|
|
48
|
+
'Content-Type': 'application/json',
|
|
49
|
+
'x-rate-limit-app-id': appContext.appId,
|
|
50
|
+
'x-rate-limit-installation-id': appContext.installationId
|
|
47
51
|
}
|
|
48
52
|
});
|
|
49
53
|
(0, utils_1.handleProxyResponseErrors)(response);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/realtime",
|
|
3
|
-
"version": "0.5.0",
|
|
3
|
+
"version": "0.5.1-next.0",
|
|
4
4
|
"description": "Forge realtime",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"types": "out/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@atlassian/metrics-interface": "4.0.0",
|
|
17
|
-
"@forge/api": "^
|
|
17
|
+
"@forge/api": "^8.0.0-next.0",
|
|
18
18
|
"@types/node": "20.19.1"
|
|
19
19
|
},
|
|
20
20
|
"publishConfig": {
|