assembly-kit 0.0.3 → 0.0.5

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.
Files changed (105) hide show
  1. package/CLAUDE.md +42 -39
  2. package/README.md +47 -32
  3. package/dist/client/index.d.mts +6 -0
  4. package/dist/client/index.mjs +9 -0
  5. package/dist/client/index.mjs.map +1 -1
  6. package/dist/index.d.mts +14 -11
  7. package/dist/index.mjs +14 -11
  8. package/dist/lib/modules/app-installs/resource.d.mts +13 -1
  9. package/dist/lib/modules/app-installs/resource.mjs +25 -1
  10. package/dist/lib/modules/app-installs/resource.mjs.map +1 -1
  11. package/dist/lib/modules/app-installs/schema.d.mts +47 -1
  12. package/dist/lib/modules/app-installs/schema.mjs +37 -1
  13. package/dist/lib/modules/app-installs/schema.mjs.map +1 -1
  14. package/dist/lib/modules/clients/resource.d.mts +3 -1
  15. package/dist/lib/modules/clients/resource.mjs +9 -1
  16. package/dist/lib/modules/clients/resource.mjs.map +1 -1
  17. package/dist/lib/modules/clients/schema.d.mts +11 -3
  18. package/dist/lib/modules/clients/schema.mjs +12 -4
  19. package/dist/lib/modules/clients/schema.mjs.map +1 -1
  20. package/dist/lib/modules/companies/resource.d.mts +7 -1
  21. package/dist/lib/modules/companies/resource.mjs +10 -1
  22. package/dist/lib/modules/companies/resource.mjs.map +1 -1
  23. package/dist/lib/modules/companies/schema.d.mts +18 -1
  24. package/dist/lib/modules/companies/schema.mjs +13 -1
  25. package/dist/lib/modules/companies/schema.mjs.map +1 -1
  26. package/dist/lib/modules/custom-fields/resource.d.mts +3 -1
  27. package/dist/lib/modules/custom-fields/resource.mjs +9 -1
  28. package/dist/lib/modules/custom-fields/resource.mjs.map +1 -1
  29. package/dist/lib/modules/custom-fields/schema.d.mts +19 -1
  30. package/dist/lib/modules/custom-fields/schema.mjs +9 -1
  31. package/dist/lib/modules/custom-fields/schema.mjs.map +1 -1
  32. package/dist/lib/modules/files/resource.d.mts +15 -1
  33. package/dist/lib/modules/files/resource.mjs +29 -1
  34. package/dist/lib/modules/files/resource.mjs.map +1 -1
  35. package/dist/lib/modules/files/schema.d.mts +15 -1
  36. package/dist/lib/modules/files/schema.mjs +8 -1
  37. package/dist/lib/modules/files/schema.mjs.map +1 -1
  38. package/dist/lib/modules/forms/resource.d.mts +15 -1
  39. package/dist/lib/modules/forms/resource.mjs +25 -0
  40. package/dist/lib/modules/forms/resource.mjs.map +1 -1
  41. package/dist/lib/modules/forms/schema.d.mts +35 -1
  42. package/dist/lib/modules/forms/schema.mjs +40 -1
  43. package/dist/lib/modules/forms/schema.mjs.map +1 -1
  44. package/dist/lib/modules/index.d.mts +13 -10
  45. package/dist/lib/modules/index.mjs +3 -0
  46. package/dist/lib/modules/internal-users/resource.d.mts +8 -1
  47. package/dist/lib/modules/internal-users/resource.mjs +17 -1
  48. package/dist/lib/modules/internal-users/resource.mjs.map +1 -1
  49. package/dist/lib/modules/internal-users/schema.d.mts +22 -1
  50. package/dist/lib/modules/internal-users/schema.mjs +22 -1
  51. package/dist/lib/modules/internal-users/schema.mjs.map +1 -1
  52. package/dist/lib/modules/invoices/schema.d.mts +1 -1
  53. package/dist/lib/modules/invoices/schema.mjs +1 -0
  54. package/dist/lib/modules/invoices/schema.mjs.map +1 -1
  55. package/dist/lib/modules/me/resource.d.mts +19 -0
  56. package/dist/lib/modules/me/resource.mjs +23 -0
  57. package/dist/lib/modules/me/resource.mjs.map +1 -0
  58. package/dist/lib/modules/me/schema.d.mts +15 -0
  59. package/dist/lib/modules/me/schema.mjs +13 -0
  60. package/dist/lib/modules/me/schema.mjs.map +1 -0
  61. package/dist/lib/modules/message-channels/resource.d.mts +5 -1
  62. package/dist/lib/modules/message-channels/resource.mjs +9 -1
  63. package/dist/lib/modules/message-channels/resource.mjs.map +1 -1
  64. package/dist/lib/modules/message-channels/schema.d.mts +10 -1
  65. package/dist/lib/modules/message-channels/schema.mjs +7 -1
  66. package/dist/lib/modules/message-channels/schema.mjs.map +1 -1
  67. package/dist/lib/modules/notifications/resource.d.mts +2 -0
  68. package/dist/lib/modules/notifications/resource.mjs +8 -0
  69. package/dist/lib/modules/notifications/resource.mjs.map +1 -1
  70. package/dist/lib/modules/prices/resource.d.mts +3 -1
  71. package/dist/lib/modules/prices/resource.mjs +8 -0
  72. package/dist/lib/modules/prices/resource.mjs.map +1 -1
  73. package/dist/lib/modules/prices/schema.d.mts +14 -1
  74. package/dist/lib/modules/prices/schema.mjs +19 -1
  75. package/dist/lib/modules/prices/schema.mjs.map +1 -1
  76. package/dist/lib/modules/products/resource.d.mts +3 -1
  77. package/dist/lib/modules/products/resource.mjs +8 -0
  78. package/dist/lib/modules/products/resource.mjs.map +1 -1
  79. package/dist/lib/modules/products/schema.d.mts +7 -1
  80. package/dist/lib/modules/products/schema.mjs +6 -1
  81. package/dist/lib/modules/products/schema.mjs.map +1 -1
  82. package/dist/lib/modules/refunds/resource.d.mts +27 -0
  83. package/dist/lib/modules/refunds/resource.mjs +40 -0
  84. package/dist/lib/modules/refunds/resource.mjs.map +1 -0
  85. package/dist/lib/modules/refunds/schema.d.mts +35 -0
  86. package/dist/lib/modules/refunds/schema.mjs +32 -0
  87. package/dist/lib/modules/refunds/schema.mjs.map +1 -0
  88. package/dist/lib/modules/task-comments/resource.d.mts +29 -0
  89. package/dist/lib/modules/task-comments/resource.mjs +44 -0
  90. package/dist/lib/modules/task-comments/resource.mjs.map +1 -0
  91. package/dist/lib/modules/task-comments/schema.d.mts +24 -0
  92. package/dist/lib/modules/task-comments/schema.mjs +21 -0
  93. package/dist/lib/modules/task-comments/schema.mjs.map +1 -0
  94. package/dist/lib/modules/tasks/schema.d.mts +1 -1
  95. package/dist/lib/modules/tasks/schema.mjs +1 -1
  96. package/dist/lib/modules/tasks/schema.mjs.map +1 -1
  97. package/dist/logger/index.d.mts +20 -1
  98. package/dist/logger/index.mjs +37 -2
  99. package/dist/logger/index.mjs.map +1 -1
  100. package/dist/schemas/index.d.mts +14 -11
  101. package/dist/schemas/index.mjs +14 -11
  102. package/dist/transport/http.d.mts +2 -0
  103. package/dist/transport/http.mjs +1 -0
  104. package/dist/transport/http.mjs.map +1 -1
  105. package/package.json +7 -2
