Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ozone-typescript-client

Package Overview
Dependencies
Maintainers
8
Versions
153
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ozone-typescript-client - npm Package Compare versions

Comparing version 6.1.0 to 6.1.2

14

dist/src/ozoneClient/ozoneClient.d.ts
import type { Logger } from 'generic-logger-typings';
import { StateMachine, ListenerRegistration } from 'typescript-state-machine';
import type { Filter, InstalledFilter, Request, Response } from 'typescript-http-client';
import { DeviceMessage, Item } from 'ozone-type';
import { DeviceMessage, Item, Principal, User, UUID } from 'ozone-type';
import { ClientState } from './clientState';

@@ -29,2 +29,9 @@ import { ItemClient } from '../itemClient/itemClient';

}
export declare type AuthenticatedPrincipal = ((User & {
tenantId: UUID;
}) | (Principal & {
tenant: UUID;
})) & {
id: UUID;
};
export interface OzoneClient extends StateMachine<ClientState> {

@@ -41,2 +48,7 @@ readonly config: ClientConfiguration;

updateCredentials(ozoneCredentials: OzoneCredentials): void;
/**
* Retrieve the principal this client has authenticated with
* @throws if client is not authenticated
*/
currentPrincipal(): Promise<AuthenticatedPrincipal>;
stop(): Promise<void>;

@@ -43,0 +55,0 @@ callForResponse<T>(request: Request): Promise<Response<T>>;

3

dist/src/ozoneClient/ozoneClientImpl.d.ts

@@ -11,3 +11,3 @@ import type { Logger } from 'generic-logger-typings';

import { TypeClient } from '../typeClient/typeClient';
import { OzoneClient, OzoneCredentials, AuthInfo, ClientConfiguration } from './ozoneClient';
import { OzoneClient, OzoneCredentials, AuthInfo, ClientConfiguration, AuthenticatedPrincipal } from './ozoneClient';
import { TaskClient } from '../taskClient/taskClient';

@@ -44,2 +44,3 @@ import { ImportExportClient } from '../importExportClient/importExportClient';

updateCredentials(credentials: OzoneCredentials): void;
currentPrincipal(): Promise<AuthenticatedPrincipal>;
stop(): Promise<void>;

@@ -46,0 +47,0 @@ call<T>(call: Request): Promise<T>;

@@ -141,2 +141,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

}
currentPrincipal() {
if (!this.isAuthenticated) {
throw Error('Cannot retrieve principal: client is not authenticated.');
}
const request = new Request(`${this.config.ozoneURL}/rest/v3/authentication/current/principal`)
.set({
method: 'GET',
withCredentials: true
});
return this.call(request);
}
stop() {

@@ -143,0 +154,0 @@ return __awaiter(this, void 0, void 0, function* () {

{
"name": "ozone-typescript-client",
"version": "6.1.0",
"version": "6.1.2",
"description": "",

@@ -38,3 +38,3 @@ "main": "dist/src/index.js",

},
"gitHead": "a723ead1ef0f5b31a3a055f10366be78dc4cd3b4"
"gitHead": "d9d26ea781f7fcb7ad5e515ea0a2d66708520482"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc