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

clubhouse-lib

Package Overview
Dependencies
Maintainers
9
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clubhouse-lib - npm Package Compare versions

Comparing version 0.10.0 to 0.11.0-rc.0

2

lib/client_error.js

@@ -6,3 +6,3 @@ "use strict";

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -9,0 +9,0 @@ };

import { RequestPerformer } from './types';
declare class FetchRequestPerformer implements RequestPerformer<Request, Response> {
readonly performRequest: typeof fetch;
readonly performRequest: typeof globalThis.fetch;
}
export default FetchRequestPerformer;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require('fetch-everywhere');
var cross_fetch_1 = require("cross-fetch");
var FetchRequestPerformer = /** @class */ (function () {
function FetchRequestPerformer() {
this.performRequest = fetch;
this.performRequest = cross_fetch_1.default;
}

@@ -8,0 +8,0 @@ return FetchRequestPerformer;

@@ -18,3 +18,3 @@ import { Comment, CreateTaskParams, CurrentMember, Epic, EpicChange, File, FileChange, ID, Iteration, IterationChange, Label, LinkedFile, LinkedFileChange, Member, Project, ProjectChange, RequestFactory, RequestPerformer, ResponseParser, Story, StoryChange, StoryLink, StoryLinkChange, StorySearchResult, Task, Team, UpdateTaskParams, Workflow } from './types';

static create(token: string, config?: ClientConfig): Client<RequestInfo, Response>;
listResource<T>(uri: string): Promise<Array<T>>;
listResource<T>(uri: string, params?: Record<string, any> | null | undefined): Promise<Array<T>>;
getResource<T>(uri: string, params?: Record<string, any> | null | undefined): Promise<T>;

@@ -41,3 +41,3 @@ createResource<T>(uri: string, params: Record<string, any>): Promise<T>;

/** */
deleteProject(id: ID): Promise<{}>;
deleteProject(id: ID): Promise<Record<string, unknown>>;
/** */

@@ -52,3 +52,3 @@ listEpics(): Promise<Array<Epic>>;

/** */
deleteEpic(epicID: ID): Promise<{}>;
deleteEpic(epicID: ID): Promise<Record<string, unknown>>;
/** */

@@ -59,3 +59,3 @@ addReaction(storyId: ID, commentId: ID, emoji: string): Promise<void>;

/** */
listStories(projectID: ID): Promise<Array<Story>>;
listStories(projectID: ID, includesDescription?: boolean): Promise<Array<Story>>;
/** */

@@ -70,7 +70,7 @@ searchStories(query: string, pageSize?: number): Promise<StorySearchResult>;

/** */
deleteStory(storyID: ID): Promise<{}>;
deleteStory(storyID: ID): Promise<Record<string, unknown>>;
/** */
createStoryComment(storyID: ID, text: string): Promise<Comment>;
/** */
deleteStoryComment(storyID: ID, commentID: ID): Promise<{}>;
deleteStoryComment(storyID: ID, commentID: ID): Promise<Record<string, unknown>>;
/** */

@@ -87,3 +87,3 @@ updateStoryComment(storyID: ID, commentID: ID, text: string): Promise<Comment>;

/** */
deleteTask(storyID: ID, taskID: ID): Promise<{}>;
deleteTask(storyID: ID, taskID: ID): Promise<Record<string, unknown>>;
/** */

@@ -96,3 +96,3 @@ listWorkflows(): Promise<Array<Workflow>>;

/** */
deleteStoryLink(storyLinkID: ID): Promise<{}>;
deleteStoryLink(storyLinkID: ID): Promise<Record<string, unknown>>;
/** */

@@ -103,3 +103,3 @@ listFiles(): Promise<Array<File>>;

/** */
deleteFile(fileID: ID): Promise<{}>;
deleteFile(fileID: ID): Promise<Record<string, unknown>>;
/** */

@@ -112,3 +112,3 @@ listLinkedFiles(): Promise<Array<LinkedFile>>;

/** */
deleteLinkedFile(linkedFileID: ID): Promise<{}>;
deleteLinkedFile(linkedFileID: ID): Promise<Record<string, unknown>>;
/** */

@@ -131,4 +131,4 @@ createLabel(name: string, color: string): Promise<any>;

/** */
deleteIteration(iterationID: ID): Promise<{}>;
deleteIteration(iterationID: ID): Promise<Record<string, unknown>>;
}
export default Client;

@@ -13,2 +13,12 @@ "use strict";

};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -18,2 +28,3 @@ var TokenRequestFactory_1 = require("./TokenRequestFactory");

var FetchRequestParser_1 = require("./FetchRequestParser");
__exportStar(require("./types"), exports);
var API_BASE_URL = 'https://api.clubhouse.io';

