Skip to content
happening / 1.0.0-alpha.1

happening 1.0.0-alpha.1

Install from the command line:
Learn more about npm packages
$ npm install @opennetwork/happening@1.0.0-alpha.1
Install via package.json:
"@opennetwork/happening": "1.0.0-alpha.1"

About this version

Boilerplate - Node & JavaScript implementation

Boilerplate setup

Main change to make is to replace any mention of "boilerplate" in package.json, and deleting the "private": true, line to enable publishing

Support

Node.js supported

Test Coverage

90.51%25 lines covered 90.51%25 statements covered 80.24%25 functions covered 85.22%25 branches covered

Client's TypeScript Interface

export interface ClientOptions {
    partnerId?: string;
    accessToken?: string;
    version?: number;
    prefix?: string;
    url?: string | URL;
}

export interface Client {
    addPartner(partner: PartnerData): Promise<Partner>;
    listPartners(): Promise<Partner[]>;
    listSystemLogs(): Promise<SystemLog[]>;
    background(query: Record<string, string> | URLSearchParams): Promise<void>;
}

export interface Expiring {
    expiresAt?: string;
}

export interface HappeningTreeData extends HappeningEventData {
    children?: HappeningTreeData[]
}

export interface HappeningEventData {
    startedAt?: string
    endedAt?: string
    createdAt?: string
}

export interface HappeningData extends HappeningEventData {
    parent?: string
    children?: string[]
}

export interface Happening extends HappeningData {
    happeningId: string
}

export type PartialHappening = HappeningData & Partial<Happening>

export interface HappeningTree extends HappeningEventData {
    happeningId: string;
    parent?: HappeningTree;
    children: HappeningTree[];
}

export interface PartnerData extends Record<string, unknown> {
    partnerName: string;
    countryCode?: string; // "NZ"
    location?: string;
    remote?: boolean;
    onsite?: boolean;
    pharmacy?: boolean;
    delivery?: boolean;
    clinic?: boolean;
    website?: string;
}

export interface Partner extends PartnerData {
    partnerId: string;
    accessToken?: string;
    createdAt: string;
    updatedAt: string;
    approved?: boolean;
    approvedAt?: string;
    approvedByUserId?: string;
}

export interface SystemLogData extends Record<string, unknown> {
    uniqueCode?: string;
    value?: number;
    partnerId: string;
    message: string;
    timestamp?: string;
    action?: string;
}

export interface SystemLog extends SystemLogData {
    systemLogId: string;
    timestamp: string;
}

Details


Assets

  • happening-1.0.0-alpha.1.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0