zitejs 0.9.115 → 0.9.117

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.
@@ -94,6 +94,8 @@ const PREBUNDLED_LIBS = {
94
94
  'intercom-client': '__intercom__.js',
95
95
  '@google/generative-ai': '__gemini__.js',
96
96
  '@elevenlabs/elevenlabs-js': '__elevenlabs__.js',
97
+ 'resend': '__resend__.js',
98
+ '@clickhouse/client-web': '__clickhouse__.js',
97
99
  };
98
100
  exports.BASE_BUILD_OPTIONS = {
99
101
  bundle: true,
@@ -332,6 +332,5 @@ export interface EmailClient {
332
332
  * app's connected email integration key.
333
333
  */
334
334
  export declare function createEmailClient(integrationId: string): EmailClient;
335
- export type { NotificationLink, NotificationsCreateParams, NotificationsCreateResult, } from "../notifications/index.js";
336
335
  export { createCaller } from "../caller/index.js";
337
336
  export type { EndpointConfig } from "../caller/index.js";
@@ -412,26 +412,6 @@ function generateSchema(database, existingSchema) {
412
412
  }
413
413
  function generateSentinelSdkTypes() {
414
414
  return [
415
- "export interface NotificationLink {",
416
- " path?: string;",
417
- " params?: Record<string, string>;",
418
- "}",
419
- "",
420
- "export interface NotificationsCreateParams {",
421
- " recipients: string[];",
422
- " title: string;",
423
- " body?: string;",
424
- " link?: NotificationLink;",
425
- " path?: string;",
426
- " params?: Record<string, string>;",
427
- " payload?: Record<string, unknown>;",
428
- " idempotencyKey?: string;",
429
- "}",
430
- "",
431
- "export type NotificationsCreateResult =",
432
- " | { created: number }",
433
- " | { created: 0; preview: true; wouldCreate: number };",
434
- "",
435
415
  // Must match `AuthUser` in zitejs/runtime and `User` in zitejs/auth.
436
416
  "export interface ZiteAuthUser {",
437
417
  " id: string;",
@@ -638,10 +618,6 @@ function generateDbTs(inputSchema) {
638
618
  (table.name ? ` // "${commentSafe(table.name)}"` : ""));
639
619
  }
640
620
  lines.push(` sql: createSqlClient(),`);
641
- // No `notifications` here: it is a platform primitive, not something backed
642
- // by the project database, so it lives at `zitejs/notifications` alongside
643
- // `zitejs/pdf` and `zitejs/schedules`. Keeping it on `zite` cost a table
644
- // named "Notifications" its accessor — see RESERVED_TABLE_ACCESSORS.
645
621
  lines.push(` auth: createAuthClient<ZiteAuthUser>(),`);
646
622
  lines.push("};");
647
623
  lines.push("");
@@ -41,9 +41,9 @@ export declare function toSdkName(name: string): string;
41
41
  * `notifications` used to be here and no longer is: it was a platform
42
42
  * primitive hanging off `zite`, so a table named "Notifications" collided with
43
43
  * it and — because the sentinel was written last — lost its client entirely.
44
- * Moving it to `zitejs/notifications` removes the collision rather than
45
- * managing it, and frees the name for the table that wants it. Everything left
46
- * is genuinely backed by the project database.
44
+ * The platform client is unpublished for now, which removes the collision
45
+ * rather than managing it, and frees the name for the table that wants it.
46
+ * Everything left is genuinely backed by the project database.
47
47
  */
48
48
  export declare const RESERVED_TABLE_ACCESSORS: readonly ["sql", "auth"];
49
49
  /**
@@ -86,9 +86,9 @@ function toSdkName(name) {
86
86
  * `notifications` used to be here and no longer is: it was a platform
87
87
  * primitive hanging off `zite`, so a table named "Notifications" collided with
88
88
  * it and — because the sentinel was written last — lost its client entirely.
89
- * Moving it to `zitejs/notifications` removes the collision rather than
90
- * managing it, and frees the name for the table that wants it. Everything left
91
- * is genuinely backed by the project database.
89
+ * The platform client is unpublished for now, which removes the collision
90
+ * rather than managing it, and frees the name for the table that wants it.
91
+ * Everything left is genuinely backed by the project database.
92
92
  */
93
93
  exports.RESERVED_TABLE_ACCESSORS = ["sql", "auth"];
94
94
  /**
@@ -35,8 +35,8 @@ const recordTypeKeys = (source, typeName) => {
35
35
  // Sudzy Dashboard: a table named "Notifications" emitted a second
36
36
  // `notifications:` key and the platform client — written last — won, so the
37
37
  // table lost findAll and typed as `{ create(NotificationsCreateParams) }`.
38
- // The platform client has since moved to `zitejs/notifications`, so the name
39
- // belongs to the table again and there is nothing left to collide with.
38
+ // The platform client is unpublished, so the name belongs to the table
39
+ // again and there is nothing left to collide with.
40
40
  (0, vitest_1.it)("lets a table keep the notifications accessor", () => {
41
41
  const schema = (0, lib_js_1.generateSchema)(database([{ id: "tbl_1", name: "Notifications", fields: [] }]));
42
42
  (0, vitest_1.expect)(schema.tables[0].sdkName).toBe("notifications");
@@ -194,8 +194,8 @@ const recordTypeKeys = (source, typeName) => {
194
194
  // the only thing standing between it and a TS1117 it cannot build past.
195
195
  (0, vitest_1.it)("repairs a committed schema that already holds the collision", () => {
196
196
  // `sql`, not `notifications` — the latter stopped being a platform
197
- // accessor when the client moved to `zitejs/notifications`, so a schema
198
- // holding it is no longer a collision to repair.
197
+ // accessor when the client was unpublished, so a schema holding it is
198
+ // no longer a collision to repair.
199
199
  const source = (0, lib_js_1.generateDbTs)({
200
200
  tables: [
201
201
  { id: "tbl_1", sdkName: "sql", fields: [] },
@@ -57,6 +57,8 @@ const PREBUNDLED_LIBS = {
57
57
  'intercom-client': '__intercom__.js',
58
58
  '@google/generative-ai': '__gemini__.js',
59
59
  '@elevenlabs/elevenlabs-js': '__elevenlabs__.js',
60
+ 'resend': '__resend__.js',
61
+ '@clickhouse/client-web': '__clickhouse__.js',
60
62
  };
61
63
  export const BASE_BUILD_OPTIONS = {
62
64
  bundle: true,
package/dist/esm/cli.js CHANGED
File without changes
@@ -332,6 +332,5 @@ export interface EmailClient {
332
332
  * app's connected email integration key.
333
333
  */
334
334
  export declare function createEmailClient(integrationId: string): EmailClient;
335
- export type { NotificationLink, NotificationsCreateParams, NotificationsCreateResult, } from "../notifications/index.js";
336
335
  export { createCaller } from "../caller/index.js";
337
336
  export type { EndpointConfig } from "../caller/index.js";
@@ -399,26 +399,6 @@ export function generateSchema(database, existingSchema) {
399
399
  }
400
400
  function generateSentinelSdkTypes() {
401
401
  return [
402
- "export interface NotificationLink {",
403
- " path?: string;",
404
- " params?: Record<string, string>;",
405
- "}",
406
- "",
407
- "export interface NotificationsCreateParams {",
408
- " recipients: string[];",
409
- " title: string;",
410
- " body?: string;",
411
- " link?: NotificationLink;",
412
- " path?: string;",
413
- " params?: Record<string, string>;",
414
- " payload?: Record<string, unknown>;",
415
- " idempotencyKey?: string;",
416
- "}",
417
- "",
418
- "export type NotificationsCreateResult =",
419
- " | { created: number }",
420
- " | { created: 0; preview: true; wouldCreate: number };",
421
- "",
422
402
  // Must match `AuthUser` in zitejs/runtime and `User` in zitejs/auth.
423
403
  "export interface ZiteAuthUser {",
424
404
  " id: string;",
@@ -625,10 +605,6 @@ export function generateDbTs(inputSchema) {
625
605
  (table.name ? ` // "${commentSafe(table.name)}"` : ""));
626
606
  }
627
607
  lines.push(` sql: createSqlClient(),`);
628
- // No `notifications` here: it is a platform primitive, not something backed
629
- // by the project database, so it lives at `zitejs/notifications` alongside
630
- // `zitejs/pdf` and `zitejs/schedules`. Keeping it on `zite` cost a table
631
- // named "Notifications" its accessor — see RESERVED_TABLE_ACCESSORS.
632
608
  lines.push(` auth: createAuthClient<ZiteAuthUser>(),`);
633
609
  lines.push("};");
634
610
  lines.push("");
@@ -41,9 +41,9 @@ export declare function toSdkName(name: string): string;
41
41
  * `notifications` used to be here and no longer is: it was a platform
42
42
  * primitive hanging off `zite`, so a table named "Notifications" collided with
43
43
  * it and — because the sentinel was written last — lost its client entirely.
44
- * Moving it to `zitejs/notifications` removes the collision rather than
45
- * managing it, and frees the name for the table that wants it. Everything left
46
- * is genuinely backed by the project database.
44
+ * The platform client is unpublished for now, which removes the collision
45
+ * rather than managing it, and frees the name for the table that wants it.
46
+ * Everything left is genuinely backed by the project database.
47
47
  */
48
48
  export declare const RESERVED_TABLE_ACCESSORS: readonly ["sql", "auth"];
49
49
  /**
@@ -76,9 +76,9 @@ export function toSdkName(name) {
76
76
  * `notifications` used to be here and no longer is: it was a platform
77
77
  * primitive hanging off `zite`, so a table named "Notifications" collided with
78
78
  * it and — because the sentinel was written last — lost its client entirely.
79
- * Moving it to `zitejs/notifications` removes the collision rather than
80
- * managing it, and frees the name for the table that wants it. Everything left
81
- * is genuinely backed by the project database.
79
+ * The platform client is unpublished for now, which removes the collision
80
+ * rather than managing it, and frees the name for the table that wants it.
81
+ * Everything left is genuinely backed by the project database.
82
82
  */
83
83
  export const RESERVED_TABLE_ACCESSORS = ["sql", "auth"];
84
84
  /**
@@ -33,8 +33,8 @@ describe("reserved platform accessors", () => {
33
33
  // Sudzy Dashboard: a table named "Notifications" emitted a second
34
34
  // `notifications:` key and the platform client — written last — won, so the
35
35
  // table lost findAll and typed as `{ create(NotificationsCreateParams) }`.
36
- // The platform client has since moved to `zitejs/notifications`, so the name
37
- // belongs to the table again and there is nothing left to collide with.
36
+ // The platform client is unpublished, so the name belongs to the table
37
+ // again and there is nothing left to collide with.
38
38
  it("lets a table keep the notifications accessor", () => {
39
39
  const schema = generateSchema(database([{ id: "tbl_1", name: "Notifications", fields: [] }]));
40
40
  expect(schema.tables[0].sdkName).toBe("notifications");
@@ -192,8 +192,8 @@ describe("normalizeSchemaNames", () => {
192
192
  // the only thing standing between it and a TS1117 it cannot build past.
193
193
  it("repairs a committed schema that already holds the collision", () => {
194
194
  // `sql`, not `notifications` — the latter stopped being a platform
195
- // accessor when the client moved to `zitejs/notifications`, so a schema
196
- // holding it is no longer a collision to repair.
195
+ // accessor when the client was unpublished, so a schema holding it is
196
+ // no longer a collision to repair.
197
197
  const source = generateDbTs({
198
198
  tables: [
199
199
  { id: "tbl_1", sdkName: "sql", fields: [] },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zitejs",
3
- "version": "0.9.115",
4
- "description": "The Zite framework — build apps on Zite Database",
3
+ "version": "0.9.117",
4
+ "description": "The Zite framework \u2014 build apps on Zite Database",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",
7
7
  "module": "./dist/esm/index.js",
@@ -74,11 +74,6 @@
74
74
  "import": "./dist/esm/schedules/index.js",
75
75
  "require": "./dist/cjs/schedules/index.js"
76
76
  },
77
- "./notifications": {
78
- "types": "./dist/esm/notifications/index.d.ts",
79
- "import": "./dist/esm/notifications/index.js",
80
- "require": "./dist/cjs/notifications/index.js"
81
- },
82
77
  "./sync": {
83
78
  "types": "./dist/esm/sync/index.d.ts",
84
79
  "import": "./dist/esm/sync/index.js",
@@ -136,9 +131,6 @@
136
131
  "schedules": [
137
132
  "dist/esm/schedules/index.d.ts"
138
133
  ],
139
- "notifications": [
140
- "dist/esm/notifications/index.d.ts"
141
- ],
142
134
  "vite-plugin": [
143
135
  "dist/esm/vite/index.d.ts"
144
136
  ]
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createCaller = void 0;
4
- var index_js_1 = require("../caller/index.js");
5
- Object.defineProperty(exports, "createCaller", { enumerable: true, get: function () { return index_js_1.createCaller; } });
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createTableClient = void 0;
4
- var index_js_1 = require("../runtime/index.js");
5
- Object.defineProperty(exports, "createTableClient", { enumerable: true, get: function () { return index_js_1.createTableClient; } });
@@ -1,14 +0,0 @@
1
- export type ZiteProjectUser = {
2
- uuid: string;
3
- firstName: string | null;
4
- lastName: string | null;
5
- email: string;
6
- profilePictureUrl: string | null;
7
- };
8
- export type MetaListUsersResult = {
9
- users: ZiteProjectUser[];
10
- };
11
- export declare class ZiteMeta {
12
- static listUsers(): Promise<MetaListUsersResult>;
13
- }
14
- export declare const Meta: typeof ZiteMeta;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Meta = exports.ZiteMeta = void 0;
4
- const sdkCall_js_1 = require("../internal/sdkCall.js");
5
- const META_SDK_INTEGRATION_ID = '__meta__';
6
- class ZiteMeta {
7
- static listUsers() {
8
- return (0, sdkCall_js_1.getSdkCall)()(META_SDK_INTEGRATION_ID, 'ZiteMeta', 'listUsers', {});
9
- }
10
- }
11
- exports.ZiteMeta = ZiteMeta;
12
- exports.Meta = ZiteMeta;
@@ -1,25 +0,0 @@
1
- export interface NotificationLink {
2
- path?: string;
3
- params?: Record<string, string>;
4
- }
5
- export type NotificationsCreateParams = {
6
- recipients: string[];
7
- title: string;
8
- body?: string;
9
- link?: NotificationLink;
10
- path?: string;
11
- params?: Record<string, string>;
12
- payload?: Record<string, unknown>;
13
- idempotencyKey?: string;
14
- };
15
- export type NotificationsCreateResult = {
16
- created: number;
17
- } | {
18
- created: 0;
19
- preview: true;
20
- wouldCreate: number;
21
- };
22
- export declare class ZiteNotifications {
23
- static create(params: NotificationsCreateParams): Promise<NotificationsCreateResult>;
24
- }
25
- export declare const Notifications: typeof ZiteNotifications;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Notifications = exports.ZiteNotifications = void 0;
4
- const sdkCall_js_1 = require("../internal/sdkCall.js");
5
- const NOTIFICATIONS_SDK_INTEGRATION_ID = '__notifications__';
6
- class ZiteNotifications {
7
- static create(params) {
8
- return (0, sdkCall_js_1.getSdkCall)()(NOTIFICATIONS_SDK_INTEGRATION_ID, 'ZiteNotifications', 'create', params);
9
- }
10
- }
11
- exports.ZiteNotifications = ZiteNotifications;
12
- exports.Notifications = ZiteNotifications;
@@ -1,2 +0,0 @@
1
- export { createCaller } from '../caller/index.js';
2
- export type { EndpointConfig } from '../caller/index.js';
@@ -1 +0,0 @@
1
- export { createCaller } from '../caller/index.js';
@@ -1,2 +0,0 @@
1
- export { createTableClient } from '../runtime/index.js';
2
- export type { TableClient } from '../runtime/index.js';
@@ -1 +0,0 @@
1
- export { createTableClient } from '../runtime/index.js';
@@ -1,14 +0,0 @@
1
- export type ZiteProjectUser = {
2
- uuid: string;
3
- firstName: string | null;
4
- lastName: string | null;
5
- email: string;
6
- profilePictureUrl: string | null;
7
- };
8
- export type MetaListUsersResult = {
9
- users: ZiteProjectUser[];
10
- };
11
- export declare class ZiteMeta {
12
- static listUsers(): Promise<MetaListUsersResult>;
13
- }
14
- export declare const Meta: typeof ZiteMeta;
@@ -1,8 +0,0 @@
1
- import { getSdkCall } from '../internal/sdkCall.js';
2
- const META_SDK_INTEGRATION_ID = '__meta__';
3
- export class ZiteMeta {
4
- static listUsers() {
5
- return getSdkCall()(META_SDK_INTEGRATION_ID, 'ZiteMeta', 'listUsers', {});
6
- }
7
- }
8
- export const Meta = ZiteMeta;
@@ -1,25 +0,0 @@
1
- export interface NotificationLink {
2
- path?: string;
3
- params?: Record<string, string>;
4
- }
5
- export type NotificationsCreateParams = {
6
- recipients: string[];
7
- title: string;
8
- body?: string;
9
- link?: NotificationLink;
10
- path?: string;
11
- params?: Record<string, string>;
12
- payload?: Record<string, unknown>;
13
- idempotencyKey?: string;
14
- };
15
- export type NotificationsCreateResult = {
16
- created: number;
17
- } | {
18
- created: 0;
19
- preview: true;
20
- wouldCreate: number;
21
- };
22
- export declare class ZiteNotifications {
23
- static create(params: NotificationsCreateParams): Promise<NotificationsCreateResult>;
24
- }
25
- export declare const Notifications: typeof ZiteNotifications;
@@ -1,8 +0,0 @@
1
- import { getSdkCall } from '../internal/sdkCall.js';
2
- const NOTIFICATIONS_SDK_INTEGRATION_ID = '__notifications__';
3
- export class ZiteNotifications {
4
- static create(params) {
5
- return getSdkCall()(NOTIFICATIONS_SDK_INTEGRATION_ID, 'ZiteNotifications', 'create', params);
6
- }
7
- }
8
- export const Notifications = ZiteNotifications;