@studyportals/grogu-api-interface 1.2.1-1 → 2.0.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.
@@ -2,5 +2,5 @@ import { IContentInput } from "./content-input.interface";
2
2
  import { RequestBase } from "./request-base";
3
3
  export declare class EcsGroguApiClient extends RequestBase {
4
4
  constructor(apiUriBase: string);
5
- getContent(body: IContentInput): Promise<string>;
5
+ getContent(body: IContentInput): Promise<string | null>;
6
6
  }
@@ -6,8 +6,11 @@ export class EcsGroguApiClient extends RequestBase {
6
6
  }
7
7
  async getContent(body) {
8
8
  const result = await this.postRequest(body);
9
+ if (result.statusCode === 204 || !result.body) {
10
+ return null;
11
+ }
9
12
  const resultBody = result.body;
10
- return resultBody.content;
13
+ return resultBody.content ?? null;
11
14
  }
12
15
  }
13
16
  //# sourceMappingURL=ecs-grogu-api-client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ecs-grogu-api-client.js","sourceRoot":"","sources":["../ecs-grogu-api-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,iBAAkB,SAAQ,WAAW;IAEjD,YAAY,UAAkB;QAC7B,MAAM,CAAC,QAAQ,EAAE,kBAAkB,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC/D,KAAK,CAAC,GAAG,QAAQ,cAAc,kBAAkB,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,IAAmB;QACnC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC5C,MAAM,UAAU,GAAG,MAAM,CAAC,IAAoC,CAAC;QAC/D,OAAO,UAAU,CAAC,OAAO,CAAC;IAC3B,CAAC;CACD"}
1
+ {"version":3,"file":"ecs-grogu-api-client.js","sourceRoot":"","sources":["../ecs-grogu-api-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,OAAO,iBAAkB,SAAQ,WAAW;IAEjD,YAAY,UAAkB;QAC7B,MAAM,CAAC,QAAQ,EAAE,kBAAkB,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC/D,KAAK,CAAC,GAAG,QAAQ,cAAc,kBAAkB,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,IAAmB;QACnC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,MAAM,CAAC,UAAU,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;YAC/C,OAAO,IAAI,CAAC;QACb,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,CAAC,IAA8C,CAAC;QACzE,OAAO,UAAU,CAAC,OAAO,IAAI,IAAI,CAAC;IACnC,CAAC;CACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studyportals/grogu-api-interface",
3
- "version": "1.2.1-1",
3
+ "version": "2.0.0",
4
4
  "description": "Typescript library containing resources that facilitate integration with Grogu API",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -20,7 +20,6 @@
20
20
  "typescript": "^5.9.3"
21
21
  },
22
22
  "dependencies": {
23
- "@studyportals/grogu-api-interface": "^1.2.1-0",
24
23
  "@studyportals/mb-platform-http-requests": "^2.8.0",
25
24
  "@studyportals/search-api-interface": "^5.0.0",
26
25
  "@studyportals/search-filters": "^6.3.1"