@forge/response 0.2.3 → 0.2.4-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 +6 -0
- package/LICENSE.txt +7 -0
- package/out/auth-profile.js +8 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright (c) 2025 Atlassian
|
|
2
|
+
Permission is hereby granted to use this software in accordance with the terms
|
|
3
|
+
and conditions outlined in the Atlassian Developer Terms, which can be found
|
|
4
|
+
at the following URL:
|
|
5
|
+
https://developer.atlassian.com/platform/marketplace/atlassian-developer-terms/
|
|
6
|
+
By using this software, you agree to comply with these terms and conditions.
|
|
7
|
+
If you do not agree with these terms, you are not permitted to use this software.
|
package/out/auth-profile.js
CHANGED
|
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AuthProfile = void 0;
|
|
4
4
|
const CHARACTER_LIMIT = 1042;
|
|
5
5
|
class AuthProfile {
|
|
6
|
+
id;
|
|
7
|
+
displayName;
|
|
8
|
+
avatarUrl;
|
|
6
9
|
constructor(authProfile) {
|
|
7
10
|
if (!authProfile || !authProfile.id || !authProfile.displayName) {
|
|
8
11
|
throw new Error(`Missing Value for one or more required fields: 'id', 'displayName'`);
|
|
@@ -18,7 +21,11 @@ class AuthProfile {
|
|
|
18
21
|
return this.toJSON();
|
|
19
22
|
}
|
|
20
23
|
toJSON() {
|
|
21
|
-
return
|
|
24
|
+
return {
|
|
25
|
+
id: this.id,
|
|
26
|
+
displayName: this.displayName,
|
|
27
|
+
...(this.avatarUrl ? { avatarUrl: this.avatarUrl } : {})
|
|
28
|
+
};
|
|
22
29
|
}
|
|
23
30
|
parameterValidation(fieldName, parameter) {
|
|
24
31
|
if (typeof parameter !== `string`) {
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/response",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4-next.0",
|
|
4
4
|
"description": "Contains object to do validation of response objects at time of invocation",
|
|
5
5
|
"main": "out/index.js",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "yarn run clean && yarn run compile",
|
|
9
9
|
"compile": "tsc -b -v",
|