@lucidtech/las-sdk-core
Advanced tools
Comparing version 4.5.0 to 5.0.0
{ | ||
"name": "@lucidtech/las-sdk-core", | ||
"version": "4.5.0", | ||
"version": "5.0.0", | ||
"author": "Lucidtech AS <hello@lucidtech.ai>", | ||
@@ -33,3 +33,3 @@ "maintainers": [ | ||
}, | ||
"gitHead": "406a9bb4756f2c378e790b027edb643704da462c" | ||
"gitHead": "c24286705f455d7452aef3e76f1fdfb7fb25ceb3" | ||
} |
@@ -1018,3 +1018,2 @@ /** | ||
const createAppClientPromise = client.createAppClient(options); | ||
await expect(createAppClientPromise).resolves.toHaveProperty('apiKey'); | ||
await expect(createAppClientPromise).resolves.toHaveProperty('appClientId'); | ||
@@ -1043,3 +1042,2 @@ await expect(createAppClientPromise).resolves.toHaveProperty('callbackUrls'); | ||
const updateAppClientPromise = client.updateAppClient(appClientId, options); | ||
await expect(updateAppClientPromise).resolves.toHaveProperty('apiKey'); | ||
await expect(updateAppClientPromise).resolves.toHaveProperty('appClientId'); | ||
@@ -1063,3 +1061,2 @@ await expect(updateAppClientPromise).resolves.toHaveProperty('callbackUrls'); | ||
const deleteAppClientPromise = client.deleteAppClient(appClientId); | ||
await expect(deleteAppClientPromise).resolves.toHaveProperty('apiKey'); | ||
await expect(deleteAppClientPromise).resolves.toHaveProperty('appClientId'); | ||
@@ -1066,0 +1063,0 @@ await expect(deleteAppClientPromise).resolves.toHaveProperty('callbackUrls'); |
@@ -1039,3 +1039,2 @@ import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'; | ||
return { | ||
'X-Api-Key': this.credentials.apiKey, | ||
Authorization: `Bearer ${accessToken}`, | ||
@@ -1042,0 +1041,0 @@ }; |
@@ -5,7 +5,6 @@ import { TestCredentials, sleep } from './helpers'; | ||
const testEndpoint = 'http://localhost:4010'; | ||
const testApiKey = 'testApiKey'; | ||
const testAccessToken = 'testAccessToken'; | ||
const testExpiresInSeconds = 1; | ||
const testRefreshToken = 'testRefreshToken'; | ||
const credentials = new TestCredentials(testEndpoint, testApiKey, testAccessToken, testExpiresInSeconds, testRefreshToken); | ||
const credentials = new TestCredentials(testEndpoint, testAccessToken, testExpiresInSeconds, testRefreshToken); | ||
jest.spyOn(credentials, 'getToken'); | ||
@@ -12,0 +11,0 @@ |
@@ -9,5 +9,3 @@ import { TokenStorage } from './storage'; | ||
readonly accessToken: string; | ||
readonly expiration: number; | ||
readonly refreshToken?: string; | ||
@@ -40,11 +38,7 @@ | ||
readonly apiKey: string; | ||
protected token?: Token; | ||
protected storage?: TokenStorage<Token>; | ||
protected constructor(apiEndpoint: string, apiKey: string, storage?: TokenStorage<Token>) { | ||
protected constructor(apiEndpoint: string, storage?: TokenStorage<Token>) { | ||
this.apiEndpoint = apiEndpoint; | ||
this.apiKey = apiKey; | ||
this.storage = storage; | ||
@@ -51,0 +45,0 @@ } |
@@ -15,3 +15,2 @@ import { Credentials, Token } from './credentials'; | ||
testEndpoint: string, | ||
testApiKey: string, | ||
testAccessToken: string, | ||
@@ -21,3 +20,3 @@ testExpiresInSeconds: number, | ||
) { | ||
super(testEndpoint, testApiKey); | ||
super(testEndpoint); | ||
@@ -42,8 +41,7 @@ this.testAccessToken = testAccessToken; | ||
export function getTestClient() { | ||
const testApiKey = 'testApiKey'; | ||
const testAccessToken = 'testAccessToken'; | ||
const testExpiresInSeconds = 3600; | ||
const testRefreshToken = 'testRefreshToken'; | ||
const credentials = new TestCredentials(endpoint, testApiKey, testAccessToken, testExpiresInSeconds, testRefreshToken); | ||
const credentials = new TestCredentials(endpoint, testAccessToken, testExpiresInSeconds, testRefreshToken); | ||
return new Client(credentials); | ||
} |
@@ -39,2 +39,15 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
export type TransitionExecutionStatus = 'succeeded' | 'failed' | 'retry' | 'running' | 'rejected'; | ||
export type TransitionExecution = { | ||
executionId: string; | ||
transitionId: string; | ||
input: Record<any, any>; | ||
status: TransitionExecutionStatus; | ||
completedBy: string | null; | ||
startTime: string | null; | ||
endTime: string | null; | ||
logId: string | null; | ||
}; | ||
export type TransitionExecutionList = { | ||
@@ -47,3 +60,3 @@ transitionId: string; | ||
export type TransitionExecutionListOptions = PaginationOptions & { | ||
status?: 'succeeded' | 'failed' | 'retry' | 'running' | 'rejected'; | ||
status?: TransitionExecutionStatus | Array<TransitionExecutionStatus>; | ||
executionId?: string | Array<string>; | ||
@@ -55,3 +68,3 @@ sortBy?: 'startTime' | 'endTime'; | ||
export interface UpdateTransitionExecution { | ||
status: 'succeeded' | 'failed' | 'retry' | 'rejected'; | ||
status: Exclude<TransitionExecutionStatus, 'running'>; | ||
output?: Record<any, any>; | ||
@@ -121,13 +134,2 @@ error?: { message: string }; | ||
export type TransitionExecution = { | ||
executionId: string; | ||
transitionId: string; | ||
input: Record<any, any>; | ||
status: 'succeeded' | 'failed' | 'retry' | 'running' | 'rejected'; | ||
completedBy: string | null; | ||
startTime: string | null; | ||
endTime: string | null; | ||
logId: string | null; | ||
}; | ||
export type WorkflowSpecification = { | ||
@@ -454,3 +456,2 @@ definition: object; | ||
export type AppClient = { | ||
apiKey: string; | ||
appClientId: string; | ||
@@ -467,2 +468,3 @@ callbackUrls: Array<string> | null; | ||
name: string | null; | ||
updatedTime: string | null; | ||
}; | ||
@@ -552,3 +554,2 @@ | ||
export type AuthorizationHeaders = { | ||
'X-Api-Key': string; | ||
Authorization: string; | ||
@@ -555,0 +556,0 @@ }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
125713
14
2675