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,141 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
declare const NoteHistorySchema: z.ZodObject<{
|
|
3
|
-
type: z.ZodEnum<["created", "updated", "deleted", "asset-added", "asset-removed"]>;
|
|
4
|
-
actorEmail: z.ZodString;
|
|
5
|
-
timestamp: z.ZodNumber;
|
|
6
|
-
details: z.ZodOptional<z.ZodString>;
|
|
7
|
-
}, "strip", z.ZodTypeAny, {
|
|
8
|
-
type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
|
|
9
|
-
timestamp: number;
|
|
10
|
-
actorEmail: string;
|
|
11
|
-
details?: string | undefined;
|
|
12
|
-
}, {
|
|
13
|
-
type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
|
|
14
|
-
timestamp: number;
|
|
15
|
-
actorEmail: string;
|
|
16
|
-
details?: string | undefined;
|
|
17
|
-
}>;
|
|
18
|
-
declare const NoteSchema: z.ZodObject<{
|
|
19
|
-
id: z.ZodString;
|
|
20
|
-
userId: z.ZodString;
|
|
21
|
-
authorEmail: z.ZodString;
|
|
22
|
-
assets: z.ZodArray<z.ZodObject<{
|
|
23
|
-
assetId: z.ZodString;
|
|
24
|
-
fileName: z.ZodString;
|
|
25
|
-
extension: z.ZodString;
|
|
26
|
-
fileSize: z.ZodNumber;
|
|
27
|
-
assetUrl: z.ZodString;
|
|
28
|
-
thumbnailUrl: z.ZodString;
|
|
29
|
-
type: z.ZodString;
|
|
30
|
-
duration: z.ZodOptional<z.ZodNumber>;
|
|
31
|
-
progress: z.ZodOptional<z.ZodNumber>;
|
|
32
|
-
error: z.ZodOptional<z.ZodString>;
|
|
33
|
-
authorId: z.ZodString;
|
|
34
|
-
uploadedAt: z.ZodNumber;
|
|
35
|
-
}, "strip", z.ZodTypeAny, {
|
|
36
|
-
type: string;
|
|
37
|
-
assetId: string;
|
|
38
|
-
fileName: string;
|
|
39
|
-
extension: string;
|
|
40
|
-
fileSize: number;
|
|
41
|
-
assetUrl: string;
|
|
42
|
-
thumbnailUrl: string;
|
|
43
|
-
authorId: string;
|
|
44
|
-
uploadedAt: number;
|
|
45
|
-
error?: string | undefined;
|
|
46
|
-
duration?: number | undefined;
|
|
47
|
-
progress?: number | undefined;
|
|
48
|
-
}, {
|
|
49
|
-
type: string;
|
|
50
|
-
assetId: string;
|
|
51
|
-
fileName: string;
|
|
52
|
-
extension: string;
|
|
53
|
-
fileSize: number;
|
|
54
|
-
assetUrl: string;
|
|
55
|
-
thumbnailUrl: string;
|
|
56
|
-
authorId: string;
|
|
57
|
-
uploadedAt: number;
|
|
58
|
-
error?: string | undefined;
|
|
59
|
-
duration?: number | undefined;
|
|
60
|
-
progress?: number | undefined;
|
|
61
|
-
}>, "many">;
|
|
62
|
-
title: z.ZodString;
|
|
63
|
-
content: z.ZodString;
|
|
64
|
-
createdAt: z.ZodNumber;
|
|
65
|
-
modified: z.ZodNumber;
|
|
66
|
-
history: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
67
|
-
type: z.ZodEnum<["created", "updated", "deleted", "asset-added", "asset-removed"]>;
|
|
68
|
-
actorEmail: z.ZodString;
|
|
69
|
-
timestamp: z.ZodNumber;
|
|
70
|
-
details: z.ZodOptional<z.ZodString>;
|
|
71
|
-
}, "strip", z.ZodTypeAny, {
|
|
72
|
-
type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
|
|
73
|
-
timestamp: number;
|
|
74
|
-
actorEmail: string;
|
|
75
|
-
details?: string | undefined;
|
|
76
|
-
}, {
|
|
77
|
-
type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
|
|
78
|
-
timestamp: number;
|
|
79
|
-
actorEmail: string;
|
|
80
|
-
details?: string | undefined;
|
|
81
|
-
}>, "many">>;
|
|
82
|
-
}, "strip", z.ZodTypeAny, {
|
|
83
|
-
id: string;
|
|
84
|
-
userId: string;
|
|
85
|
-
title: string;
|
|
86
|
-
createdAt: number;
|
|
87
|
-
modified: number;
|
|
88
|
-
content: string;
|
|
89
|
-
assets: {
|
|
90
|
-
type: string;
|
|
91
|
-
assetId: string;
|
|
92
|
-
fileName: string;
|
|
93
|
-
extension: string;
|
|
94
|
-
fileSize: number;
|
|
95
|
-
assetUrl: string;
|
|
96
|
-
thumbnailUrl: string;
|
|
97
|
-
authorId: string;
|
|
98
|
-
uploadedAt: number;
|
|
99
|
-
error?: string | undefined;
|
|
100
|
-
duration?: number | undefined;
|
|
101
|
-
progress?: number | undefined;
|
|
102
|
-
}[];
|
|
103
|
-
authorEmail: string;
|
|
104
|
-
history?: {
|
|
105
|
-
type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
|
|
106
|
-
timestamp: number;
|
|
107
|
-
actorEmail: string;
|
|
108
|
-
details?: string | undefined;
|
|
109
|
-
}[] | undefined;
|
|
110
|
-
}, {
|
|
111
|
-
id: string;
|
|
112
|
-
userId: string;
|
|
113
|
-
title: string;
|
|
114
|
-
createdAt: number;
|
|
115
|
-
modified: number;
|
|
116
|
-
content: string;
|
|
117
|
-
assets: {
|
|
118
|
-
type: string;
|
|
119
|
-
assetId: string;
|
|
120
|
-
fileName: string;
|
|
121
|
-
extension: string;
|
|
122
|
-
fileSize: number;
|
|
123
|
-
assetUrl: string;
|
|
124
|
-
thumbnailUrl: string;
|
|
125
|
-
authorId: string;
|
|
126
|
-
uploadedAt: number;
|
|
127
|
-
error?: string | undefined;
|
|
128
|
-
duration?: number | undefined;
|
|
129
|
-
progress?: number | undefined;
|
|
130
|
-
}[];
|
|
131
|
-
authorEmail: string;
|
|
132
|
-
history?: {
|
|
133
|
-
type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
|
|
134
|
-
timestamp: number;
|
|
135
|
-
actorEmail: string;
|
|
136
|
-
details?: string | undefined;
|
|
137
|
-
}[] | undefined;
|
|
138
|
-
}>;
|
|
139
|
-
type Note = z.infer<typeof NoteSchema>;
|
|
140
|
-
type NoteHistory = z.infer<typeof NoteHistorySchema>;
|
|
141
|
-
export { NoteHistorySchema, NoteSchema, NoteHistory, Note };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NoteSchema = exports.NoteHistorySchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const asset_1 = require("../asset");
|
|
6
|
-
const NoteHistorySchema = zod_1.z.object({
|
|
7
|
-
type: zod_1.z.enum([
|
|
8
|
-
"created",
|
|
9
|
-
"updated",
|
|
10
|
-
"deleted",
|
|
11
|
-
"asset-added",
|
|
12
|
-
"asset-removed",
|
|
13
|
-
]),
|
|
14
|
-
actorEmail: zod_1.z.string().email(),
|
|
15
|
-
timestamp: zod_1.z.number(),
|
|
16
|
-
details: zod_1.z.string().optional(),
|
|
17
|
-
});
|
|
18
|
-
exports.NoteHistorySchema = NoteHistorySchema;
|
|
19
|
-
const NoteSchema = zod_1.z.object({
|
|
20
|
-
id: zod_1.z.string(),
|
|
21
|
-
userId: zod_1.z.string(),
|
|
22
|
-
authorEmail: zod_1.z.string().email(),
|
|
23
|
-
assets: zod_1.z.array(asset_1.AssetSchema),
|
|
24
|
-
title: zod_1.z.string(),
|
|
25
|
-
content: zod_1.z.string(),
|
|
26
|
-
createdAt: zod_1.z.number(),
|
|
27
|
-
modified: zod_1.z.number(),
|
|
28
|
-
history: zod_1.z.array(NoteHistorySchema).optional(),
|
|
29
|
-
});
|
|
30
|
-
exports.NoteSchema = NoteSchema;
|
package/dist/model/note/index.js
DELETED
|
@@ -1,21 +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.NoteHistorySchema = exports.NoteSchema = void 0;
|
|
18
|
-
var Note_schema_1 = require("./Note.schema");
|
|
19
|
-
Object.defineProperty(exports, "NoteSchema", { enumerable: true, get: function () { return Note_schema_1.NoteSchema; } });
|
|
20
|
-
Object.defineProperty(exports, "NoteHistorySchema", { enumerable: true, get: function () { return Note_schema_1.NoteHistorySchema; } });
|
|
21
|
-
__exportStar(require("./Note.api"), exports);
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import Context from "../Context";
|
|
2
|
-
import { Trigger, NotificationDetail, NotificationItem } from "./Notification.schema";
|
|
3
|
-
import * as Core from "../core/";
|
|
4
|
-
export interface IAPI {
|
|
5
|
-
getTriggers: (ctx: Context) => Promise<Core.APIResponse<Trigger>>;
|
|
6
|
-
createTrigger: (ctx: Context, t: Trigger) => Promise<Trigger>;
|
|
7
|
-
deleteTrigger: (ctx: Context, triggerId: string) => Promise<boolean>;
|
|
8
|
-
updateTrigger: (ctx: Context, triggerId: string, trigger: Partial<Trigger>) => Promise<Trigger>;
|
|
9
|
-
push: (context: Context, notification: NotificationDetail) => Promise<boolean>;
|
|
10
|
-
getNotifications: (ctx: Context) => Promise<Core.APIResponse<NotificationItem>>;
|
|
11
|
-
markAsRead: (ctx: Context, id: string) => Promise<boolean>;
|
|
12
|
-
clearNotifications: (ctx: Context) => Promise<boolean>;
|
|
13
|
-
}
|
|
14
|
-
export declare const Endpoints: {
|
|
15
|
-
Create: {
|
|
16
|
-
uri: string;
|
|
17
|
-
method: string;
|
|
18
|
-
};
|
|
19
|
-
List: {
|
|
20
|
-
uri: string;
|
|
21
|
-
method: string;
|
|
22
|
-
};
|
|
23
|
-
Update: {
|
|
24
|
-
uri: string;
|
|
25
|
-
method: string;
|
|
26
|
-
};
|
|
27
|
-
Delete: {
|
|
28
|
-
uri: string;
|
|
29
|
-
method: string;
|
|
30
|
-
};
|
|
31
|
-
Push: {
|
|
32
|
-
uri: string;
|
|
33
|
-
method: string;
|
|
34
|
-
};
|
|
35
|
-
ListNotifications: {
|
|
36
|
-
uri: string;
|
|
37
|
-
method: string;
|
|
38
|
-
};
|
|
39
|
-
MarkAsRead: {
|
|
40
|
-
uri: string;
|
|
41
|
-
method: string;
|
|
42
|
-
};
|
|
43
|
-
ClearNotifications: {
|
|
44
|
-
uri: string;
|
|
45
|
-
method: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Endpoints = void 0;
|
|
4
|
-
exports.Endpoints = {
|
|
5
|
-
Create: { uri: "/notifications/trigger/", method: "POST" },
|
|
6
|
-
List: { uri: "/notifications/trigger/list/", method: "GET" },
|
|
7
|
-
Update: { uri: "/notifications/trigger/:id/", method: "PUT" },
|
|
8
|
-
Delete: { uri: "/notifications/trigger/:id/", method: "DELETE" },
|
|
9
|
-
Push: { uri: "/notifications/push/", method: "POST" },
|
|
10
|
-
ListNotifications: { uri: "/notifications/list/", method: "GET" },
|
|
11
|
-
MarkAsRead: { uri: "/notifications/:id/read/", method: "PUT" },
|
|
12
|
-
ClearNotifications: { uri: "/notifications/clear/", method: "DELETE" },
|
|
13
|
-
};
|