@@ -0,0 +1,40 @@
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 { RefundResponseSchema, RefundsResponseSchema } from "./schema.mjs";
5
+ //#region src/lib/modules/refunds/resource.ts
6
+ var RefundsResource = class {
7
+ #transport;
8
+ #validate;
9
+ constructor({ transport, validateResponses }) {
10
+ this.#transport = transport;
11
+ this.#validate = validateResponses;
12
+ }
13
+ /** Issue a refund against a paid invoice. */
14
+ async create(body) {
15
+ return parseResponse({
16
+ schema: RefundResponseSchema,
17
+ data: await this.#transport.post("v1/refunds", body),
18
+ validate: this.#validate
19
+ });
20
+ }
21
+ /** List the refunds issued against an invoice. */
22
+ async list(args) {
23
+ return parseResponse({
24
+ schema: RefundsResponseSchema,
25
+ data: await this.#transport.get("v1/refunds", { searchParams: buildSearchParams(args) }),
26
+ validate: this.#validate
27
+ });
28
+ }
29
+ /** Iterate over all refunds for an invoice, automatically paginating. Default limit per page: 500. */
30
+ async listAll(args) {
31
+ return paginate((listArgs) => this.list({
32
+ ...args,
33
+ ...listArgs
34
+ }), { limit: args.limit ?? 500 });
35
+ }
36
+ };
37
+ //#endregion
38
+ export { RefundsResource };
39
+
40
+ //# sourceMappingURL=resource.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource.mjs","names":["#transport","#validate"],"sources":["../../../../src/lib/modules/refunds/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 { RefundResponseSchema, RefundsResponseSchema } from \"./schema\";\nimport type { Refund, RefundCreateRequest, RefundsResponse } from \"./schema\";\n\nexport interface ListRefundsArgs extends ListArgs {\n invoiceId: string;\n}\n\nexport class RefundsResource {\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 /** Issue a refund against a paid invoice. */\n async create(body: RefundCreateRequest): Promise<Refund> {\n const raw: unknown = await this.#transport.post(\"v1/refunds\", body);\n return parseResponse({ schema: RefundResponseSchema, data: raw, validate: this.#validate });\n }\n\n /** List the refunds issued against an invoice. */\n async list(args: ListRefundsArgs): Promise<RefundsResponse> {\n const raw: unknown = await this.#transport.get(\"v1/refunds\", {\n searchParams: buildSearchParams(args),\n });\n return parseResponse({ schema: RefundsResponseSchema, data: raw, validate: this.#validate });\n }\n\n /** Iterate over all refunds for an invoice, automatically paginating. Default limit per page: 500. */\n async listAll(args: Omit<ListRefundsArgs, \"nextToken\">): Promise<Refund[]> {\n return paginate((listArgs) => this.list({ ...args, ...listArgs }), {\n limit: args.limit ?? 500,\n });\n }\n}\n"],"mappings":";;;;;AAaA,IAAa,kBAAb,MAA6B;CAC3B;CACA;CAEA,YAAY,EACV,WACA,qBAIC;AACD,QAAA,YAAkB;AAClB,QAAA,WAAiB;;;CAInB,MAAM,OAAO,MAA4C;AAEvD,SAAO,cAAc;GAAE,QAAQ;GAAsB,MAAM,MADhC,MAAA,UAAgB,KAAK,cAAc,KAAK;GACH,UAAU,MAAA;GAAgB,CAAC;;;CAI7F,MAAM,KAAK,MAAiD;AAI1D,SAAO,cAAc;GAAE,QAAQ;GAAuB,MAAM,MAHjC,MAAA,UAAgB,IAAI,cAAc,EAC3D,cAAc,kBAAkB,KAAK,EACtC,CAAC;GAC+D,UAAU,MAAA;GAAgB,CAAC;;;CAI9F,MAAM,QAAQ,MAA6D;AACzE,SAAO,UAAU,aAAa,KAAK,KAAK;GAAE,GAAG;GAAM,GAAG;GAAU,CAAC,EAAE,EACjE,OAAO,KAAK,SAAS,KACtB,CAAC"}
@@ -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 = "done" | "inProgress" | "todo";
4
+ type TaskStatus = "completed" | "inProgress" | "todo";
5
5
  declare const TaskStatusSchema: z.ZodType<TaskStatus>;
