@attlaz/client 1.81.0 → 1.82.0

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/dist/Client.js CHANGED
@@ -83,7 +83,9 @@ export class Client {
83
83
  }
84
84
  const options = new OAuthClientOptions(this.apiEndpoint);
85
85
  this.httpClient = new OAuthClient(options);
86
- if (token !== null) {
86
+ // An empty string is not a token treat it as "no token" so callers like `new Client('')`
87
+ // (public/credentials clients that set the real token later) don't carry a bogus empty token.
88
+ if (token !== null && token !== '') {
87
89
  const clientToken = new OAuthClientToken(token, 'Bearer', '', '');
88
90
  this.httpClient.setToken(clientToken);
89
91
  }
@@ -1,5 +1,6 @@
1
- import { StateAware } from '../StateAware.js';
1
+ import { ApiRecord } from '../ApiRecord.js';
2
2
  import { State } from '../State.js';
3
+ import { StateAware } from '../StateAware.js';
3
4
  export declare class UserAccessToken implements StateAware {
4
5
  id: string;
5
6
  userId: string;
@@ -11,5 +12,5 @@ export declare class UserAccessToken implements StateAware {
11
12
  lastUsedAt: Date | null;
12
13
  expiresAt: Date | null;
13
14
  state: State;
14
- static parse(rawUser: any): UserAccessToken;
15
+ static parse(rawUser: ApiRecord): UserAccessToken;
15
16
  }
@@ -1,5 +1,5 @@
1
- import { State } from '../State.js';
2
1
  import { Utils } from '../../Utils.js';
2
+ import { State } from '../State.js';
3
3
  export class UserAccessToken {
4
4
  id;
5
5
  userId;
@@ -1,6 +1,7 @@
1
+ import { ApiRecord } from '../ApiRecord.js';
1
2
  export declare class AdapterCategory {
2
3
  id: string;
3
4
  slug: string;
4
5
  name: string;
5
- static parse(rawAdapterCategory: any): AdapterCategory;
6
+ static parse(rawAdapterCategory: ApiRecord): AdapterCategory;
6
7
  }
@@ -1,4 +1,5 @@
1
1
  import { DataValueValue } from '../DataValue.js';
2
+ import { ApiRecord } from '../ApiRecord.js';
2
3
  export declare class AdapterConfiguration {
3
4
  id: string;
4
5
  key: string;
@@ -8,5 +9,5 @@ export declare class AdapterConfiguration {
8
9
  description: string;
9
10
  default: DataValueValue | null;
10
11
  validation: string[];
11
- static parse(rawAdapterConfiguration: any): AdapterConfiguration;
12
+ static parse(rawAdapterConfiguration: ApiRecord): AdapterConfiguration;
12
13
  }
@@ -1,9 +1,10 @@
1
1
  import { DataValueCollection } from '../DataValueCollection.js';
2
+ import { ApiRecord } from '../ApiRecord.js';
2
3
  export declare class AdapterConnectionEvent {
3
4
  id: string;
4
5
  adapterConnection: string;
5
6
  type: string;
6
7
  time: Date;
7
8
  data: DataValueCollection;
8
- static parse(rawAdapterConnection: any): AdapterConnectionEvent;
9
+ static parse(rawAdapterConnection: ApiRecord): AdapterConnectionEvent;
9
10
  }
@@ -1,5 +1,6 @@
1
- import { DataValueValue } from './DataValue.js';
2
- export type ApiRecord = Record<string, string | number | boolean | Date | {
3
- key: string;
4
- value: DataValueValue;
5
- }[] | null>;
1
+ export type ApiValue = string | number | boolean | Date | null | ApiValue[] | {
2
+ [key: string]: ApiValue;
3
+ };
4
+ export type ApiRecord = {
5
+ [key: string]: ApiValue;
6
+ };
@@ -1,4 +1,5 @@
1
1
  import { State } from './State.js';
2
+ import { ApiRecord } from './ApiRecord.js';
2
3
  /**
3
4
  * @deprecated
4
5
  */
@@ -13,5 +14,5 @@ export declare class Config {
13
14
  inheritable: boolean;
14
15
  sensitive: boolean;
15
16
  state: State;
16
- static parse(rawConfig: Record<string, any>): Config;
17
+ static parse(rawConfig: ApiRecord): Config;
17
18
  }
@@ -1,3 +1,4 @@
1
+ import { ApiRecord } from '../ApiRecord.js';
1
2
  export declare class FlowRunStats {
2
3
  flowRunId: string;
3
4
  time: Date;
@@ -9,5 +10,5 @@ export declare class FlowRunStats {
9
10
  networkInbound: number | null;
10
11
  fileRead: number | null;
11
12
  fileWrite: number | null;
12
- static parse(raw: any): FlowRunStats;
13
+ static parse(raw: ApiRecord): FlowRunStats;
13
14
  }
@@ -1,5 +1,6 @@
1
1
  import { FlowRunStatus } from './FlowRunStatus.js';
2
2
  import { FlowRun } from './FlowRun.js';
3
+ import { ApiRecord } from '../ApiRecord.js';
3
4
  export declare class FlowRunSummary extends FlowRun {
4
5
  time: Date;
5
6
  runDuration: number;
@@ -13,5 +14,5 @@ export declare class FlowRunSummary extends FlowRun {
13
14
  cpuMaximum: number | null;
14
15
  memoryAverage: number | null;
15
16
  memoryMaximum: number | null;
16
- static parse(rawFlowRunSummary: any): FlowRunSummary;
17
+ static parse(rawFlowRunSummary: ApiRecord): FlowRunSummary;
17
18
  }
@@ -1,3 +1,4 @@
1
+ import { ApiRecord } from '../ApiRecord.js';
1
2
  import { Flow } from './Flow.js';
2
3
  import { FlowRunStatus } from './FlowRunStatus.js';
3
4
  export declare class FlowSummary extends Flow {
@@ -7,5 +8,5 @@ export declare class FlowSummary extends Flow {
7
8
  averageRunDuration: number | null;
8
9
  averagePendingDuration: number | null;
9
10
  runCount: number;
10
- static parse(rawFlowSummary: any): FlowSummary;
11
+ static parse(rawFlowSummary: ApiRecord): FlowSummary;
11
12
  }
@@ -1,3 +1,4 @@
1
+ import { ApiRecord } from '../ApiRecord.js';
1
2
  import { DataValueCollection } from '../DataValueCollection.js';
2
3
  import { HealthAlertSeverity } from './HealthAlertSeverity.js';
3
4
  import { HealthAlertStatus } from './HealthAlertStatus.js';
@@ -13,5 +14,5 @@ export declare class HealthAlert {
13
14
  updated: Date;
14
15
  data: DataValueCollection;
15
16
  constructor(healthTestType: HealthTestType, status: HealthAlertStatus);
16
- static parse(raw: any): HealthAlert;
17
+ static parse(raw: ApiRecord): HealthAlert;
17
18
  }
@@ -1,3 +1,4 @@
1
+ import { ApiRecord } from '../ApiRecord.js';
1
2
  export declare class InboxMessage {
2
3
  id: string;
3
4
  userId: string;
@@ -6,5 +7,5 @@ export declare class InboxMessage {
6
7
  body: string;
7
8
  time: Date;
8
9
  acknowledged: boolean;
9
- static parse(rawNotification: any): InboxMessage;
10
+ static parse(rawNotification: ApiRecord): InboxMessage;
10
11
  }
@@ -1,3 +1,4 @@
1
+ import { ApiRecord } from '../ApiRecord.js';
1
2
  import { State } from '../State.js';
2
3
  export declare class RunnerPool {
3
4
  id: string;
@@ -8,7 +9,7 @@ export declare class RunnerPool {
8
9
  type: QueueSpecificationType;
9
10
  configuration: RunnerPoolConfiguration;
10
11
  state: State;
11
- static parse(raw: any): RunnerPool;
12
+ static parse(raw: ApiRecord): RunnerPool;
12
13
  /**
13
14
  * Coerce a raw wire value into a ResolvedValue<T> envelope. Accepts `{value, source}`
14
15
  * as-is; falls back to `{value: defaultValue, source: null}` when the input is null,
@@ -1,3 +1,4 @@
1
+ import { ApiRecord } from '../ApiRecord.js';
1
2
  import { DataValueCollection } from '../DataValueCollection.js';
2
3
  import { LogLevel } from './LogLevel.js';
3
4
  import { LogStatus } from './LogStatus.js';
@@ -13,5 +14,5 @@ export declare class Log {
13
14
  tags: DataValueCollection;
14
15
  _version: string;
15
16
  constructor(logStream: LogStreamId, message: string, level: LogLevel, date: Date);
16
- static parse(rawLog: any): Log;
17
+ static parse(rawLog: ApiRecord): Log;
17
18
  }
@@ -1,4 +1,5 @@
1
1
  import { LogLevel } from './LogLevel.js';
2
+ import { ApiRecord } from '../ApiRecord.js';
2
3
  import { DataValueValue } from '../DataValue.js';
3
4
  import { LogStreamId } from './LogStreamId.js';
4
5
  export declare class LogStreamInformation {
@@ -14,5 +15,5 @@ export declare class LogStreamInformation {
14
15
  count: number;
15
16
  }[];
16
17
  }[];
17
- static parse(raw: any): LogStreamInformation;
18
+ static parse(raw: ApiRecord): LogStreamInformation;
18
19
  }
@@ -2,6 +2,7 @@ import { State } from '../../State.js';
2
2
  import { StateAware } from '../../StateAware.js';
3
3
  import { MetaDataAware } from '../../../Core/MetaDataAware.js';
4
4
  import { ChannelType } from './ChannelType.js';
5
+ import { ApiRecord } from '../../ApiRecord.js';
5
6
  export declare class Channel extends MetaDataAware implements StateAware {
6
7
  id: string;
7
8
  ownerId: string;
@@ -12,5 +13,5 @@ export declare class Channel extends MetaDataAware implements StateAware {
12
13
  isPrivate: boolean;
13
14
  singleUse: boolean;
14
15
  constructor(id: string, ownerId: string, name: string, type: ChannelType, data: any);
15
- static parse(rawChannel: Record<string, unknown>): Channel;
16
+ static parse(rawChannel: ApiRecord): Channel;
16
17
  }
@@ -1,3 +1,4 @@
1
+ import { ApiRecord } from '../ApiRecord.js';
1
2
  export declare class ChannelHistory {
2
3
  id: string;
3
4
  subscriberId: string;
@@ -6,5 +7,5 @@ export declare class ChannelHistory {
6
7
  message: unknown;
7
8
  result: unknown;
8
9
  status: string;
9
- static parse(rawChannelHistory: Record<string, unknown>): ChannelHistory;
10
+ static parse(rawChannelHistory: ApiRecord): ChannelHistory;
10
11
  }
@@ -1,5 +1,6 @@
1
1
  import { State } from '../State.js';
2
2
  import { StateAware } from '../StateAware.js';
3
+ import { ApiRecord } from '../ApiRecord.js';
3
4
  export declare class PlatformLanguage implements StateAware {
4
5
  id: string;
5
6
  key: string;
@@ -7,5 +8,5 @@ export declare class PlatformLanguage implements StateAware {
7
8
  description: string;
8
9
  state: State;
9
10
  constructor(id: string, name: string);
10
- static parse(rawLanguage: Record<string, unknown>): PlatformLanguage;
11
+ static parse(rawLanguage: ApiRecord): PlatformLanguage;
11
12
  }
@@ -1,5 +1,6 @@
1
1
  import { Adapter } from '../Adapter/Adapter.js';
2
2
  import { AdapterConnection } from '../Adapter/AdapterConnection.js';
3
+ import { ApiRecord } from '../ApiRecord.js';
3
4
  import { CodeSource } from '../Deployment/CodeSource.js';
4
5
  import { CodeSourceAccount } from '../Deployment/CodeSourceAccount.js';
5
6
  import { EntityType } from '../EntityType.js';
@@ -19,5 +20,5 @@ export declare class SearchResult {
19
20
  description: string;
20
21
  entity: Workspace | WorkspaceMember | Project | ProjectEnvironment | Flow | FlowRun | Trigger | Channel | Subscriber | Adapter | AdapterConnection | CodeSourceAccount | CodeSource | CodeDeploy;
21
22
  score: number;
22
- static parse(rawResult: Record<string, unknown>): SearchResult;
23
+ static parse(rawResult: ApiRecord): SearchResult;
23
24
  }
@@ -1,3 +1,4 @@
1
+ import { ApiRecord } from '../ApiRecord.js';
1
2
  export declare class StorageItem {
2
3
  key: string;
3
4
  bytes: number;
@@ -5,5 +6,5 @@ export declare class StorageItem {
5
6
  updated: Date | null;
6
7
  expiration: Date | null;
7
8
  value: string | number | boolean | null | any;
8
- static parse(raw: any): StorageItem;
9
+ static parse(raw: ApiRecord): StorageItem;
9
10
  }
@@ -1,8 +1,9 @@
1
+ import { ApiRecord } from '../ApiRecord.js';
1
2
  export declare class StorageItemInformation {
2
3
  key: string;
3
4
  bytes: number;
4
5
  created: Date | null;
5
6
  updated: Date | null;
6
7
  expiration: Date | null;
7
- static parse(raw: Record<string, unknown>): StorageItemInformation;
8
+ static parse(raw: ApiRecord): StorageItemInformation;
8
9
  }
@@ -1,5 +1,6 @@
1
1
  import { StateAware } from '../StateAware.js';
2
2
  import { State } from '../State.js';
3
+ import { ApiRecord } from '../ApiRecord.js';
3
4
  export declare class User implements StateAware {
4
5
  id: string;
5
6
  name: string;
@@ -14,5 +15,5 @@ export declare class User implements StateAware {
14
15
  number_format: string | null;
15
16
  picture: string;
16
17
  state: State;
17
- static parse(rawUser: any): User;
18
+ static parse(rawUser: ApiRecord): User;
18
19
  }
@@ -1,5 +1,6 @@
1
1
  import { State } from '../State.js';
2
2
  import { StateAware } from '../StateAware.js';
3
+ import { ApiRecord } from '../ApiRecord.js';
3
4
  export declare class UserAuthProvider implements StateAware {
4
5
  id: string;
5
6
  userId: string;
@@ -8,5 +9,5 @@ export declare class UserAuthProvider implements StateAware {
8
9
  providerUserEmail: string;
9
10
  lastUsed: Date | null;
10
11
  state: State;
11
- static parse(raw: any): UserAuthProvider;
12
+ static parse(raw: ApiRecord): UserAuthProvider;
12
13
  }
@@ -1,5 +1,6 @@
1
1
  import { State } from '../State.js';
2
2
  import { StateAware } from '../StateAware.js';
3
+ import { ApiRecord } from '../ApiRecord.js';
3
4
  export declare class Platform implements StateAware {
4
5
  id: string;
5
6
  name: string;
@@ -9,5 +10,5 @@ export declare class Platform implements StateAware {
9
10
  endOfLife: Date;
10
11
  activeImage: string | null;
11
12
  state: State;
12
- static parse(raw: any): Platform;
13
+ static parse(raw: ApiRecord): Platform;
13
14
  }
@@ -1,5 +1,6 @@
1
1
  import { State } from '../State.js';
2
2
  import { StateAware } from '../StateAware.js';
3
+ import { ApiRecord } from '../ApiRecord.js';
3
4
  export declare class PlatformImage implements StateAware {
4
5
  id: string;
5
6
  platformId: string;
@@ -9,5 +10,5 @@ export declare class PlatformImage implements StateAware {
9
10
  languageVersion: string;
10
11
  buildDate: Date;
11
12
  state: State;
12
- static parse(raw: any): PlatformImage;
13
+ static parse(raw: ApiRecord): PlatformImage;
13
14
  }
@@ -1,4 +1,5 @@
1
1
  import { WorkspaceMemberInviteState } from './WorkspaceMemberInviteState.js';
2
+ import { ApiRecord } from '../ApiRecord.js';
2
3
  export declare class WorkspaceMemberInvite2 {
3
4
  code: string;
4
5
  email: string | null;
@@ -6,5 +7,5 @@ export declare class WorkspaceMemberInvite2 {
6
7
  inviterEmail: string | null;
7
8
  workspaceName: string | null;
8
9
  state: WorkspaceMemberInviteState;
9
- static parse(rawInvite: any): WorkspaceMemberInvite2;
10
+ static parse(rawInvite: ApiRecord): WorkspaceMemberInvite2;
10
11
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.80.0";
1
+ export declare const VERSION = "1.82.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.80.0";
1
+ export const VERSION = "1.82.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@attlaz/client",
3
- "version": "1.81.0",
3
+ "version": "1.82.0",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",