zitejs 0.9.130 → 0.9.133

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.
@@ -67,7 +67,7 @@ export declare const signIn: {
67
67
  }, FetchOptions["throw"] extends true ? true : false>>;
68
68
  } & {
69
69
  social: <FetchOptions extends import("@better-auth/core").ClientFetchOption<Partial<{
70
- provider: "salesforce" | "slack" | "linear" | "notion" | "linkedin" | "github" | (string & {}) | "huggingface" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "gitlab" | "tiktok" | "reddit" | "roblox" | "vk" | "zoom" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
70
+ provider: "salesforce" | "slack" | "linear" | "notion" | "linkedin" | "github" | "dropbox" | (string & {}) | "huggingface" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "spotify" | "twitch" | "twitter" | "kick" | "gitlab" | "tiktok" | "reddit" | "roblox" | "vk" | "zoom" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
71
71
  callbackURL?: string | undefined;
72
72
  newUserCallbackURL?: string | undefined;
73
73
  errorCallbackURL?: string | undefined;
@@ -91,7 +91,7 @@ export declare const signIn: {
91
91
  loginHint?: string | undefined;
92
92
  additionalData?: Record<string, any> | undefined;
93
93
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
94
- provider: "salesforce" | "slack" | "linear" | "notion" | "linkedin" | "github" | (string & {}) | "huggingface" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "gitlab" | "tiktok" | "reddit" | "roblox" | "vk" | "zoom" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
94
+ provider: "salesforce" | "slack" | "linear" | "notion" | "linkedin" | "github" | "dropbox" | (string & {}) | "huggingface" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "spotify" | "twitch" | "twitter" | "kick" | "gitlab" | "tiktok" | "reddit" | "roblox" | "vk" | "zoom" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
95
95
  callbackURL?: string | undefined;
96
96
  newUserCallbackURL?: string | undefined;
97
97
  errorCallbackURL?: string | undefined;
@@ -100,6 +100,7 @@ const PREBUNDLED_LIBS = {
100
100
  '@elevenlabs/elevenlabs-js': '__elevenlabs__.js',
101
101
  'resend': '__resend__.js',
102
102
  '@clickhouse/client-web': '__clickhouse__.js',
103
+ 'dropbox': '__dropbox__.js',
103
104
  // Three packages, one module: the presigners take an S3Client instance, so a
104
105
  // separate bundle each would hand them a structurally identical but distinct
105
106
  // class. The worker bundles all three together for that reason.
@@ -40,6 +40,8 @@ declare const FIELDS_BY_TYPE: {
40
40
  apollo: readonly string[];
41
41
  attio: readonly string[];
42
42
  granola: readonly string[];
43
+ dropbox: readonly string[];
44
+ amazonS3: readonly string[];
43
45
  };
44
46
  /** A service type `integrations.get` serves: one used through its npm package with a token. */
45
47
  export type CredentialServiceType = keyof typeof FIELDS_BY_TYPE;
@@ -47,7 +49,7 @@ export type CredentialServiceType = keyof typeof FIELDS_BY_TYPE;
47
49
  export declare const CREDENTIAL_FIELDS: Readonly<Record<CredentialServiceType, readonly string[]>>;
48
50
  /**
49
51
  * Extras the platform omits when the account doesn't have them: a Jira site
50
- * connected before its URL was stored, a Trello key the deployment never set.
52
+ * connected before its URL was stored.
51
53
  */
52
54
  export declare const OPTIONAL_CREDENTIAL_FIELDS: Readonly<Partial<Record<CredentialServiceType, readonly string[]>>>;
53
55
  /**
@@ -49,16 +49,21 @@ const FIELDS_BY_TYPE = {
49
49
  apollo: extras(),
50
50
  attio: extras(),
51
51
  granola: extras(),
52
+ dropbox: extras(),
53
+ // The IAM key alone reaches nothing: every call needs the region and the
54
+ // bucket, and S3-compatible providers need the endpoint too.
55
+ amazonS3: extras("keyId", "region", "bucket", "endpoint", "pathPrefix"),
52
56
  };
53
57
  /** Per service type: `accessToken`, then its extra labels sorted (Salesforce `instanceUrl`). */
54
58
  exports.CREDENTIAL_FIELDS = FIELDS_BY_TYPE;
55
59
  /**
56
60
  * Extras the platform omits when the account doesn't have them: a Jira site
57
- * connected before its URL was stored, a Trello key the deployment never set.
61
+ * connected before its URL was stored.
58
62
  */
59
63
  exports.OPTIONAL_CREDENTIAL_FIELDS = {
60
64
  jira: ["siteUrl"],
61
- trello: ["clientApiKey"],
65
+ // Only S3-compatible providers set an endpoint, and a prefix is opt-in.
66
+ amazonS3: ["endpoint", "pathPrefix"],
62
67
  };
63
68
  /**
64
69
  * Types the runtime never serves: those with a generated client (Airtable, email,
@@ -0,0 +1,14 @@
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;
@@ -0,0 +1,12 @@
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;
@@ -0,0 +1,25 @@
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;
@@ -0,0 +1,12 @@
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;
@@ -506,6 +506,8 @@ const duplicateIdentifierErrorsIn = (source) => {
506
506
  (0, vitest_1.it)('marks an extra the platform may omit as optional', () => {
507
507
  const generated = (0, lib_js_1.generateIntegrationsIndex)([{ name: 'tickets', serviceType: 'jira', perUser: false }], { reexportAirtable: false });
508
508
  (0, vitest_1.expect)(generated).toContain("'tickets': Connected<{ cloudId: string; siteUrl?: string }>;");
509
+ // The runner supplies Trello's key for every account, or refuses get.
510
+ (0, vitest_1.expect)((0, lib_js_1.generateIntegrationsIndex)([{ name: 'boards', serviceType: 'trello', perUser: false }], { reexportAirtable: false })).toContain("'boards': Connected<{ clientApiKey: string }>;");
509
511
  (0, vitest_1.expect)(typeErrorsIn(generated, `import { integrations } from 'zitejs/integrations';
510
512
  const jira = await integrations.get('tickets');
511
513
  const cloudId: string = jira.cloudId;
@@ -67,7 +67,7 @@ export declare const signIn: {
67
67
  }, FetchOptions["throw"] extends true ? true : false>>;
68
68
  } & {
69
69
  social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
70
- provider: "salesforce" | "slack" | "linear" | "notion" | "linkedin" | "github" | (string & {}) | "huggingface" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "gitlab" | "tiktok" | "reddit" | "roblox" | "vk" | "zoom" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
70
+ provider: "salesforce" | "slack" | "linear" | "notion" | "linkedin" | "github" | "dropbox" | (string & {}) | "huggingface" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "spotify" | "twitch" | "twitter" | "kick" | "gitlab" | "tiktok" | "reddit" | "roblox" | "vk" | "zoom" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
71
71
  callbackURL?: string | undefined;
72
72
  newUserCallbackURL?: string | undefined;
73
73
  errorCallbackURL?: string | undefined;
@@ -91,7 +91,7 @@ export declare const signIn: {
91
91
  loginHint?: string | undefined;
92
92
  additionalData?: Record<string, any> | undefined;
93
93
  }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
94
- provider: "salesforce" | "slack" | "linear" | "notion" | "linkedin" | "github" | (string & {}) | "huggingface" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "gitlab" | "tiktok" | "reddit" | "roblox" | "vk" | "zoom" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
94
+ provider: "salesforce" | "slack" | "linear" | "notion" | "linkedin" | "github" | "dropbox" | (string & {}) | "huggingface" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "spotify" | "twitch" | "twitter" | "kick" | "gitlab" | "tiktok" | "reddit" | "roblox" | "vk" | "zoom" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat";
95
95
  callbackURL?: string | undefined;
96
96
  newUserCallbackURL?: string | undefined;
97
97
  errorCallbackURL?: string | undefined;
@@ -62,6 +62,7 @@ const PREBUNDLED_LIBS = {
62
62
  '@elevenlabs/elevenlabs-js': '__elevenlabs__.js',
63
63
  'resend': '__resend__.js',
64
64
  '@clickhouse/client-web': '__clickhouse__.js',
65
+ 'dropbox': '__dropbox__.js',
65
66
  // Three packages, one module: the presigners take an S3Client instance, so a
66
67
  // separate bundle each would hand them a structurally identical but distinct
67
68
  // class. The worker bundles all three together for that reason.
@@ -40,6 +40,8 @@ declare const FIELDS_BY_TYPE: {
40
40
  apollo: readonly string[];
41
41
  attio: readonly string[];
42
42
  granola: readonly string[];
43
+ dropbox: readonly string[];
44
+ amazonS3: readonly string[];
43
45
  };
44
46
  /** A service type `integrations.get` serves: one used through its npm package with a token. */
45
47
  export type CredentialServiceType = keyof typeof FIELDS_BY_TYPE;
@@ -47,7 +49,7 @@ export type CredentialServiceType = keyof typeof FIELDS_BY_TYPE;
47
49
  export declare const CREDENTIAL_FIELDS: Readonly<Record<CredentialServiceType, readonly string[]>>;
48
50
  /**
49
51
  * Extras the platform omits when the account doesn't have them: a Jira site
50
- * connected before its URL was stored, a Trello key the deployment never set.
52
+ * connected before its URL was stored.
51
53
  */
52
54
  export declare const OPTIONAL_CREDENTIAL_FIELDS: Readonly<Partial<Record<CredentialServiceType, readonly string[]>>>;
53
55
  /**
@@ -46,16 +46,21 @@ const FIELDS_BY_TYPE = {
46
46
  apollo: extras(),
47
47
  attio: extras(),
48
48
  granola: extras(),
49
+ dropbox: extras(),
50
+ // The IAM key alone reaches nothing: every call needs the region and the
51
+ // bucket, and S3-compatible providers need the endpoint too.
52
+ amazonS3: extras("keyId", "region", "bucket", "endpoint", "pathPrefix"),
49
53
  };
50
54
  /** Per service type: `accessToken`, then its extra labels sorted (Salesforce `instanceUrl`). */
51
55
  export const CREDENTIAL_FIELDS = FIELDS_BY_TYPE;
52
56
  /**
53
57
  * Extras the platform omits when the account doesn't have them: a Jira site
54
- * connected before its URL was stored, a Trello key the deployment never set.
58
+ * connected before its URL was stored.
55
59
  */
56
60
  export const OPTIONAL_CREDENTIAL_FIELDS = {
57
61
  jira: ["siteUrl"],
58
- trello: ["clientApiKey"],
62
+ // Only S3-compatible providers set an endpoint, and a prefix is opt-in.
63
+ amazonS3: ["endpoint", "pathPrefix"],
59
64
  };
60
65
  /**
61
66
  * Types the runtime never serves: those with a generated client (Airtable, email,
@@ -0,0 +1,14 @@
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;
@@ -0,0 +1,8 @@
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;
@@ -0,0 +1,25 @@
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;
@@ -0,0 +1,8 @@
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;
@@ -501,6 +501,8 @@ describe('generateIntegrationsIndex', () => {
501
501
  it('marks an extra the platform may omit as optional', () => {
502
502
  const generated = generateIntegrationsIndex([{ name: 'tickets', serviceType: 'jira', perUser: false }], { reexportAirtable: false });
503
503
  expect(generated).toContain("'tickets': Connected<{ cloudId: string; siteUrl?: string }>;");
504
+ // The runner supplies Trello's key for every account, or refuses get.
505
+ expect(generateIntegrationsIndex([{ name: 'boards', serviceType: 'trello', perUser: false }], { reexportAirtable: false })).toContain("'boards': Connected<{ clientApiKey: string }>;");
504
506
  expect(typeErrorsIn(generated, `import { integrations } from 'zitejs/integrations';
505
507
  const jira = await integrations.get('tickets');
506
508
  const cloudId: string = jira.cloudId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zitejs",
3
- "version": "0.9.130",
3
+ "version": "0.9.133",
4
4
  "description": "The Zite framework — build apps on Zite Database",
5
5
  "type": "module",
6
6
  "sideEffects": false,