@@ -40,7 +51,4 @@ var API_VERSION = 'v3';

};
Client.prototype.listResource = function (uri) {
var request = this.requestFactory.createRequest(uri);
return this.requestPerformer
.performRequest(request)
.then(this.responseParser.parseResponse);
Client.prototype.listResource = function (uri, params) {
return this.getResource(uri, params);
};

@@ -142,4 +150,6 @@ Client.prototype.getResource = function (uri, params) {

/** */
Client.prototype.listStories = function (projectID) {
return this.listResource("projects/" + projectID + "/stories");
Client.prototype.listStories = function (projectID, includesDescription) {
return this.listResource("projects/" + projectID + "/stories", {
includes_description: Boolean(includesDescription),
});
};

@@ -146,0 +156,0 @@ /** */

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var cross_fetch_1 = require("cross-fetch");
var universal_url_1 = require("universal-url");
require('fetch-everywhere');
var TokenRequestFactory = /** @class */ (function () {

@@ -32,3 +32,3 @@ function TokenRequestFactory(token, baseURL, version) {

}
return new Request(url.toString(), {
return new cross_fetch_1.Request(url.toString(), {
headers: headers,

@@ -38,3 +38,3 @@ method: method,

}
return new Request(url.toString(), {
return new cross_fetch_1.Request(url.toString(), {
body: JSON.stringify(body),

@@ -41,0 +41,0 @@ headers: headers,

@@ -43,2 +43,6 @@ export declare type ID = string | number;

};
export interface Workspace2 {
estimate_scale: number[];
url_slug: string;
}
export interface CurrentMember {

@@ -50,6 +54,6 @@ id: string;

}
export interface Workspace2 {
estimate_scale: number[];
url_slug: string;
}
export declare type ProjectStats = {
num_points: number;
num_stories: number;
};
export declare type Project = {

@@ -74,6 +78,2 @@ abbreviation: string | null;

};
export declare type ProjectStats = {
num_points: number;
num_stories: number;
};
export declare type ProjectChange = {

@@ -101,2 +101,12 @@ name?: string;

export declare type UpdateLabelParams = Partial<CreateLabelParams>;
export declare type LabelStats = {
num_epics: number;
num_points_completed: number;
num_points_in_progress: number;
num_points_total: number;
num_stories_completed: number;
num_stories_in_progress: number;
num_stories_total: number;
num_stories_unestimated: number;
};
export declare type Label = {

@@ -114,12 +124,2 @@ archived: boolean;

};
export declare type LabelStats = {
num_epics: number;
num_points_completed: number;
num_points_in_progress: number;
num_points_total: number;
num_stories_completed: number;
num_stories_in_progress: number;
num_stories_total: number;
num_stories_unestimated: number;
};
export declare type File = {

@@ -303,2 +303,3 @@ content_type: string;

external_id: string | null;
external_links: Array<string>;
external_tickets: Array<ExternalTicket>;

@@ -340,6 +341,7 @@ files: Array<File>;

estimate?: number | null;
external_id?: string;
file_ids?: Array<ID>;
follower_ids?: Array<ID>;
iteration_id?: number;
labels?: Array<Label>;
labels?: Array<CreateLabelParams>;
linked_file_ids?: Array<ID>;

@@ -350,3 +352,3 @@ name?: string;

requested_by_id?: ID;
story_type: StoryType;
story_type?: StoryType;
updated_at?: string | null;

@@ -375,2 +377,3 @@ workflow_state_id?: number;

export declare type Epic = {
app_url: string;
archived: string;

@@ -389,2 +392,3 @@ comments: Array<Record<string, any>>;

follower_ids: Array<ID>;
group_id: string | null;
group_mention_ids: Array<ID>;

@@ -398,2 +402,3 @@ id: number;

owner_ids: Array<ID>;
planned_start_date: string | null;
position: number;

@@ -400,0 +405,0 @@ project_ids: Array<number>;

"use strict";
/* eslint-disable camelcase */
Object.defineProperty(exports, "__esModule", { value: true });
{
"name": "clubhouse-lib",
"version": "0.10.0",
"version": "0.11.0-rc.0",
"description": "A Promise based library to the Clubhouse REST API",

@@ -24,36 +24,34 @@ "main": "lib/index.js",

"build:flow": "scripts/generate-flow-types.sh && node scripts/convert-import-from-types",
"lint": "eslint src/**/*.ts",
"lint": "eslint 'src/**/*.{js,ts}'",
"test": "jest",
"test:format": "prettier --list-different --write src/**/*.js src/**/*.ts",
"format": "prettier --write src/**/*.js src/**/*.ts",
"prepublishOnly": "yarn build"
},
"dependencies": {
"fetch-everywhere": "^1.0.5",
"query-string": "^6.2.0",
"cross-fetch": "^3.0.6",
"query-string": "^6.14.0",
"universal-url": "^2.0.0"
},
"devDependencies": {
"@types/jest": "^24.0.19",
"@types/node": "^10.11.3",
"@typescript-eslint/eslint-plugin": "^2.6.0",
"@typescript-eslint/parser": "^2.6.0",
"@types/jest": "^26.0.20",
"@types/node": "^14.14.31",
"@typescript-eslint/eslint-plugin": "^4.15.2",
"@typescript-eslint/parser": "^4.15.2",
"benchmark": "^2.1.4",
"bluebird": "^3.5.0",
"eslint": "^6.6.0",
"eslint": "^7.20.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.5.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jest": "^23.0.2",
"eslint-plugin-jest": "^24.1.5",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-react-hooks": "^1.7.0",
"eslint-plugin-react-hooks": "^4.2.0",
"flowgen": "^1.10.0",
"jest": "^24.9.0",
"prettier": "^1.18.2",
"jest": "^26.6.3",
"prettier": "2.2.1",
"rimraf": "^3.0.0",
"save": "^2.3.1",
"ts-jest": "^24.1.0",
"typescript": "^3.6.4"
"ts-jest": "^26.5.2",
"typescript": "4.1.5"
},

@@ -60,0 +58,0 @@ "jest": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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