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

ronin

Package Overview
Dependencies
Maintainers
3
Versions
1779
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ronin - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

422

dist/index.d.ts

@@ -1,100 +0,1 @@

interface RoninSchemaMetadata {
createdAt: Date | string;
updatedAt: Date | string;
createdBy: RoninSchemaAccount;
updatedBy: RoninSchemaAccount;
status: 'draft' | 'published' | 'archived';
locked: boolean;
}
type BillingPlan = 'free' | 'pro' | 'business' | 'enterprise';
interface Avatar {
key: string;
meta: {
size: number;
type: string;
width: number;
height: number;
};
placeholder: {
base64: string;
};
src: string;
}
interface Card {
brand: string;
expirationMonth: number;
expirationYear: number;
last4: string;
type: string;
}
interface InviteCodes {
refreshedAt: Date | string;
roles: {
owner: string;
editor: string;
viewer: string;
developer: string;
};
}
interface Invoice {
companyName: string;
recipment: string;
language: string;
purchaseOrder: unknown | null;
streetLineOne: string;
streetLineTwo: unknown | null;
postalCode: string;
city: string;
region: string;
taxType: string;
taxNumber: string;
}
interface RoninSchemaAccount {
id: string;
avatar: Avatar;
email: string;
emailVerificationSentAt: Date | string;
emailVerificationToken: string;
emailVerified: boolean;
firstName: string;
guaranteeEmailUpdates: boolean;
handle: string;
ignoredEmailUpdates: unknown | null;
language: unknown | null;
lastName: string;
lastUsedSpace: string;
location: string;
mondayWeekStart: boolean;
phoneNumber: unknown | null;
phoneNumberVerified: boolean;
spaceEmails: unknown | null;
supportAccess: boolean;
twitterHandle: string;
password: string;
ronin: RoninSchemaMetadata;
}
interface RoninSchemaSpace {
avatar: Avatar;
card: Card;
customer: string;
database: string;
dataLocation: string;
emailDomain: string;
forceTwoFactorAuth: boolean;
handle: string;
id: string;
inviteCodes: InviteCodes;
invoice: Invoice;
location: string;
name: string;
plan: BillingPlan;
site: string;
sso: boolean;
suggested: boolean;
twitterHandle: string;
updates: unknown | null;
usedAt: Date | string;
ronin: RoninSchemaMetadata;
}
type RecursivePartial<T> = {

@@ -173,2 +74,8 @@ [P in keyof T]?: RecursivePartial<T[P]>;

};
/**
* @see https://twitter.com/mattpocockuk/status/1622730173446557697
*/
type Prettify<T> = {
[K in keyof T]: T[K];
} & {};

@@ -206,228 +113,2 @@ type Fetcher = typeof fetch;

