@forge/response 0.1.2 → 0.2.0-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,5 +1,11 @@
1
1
  # @forge/repsonse
2
2
 
3
+ ## 0.2.0-next.0
4
+
5
+ ### Minor Changes
6
+
7
+ - bdb7867: Set AuthProfile constructor to return a JSON object directly
8
+
3
9
  ## 0.1.2
4
10
 
5
11
  ### Patch Changes
@@ -7,7 +7,7 @@ export declare class AuthProfile {
7
7
  displayName: string;
8
8
  avatarUrl?: string;
9
9
  });
10
- toJson(): {
10
+ toJSON(): {
11
11
  id: string;
12
12
  displayName: string;
13
13
  avatarUrl?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"auth-profile.d.ts","sourceRoot":"","sources":["../src/auth-profile.ts"],"names":[],"mappings":"AAEA,qBAAa,WAAW;IACtB,OAAO,CAAC,EAAE,CAAS;IACnB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,SAAS,CAAqB;gBAC1B,WAAW,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;IAczE,MAAM,IAAI;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;IAQxE,OAAO,CAAC,mBAAmB;CAQ5B"}
1
+ {"version":3,"file":"auth-profile.d.ts","sourceRoot":"","sources":["../src/auth-profile.ts"],"names":[],"mappings":"AAEA,qBAAa,WAAW;IACtB,OAAO,CAAC,EAAE,CAAS;IACnB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,SAAS,CAAqB;gBAC1B,WAAW,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;IAgBzE,MAAM,IAAI;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;IAQxE,OAAO,CAAC,mBAAmB;CAQ5B"}
@@ -15,8 +15,9 @@ class AuthProfile {
15
15
  this.id = authProfile.id;
16
16
  this.displayName = authProfile.displayName;
17
17
  this.avatarUrl = authProfile.avatarUrl;
18
+ return this.toJSON();
18
19
  }
19
- toJson() {
20
+ toJSON() {
20
21
  return Object.assign({ id: this.id, displayName: this.displayName }, (this.avatarUrl ? { avatarUrl: this.avatarUrl } : {}));
21
22
  }
22
23
  parameterValidation(fieldName, parameter) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/response",
3
- "version": "0.1.2",
3
+ "version": "0.2.0-next.0",
4
4
  "description": "Contains object to do validation of response objects at time of invocation",
5
5
  "main": "out/index.js",
6
6
  "license": "UNLICENSED",