@hexclave/shared 1.0.60 → 1.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{admin-interface-BxUHaniY.d.ts → admin-interface-ChuyYSXj.d.ts} +11 -11
- package/dist/{admin-interface-BxUHaniY.d.ts.map → admin-interface-ChuyYSXj.d.ts.map} +1 -1
- package/dist/{admin-metrics-DQ7vvSym.d.ts → admin-metrics-1yiWGq9z.d.ts} +11 -11
- package/dist/{admin-metrics-DQ7vvSym.d.ts.map → admin-metrics-1yiWGq9z.d.ts.map} +1 -1
- package/dist/ai/unified-prompts/reminders.js +1 -1
- package/dist/ai/unified-prompts/reminders.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +12 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -1
- package/dist/{client-interface-D-cO5E3C.d.ts → client-interface-C4H4gn_G.d.ts} +9 -9
- package/dist/{client-interface-D-cO5E3C.d.ts.map → client-interface-C4H4gn_G.d.ts.map} +1 -1
- package/dist/config/schema.d.ts +1 -1
- package/dist/config-authoring.d.ts +1 -1
- package/dist/{current-user-Cg6by3KK.d.ts → current-user-BCkMYzHx.d.ts} +6 -6
- package/dist/{current-user-Cg6by3KK.d.ts.map → current-user-BCkMYzHx.d.ts.map} +1 -1
- package/dist/{email-outbox-B3lyx4Eg.d.ts → email-outbox-BRZiK0ZG.d.ts} +127 -127
- package/dist/{email-outbox-B3lyx4Eg.d.ts.map → email-outbox-BRZiK0ZG.d.ts.map} +1 -1
- package/dist/esm/ai/unified-prompts/reminders.js +1 -1
- package/dist/esm/ai/unified-prompts/reminders.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +12 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -1
- package/dist/esm/config/schema.d.ts +113 -113
- package/dist/esm/interface/admin-metrics.d.ts +10 -10
- package/dist/esm/interface/conversations.d.ts +5 -5
- package/dist/esm/interface/crud/current-user.d.ts +5 -5
- package/dist/esm/interface/crud/email-outbox.d.ts +126 -126
- package/dist/esm/interface/crud/products.d.ts +8 -8
- package/dist/esm/interface/crud/project-api-keys.d.ts +4 -4
- package/dist/esm/interface/crud/projects.d.ts +7 -7
- package/dist/esm/interface/crud/team-member-profiles.d.ts +6 -6
- package/dist/esm/interface/crud/transactions.d.ts +13 -13
- package/dist/esm/interface/crud/users.d.ts +6 -6
- package/dist/esm/interface/plan-usage.d.ts +3 -3
- package/dist/esm/interface/webhooks.d.ts +2 -2
- package/dist/esm/known-errors.d.ts +3 -3
- package/dist/esm/schema-fields.d.ts +9 -9
- package/dist/esm/sessions.d.ts +5 -5
- package/dist/helpers/password.d.ts +1 -1
- package/dist/helpers/production-mode.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/interface/admin-interface.d.ts +2 -2
- package/dist/interface/admin-metrics.d.ts +1 -1
- package/dist/interface/client-interface.d.ts +1 -1
- package/dist/interface/conversations.d.ts +5 -5
- package/dist/interface/crud/current-user.d.ts +1 -1
- package/dist/interface/crud/email-outbox.d.ts +1 -1
- package/dist/interface/crud/products.d.ts +1 -1
- package/dist/interface/crud/project-api-keys.d.ts +1 -1
- package/dist/interface/crud/projects.d.ts +1 -1
- package/dist/interface/crud/team-member-profiles.d.ts +1 -1
- package/dist/interface/crud/transactions.d.ts +1 -1
- package/dist/interface/crud/users.d.ts +1 -1
- package/dist/interface/plan-usage.d.ts +1 -1
- package/dist/interface/server-interface.d.ts +1 -1
- package/dist/interface/webhooks.d.ts +1 -1
- package/dist/{known-errors-BFf8SVm8.d.ts → known-errors-Bhd0JAgh.d.ts} +4 -4
- package/dist/{known-errors-BFf8SVm8.d.ts.map → known-errors-Bhd0JAgh.d.ts.map} +1 -1
- package/dist/known-errors.d.ts +1 -1
- package/dist/{plan-usage-Dw09F0sh.d.ts → plan-usage-COq9I00z.d.ts} +4 -4
- package/dist/{plan-usage-Dw09F0sh.d.ts.map → plan-usage-COq9I00z.d.ts.map} +1 -1
- package/dist/{products-Cwn7_4uD.d.ts → products-BkPf1X78.d.ts} +9 -9
- package/dist/{products-Cwn7_4uD.d.ts.map → products-BkPf1X78.d.ts.map} +1 -1
- package/dist/{project-api-keys-CXTBQ2IZ.d.ts → project-api-keys-CK9SIo0q.d.ts} +5 -5
- package/dist/{project-api-keys-CXTBQ2IZ.d.ts.map → project-api-keys-CK9SIo0q.d.ts.map} +1 -1
- package/dist/{projects-Cw80wrT7.d.ts → projects-CVqfljhv.d.ts} +8 -8
- package/dist/{projects-Cw80wrT7.d.ts.map → projects-CVqfljhv.d.ts.map} +1 -1
- package/dist/{schema-DGZfskAR.d.ts → schema-BPMGhu_7.d.ts} +114 -114
- package/dist/{schema-DGZfskAR.d.ts.map → schema-BPMGhu_7.d.ts.map} +1 -1
- package/dist/{schema-fields-DPaAnhmc.d.ts → schema-fields-C8sIQVTq.d.ts} +10 -10
- package/dist/{schema-fields-DPaAnhmc.d.ts.map → schema-fields-C8sIQVTq.d.ts.map} +1 -1
- package/dist/schema-fields.d.ts +1 -1
- package/dist/{server-interface-BXeSO8Wj.d.ts → server-interface-CRp4VVZh.d.ts} +8 -8
- package/dist/{server-interface-BXeSO8Wj.d.ts.map → server-interface-CRp4VVZh.d.ts.map} +1 -1
- package/dist/{sessions-B7755rIu.d.ts → sessions-COluKK6_.d.ts} +7 -7
- package/dist/{sessions-B7755rIu.d.ts.map → sessions-COluKK6_.d.ts.map} +1 -1
- package/dist/sessions.d.ts +1 -1
- package/dist/{team-member-profiles-B9sAsj4g.d.ts → team-member-profiles-CgYXR-Rx.d.ts} +7 -7
- package/dist/{team-member-profiles-B9sAsj4g.d.ts.map → team-member-profiles-CgYXR-Rx.d.ts.map} +1 -1
- package/dist/{transactions-Brdmr3jE.d.ts → transactions-7q13mxhG.d.ts} +14 -14
- package/dist/{transactions-Brdmr3jE.d.ts.map → transactions-7q13mxhG.d.ts.map} +1 -1
- package/dist/{users-ydVQVHD_.d.ts → users-7MKfEyyq.d.ts} +8 -8
- package/dist/{users-ydVQVHD_.d.ts.map → users-7MKfEyyq.d.ts.map} +1 -1
- package/dist/{webhooks-ByXrdSOx.d.ts → webhooks-C5gG85Ce.d.ts} +3 -3
- package/dist/{webhooks-ByXrdSOx.d.ts.map → webhooks-C5gG85Ce.d.ts.map} +1 -1
- package/package.json +1 -1
- package/src/ai/unified-prompts/reminders.ts +1 -1
- package/src/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.ts +7 -7
- package/src/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.ts +1 -0
|
@@ -20,8 +20,8 @@ declare const webhookEvents: readonly [WebhookEvent<yup$1.ObjectSchema<{
|
|
|
20
20
|
client_metadata?: {} | null | undefined;
|
|
21
21
|
client_read_only_metadata?: {} | null | undefined;
|
|
22
22
|
server_metadata?: {} | null | undefined;
|
|
23
|
-
display_name: string;
|
|
24
23
|
id: string;
|
|
24
|
+
display_name: string;
|
|
25
25
|
profile_image_url: string | null;
|
|
26
26
|
created_at_millis: number;
|
|
27
27
|
} | null;
|
|
@@ -110,8 +110,8 @@ declare const webhookEvents: readonly [WebhookEvent<yup$1.ObjectSchema<{
|
|
|
110
110
|
client_metadata?: {} | null | undefined;
|
|
111
111
|
client_read_only_metadata?: {} | null | undefined;
|
|
112
112
|
server_metadata?: {} | null | undefined;
|
|
113
|
-
display_name: string;
|
|
114
113
|
id: string;
|
|
114
|
+
display_name: string;
|
|
115
115
|
profile_image_url: string | null;
|
|
116
116
|
created_at_millis: number;
|
|
117
117
|
} | null;
|
|
@@ -323,4 +323,4 @@ declare const webhookEvents: readonly [WebhookEvent<yup$1.ObjectSchema<{
|
|
|
323
323
|
}];
|
|
324
324
|
//#endregion
|
|
325
325
|
export { webhookEvents as n, WebhookEvent as t };
|
|
326
|
-
//# sourceMappingURL=webhooks-
|
|
326
|
+
//# sourceMappingURL=webhooks-C5gG85Ce.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks-
|
|
1
|
+
{"version":3,"file":"webhooks-C5gG85Ce.d.ts","names":[],"sources":["../src/interface/webhooks.ts"],"mappings":";;;KAMY,YAAA,WAAuB,KAAA,CAAI,MAAA;EACrC,IAAA;EACA,MAAA,EAAQ,CAAC;EACT,QAAA;IACE,OAAA;IACA,WAAA;IACA,IAAA;EAAA;AAAA;AAAA,cAIS,aAAA,YAAa,YAAA,CAAA,KAAA,CAAA,YAAA"}
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@ export const remindersPrompt = deindent`
|
|
|
13
13
|
- Follow indirection. If a doc page points to another URL, script, or resource, fetch that too — Hexclave composes behavior across pages.
|
|
14
14
|
- Hexclave is a platform that provides a variety of apps that help you connect with your users. As of the time of writing these reminders, Hexclave provides the following apps (although not all may be enabled): ${Object.entries(ALL_APPS).filter(([, app]) => app.stage !== "alpha").map(([key]) => key).join(", ")}. Don't hardcode this list, as it changes rapidly. Whenever you need anything related to any of these apps, always try to use Hexclave first.
|
|
15
15
|
- The most important object in the Hexclave SDK is the Hexclave App object. HexclaveClientApp provides client-side functionality, while HexclaveServerApp also provides server-side functionality (but can usually only be imported on the server, as it requires a secret server key environment variable). You can usually find an instance of this object in a file called \`hexclave/client.tsx\` or \`hexclave/server.tsx\`, although it may be in a different location in this particular codebase.
|
|
16
|
-
-
|
|
16
|
+
- During development, project ID and secret server key environment variables are AUTOMATICALLY provided to the child process by the \`dev\` command of the CLI (\`npx @hexclave/cli dev --config-file <path-to-config-file> -- <command-to-execute>\`). This is the recommended way to fill the environment variables during local development. This is recommended because it allows you to use the config file to configure Hexclave declaratively, instead of requiring the user to configure things in the dashboard manually. Do NOT ask the user to set up those environment variables manually during development; instead, if you are facing issues, debug why \`dev\` isn't wrapping the command correctly.
|
|
17
17
|
- Take extra care to always have great error handling and loading states whenever necessary (including in button onClick handlers; Hexclave's code examples often use a special onClick class which handles loading states, but your own button may not). Hexclave's SDK tends to return errors that need to be handled explicitly in its return types.
|
|
18
18
|
- Language, framework, and library-specific details:
|
|
19
19
|
- JavaScript & TypeScript:
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import packageJson from "../../../../package.json";
|
|
1
2
|
import { ALL_APPS, type AppId } from "../../../apps/apps-config";
|
|
2
3
|
import { typedEntries } from "../../../utils/objects";
|
|
3
4
|
import { deindent } from "../../../utils/strings";
|
|
@@ -890,12 +891,11 @@ export function getSdkSetupPrompt(mainType: "ai-prompt" | "nextjs" | "react" | "
|
|
|
890
891
|
\`\`\`html
|
|
891
892
|
<script type="module">
|
|
892
893
|
// Pin a specific version so a new release cannot unexpectedly break your page.
|
|
893
|
-
import { HexclaveClientApp } from "https://esm.sh/@hexclave/js
|
|
894
|
+
import { HexclaveClientApp } from "https://esm.sh/@hexclave/js@${packageJson.version}";
|
|
894
895
|
|
|
895
896
|
globalThis.hexclaveClientApp = new HexclaveClientApp({
|
|
896
|
-
//
|
|
897
|
-
//
|
|
898
|
-
// enabled) MUST be passed explicitly here.
|
|
897
|
+
// As you cannot inject environment variables into the browser without a bundler,
|
|
898
|
+
// the project ID must be passed explicitly here.
|
|
899
899
|
projectId: "your-project-id",
|
|
900
900
|
tokenStore: "cookie",
|
|
901
901
|
urls: {
|
|
@@ -911,9 +911,9 @@ export function getSdkSetupPrompt(mainType: "ai-prompt" | "nextjs" | "react" | "
|
|
|
911
911
|
|
|
912
912
|
Important caveats for this approach:
|
|
913
913
|
|
|
914
|
-
-
|
|
915
|
-
- Only ever construct a \`HexclaveClientApp\` here, never a \`HexclaveServerApp\`, since
|
|
916
|
-
- As shown above, pin a specific version (e.g. \`https://esm.sh/@hexclave/js
|
|
914
|
+
- Without a bundler or build step, there is no concept of environment variables in a browser. If there is no build step to inject \`HEXCLAVE_PROJECT_ID\` and related variables, you must hard-code \`projectId\` (and \`publishableClientKey\` if \`requirePublishableClientKey\` is enabled) directly in the constructor, or inject the environment variables either at build or request time in the server that serves the static file.
|
|
915
|
+
- Only ever construct a \`HexclaveClientApp\` here, never a \`HexclaveServerApp\`, since a \`<script>\` tag runs on the client by design. Do not put a secret server key on the page.
|
|
916
|
+
- As shown above, pin a specific version (e.g. \`https://esm.sh/@hexclave/js@${packageJson.version}\`) rather than the unpinned \`https://esm.sh/@hexclave/js\`, so that a new SDK release cannot unexpectedly break your page.
|
|
917
917
|
` : ""}
|
|
918
918
|
|
|
919
919
|
${isMaybeBackend ? deindent`
|