@narrative.io/data-collaboration-sdk-ts 0.0.50 → 0.0.51
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/contracts/index.d.ts +6 -6
- package/build/contracts/types.d.ts +14 -27
- package/build/index.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseApi } from '../base-api';
|
|
2
|
-
import { type
|
|
2
|
+
import { type ContractDetails, type CustomerContract, type PaymentMethod, type ContractRateView } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* A class for accessing the Contracts API.
|
|
5
5
|
* @extends BaseApi
|
|
@@ -10,7 +10,7 @@ declare class ContractsApi extends BaseApi {
|
|
|
10
10
|
*
|
|
11
11
|
* @returns {Promise<CustomerContract[]>} A promise that resolves with the list of contracts.
|
|
12
12
|
*/
|
|
13
|
-
getContracts(): Promise<
|
|
13
|
+
getContracts(): Promise<ContractDetails[]>;
|
|
14
14
|
/**
|
|
15
15
|
* Get a customer contract based on the contract ID
|
|
16
16
|
*
|
|
@@ -18,7 +18,7 @@ declare class ContractsApi extends BaseApi {
|
|
|
18
18
|
* @returns Promise that resolves to the customer contract
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
|
-
getContract(contractId: string): Promise<
|
|
21
|
+
getContract(contractId: string): Promise<ContractDetails>;
|
|
22
22
|
/**
|
|
23
23
|
* Update a customer contract's payment method based on the contract ID
|
|
24
24
|
*
|
|
@@ -27,13 +27,13 @@ declare class ContractsApi extends BaseApi {
|
|
|
27
27
|
* @returns Promise that resolves to the updated customer contract
|
|
28
28
|
*
|
|
29
29
|
*/
|
|
30
|
-
updatePaymentMethod(contractId: string, paymentMethod: PaymentMethod): Promise<
|
|
30
|
+
updatePaymentMethod(contractId: string, paymentMethod: PaymentMethod): Promise<ContractDetails>;
|
|
31
31
|
/**
|
|
32
32
|
* Get the active contract for a company
|
|
33
33
|
*
|
|
34
34
|
* @returns Promise that resolves to the customer contract
|
|
35
35
|
*
|
|
36
36
|
*/
|
|
37
|
-
getActiveContract(): Promise<
|
|
37
|
+
getActiveContract(): Promise<ContractDetails>;
|
|
38
38
|
}
|
|
39
|
-
export { ContractsApi, type
|
|
39
|
+
export { ContractsApi, type ContractDetails, type CustomerContract, type PaymentMethod, type ContractRateView };
|
|
@@ -1,36 +1,24 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface ContractDetails {
|
|
2
2
|
contract?: CustomerContract;
|
|
3
|
-
rates?:
|
|
3
|
+
rates?: ContractRateView[];
|
|
4
4
|
}
|
|
5
5
|
export interface CustomerContract {
|
|
6
|
-
id:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
revision:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
interface CustomerContractId {
|
|
19
|
-
value: string;
|
|
20
|
-
}
|
|
21
|
-
interface Revision {
|
|
22
|
-
value: number;
|
|
6
|
+
id: string;
|
|
7
|
+
company_id: number;
|
|
8
|
+
payment_method: PaymentMethod;
|
|
9
|
+
internal_notes?: string;
|
|
10
|
+
revision: number;
|
|
11
|
+
revision_notes?: string;
|
|
12
|
+
revision_start: string;
|
|
13
|
+
revision_end?: string;
|
|
14
|
+
updated_by: number;
|
|
15
|
+
created_at: string;
|
|
16
|
+
updated_at: string;
|
|
23
17
|
}
|
|
24
18
|
export interface PaymentMethod {
|
|
25
19
|
type: 'credit_card' | 'invoice';
|
|
26
20
|
}
|
|
27
|
-
interface
|
|
28
|
-
value: string;
|
|
29
|
-
}
|
|
30
|
-
interface CompanyId {
|
|
31
|
-
value: string;
|
|
32
|
-
}
|
|
33
|
-
export interface ContractRate {
|
|
21
|
+
export interface ContractRateView {
|
|
34
22
|
rate?: Rate;
|
|
35
23
|
product?: ProductView;
|
|
36
24
|
start_at?: Date;
|
|
@@ -58,4 +46,3 @@ export interface ProductView {
|
|
|
58
46
|
status?: ProductStatus;
|
|
59
47
|
}
|
|
60
48
|
export type ProductStatus = 'active' | 'archived';
|
|
61
|
-
export {};
|
package/build/index.d.ts
CHANGED
|
@@ -19,9 +19,9 @@ import { InstallationsApi, type Installation } from './installations';
|
|
|
19
19
|
import { NqlApi, type NqlCompileResult, type NqlQuery, type NqlResult } from './nql';
|
|
20
20
|
import { DataStreamsApi, type DataStream } from './data-streams';
|
|
21
21
|
import { ForecastApi, type ForecastRequest, type ForecastResponse, type CostForecastRequest, type CostForecastResponse, type JobState } from './forecast';
|
|
22
|
-
import { ContractsApi, type
|
|
22
|
+
import { ContractsApi, type ContractDetails, type CustomerContract, type PaymentMethod, type ContractRateView } from './contracts';
|
|
23
23
|
declare class NarrativeApi extends BaseApi {
|
|
24
24
|
}
|
|
25
25
|
interface NarrativeApi extends BaseApi, HealthCheckApi, DatasetApi, RosettaStoneApi, AttributeApi, PingApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi {
|
|
26
26
|
}
|
|
27
|
-
export { NarrativeApi, AttributeApi, HealthCheckApi, DatasetApi, PingApi, ProductsApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, 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, type NqlCompileResult, type DataStream, type ForecastRequest, type ForecastResponse, type CostForecastRequest, type CostForecastResponse, type JobState, type
|
|
27
|
+
export { NarrativeApi, AttributeApi, HealthCheckApi, DatasetApi, PingApi, ProductsApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, 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, type NqlCompileResult, type DataStream, type ForecastRequest, type ForecastResponse, type CostForecastRequest, type CostForecastResponse, type JobState, type ContractDetails, type CustomerContract, type PaymentMethod, type ContractRateView };
|