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

@colearn/microservices-kit

Package Overview
Dependencies
Maintainers
3
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@colearn/microservices-kit - npm Package Compare versions

Comparing version 0.0.44 to 0.0.45-beta.1

lib/auth/auth-token.d.ts

4

lib/client.d.ts

@@ -1,6 +0,6 @@

import fetch from 'isomorphic-unfetch';
import { RequestInit, Response } from 'node-fetch';
export declare class MicroserviceHttpClient {
private baseURL;
constructor(baseURL: string);
protected fetchJson(url: string, init?: fetch.IsomorphicRequestInit, token?: any): Promise<fetch.IsomorphicResponse>;
protected fetch(url: string, init?: RequestInit, token?: any): Promise<Response>;
}

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

exports.MicroserviceHttpClient = void 0;
const isomorphic_unfetch_1 = __importDefault(require("isomorphic-unfetch"));
const node_fetch_1 = __importDefault(require("node-fetch"));
class MicroserviceHttpClient {

@@ -13,3 +13,3 @@ constructor(baseURL) {

}
async fetchJson(url, init, token) {
async fetch(url, init, token) {
var _a;

@@ -22,3 +22,3 @@ const headers = {

}
const response = await (0, isomorphic_unfetch_1.default)(`${this.baseURL}/${url}`, {
const response = await (0, node_fetch_1.default)(`${this.baseURL}/${url}`, {
...(init !== null && init !== void 0 ? init : {}),

@@ -25,0 +25,0 @@ method: (_a = init === null || init === void 0 ? void 0 : init.method) !== null && _a !== void 0 ? _a : 'GET',

export { default as HttpService } from './http-service';
export * from './auth';
export * from './auth/auth-user';
export * from './auth/auth-token';
export * from './auth/express-middlware';
export * from './types';
export * from './token';
export * from './auth-user';
export * from './errors';

@@ -7,0 +7,0 @@ export * from './client';

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

Object.defineProperty(exports, "HttpService", { enumerable: true, get: function () { return __importDefault(http_service_1).default; } });
__exportStar(require("./auth"), exports);
__exportStar(require("./auth/auth-user"), exports);
__exportStar(require("./auth/auth-token"), exports);
__exportStar(require("./auth/express-middlware"), exports);
__exportStar(require("./types"), exports);
__exportStar(require("./token"), exports);
__exportStar(require("./auth-user"), exports);
__exportStar(require("./errors"), exports);

@@ -41,0 +41,0 @@ __exportStar(require("./client"), exports);

@@ -7,111 +7,19 @@ export type Maybe<T> = T | null;

}
export type User = {
id: number;
email: string;
role?: Maybe<SystemRole>;
};
export type Person = {
id: string;
memberships?: Maybe<Maybe<PersonMembership>[]>;
userId?: string;
};
export declare enum PersonMembershipType {
Family = "family",
School = "school",
Homeroom = "homeroom"
export declare enum Grade {
TK = -2,
TK2 = -1,
Kindergarten = 0,
G1 = 1,
G2 = 2,
G3 = 3,
G4 = 4,
G5 = 5,
G6 = 6,
G7 = 7,
G8 = 8,
G9 = 9,
G10 = 10,
G11 = 11,
G12 = 12,
Undergrad = 13
}
export type PersonMembership = {
id: string;
membershipType?: Maybe<PersonMembershipType>;
personId: string;
};
export declare enum SchoolMembershipRole {
Parent = "parent",
Staff = "staff",
Student = "student"
}
export type SchoolMember = {
id: string;
membershipType?: Maybe<PersonMembershipType>;
personId: string;
role?: Maybe<SchoolMembershipRole>;
schoolId: string;
};
export type SchoolParent = PersonMembership & SchoolMember & {
id: string;
membershipType?: Maybe<PersonMembershipType>;
personId: string;
role?: Maybe<SchoolMembershipRole>;
schoolId: string;
};
export type SchoolStaff = PersonMembership & SchoolMember & {
id: string;
membershipType?: Maybe<PersonMembershipType>;
personId: string;
position?: Maybe<SchoolStaffPosition>;
role?: Maybe<SchoolMembershipRole>;
schoolId: string;
};
export declare enum SchoolStaffPosition {
Admin = "admin",
Teacher = "teacher"
}
export declare enum FamilyRole {
Child = "child",
Parent = "parent"
}
export type Student = PersonMembership & SchoolMember & {
id: string;
membershipType?: Maybe<PersonMembershipType>;
personId: string;
role?: Maybe<SchoolMembershipRole>;
schoolId: string;
};
export type FamilyMember = {
familyId: string;
id: string;
membershipType?: Maybe<PersonMembershipType>;
personId: string;
role?: Maybe<FamilyRole>;
};
export type HomeroomMember = {
hoomeroomId: string;
id: string;
membershipType?: Maybe<PersonMembershipType>;
personId: string;
role?: Maybe<HomeroomMembershipRole>;
};
export type Child = FamilyMember & PersonMembership & {
id: string;
familyId: string;
membershipType?: Maybe<PersonMembershipType>;
personId: string;
role?: Maybe<FamilyRole>;
};
export type Parent = FamilyMember & PersonMembership & {
familyId: string;
id: string;
membershipType?: Maybe<PersonMembershipType>;
personId: string;
role?: Maybe<FamilyRole>;
};
export declare enum HomeroomMembershipRole {
Student = "student",
Teacher = "teacher"
}
export type HomeroomStudent = HomeroomMember & PersonMembership & {
age?: string;
grade?: string;
hoomeroomId: string;
id: string;
membershipType?: Maybe<PersonMembershipType>;
personId: string;
role?: Maybe<HomeroomMembershipRole>;
};
export type HomeroomTeacher = HomeroomMember & PersonMembership & {
hoomeroomId: string;
id: string;
membershipType?: Maybe<PersonMembershipType>;
personId: string;
role?: Maybe<HomeroomMembershipRole>;
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HomeroomMembershipRole = exports.FamilyRole = exports.SchoolStaffPosition = exports.SchoolMembershipRole = exports.PersonMembershipType = exports.SystemRole = void 0;
exports.Grade = exports.SystemRole = void 0;
var SystemRole;

@@ -10,29 +10,21 @@ (function (SystemRole) {

})(SystemRole = exports.SystemRole || (exports.SystemRole = {}));
var PersonMembershipType;
(function (PersonMembershipType) {
PersonMembershipType["Family"] = "family";
PersonMembershipType["School"] = "school";
PersonMembershipType["Homeroom"] = "homeroom";
})(PersonMembershipType = exports.PersonMembershipType || (exports.PersonMembershipType = {}));
var SchoolMembershipRole;
(function (SchoolMembershipRole) {
SchoolMembershipRole["Parent"] = "parent";
SchoolMembershipRole["Staff"] = "staff";
SchoolMembershipRole["Student"] = "student";
})(SchoolMembershipRole = exports.SchoolMembershipRole || (exports.SchoolMembershipRole = {}));
var SchoolStaffPosition;
(function (SchoolStaffPosition) {
SchoolStaffPosition["Admin"] = "admin";
SchoolStaffPosition["Teacher"] = "teacher";
})(SchoolStaffPosition = exports.SchoolStaffPosition || (exports.SchoolStaffPosition = {}));
var FamilyRole;
(function (FamilyRole) {
FamilyRole["Child"] = "child";
FamilyRole["Parent"] = "parent";
})(FamilyRole = exports.FamilyRole || (exports.FamilyRole = {}));
var HomeroomMembershipRole;
(function (HomeroomMembershipRole) {
HomeroomMembershipRole["Student"] = "student";
HomeroomMembershipRole["Teacher"] = "teacher";
})(HomeroomMembershipRole = exports.HomeroomMembershipRole || (exports.HomeroomMembershipRole = {}));
var Grade;
(function (Grade) {
Grade[Grade["TK"] = -2] = "TK";
Grade[Grade["TK2"] = -1] = "TK2";
Grade[Grade["Kindergarten"] = 0] = "Kindergarten";
Grade[Grade["G1"] = 1] = "G1";
Grade[Grade["G2"] = 2] = "G2";
Grade[Grade["G3"] = 3] = "G3";
Grade[Grade["G4"] = 4] = "G4";
Grade[Grade["G5"] = 5] = "G5";
Grade[Grade["G6"] = 6] = "G6";
Grade[Grade["G7"] = 7] = "G7";
Grade[Grade["G8"] = 8] = "G8";
Grade[Grade["G9"] = 9] = "G9";
Grade[Grade["G10"] = 10] = "G10";
Grade[Grade["G11"] = 11] = "G11";
Grade[Grade["G12"] = 12] = "G12";
Grade[Grade["Undergrad"] = 13] = "Undergrad";
})(Grade = exports.Grade || (exports.Grade = {}));
//# sourceMappingURL=types.js.map
{
"name": "@colearn/microservices-kit",
"version": "0.0.44",
"version": "0.0.45-beta.1",
"description": "colearn microservice kit",

@@ -33,10 +33,9 @@ "author": "Colearn",

"peerDependencies": {
"express": ">= 4.0.0",
"isomorphic-unfetch": ">= 4.0.0"
"express": ">= 4.0.0"
},
"dependencies": {
"@sentry/node": "^7.51.0",
"@sentry/node": "^7.51.2",
"body-parser": "^1.20.2",
"express-jwt": "^8.3.0",
"isomorphic-unfetch": "^4.0.2"
"node-fetch": "^3.3.1"
},

@@ -47,3 +46,3 @@ "devDependencies": {

"@types/express-jwt": "^7.4.2",
"@types/node": "^20.1.0",
"@types/node": "^20.1.1",
"eslint": "^8.40.0",

@@ -50,0 +49,0 @@ "express": "^4.18.2",

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