
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@schedule-tribe/pd-sdk
Advanced tools
This package provides TypeScript type definitions for handling Digital Platform in Domain-Driven Design contexts
Welcome to the Schedule SDK documentation. This guide provides an overview of the SDK's functionalities and how to use them to manage medical appointments effectively.
To install the Schedule SDK, use npm or yarn:
npm install @schedule-tribe/schedule rich-domain curl2axios axios
To use the SDK, you need to configure it with your credentials, tenant, and API URL.
import Platform, { Config, Credentials, Tenant } from "@schedule-tribe/schedule";
const credentials: Credentials = {
username: '...',
password: '...'
};
const config: Config = {
url: new URL('https://api.example.com'),
tenant: 'SDK1',
credentials: credentials,
emitEvents: true,
mode: 'debug'
};
const platform = new Platform(config);
To book a schedule, use the book method:
import Schedule from "@schedule-tribe/schedule";
const crm = CRM.init(req.body.crm);
const doctorName = Name.init(req.body.doctorName);
const patientName = Name.init(req.body.patientName);
const doctor = Doctor.init({ crm, name: doctorName });
const document = CPF.init(req.body.cpf);
const patient = Patient.init({ name: patientName, document });
const procedure = Procedure.init({ type: req.body.procedure });
const date = Dates.init(req.body.date);
const duration = Duration.init(req.body.duration);
const schedule = Schedule.init({ doctor, date, duration, patient, procedure });
platform.book(schedule).then(result => {
if (result.isOk()) {
console.log('Schedule booked successfully');
} else {
console.error('Failed to book schedule:', result.error());
}
});
To cancel a schedule, use the cancel method:
import { Id } from "rich-domain";
const scheduleId = Id('1');
platform.cancel(scheduleId).then(result => {
if (result.isOk()) {
console.log('Schedule cancelled successfully');
} else {
console.error('Failed to cancel schedule:', result.error());
}
});
To list all schedules, use the list method:
platform.list().then(result => {
if (result.isOk()) {
console.log('Schedules:', result.value());
} else {
console.error('Failed to list schedules:', result.error());
}
});
The Tenant type defines the possible tenants:
export type Tenant = 'SDK1' | 'SDK2';
The ScheduleModel type represents the structure of a schedule:
export type ScheduleModel = {
id: string;
date: Date;
duration: number;
doctor: {
id: string;
name: string;
crm: string;
createdAt: Date;
updatedAt: Date;
};
patient: {
id: string;
name: string;
document: string;
createdAt: Date;
updatedAt: Date;
};
procedure: {
id: string;
type: string;
createdAt: Date;
updatedAt: Date;
};
status: string;
createdAt: Date;
updatedAt: Date;
}
The Credentials type defines the authentication credentials:
export type Credentials = {
username: string;
password: string;
}
The Config type defines the configuration for the SDK:
export type Config = {
url: URL;
tenant: Tenant;
credentials: Credentials;
emitEvents?: boolean;
mode?: 'debug';
}
The SDK can emit events for schedule actions if emitEvents is enabled in the configuration.
contexts.dispatchEvent('schedule:canceled', { id });
contexts.dispatchEvent('schedule:booked', { schedule });
All methods return a Result object, which can be either Ok or Fail. Use the isOk() method to check if the operation was successful and handle errors accordingly.
This project is licensed under the MIT License.
This documentation provides a comprehensive guide to using the Schedule SDK for managing medical appointments. For further details or questions, please refer to the official repository or contact the support team.
FAQs
This package provides TypeScript type definitions for handling Digital Platform in Domain-Driven Design contexts
The npm package @schedule-tribe/pd-sdk receives a total of 0 weekly downloads. As such, @schedule-tribe/pd-sdk popularity was classified as not popular.
We found that @schedule-tribe/pd-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.

Research
A malicious package uses a QR code as steganography in an innovative technique.

Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.