@narrative.io/data-collaboration-sdk-ts 0.0.80 → 0.0.81
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,5 +1,5 @@
|
|
|
1
1
|
import { BaseApi } from '../base-api';
|
|
2
|
-
import { type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, type ApiToken, type UserRole, type RegistrationStatus, type RegistrationStatusRequest } from './types';
|
|
2
|
+
import { type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, type ApiToken, type UserRole, type RegistrationStatus, type RegistrationStatusRequest, type RegistrationStatusResponse } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* A class for accessing the Authentication API
|
|
5
5
|
* @extends BaseApi
|
|
@@ -23,8 +23,8 @@ declare class AuthenticationApi extends BaseApi {
|
|
|
23
23
|
* Checks the resgistration status of a user.
|
|
24
24
|
*
|
|
25
25
|
* @param {RegistrationStatusRequest} statusRewquest - request payload of user login for whom to check status.
|
|
26
|
-
* @returns {Promise<
|
|
26
|
+
* @returns {Promise<RegistrationStatusResponse>} - A promise that resolves to the response.
|
|
27
27
|
*/
|
|
28
|
-
checkRegistrationStatus(statusRequest: RegistrationStatusRequest): Promise<
|
|
28
|
+
checkRegistrationStatus(statusRequest: RegistrationStatusRequest): Promise<RegistrationStatusResponse>;
|
|
29
29
|
}
|
|
30
|
-
export { type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, type ApiToken, type UserRole, type RegistrationStatus, type RegistrationStatusRequest, AuthenticationApi };
|
|
30
|
+
export { type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, type ApiToken, type UserRole, type RegistrationStatus, type RegistrationStatusRequest, type RegistrationStatusResponse, AuthenticationApi };
|
|
@@ -33,7 +33,7 @@ class AuthenticationApi extends BaseApi {
|
|
|
33
33
|
* Checks the resgistration status of a user.
|
|
34
34
|
*
|
|
35
35
|
* @param {RegistrationStatusRequest} statusRewquest - request payload of user login for whom to check status.
|
|
36
|
-
* @returns {Promise<
|
|
36
|
+
* @returns {Promise<RegistrationStatusResponse>} - A promise that resolves to the response.
|
|
37
37
|
*/
|
|
38
38
|
async checkRegistrationStatus(statusRequest) {
|
|
39
39
|
return await this.post(`${resourceName}/registration-status`, statusRequest);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export interface LoginRequest {
|
|
2
|
-
|
|
3
|
-
session_duration_minutes?: number;
|
|
2
|
+
stytch_session_token: string;
|
|
4
3
|
}
|
|
5
4
|
export interface LoginResponse {
|
|
6
5
|
user: {
|
|
@@ -13,8 +12,6 @@ export interface LoginResponse {
|
|
|
13
12
|
};
|
|
14
13
|
api_token: ApiToken;
|
|
15
14
|
legacy_token: string;
|
|
16
|
-
stytch_session_token: string;
|
|
17
|
-
stytch_session_jwt: string;
|
|
18
15
|
}
|
|
19
16
|
export interface ApiToken {
|
|
20
17
|
access_token: string;
|
|
@@ -23,7 +20,7 @@ export interface ApiToken {
|
|
|
23
20
|
refresh_token_expires_in: number;
|
|
24
21
|
}
|
|
25
22
|
export interface RegisterRequest {
|
|
26
|
-
|
|
23
|
+
stytch_session_token: string;
|
|
27
24
|
name?: string;
|
|
28
25
|
company_name: string;
|
|
29
26
|
}
|
|
@@ -45,5 +42,11 @@ export interface StytchToken {
|
|
|
45
42
|
export type UserRole = 'global_admin' | 'partner_admin' | 'partner_user';
|
|
46
43
|
export interface RegistrationStatusRequest {
|
|
47
44
|
stytch_token: StytchToken;
|
|
45
|
+
session_duration_minutes?: number;
|
|
46
|
+
}
|
|
47
|
+
export interface RegistrationStatusResponse {
|
|
48
|
+
status: RegistrationStatus;
|
|
49
|
+
stytch_session_token: string;
|
|
50
|
+
stytch_session_jwt: string;
|
|
48
51
|
}
|
|
49
52
|
export type RegistrationStatus = 'complete' | 'pending';
|
package/build/index.d.ts
CHANGED
|
@@ -22,11 +22,11 @@ import { ForecastApi, type ForecastRequest, type ForecastResponse, type CostFore
|
|
|
22
22
|
import { ContractsApi, type ContractDetails, type CustomerContract, type PaymentMethod, type ContractRateView } from './contracts';
|
|
23
23
|
import { getNqlObject, buildNql } from './nql/NQLParser';
|
|
24
24
|
import { convertNqlObjectToForecastBody } from './nql/DataRulesConverter';
|
|
25
|
-
import { AuthenticationApi, type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, type ApiToken, type UserRole, type RegistrationStatus, type RegistrationStatusRequest } from './authentication';
|
|
25
|
+
import { AuthenticationApi, type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, type ApiToken, type UserRole, type RegistrationStatus, type RegistrationStatusRequest, type RegistrationStatusResponse } from './authentication';
|
|
26
26
|
import { AppsApi, type App } from './apps';
|
|
27
27
|
import type { ForecastBody } from './nql/types';
|
|
28
28
|
declare class NarrativeApi extends BaseApi {
|
|
29
29
|
}
|
|
30
30
|
interface NarrativeApi extends BaseApi, HealthCheckApi, DatasetApi, RosettaStoneApi, AttributeApi, PingApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi {
|
|
31
31
|
}
|
|
32
|
-
export { NarrativeApi, AttributeApi, HealthCheckApi, DatasetApi, PingApi, ProductsApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi, AppsApi, type App, type Resource, type UploadsResponse, type PingStatus, type Attribute, type RefAttribute, type SubAttribute, 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 Nql, type NqlField, type NqlResult, type NqlQueryInput, type NqlCompileResult, type NqlExpression, type NqlWhere, type NqlFilterExpression, type NqlBooleanExpression, type NqlFilterBinaryExpression, type NqlFilterUnaryExpression, type DataStream, type ForecastRequest, type ForecastResponse, type CostForecastRequest, type CostForecastResponse, type JobState, type ContractDetails, type CustomerContract, type PaymentMethod, type ContractRateView, type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, type ApiToken, type UserRole, type RegistrationStatus, type RegistrationStatusRequest, getNqlObject, buildNql, convertNqlObjectToForecastBody, type ForecastBody };
|
|
32
|
+
export { NarrativeApi, AttributeApi, HealthCheckApi, DatasetApi, PingApi, ProductsApi, CompanyInfoApi, InstallationsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi, AppsApi, type App, type Resource, type UploadsResponse, type PingStatus, type Attribute, type RefAttribute, type SubAttribute, 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 Nql, type NqlField, type NqlResult, type NqlQueryInput, type NqlCompileResult, type NqlExpression, type NqlWhere, type NqlFilterExpression, type NqlBooleanExpression, type NqlFilterBinaryExpression, type NqlFilterUnaryExpression, type DataStream, type ForecastRequest, type ForecastResponse, type CostForecastRequest, type CostForecastResponse, type JobState, type ContractDetails, type CustomerContract, type PaymentMethod, type ContractRateView, type LoginRequest, type LoginResponse, type RegisterRequest, type RegisterResponse, type LoggedInUser, type StytchToken, type ApiToken, type UserRole, type RegistrationStatus, type RegistrationStatusRequest, type RegistrationStatusResponse, getNqlObject, buildNql, convertNqlObjectToForecastBody, type ForecastBody };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narrative.io/data-collaboration-sdk-ts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.81",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"repository": "github:narrative-io/data-collaboration-sdk-ts",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -20,28 +20,25 @@
|
|
|
20
20
|
"author": "",
|
|
21
21
|
"license": "ISC",
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@babel/core": "^7.
|
|
24
|
-
"@babel/preset-env": "^7.
|
|
23
|
+
"@babel/core": "^7.22.5",
|
|
24
|
+
"@babel/preset-env": "^7.22.5",
|
|
25
25
|
"@babel/preset-typescript": "^7.18.6",
|
|
26
26
|
"@commitlint/cli": "^17.4.2",
|
|
27
27
|
"@commitlint/config-conventional": "^17.4.2",
|
|
28
28
|
"@types/jest": "^29.5.0",
|
|
29
|
-
"@typescript-eslint/eslint-plugin": "^5.51.0",
|
|
30
29
|
"babel-jest": "^29.4.3",
|
|
31
|
-
"eslint": "^
|
|
32
|
-
"eslint-config-standard-with-typescript": "^35.0.0",
|
|
33
|
-
"eslint-plugin-import": "^2.27.5",
|
|
34
|
-
"eslint-plugin-n": "^15.7.0",
|
|
35
|
-
"eslint-plugin-promise": "^6.1.1",
|
|
30
|
+
"eslint-config-standard-with-typescript": "^36.0.0",
|
|
36
31
|
"husky": "^8.0.0",
|
|
37
32
|
"jest": "^29.4.3",
|
|
38
|
-
"ts-jest": "^29.0.5"
|
|
39
|
-
"typescript": "^5.0.2"
|
|
33
|
+
"ts-jest": "^29.0.5"
|
|
40
34
|
},
|
|
41
35
|
"dependencies": {
|
|
42
36
|
"mande": "^2.0.3",
|
|
43
37
|
"zod": "^3.21.4"
|
|
44
38
|
},
|
|
39
|
+
"overrides": {
|
|
40
|
+
"semver@<7.5.2": "7.5.2"
|
|
41
|
+
},
|
|
45
42
|
"files": [
|
|
46
43
|
"build"
|
|
47
44
|
]
|