interface SubFilter {
is: string | number;
isNot: string;
startsWith: string;
endsWith: string;
contains: string;
isGreaterThan: number;
isLessThan: number;
}
interface Where {
id: SubFilter;
description: SubFilter;
name: SubFilter;
slug: SubFilter;
amount: SubFilter;
}
interface With {
id: string | number;
description: string | number;
name: string | number;
firstName: string;
lastName: string;
slug: string | number;
pluralSlug: string | number;
amount: string | number;
handle: string | number;
usedAt: string | number;
createdAt: string | number;
updatedAt: string | number;
creationTime: string | number;
invoice: {
companyName: string;
};
team: string | number;
avatar: string | ReadableValue;
space: Partial<RoninSchemaSpace>;
}
type AllFields = 'createdAt' | 'updatedAt' | 'name' | 'slug' | 'amount';
type RecordFields = 'views' | 'accounts' | 'spaces';
interface OrderedBy {
/** Order the resulting records in descending order using a specific field. */
descending: AllFields[];
/** Order the resulting records in ascending order using a specific field. */
ascending: AllFields[];
}
type To = With;
type Variants = 'english' | 'german' | 'japanese';
interface Filter {
/** Perform specific matching actions (such as "is", "contains", or "startsWith") on the fields of a record. */
where: Partial<Where>;
/** Perform "is" matching actions on the fields of a record. */
with: Partial<With>;
/** Order the resulting records using a specific field. */
orderedBy: Partial<OrderedBy>;
/** Resolve records in a specific variant. */
in: Partial<Variants>;
/** Resolve the records associated with certain fields of type "Record". */
including: Partial<RecordFields>[];
}
interface FilterAndMutate extends Filter {
/** Perform mutations on the fields of a record or add new fields to it. */
to: Partial<To>;
}
interface Getter {
/** Retrieve a single record of the Account schema. */
account: Partial<Filter>;
/** Retrieve multiple records of the Account schema. */
accounts: Partial<Filter>;
/** Retrieve a single record of the App schema. */
app: Partial<Filter>;
/** Retrieve multiple records of the App schema. */
apps: Partial<Filter>;
/** Retrieve a single record of the Member schema. */
member: Partial<Filter>;
/** Retrieve multiple records of the Member schema. */
members: Partial<Filter>;
/** Retrieve a single record of the Schema schema. */
schema: Partial<Filter>;
/** Retrieve multiple records of the Schema schema. */
schemas: Partial<Filter>;
/** Retrieve a single record of the Space schema. */
space: Partial<Filter>;
/** Retrieve multiple records of the Space schema. */
spaces: Partial<Filter>;
/** Retrieve a single record of the Session schema. */
session: Partial<Filter>;
/** Retrieve multiple records of the Session schema. */
sessions: Partial<Filter>;
/** Retrieve a single record of the Team schema. */
team: Partial<Filter>;
/** Retrieve multiple records of the Team schema. */
teams: Partial<Filter>;
/** Retrieve a single record of the Variant schema. */
variant: Partial<Filter>;
/** Retrieve multiple records of the Variant schema. */
variants: Partial<Filter>;
/** Retrieve a single record of the View schema. */
view: Partial<Filter>;
/** Retrieve multiple records of the View schema. */
views: Partial<Filter>;
}
interface Setter {
/** Modify or create a single record of the Account schema. */
account: Partial<FilterAndMutate>;
/** Modify or create multiple records of the Account schema. */
accounts: Partial<FilterAndMutate>;
/** Modify or create a single record of the App schema. */
app: Partial<FilterAndMutate>;
/** Modify or create multiple records of the App schema. */
apps: Partial<FilterAndMutate>;
/** Modify or create a single record of the Member schema. */
member: Partial<FilterAndMutate>;
/** Modify or create multiple records of the Member schema. */
members: Partial<FilterAndMutate>;
/** Modify or create a single record of the Schema schema. */
schema: Partial<FilterAndMutate>;
/** Modify or create multiple records of the Schema schema. */
schemas: Partial<FilterAndMutate>;
/** Modify or create a single record of the Space schema. */
space: Partial<FilterAndMutate>;
/** Modify or create multiple records of the Space schema. */
spaces: Partial<FilterAndMutate>;
/** Modify or create a single record of the Team schema. */
team: Partial<FilterAndMutate>;
/** Modify or create multiple records of the Team schema. */
teams: Partial<FilterAndMutate>;
/** Modify or create a single record of the Variant schema. */
variant: Partial<FilterAndMutate>;
/** Modify or create multiple records of the Variant schema. */
variants: Partial<FilterAndMutate>;
/** Modify or create a single record of the View schema. */
view: Partial<FilterAndMutate>;
/** Modify or create multiple records of the View schema. */
views: Partial<FilterAndMutate>;
}
interface Dropper {
/** Remove a single record of the Account schema. */
account: Partial<Filter>;
/** Remove multiple records of the Account schema. */
accounts: Partial<Filter>;
/** Remove a single record of the App schema. */
app: Partial<Filter>;
/** Remove multiple records of the App schema. */
apps: Partial<Filter>;
/** Remove a single record of the Member schema. */
member: Partial<Filter>;
/** Remove multiple records of the Member schema. */
members: Partial<Filter>;
/** Remove a single record of the Schema schema. */
schema: Partial<Filter>;
/** Remove multiple records of the Schema schema. */
schemas: Partial<Filter>;
/** Remove a single record of the Space schema. */
space: Partial<Filter>;
/** Remove multiple records of the Space schema. */
spaces: Partial<Filter>;
/** Remove a single record of the Team schema. */
team: Partial<Filter>;
/** Remove multiple records of the Team schema. */
teams: Partial<Filter>;
/** Remove a single record of the Variant schema. */
variant: Partial<Filter>;
/** Remove multiple records of the Variant schema. */
variants: Partial<Filter>;
/** Remove a single record of the View schema. */
view: Partial<Filter>;
/** Remove multiple records of the View schema. */
views: Partial<Filter>;
}
interface Creator {
/** Create a single record of the Account schema. */
account: Partial<Filter>;
/** Create multiple records of the Account schema. */
accounts: Partial<Filter>;
/** Create a single record of the App schema. */
app: Partial<Filter>;
/** Create multiple records of the App schema. */
apps: Partial<Filter>;
/** Create a single record of the Member schema. */
member: Partial<Filter>;
/** Create multiple records of the Member schema. */
members: Partial<Filter>;
/** Create a single record of the Schema schema. */
schema: Partial<Filter>;
/** Create multiple records of the Schema schema. */
schemas: Partial<Filter>;
/** Create a single record of the Space schema. */
space: Partial<Filter>;
/** Create multiple records of the Space schema. */
spaces: Partial<Filter>;
/** Create a single record of the Team schema. */
team: Partial<Filter>;
/** Create multiple records of the Team schema. */
teams: Partial<Filter>;
/** Create a single record of the Variant schema. */
variant: Partial<Filter>;
/** Create multiple records of the Variant schema. */
variants: Partial<Filter>;
/** Create a single record of the View schema. */
view: Partial<Filter>;
/** Create multiple records of the View schema. */
views: Partial<Filter>;
/** Create a single record of the Event schema. */
event: Partial<Filter>;
/** Create multiple records of the Event schema. */
events: Partial<Filter>;
}
interface Counter {
/** Count records of the Account schema. */
accounts: Partial<Filter>;
/** Count records of the App schema. */
apps: Partial<Filter>;
/** Count records of the Member schema. */
members: Partial<Filter>;
/** Count records of the Schema schema. */
schemas: Partial<Filter>;
/** Count records of the Space schema. */
spaces: Partial<Filter>;
/** Count records of the Team schema. */
teams: Partial<Filter>;
/** Count records of the Variant schema. */
variants: Partial<Filter>;
/** Count records of the View schema. */
views: Partial<Filter>;
}
type QueryProcessingOptions = {

@@ -451,3 +132,71 @@ /**

type RunScratchpadOptions = {
declare namespace RONIN {
interface RoninMetadata {
createdAt: Date;
createdBy: `rec_${string}`;
locked: boolean;
status: 'draft' | 'published' | 'archived';
updatedAt: Date;
updatedBy: `rec_${string}`;
}
export interface RoninRecord {
id: `rec_${string}`;
ronin: RoninMetadata;
}
interface AllSubFilters<T> {
contains: string | T;
endsWith: string | T;
is: T;
isGreaterThan: number | Date;
isLessThan: number | Date;
isNot: T;
startsWith: string | T;
}
type SubFilter<T> = T extends number ? Prettify<Pick<AllSubFilters<T>, 'isGreaterThan' | 'isLessThan' | 'is'>> : T extends string ? Prettify<Pick<AllSubFilters<T>, 'contains' | 'endsWith' | 'is' | 'isNot' | 'startsWith'>> : T extends boolean ? Prettify<Pick<AllSubFilters<T>, 'is'>> : T extends Date ? Prettify<Pick<AllSubFilters<T>, 'isGreaterThan' | 'isLessThan' | 'is'>> : never;
type Where<TSchema extends Record<string, unknown>> = {
[TKey in keyof TSchema]: SubFilter<TSchema[TKey]>;
};
type With<TSchema extends Record<string, unknown>> = {
[TKey in keyof TSchema]: TSchema[TKey];
};
type AllFields = 'createdAt' | 'updatedAt' | 'name' | 'slug' | 'amount';
type RecordFields = 'views' | 'accounts' | 'spaces';
interface OrderedBy {
/** Order the resulting records in descending order using a specific field. */
descending: Array<AllFields>;
/** Order the resulting records in ascending order using a specific field. */
ascending: Array<AllFields>;
}
type To<TSchema extends Record<string, unknown>> = With<TSchema>;
type Variants = 'english' | 'german' | 'japanese';
export interface Filter<TSchema extends Record<string, unknown> & RoninRecord> {
/** Perform specific matching actions (such as "is", "contains", or "startsWith") on the fields of a record. */
where: Partial<Where<TSchema>>;
/** Perform "is" matching actions on the fields of a record. */
with: Partial<With<TSchema>>;
/** Order the resulting records using a specific field. */
orderedBy: Partial<OrderedBy>;
/** Resolve records in a specific variant. */
in: Partial<Variants>;
/** Resolve the records associated with certain fields of type "Record". */
including: Array<Partial<RecordFields>>;
}
export interface FilterAndMutate<TSchema extends Record<string, unknown> & RoninRecord> extends Filter<TSchema> {
/** Perform mutations on the fields of a record or add new fields to it. */
to: Partial<To<TSchema>>;
}
export interface Counter extends Record<string, Filter<Record<string, unknown> & RoninRecord>> {
}
export interface Creator extends Record<string, Filter<Record<string, unknown> & RoninRecord>> {
}
export interface Dropper extends Record<string, Filter<Record<string, unknown> & RoninRecord>> {
}
export interface Getter extends Record<string, Filter<Record<string, unknown> & RoninRecord>> {
}
export interface Setter extends Record<string, FilterAndMutate<Record<string, unknown> & RoninRecord>> {
}
export {};
}
interface RunScratchpadOptions {
/**

@@ -457,3 +206,3 @@ * Allows for specifying custom data hooks that are executed for every query

*/
hooks?: Record<string, any>;
hooks?: Record<string, unknown>;
/**

@@ -476,4 +225,4 @@ * Allows for passing a custom app token. In a Node.js-based environment,

queryProcessingOptions?: QueryProcessingOptions;
};
type ScratchPad = (actions: {
}
interface ScratchPadActions {
/**

@@ -502,3 +251,3 @@ * Retrieve existing records.

*/
get: Partial<Getter>;
get: RONIN.Getter;
/**

@@ -521,3 +270,3 @@ * Modify existing records.

*/
set: Partial<Setter>;
set: RONIN.Setter;
/**

@@ -536,3 +285,3 @@ * Create a new record.

*/
create: Partial<Creator>;
create: RONIN.Creator;
/**

@@ -548,3 +297,3 @@ * Drop existing records.

*/
drop: Partial<Dropper>;
drop: RONIN.Dropper;
/**

@@ -560,4 +309,5 @@ * Count matching records.

*/
count: Partial<Counter>;
}) => void;
count: RONIN.Counter;
}
type ScratchPad = (actions: ScratchPadActions) => void;

@@ -581,2 +331,2 @@ type BeforeHook = (query: RecursivePartial<QueryInstructions>, multipleRecords: boolean) => Promise<RecursivePartial<QueryInstructions>>;

export { AfterHook, BeforeHook, DuringHook, Query, QueryResult, Readable, ReadableValue, RunScratchpadOptions, ScratchPad, StoredReadable, handleScratchPadOrConfig as default, getQueriesFromScratchPad, processReadables, runQueries };
export { AfterHook, BeforeHook, DuringHook, Query, QueryResult, RONIN, Readable, ReadableValue, RunScratchpadOptions, ScratchPad, ScratchPadActions, StoredReadable, handleScratchPadOrConfig as default, getQueriesFromScratchPad, processReadables, runQueries };
{
"version": "1.0.2",
"version": "1.0.3",
"name": "ronin",

@@ -4,0 +4,0 @@ "scripts": {

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