@forge/api 2.22.1 → 3.0.0-next.1
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 +20 -0
- package/out/api/ari.d.ts +21 -0
- package/out/api/ari.d.ts.map +1 -0
- package/out/api/ari.js +22 -0
- package/out/api/fetch.d.ts.map +1 -1
- package/out/api/fetch.js +3 -1
- package/out/api/index.d.ts +1 -0
- package/out/api/index.d.ts.map +1 -1
- package/out/api/index.js +9 -2
- package/out/api/runtime.d.ts +16 -2
- package/out/api/runtime.d.ts.map +1 -1
- package/out/api/runtime.js +18 -4
- package/out/authorization/index.js +1 -1
- package/out/index.d.ts +10 -5
- package/out/index.d.ts.map +1 -1
- package/out/index.js +3 -2
- package/out/runtime/fetch-and-storage.d.ts.map +1 -1
- package/out/runtime/fetch-and-storage.js +1 -2
- package/out/webTrigger.js +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @forge/api
|
|
2
2
|
|
|
3
|
+
## 3.0.0-next.1
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- b3245a7: - Add environmentType, invocationId, installationId in runtime V2 context
|
|
8
|
+
- Rename getRuntime to \_\_getRuntime in @forge/api
|
|
9
|
+
- Add new method getAppContext in @forge/api to retrieve app context data
|
|
10
|
+
- Replace @atlassian/cs-ari package with @atlassian/ari
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [b3245a7]
|
|
15
|
+
- @forge/util@1.4.0-next.0
|
|
16
|
+
|
|
17
|
+
## 2.23.0-next.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- ace184d: Add requestConnectedData() to call Teamwork Graph APIs
|
|
22
|
+
|
|
3
23
|
## 2.22.1
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/out/api/ari.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface Ari {
|
|
2
|
+
toString: () => string;
|
|
3
|
+
}
|
|
4
|
+
export type AppAri = Ari & {
|
|
5
|
+
appId: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const getAppAri: (appId: string) => AppAri;
|
|
8
|
+
export type EnvironmentAri = Ari & {
|
|
9
|
+
appId: string;
|
|
10
|
+
environmentId: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const getEnvironmentAri: (appId: string, environmentId: string) => EnvironmentAri;
|
|
13
|
+
export declare class InstallationAri implements Ari {
|
|
14
|
+
constructor(installationId: string);
|
|
15
|
+
private readonly _installationId;
|
|
16
|
+
get installationId(): string;
|
|
17
|
+
toString(): string;
|
|
18
|
+
}
|
|
19
|
+
export declare const getInstallationAri: (installationId: string) => InstallationAri;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=ari.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ari.d.ts","sourceRoot":"","sources":["../../src/api/ari.ts"],"names":[],"mappings":"AAEA,UAAU,GAAG;IACX,QAAQ,EAAE,MAAM,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,MAAM,GAAG,GAAG,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAC7C,eAAO,MAAM,SAAS,UAAW,MAAM,KAAG,MAA2C,CAAC;AAEtF,MAAM,MAAM,cAAc,GAAG,GAAG,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC;AAC5E,eAAO,MAAM,iBAAiB,UAAW,MAAM,iBAAiB,MAAM,KAAG,cACf,CAAC;AAI3D,qBAAa,eAAgB,YAAW,GAAG;gBAC7B,cAAc,EAAE,MAAM;IAIlC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAS;IAEzC,IAAW,cAAc,IAAI,MAAM,CAElC;IAEM,QAAQ,IAAI,MAAM;CAG1B;AACD,eAAO,MAAM,kBAAkB,mBAAoB,MAAM,KAAG,eAAsD,CAAC"}
|
package/out/api/ari.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getInstallationAri = exports.InstallationAri = exports.getEnvironmentAri = exports.getAppAri = void 0;
|
|
4
|
+
const ari_1 = require("@forge/util/packages/ari");
|
|
5
|
+
const getAppAri = (appId) => ari_1.EcosystemAppAri.create({ appId });
|
|
6
|
+
exports.getAppAri = getAppAri;
|
|
7
|
+
const getEnvironmentAri = (appId, environmentId) => ari_1.EcosystemEnvironmentAri.create({ appId, environmentId });
|
|
8
|
+
exports.getEnvironmentAri = getEnvironmentAri;
|
|
9
|
+
class InstallationAri {
|
|
10
|
+
constructor(installationId) {
|
|
11
|
+
this._installationId = installationId;
|
|
12
|
+
}
|
|
13
|
+
get installationId() {
|
|
14
|
+
return this._installationId;
|
|
15
|
+
}
|
|
16
|
+
toString() {
|
|
17
|
+
return `ari:cloud:ecosystem::installation/${this._installationId}`;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.InstallationAri = InstallationAri;
|
|
21
|
+
const getInstallationAri = (installationId) => new InstallationAri(installationId);
|
|
22
|
+
exports.getInstallationAri = getInstallationAri;
|
package/out/api/fetch.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/api/fetch.ts"],"names":[],"mappings":"AAEA,OAAc,EAAE,WAAW,EAAY,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/api/fetch.ts"],"names":[],"mappings":"AAEA,OAAc,EAAE,WAAW,EAAY,MAAM,YAAY,CAAC;AAS1D,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAI3C,KAAK,YAAY,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAC5C,KAAK,SAAS,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,GAAG,WAAW,CAAC;AAElE,KAAK,SAAS,GAAG;IAAE,QAAQ,EAAE,YAAY,CAAC;IAAC,MAAM,EAAE,SAAS,CAAA;CAAE,CAAC;AAS/D,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,WAAW,CAkBzD;AAgCD,eAAO,MAAM,aAAa,EAAE,CAAC,IAAI,CAAC,EAAE,WAAW,KAAK,WAGlD,CAAC;AAOH,wBAAgB,iBAAiB,IAAI,QAAQ,CAsB5C;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,GAAG,GAAG,QAAQ,CAEvD"}
|
package/out/api/fetch.js
CHANGED
|
@@ -49,13 +49,15 @@ function getNodeRuntimeAPI() {
|
|
|
49
49
|
requestConfluence: (0, _1.wrapRequestProduct)(fetchProduct({ provider: 'user', remote: 'confluence' })),
|
|
50
50
|
requestBitbucket: (0, _1.wrapRequestProduct)(fetchProduct({ provider: 'user', remote: 'bitbucket' })),
|
|
51
51
|
requestGraph: (0, _1.wrapRequestGraph)(fetchProduct({ provider: 'user', remote: 'stargate' })),
|
|
52
|
+
requestConnectedData: (0, _1.wrapRequestConnectedData)(fetchProduct({ provider: 'user', remote: 'stargate' })),
|
|
52
53
|
withProvider: throwNotImplementedError
|
|
53
54
|
}),
|
|
54
55
|
asApp: () => ({
|
|
55
56
|
requestJira: (0, _1.wrapRequestProduct)(fetchProduct({ provider: 'app', remote: 'jira' })),
|
|
56
57
|
requestConfluence: (0, _1.wrapRequestProduct)(fetchProduct({ provider: 'app', remote: 'confluence' })),
|
|
57
58
|
requestBitbucket: (0, _1.wrapRequestProduct)(fetchProduct({ provider: 'app', remote: 'bitbucket' })),
|
|
58
|
-
requestGraph: (0, _1.wrapRequestGraph)(fetchProduct({ provider: 'app', remote: 'stargate' }))
|
|
59
|
+
requestGraph: (0, _1.wrapRequestGraph)(fetchProduct({ provider: 'app', remote: 'stargate' })),
|
|
60
|
+
requestConnectedData: (0, _1.wrapRequestConnectedData)(fetchProduct({ provider: 'app', remote: 'stargate' }))
|
|
59
61
|
})
|
|
60
62
|
};
|
|
61
63
|
}
|
package/out/api/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { RequestInfo, RequestInit } from 'node-fetch';
|
|
|
2
2
|
import { FetchAPI, FetchMethod, RequestProductMethod, FetchMethodAllowingRoute, APIResponse } from '..';
|
|
3
3
|
export type FetchWrapper = (fetchApi: Function) => (url: RequestInfo, init?: RequestInit) => Promise<APIResponse>;
|
|
4
4
|
export declare const wrapRequestGraph: (requestGraphApi: FetchMethod) => (query: string, variables?: any, headers?: {}) => Promise<APIResponse>;
|
|
5
|
+
export declare const wrapRequestConnectedData: (x: FetchMethod) => RequestProductMethod;
|
|
5
6
|
export declare const wrapRequestProduct: (x: FetchMethod) => RequestProductMethod;
|
|
6
7
|
export declare const wrapWithRouteUnwrapper: (x: FetchMethod) => FetchMethodAllowingRoute;
|
|
7
8
|
export declare const wrapFetchApiMethods: (api: any, wrapFetch: FetchWrapper) => FetchAPI;
|
package/out/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EACL,QAAQ,EACR,WAAW,EACX,oBAAoB,EACpB,wBAAwB,EAExB,WAAW,EAGZ,MAAM,IAAI,CAAC;AAIZ,MAAM,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,QAAQ,KAAK,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;AAElH,eAAO,MAAM,gBAAgB,oBACT,WAAW,aACrB,MAAM,cAAc,GAAG,uCAQ3B,CAAC;AAEP,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,EAAE,WAAW,KAAK,oBAG1D,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,CAAC,CAAC,EAAE,WAAW,KAAK,oBAGpD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,EAAE,WAAW,KAAK,wBAGxD,CAAC;AAEF,eAAO,MAAM,mBAAmB,QAAS,GAAG,aAAa,YAAY,KAAG,QAoCvE,CAAC"}
|
package/out/api/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.wrapFetchApiMethods = exports.wrapWithRouteUnwrapper = exports.wrapRequestProduct = exports.wrapRequestGraph = void 0;
|
|
3
|
+
exports.wrapFetchApiMethods = exports.wrapWithRouteUnwrapper = exports.wrapRequestProduct = exports.wrapRequestConnectedData = exports.wrapRequestGraph = void 0;
|
|
4
4
|
const safeUrl_1 = require("../safeUrl");
|
|
5
5
|
const wrapRequestGraph = (requestGraphApi) => (query, variables, headers = {}) => requestGraphApi('/graphql', {
|
|
6
6
|
method: 'POST',
|
|
@@ -8,6 +8,11 @@ const wrapRequestGraph = (requestGraphApi) => (query, variables, headers = {}) =
|
|
|
8
8
|
body: JSON.stringify(Object.assign({ query }, (variables ? { variables } : {})))
|
|
9
9
|
});
|
|
10
10
|
exports.wrapRequestGraph = wrapRequestGraph;
|
|
11
|
+
const wrapRequestConnectedData = (fetch) => (path, init) => {
|
|
12
|
+
const safeUrl = (0, safeUrl_1.requireSafeUrl)(path);
|
|
13
|
+
return fetch(`/connected-data/${safeUrl.value.replace(/^\/+/, '')}`, init);
|
|
14
|
+
};
|
|
15
|
+
exports.wrapRequestConnectedData = wrapRequestConnectedData;
|
|
11
16
|
const wrapRequestProduct = (requestProduct) => (path, init) => {
|
|
12
17
|
const safeUrl = (0, safeUrl_1.requireSafeUrl)(path);
|
|
13
18
|
return requestProduct(safeUrl.value, init);
|
|
@@ -29,6 +34,7 @@ const wrapFetchApiMethods = (api, wrapFetch) => {
|
|
|
29
34
|
requestConfluence: (0, exports.wrapRequestProduct)(wrapFetch(api.asUser().requestConfluence)),
|
|
30
35
|
requestBitbucket: (0, exports.wrapRequestProduct)(wrapFetch(api.asUser().requestBitbucket)),
|
|
31
36
|
requestGraph: (0, exports.wrapRequestGraph)(wrapFetch(api.asUser().requestGraph)),
|
|
37
|
+
requestConnectedData: (0, exports.wrapRequestConnectedData)(wrapFetch(api.asUser().requestConnectedData)),
|
|
32
38
|
withProvider: (provider, remoteName, tokenId) => {
|
|
33
39
|
const { hasCredentials, requestCredentials, listCredentials, fetch: withProviderFetch } = api.asUser().withProvider(provider, remoteName, tokenId);
|
|
34
40
|
const wrappedRequestRemote = (0, exports.wrapWithRouteUnwrapper)(wrapFetch(withProviderFetch));
|
|
@@ -44,7 +50,8 @@ const wrapFetchApiMethods = (api, wrapFetch) => {
|
|
|
44
50
|
requestJira: (0, exports.wrapRequestProduct)(wrapFetch(api.asApp().requestJira)),
|
|
45
51
|
requestConfluence: (0, exports.wrapRequestProduct)(wrapFetch(api.asApp().requestConfluence)),
|
|
46
52
|
requestGraph: (0, exports.wrapRequestGraph)(wrapFetch(api.asApp().requestGraph)),
|
|
47
|
-
requestBitbucket: (0, exports.wrapRequestProduct)(wrapFetch(api.asApp().requestBitbucket))
|
|
53
|
+
requestBitbucket: (0, exports.wrapRequestProduct)(wrapFetch(api.asApp().requestBitbucket)),
|
|
54
|
+
requestConnectedData: (0, exports.wrapRequestConnectedData)(wrapFetch(api.asApp().requestConnectedData))
|
|
48
55
|
})
|
|
49
56
|
};
|
|
50
57
|
};
|
package/out/api/runtime.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Metrics, Tags } from '@forge/util/packages/metrics-interface';
|
|
2
|
+
import { AppAri, EnvironmentAri, InstallationAri } from './ari';
|
|
2
3
|
export type ProxyInfo = {
|
|
3
4
|
token: string;
|
|
4
5
|
url: string;
|
|
@@ -14,8 +15,11 @@ export type ForgeRuntime = {
|
|
|
14
15
|
};
|
|
15
16
|
appContext: {
|
|
16
17
|
appId: string;
|
|
17
|
-
environmentId: string;
|
|
18
18
|
appVersion: string;
|
|
19
|
+
environmentId: string;
|
|
20
|
+
environmentType: string;
|
|
21
|
+
invocationId: string;
|
|
22
|
+
installationId: string;
|
|
19
23
|
functionKey: string;
|
|
20
24
|
moduleType: string;
|
|
21
25
|
moduleKey: string;
|
|
@@ -35,7 +39,17 @@ export type ForgeRuntime = {
|
|
|
35
39
|
host: string;
|
|
36
40
|
};
|
|
37
41
|
};
|
|
38
|
-
export
|
|
42
|
+
export type AppContext = {
|
|
43
|
+
appAri: AppAri;
|
|
44
|
+
appVersion: string;
|
|
45
|
+
environmentAri: EnvironmentAri;
|
|
46
|
+
environmentType: string;
|
|
47
|
+
invocationId: string;
|
|
48
|
+
installationAri: InstallationAri;
|
|
49
|
+
moduleKey: string;
|
|
50
|
+
};
|
|
51
|
+
export declare function __getRuntime(): ForgeRuntime;
|
|
52
|
+
export declare function getAppContext(): AppContext;
|
|
39
53
|
export declare function wrapInMetrics<Args extends unknown[], Ret>(name: string, fn: (...args: Args) => Promise<Ret>, { tags }?: {
|
|
40
54
|
tags?: Tags;
|
|
41
55
|
}): (...args: Args) => Promise<Ret>;
|
package/out/api/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/api/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"runtime.d.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AG;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,cAAc,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,eAAe,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,YAAY,IAAI,YAAY,CAO3C;AAED,wBAAgB,aAAa,IAAI,UAAU,CAY1C;AAED,wBAAgB,aAAa,CAAC,IAAI,SAAS,OAAO,EAAE,EAAE,GAAG,EACvD,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,GAAG,CAAC,EACnC,EAAE,IAAI,EAAE,GAAE;IAAE,IAAI,CAAC,EAAE,IAAI,CAAA;CAAO,GAC7B,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,GAAG,CAAC,CAiBjC"}
|
package/out/api/runtime.js
CHANGED
|
@@ -1,19 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.wrapInMetrics = exports.
|
|
3
|
+
exports.wrapInMetrics = exports.getAppContext = exports.__getRuntime = void 0;
|
|
4
4
|
const errors_1 = require("./errors");
|
|
5
5
|
const node_fetch_1 = require("node-fetch");
|
|
6
|
-
|
|
6
|
+
const ari_1 = require("./ari");
|
|
7
|
+
function __getRuntime() {
|
|
7
8
|
const runtime = global.__forge_runtime__;
|
|
8
9
|
if (!runtime) {
|
|
9
10
|
throw new Error('Forge runtime not found.');
|
|
10
11
|
}
|
|
11
12
|
return runtime;
|
|
12
13
|
}
|
|
13
|
-
exports.
|
|
14
|
+
exports.__getRuntime = __getRuntime;
|
|
15
|
+
function getAppContext() {
|
|
16
|
+
const { appId, appVersion, environmentId, environmentType, invocationId, installationId, moduleKey } = __getRuntime().appContext;
|
|
17
|
+
return {
|
|
18
|
+
appAri: (0, ari_1.getAppAri)(appId),
|
|
19
|
+
appVersion,
|
|
20
|
+
environmentAri: (0, ari_1.getEnvironmentAri)(appId, environmentId),
|
|
21
|
+
environmentType,
|
|
22
|
+
installationAri: (0, ari_1.getInstallationAri)(installationId),
|
|
23
|
+
invocationId,
|
|
24
|
+
moduleKey
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
exports.getAppContext = getAppContext;
|
|
14
28
|
function wrapInMetrics(name, fn, { tags } = {}) {
|
|
15
29
|
return async (...args) => {
|
|
16
|
-
const { metrics } =
|
|
30
|
+
const { metrics } = __getRuntime();
|
|
17
31
|
metrics.counter(name, tags).incr();
|
|
18
32
|
const timer = metrics.timing(name, tags).measure();
|
|
19
33
|
let success = true;
|
|
@@ -9,7 +9,7 @@ const authorize = () => {
|
|
|
9
9
|
accountId = process.env.__CURRENT_USER_ACCOUNT_ID;
|
|
10
10
|
}
|
|
11
11
|
else {
|
|
12
|
-
accountId = (0, __1.
|
|
12
|
+
accountId = (0, __1.__getRuntime)().aaid;
|
|
13
13
|
}
|
|
14
14
|
if (!accountId) {
|
|
15
15
|
throw new Error(`Couldn’t find the accountId of the invoking user. This API can only be used inside user-invoked modules.`);
|
package/out/index.d.ts
CHANGED
|
@@ -17,6 +17,9 @@ export interface RequestProductMethods {
|
|
|
17
17
|
export interface GraphQLFetchMethods {
|
|
18
18
|
requestGraph: (query: string, variables?: any, headers?: Record<string, any>) => Promise<APIResponse>;
|
|
19
19
|
}
|
|
20
|
+
export interface ConnectedDataFetchMethods {
|
|
21
|
+
requestConnectedData: RequestProductMethod;
|
|
22
|
+
}
|
|
20
23
|
export interface ExternalAuthFetchMethods {
|
|
21
24
|
hasCredentials: () => Promise<boolean>;
|
|
22
25
|
requestCredentials: () => Promise<boolean>;
|
|
@@ -50,16 +53,18 @@ export interface StoreAPI extends PropertiesAPI {
|
|
|
50
53
|
onConfluencePage: (context: string) => StorageMethods;
|
|
51
54
|
onConfluenceSpace: (context: string) => StorageMethods;
|
|
52
55
|
}
|
|
56
|
+
export type AsUserFetchMethods = RequestProductMethods & GraphQLFetchMethods & ConnectedDataFetchMethods & ExternalAuthFetchMethodsProvider;
|
|
57
|
+
export type AsAppFetchMethods = RequestProductMethods & GraphQLFetchMethods & ConnectedDataFetchMethods;
|
|
53
58
|
export interface FetchAPI extends RequestProductMethods {
|
|
54
|
-
asUser():
|
|
55
|
-
asApp():
|
|
59
|
+
asUser(): AsUserFetchMethods;
|
|
60
|
+
asApp(): AsAppFetchMethods;
|
|
56
61
|
fetch: FetchMethodAllowingRoute;
|
|
57
62
|
}
|
|
58
63
|
export interface ForgeAPI extends FetchAPI {
|
|
59
64
|
store: StoreAPI;
|
|
60
65
|
}
|
|
61
|
-
declare const asUser: () =>
|
|
62
|
-
declare const asApp: () =>
|
|
66
|
+
declare const asUser: () => AsUserFetchMethods;
|
|
67
|
+
declare const asApp: () => AsAppFetchMethods;
|
|
63
68
|
declare const fetch: FetchMethodAllowingRoute;
|
|
64
69
|
declare const requestJira: RequestProductMethod;
|
|
65
70
|
declare const requestConfluence: RequestProductMethod;
|
|
@@ -75,6 +80,6 @@ export default API;
|
|
|
75
80
|
export { asUser, asApp, authorize, fetch, requestJira, requestConfluence, requestBitbucket, store, storage, properties, webTrigger, createRequestStargateAsApp };
|
|
76
81
|
export { QueryBuilder, QueryApi, EntityStorageApi, Condition, ListResult, Predicate, Result, Value, WherePredicate, FilterPredicate, startsWith, WhereConditions, FilterConditions, SortOrder } from '@forge/storage';
|
|
77
82
|
export { route, assumeTrustedRoute, routeFromAbsolute, Route } from './safeUrl';
|
|
78
|
-
export { ForgeRuntime,
|
|
83
|
+
export { ForgeRuntime, AppContext, getAppContext, __getRuntime } from './api/runtime';
|
|
79
84
|
export { NeedsAuthenticationError, ProxyRequestError, FetchError, ExternalEndpointNotAllowedError, ProductEndpointNotAllowedError, RequestProductNotAllowedError, NotAllowedError, InvalidWorkspaceRequestedError, HttpError, FUNCTION_ERR, isForgePlatformError, isHostedCodeError } from './api/errors';
|
|
80
85
|
//# sourceMappingURL=index.d.ts.map
|
package/out/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAA8C,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAExG,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAe,0BAA0B,EAAiB,MAAM,6BAA6B,CAAC;AAErG,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,aAAa,GAAG,IAAI,GAAG,QAAQ,GAAG,YAAY,GAAG,SAAS,CAAC,CAAC;AACvH,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;AACpF,MAAM,MAAM,wBAAwB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;AACzG,MAAM,MAAM,oBAAoB,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;AAC5F,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC;AAEvC,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,oBAAoB,CAAC;IAClC,iBAAiB,EAAE,oBAAoB,CAAC;IACxC,gBAAgB,EAAE,oBAAoB,CAAC;CACxC;AAED,MAAM,WA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UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,SAAS,EACV,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,UAAU,EACV,+BAA+B,EAC/B,8BAA8B,EAC9B,6BAA6B,EAC7B,eAAe,EACf,8BAA8B,EAC9B,SAAS,EACT,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,cAAc,CAAC"}
|
package/out/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isHostedCodeError = exports.isForgePlatformError = exports.FUNCTION_ERR = exports.HttpError = exports.InvalidWorkspaceRequestedError = exports.NotAllowedError = exports.RequestProductNotAllowedError = exports.ProductEndpointNotAllowedError = exports.ExternalEndpointNotAllowedError = exports.FetchError = exports.ProxyRequestError = exports.NeedsAuthenticationError = exports.
|
|
3
|
+
exports.isHostedCodeError = exports.isForgePlatformError = exports.FUNCTION_ERR = exports.HttpError = exports.InvalidWorkspaceRequestedError = exports.NotAllowedError = exports.RequestProductNotAllowedError = exports.ProductEndpointNotAllowedError = exports.ExternalEndpointNotAllowedError = exports.FetchError = exports.ProxyRequestError = exports.NeedsAuthenticationError = exports.__getRuntime = exports.getAppContext = exports.routeFromAbsolute = exports.assumeTrustedRoute = exports.route = exports.SortOrder = exports.FilterConditions = exports.WhereConditions = exports.startsWith = exports.createRequestStargateAsApp = exports.webTrigger = exports.properties = exports.storage = exports.store = exports.requestBitbucket = exports.requestConfluence = exports.requestJira = exports.fetch = exports.authorize = exports.asApp = exports.asUser = exports.privacy = void 0;
|
|
4
4
|
const storage_1 = require("@forge/storage");
|
|
5
5
|
const authorization_1 = require("./authorization");
|
|
6
6
|
Object.defineProperty(exports, "authorize", { enumerable: true, get: function () { return authorization_1.authorize; } });
|
|
@@ -59,7 +59,8 @@ Object.defineProperty(exports, "route", { enumerable: true, get: function () { r
|
|
|
59
59
|
Object.defineProperty(exports, "assumeTrustedRoute", { enumerable: true, get: function () { return safeUrl_1.assumeTrustedRoute; } });
|
|
60
60
|
Object.defineProperty(exports, "routeFromAbsolute", { enumerable: true, get: function () { return safeUrl_1.routeFromAbsolute; } });
|
|
61
61
|
var runtime_1 = require("./api/runtime");
|
|
62
|
-
Object.defineProperty(exports, "
|
|
62
|
+
Object.defineProperty(exports, "getAppContext", { enumerable: true, get: function () { return runtime_1.getAppContext; } });
|
|
63
|
+
Object.defineProperty(exports, "__getRuntime", { enumerable: true, get: function () { return runtime_1.__getRuntime; } });
|
|
63
64
|
var errors_1 = require("./api/errors");
|
|
64
65
|
Object.defineProperty(exports, "NeedsAuthenticationError", { enumerable: true, get: function () { return errors_1.NeedsAuthenticationError; } });
|
|
65
66
|
Object.defineProperty(exports, "ProxyRequestError", { enumerable: true, get: function () { return errors_1.ProxyRequestError; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-and-storage.d.ts","sourceRoot":"","sources":["../../src/runtime/fetch-and-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAIjC,eAAO,MAAM,0BAA0B,EAAE,MAAM,WAC2D,CAAC;AAE3G,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"fetch-and-storage.d.ts","sourceRoot":"","sources":["../../src/runtime/fetch-and-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAIjC,eAAO,MAAM,0BAA0B,EAAE,MAAM,WAC2D,CAAC;AAE3G,eAAO,MAAM,aAAa,WAOzB,CAAC;AAEF,eAAO,MAAM,WAAW,6BAOvB,CAAC"}
|
package/out/webTrigger.js
CHANGED
|
@@ -5,7 +5,7 @@ const runtime_1 = require("./api/runtime");
|
|
|
5
5
|
const fetch_and_storage_1 = require("./runtime/fetch-and-storage");
|
|
6
6
|
const proxyGetWebTriggerURL = (0, runtime_1.wrapInMetrics)('api.getWebTriggerUrl', async (webTriggerModuleKey, forceCreate) => {
|
|
7
7
|
var _a, _b;
|
|
8
|
-
const runtime = (0, runtime_1.
|
|
8
|
+
const runtime = (0, runtime_1.__getRuntime)();
|
|
9
9
|
const response = await (0, fetch_and_storage_1.createRequestStargateAsApp)()('/graphql', {
|
|
10
10
|
method: 'POST',
|
|
11
11
|
headers: { 'Content-Type': 'application/json' },
|
|
@@ -73,7 +73,7 @@ const proxyDeleteWebTriggerURL = (0, runtime_1.wrapInMetrics)('api.deleteWebTrig
|
|
|
73
73
|
});
|
|
74
74
|
const proxyGetWebTriggerUrlIds = (0, runtime_1.wrapInMetrics)('api.getWebTriggerUrlIds', async (webTriggerUrl) => {
|
|
75
75
|
var _a;
|
|
76
|
-
const runtime = (0, runtime_1.
|
|
76
|
+
const runtime = (0, runtime_1.__getRuntime)();
|
|
77
77
|
const response = await (0, fetch_and_storage_1.createRequestStargateAsApp)()('/graphql', {
|
|
78
78
|
method: 'POST',
|
|
79
79
|
headers: { 'Content-Type': 'application/json' },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-next.1",
|
|
4
4
|
"description": "Forge API methods",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"compile": "tsc -b -v"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@forge/runtime": "5.
|
|
15
|
+
"@forge/runtime": "5.3.0-next.0",
|
|
16
16
|
"@types/node": "14.18.63",
|
|
17
17
|
"expect-type": "^0.17.3",
|
|
18
18
|
"jest-matcher-specific-error": "^1.0.0",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@forge/auth": "0.0.5",
|
|
23
23
|
"@forge/egress": "1.2.11",
|
|
24
24
|
"@forge/storage": "1.5.13",
|
|
25
|
-
"@forge/util": "1.
|
|
25
|
+
"@forge/util": "1.4.0-next.0",
|
|
26
26
|
"@types/node-fetch": "^2.6.9",
|
|
27
27
|
"node-fetch": "2.7.0"
|
|
28
28
|
}
|