Skip to content

Commit

Permalink
[tt] publish v3 schema
Browse files Browse the repository at this point in the history
  • Loading branch information
a-type committed Apr 2, 2024
1 parent ccad249 commit 5242b10
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 47 deletions.
22 changes: 0 additions & 22 deletions apps/trip-tick/verdant/src/client/client.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,32 +88,20 @@ export type ListItemsItemQuantity = number;
export type ListItemsItemPerDays = number;
export type ListItemsItemAdditional = number;
export type ListItemsItemRoundDown = boolean;
export type ListItemsItemCondition = ObjectEntity<
ListItemsItemConditionInit,
ListItemsItemConditionDestructured,
ListItemsItemConditionSnapshot
> | null;
export type ListItemsItemConditionType = string;
export type ListItemsItemConditionValue = any;
export type ListInit = {
id?: string;
createdAt?: number;
name?: string;
items?: ListItemsInit;
};

export type ListItemsItemConditionInit = {
type: string;
value?: any | null;
} | null;
export type ListItemsItemInit = {
id?: string;
description?: string;
quantity?: number;
perDays?: number;
additional?: number;
roundDown?: boolean;
condition?: ListItemsItemConditionInit;
};
export type ListItemsInit = ListItemsItemInit[];
export type ListDestructured = {
Expand All @@ -123,18 +111,13 @@ export type ListDestructured = {
items: ListItems;
};

export type ListItemsItemConditionDestructured = {
type: string;
value: any | null;
};
export type ListItemsItemDestructured = {
id: string;
description: string;
quantity: number;
perDays: number;
additional: number;
roundDown: boolean;
condition: ListItemsItemCondition;
};
export type ListItemsDestructured = ListItemsItem[];
export type ListSnapshot = {
Expand All @@ -144,18 +127,13 @@ export type ListSnapshot = {
items: ListItemsSnapshot;
};

export type ListItemsItemConditionSnapshot = {
type: string;
value: any | null;
} | null;
export type ListItemsItemSnapshot = {
id: string;
description: string;
quantity: number;
perDays: number;
additional: number;
roundDown: boolean;
condition: ListItemsItemConditionSnapshot;
};
export type ListItemsSnapshot = ListItemsItemSnapshot[];

Expand Down
2 changes: 1 addition & 1 deletion apps/trip-tick/verdant/src/client/schema.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import schema from './schemaVersions/v3.js';
const finalSchema = { wip: true, ...schema };
const finalSchema = { wip: false, ...schema };
export default finalSchema;
10 changes: 0 additions & 10 deletions apps/trip-tick/verdant/src/client/schemaVersions/v3.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,13 @@ export type ListSnapshot = {
items: ListItemsSnapshot;
};

export type ListItemsItemConditionSnapshot = {
type: string;
value: any | null;
} | null;
export type ListItemsItemSnapshot = {
id: string;
description: string;
quantity: number;
perDays: number;
additional: number;
roundDown: boolean;
condition: ListItemsItemConditionSnapshot;
};
export type ListItemsSnapshot = ListItemsItemSnapshot[];
export type ListInit = {
Expand All @@ -30,18 +25,13 @@ export type ListInit = {
items?: ListItemsInit;
};

export type ListItemsItemConditionInit = {
type: string;
value?: any | null;
} | null;
export type ListItemsItemInit = {
id?: string;
description?: string;
quantity?: number;
perDays?: number;
additional?: number;
roundDown?: boolean;
condition?: ListItemsItemConditionInit;
};
export type ListItemsInit = ListItemsItemInit[];

Expand Down
7 changes: 0 additions & 7 deletions apps/trip-tick/verdant/src/client/schemaVersions/v3.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ var lists = schema.collection({
}),
roundDown: schema.fields.boolean({
default: false
}),
condition: schema.fields.object({
nullable: true,
properties: {
type: schema.fields.string(),
value: schema.fields.any()
}
})
}
})
Expand Down
7 changes: 0 additions & 7 deletions apps/trip-tick/verdant/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ const lists = schema.collection({
roundDown: schema.fields.boolean({
default: false,
}),
condition: schema.fields.object({
nullable: true,
properties: {
type: schema.fields.string(),
value: schema.fields.any(),
},
}),
},
}),
}),
Expand Down

0 comments on commit 5242b10

Please sign in to comment.