6
6
  interface Task {
7
7
  assigneeId?: string;
@@ -3,7 +3,7 @@ import { z } from "zod";
3
3
  const TaskStatusSchema = z.enum([
4
4
  "todo",
5
5
  "inProgress",
6
- "done"
6
+ "completed"
7
7
  ]);
8
8
  const TaskSchema = z.object({
9
9
  assigneeId: z.string().optional(),
@@ -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 = \"done\" | \"inProgress\" | \"todo\";\n\nexport const TaskStatusSchema: z.ZodType<TaskStatus> = z.enum([\"todo\", \"inProgress\", \"done\"]);\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;CAAO,CAAC;AAgB7F,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"}
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"}
@@ -21,6 +21,25 @@ import { Logger, Logger as Logger$1, LoggerOptions, LoggerOptions as LoggerOptio
21
21
  declare const createLogger: (options?: LoggerOptions$1) => Logger$1;
22
22
  /** A default global logger instance for convenience. */
23
23
  declare const logger: Logger$1;
24
+ /**
25
+ * Create a logger with human-readable colorized output for local development.
26
+ *
27
+ * Uses pino-pretty as a **synchronous stream** (`sync: true`) rather than the
28
+ * default worker-thread transport, so it is safe on serverless runtimes that
29
+ * forbid worker threads. Requires `pino-pretty` to be installed (optional peer
30
+ * dependency) — it is imported dynamically so plain-JSON users never bundle it.
31
+ *
32
+ * Gate it to local runs so production stays plain JSON:
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const log =
37
+ * process.env.NODE_ENV === "development"
38
+ * ? await createPrettyLogger()
39
+ * : createLogger();
40
+ * ```
41
+ */
42
+ declare const createPrettyLogger: (options?: LoggerOptions$1) => Promise<Logger$1>;
24
43
  //#endregion
25
- export { type Logger, type LoggerOptions, createLogger, logger };
44
+ export { type Logger, type LoggerOptions, createLogger, createPrettyLogger, logger };
26
45
  //# sourceMappingURL=index.d.mts.map
@@ -1,7 +1,13 @@
1
1
  import { AsyncLocalStorage } from "node:async_hooks";
2
2
  import pino from "pino";
3
3
  //#region src/logger/index.ts
4
- const DEFAULT_OPTIONS = { level: process.env.LOG_LEVEL ?? "info" };
4
+ const DEFAULT_OPTIONS = {
5
+ level: process.env.LOG_LEVEL ?? "info",
6
+ serializers: {
7
+ err: pino.stdSerializers.err,
8
+ error: pino.stdSerializers.err
9
+ }
10
+ };
5
11
  const buildLogger = (options = {}) => pino({
6
12
  ...DEFAULT_OPTIONS,
7
13
  ...options
@@ -33,7 +39,36 @@ const createLogger = (options = {}) => {
33
39
  };
34
40
  /** A default global logger instance for convenience. */
35
41
  const logger = buildLogger();
42
+ /**
43
+ * Create a logger with human-readable colorized output for local development.
44
+ *
45
+ * Uses pino-pretty as a **synchronous stream** (`sync: true`) rather than the
46
+ * default worker-thread transport, so it is safe on serverless runtimes that
47
+ * forbid worker threads. Requires `pino-pretty` to be installed (optional peer
48
+ * dependency) — it is imported dynamically so plain-JSON users never bundle it.
49
+ *
50
+ * Gate it to local runs so production stays plain JSON:
51
+ *
52
+ * @example
53
+ * ```ts
54
+ * const log =
55
+ * process.env.NODE_ENV === "development"
56
+ * ? await createPrettyLogger()
57
+ * : createLogger();
58
+ * ```
59
+ */
60
+ const createPrettyLogger = async (options = {}) => {
61
+ const { default: pretty } = await import("pino-pretty");
62
+ const stream = pretty({
63
+ colorize: true,
64
+ sync: true
65
+ });
66
+ return pino({
67
+ ...DEFAULT_OPTIONS,
68
+ ...options
69
+ }, stream);
70
+ };
36
71
  //#endregion
37
- export { createLogger, logger };
72
+ export { createLogger, createPrettyLogger, logger };
38
73
 
39
74
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/logger/index.ts"],"sourcesContent":["import { AsyncLocalStorage } from \"node:async_hooks\";\n\nimport pino from \"pino\";\nimport type { Logger, LoggerOptions } from \"pino\";\n\nexport type { Logger, LoggerOptions } from \"pino\";\n\n// pino-pretty uses a worker-thread transport that breaks in serverless\n// runtimes (Vercel, Cloudflare). Emit plain JSON everywhere; pipe through\n// the pino-pretty CLI locally if you want pretty output.\nconst DEFAULT_OPTIONS: LoggerOptions = {\n level: process.env.LOG_LEVEL ?? \"info\",\n};\n\nconst buildLogger = (options: LoggerOptions = {}): Logger =>\n pino({ ...DEFAULT_OPTIONS, ...options });\n\nconst store: AsyncLocalStorage<Logger> = new AsyncLocalStorage<Logger>();\n\n/**\n * Get or create a request-scoped logger via `AsyncLocalStorage`.\n * Returns the existing instance if one exists. Pass options to customize\n * on first call; subsequent calls in the same async context return the\n * same instance.\n *\n * @example\n * ```ts\n * const logger = createLogger({ level: \"debug\" });\n * logger.info(\"hello\");\n * logger.warn(\"careful\");\n * logger.error(\"oops\");\n *\n * // Later in the same async context:\n * const same = createLogger(); // returns the same instance\n * ```\n */\nexport const createLogger = (options: LoggerOptions = {}): Logger => {\n const existing = store.getStore();\n if (existing) {\n return existing;\n }\n const instance = buildLogger(options);\n store.enterWith(instance);\n return instance;\n};\n\n/** A default global logger instance for convenience. */\nexport const logger: Logger = buildLogger();\n"],"mappings":";;;AAUA,MAAM,kBAAiC,EACrC,OAAO,QAAQ,IAAI,aAAa,QACjC;AAED,MAAM,eAAe,UAAyB,EAAE,KAC9C,KAAK;CAAE,GAAG;CAAiB,GAAG;CAAS,CAAC;AAE1C,MAAM,QAAmC,IAAI,mBAA2B;;;;;;;;;;;;;;;;;;AAmBxE,MAAa,gBAAgB,UAAyB,EAAE,KAAa;CACnE,MAAM,WAAW,MAAM,UAAU;AACjC,KAAI,SACF,QAAO;CAET,MAAM,WAAW,YAAY,QAAQ;AACrC,OAAM,UAAU,SAAS;AACzB,QAAO;;;AAIT,MAAa,SAAiB,aAAa"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/logger/index.ts"],"sourcesContent":["import { AsyncLocalStorage } from \"node:async_hooks\";\n\nimport pino from \"pino\";\nimport type { Logger, LoggerOptions } from \"pino\";\n\nexport type { Logger, LoggerOptions } from \"pino\";\n\n// pino-pretty's default transport uses a worker thread that breaks in\n// serverless runtimes (Vercel, Cloudflare). Emit plain JSON everywhere.\n// The `err`/`error` serializers ensure Error objects log message + stack\n// instead of `{}` — the usual serverless footgun. For pretty local output\n// use `createPrettyLogger` below (sync stream, no worker thread).\nconst DEFAULT_OPTIONS: LoggerOptions = {\n level: process.env.LOG_LEVEL ?? \"info\",\n serializers: {\n err: pino.stdSerializers.err,\n error: pino.stdSerializers.err,\n },\n};\n\nconst buildLogger = (options: LoggerOptions = {}): Logger =>\n pino({ ...DEFAULT_OPTIONS, ...options });\n\nconst store: AsyncLocalStorage<Logger> = new AsyncLocalStorage<Logger>();\n\n/**\n * Get or create a request-scoped logger via `AsyncLocalStorage`.\n * Returns the existing instance if one exists. Pass options to customize\n * on first call; subsequent calls in the same async context return the\n * same instance.\n *\n * @example\n * ```ts\n * const logger = createLogger({ level: \"debug\" });\n * logger.info(\"hello\");\n * logger.warn(\"careful\");\n * logger.error(\"oops\");\n *\n * // Later in the same async context:\n * const same = createLogger(); // returns the same instance\n * ```\n */\nexport const createLogger = (options: LoggerOptions = {}): Logger => {\n const existing = store.getStore();\n if (existing) {\n return existing;\n }\n const instance = buildLogger(options);\n store.enterWith(instance);\n return instance;\n};\n\n/** A default global logger instance for convenience. */\nexport const logger: Logger = buildLogger();\n\n/**\n * Create a logger with human-readable colorized output for local development.\n *\n * Uses pino-pretty as a **synchronous stream** (`sync: true`) rather than the\n * default worker-thread transport, so it is safe on serverless runtimes that\n * forbid worker threads. Requires `pino-pretty` to be installed (optional peer\n * dependency) — it is imported dynamically so plain-JSON users never bundle it.\n *\n * Gate it to local runs so production stays plain JSON:\n *\n * @example\n * ```ts\n * const log =\n * process.env.NODE_ENV === \"development\"\n * ? await createPrettyLogger()\n * : createLogger();\n * ```\n */\nexport const createPrettyLogger = async (options: LoggerOptions = {}): Promise<Logger> => {\n const { default: pretty } = await import(\"pino-pretty\");\n const stream = pretty({ colorize: true, sync: true });\n return pino({ ...DEFAULT_OPTIONS, ...options }, stream);\n};\n"],"mappings":";;;AAYA,MAAM,kBAAiC;CACrC,OAAO,QAAQ,IAAI,aAAa;CAChC,aAAa;EACX,KAAK,KAAK,eAAe;EACzB,OAAO,KAAK,eAAe;EAC5B;CACF;AAED,MAAM,eAAe,UAAyB,EAAE,KAC9C,KAAK;CAAE,GAAG;CAAiB,GAAG;CAAS,CAAC;AAE1C,MAAM,QAAmC,IAAI,mBAA2B;;;;;;;;;;;;;;;;;;AAmBxE,MAAa,gBAAgB,UAAyB,EAAE,KAAa;CACnE,MAAM,WAAW,MAAM,UAAU;AACjC,KAAI,SACF,QAAO;CAET,MAAM,WAAW,YAAY,QAAQ;AACrC,OAAM,UAAU,SAAS;AACzB,QAAO;;;AAIT,MAAa,SAAiB,aAAa;;;;;;;;;;;;;;;;;;;AAoB3C,MAAa,qBAAqB,OAAO,UAAyB,EAAE,KAAsB;CACxF,MAAM,EAAE,SAAS,WAAW,MAAM,OAAO;CACzC,MAAM,SAAS,OAAO;EAAE,UAAU;EAAM,MAAM;EAAM,CAAC;AACrD,QAAO,KAAK;EAAE,GAAG;EAAiB,GAAG;EAAS,EAAE,OAAO"}
@@ -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 { MessageChannel, MessageChannelCreateRequest, MessageChannelCreateRequestSchema, MessageChannelResponse, MessageChannelResponseSchema, MessageChannelSchema, MessageChannelsResponse, MessageChannelsResponseSchema } from "../lib/modules/message-channels/schema.mjs";
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 };
@@ -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 { MessageChannelCreateRequestSchema, MessageChannelResponseSchema, MessageChannelSchema, MessageChannelsResponseSchema } from "../lib/modules/message-channels/schema.mjs";
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 };
@@ -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>;
@@ -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