assembly-kit 0.0.4 → 0.0.7
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/CLAUDE.md +34 -30
- package/README.md +39 -31
- package/dist/client/index.d.mts +6 -0
- package/dist/client/index.mjs +9 -0
- package/dist/client/index.mjs.map +1 -1
- package/dist/index.d.mts +14 -11
- package/dist/index.mjs +14 -11
- package/dist/lib/modules/app-installs/resource.d.mts +13 -1
- package/dist/lib/modules/app-installs/resource.mjs +25 -1
- package/dist/lib/modules/app-installs/resource.mjs.map +1 -1
- package/dist/lib/modules/app-installs/schema.d.mts +47 -1
- package/dist/lib/modules/app-installs/schema.mjs +37 -1
- package/dist/lib/modules/app-installs/schema.mjs.map +1 -1
- package/dist/lib/modules/clients/resource.d.mts +3 -1
- package/dist/lib/modules/clients/resource.mjs +9 -1
- package/dist/lib/modules/clients/resource.mjs.map +1 -1
- package/dist/lib/modules/clients/schema.d.mts +11 -3
- package/dist/lib/modules/clients/schema.mjs +12 -4
- package/dist/lib/modules/clients/schema.mjs.map +1 -1
- package/dist/lib/modules/companies/resource.d.mts +7 -1
- package/dist/lib/modules/companies/resource.mjs +10 -1
- package/dist/lib/modules/companies/resource.mjs.map +1 -1
- package/dist/lib/modules/companies/schema.d.mts +18 -1
- package/dist/lib/modules/companies/schema.mjs +13 -1
- package/dist/lib/modules/companies/schema.mjs.map +1 -1
- package/dist/lib/modules/custom-fields/resource.d.mts +3 -1
- package/dist/lib/modules/custom-fields/resource.mjs +9 -1
- package/dist/lib/modules/custom-fields/resource.mjs.map +1 -1
- package/dist/lib/modules/custom-fields/schema.d.mts +19 -1
- package/dist/lib/modules/custom-fields/schema.mjs +9 -1
- package/dist/lib/modules/custom-fields/schema.mjs.map +1 -1
- package/dist/lib/modules/files/resource.d.mts +15 -1
- package/dist/lib/modules/files/resource.mjs +29 -1
- package/dist/lib/modules/files/resource.mjs.map +1 -1
- package/dist/lib/modules/files/schema.d.mts +15 -1
- package/dist/lib/modules/files/schema.mjs +8 -1
- package/dist/lib/modules/files/schema.mjs.map +1 -1
- package/dist/lib/modules/forms/resource.d.mts +15 -1
- package/dist/lib/modules/forms/resource.mjs +25 -0
- package/dist/lib/modules/forms/resource.mjs.map +1 -1
- package/dist/lib/modules/forms/schema.d.mts +35 -1
- package/dist/lib/modules/forms/schema.mjs +40 -1
- package/dist/lib/modules/forms/schema.mjs.map +1 -1
- package/dist/lib/modules/index.d.mts +13 -10
- package/dist/lib/modules/index.mjs +3 -0
- package/dist/lib/modules/internal-users/resource.d.mts +8 -1
- package/dist/lib/modules/internal-users/resource.mjs +17 -1
- package/dist/lib/modules/internal-users/resource.mjs.map +1 -1
- package/dist/lib/modules/internal-users/schema.d.mts +22 -1
- package/dist/lib/modules/internal-users/schema.mjs +22 -1
- package/dist/lib/modules/internal-users/schema.mjs.map +1 -1
- package/dist/lib/modules/invoices/schema.d.mts +1 -1
- package/dist/lib/modules/invoices/schema.mjs +1 -0
- package/dist/lib/modules/invoices/schema.mjs.map +1 -1
- package/dist/lib/modules/me/resource.d.mts +19 -0
- package/dist/lib/modules/me/resource.mjs +23 -0
- package/dist/lib/modules/me/resource.mjs.map +1 -0
- package/dist/lib/modules/me/schema.d.mts +15 -0
- package/dist/lib/modules/me/schema.mjs +13 -0
- package/dist/lib/modules/me/schema.mjs.map +1 -0
- package/dist/lib/modules/message-channels/resource.d.mts +5 -1
- package/dist/lib/modules/message-channels/resource.mjs +9 -1
- package/dist/lib/modules/message-channels/resource.mjs.map +1 -1
- package/dist/lib/modules/message-channels/schema.d.mts +10 -1
- package/dist/lib/modules/message-channels/schema.mjs +7 -1
- package/dist/lib/modules/message-channels/schema.mjs.map +1 -1
- package/dist/lib/modules/notifications/resource.d.mts +2 -0
- package/dist/lib/modules/notifications/resource.mjs +8 -0
- package/dist/lib/modules/notifications/resource.mjs.map +1 -1
- package/dist/lib/modules/prices/resource.d.mts +3 -1
- package/dist/lib/modules/prices/resource.mjs +8 -0
- package/dist/lib/modules/prices/resource.mjs.map +1 -1
- package/dist/lib/modules/prices/schema.d.mts +14 -1
- package/dist/lib/modules/prices/schema.mjs +19 -1
- package/dist/lib/modules/prices/schema.mjs.map +1 -1
- package/dist/lib/modules/products/resource.d.mts +3 -1
- package/dist/lib/modules/products/resource.mjs +8 -0
- package/dist/lib/modules/products/resource.mjs.map +1 -1
- package/dist/lib/modules/products/schema.d.mts +7 -1
- package/dist/lib/modules/products/schema.mjs +6 -1
- package/dist/lib/modules/products/schema.mjs.map +1 -1
- package/dist/lib/modules/refunds/resource.d.mts +27 -0
- package/dist/lib/modules/refunds/resource.mjs +40 -0
- package/dist/lib/modules/refunds/resource.mjs.map +1 -0
- package/dist/lib/modules/refunds/schema.d.mts +35 -0
- package/dist/lib/modules/refunds/schema.mjs +32 -0
- package/dist/lib/modules/refunds/schema.mjs.map +1 -0
- package/dist/lib/modules/task-comments/resource.d.mts +29 -0
- package/dist/lib/modules/task-comments/resource.mjs +44 -0
- package/dist/lib/modules/task-comments/resource.mjs.map +1 -0
- package/dist/lib/modules/task-comments/schema.d.mts +24 -0
- package/dist/lib/modules/task-comments/schema.mjs +21 -0
- package/dist/lib/modules/task-comments/schema.mjs.map +1 -0
- package/dist/lib/modules/tasks/schema.d.mts +1 -1
- package/dist/lib/modules/tasks/schema.mjs +1 -1
- package/dist/lib/modules/tasks/schema.mjs.map +1 -1
- package/dist/schemas/index.d.mts +14 -11
- package/dist/schemas/index.mjs +14 -11
- package/dist/token/assembly-token.d.mts +6 -0
- package/dist/token/assembly-token.mjs +8 -0
- package/dist/token/assembly-token.mjs.map +1 -1
- package/dist/transport/http.d.mts +2 -0
- package/dist/transport/http.mjs +1 -0
- package/dist/transport/http.mjs.map +1 -1
- package/dist/version.mjs +1 -1
- package/dist/version.mjs.map +1 -1
- package/package.json +2 -4
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/lib/modules/refunds/schema.d.ts
|
|
4
|
+
type RefundStatus = "failed" | "pending" | "succeeded";
|
|
5
|
+
declare const RefundStatusSchema: z.ZodType<RefundStatus>;
|
|
6
|
+
interface Refund {
|
|
7
|
+
amount: number;
|
|
8
|
+
completedAt?: string;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
creatorId?: string;
|
|
11
|
+
failureReason?: string;
|
|
12
|
+
id: string;
|
|
13
|
+
identityId?: string;
|
|
14
|
+
invoiceId: string;
|
|
15
|
+
object: string;
|
|
16
|
+
receiptKey?: string;
|
|
17
|
+
ref?: string;
|
|
18
|
+
status: RefundStatus;
|
|
19
|
+
updatedAt?: string;
|
|
20
|
+
}
|
|
21
|
+
declare const RefundSchema: z.ZodType<Refund>;
|
|
22
|
+
declare const RefundResponseSchema: z.ZodType<Refund>;
|
|
23
|
+
type RefundResponse = Refund;
|
|
24
|
+
interface RefundsResponse {
|
|
25
|
+
data: Refund[] | null;
|
|
26
|
+
nextToken?: string;
|
|
27
|
+
}
|
|
28
|
+
declare const RefundsResponseSchema: z.ZodType<RefundsResponse>;
|
|
29
|
+
interface RefundCreateRequest {
|
|
30
|
+
invoiceId: string;
|
|
31
|
+
}
|
|
32
|
+
declare const RefundCreateRequestSchema: z.ZodType<RefundCreateRequest>;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { Refund, RefundCreateRequest, RefundCreateRequestSchema, RefundResponse, RefundResponseSchema, RefundSchema, RefundStatus, RefundStatusSchema, RefundsResponse, RefundsResponseSchema };
|
|
35
|
+
//# sourceMappingURL=schema.d.mts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/lib/modules/refunds/schema.ts
|
|
3
|
+
const RefundStatusSchema = z.enum([
|
|
4
|
+
"pending",
|
|
5
|
+
"succeeded",
|
|
6
|
+
"failed"
|
|
7
|
+
]);
|
|
8
|
+
const RefundSchema = z.object({
|
|
9
|
+
amount: z.number(),
|
|
10
|
+
completedAt: z.string().optional(),
|
|
11
|
+
createdAt: z.string(),
|
|
12
|
+
creatorId: z.string().optional(),
|
|
13
|
+
failureReason: z.string().optional(),
|
|
14
|
+
id: z.string(),
|
|
15
|
+
identityId: z.string().optional(),
|
|
16
|
+
invoiceId: z.string(),
|
|
17
|
+
object: z.string(),
|
|
18
|
+
receiptKey: z.string().optional(),
|
|
19
|
+
ref: z.string().optional(),
|
|
20
|
+
status: RefundStatusSchema,
|
|
21
|
+
updatedAt: z.string().optional()
|
|
22
|
+
});
|
|
23
|
+
const RefundResponseSchema = RefundSchema;
|
|
24
|
+
const RefundsResponseSchema = z.object({
|
|
25
|
+
data: z.array(RefundSchema).nullable(),
|
|
26
|
+
nextToken: z.string().optional()
|
|
27
|
+
});
|
|
28
|
+
const RefundCreateRequestSchema = z.object({ invoiceId: z.string() });
|
|
29
|
+
//#endregion
|
|
30
|
+
export { RefundCreateRequestSchema, RefundResponseSchema, RefundSchema, RefundStatusSchema, RefundsResponseSchema };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=schema.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.mjs","names":[],"sources":["../../../../src/lib/modules/refunds/schema.ts"],"sourcesContent":["import { z } from \"zod\";\n\n// ─── Base ─────────────────────────────────────────────────────────────────────\n\nexport type RefundStatus = \"failed\" | \"pending\" | \"succeeded\";\n\nexport const RefundStatusSchema: z.ZodType<RefundStatus> = z.enum([\n \"pending\",\n \"succeeded\",\n \"failed\",\n]);\n\nexport interface Refund {\n amount: number;\n completedAt?: string;\n createdAt: string;\n creatorId?: string;\n failureReason?: string;\n id: string;\n identityId?: string;\n invoiceId: string;\n object: string;\n receiptKey?: string;\n ref?: string;\n status: RefundStatus;\n updatedAt?: string;\n}\n\nexport const RefundSchema: z.ZodType<Refund> = z.object({\n amount: z.number(),\n completedAt: z.string().optional(),\n createdAt: z.string(),\n creatorId: z.string().optional(),\n failureReason: z.string().optional(),\n id: z.string(),\n identityId: z.string().optional(),\n invoiceId: z.string(),\n object: z.string(),\n receiptKey: z.string().optional(),\n ref: z.string().optional(),\n status: RefundStatusSchema,\n updatedAt: z.string().optional(),\n});\n\n// ─── Response ─────────────────────────────────────────────────────────────────\n\nexport const RefundResponseSchema: z.ZodType<Refund> = RefundSchema;\nexport type RefundResponse = Refund;\n\nexport interface RefundsResponse {\n data: Refund[] | null;\n nextToken?: string;\n}\n\nexport const RefundsResponseSchema: z.ZodType<RefundsResponse> = z.object({\n data: z.array(RefundSchema).nullable(),\n nextToken: z.string().optional(),\n});\n\n// ─── Requests ─────────────────────────────────────────────────────────────────\n\nexport interface RefundCreateRequest {\n invoiceId: string;\n}\n\nexport const RefundCreateRequestSchema: z.ZodType<RefundCreateRequest> = z.object({\n invoiceId: z.string(),\n});\n"],"mappings":";;AAMA,MAAa,qBAA8C,EAAE,KAAK;CAChE;CACA;CACA;CACD,CAAC;AAkBF,MAAa,eAAkC,EAAE,OAAO;CACtD,QAAQ,EAAE,QAAQ;CAClB,aAAa,EAAE,QAAQ,CAAC,UAAU;CAClC,WAAW,EAAE,QAAQ;CACrB,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,eAAe,EAAE,QAAQ,CAAC,UAAU;CACpC,IAAI,EAAE,QAAQ;CACd,YAAY,EAAE,QAAQ,CAAC,UAAU;CACjC,WAAW,EAAE,QAAQ;CACrB,QAAQ,EAAE,QAAQ;CAClB,YAAY,EAAE,QAAQ,CAAC,UAAU;CACjC,KAAK,EAAE,QAAQ,CAAC,UAAU;CAC1B,QAAQ;CACR,WAAW,EAAE,QAAQ,CAAC,UAAU;CACjC,CAAC;AAIF,MAAa,uBAA0C;AAQvD,MAAa,wBAAoD,EAAE,OAAO;CACxE,MAAM,EAAE,MAAM,aAAa,CAAC,UAAU;CACtC,WAAW,EAAE,QAAQ,CAAC,UAAU;CACjC,CAAC;AAQF,MAAa,4BAA4D,EAAE,OAAO,EAChF,WAAW,EAAE,QAAQ,EACtB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Transport } from "../../../transport/http.mjs";
|
|
2
|
+
import { ListArgs } from "../../pagination/paginate.mjs";
|
|
3
|
+
import { TaskComment, TaskCommentsResponse } from "./schema.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/lib/modules/task-comments/resource.d.ts
|
|
6
|
+
interface ListTaskCommentsArgs extends ListArgs {
|
|
7
|
+
taskId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare class TaskCommentsResource {
|
|
10
|
+
#private;
|
|
11
|
+
constructor({
|
|
12
|
+
transport,
|
|
13
|
+
validateResponses
|
|
14
|
+
}: {
|
|
15
|
+
transport: Transport;
|
|
16
|
+
validateResponses: boolean;
|
|
17
|
+
});
|
|
18
|
+
/** List task comments, optionally scoped to a single task. */
|
|
19
|
+
list(args?: ListTaskCommentsArgs): Promise<TaskCommentsResponse>;
|
|
20
|
+
/** Retrieve a single task comment by ID. */
|
|
21
|
+
retrieve(commentId: string): Promise<TaskComment>;
|
|
22
|
+
/** Delete a task comment by ID. */
|
|
23
|
+
delete(commentId: string): Promise<void>;
|
|
24
|
+
/** Iterate over all task comments, automatically paginating. Default limit per page: 500. */
|
|
25
|
+
listAll(args?: Omit<ListTaskCommentsArgs, "nextToken">): Promise<TaskComment[]>;
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { TaskCommentsResource };
|
|
29
|
+
//# sourceMappingURL=resource.d.mts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { buildSearchParams } from "../../../transport/build-search-params.mjs";
|
|
2
|
+
import { parseResponse } from "../../../transport/parse-response.mjs";
|
|
3
|
+
import { paginate } from "../../pagination/paginate.mjs";
|
|
4
|
+
import { TaskCommentResponseSchema, TaskCommentsResponseSchema } from "./schema.mjs";
|
|
5
|
+
//#region src/lib/modules/task-comments/resource.ts
|
|
6
|
+
var TaskCommentsResource = class {
|
|
7
|
+
#transport;
|
|
8
|
+
#validate;
|
|
9
|
+
constructor({ transport, validateResponses }) {
|
|
10
|
+
this.#transport = transport;
|
|
11
|
+
this.#validate = validateResponses;
|
|
12
|
+
}
|
|
13
|
+
/** List task comments, optionally scoped to a single task. */
|
|
14
|
+
async list(args = {}) {
|
|
15
|
+
return parseResponse({
|
|
16
|
+
schema: TaskCommentsResponseSchema,
|
|
17
|
+
data: await this.#transport.get("v1/comments", { searchParams: buildSearchParams(args) }),
|
|
18
|
+
validate: this.#validate
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/** Retrieve a single task comment by ID. */
|
|
22
|
+
async retrieve(commentId) {
|
|
23
|
+
return parseResponse({
|
|
24
|
+
schema: TaskCommentResponseSchema,
|
|
25
|
+
data: await this.#transport.get(`v1/comments/${commentId}`),
|
|
26
|
+
validate: this.#validate
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
/** Delete a task comment by ID. */
|
|
30
|
+
async delete(commentId) {
|
|
31
|
+
await this.#transport.delete(`v1/comments/${commentId}`);
|
|
32
|
+
}
|
|
33
|
+
/** Iterate over all task comments, automatically paginating. Default limit per page: 500. */
|
|
34
|
+
async listAll(args = {}) {
|
|
35
|
+
return paginate((listArgs) => this.list({
|
|
36
|
+
...args,
|
|
37
|
+
...listArgs
|
|
38
|
+
}), { limit: args.limit ?? 500 });
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { TaskCommentsResource };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=resource.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.mjs","names":["#transport","#validate"],"sources":["../../../../src/lib/modules/task-comments/resource.ts"],"sourcesContent":["import { paginate } from \"src/lib/pagination\";\nimport type { ListArgs } from \"src/lib/pagination\";\nimport { buildSearchParams } from \"src/transport/build-search-params\";\nimport type { Transport } from \"src/transport/http\";\nimport { parseResponse } from \"src/transport/parse-response\";\n\nimport { TaskCommentResponseSchema, TaskCommentsResponseSchema } from \"./schema\";\nimport type { TaskComment, TaskCommentsResponse } from \"./schema\";\n\nexport interface ListTaskCommentsArgs extends ListArgs {\n taskId?: string;\n}\n\nexport class TaskCommentsResource {\n readonly #transport: Transport;\n readonly #validate: boolean;\n\n constructor({\n transport,\n validateResponses,\n }: {\n transport: Transport;\n validateResponses: boolean;\n }) {\n this.#transport = transport;\n this.#validate = validateResponses;\n }\n\n /** List task comments, optionally scoped to a single task. */\n async list(args: ListTaskCommentsArgs = {}): Promise<TaskCommentsResponse> {\n const raw: unknown = await this.#transport.get(\"v1/comments\", {\n searchParams: buildSearchParams(args),\n });\n return parseResponse({\n schema: TaskCommentsResponseSchema,\n data: raw,\n validate: this.#validate,\n });\n }\n\n /** Retrieve a single task comment by ID. */\n async retrieve(commentId: string): Promise<TaskComment> {\n const raw: unknown = await this.#transport.get(`v1/comments/${commentId}`);\n return parseResponse({\n schema: TaskCommentResponseSchema,\n data: raw,\n validate: this.#validate,\n });\n }\n\n /** Delete a task comment by ID. */\n async delete(commentId: string): Promise<void> {\n await this.#transport.delete(`v1/comments/${commentId}`);\n }\n\n /** Iterate over all task comments, automatically paginating. Default limit per page: 500. */\n async listAll(args: Omit<ListTaskCommentsArgs, \"nextToken\"> = {}): Promise<TaskComment[]> {\n return paginate((listArgs) => this.list({ ...args, ...listArgs }), {\n limit: args.limit ?? 500,\n });\n }\n}\n"],"mappings":";;;;;AAaA,IAAa,uBAAb,MAAkC;CAChC;CACA;CAEA,YAAY,EACV,WACA,qBAIC;AACD,QAAA,YAAkB;AAClB,QAAA,WAAiB;;;CAInB,MAAM,KAAK,OAA6B,EAAE,EAAiC;AAIzE,SAAO,cAAc;GACnB,QAAQ;GACR,MAAM,MALmB,MAAA,UAAgB,IAAI,eAAe,EAC5D,cAAc,kBAAkB,KAAK,EACtC,CAAC;GAIA,UAAU,MAAA;GACX,CAAC;;;CAIJ,MAAM,SAAS,WAAyC;AAEtD,SAAO,cAAc;GACnB,QAAQ;GACR,MAAM,MAHmB,MAAA,UAAgB,IAAI,eAAe,YAAY;GAIxE,UAAU,MAAA;GACX,CAAC;;;CAIJ,MAAM,OAAO,WAAkC;AAC7C,QAAM,MAAA,UAAgB,OAAO,eAAe,YAAY;;;CAI1D,MAAM,QAAQ,OAAgD,EAAE,EAA0B;AACxF,SAAO,UAAU,aAAa,KAAK,KAAK;GAAE,GAAG;GAAM,GAAG;GAAU,CAAC,EAAE,EACjE,OAAO,KAAK,SAAS,KACtB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/lib/modules/task-comments/schema.d.ts
|
|
4
|
+
interface TaskComment {
|
|
5
|
+
authorId: string;
|
|
6
|
+
content: string;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
deleted?: boolean;
|
|
9
|
+
id: string;
|
|
10
|
+
object: string;
|
|
11
|
+
taskId: string;
|
|
12
|
+
updatedAt?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const TaskCommentSchema: z.ZodType<TaskComment>;
|
|
15
|
+
declare const TaskCommentResponseSchema: z.ZodType<TaskComment>;
|
|
16
|
+
type TaskCommentResponse = TaskComment;
|
|
17
|
+
interface TaskCommentsResponse {
|
|
18
|
+
data: TaskComment[] | null;
|
|
19
|
+
nextToken?: string;
|
|
20
|
+
}
|
|
21
|
+
declare const TaskCommentsResponseSchema: z.ZodType<TaskCommentsResponse>;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { TaskComment, TaskCommentResponse, TaskCommentResponseSchema, TaskCommentSchema, TaskCommentsResponse, TaskCommentsResponseSchema };
|
|
24
|
+
//# sourceMappingURL=schema.d.mts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/lib/modules/task-comments/schema.ts
|
|
3
|
+
const TaskCommentSchema = z.object({
|
|
4
|
+
authorId: z.string(),
|
|
5
|
+
content: z.string(),
|
|
6
|
+
createdAt: z.string(),
|
|
7
|
+
deleted: z.boolean().optional(),
|
|
8
|
+
id: z.string(),
|
|
9
|
+
object: z.string(),
|
|
10
|
+
taskId: z.string(),
|
|
11
|
+
updatedAt: z.string().optional()
|
|
12
|
+
});
|
|
13
|
+
const TaskCommentResponseSchema = TaskCommentSchema;
|
|
14
|
+
const TaskCommentsResponseSchema = z.object({
|
|
15
|
+
data: z.array(TaskCommentSchema).nullable(),
|
|
16
|
+
nextToken: z.string().optional()
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { TaskCommentResponseSchema, TaskCommentSchema, TaskCommentsResponseSchema };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=schema.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.mjs","names":[],"sources":["../../../../src/lib/modules/task-comments/schema.ts"],"sourcesContent":["import { z } from \"zod\";\n\n// ─── Base ─────────────────────────────────────────────────────────────────────\n\nexport interface TaskComment {\n authorId: string;\n content: string;\n createdAt: string;\n deleted?: boolean;\n id: string;\n object: string;\n taskId: string;\n updatedAt?: string;\n}\n\nexport const TaskCommentSchema: z.ZodType<TaskComment> = z.object({\n authorId: z.string(),\n content: z.string(),\n createdAt: z.string(),\n deleted: z.boolean().optional(),\n id: z.string(),\n object: z.string(),\n taskId: z.string(),\n updatedAt: z.string().optional(),\n});\n\n// ─── Response ─────────────────────────────────────────────────────────────────\n\nexport const TaskCommentResponseSchema: z.ZodType<TaskComment> = TaskCommentSchema;\nexport type TaskCommentResponse = TaskComment;\n\nexport interface TaskCommentsResponse {\n data: TaskComment[] | null;\n nextToken?: string;\n}\n\nexport const TaskCommentsResponseSchema: z.ZodType<TaskCommentsResponse> = z.object({\n data: z.array(TaskCommentSchema).nullable(),\n nextToken: z.string().optional(),\n});\n"],"mappings":";;AAeA,MAAa,oBAA4C,EAAE,OAAO;CAChE,UAAU,EAAE,QAAQ;CACpB,SAAS,EAAE,QAAQ;CACnB,WAAW,EAAE,QAAQ;CACrB,SAAS,EAAE,SAAS,CAAC,UAAU;CAC/B,IAAI,EAAE,QAAQ;CACd,QAAQ,EAAE,QAAQ;CAClB,QAAQ,EAAE,QAAQ;CAClB,WAAW,EAAE,QAAQ,CAAC,UAAU;CACjC,CAAC;AAIF,MAAa,4BAAoD;AAQjE,MAAa,6BAA8D,EAAE,OAAO;CAClF,MAAM,EAAE,MAAM,kBAAkB,CAAC,UAAU;CAC3C,WAAW,EAAE,QAAQ,CAAC,UAAU;CACjC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/modules/tasks/schema.d.ts
|
|
4
|
-
type TaskStatus = "
|
|
4
|
+
type TaskStatus = "completed" | "inProgress" | "todo";
|
|
5
5
|
declare const TaskStatusSchema: z.ZodType<TaskStatus>;
|
|
6
6
|
interface Task {
|
|
7
7
|
assigneeId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.mjs","names":[],"sources":["../../../../src/lib/modules/tasks/schema.ts"],"sourcesContent":["import { z } from \"zod\";\n\n// ---------------------------------------------------------------------------\n// Base types\n// ---------------------------------------------------------------------------\n\nexport type TaskStatus = \"
|
|
1
|
+
{"version":3,"file":"schema.mjs","names":[],"sources":["../../../../src/lib/modules/tasks/schema.ts"],"sourcesContent":["import { z } from \"zod\";\n\n// ---------------------------------------------------------------------------\n// Base types\n// ---------------------------------------------------------------------------\n\nexport type TaskStatus = \"completed\" | \"inProgress\" | \"todo\";\n\nexport const TaskStatusSchema: z.ZodType<TaskStatus> = z.enum([\"todo\", \"inProgress\", \"completed\"]);\n\nexport interface Task {\n assigneeId?: string;\n assigneeType?: string;\n createdAt: string;\n createdBy?: string;\n description?: string;\n dueDate?: string | null;\n id: string;\n object: \"task\";\n status?: TaskStatus;\n title?: string;\n updatedAt?: string;\n}\n\nexport const TaskSchema: z.ZodType<Task> = z.object({\n assigneeId: z.string().optional(),\n assigneeType: z.string().optional(),\n createdAt: z.iso.datetime(),\n createdBy: z.string().optional(),\n description: z.string().optional(),\n dueDate: z.string().nullable().optional(),\n id: z.string(),\n object: z.literal(\"task\"),\n status: TaskStatusSchema.optional(),\n title: z.string().optional(),\n updatedAt: z.iso.datetime().optional(),\n});\n\n// ---------------------------------------------------------------------------\n// Response types\n// ---------------------------------------------------------------------------\n\nexport const TaskResponseSchema: z.ZodType<Task> = TaskSchema;\nexport type TaskResponse = Task;\n\nexport interface TasksResponse {\n data: Task[] | null;\n nextToken?: string;\n}\n\nexport const TasksResponseSchema: z.ZodType<TasksResponse> = z.object({\n data: z.array(TaskSchema).nullable(),\n nextToken: z.string().optional(),\n});\n\n// ---------------------------------------------------------------------------\n// Request types\n// ---------------------------------------------------------------------------\n\nexport interface TaskCreateRequest {\n assigneeId?: string;\n description?: string;\n dueDate?: string;\n status?: TaskStatus;\n title: string;\n}\n\nexport const TaskCreateRequestSchema: z.ZodType<TaskCreateRequest> = z.object({\n assigneeId: z.string().optional(),\n description: z.string().optional(),\n dueDate: z.string().optional(),\n status: TaskStatusSchema.optional(),\n title: z.string(),\n});\n\nexport interface TaskUpdateRequest {\n assigneeId?: string;\n description?: string;\n dueDate?: string;\n status?: TaskStatus;\n title?: string;\n}\n\nexport const TaskUpdateRequestSchema: z.ZodType<TaskUpdateRequest> = z.object({\n assigneeId: z.string().optional(),\n description: z.string().optional(),\n dueDate: z.string().optional(),\n status: TaskStatusSchema.optional(),\n title: z.string().optional(),\n});\n"],"mappings":";;AAQA,MAAa,mBAA0C,EAAE,KAAK;CAAC;CAAQ;CAAc;CAAY,CAAC;AAgBlG,MAAa,aAA8B,EAAE,OAAO;CAClD,YAAY,EAAE,QAAQ,CAAC,UAAU;CACjC,cAAc,EAAE,QAAQ,CAAC,UAAU;CACnC,WAAW,EAAE,IAAI,UAAU;CAC3B,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,aAAa,EAAE,QAAQ,CAAC,UAAU;CAClC,SAAS,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU;CACzC,IAAI,EAAE,QAAQ;CACd,QAAQ,EAAE,QAAQ,OAAO;CACzB,QAAQ,iBAAiB,UAAU;CACnC,OAAO,EAAE,QAAQ,CAAC,UAAU;CAC5B,WAAW,EAAE,IAAI,UAAU,CAAC,UAAU;CACvC,CAAC;AAMF,MAAa,qBAAsC;AAQnD,MAAa,sBAAgD,EAAE,OAAO;CACpE,MAAM,EAAE,MAAM,WAAW,CAAC,UAAU;CACpC,WAAW,EAAE,QAAQ,CAAC,UAAU;CACjC,CAAC;AAcF,MAAa,0BAAwD,EAAE,OAAO;CAC5E,YAAY,EAAE,QAAQ,CAAC,UAAU;CACjC,aAAa,EAAE,QAAQ,CAAC,UAAU;CAClC,SAAS,EAAE,QAAQ,CAAC,UAAU;CAC9B,QAAQ,iBAAiB,UAAU;CACnC,OAAO,EAAE,QAAQ;CAClB,CAAC;AAUF,MAAa,0BAAwD,EAAE,OAAO;CAC5E,YAAY,EAAE,QAAQ,CAAC,UAAU;CACjC,aAAa,EAAE,QAAQ,CAAC,UAAU;CAClC,SAAS,EAAE,QAAQ,CAAC,UAAU;CAC9B,QAAQ,iBAAiB,UAAU;CACnC,OAAO,EAAE,QAAQ,CAAC,UAAU;CAC7B,CAAC"}
|
package/dist/schemas/index.d.mts
CHANGED
|
@@ -1,32 +1,35 @@
|
|
|
1
1
|
import { MembershipType, MembershipTypeSchema } from "./shared/membership-type.mjs";
|
|
2
2
|
import { AppConnection, AppConnectionCreateRequest, AppConnectionCreateRequestSchema, AppConnectionResponse, AppConnectionResponseSchema, AppConnectionSchema, AppConnectionType, AppConnectionTypeSchema, AppConnectionsResponse, AppConnectionsResponseSchema } from "../lib/modules/app-connections/schema.mjs";
|
|
3
|
-
import { AppInstall, AppInstallResponse, AppInstallResponseSchema, AppInstallSchema, AppInstallType, AppInstallTypeSchema, AppInstallsResponse, AppInstallsResponseSchema } from "../lib/modules/app-installs/schema.mjs";
|
|
4
|
-
import { Client, ClientCreateRequest, ClientCreateRequestSchema, ClientResponse, ClientResponseSchema, ClientSchema, ClientUpdateRequest, ClientUpdateRequestSchema, ClientsResponse, ClientsResponseSchema } from "../lib/modules/clients/schema.mjs";
|
|
3
|
+
import { AppInstall, AppInstallResponse, AppInstallResponseSchema, AppInstallSchema, AppInstallType, AppInstallTypeSchema, AppInstallsResponse, AppInstallsResponseSchema, AppNotificationActionLabel, AppNotificationActionLabelSchema, AppNotificationSetting, AppNotificationSettingSchema, AppNotificationSettingsCreateRequest, AppNotificationSettingsCreateRequestSchema, AppNotificationSettingsResponse, AppNotificationSettingsResponseSchema, AppNotificationSettingsUpdateRequest, AppNotificationSettingsUpdateRequestSchema, NotificationSurface, NotificationSurfaceSchema } from "../lib/modules/app-installs/schema.mjs";
|
|
4
|
+
import { Client, ClientCreateRequest, ClientCreateRequestSchema, ClientResponse, ClientResponseSchema, ClientSchema, ClientUpdateRequest, ClientUpdateRequestSchema, ClientWithAppVisibility, ClientWithAppVisibilitySchema, ClientsResponse, ClientsResponseSchema } from "../lib/modules/clients/schema.mjs";
|
|
5
5
|
import { HexColor, HexColorSchema } from "./shared/hex-color.mjs";
|
|
6
|
-
import { CompaniesResponse, CompaniesResponseSchema, Company, CompanyCreateRequest, CompanyCreateRequestSchema, CompanyResponse, CompanyResponseSchema, CompanySchema, CompanyUpdateRequest, CompanyUpdateRequestSchema } from "../lib/modules/companies/schema.mjs";
|
|
6
|
+
import { CompaniesResponse, CompaniesResponseSchema, Company, CompanyAddClientError, CompanyAddClientsRequest, CompanyAddClientsRequestSchema, CompanyAddClientsResponse, CompanyAddClientsResponseSchema, CompanyCreateRequest, CompanyCreateRequestSchema, CompanyResponse, CompanyResponseSchema, CompanySchema, CompanyUpdateRequest, CompanyUpdateRequestSchema } from "../lib/modules/companies/schema.mjs";
|
|
7
7
|
import { ContractTemplate, ContractTemplateResponse, ContractTemplateResponseSchema, ContractTemplateSchema, ContractTemplatesResponse, ContractTemplatesResponseSchema } from "../lib/modules/contract-templates/schema.mjs";
|
|
8
8
|
import { Contract, ContractField, ContractFieldInputType, ContractFieldInputTypeSchema, ContractFieldSchema, ContractResponse, ContractResponseSchema, ContractSchema, ContractSendRequest, ContractSendRequestSchema, ContractStatus, ContractStatusSchema, ContractsResponse, ContractsResponseSchema } from "../lib/modules/contracts/schema.mjs";
|
|
9
9
|
import { CustomFieldOption, CustomFieldOptionSchema, ListCustomFieldOptionResponse, ListCustomFieldOptionResponseSchema } from "../lib/modules/custom-field-options/schema.mjs";
|
|
10
|
-
import { AddressValue, AddressValueSchema, CustomField, CustomFieldEntityType, CustomFieldEntityTypeSchema, CustomFieldSchema, CustomFieldType, CustomFieldTypeSchema, CustomFieldValue, CustomFieldValueSchema, ListCustomFieldResponse, ListCustomFieldResponseSchema } from "../lib/modules/custom-fields/schema.mjs";
|
|
10
|
+
import { AddressValue, AddressValueSchema, CustomField, CustomFieldCreateInput, CustomFieldCreateInputSchema, CustomFieldEntityType, CustomFieldEntityTypeSchema, CustomFieldSchema, CustomFieldType, CustomFieldTypeSchema, CustomFieldValue, CustomFieldValueSchema, CustomFieldsCreateRequest, CustomFieldsCreateRequestSchema, CustomFieldsCreateResponse, CustomFieldsCreateResponseSchema, ListCustomFieldResponse, ListCustomFieldResponseSchema } from "../lib/modules/custom-fields/schema.mjs";
|
|
11
11
|
import { AuditLogEvent, AuditLogEventResponse, AuditLogEventResponseSchema, AuditLogEventSchema, AuditLogEventsResponse, AuditLogEventsResponseSchema, ClientUserEventCreateRequest, EventActorType, EventActorTypeSchema, EventCreateRequest, EventCreateRequestSchema, EventSource, EventSourceSchema, InternalUserEventCreateRequest } from "../lib/modules/events/schema.mjs";
|
|
12
12
|
import { FileChannel, FileChannelCreateRequest, FileChannelCreateRequestSchema, FileChannelResponse, FileChannelResponseSchema, FileChannelSchema, FileChannelsResponse, FileChannelsResponseSchema } from "../lib/modules/file-channels/schema.mjs";
|
|
13
|
-
import { AssemblyFile, AssemblyFileResponse, AssemblyFileResponseSchema, AssemblyFileSchema, AssemblyFilesResponse, AssemblyFilesResponseSchema, FileType, FileTypeSchema } from "../lib/modules/files/schema.mjs";
|
|
13
|
+
import { AssemblyFile, AssemblyFileResponse, AssemblyFileResponseSchema, AssemblyFileSchema, AssemblyFilesResponse, AssemblyFilesResponseSchema, ClientPermissions, ClientPermissionsSchema, FileDownloadUrlResponse, FileDownloadUrlResponseSchema, FilePermissionsResponse, FilePermissionsResponseSchema, FileType, FileTypeSchema } from "../lib/modules/files/schema.mjs";
|
|
14
14
|
import { FormResponse, FormResponseCreateRequest, FormResponseCreateRequestSchema, FormResponseItemResponse, FormResponseItemResponseSchema, FormResponseSchema, FormResponsesResponse, FormResponsesResponseSchema } from "../lib/modules/form-responses/schema.mjs";
|
|
15
|
-
import { Form, FormDataResponse, FormDataResponseSchema, FormSchema, FormsDataResponse, FormsDataResponseSchema } from "../lib/modules/forms/schema.mjs";
|
|
16
|
-
import { InternalUser, InternalUserResponse, InternalUserResponseSchema, InternalUserSchema, InternalUsersResponse, InternalUsersResponseSchema } from "../lib/modules/internal-users/schema.mjs";
|
|
15
|
+
import { Form, FormAdditionalFields, FormAdditionalFieldsSchema, FormCreateRequest, FormCreateRequestSchema, FormDataResponse, FormDataResponseSchema, FormField, FormFieldSchema, FormFieldType, FormFieldTypeSchema, FormFields, FormFieldsSchema, FormSchema, FormVisibility, FormVisibilitySchema, FormsDataResponse, FormsDataResponseSchema } from "../lib/modules/forms/schema.mjs";
|
|
16
|
+
import { InternalUser, InternalUserEmailSetting, InternalUserEmailSettingSchema, InternalUserNotificationSettings, InternalUserNotificationSettingsSchema, InternalUserResponse, InternalUserResponseSchema, InternalUserSchema, InternalUserUpdateRequest, InternalUserUpdateRequestSchema, InternalUsersResponse, InternalUsersResponseSchema, NotificationCategorySetting, NotificationCategorySettingSchema } from "../lib/modules/internal-users/schema.mjs";
|
|
17
17
|
import { InvoiceTemplate, InvoiceTemplateResponse, InvoiceTemplateResponseSchema, InvoiceTemplateSchema, InvoiceTemplatesResponse, InvoiceTemplatesResponseSchema } from "../lib/modules/invoice-templates/schema.mjs";
|
|
18
18
|
import { Invoice, InvoiceCreateRequest, InvoiceCreateRequestSchema, InvoiceLineItem, InvoiceLineItemRequest, InvoiceLineItemRequestSchema, InvoiceLineItemSchema, InvoicePaymentMethodPreferenceRequest, InvoicePaymentMethodPreferenceRequestSchema, InvoiceResponse, InvoiceResponseSchema, InvoiceSchema, InvoiceStatus, InvoiceStatusSchema, InvoicesResponse, InvoicesResponseSchema, PaymentMethodPreference, PaymentMethodPreferenceSchema, PaymentMethodType, PaymentMethodTypeSchema } from "../lib/modules/invoices/schema.mjs";
|
|
19
|
-
import {
|
|
19
|
+
import { CurrentUser, CurrentUserResponse, CurrentUserResponseSchema, CurrentUserSchema } from "../lib/modules/me/schema.mjs";
|
|
20
|
+
import { MessageChannel, MessageChannelCreateRequest, MessageChannelCreateRequestSchema, MessageChannelResponse, MessageChannelResponseSchema, MessageChannelSchema, MessageChannelsResponse, MessageChannelsResponseSchema, UnreadMessageChannelsResponse, UnreadMessageChannelsResponseSchema } from "../lib/modules/message-channels/schema.mjs";
|
|
20
21
|
import { Message, MessageResponse, MessageResponseSchema, MessageSchema, MessagesResponse, MessagesResponseSchema, SendMessageRequest, SendMessageRequestSchema } from "../lib/modules/messages/schema.mjs";
|
|
21
22
|
import { Note, NoteCreateRequest, NoteCreateRequestSchema, NoteResponse, NoteResponseSchema, NoteSchema, NoteUpdateRequest, NoteUpdateRequestSchema, NotesResponse, NotesResponseSchema } from "../lib/modules/notes/schema.mjs";
|
|
22
23
|
import { EmailDeliveryTarget, EmailDeliveryTargetSchema, InProductDeliveryTarget, InProductDeliveryTargetSchema, Notification, NotificationCreateRequest, NotificationCreateRequestSchema, NotificationDeliveryTargets, NotificationDeliveryTargetsSchema, NotificationResponse, NotificationResponseSchema, NotificationSchema, NotificationsResponse, NotificationsResponseSchema } from "../lib/modules/notifications/schema.mjs";
|
|
23
24
|
import { Payment, PaymentResponse, PaymentResponseSchema, PaymentSchema, PaymentsResponse, PaymentsResponseSchema } from "../lib/modules/payments/schema.mjs";
|
|
24
|
-
import { Price, PriceResponse, PriceResponseSchema, PriceSchema, PricesResponse, PricesResponseSchema } from "../lib/modules/prices/schema.mjs";
|
|
25
|
-
import { Product, ProductResponse, ProductResponseSchema, ProductSchema, ProductsResponse, ProductsResponseSchema } from "../lib/modules/products/schema.mjs";
|
|
25
|
+
import { BillingPeriod, BillingPeriodSchema, Price, PriceCreateRequest, PriceCreateRequestSchema, PriceResponse, PriceResponseSchema, PriceSchema, PriceType, PriceTypeSchema, PricesResponse, PricesResponseSchema } from "../lib/modules/prices/schema.mjs";
|
|
26
|
+
import { Product, ProductCreateRequest, ProductCreateRequestSchema, ProductResponse, ProductResponseSchema, ProductSchema, ProductsResponse, ProductsResponseSchema } from "../lib/modules/products/schema.mjs";
|
|
27
|
+
import { Refund, RefundCreateRequest, RefundCreateRequestSchema, RefundResponse, RefundResponseSchema, RefundSchema, RefundStatus, RefundStatusSchema, RefundsResponse, RefundsResponseSchema } from "../lib/modules/refunds/schema.mjs";
|
|
26
28
|
import { SubscriptionTemplate, SubscriptionTemplateResponse, SubscriptionTemplateResponseSchema, SubscriptionTemplateSchema, SubscriptionTemplatesResponse, SubscriptionTemplatesResponseSchema } from "../lib/modules/subscription-templates/schema.mjs";
|
|
27
29
|
import { Subscription, SubscriptionCreateRequest, SubscriptionCreateRequestSchema, SubscriptionResponse, SubscriptionResponseSchema, SubscriptionSchema, SubscriptionsResponse, SubscriptionsResponseSchema } from "../lib/modules/subscriptions/schema.mjs";
|
|
30
|
+
import { TaskComment, TaskCommentResponse, TaskCommentResponseSchema, TaskCommentSchema, TaskCommentsResponse, TaskCommentsResponseSchema } from "../lib/modules/task-comments/schema.mjs";
|
|
28
31
|
import { TaskTemplate, TaskTemplateResponse, TaskTemplateResponseSchema, TaskTemplateSchema, TaskTemplatesResponse, TaskTemplatesResponseSchema } from "../lib/modules/task-templates/schema.mjs";
|
|
29
32
|
import { Task, TaskCreateRequest, TaskCreateRequestSchema, TaskResponse, TaskResponseSchema, TaskSchema, TaskStatus, TaskStatusSchema, TaskUpdateRequest, TaskUpdateRequestSchema, TasksResponse, TasksResponseSchema } from "../lib/modules/tasks/schema.mjs";
|
|
30
33
|
import { Workspace, WorkspaceResponse, WorkspaceResponseSchema, WorkspaceSchema } from "../lib/modules/workspace/schema.mjs";
|
|
31
34
|
import { TokenPayload, TokenPayloadSchema } from "./shared/token.mjs";
|
|
32
|
-
export { AddressValue, AddressValueSchema, AppConnection, AppConnectionCreateRequest, AppConnectionCreateRequestSchema, AppConnectionResponse, AppConnectionResponseSchema, AppConnectionSchema, AppConnectionType, AppConnectionTypeSchema, AppConnectionsResponse, AppConnectionsResponseSchema, AppInstall, AppInstallResponse, AppInstallResponseSchema, AppInstallSchema, AppInstallType, AppInstallTypeSchema, AppInstallsResponse, AppInstallsResponseSchema, AssemblyFile, AssemblyFileResponse, AssemblyFileResponseSchema, AssemblyFileSchema, AssemblyFilesResponse, AssemblyFilesResponseSchema, AuditLogEvent, AuditLogEventResponse, AuditLogEventResponseSchema, AuditLogEventSchema, AuditLogEventsResponse, AuditLogEventsResponseSchema, Client, ClientCreateRequest, ClientCreateRequestSchema, ClientResponse, ClientResponseSchema, ClientSchema, ClientUpdateRequest, ClientUpdateRequestSchema, ClientUserEventCreateRequest, ClientsResponse, ClientsResponseSchema, CompaniesResponse, CompaniesResponseSchema, Company, CompanyCreateRequest, CompanyCreateRequestSchema, CompanyResponse, CompanyResponseSchema, CompanySchema, CompanyUpdateRequest, CompanyUpdateRequestSchema, Contract, ContractField, ContractFieldInputType, ContractFieldInputTypeSchema, ContractFieldSchema, ContractResponse, ContractResponseSchema, ContractSchema, ContractSendRequest, ContractSendRequestSchema, ContractStatus, ContractStatusSchema, ContractTemplate, ContractTemplateResponse, ContractTemplateResponseSchema, ContractTemplateSchema, ContractTemplatesResponse, ContractTemplatesResponseSchema, ContractsResponse, ContractsResponseSchema, CustomField, CustomFieldEntityType, CustomFieldEntityTypeSchema, CustomFieldOption, CustomFieldOptionSchema, CustomFieldSchema, CustomFieldType, CustomFieldTypeSchema, CustomFieldValue, CustomFieldValueSchema, EmailDeliveryTarget, EmailDeliveryTargetSchema, EventActorType, EventActorTypeSchema, EventCreateRequest, EventCreateRequestSchema, EventSource, EventSourceSchema, FileChannel, FileChannelCreateRequest, FileChannelCreateRequestSchema, FileChannelResponse, FileChannelResponseSchema, FileChannelSchema, FileChannelsResponse, FileChannelsResponseSchema, FileType, FileTypeSchema, Form, FormDataResponse, FormDataResponseSchema, FormResponse, FormResponseCreateRequest, FormResponseCreateRequestSchema, FormResponseItemResponse, FormResponseItemResponseSchema, FormResponseSchema, FormResponsesResponse, FormResponsesResponseSchema, FormSchema, FormsDataResponse, FormsDataResponseSchema, HexColor, HexColorSchema, InProductDeliveryTarget, InProductDeliveryTargetSchema, InternalUser, InternalUserEventCreateRequest, InternalUserResponse, InternalUserResponseSchema, InternalUserSchema, InternalUsersResponse, InternalUsersResponseSchema, Invoice, InvoiceCreateRequest, InvoiceCreateRequestSchema, InvoiceLineItem, InvoiceLineItemRequest, InvoiceLineItemRequestSchema, InvoiceLineItemSchema, InvoicePaymentMethodPreferenceRequest, InvoicePaymentMethodPreferenceRequestSchema, InvoiceResponse, InvoiceResponseSchema, InvoiceSchema, InvoiceStatus, InvoiceStatusSchema, InvoiceTemplate, InvoiceTemplateResponse, InvoiceTemplateResponseSchema, InvoiceTemplateSchema, InvoiceTemplatesResponse, InvoiceTemplatesResponseSchema, InvoicesResponse, InvoicesResponseSchema, ListCustomFieldOptionResponse, ListCustomFieldOptionResponseSchema, ListCustomFieldResponse, ListCustomFieldResponseSchema, MembershipType, MembershipTypeSchema, Message, MessageChannel, MessageChannelCreateRequest, MessageChannelCreateRequestSchema, MessageChannelResponse, MessageChannelResponseSchema, MessageChannelSchema, MessageChannelsResponse, MessageChannelsResponseSchema, MessageResponse, MessageResponseSchema, MessageSchema, MessagesResponse, MessagesResponseSchema, Note, NoteCreateRequest, NoteCreateRequestSchema, NoteResponse, NoteResponseSchema, NoteSchema, NoteUpdateRequest, NoteUpdateRequestSchema, NotesResponse, NotesResponseSchema, Notification, NotificationCreateRequest, NotificationCreateRequestSchema, NotificationDeliveryTargets, NotificationDeliveryTargetsSchema, NotificationResponse, NotificationResponseSchema, NotificationSchema, NotificationsResponse, NotificationsResponseSchema, Payment, PaymentMethodPreference, PaymentMethodPreferenceSchema, PaymentMethodType, PaymentMethodTypeSchema, PaymentResponse, PaymentResponseSchema, PaymentSchema, PaymentsResponse, PaymentsResponseSchema, Price, PriceResponse, PriceResponseSchema, PriceSchema, PricesResponse, PricesResponseSchema, Product, ProductResponse, ProductResponseSchema, ProductSchema, ProductsResponse, ProductsResponseSchema, SendMessageRequest, SendMessageRequestSchema, Subscription, SubscriptionCreateRequest, SubscriptionCreateRequestSchema, SubscriptionResponse, SubscriptionResponseSchema, SubscriptionSchema, SubscriptionTemplate, SubscriptionTemplateResponse, SubscriptionTemplateResponseSchema, SubscriptionTemplateSchema, SubscriptionTemplatesResponse, SubscriptionTemplatesResponseSchema, SubscriptionsResponse, SubscriptionsResponseSchema, Task, TaskCreateRequest, TaskCreateRequestSchema, TaskResponse, TaskResponseSchema, TaskSchema, TaskStatus, TaskStatusSchema, TaskTemplate, TaskTemplateResponse, TaskTemplateResponseSchema, TaskTemplateSchema, TaskTemplatesResponse, TaskTemplatesResponseSchema, TaskUpdateRequest, TaskUpdateRequestSchema, TasksResponse, TasksResponseSchema, TokenPayload, TokenPayloadSchema, Workspace, WorkspaceResponse, WorkspaceResponseSchema, WorkspaceSchema };
|
|
35
|
+
export { AddressValue, AddressValueSchema, AppConnection, AppConnectionCreateRequest, AppConnectionCreateRequestSchema, AppConnectionResponse, AppConnectionResponseSchema, AppConnectionSchema, AppConnectionType, AppConnectionTypeSchema, AppConnectionsResponse, AppConnectionsResponseSchema, AppInstall, AppInstallResponse, AppInstallResponseSchema, AppInstallSchema, AppInstallType, AppInstallTypeSchema, AppInstallsResponse, AppInstallsResponseSchema, AppNotificationActionLabel, AppNotificationActionLabelSchema, AppNotificationSetting, AppNotificationSettingSchema, AppNotificationSettingsCreateRequest, AppNotificationSettingsCreateRequestSchema, AppNotificationSettingsResponse, AppNotificationSettingsResponseSchema, AppNotificationSettingsUpdateRequest, AppNotificationSettingsUpdateRequestSchema, AssemblyFile, AssemblyFileResponse, AssemblyFileResponseSchema, AssemblyFileSchema, AssemblyFilesResponse, AssemblyFilesResponseSchema, AuditLogEvent, AuditLogEventResponse, AuditLogEventResponseSchema, AuditLogEventSchema, AuditLogEventsResponse, AuditLogEventsResponseSchema, BillingPeriod, BillingPeriodSchema, Client, ClientCreateRequest, ClientCreateRequestSchema, ClientPermissions, ClientPermissionsSchema, ClientResponse, ClientResponseSchema, ClientSchema, ClientUpdateRequest, ClientUpdateRequestSchema, ClientUserEventCreateRequest, ClientWithAppVisibility, ClientWithAppVisibilitySchema, ClientsResponse, ClientsResponseSchema, CompaniesResponse, CompaniesResponseSchema, Company, CompanyAddClientError, CompanyAddClientsRequest, CompanyAddClientsRequestSchema, CompanyAddClientsResponse, CompanyAddClientsResponseSchema, CompanyCreateRequest, CompanyCreateRequestSchema, CompanyResponse, CompanyResponseSchema, CompanySchema, CompanyUpdateRequest, CompanyUpdateRequestSchema, Contract, ContractField, ContractFieldInputType, ContractFieldInputTypeSchema, ContractFieldSchema, ContractResponse, ContractResponseSchema, ContractSchema, ContractSendRequest, ContractSendRequestSchema, ContractStatus, ContractStatusSchema, ContractTemplate, ContractTemplateResponse, ContractTemplateResponseSchema, ContractTemplateSchema, ContractTemplatesResponse, ContractTemplatesResponseSchema, ContractsResponse, ContractsResponseSchema, CurrentUser, CurrentUserResponse, CurrentUserResponseSchema, CurrentUserSchema, CustomField, CustomFieldCreateInput, CustomFieldCreateInputSchema, CustomFieldEntityType, CustomFieldEntityTypeSchema, CustomFieldOption, CustomFieldOptionSchema, CustomFieldSchema, CustomFieldType, CustomFieldTypeSchema, CustomFieldValue, CustomFieldValueSchema, CustomFieldsCreateRequest, CustomFieldsCreateRequestSchema, CustomFieldsCreateResponse, CustomFieldsCreateResponseSchema, EmailDeliveryTarget, EmailDeliveryTargetSchema, EventActorType, EventActorTypeSchema, EventCreateRequest, EventCreateRequestSchema, EventSource, EventSourceSchema, FileChannel, FileChannelCreateRequest, FileChannelCreateRequestSchema, FileChannelResponse, FileChannelResponseSchema, FileChannelSchema, FileChannelsResponse, FileChannelsResponseSchema, FileDownloadUrlResponse, FileDownloadUrlResponseSchema, FilePermissionsResponse, FilePermissionsResponseSchema, FileType, FileTypeSchema, Form, FormAdditionalFields, FormAdditionalFieldsSchema, FormCreateRequest, FormCreateRequestSchema, FormDataResponse, FormDataResponseSchema, FormField, FormFieldSchema, FormFieldType, FormFieldTypeSchema, FormFields, FormFieldsSchema, FormResponse, FormResponseCreateRequest, FormResponseCreateRequestSchema, FormResponseItemResponse, FormResponseItemResponseSchema, FormResponseSchema, FormResponsesResponse, FormResponsesResponseSchema, FormSchema, FormVisibility, FormVisibilitySchema, FormsDataResponse, FormsDataResponseSchema, HexColor, HexColorSchema, InProductDeliveryTarget, InProductDeliveryTargetSchema, InternalUser, InternalUserEmailSetting, InternalUserEmailSettingSchema, InternalUserEventCreateRequest, InternalUserNotificationSettings, InternalUserNotificationSettingsSchema, InternalUserResponse, InternalUserResponseSchema, InternalUserSchema, InternalUserUpdateRequest, InternalUserUpdateRequestSchema, InternalUsersResponse, InternalUsersResponseSchema, Invoice, InvoiceCreateRequest, InvoiceCreateRequestSchema, InvoiceLineItem, InvoiceLineItemRequest, InvoiceLineItemRequestSchema, InvoiceLineItemSchema, InvoicePaymentMethodPreferenceRequest, InvoicePaymentMethodPreferenceRequestSchema, InvoiceResponse, InvoiceResponseSchema, InvoiceSchema, InvoiceStatus, InvoiceStatusSchema, InvoiceTemplate, InvoiceTemplateResponse, InvoiceTemplateResponseSchema, InvoiceTemplateSchema, InvoiceTemplatesResponse, InvoiceTemplatesResponseSchema, InvoicesResponse, InvoicesResponseSchema, ListCustomFieldOptionResponse, ListCustomFieldOptionResponseSchema, ListCustomFieldResponse, ListCustomFieldResponseSchema, MembershipType, MembershipTypeSchema, Message, MessageChannel, MessageChannelCreateRequest, MessageChannelCreateRequestSchema, MessageChannelResponse, MessageChannelResponseSchema, MessageChannelSchema, MessageChannelsResponse, MessageChannelsResponseSchema, MessageResponse, MessageResponseSchema, MessageSchema, MessagesResponse, MessagesResponseSchema, Note, NoteCreateRequest, NoteCreateRequestSchema, NoteResponse, NoteResponseSchema, NoteSchema, NoteUpdateRequest, NoteUpdateRequestSchema, NotesResponse, NotesResponseSchema, Notification, NotificationCategorySetting, NotificationCategorySettingSchema, NotificationCreateRequest, NotificationCreateRequestSchema, NotificationDeliveryTargets, NotificationDeliveryTargetsSchema, NotificationResponse, NotificationResponseSchema, NotificationSchema, NotificationSurface, NotificationSurfaceSchema, NotificationsResponse, NotificationsResponseSchema, Payment, PaymentMethodPreference, PaymentMethodPreferenceSchema, PaymentMethodType, PaymentMethodTypeSchema, PaymentResponse, PaymentResponseSchema, PaymentSchema, PaymentsResponse, PaymentsResponseSchema, Price, PriceCreateRequest, PriceCreateRequestSchema, PriceResponse, PriceResponseSchema, PriceSchema, PriceType, PriceTypeSchema, PricesResponse, PricesResponseSchema, Product, ProductCreateRequest, ProductCreateRequestSchema, ProductResponse, ProductResponseSchema, ProductSchema, ProductsResponse, ProductsResponseSchema, Refund, RefundCreateRequest, RefundCreateRequestSchema, RefundResponse, RefundResponseSchema, RefundSchema, RefundStatus, RefundStatusSchema, RefundsResponse, RefundsResponseSchema, SendMessageRequest, SendMessageRequestSchema, Subscription, SubscriptionCreateRequest, SubscriptionCreateRequestSchema, SubscriptionResponse, SubscriptionResponseSchema, SubscriptionSchema, SubscriptionTemplate, SubscriptionTemplateResponse, SubscriptionTemplateResponseSchema, SubscriptionTemplateSchema, SubscriptionTemplatesResponse, SubscriptionTemplatesResponseSchema, SubscriptionsResponse, SubscriptionsResponseSchema, Task, TaskComment, TaskCommentResponse, TaskCommentResponseSchema, TaskCommentSchema, TaskCommentsResponse, TaskCommentsResponseSchema, TaskCreateRequest, TaskCreateRequestSchema, TaskResponse, TaskResponseSchema, TaskSchema, TaskStatus, TaskStatusSchema, TaskTemplate, TaskTemplateResponse, TaskTemplateResponseSchema, TaskTemplateSchema, TaskTemplatesResponse, TaskTemplatesResponseSchema, TaskUpdateRequest, TaskUpdateRequestSchema, TasksResponse, TasksResponseSchema, TokenPayload, TokenPayloadSchema, UnreadMessageChannelsResponse, UnreadMessageChannelsResponseSchema, Workspace, WorkspaceResponse, WorkspaceResponseSchema, WorkspaceSchema };
|
package/dist/schemas/index.mjs
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
import { MembershipTypeSchema } from "./shared/membership-type.mjs";
|
|
2
2
|
import { AppConnectionCreateRequestSchema, AppConnectionResponseSchema, AppConnectionSchema, AppConnectionTypeSchema, AppConnectionsResponseSchema } from "../lib/modules/app-connections/schema.mjs";
|
|
3
|
-
import { AppInstallResponseSchema, AppInstallSchema, AppInstallTypeSchema, AppInstallsResponseSchema } from "../lib/modules/app-installs/schema.mjs";
|
|
4
|
-
import { ClientCreateRequestSchema, ClientResponseSchema, ClientSchema, ClientUpdateRequestSchema, ClientsResponseSchema } from "../lib/modules/clients/schema.mjs";
|
|
3
|
+
import { AppInstallResponseSchema, AppInstallSchema, AppInstallTypeSchema, AppInstallsResponseSchema, AppNotificationActionLabelSchema, AppNotificationSettingSchema, AppNotificationSettingsCreateRequestSchema, AppNotificationSettingsResponseSchema, AppNotificationSettingsUpdateRequestSchema, NotificationSurfaceSchema } from "../lib/modules/app-installs/schema.mjs";
|
|
4
|
+
import { ClientCreateRequestSchema, ClientResponseSchema, ClientSchema, ClientUpdateRequestSchema, ClientWithAppVisibilitySchema, ClientsResponseSchema } from "../lib/modules/clients/schema.mjs";
|
|
5
5
|
import { HexColorSchema } from "./shared/hex-color.mjs";
|
|
6
|
-
import { CompaniesResponseSchema, CompanyCreateRequestSchema, CompanyResponseSchema, CompanySchema, CompanyUpdateRequestSchema } from "../lib/modules/companies/schema.mjs";
|
|
6
|
+
import { CompaniesResponseSchema, CompanyAddClientsRequestSchema, CompanyAddClientsResponseSchema, CompanyCreateRequestSchema, CompanyResponseSchema, CompanySchema, CompanyUpdateRequestSchema } from "../lib/modules/companies/schema.mjs";
|
|
7
7
|
import { ContractTemplateResponseSchema, ContractTemplateSchema, ContractTemplatesResponseSchema } from "../lib/modules/contract-templates/schema.mjs";
|
|
8
8
|
import { ContractFieldInputTypeSchema, ContractFieldSchema, ContractResponseSchema, ContractSchema, ContractSendRequestSchema, ContractStatusSchema, ContractsResponseSchema } from "../lib/modules/contracts/schema.mjs";
|
|
9
9
|
import { CustomFieldOptionSchema, ListCustomFieldOptionResponseSchema } from "../lib/modules/custom-field-options/schema.mjs";
|
|
10
|
-
import { AddressValueSchema, CustomFieldEntityTypeSchema, CustomFieldSchema, CustomFieldTypeSchema, CustomFieldValueSchema, ListCustomFieldResponseSchema } from "../lib/modules/custom-fields/schema.mjs";
|
|
10
|
+
import { AddressValueSchema, CustomFieldCreateInputSchema, CustomFieldEntityTypeSchema, CustomFieldSchema, CustomFieldTypeSchema, CustomFieldValueSchema, CustomFieldsCreateRequestSchema, CustomFieldsCreateResponseSchema, ListCustomFieldResponseSchema } from "../lib/modules/custom-fields/schema.mjs";
|
|
11
11
|
import { AuditLogEventResponseSchema, AuditLogEventSchema, AuditLogEventsResponseSchema, EventActorTypeSchema, EventCreateRequestSchema, EventSourceSchema } from "../lib/modules/events/schema.mjs";
|
|
12
12
|
import { FileChannelCreateRequestSchema, FileChannelResponseSchema, FileChannelSchema, FileChannelsResponseSchema } from "../lib/modules/file-channels/schema.mjs";
|
|
13
|
-
import { AssemblyFileResponseSchema, AssemblyFileSchema, AssemblyFilesResponseSchema, FileTypeSchema } from "../lib/modules/files/schema.mjs";
|
|
13
|
+
import { AssemblyFileResponseSchema, AssemblyFileSchema, AssemblyFilesResponseSchema, ClientPermissionsSchema, FileDownloadUrlResponseSchema, FilePermissionsResponseSchema, FileTypeSchema } from "../lib/modules/files/schema.mjs";
|
|
14
14
|
import { FormResponseCreateRequestSchema, FormResponseItemResponseSchema, FormResponseSchema, FormResponsesResponseSchema } from "../lib/modules/form-responses/schema.mjs";
|
|
15
|
-
import { FormDataResponseSchema, FormSchema, FormsDataResponseSchema } from "../lib/modules/forms/schema.mjs";
|
|
16
|
-
import { InternalUserResponseSchema, InternalUserSchema, InternalUsersResponseSchema } from "../lib/modules/internal-users/schema.mjs";
|
|
15
|
+
import { FormAdditionalFieldsSchema, FormCreateRequestSchema, FormDataResponseSchema, FormFieldSchema, FormFieldTypeSchema, FormFieldsSchema, FormSchema, FormVisibilitySchema, FormsDataResponseSchema } from "../lib/modules/forms/schema.mjs";
|
|
16
|
+
import { InternalUserEmailSettingSchema, InternalUserNotificationSettingsSchema, InternalUserResponseSchema, InternalUserSchema, InternalUserUpdateRequestSchema, InternalUsersResponseSchema, NotificationCategorySettingSchema } from "../lib/modules/internal-users/schema.mjs";
|
|
17
17
|
import { InvoiceTemplateResponseSchema, InvoiceTemplateSchema, InvoiceTemplatesResponseSchema } from "../lib/modules/invoice-templates/schema.mjs";
|
|
18
18
|
import { InvoiceCreateRequestSchema, InvoiceLineItemRequestSchema, InvoiceLineItemSchema, InvoicePaymentMethodPreferenceRequestSchema, InvoiceResponseSchema, InvoiceSchema, InvoiceStatusSchema, InvoicesResponseSchema, PaymentMethodPreferenceSchema, PaymentMethodTypeSchema } from "../lib/modules/invoices/schema.mjs";
|
|
19
|
-
import {
|
|
19
|
+
import { CurrentUserResponseSchema, CurrentUserSchema } from "../lib/modules/me/schema.mjs";
|
|
20
|
+
import { MessageChannelCreateRequestSchema, MessageChannelResponseSchema, MessageChannelSchema, MessageChannelsResponseSchema, UnreadMessageChannelsResponseSchema } from "../lib/modules/message-channels/schema.mjs";
|
|
20
21
|
import { MessageResponseSchema, MessageSchema, MessagesResponseSchema, SendMessageRequestSchema } from "../lib/modules/messages/schema.mjs";
|
|
21
22
|
import { NoteCreateRequestSchema, NoteResponseSchema, NoteSchema, NoteUpdateRequestSchema, NotesResponseSchema } from "../lib/modules/notes/schema.mjs";
|
|
22
23
|
import { EmailDeliveryTargetSchema, InProductDeliveryTargetSchema, NotificationCreateRequestSchema, NotificationDeliveryTargetsSchema, NotificationResponseSchema, NotificationSchema, NotificationsResponseSchema } from "../lib/modules/notifications/schema.mjs";
|
|
23
24
|
import { PaymentResponseSchema, PaymentSchema, PaymentsResponseSchema } from "../lib/modules/payments/schema.mjs";
|
|
24
|
-
import { PriceResponseSchema, PriceSchema, PricesResponseSchema } from "../lib/modules/prices/schema.mjs";
|
|
25
|
-
import { ProductResponseSchema, ProductSchema, ProductsResponseSchema } from "../lib/modules/products/schema.mjs";
|
|
25
|
+
import { BillingPeriodSchema, PriceCreateRequestSchema, PriceResponseSchema, PriceSchema, PriceTypeSchema, PricesResponseSchema } from "../lib/modules/prices/schema.mjs";
|
|
26
|
+
import { ProductCreateRequestSchema, ProductResponseSchema, ProductSchema, ProductsResponseSchema } from "../lib/modules/products/schema.mjs";
|
|
27
|
+
import { RefundCreateRequestSchema, RefundResponseSchema, RefundSchema, RefundStatusSchema, RefundsResponseSchema } from "../lib/modules/refunds/schema.mjs";
|
|
26
28
|
import { SubscriptionTemplateResponseSchema, SubscriptionTemplateSchema, SubscriptionTemplatesResponseSchema } from "../lib/modules/subscription-templates/schema.mjs";
|
|
27
29
|
import { SubscriptionCreateRequestSchema, SubscriptionResponseSchema, SubscriptionSchema, SubscriptionsResponseSchema } from "../lib/modules/subscriptions/schema.mjs";
|
|
30
|
+
import { TaskCommentResponseSchema, TaskCommentSchema, TaskCommentsResponseSchema } from "../lib/modules/task-comments/schema.mjs";
|
|
28
31
|
import { TaskTemplateResponseSchema, TaskTemplateSchema, TaskTemplatesResponseSchema } from "../lib/modules/task-templates/schema.mjs";
|
|
29
32
|
import { TaskCreateRequestSchema, TaskResponseSchema, TaskSchema, TaskStatusSchema, TaskUpdateRequestSchema, TasksResponseSchema } from "../lib/modules/tasks/schema.mjs";
|
|
30
33
|
import { WorkspaceResponseSchema, WorkspaceSchema } from "../lib/modules/workspace/schema.mjs";
|
|
31
34
|
import { TokenPayloadSchema } from "./shared/token.mjs";
|
|
32
35
|
import "../lib/modules/index.mjs";
|
|
33
36
|
import "./shared/index.mjs";
|
|
34
|
-
export { AddressValueSchema, AppConnectionCreateRequestSchema, AppConnectionResponseSchema, AppConnectionSchema, AppConnectionTypeSchema, AppConnectionsResponseSchema, AppInstallResponseSchema, AppInstallSchema, AppInstallTypeSchema, AppInstallsResponseSchema, AssemblyFileResponseSchema, AssemblyFileSchema, AssemblyFilesResponseSchema, AuditLogEventResponseSchema, AuditLogEventSchema, AuditLogEventsResponseSchema, ClientCreateRequestSchema, ClientResponseSchema, ClientSchema, ClientUpdateRequestSchema, ClientsResponseSchema, CompaniesResponseSchema, CompanyCreateRequestSchema, CompanyResponseSchema, CompanySchema, CompanyUpdateRequestSchema, ContractFieldInputTypeSchema, ContractFieldSchema, ContractResponseSchema, ContractSchema, ContractSendRequestSchema, ContractStatusSchema, ContractTemplateResponseSchema, ContractTemplateSchema, ContractTemplatesResponseSchema, ContractsResponseSchema, CustomFieldEntityTypeSchema, CustomFieldOptionSchema, CustomFieldSchema, CustomFieldTypeSchema, CustomFieldValueSchema, EmailDeliveryTargetSchema, EventActorTypeSchema, EventCreateRequestSchema, EventSourceSchema, FileChannelCreateRequestSchema, FileChannelResponseSchema, FileChannelSchema, FileChannelsResponseSchema, FileTypeSchema, FormDataResponseSchema, FormResponseCreateRequestSchema, FormResponseItemResponseSchema, FormResponseSchema, FormResponsesResponseSchema, FormSchema, FormsDataResponseSchema, HexColorSchema, InProductDeliveryTargetSchema, InternalUserResponseSchema, InternalUserSchema, InternalUsersResponseSchema, InvoiceCreateRequestSchema, InvoiceLineItemRequestSchema, InvoiceLineItemSchema, InvoicePaymentMethodPreferenceRequestSchema, InvoiceResponseSchema, InvoiceSchema, InvoiceStatusSchema, InvoiceTemplateResponseSchema, InvoiceTemplateSchema, InvoiceTemplatesResponseSchema, InvoicesResponseSchema, ListCustomFieldOptionResponseSchema, ListCustomFieldResponseSchema, MembershipTypeSchema, MessageChannelCreateRequestSchema, MessageChannelResponseSchema, MessageChannelSchema, MessageChannelsResponseSchema, MessageResponseSchema, MessageSchema, MessagesResponseSchema, NoteCreateRequestSchema, NoteResponseSchema, NoteSchema, NoteUpdateRequestSchema, NotesResponseSchema, NotificationCreateRequestSchema, NotificationDeliveryTargetsSchema, NotificationResponseSchema, NotificationSchema, NotificationsResponseSchema, PaymentMethodPreferenceSchema, PaymentMethodTypeSchema, PaymentResponseSchema, PaymentSchema, PaymentsResponseSchema, PriceResponseSchema, PriceSchema, PricesResponseSchema, ProductResponseSchema, ProductSchema, ProductsResponseSchema, SendMessageRequestSchema, SubscriptionCreateRequestSchema, SubscriptionResponseSchema, SubscriptionSchema, SubscriptionTemplateResponseSchema, SubscriptionTemplateSchema, SubscriptionTemplatesResponseSchema, SubscriptionsResponseSchema, TaskCreateRequestSchema, TaskResponseSchema, TaskSchema, TaskStatusSchema, TaskTemplateResponseSchema, TaskTemplateSchema, TaskTemplatesResponseSchema, TaskUpdateRequestSchema, TasksResponseSchema, TokenPayloadSchema, WorkspaceResponseSchema, WorkspaceSchema };
|
|
37
|
+
export { AddressValueSchema, AppConnectionCreateRequestSchema, AppConnectionResponseSchema, AppConnectionSchema, AppConnectionTypeSchema, AppConnectionsResponseSchema, AppInstallResponseSchema, AppInstallSchema, AppInstallTypeSchema, AppInstallsResponseSchema, AppNotificationActionLabelSchema, AppNotificationSettingSchema, AppNotificationSettingsCreateRequestSchema, AppNotificationSettingsResponseSchema, AppNotificationSettingsUpdateRequestSchema, AssemblyFileResponseSchema, AssemblyFileSchema, AssemblyFilesResponseSchema, AuditLogEventResponseSchema, AuditLogEventSchema, AuditLogEventsResponseSchema, BillingPeriodSchema, ClientCreateRequestSchema, ClientPermissionsSchema, ClientResponseSchema, ClientSchema, ClientUpdateRequestSchema, ClientWithAppVisibilitySchema, ClientsResponseSchema, CompaniesResponseSchema, CompanyAddClientsRequestSchema, CompanyAddClientsResponseSchema, CompanyCreateRequestSchema, CompanyResponseSchema, CompanySchema, CompanyUpdateRequestSchema, ContractFieldInputTypeSchema, ContractFieldSchema, ContractResponseSchema, ContractSchema, ContractSendRequestSchema, ContractStatusSchema, ContractTemplateResponseSchema, ContractTemplateSchema, ContractTemplatesResponseSchema, ContractsResponseSchema, CurrentUserResponseSchema, CurrentUserSchema, CustomFieldCreateInputSchema, CustomFieldEntityTypeSchema, CustomFieldOptionSchema, CustomFieldSchema, CustomFieldTypeSchema, CustomFieldValueSchema, CustomFieldsCreateRequestSchema, CustomFieldsCreateResponseSchema, EmailDeliveryTargetSchema, EventActorTypeSchema, EventCreateRequestSchema, EventSourceSchema, FileChannelCreateRequestSchema, FileChannelResponseSchema, FileChannelSchema, FileChannelsResponseSchema, FileDownloadUrlResponseSchema, FilePermissionsResponseSchema, FileTypeSchema, FormAdditionalFieldsSchema, FormCreateRequestSchema, FormDataResponseSchema, FormFieldSchema, FormFieldTypeSchema, FormFieldsSchema, FormResponseCreateRequestSchema, FormResponseItemResponseSchema, FormResponseSchema, FormResponsesResponseSchema, FormSchema, FormVisibilitySchema, FormsDataResponseSchema, HexColorSchema, InProductDeliveryTargetSchema, InternalUserEmailSettingSchema, InternalUserNotificationSettingsSchema, InternalUserResponseSchema, InternalUserSchema, InternalUserUpdateRequestSchema, InternalUsersResponseSchema, InvoiceCreateRequestSchema, InvoiceLineItemRequestSchema, InvoiceLineItemSchema, InvoicePaymentMethodPreferenceRequestSchema, InvoiceResponseSchema, InvoiceSchema, InvoiceStatusSchema, InvoiceTemplateResponseSchema, InvoiceTemplateSchema, InvoiceTemplatesResponseSchema, InvoicesResponseSchema, ListCustomFieldOptionResponseSchema, ListCustomFieldResponseSchema, MembershipTypeSchema, MessageChannelCreateRequestSchema, MessageChannelResponseSchema, MessageChannelSchema, MessageChannelsResponseSchema, MessageResponseSchema, MessageSchema, MessagesResponseSchema, NoteCreateRequestSchema, NoteResponseSchema, NoteSchema, NoteUpdateRequestSchema, NotesResponseSchema, NotificationCategorySettingSchema, NotificationCreateRequestSchema, NotificationDeliveryTargetsSchema, NotificationResponseSchema, NotificationSchema, NotificationSurfaceSchema, NotificationsResponseSchema, PaymentMethodPreferenceSchema, PaymentMethodTypeSchema, PaymentResponseSchema, PaymentSchema, PaymentsResponseSchema, PriceCreateRequestSchema, PriceResponseSchema, PriceSchema, PriceTypeSchema, PricesResponseSchema, ProductCreateRequestSchema, ProductResponseSchema, ProductSchema, ProductsResponseSchema, RefundCreateRequestSchema, RefundResponseSchema, RefundSchema, RefundStatusSchema, RefundsResponseSchema, SendMessageRequestSchema, SubscriptionCreateRequestSchema, SubscriptionResponseSchema, SubscriptionSchema, SubscriptionTemplateResponseSchema, SubscriptionTemplateSchema, SubscriptionTemplatesResponseSchema, SubscriptionsResponseSchema, TaskCommentResponseSchema, TaskCommentSchema, TaskCommentsResponseSchema, TaskCreateRequestSchema, TaskResponseSchema, TaskSchema, TaskStatusSchema, TaskTemplateResponseSchema, TaskTemplateSchema, TaskTemplatesResponseSchema, TaskUpdateRequestSchema, TasksResponseSchema, TokenPayloadSchema, UnreadMessageChannelsResponseSchema, WorkspaceResponseSchema, WorkspaceSchema };
|
|
@@ -69,6 +69,12 @@ declare class AssemblyToken {
|
|
|
69
69
|
get isClientUser(): boolean;
|
|
70
70
|
/** `true` when the token belongs to an internal (team member) user. */
|
|
71
71
|
get isInternalUser(): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* `true` when an internal user is proxying as a client (CRM "preview as client"):
|
|
74
|
+
* both `internalUserId` and `clientId` are present. Both `isClientUser` and
|
|
75
|
+
* `isInternalUser` are also `true` in this case — branch on this getter first.
|
|
76
|
+
*/
|
|
77
|
+
get isProxying(): boolean;
|
|
72
78
|
/**
|
|
73
79
|
* Assert that the token belongs to a client user and return the narrowed payload.
|
|
74
80
|
* @throws {AssemblyUnauthorizedError} If the token does not represent a client user.
|
|
@@ -85,6 +85,14 @@ var AssemblyToken = class AssemblyToken {
|
|
|
85
85
|
return this.payload.internalUserId !== void 0;
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
|
+
* `true` when an internal user is proxying as a client (CRM "preview as client"):
|
|
89
|
+
* both `internalUserId` and `clientId` are present. Both `isClientUser` and
|
|
90
|
+
* `isInternalUser` are also `true` in this case — branch on this getter first.
|
|
91
|
+
*/
|
|
92
|
+
get isProxying() {
|
|
93
|
+
return this.payload.internalUserId !== void 0 && this.payload.clientId !== void 0;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
88
96
|
* Assert that the token belongs to a client user and return the narrowed payload.
|
|
89
97
|
* @throws {AssemblyUnauthorizedError} If the token does not represent a client user.
|
|
90
98
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembly-token.mjs","names":["#store"],"sources":["../../src/token/assembly-token.ts"],"sourcesContent":["import { AsyncLocalStorage } from \"node:async_hooks\";\n\nimport { AssemblyInvalidTokenError } from \"src/errors/invalid-token\";\nimport { AssemblyNoTokenError } from \"src/errors/no-token\";\nimport { AssemblyUnauthorizedError } from \"src/errors/unauthorized\";\nimport type { TokenPayload } from \"src/schemas/shared/token\";\n\nimport { decrypt, validatePayload } from \"./parse\";\n\n/** A token payload that identifies a client (portal) user. */\nexport interface ClientTokenPayload extends TokenPayload {\n clientId: string;\n companyId?: string;\n}\n\n/** A token payload that identifies an internal (team member) user. */\nexport interface InternalUserTokenPayload extends TokenPayload {\n internalUserId: string;\n}\n\n/**\n * Decrypts and validates an Assembly token, exposing the payload with\n * convenience getters for identity checks and compound key building.\n *\n * Use `AssemblyToken.run()` to store a request-scoped instance via\n * `AsyncLocalStorage`, then retrieve it anywhere with `AssemblyToken.current()`.\n * This is safe for Vercel fluid compute — no shared state across requests.\n *\n * @example\n * ```ts\n * // Request-scoped (recommended for serverless)\n * const t = AssemblyToken.new({ token: encryptedHex, apiKey });\n * const same = AssemblyToken.new({ token: encryptedHex, apiKey }); // returns the same instance\n *\n * // Direct instantiation (always creates a new instance)\n * const token = new AssemblyToken({ token: encryptedHex, apiKey });\n * ```\n *\n * @throws {AssemblyNoTokenError} If `token` is nullish or empty.\n * @throws {AssemblyInvalidTokenError} If decryption, JSON parsing, or schema validation fails.\n */\nexport class AssemblyToken {\n static readonly #store: AsyncLocalStorage<AssemblyToken> = new AsyncLocalStorage<AssemblyToken>();\n\n readonly currentToken: string;\n readonly payload: TokenPayload;\n\n constructor({ token, apiKey }: { token: unknown; apiKey: string }) {\n if (token === undefined || token === null || token === \"\") {\n throw new AssemblyNoTokenError();\n }\n\n if (typeof token !== \"string\") {\n throw new AssemblyInvalidTokenError({\n message: `Expected token to be a string, got ${typeof token}`,\n });\n }\n\n this.currentToken = token;\n this.payload = validatePayload(decrypt({ apiKey, token }));\n }\n\n /**\n * Get or create a request-scoped `AssemblyToken` instance via `AsyncLocalStorage`.\n * Returns the existing instance if one exists with the same token. If the token\n * differs, a new instance is created and replaces the previous one.\n *\n * @returns The `AssemblyToken` instance for the current async context.\n */\n static new(options: { token: unknown; apiKey: string }): AssemblyToken {\n const existing = AssemblyToken.#store.getStore();\n if (existing && existing.currentToken === options.token) {\n return existing;\n }\n const instance = new AssemblyToken(options);\n AssemblyToken.#store.enterWith(instance);\n return instance;\n }\n\n /** The workspace ID embedded in the token. Always present. */\n get workspaceId(): string {\n return this.payload.workspaceId;\n }\n\n /** The token ID, if present (used in marketplace compound keys). */\n get tokenId(): string | undefined {\n return this.payload.tokenId;\n }\n\n /** The API base URL override, if present. */\n get baseUrl(): string | undefined {\n return this.payload.baseUrl;\n }\n\n /** The client (portal user) ID, if present. */\n get clientId(): string | undefined {\n return this.payload.clientId;\n }\n\n /** The company ID associated with the client, if present. */\n get companyId(): string | undefined {\n return this.payload.companyId;\n }\n\n /** The internal (team member) user ID, if present. */\n get internalUserId(): string | undefined {\n return this.payload.internalUserId;\n }\n\n /** `true` when the token belongs to a client (portal) user. */\n get isClientUser(): boolean {\n return this.payload.clientId !== undefined;\n }\n\n /** `true` when the token belongs to an internal (team member) user. */\n get isInternalUser(): boolean {\n return this.payload.internalUserId !== undefined;\n }\n\n /**\n * Assert that the token belongs to a client user and return the narrowed payload.\n * @throws {AssemblyUnauthorizedError} If the token does not represent a client user.\n */\n ensureIsClient(): ClientTokenPayload {\n if (!this.isClientUser) {\n throw new AssemblyUnauthorizedError({\n message:\n \"This operation requires a client token (clientId), but the token does not contain a clientId\",\n });\n }\n return this.payload as ClientTokenPayload;\n }\n\n /**\n * Assert that the token belongs to an internal (team member) user and return the narrowed payload.\n * @throws {AssemblyUnauthorizedError} If the token does not represent an internal user.\n */\n ensureIsInternalUser(): InternalUserTokenPayload {\n if (!this.isInternalUser) {\n throw new AssemblyUnauthorizedError({\n message:\n \"This operation requires an internal user token (internalUserId), but the token does not contain an internalUserId\",\n });\n }\n return this.payload as InternalUserTokenPayload;\n }\n\n /**\n * Build the compound API key sent in the `X-API-Key` header.\n *\n * - With `tokenId`: `{workspaceId}/{apiKey}/{tokenId}`\n * - Without `tokenId`: `{workspaceId}/{apiKey}`\n */\n buildCompoundKey({ apiKey }: { apiKey: string }): string {\n if (this.payload.tokenId) {\n return `${this.payload.workspaceId}/${apiKey}/${this.payload.tokenId}`;\n }\n return `${this.payload.workspaceId}/${apiKey}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,IAAa,gBAAb,MAAa,cAAc;CACzB,QAAA,QAA2D,IAAI,mBAAkC;CAEjG;CACA;CAEA,YAAY,EAAE,OAAO,UAA8C;AACjE,MAAI,UAAU,KAAA,KAAa,UAAU,QAAQ,UAAU,GACrD,OAAM,IAAI,sBAAsB;AAGlC,MAAI,OAAO,UAAU,SACnB,OAAM,IAAI,0BAA0B,EAClC,SAAS,sCAAsC,OAAO,SACvD,CAAC;AAGJ,OAAK,eAAe;AACpB,OAAK,UAAU,gBAAgB,QAAQ;GAAE;GAAQ;GAAO,CAAC,CAAC;;;;;;;;;CAU5D,OAAO,IAAI,SAA4D;EACrE,MAAM,WAAW,eAAA,MAAqB,UAAU;AAChD,MAAI,YAAY,SAAS,iBAAiB,QAAQ,MAChD,QAAO;EAET,MAAM,WAAW,IAAI,cAAc,QAAQ;AAC3C,iBAAA,MAAqB,UAAU,SAAS;AACxC,SAAO;;;CAIT,IAAI,cAAsB;AACxB,SAAO,KAAK,QAAQ;;;CAItB,IAAI,UAA8B;AAChC,SAAO,KAAK,QAAQ;;;CAItB,IAAI,UAA8B;AAChC,SAAO,KAAK,QAAQ;;;CAItB,IAAI,WAA+B;AACjC,SAAO,KAAK,QAAQ;;;CAItB,IAAI,YAAgC;AAClC,SAAO,KAAK,QAAQ;;;CAItB,IAAI,iBAAqC;AACvC,SAAO,KAAK,QAAQ;;;CAItB,IAAI,eAAwB;AAC1B,SAAO,KAAK,QAAQ,aAAa,KAAA;;;CAInC,IAAI,iBAA0B;AAC5B,SAAO,KAAK,QAAQ,mBAAmB,KAAA;;;;;;
|
|
1
|
+
{"version":3,"file":"assembly-token.mjs","names":["#store"],"sources":["../../src/token/assembly-token.ts"],"sourcesContent":["import { AsyncLocalStorage } from \"node:async_hooks\";\n\nimport { AssemblyInvalidTokenError } from \"src/errors/invalid-token\";\nimport { AssemblyNoTokenError } from \"src/errors/no-token\";\nimport { AssemblyUnauthorizedError } from \"src/errors/unauthorized\";\nimport type { TokenPayload } from \"src/schemas/shared/token\";\n\nimport { decrypt, validatePayload } from \"./parse\";\n\n/** A token payload that identifies a client (portal) user. */\nexport interface ClientTokenPayload extends TokenPayload {\n clientId: string;\n companyId?: string;\n}\n\n/** A token payload that identifies an internal (team member) user. */\nexport interface InternalUserTokenPayload extends TokenPayload {\n internalUserId: string;\n}\n\n/**\n * Decrypts and validates an Assembly token, exposing the payload with\n * convenience getters for identity checks and compound key building.\n *\n * Use `AssemblyToken.run()` to store a request-scoped instance via\n * `AsyncLocalStorage`, then retrieve it anywhere with `AssemblyToken.current()`.\n * This is safe for Vercel fluid compute — no shared state across requests.\n *\n * @example\n * ```ts\n * // Request-scoped (recommended for serverless)\n * const t = AssemblyToken.new({ token: encryptedHex, apiKey });\n * const same = AssemblyToken.new({ token: encryptedHex, apiKey }); // returns the same instance\n *\n * // Direct instantiation (always creates a new instance)\n * const token = new AssemblyToken({ token: encryptedHex, apiKey });\n * ```\n *\n * @throws {AssemblyNoTokenError} If `token` is nullish or empty.\n * @throws {AssemblyInvalidTokenError} If decryption, JSON parsing, or schema validation fails.\n */\nexport class AssemblyToken {\n static readonly #store: AsyncLocalStorage<AssemblyToken> = new AsyncLocalStorage<AssemblyToken>();\n\n readonly currentToken: string;\n readonly payload: TokenPayload;\n\n constructor({ token, apiKey }: { token: unknown; apiKey: string }) {\n if (token === undefined || token === null || token === \"\") {\n throw new AssemblyNoTokenError();\n }\n\n if (typeof token !== \"string\") {\n throw new AssemblyInvalidTokenError({\n message: `Expected token to be a string, got ${typeof token}`,\n });\n }\n\n this.currentToken = token;\n this.payload = validatePayload(decrypt({ apiKey, token }));\n }\n\n /**\n * Get or create a request-scoped `AssemblyToken` instance via `AsyncLocalStorage`.\n * Returns the existing instance if one exists with the same token. If the token\n * differs, a new instance is created and replaces the previous one.\n *\n * @returns The `AssemblyToken` instance for the current async context.\n */\n static new(options: { token: unknown; apiKey: string }): AssemblyToken {\n const existing = AssemblyToken.#store.getStore();\n if (existing && existing.currentToken === options.token) {\n return existing;\n }\n const instance = new AssemblyToken(options);\n AssemblyToken.#store.enterWith(instance);\n return instance;\n }\n\n /** The workspace ID embedded in the token. Always present. */\n get workspaceId(): string {\n return this.payload.workspaceId;\n }\n\n /** The token ID, if present (used in marketplace compound keys). */\n get tokenId(): string | undefined {\n return this.payload.tokenId;\n }\n\n /** The API base URL override, if present. */\n get baseUrl(): string | undefined {\n return this.payload.baseUrl;\n }\n\n /** The client (portal user) ID, if present. */\n get clientId(): string | undefined {\n return this.payload.clientId;\n }\n\n /** The company ID associated with the client, if present. */\n get companyId(): string | undefined {\n return this.payload.companyId;\n }\n\n /** The internal (team member) user ID, if present. */\n get internalUserId(): string | undefined {\n return this.payload.internalUserId;\n }\n\n /** `true` when the token belongs to a client (portal) user. */\n get isClientUser(): boolean {\n return this.payload.clientId !== undefined;\n }\n\n /** `true` when the token belongs to an internal (team member) user. */\n get isInternalUser(): boolean {\n return this.payload.internalUserId !== undefined;\n }\n\n /**\n * `true` when an internal user is proxying as a client (CRM \"preview as client\"):\n * both `internalUserId` and `clientId` are present. Both `isClientUser` and\n * `isInternalUser` are also `true` in this case — branch on this getter first.\n */\n get isProxying(): boolean {\n return this.payload.internalUserId !== undefined && this.payload.clientId !== undefined;\n }\n\n /**\n * Assert that the token belongs to a client user and return the narrowed payload.\n * @throws {AssemblyUnauthorizedError} If the token does not represent a client user.\n */\n ensureIsClient(): ClientTokenPayload {\n if (!this.isClientUser) {\n throw new AssemblyUnauthorizedError({\n message:\n \"This operation requires a client token (clientId), but the token does not contain a clientId\",\n });\n }\n return this.payload as ClientTokenPayload;\n }\n\n /**\n * Assert that the token belongs to an internal (team member) user and return the narrowed payload.\n * @throws {AssemblyUnauthorizedError} If the token does not represent an internal user.\n */\n ensureIsInternalUser(): InternalUserTokenPayload {\n if (!this.isInternalUser) {\n throw new AssemblyUnauthorizedError({\n message:\n \"This operation requires an internal user token (internalUserId), but the token does not contain an internalUserId\",\n });\n }\n return this.payload as InternalUserTokenPayload;\n }\n\n /**\n * Build the compound API key sent in the `X-API-Key` header.\n *\n * - With `tokenId`: `{workspaceId}/{apiKey}/{tokenId}`\n * - Without `tokenId`: `{workspaceId}/{apiKey}`\n */\n buildCompoundKey({ apiKey }: { apiKey: string }): string {\n if (this.payload.tokenId) {\n return `${this.payload.workspaceId}/${apiKey}/${this.payload.tokenId}`;\n }\n return `${this.payload.workspaceId}/${apiKey}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,IAAa,gBAAb,MAAa,cAAc;CACzB,QAAA,QAA2D,IAAI,mBAAkC;CAEjG;CACA;CAEA,YAAY,EAAE,OAAO,UAA8C;AACjE,MAAI,UAAU,KAAA,KAAa,UAAU,QAAQ,UAAU,GACrD,OAAM,IAAI,sBAAsB;AAGlC,MAAI,OAAO,UAAU,SACnB,OAAM,IAAI,0BAA0B,EAClC,SAAS,sCAAsC,OAAO,SACvD,CAAC;AAGJ,OAAK,eAAe;AACpB,OAAK,UAAU,gBAAgB,QAAQ;GAAE;GAAQ;GAAO,CAAC,CAAC;;;;;;;;;CAU5D,OAAO,IAAI,SAA4D;EACrE,MAAM,WAAW,eAAA,MAAqB,UAAU;AAChD,MAAI,YAAY,SAAS,iBAAiB,QAAQ,MAChD,QAAO;EAET,MAAM,WAAW,IAAI,cAAc,QAAQ;AAC3C,iBAAA,MAAqB,UAAU,SAAS;AACxC,SAAO;;;CAIT,IAAI,cAAsB;AACxB,SAAO,KAAK,QAAQ;;;CAItB,IAAI,UAA8B;AAChC,SAAO,KAAK,QAAQ;;;CAItB,IAAI,UAA8B;AAChC,SAAO,KAAK,QAAQ;;;CAItB,IAAI,WAA+B;AACjC,SAAO,KAAK,QAAQ;;;CAItB,IAAI,YAAgC;AAClC,SAAO,KAAK,QAAQ;;;CAItB,IAAI,iBAAqC;AACvC,SAAO,KAAK,QAAQ;;;CAItB,IAAI,eAAwB;AAC1B,SAAO,KAAK,QAAQ,aAAa,KAAA;;;CAInC,IAAI,iBAA0B;AAC5B,SAAO,KAAK,QAAQ,mBAAmB,KAAA;;;;;;;CAQzC,IAAI,aAAsB;AACxB,SAAO,KAAK,QAAQ,mBAAmB,KAAA,KAAa,KAAK,QAAQ,aAAa,KAAA;;;;;;CAOhF,iBAAqC;AACnC,MAAI,CAAC,KAAK,aACR,OAAM,IAAI,0BAA0B,EAClC,SACE,gGACH,CAAC;AAEJ,SAAO,KAAK;;;;;;CAOd,uBAAiD;AAC/C,MAAI,CAAC,KAAK,eACR,OAAM,IAAI,0BAA0B,EAClC,SACE,qHACH,CAAC;AAEJ,SAAO,KAAK;;;;;;;;CASd,iBAAiB,EAAE,UAAsC;AACvD,MAAI,KAAK,QAAQ,QACf,QAAO,GAAG,KAAK,QAAQ,YAAY,GAAG,OAAO,GAAG,KAAK,QAAQ;AAE/D,SAAO,GAAG,KAAK,QAAQ,YAAY,GAAG"}
|
|
@@ -4,6 +4,8 @@ interface RequestOpts {
|
|
|
4
4
|
}
|
|
5
5
|
interface Transport {
|
|
6
6
|
get<T>(path: string, opts?: RequestOpts): Promise<T>;
|
|
7
|
+
/** GET returning raw bytes, for endpoints that stream `application/octet-stream`. */
|
|
8
|
+
getRaw(path: string, opts?: RequestOpts): Promise<ArrayBuffer>;
|
|
7
9
|
post<T>(path: string, body?: unknown, opts?: RequestOpts): Promise<T>;
|
|
8
10
|
put<T>(path: string, body?: unknown, opts?: RequestOpts): Promise<T>;
|
|
9
11
|
patch<T>(path: string, body?: unknown, opts?: RequestOpts): Promise<T>;
|
package/dist/transport/http.mjs
CHANGED
|
@@ -114,6 +114,7 @@ const createTransport = (options) => {
|
|
|
114
114
|
});
|
|
115
115
|
return {
|
|
116
116
|
get: (path, opts) => withErrorMapping(api.get(stripLeadingSlash(path), { searchParams: opts?.searchParams }).json()),
|
|
117
|
+
getRaw: (path, opts) => withErrorMapping(api.get(stripLeadingSlash(path), { searchParams: opts?.searchParams }).arrayBuffer()),
|
|
117
118
|
post: (path, body, opts) => withErrorMapping(api.post(stripLeadingSlash(path), {
|
|
118
119
|
json: body,
|
|
119
120
|
searchParams: opts?.searchParams
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.mjs","names":[],"sources":["../../src/transport/http.ts"],"sourcesContent":["import ky, { HTTPError } from \"ky\";\nimport pThrottle from \"p-throttle\";\nimport type { AssemblyError } from \"src/errors/base\";\nimport { AssemblyConnectionError } from \"src/errors/connection\";\nimport { AssemblyForbiddenError } from \"src/errors/forbidden\";\nimport { AssemblyNotFoundError } from \"src/errors/not-found\";\nimport { AssemblyRateLimitError } from \"src/errors/rate-limit\";\nimport { AssemblyServerError } from \"src/errors/server\";\nimport { AssemblyUnauthorizedError } from \"src/errors/unauthorized\";\nimport { AssemblyValidationError } from \"src/errors/validation\";\n\nconst DEFAULT_BASE_URL: string = \"https://api.assembly.com\";\nconst DEFAULT_REQUESTS_PER_SECOND: number = 20;\n\n// ---------------------------------------------------------------------------\n// Public types\n// ---------------------------------------------------------------------------\n\nexport interface TransportOptions {\n /** Pre-built compound key value for the `X-API-Key` header. */\n compoundKey: string;\n /** SDK version string for the `X-Assembly-SDK-Version` header. */\n sdkVersion: string;\n /** Base URL for all API requests. Defaults to the Assembly API. */\n baseUrl?: string;\n /** Maximum number of retry attempts for retryable errors (ky default: 2). */\n retryCount?: number;\n /** Maximum requests per second for the sliding-window rate limiter. */\n requestsPerSecond?: number;\n /** Injectable fetch function for testing. Defaults to global `fetch`. */\n fetch?: typeof globalThis.fetch;\n}\n\nexport interface RequestOpts {\n searchParams?: Record<string, string | number | boolean>;\n}\n\nexport interface Transport {\n get<T>(path: string, opts?: RequestOpts): Promise<T>;\n post<T>(path: string, body?: unknown, opts?: RequestOpts): Promise<T>;\n put<T>(path: string, body?: unknown, opts?: RequestOpts): Promise<T>;\n patch<T>(path: string, body?: unknown, opts?: RequestOpts): Promise<T>;\n delete(path: string, opts?: RequestOpts): Promise<void>;\n}\n\n// ---------------------------------------------------------------------------\n// Retry-After parsing\n// ---------------------------------------------------------------------------\n\n/**\n * Parses a `Retry-After` header value into seconds.\n * Supports both integer seconds and HTTP-date formats (RFC 7231).\n */\nexport const parseRetryAfter = (header: string | null): number | undefined => {\n if (!header) return undefined;\n\n const seconds = Number(header);\n if (!Number.isNaN(seconds)) return seconds >= 0 ? seconds : undefined;\n\n const dateMs = Date.parse(header);\n if (!Number.isNaN(dateMs)) {\n const delayMs = dateMs - Date.now();\n return delayMs > 0 ? Math.ceil(delayMs / 1000) : 0;\n }\n\n return undefined;\n};\n\n// ---------------------------------------------------------------------------\n// Error mapping\n// ---------------------------------------------------------------------------\n\nconst tryParseBody = async (response: Response): Promise<unknown> => {\n try {\n return await response.clone().json();\n } catch {\n return undefined;\n }\n};\n\nconst createErrorForStatus = (\n status: number,\n cause: HTTPError,\n details: unknown,\n retryAfterHeader: string | null,\n): AssemblyError => {\n switch (status) {\n case 400:\n case 422:\n return new AssemblyValidationError({ cause, details });\n case 401:\n return new AssemblyUnauthorizedError({ cause, details });\n case 403:\n return new AssemblyForbiddenError({ cause, details });\n case 404:\n return new AssemblyNotFoundError({ cause, details });\n case 429:\n return new AssemblyRateLimitError({\n cause,\n details,\n retryAfter: parseRetryAfter(retryAfterHeader),\n });\n default:\n if (status >= 500) {\n return new AssemblyServerError({ cause, details });\n }\n return new AssemblyConnectionError({\n cause,\n details,\n message: `Unexpected HTTP ${status}`,\n });\n }\n};\n\nconst mapHttpError = async (error: HTTPError): Promise<AssemblyError> => {\n const { response } = error;\n const details = await tryParseBody(response);\n return createErrorForStatus(response.status, error, details, response.headers.get(\"Retry-After\"));\n};\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nconst stripLeadingSlash = (path: string): string => (path.startsWith(\"/\") ? path.slice(1) : path);\n\nconst withErrorMapping = async <T>(request: Promise<T>): Promise<T> => {\n try {\n return await request;\n } catch (error) {\n if (error instanceof HTTPError) {\n throw await mapHttpError(error);\n }\n throw new AssemblyConnectionError({ cause: error });\n }\n};\n\n// ---------------------------------------------------------------------------\n// Transport factory\n// ---------------------------------------------------------------------------\n\n/**\n * Creates an HTTP transport backed by `ky` with rate limiting, retry,\n * auth headers, and structured error mapping. Each call produces a fully\n * independent instance (safe for serverless / multi-tenant).\n */\nexport const createTransport = (options: TransportOptions): Transport => {\n const acquireSlot = pThrottle({\n interval: 1000,\n limit: options.requestsPerSecond ?? DEFAULT_REQUESTS_PER_SECOND,\n })(async (): Promise<void> => {});\n\n const api = ky.create({\n headers: {\n \"X-API-Key\": options.compoundKey,\n \"X-Assembly-SDK-Version\": options.sdkVersion,\n },\n hooks: {\n beforeRequest: [\n async (): Promise<void> => {\n await acquireSlot();\n },\n ],\n },\n prefix: options.baseUrl ?? DEFAULT_BASE_URL,\n retry: {\n limit: options.retryCount ?? 2,\n methods: [\"get\", \"post\", \"put\", \"patch\", \"delete\"],\n },\n ...(options.fetch ? { fetch: options.fetch } : {}),\n });\n\n return {\n get: <T>(path: string, opts?: RequestOpts): Promise<T> =>\n withErrorMapping(\n api\n .get(stripLeadingSlash(path), {\n searchParams: opts?.searchParams,\n })\n .json<T>(),\n ),\n\n post: <T>(path: string, body?: unknown, opts?: RequestOpts): Promise<T> =>\n withErrorMapping(\n api\n .post(stripLeadingSlash(path), {\n json: body,\n searchParams: opts?.searchParams,\n })\n .json<T>(),\n ),\n\n put: <T>(path: string, body?: unknown, opts?: RequestOpts): Promise<T> =>\n withErrorMapping(\n api\n .put(stripLeadingSlash(path), {\n json: body,\n searchParams: opts?.searchParams,\n })\n .json<T>(),\n ),\n\n patch: <T>(path: string, body?: unknown, opts?: RequestOpts): Promise<T> =>\n withErrorMapping(\n api\n .patch(stripLeadingSlash(path), {\n json: body,\n searchParams: opts?.searchParams,\n })\n .json<T>(),\n ),\n\n delete: async (path: string, opts?: RequestOpts): Promise<void> => {\n try {\n await api.delete(stripLeadingSlash(path), {\n searchParams: opts?.searchParams,\n });\n } catch (error) {\n if (error instanceof HTTPError) {\n throw await mapHttpError(error);\n }\n throw new AssemblyConnectionError({ cause: error });\n }\n },\n };\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"http.mjs","names":[],"sources":["../../src/transport/http.ts"],"sourcesContent":["import ky, { HTTPError } from \"ky\";\nimport pThrottle from \"p-throttle\";\nimport type { AssemblyError } from \"src/errors/base\";\nimport { AssemblyConnectionError } from \"src/errors/connection\";\nimport { AssemblyForbiddenError } from \"src/errors/forbidden\";\nimport { AssemblyNotFoundError } from \"src/errors/not-found\";\nimport { AssemblyRateLimitError } from \"src/errors/rate-limit\";\nimport { AssemblyServerError } from \"src/errors/server\";\nimport { AssemblyUnauthorizedError } from \"src/errors/unauthorized\";\nimport { AssemblyValidationError } from \"src/errors/validation\";\n\nconst DEFAULT_BASE_URL: string = \"https://api.assembly.com\";\nconst DEFAULT_REQUESTS_PER_SECOND: number = 20;\n\n// ---------------------------------------------------------------------------\n// Public types\n// ---------------------------------------------------------------------------\n\nexport interface TransportOptions {\n /** Pre-built compound key value for the `X-API-Key` header. */\n compoundKey: string;\n /** SDK version string for the `X-Assembly-SDK-Version` header. */\n sdkVersion: string;\n /** Base URL for all API requests. Defaults to the Assembly API. */\n baseUrl?: string;\n /** Maximum number of retry attempts for retryable errors (ky default: 2). */\n retryCount?: number;\n /** Maximum requests per second for the sliding-window rate limiter. */\n requestsPerSecond?: number;\n /** Injectable fetch function for testing. Defaults to global `fetch`. */\n fetch?: typeof globalThis.fetch;\n}\n\nexport interface RequestOpts {\n searchParams?: Record<string, string | number | boolean>;\n}\n\nexport interface Transport {\n get<T>(path: string, opts?: RequestOpts): Promise<T>;\n /** GET returning raw bytes, for endpoints that stream `application/octet-stream`. */\n getRaw(path: string, opts?: RequestOpts): Promise<ArrayBuffer>;\n post<T>(path: string, body?: unknown, opts?: RequestOpts): Promise<T>;\n put<T>(path: string, body?: unknown, opts?: RequestOpts): Promise<T>;\n patch<T>(path: string, body?: unknown, opts?: RequestOpts): Promise<T>;\n delete(path: string, opts?: RequestOpts): Promise<void>;\n}\n\n// ---------------------------------------------------------------------------\n// Retry-After parsing\n// ---------------------------------------------------------------------------\n\n/**\n * Parses a `Retry-After` header value into seconds.\n * Supports both integer seconds and HTTP-date formats (RFC 7231).\n */\nexport const parseRetryAfter = (header: string | null): number | undefined => {\n if (!header) return undefined;\n\n const seconds = Number(header);\n if (!Number.isNaN(seconds)) return seconds >= 0 ? seconds : undefined;\n\n const dateMs = Date.parse(header);\n if (!Number.isNaN(dateMs)) {\n const delayMs = dateMs - Date.now();\n return delayMs > 0 ? Math.ceil(delayMs / 1000) : 0;\n }\n\n return undefined;\n};\n\n// ---------------------------------------------------------------------------\n// Error mapping\n// ---------------------------------------------------------------------------\n\nconst tryParseBody = async (response: Response): Promise<unknown> => {\n try {\n return await response.clone().json();\n } catch {\n return undefined;\n }\n};\n\nconst createErrorForStatus = (\n status: number,\n cause: HTTPError,\n details: unknown,\n retryAfterHeader: string | null,\n): AssemblyError => {\n switch (status) {\n case 400:\n case 422:\n return new AssemblyValidationError({ cause, details });\n case 401:\n return new AssemblyUnauthorizedError({ cause, details });\n case 403:\n return new AssemblyForbiddenError({ cause, details });\n case 404:\n return new AssemblyNotFoundError({ cause, details });\n case 429:\n return new AssemblyRateLimitError({\n cause,\n details,\n retryAfter: parseRetryAfter(retryAfterHeader),\n });\n default:\n if (status >= 500) {\n return new AssemblyServerError({ cause, details });\n }\n return new AssemblyConnectionError({\n cause,\n details,\n message: `Unexpected HTTP ${status}`,\n });\n }\n};\n\nconst mapHttpError = async (error: HTTPError): Promise<AssemblyError> => {\n const { response } = error;\n const details = await tryParseBody(response);\n return createErrorForStatus(response.status, error, details, response.headers.get(\"Retry-After\"));\n};\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nconst stripLeadingSlash = (path: string): string => (path.startsWith(\"/\") ? path.slice(1) : path);\n\nconst withErrorMapping = async <T>(request: Promise<T>): Promise<T> => {\n try {\n return await request;\n } catch (error) {\n if (error instanceof HTTPError) {\n throw await mapHttpError(error);\n }\n throw new AssemblyConnectionError({ cause: error });\n }\n};\n\n// ---------------------------------------------------------------------------\n// Transport factory\n// ---------------------------------------------------------------------------\n\n/**\n * Creates an HTTP transport backed by `ky` with rate limiting, retry,\n * auth headers, and structured error mapping. Each call produces a fully\n * independent instance (safe for serverless / multi-tenant).\n */\nexport const createTransport = (options: TransportOptions): Transport => {\n const acquireSlot = pThrottle({\n interval: 1000,\n limit: options.requestsPerSecond ?? DEFAULT_REQUESTS_PER_SECOND,\n })(async (): Promise<void> => {});\n\n const api = ky.create({\n headers: {\n \"X-API-Key\": options.compoundKey,\n \"X-Assembly-SDK-Version\": options.sdkVersion,\n },\n hooks: {\n beforeRequest: [\n async (): Promise<void> => {\n await acquireSlot();\n },\n ],\n },\n prefix: options.baseUrl ?? DEFAULT_BASE_URL,\n retry: {\n limit: options.retryCount ?? 2,\n methods: [\"get\", \"post\", \"put\", \"patch\", \"delete\"],\n },\n ...(options.fetch ? { fetch: options.fetch } : {}),\n });\n\n return {\n get: <T>(path: string, opts?: RequestOpts): Promise<T> =>\n withErrorMapping(\n api\n .get(stripLeadingSlash(path), {\n searchParams: opts?.searchParams,\n })\n .json<T>(),\n ),\n\n getRaw: (path: string, opts?: RequestOpts): Promise<ArrayBuffer> =>\n withErrorMapping(\n api\n .get(stripLeadingSlash(path), {\n searchParams: opts?.searchParams,\n })\n .arrayBuffer(),\n ),\n\n post: <T>(path: string, body?: unknown, opts?: RequestOpts): Promise<T> =>\n withErrorMapping(\n api\n .post(stripLeadingSlash(path), {\n json: body,\n searchParams: opts?.searchParams,\n })\n .json<T>(),\n ),\n\n put: <T>(path: string, body?: unknown, opts?: RequestOpts): Promise<T> =>\n withErrorMapping(\n api\n .put(stripLeadingSlash(path), {\n json: body,\n searchParams: opts?.searchParams,\n })\n .json<T>(),\n ),\n\n patch: <T>(path: string, body?: unknown, opts?: RequestOpts): Promise<T> =>\n withErrorMapping(\n api\n .patch(stripLeadingSlash(path), {\n json: body,\n searchParams: opts?.searchParams,\n })\n .json<T>(),\n ),\n\n delete: async (path: string, opts?: RequestOpts): Promise<void> => {\n try {\n await api.delete(stripLeadingSlash(path), {\n searchParams: opts?.searchParams,\n });\n } catch (error) {\n if (error instanceof HTTPError) {\n throw await mapHttpError(error);\n }\n throw new AssemblyConnectionError({ cause: error });\n }\n },\n };\n};\n"],"mappings":"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"}
|
package/dist/version.mjs
CHANGED
package/dist/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["/** SDK version string sent with every API request. */\nexport const SDK_VERSION: string = \"
|
|
1
|
+
{"version":3,"file":"version.mjs","names":[],"sources":["../src/version.ts"],"sourcesContent":["/** SDK version string sent with every API request. */\nexport const SDK_VERSION: string = \"0.0.7\"; // x-release-please-version\n"],"mappings":";;AACA,MAAa,cAAsB"}
|