Socket
Socket
Sign inDemoInstall

@squared-functions/types

Package Overview
Dependencies
Maintainers
1
Versions
367
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@squared-functions/types - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

62

lib/index.d.ts

@@ -14,2 +14,3 @@ /// <reference path="type.d.ts" />

type FileCompressFormat = "gz" | "br";
type CloudFunctions = "upload";
type FileManagerWriteImageCallback = (data: internal.FileData, output: string, command: string, compress?: squared.CompressFormat, error?: Null<Error>) => void;

@@ -43,20 +44,21 @@ type FileManagerPerformAsyncTaskCallback = () => void;

interface CloudService {
interface CloudService extends ObjectMap<unknown> {
service: string;
settings?: string;
upload?: CloudServiceUpload;
}
interface CloudServiceAction {
active?: boolean;
}
interface CloudServiceUpload extends CloudServiceAction {
filename?: string;
localStorage?: boolean;
uploadAll?: boolean;
filename?: string;
apiEndpoint?: string;
all?: boolean;
publicAccess?: boolean;
settings?: string;
objects?: CloudObject[];
overwrite?: boolean;
[key: string]: Undef<unknown>;
}
interface CloudObject extends Partial<LocationUri> {
keyName: string;
}
interface WatchInterval {

@@ -190,2 +192,16 @@ interval?: number;

namespace Cloud {
interface CloudUploadOptions<T>{
upload: squared.CloudServiceUpload;
credentials: T;
filename: string;
fileUri: string;
mimeType?: string;
}
type CloudServiceClient = (config: squared.CloudService) => boolean;
type CloudServiceHost = (this: IFileManager, credentials: PlainObject, serviceName: string) => CloudUploadCallback;
type CloudUploadCallback = (buffer: Buffer, options: CloudUploadOptions<unknown>, success: (value?: unknown) => void) => void;
}
interface FileData {

@@ -203,18 +219,8 @@ file: ExternalAsset;

namespace external {
interface CloudUploadOptions<T>{
config: squared.CloudService;
credentials: T;
filename: string;
fileUri: string;
mimeType?: string;
namespace Cloud {
interface StorageSharedKeyCredential {
accountName: string;
accountKey: string;
}
}
interface StorageSharedKeyCredential {
accountName: string;
accountKey: string;
}
type CloudServiceClient = (config: squared.CloudService) => boolean;
type CloudServiceHost = (this: IFileManager, config: PlainObject, serviceName: string) => CloudServiceUpload;
type CloudServiceUpload = (buffer: Buffer, success: (value?: unknown) => void, options: CloudUploadOptions<unknown>) => void;
}

@@ -234,3 +240,3 @@

azure?: {
[key: string]: external.StorageSharedKeyCredential;
[key: string]: external.Cloud.StorageSharedKeyCredential;
};

@@ -297,4 +303,4 @@ gcs?: {

settings: settings.CloudModule;
getService(data: Undef<squared.CloudService[]>): Undef<squared.CloudService>;
hasService(data: squared.CloudService): data is squared.CloudService;
getService(data: Undef<squared.CloudService[]>, functionName: CloudFunctions): Undef<squared.CloudService>;
hasService(data: squared.CloudService, functionName: CloudFunctions): squared.CloudServiceAction | false;
}

@@ -301,0 +307,0 @@

{
"name": "@squared-functions/types",
"version": "0.6.1",
"version": "0.6.2",
"description": "Type definitions for squared-functions",

@@ -5,0 +5,0 @@ "types": "lib/index.d.ts",

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