@narrative.io/data-collaboration-sdk-ts 0.0.36 → 0.0.38
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/build/datasets/index.js +1 -1
- package/build/index.d.ts +3 -2
- package/build/index.js +3 -2
- package/build/nql/index.d.ts +8 -11
- package/build/nql/index.js +7 -16
- package/build/nql/types.d.ts +3 -0
- package/package.json +1 -1
package/build/datasets/index.js
CHANGED
|
@@ -86,6 +86,6 @@ export class DatasetApi extends BaseApi {
|
|
|
86
86
|
* @public
|
|
87
87
|
*/
|
|
88
88
|
async getDatasetFileDownloadUrl(datasetId, snapshotId, fileId) {
|
|
89
|
-
return await this.
|
|
89
|
+
return await this.post(`${resourceName}/${datasetId}/snapshots/${snapshotId}/files-added/${fileId}/download`);
|
|
90
90
|
}
|
|
91
91
|
}
|
package/build/index.d.ts
CHANGED
|
@@ -16,8 +16,9 @@ import { type PingStatus } from './ping/types';
|
|
|
16
16
|
import { type Product, ProductsApi } from './products';
|
|
17
17
|
import { CompanyInfoApi, type CompanyInfo } from './company-info';
|
|
18
18
|
import { InstallationsApi, type Installation } from './installations';
|
|
19
|
+
import { NqlApi, type NqlQuery, type NqlResult } from './nql';
|
|
19
20
|
declare class NarrativeApi extends BaseApi {
|
|
20
21
|
}
|
|
21
|
-
interface NarrativeApi extends BaseApi, HealthCheckApi, DatasetApi, RosettaStoneApi, AttributeApi, PingApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi {
|
|
22
|
+
interface NarrativeApi extends BaseApi, HealthCheckApi, DatasetApi, RosettaStoneApi, AttributeApi, PingApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi {
|
|
22
23
|
}
|
|
23
|
-
export { NarrativeApi, AttributeApi, HealthCheckApi, DatasetApi, PingApi, ProductsApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, type Resource, type UploadsResponse, type PingStatus, type Attribute, type Environment, type Config, type ApiRecords, type Dataset, type HealthCheckResult, type SampleRecords, type DatasetTableSummary, type DatasetTableSummaryAPIResponse, type Product, type MonetaryAmount, type CompanyInfo, type Installation, type FilePerSnapshotResponse, type BucketCreationRequest, type UpdateAccessTypeRequest };
|
|
24
|
+
export { NarrativeApi, AttributeApi, HealthCheckApi, DatasetApi, PingApi, ProductsApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, type Resource, type UploadsResponse, type PingStatus, type Attribute, type Environment, type Config, type ApiRecords, type Dataset, type HealthCheckResult, type SampleRecords, type DatasetTableSummary, type DatasetTableSummaryAPIResponse, type Product, type MonetaryAmount, type CompanyInfo, type Installation, type FilePerSnapshotResponse, type BucketCreationRequest, type UpdateAccessTypeRequest, type NqlQuery, type NqlResult };
|
package/build/index.js
CHANGED
|
@@ -10,7 +10,8 @@ import { UploadsApi } from './uploads';
|
|
|
10
10
|
import { ProductsApi } from './products';
|
|
11
11
|
import { CompanyInfoApi } from './company-info';
|
|
12
12
|
import { InstallationsApi } from './installations';
|
|
13
|
+
import { NqlApi } from './nql';
|
|
13
14
|
class NarrativeApi extends BaseApi {
|
|
14
15
|
}
|
|
15
|
-
applyMixins(NarrativeApi, [BaseApi, HealthCheckApi, DatasetApi, RosettaStoneApi, AttributeApi, PingApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi]);
|
|
16
|
-
export { NarrativeApi, AttributeApi, HealthCheckApi, DatasetApi, PingApi, ProductsApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi };
|
|
16
|
+
applyMixins(NarrativeApi, [BaseApi, HealthCheckApi, DatasetApi, RosettaStoneApi, AttributeApi, PingApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi]);
|
|
17
|
+
export { NarrativeApi, AttributeApi, HealthCheckApi, DatasetApi, PingApi, ProductsApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi };
|
package/build/nql/index.d.ts
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import { type Config } from 'src/types';
|
|
2
1
|
import { BaseApi } from '../base-api';
|
|
3
|
-
import { type NqlResult } from './types';
|
|
2
|
+
import { type NqlQuery, type NqlResult } from './types';
|
|
4
3
|
/**
|
|
5
4
|
* A class for accessing the NQL API.
|
|
6
5
|
* @extends BaseApi
|
|
7
6
|
*/
|
|
8
7
|
declare class NqlApi extends BaseApi {
|
|
9
|
-
constructor(config: Config);
|
|
10
8
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
executeNql(token: string, nqlQuery: string): Promise<object>;
|
|
9
|
+
* Executes an NQL query and returns the result.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} nqlQuery - The NQL query to execute.
|
|
12
|
+
* @returns {Promise<object>} A promise that resolves with the result of the NQL query.
|
|
13
|
+
*/
|
|
14
|
+
executeNql(nqlQuery: NqlQuery): Promise<NqlResult>;
|
|
18
15
|
}
|
|
19
|
-
export { NqlApi, type NqlResult };
|
|
16
|
+
export { NqlApi, type NqlResult, type NqlQuery };
|
package/build/nql/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// src/api/NqlApi.ts
|
|
1
2
|
import { BaseApi } from '../base-api';
|
|
2
3
|
/**
|
|
3
4
|
* The name of the resource to be used in API requests.
|
|
@@ -11,23 +12,13 @@ const resourceName = 'nql';
|
|
|
11
12
|
* @extends BaseApi
|
|
12
13
|
*/
|
|
13
14
|
class NqlApi extends BaseApi {
|
|
14
|
-
constructor(config) {
|
|
15
|
-
super({
|
|
16
|
-
...config,
|
|
17
|
-
headers: {
|
|
18
|
-
...config.headers,
|
|
19
|
-
'Content-Type': 'application/vnd.nql'
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
15
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
async executeNql(token, nqlQuery) {
|
|
16
|
+
* Executes an NQL query and returns the result.
|
|
17
|
+
*
|
|
18
|
+
* @param {string} nqlQuery - The NQL query to execute.
|
|
19
|
+
* @returns {Promise<object>} A promise that resolves with the result of the NQL query.
|
|
20
|
+
*/
|
|
21
|
+
async executeNql(nqlQuery) {
|
|
31
22
|
const response = await this.post(resourceName, nqlQuery);
|
|
32
23
|
return response;
|
|
33
24
|
}
|
package/build/nql/types.d.ts
CHANGED