shred-api-client 2.0.9 → 2.0.10-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2596 -0
- package/dist/index.d.ts +2596 -15
- package/dist/index.js +1788 -40
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1747 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +6 -5
- package/dist/api/AppConfig.api.d.ts +0 -9
- package/dist/api/AppConfig.api.js +0 -42
- package/dist/api/Email.api.d.ts +0 -10
- package/dist/api/Email.api.js +0 -42
- package/dist/api/Goal.api.d.ts +0 -10
- package/dist/api/Goal.api.js +0 -42
- package/dist/api/Note.api.d.ts +0 -13
- package/dist/api/Note.api.js +0 -60
- package/dist/api/Notification.api.d.ts +0 -18
- package/dist/api/Notification.api.js +0 -80
- package/dist/api/Project.api.d.ts +0 -26
- package/dist/api/Project.api.js +0 -122
- package/dist/api/Prompt.api.d.ts +0 -14
- package/dist/api/Prompt.api.js +0 -41
- package/dist/api/Subscription.api.d.ts +0 -18
- package/dist/api/Subscription.api.js +0 -69
- package/dist/api/Tenant.api.d.ts +0 -14
- package/dist/api/Tenant.api.js +0 -47
- package/dist/api/Track.api.d.ts +0 -9
- package/dist/api/Track.api.js +0 -19
- package/dist/api/User.api.d.ts +0 -25
- package/dist/api/User.api.js +0 -98
- package/dist/model/Api.d.ts +0 -26
- package/dist/model/Api.js +0 -33
- package/dist/model/Context.d.ts +0 -5
- package/dist/model/Context.js +0 -2
- package/dist/model/Env.d.ts +0 -2
- package/dist/model/Env.js +0 -2
- package/dist/model/app-config/AppConfig.api.d.ts +0 -9
- package/dist/model/app-config/AppConfig.api.js +0 -9
- package/dist/model/app-config/index.d.ts +0 -1
- package/dist/model/app-config/index.js +0 -17
- package/dist/model/asset/Asset.schema.d.ts +0 -43
- package/dist/model/asset/Asset.schema.js +0 -19
- package/dist/model/asset/index.d.ts +0 -2
- package/dist/model/asset/index.js +0 -5
- package/dist/model/core/APIResponse.d.ts +0 -6
- package/dist/model/core/APIResponse.js +0 -2
- package/dist/model/core/Query.d.ts +0 -15
- package/dist/model/core/Query.js +0 -2
- package/dist/model/core/index.d.ts +0 -2
- package/dist/model/core/index.js +0 -18
- package/dist/model/email/Email.api.d.ts +0 -11
- package/dist/model/email/Email.api.js +0 -9
- package/dist/model/email/Email.schema.d.ts +0 -15
- package/dist/model/email/Email.schema.js +0 -9
- package/dist/model/email/index.d.ts +0 -3
- package/dist/model/email/index.js +0 -20
- package/dist/model/exceptions/ConflictException.d.ts +0 -4
- package/dist/model/exceptions/ConflictException.js +0 -13
- package/dist/model/exceptions/ForbiddenException.d.ts +0 -4
- package/dist/model/exceptions/ForbiddenException.js +0 -13
- package/dist/model/exceptions/InvalidArgumentException.d.ts +0 -4
- package/dist/model/exceptions/InvalidArgumentException.js +0 -13
- package/dist/model/exceptions/ResourceNotFoundException.d.ts +0 -4
- package/dist/model/exceptions/ResourceNotFoundException.js +0 -13
- package/dist/model/exceptions/ShredException.d.ts +0 -4
- package/dist/model/exceptions/ShredException.js +0 -10
- package/dist/model/exceptions/UnauthorizedException.d.ts +0 -4
- package/dist/model/exceptions/UnauthorizedException.js +0 -13
- package/dist/model/exceptions/index.d.ts +0 -16
- package/dist/model/exceptions/index.js +0 -20
- package/dist/model/goal/Goal.api.d.ts +0 -11
- package/dist/model/goal/Goal.api.js +0 -6
- package/dist/model/goal/Goal.schema.d.ts +0 -154
- package/dist/model/goal/Goal.schema.js +0 -26
- package/dist/model/goal/index.d.ts +0 -3
- package/dist/model/goal/index.js +0 -22
- package/dist/model/note/Note.api.d.ts +0 -26
- package/dist/model/note/Note.api.js +0 -21
- package/dist/model/note/Note.schema.d.ts +0 -141
- package/dist/model/note/Note.schema.js +0 -30
- package/dist/model/note/index.d.ts +0 -3
- package/dist/model/note/index.js +0 -21
- package/dist/model/notification/Notification.api.d.ts +0 -47
- package/dist/model/notification/Notification.api.js +0 -13
- package/dist/model/notification/Notification.schema.d.ts +0 -454
- package/dist/model/notification/Notification.schema.js +0 -111
- package/dist/model/notification/index.d.ts +0 -3
- package/dist/model/notification/index.js +0 -30
- package/dist/model/project/Project.api.d.ts +0 -83
- package/dist/model/project/Project.api.js +0 -26
- package/dist/model/project/Project.schema.d.ts +0 -209
- package/dist/model/project/Project.schema.js +0 -60
- package/dist/model/project/index.d.ts +0 -3
- package/dist/model/project/index.js +0 -24
- package/dist/model/prompt/Prompt.api.d.ts +0 -31
- package/dist/model/prompt/Prompt.api.js +0 -25
- package/dist/model/prompt/Prompt.schema.d.ts +0 -165
- package/dist/model/prompt/Prompt.schema.js +0 -24
- package/dist/model/prompt/index.d.ts +0 -3
- package/dist/model/prompt/index.js +0 -22
- package/dist/model/subscription/Subscription.api.d.ts +0 -59
- package/dist/model/subscription/Subscription.api.js +0 -49
- package/dist/model/subscription/Subscription.schema.d.ts +0 -314
- package/dist/model/subscription/Subscription.schema.js +0 -53
- package/dist/model/subscription/index.d.ts +0 -3
- package/dist/model/subscription/index.js +0 -25
- package/dist/model/tenant/Tenant.api.d.ts +0 -35
- package/dist/model/tenant/Tenant.api.js +0 -29
- package/dist/model/tenant/Tenant.schema.d.ts +0 -342
- package/dist/model/tenant/Tenant.schema.js +0 -29
- package/dist/model/tenant/index.d.ts +0 -3
- package/dist/model/tenant/index.js +0 -21
- package/dist/model/track/Track.api.d.ts +0 -10
- package/dist/model/track/Track.api.js +0 -9
- package/dist/model/track/Track.schema.d.ts +0 -44
- package/dist/model/track/Track.schema.js +0 -14
- package/dist/model/track/index.d.ts +0 -3
- package/dist/model/track/index.js +0 -21
- package/dist/model/user/User.api.d.ts +0 -86
- package/dist/model/user/User.api.js +0 -21
- package/dist/model/user/User.schema.d.ts +0 -117
- package/dist/model/user/User.schema.js +0 -42
- package/dist/model/user/index.d.ts +0 -3
- package/dist/model/user/index.js +0 -23
- package/dist/util/HTTPClient.d.ts +0 -5
- package/dist/util/HTTPClient.js +0 -71
- package/dist/util/parseQuery.d.ts +0 -2
- package/dist/util/parseQuery.js +0 -25
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
declare const AssetSchema: z.ZodObject<{
|
|
3
|
-
assetId: z.ZodString;
|
|
4
|
-
fileName: z.ZodString;
|
|
5
|
-
extension: z.ZodString;
|
|
6
|
-
fileSize: z.ZodNumber;
|
|
7
|
-
assetUrl: z.ZodString;
|
|
8
|
-
thumbnailUrl: z.ZodString;
|
|
9
|
-
type: z.ZodString;
|
|
10
|
-
duration: z.ZodOptional<z.ZodNumber>;
|
|
11
|
-
progress: z.ZodOptional<z.ZodNumber>;
|
|
12
|
-
error: z.ZodOptional<z.ZodString>;
|
|
13
|
-
authorId: z.ZodString;
|
|
14
|
-
uploadedAt: z.ZodNumber;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
type: string;
|
|
17
|
-
assetId: string;
|
|
18
|
-
fileName: string;
|
|
19
|
-
extension: string;
|
|
20
|
-
fileSize: number;
|
|
21
|
-
assetUrl: string;
|
|
22
|
-
thumbnailUrl: string;
|
|
23
|
-
authorId: string;
|
|
24
|
-
uploadedAt: number;
|
|
25
|
-
error?: string | undefined;
|
|
26
|
-
duration?: number | undefined;
|
|
27
|
-
progress?: number | undefined;
|
|
28
|
-
}, {
|
|
29
|
-
type: string;
|
|
30
|
-
assetId: string;
|
|
31
|
-
fileName: string;
|
|
32
|
-
extension: string;
|
|
33
|
-
fileSize: number;
|
|
34
|
-
assetUrl: string;
|
|
35
|
-
thumbnailUrl: string;
|
|
36
|
-
authorId: string;
|
|
37
|
-
uploadedAt: number;
|
|
38
|
-
error?: string | undefined;
|
|
39
|
-
duration?: number | undefined;
|
|
40
|
-
progress?: number | undefined;
|
|
41
|
-
}>;
|
|
42
|
-
type Asset = z.infer<typeof AssetSchema>;
|
|
43
|
-
export { Asset, AssetSchema };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AssetSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const AssetSchema = zod_1.z.object({
|
|
6
|
-
assetId: zod_1.z.string(),
|
|
7
|
-
fileName: zod_1.z.string(),
|
|
8
|
-
extension: zod_1.z.string(),
|
|
9
|
-
fileSize: zod_1.z.number(),
|
|
10
|
-
assetUrl: zod_1.z.string().url(),
|
|
11
|
-
thumbnailUrl: zod_1.z.string().url(),
|
|
12
|
-
type: zod_1.z.string(),
|
|
13
|
-
duration: zod_1.z.number().optional(),
|
|
14
|
-
progress: zod_1.z.number().optional(),
|
|
15
|
-
error: zod_1.z.string().optional(),
|
|
16
|
-
authorId: zod_1.z.string(),
|
|
17
|
-
uploadedAt: zod_1.z.number(),
|
|
18
|
-
});
|
|
19
|
-
exports.AssetSchema = AssetSchema;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AssetSchema = void 0;
|
|
4
|
-
var Asset_schema_1 = require("./Asset.schema");
|
|
5
|
-
Object.defineProperty(exports, "AssetSchema", { enumerable: true, get: function () { return Asset_schema_1.AssetSchema; } });
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type QueryOrderBy<T> = {
|
|
2
|
-
field: keyof T | "modified";
|
|
3
|
-
direction: "asc" | "desc";
|
|
4
|
-
};
|
|
5
|
-
export type QueryWhere<T> = {
|
|
6
|
-
field: keyof T | "modified";
|
|
7
|
-
operation: "==" | "!=" | ">" | "<" | ">=" | "<=" | "in" | "array-contains";
|
|
8
|
-
value: T[keyof T] | T[keyof T][];
|
|
9
|
-
};
|
|
10
|
-
export type QueryOptions<T> = {
|
|
11
|
-
perPage?: number;
|
|
12
|
-
cursor?: string | number | null;
|
|
13
|
-
orderBy?: QueryOrderBy<T>;
|
|
14
|
-
wheres?: QueryWhere<T>[];
|
|
15
|
-
};
|
package/dist/model/core/Query.js
DELETED
package/dist/model/core/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./Query"), exports);
|
|
18
|
-
__exportStar(require("./APIResponse"), exports);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import Context from "../Context";
|
|
2
|
-
import { Email } from "./Email.schema";
|
|
3
|
-
export interface IAPI {
|
|
4
|
-
send: (email: Email, ctx?: Context) => Promise<boolean>;
|
|
5
|
-
}
|
|
6
|
-
export declare const Endpoints: {
|
|
7
|
-
SendEmail: {
|
|
8
|
-
uri: string;
|
|
9
|
-
method: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const EmailSchema: z.ZodObject<{
|
|
3
|
-
to: z.ZodOptional<z.ZodString>;
|
|
4
|
-
subject: z.ZodString;
|
|
5
|
-
body: z.ZodString;
|
|
6
|
-
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
body: string;
|
|
8
|
-
subject: string;
|
|
9
|
-
to?: string | undefined;
|
|
10
|
-
}, {
|
|
11
|
-
body: string;
|
|
12
|
-
subject: string;
|
|
13
|
-
to?: string | undefined;
|
|
14
|
-
}>;
|
|
15
|
-
export type Email = z.infer<typeof EmailSchema>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EmailSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.EmailSchema = zod_1.z.object({
|
|
6
|
-
to: zod_1.z.string().email().optional(),
|
|
7
|
-
subject: zod_1.z.string(),
|
|
8
|
-
body: zod_1.z.string(),
|
|
9
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.EmailSchema = void 0;
|
|
18
|
-
var Email_schema_1 = require("./Email.schema");
|
|
19
|
-
Object.defineProperty(exports, "EmailSchema", { enumerable: true, get: function () { return Email_schema_1.EmailSchema; } });
|
|
20
|
-
__exportStar(require("./Email.api"), exports);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const ShredException_1 = __importDefault(require("./ShredException"));
|
|
7
|
-
class ConflictException extends ShredException_1.default {
|
|
8
|
-
constructor(message) {
|
|
9
|
-
super(message, 409);
|
|
10
|
-
this.name = "ConflictException";
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.default = ConflictException;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const ShredException_1 = __importDefault(require("./ShredException"));
|
|
7
|
-
class ForbiddenException extends ShredException_1.default {
|
|
8
|
-
constructor(message) {
|
|
9
|
-
super(message, 403);
|
|
10
|
-
this.name = "ForbiddenException";
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.default = ForbiddenException;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const ShredException_1 = __importDefault(require("./ShredException"));
|
|
7
|
-
class InvalidArgumentException extends ShredException_1.default {
|
|
8
|
-
constructor(message) {
|
|
9
|
-
super(message, 400);
|
|
10
|
-
this.name = "InvalidArgumentException";
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.default = InvalidArgumentException;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const ShredException_1 = __importDefault(require("./ShredException"));
|
|
7
|
-
class ResourceNotFoundException extends ShredException_1.default {
|
|
8
|
-
constructor(message) {
|
|
9
|
-
super(message, 404);
|
|
10
|
-
this.name = "ResourceNotFoundException";
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.default = ResourceNotFoundException;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
class ShredException extends Error {
|
|
4
|
-
constructor(message, status) {
|
|
5
|
-
super(message);
|
|
6
|
-
this.name = "ShredException";
|
|
7
|
-
this.status = status;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.default = ShredException;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const ShredException_1 = __importDefault(require("./ShredException"));
|
|
7
|
-
class UnauthorizedException extends ShredException_1.default {
|
|
8
|
-
constructor(message) {
|
|
9
|
-
super(message, 401);
|
|
10
|
-
this.name = "UnauthorizedException";
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.default = UnauthorizedException;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import ConflictException from "./ConflictException";
|
|
2
|
-
import InvalidArgumentException from "./InvalidArgumentException";
|
|
3
|
-
import ResourceNotFoundException from "./ResourceNotFoundException";
|
|
4
|
-
import ShredException from "./ShredException";
|
|
5
|
-
import UnauthorizedException from "./UnauthorizedException";
|
|
6
|
-
import ForbiddenException from "./ForbiddenException";
|
|
7
|
-
declare const Exceptions: {
|
|
8
|
-
ConflictException: typeof ConflictException;
|
|
9
|
-
InvalidArgumentException: typeof InvalidArgumentException;
|
|
10
|
-
ResourceNotFoundException: typeof ResourceNotFoundException;
|
|
11
|
-
ShredException: typeof ShredException;
|
|
12
|
-
UnauthorizedException: typeof UnauthorizedException;
|
|
13
|
-
ForbiddenException: typeof ForbiddenException;
|
|
14
|
-
};
|
|
15
|
-
export default Exceptions;
|
|
16
|
-
export type { ConflictException, InvalidArgumentException, ResourceNotFoundException, ShredException, UnauthorizedException, ForbiddenException, };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const ConflictException_1 = __importDefault(require("./ConflictException"));
|
|
7
|
-
const InvalidArgumentException_1 = __importDefault(require("./InvalidArgumentException"));
|
|
8
|
-
const ResourceNotFoundException_1 = __importDefault(require("./ResourceNotFoundException"));
|
|
9
|
-
const ShredException_1 = __importDefault(require("./ShredException"));
|
|
10
|
-
const UnauthorizedException_1 = __importDefault(require("./UnauthorizedException"));
|
|
11
|
-
const ForbiddenException_1 = __importDefault(require("./ForbiddenException"));
|
|
12
|
-
const Exceptions = {
|
|
13
|
-
ConflictException: ConflictException_1.default,
|
|
14
|
-
InvalidArgumentException: InvalidArgumentException_1.default,
|
|
15
|
-
ResourceNotFoundException: ResourceNotFoundException_1.default,
|
|
16
|
-
ShredException: ShredException_1.default,
|
|
17
|
-
UnauthorizedException: UnauthorizedException_1.default,
|
|
18
|
-
ForbiddenException: ForbiddenException_1.default,
|
|
19
|
-
};
|
|
20
|
-
exports.default = Exceptions;
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const DailyMilestoneSchema: z.ZodObject<{
|
|
3
|
-
id: z.ZodString;
|
|
4
|
-
date: z.ZodString;
|
|
5
|
-
target: z.ZodNumber;
|
|
6
|
-
progress: z.ZodNumber;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
id: string;
|
|
9
|
-
date: string;
|
|
10
|
-
progress: number;
|
|
11
|
-
target: number;
|
|
12
|
-
}, {
|
|
13
|
-
id: string;
|
|
14
|
-
date: string;
|
|
15
|
-
progress: number;
|
|
16
|
-
target: number;
|
|
17
|
-
}>;
|
|
18
|
-
export declare const WeeklyMilestoneSchema: z.ZodObject<{
|
|
19
|
-
id: z.ZodString;
|
|
20
|
-
week: z.ZodString;
|
|
21
|
-
target: z.ZodNumber;
|
|
22
|
-
progress: z.ZodNumber;
|
|
23
|
-
dailyMilestones: z.ZodArray<z.ZodObject<{
|
|
24
|
-
id: z.ZodString;
|
|
25
|
-
date: z.ZodString;
|
|
26
|
-
target: z.ZodNumber;
|
|
27
|
-
progress: z.ZodNumber;
|
|
28
|
-
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
id: string;
|
|
30
|
-
date: string;
|
|
31
|
-
progress: number;
|
|
32
|
-
target: number;
|
|
33
|
-
}, {
|
|
34
|
-
id: string;
|
|
35
|
-
date: string;
|
|
36
|
-
progress: number;
|
|
37
|
-
target: number;
|
|
38
|
-
}>, "many">;
|
|
39
|
-
}, "strip", z.ZodTypeAny, {
|
|
40
|
-
id: string;
|
|
41
|
-
progress: number;
|
|
42
|
-
target: number;
|
|
43
|
-
week: string;
|
|
44
|
-
dailyMilestones: {
|
|
45
|
-
id: string;
|
|
46
|
-
date: string;
|
|
47
|
-
progress: number;
|
|
48
|
-
target: number;
|
|
49
|
-
}[];
|
|
50
|
-
}, {
|
|
51
|
-
id: string;
|
|
52
|
-
progress: number;
|
|
53
|
-
target: number;
|
|
54
|
-
week: string;
|
|
55
|
-
dailyMilestones: {
|
|
56
|
-
id: string;
|
|
57
|
-
date: string;
|
|
58
|
-
progress: number;
|
|
59
|
-
target: number;
|
|
60
|
-
}[];
|
|
61
|
-
}>;
|
|
62
|
-
export declare const GoalSchema: z.ZodObject<{
|
|
63
|
-
id: z.ZodString;
|
|
64
|
-
editorId: z.ZodString;
|
|
65
|
-
month: z.ZodString;
|
|
66
|
-
target: z.ZodNumber;
|
|
67
|
-
progress: z.ZodNumber;
|
|
68
|
-
createdAt: z.ZodNumber;
|
|
69
|
-
weeklyMilestones: z.ZodArray<z.ZodObject<{
|
|
70
|
-
id: z.ZodString;
|
|
71
|
-
week: z.ZodString;
|
|
72
|
-
target: z.ZodNumber;
|
|
73
|
-
progress: z.ZodNumber;
|
|
74
|
-
dailyMilestones: z.ZodArray<z.ZodObject<{
|
|
75
|
-
id: z.ZodString;
|
|
76
|
-
date: z.ZodString;
|
|
77
|
-
target: z.ZodNumber;
|
|
78
|
-
progress: z.ZodNumber;
|
|
79
|
-
}, "strip", z.ZodTypeAny, {
|
|
80
|
-
id: string;
|
|
81
|
-
date: string;
|
|
82
|
-
progress: number;
|
|
83
|
-
target: number;
|
|
84
|
-
}, {
|
|
85
|
-
id: string;
|
|
86
|
-
date: string;
|
|
87
|
-
progress: number;
|
|
88
|
-
target: number;
|
|
89
|
-
}>, "many">;
|
|
90
|
-
}, "strip", z.ZodTypeAny, {
|
|
91
|
-
id: string;
|
|
92
|
-
progress: number;
|
|
93
|
-
target: number;
|
|
94
|
-
week: string;
|
|
95
|
-
dailyMilestones: {
|
|
96
|
-
id: string;
|
|
97
|
-
date: string;
|
|
98
|
-
progress: number;
|
|
99
|
-
target: number;
|
|
100
|
-
}[];
|
|
101
|
-
}, {
|
|
102
|
-
id: string;
|
|
103
|
-
progress: number;
|
|
104
|
-
target: number;
|
|
105
|
-
week: string;
|
|
106
|
-
dailyMilestones: {
|
|
107
|
-
id: string;
|
|
108
|
-
date: string;
|
|
109
|
-
progress: number;
|
|
110
|
-
target: number;
|
|
111
|
-
}[];
|
|
112
|
-
}>, "many">;
|
|
113
|
-
}, "strip", z.ZodTypeAny, {
|
|
114
|
-
id: string;
|
|
115
|
-
createdAt: number;
|
|
116
|
-
editorId: string;
|
|
117
|
-
progress: number;
|
|
118
|
-
target: number;
|
|
119
|
-
month: string;
|
|
120
|
-
weeklyMilestones: {
|
|
121
|
-
id: string;
|
|
122
|
-
progress: number;
|
|
123
|
-
target: number;
|
|
124
|
-
week: string;
|
|
125
|
-
dailyMilestones: {
|
|
126
|
-
id: string;
|
|
127
|
-
date: string;
|
|
128
|
-
progress: number;
|
|
129
|
-
target: number;
|
|
130
|
-
}[];
|
|
131
|
-
}[];
|
|
132
|
-
}, {
|
|
133
|
-
id: string;
|
|
134
|
-
createdAt: number;
|
|
135
|
-
editorId: string;
|
|
136
|
-
progress: number;
|
|
137
|
-
target: number;
|
|
138
|
-
month: string;
|
|
139
|
-
weeklyMilestones: {
|
|
140
|
-
id: string;
|
|
141
|
-
progress: number;
|
|
142
|
-
target: number;
|
|
143
|
-
week: string;
|
|
144
|
-
dailyMilestones: {
|
|
145
|
-
id: string;
|
|
146
|
-
date: string;
|
|
147
|
-
progress: number;
|
|
148
|
-
target: number;
|
|
149
|
-
}[];
|
|
150
|
-
}[];
|
|
151
|
-
}>;
|
|
152
|
-
export type DailyMilestone = z.infer<typeof DailyMilestoneSchema>;
|
|
153
|
-
export type WeeklyMilestone = z.infer<typeof WeeklyMilestoneSchema>;
|
|
154
|
-
export type Goal = z.infer<typeof GoalSchema>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GoalSchema = exports.WeeklyMilestoneSchema = exports.DailyMilestoneSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.DailyMilestoneSchema = zod_1.z.object({
|
|
6
|
-
id: zod_1.z.string(),
|
|
7
|
-
date: zod_1.z.string(),
|
|
8
|
-
target: zod_1.z.number(),
|
|
9
|
-
progress: zod_1.z.number(),
|
|
10
|
-
});
|
|
11
|
-
exports.WeeklyMilestoneSchema = zod_1.z.object({
|
|
12
|
-
id: zod_1.z.string(),
|
|
13
|
-
week: zod_1.z.string(),
|
|
14
|
-
target: zod_1.z.number(),
|
|
15
|
-
progress: zod_1.z.number(),
|
|
16
|
-
dailyMilestones: zod_1.z.array(exports.DailyMilestoneSchema),
|
|
17
|
-
});
|
|
18
|
-
exports.GoalSchema = zod_1.z.object({
|
|
19
|
-
id: zod_1.z.string(),
|
|
20
|
-
editorId: zod_1.z.string(),
|
|
21
|
-
month: zod_1.z.string(), // ex: "2024-04"
|
|
22
|
-
target: zod_1.z.number(),
|
|
23
|
-
progress: zod_1.z.number(),
|
|
24
|
-
createdAt: zod_1.z.number(),
|
|
25
|
-
weeklyMilestones: zod_1.z.array(exports.WeeklyMilestoneSchema),
|
|
26
|
-
});
|
package/dist/model/goal/index.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.WeeklyMilestoneSchema = exports.DailyMilestoneSchema = exports.GoalSchema = void 0;
|
|
18
|
-
var Goal_schema_1 = require("./Goal.schema");
|
|
19
|
-
Object.defineProperty(exports, "GoalSchema", { enumerable: true, get: function () { return Goal_schema_1.GoalSchema; } });
|
|
20
|
-
Object.defineProperty(exports, "DailyMilestoneSchema", { enumerable: true, get: function () { return Goal_schema_1.DailyMilestoneSchema; } });
|
|
21
|
-
Object.defineProperty(exports, "WeeklyMilestoneSchema", { enumerable: true, get: function () { return Goal_schema_1.WeeklyMilestoneSchema; } });
|
|
22
|
-
__exportStar(require("./Goal.api"), exports);
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import Context from "../Context";
|
|
2
|
-
import { Note } from "./Note.schema";
|
|
3
|
-
export interface IAPI {
|
|
4
|
-
list: (c: Context, userId: string) => Promise<Note[]>;
|
|
5
|
-
add: (c: Context, note: Partial<Note>) => Promise<Note>;
|
|
6
|
-
update: (c: Context, id: string, script: Partial<Note>) => Promise<Note>;
|
|
7
|
-
delete: (c: Context, id: string) => Promise<boolean>;
|
|
8
|
-
}
|
|
9
|
-
export declare const Endpoints: {
|
|
10
|
-
GetNotes: {
|
|
11
|
-
uri: string;
|
|
12
|
-
method: string;
|
|
13
|
-
};
|
|
14
|
-
AddNote: {
|
|
15
|
-
uri: string;
|
|
16
|
-
method: string;
|
|
17
|
-
};
|
|
18
|
-
DeleteNote: {
|
|
19
|
-
uri: string;
|
|
20
|
-
method: string;
|
|
21
|
-
};
|
|
22
|
-
UpdateNote: {
|
|
23
|
-
uri: string;
|
|
24
|
-
method: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Endpoints = void 0;
|
|
4
|
-
exports.Endpoints = {
|
|
5
|
-
GetNotes: {
|
|
6
|
-
uri: "/user-context/notes/user/:userId/",
|
|
7
|
-
method: "GET",
|
|
8
|
-
},
|
|
9
|
-
AddNote: {
|
|
10
|
-
uri: "/user-context/notes/",
|
|
11
|
-
method: "PUT",
|
|
12
|
-
},
|
|
13
|
-
DeleteNote: {
|
|
14
|
-
uri: "/user-context/notes/:id/",
|
|
15
|
-
method: "DELETE",
|
|
16
|
-
},
|
|
17
|
-
UpdateNote: {
|
|
18
|
-
uri: "/user-context/notes/:id/",
|
|
19
|
-
method: "POST",
|
|
20
|
-
},
|
|
21
|
-
};
|