@narrative.io/data-collaboration-sdk-ts 0.0.19 → 0.0.21

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.
@@ -1,18 +1,11 @@
1
1
  import { BaseApi } from '../base-api';
2
2
  import { type CompanyInfo } from './types';
3
3
  /**
4
- * A class for accessing the Contracts API.
4
+ * A class for accessing the Company Info API
5
5
  * @extends BaseApi
6
6
  */
7
7
  declare class CompanyInfoApi extends BaseApi {
8
8
  private readonly companyId;
9
- /**
10
- * Get a customer contract based on the contract ID
11
- *
12
- * @param contractId - ID of the customer contract
13
- * @returns Promise that resolves to the customer contract
14
- *
15
- */
16
- getCompanyInfo(contractId: string): Promise<CompanyInfo>;
9
+ getCompanyInfo(): Promise<CompanyInfo>;
17
10
  }
18
11
  export { type CompanyInfo, CompanyInfoApi };
@@ -7,22 +7,15 @@ import { BaseApi } from '../base-api';
7
7
  */
8
8
  const resourceName = 'company-info';
9
9
  /**
10
- * A class for accessing the Contracts API.
10
+ * A class for accessing the Company Info API
11
11
  * @extends BaseApi
12
12
  */
13
13
  class CompanyInfoApi extends BaseApi {
14
14
  companyId = async () => {
15
15
  return await this.get(`${resourceName}/whoami`);
16
16
  };
17
- /**
18
- * Get a customer contract based on the contract ID
19
- *
20
- * @param contractId - ID of the customer contract
21
- * @returns Promise that resolves to the customer contract
22
- *
23
- */
24
- async getCompanyInfo(contractId) {
25
- const companyId = await this.companyId();
17
+ async getCompanyInfo() {
18
+ const companyId = (await this.companyId()).id;
26
19
  return await this.get(`${resourceName}/${companyId}`);
27
20
  }
28
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narrative.io/data-collaboration-sdk-ts",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "main": "build/index.js",
5
5
  "repository": "github:narrative-io/data-collaboration-sdk-ts",
6
6
  "source": "src/index.ts",