@hexclave/shared 1.0.24 → 1.0.25
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/ai/unified-prompts/reminders.js +1 -1
- package/dist/config/schema.d.ts +82 -82
- package/dist/config-authoring.d.ts +2 -2
- package/dist/config-authoring.d.ts.map +1 -1
- package/dist/config-authoring.js.map +1 -1
- package/dist/esm/ai/unified-prompts/reminders.js +1 -1
- package/dist/esm/config/schema.d.ts +82 -82
- package/dist/esm/config-authoring.d.ts +2 -2
- package/dist/esm/config-authoring.d.ts.map +1 -1
- package/dist/esm/config-authoring.js.map +1 -1
- package/dist/esm/interface/admin-metrics.d.ts +4 -4
- package/dist/esm/interface/conversations.d.ts +6 -6
- package/dist/esm/interface/crud/current-user.d.ts +10 -10
- package/dist/esm/interface/crud/email-outbox.d.ts +152 -152
- package/dist/esm/interface/crud/products.d.ts +4 -4
- package/dist/esm/interface/crud/projects.d.ts +86 -36
- package/dist/esm/interface/crud/projects.d.ts.map +1 -1
- package/dist/esm/interface/crud/projects.js +6 -0
- package/dist/esm/interface/crud/projects.js.map +1 -1
- package/dist/esm/interface/crud/team-member-profiles.d.ts +36 -36
- package/dist/esm/interface/crud/transactions.d.ts +9 -9
- package/dist/esm/interface/crud/users.d.ts +14 -14
- package/dist/esm/known-errors.d.ts +4 -4
- package/dist/esm/schema-fields.d.ts +4 -4
- package/dist/interface/admin-metrics.d.ts +4 -4
- package/dist/interface/conversations.d.ts +6 -6
- package/dist/interface/crud/current-user.d.ts +10 -10
- package/dist/interface/crud/email-outbox.d.ts +152 -152
- package/dist/interface/crud/products.d.ts +4 -4
- package/dist/interface/crud/projects.d.ts +86 -36
- package/dist/interface/crud/projects.d.ts.map +1 -1
- package/dist/interface/crud/projects.js +6 -0
- package/dist/interface/crud/projects.js.map +1 -1
- package/dist/interface/crud/team-member-profiles.d.ts +36 -36
- package/dist/interface/crud/transactions.d.ts +9 -9
- package/dist/interface/crud/users.d.ts +14 -14
- package/dist/known-errors.d.ts +4 -4
- package/dist/schema-fields.d.ts +4 -4
- package/package.json +1 -1
- package/src/config-authoring.ts +2 -2
- package/src/interface/crud/projects.ts +12 -0
|
@@ -162,20 +162,18 @@ declare const usersCrudServerReadSchema: yup$1.ObjectSchema<{
|
|
|
162
162
|
requires_totp_mfa: undefined;
|
|
163
163
|
}, "">;
|
|
164
164
|
declare const usersCrudServerCreateSchema: yup$1.ObjectSchema<{
|
|
165
|
+
is_anonymous: boolean | undefined;
|
|
165
166
|
display_name: string | null | undefined;
|
|
166
167
|
client_metadata: {} | null | undefined;
|
|
167
168
|
client_read_only_metadata: {} | null | undefined;
|
|
168
169
|
server_metadata: {} | null | undefined;
|
|
169
|
-
is_anonymous: boolean | undefined;
|
|
170
170
|
primary_email: string | null | undefined;
|
|
171
|
-
|
|
171
|
+
password: string | null | undefined;
|
|
172
172
|
primary_email_verified: boolean | undefined;
|
|
173
173
|
primary_email_auth_enabled: boolean | undefined;
|
|
174
|
-
|
|
175
|
-
password: string | null | undefined;
|
|
176
|
-
password_hash: string | undefined;
|
|
174
|
+
profile_image_url: string | null | undefined;
|
|
177
175
|
otp_auth_enabled: boolean | undefined;
|
|
178
|
-
|
|
176
|
+
passkey_auth_enabled: boolean | undefined;
|
|
179
177
|
restricted_by_admin: boolean | undefined;
|
|
180
178
|
restricted_by_admin_reason: string | null | undefined;
|
|
181
179
|
restricted_by_admin_private_details: string | null | undefined;
|
|
@@ -186,10 +184,12 @@ declare const usersCrudServerCreateSchema: yup$1.ObjectSchema<{
|
|
|
186
184
|
free_trial_abuse: number;
|
|
187
185
|
};
|
|
188
186
|
} | undefined;
|
|
187
|
+
password_hash: string | undefined;
|
|
188
|
+
totp_secret_base64: string | null | undefined;
|
|
189
189
|
} & {
|
|
190
190
|
oauth_providers: {
|
|
191
|
-
id: string;
|
|
192
191
|
email: string | null;
|
|
192
|
+
id: string;
|
|
193
193
|
account_id: string;
|
|
194
194
|
}[] | undefined;
|
|
195
195
|
is_anonymous: boolean | undefined;
|
|
@@ -368,20 +368,18 @@ declare const usersCrud: CrudSchemaFromOptions<{
|
|
|
368
368
|
};
|
|
369
369
|
}, "">;
|
|
370
370
|
serverCreateSchema: yup$1.ObjectSchema<{
|
|
371
|
+
is_anonymous: boolean | undefined;
|
|
371
372
|
display_name: string | null | undefined;
|
|
372
373
|
client_metadata: {} | null | undefined;
|
|
373
374
|
client_read_only_metadata: {} | null | undefined;
|
|
374
375
|
server_metadata: {} | null | undefined;
|
|
375
|
-
is_anonymous: boolean | undefined;
|
|
376
376
|
primary_email: string | null | undefined;
|
|
377
|
-
|
|
377
|
+
password: string | null | undefined;
|
|
378
378
|
primary_email_verified: boolean | undefined;
|
|
379
379
|
primary_email_auth_enabled: boolean | undefined;
|
|
380
|
-
|
|
381
|
-
password: string | null | undefined;
|
|
382
|
-
password_hash: string | undefined;
|
|
380
|
+
profile_image_url: string | null | undefined;
|
|
383
381
|
otp_auth_enabled: boolean | undefined;
|
|
384
|
-
|
|
382
|
+
passkey_auth_enabled: boolean | undefined;
|
|
385
383
|
restricted_by_admin: boolean | undefined;
|
|
386
384
|
restricted_by_admin_reason: string | null | undefined;
|
|
387
385
|
restricted_by_admin_private_details: string | null | undefined;
|
|
@@ -392,10 +390,12 @@ declare const usersCrud: CrudSchemaFromOptions<{
|
|
|
392
390
|
free_trial_abuse: number;
|
|
393
391
|
};
|
|
394
392
|
} | undefined;
|
|
393
|
+
password_hash: string | undefined;
|
|
394
|
+
totp_secret_base64: string | null | undefined;
|
|
395
395
|
} & {
|
|
396
396
|
oauth_providers: {
|
|
397
|
-
id: string;
|
|
398
397
|
email: string | null;
|
|
398
|
+
id: string;
|
|
399
399
|
account_id: string;
|
|
400
400
|
}[] | undefined;
|
|
401
401
|
is_anonymous: boolean | undefined;
|
package/dist/known-errors.d.ts
CHANGED
|
@@ -369,7 +369,7 @@ declare const KnownErrors: {
|
|
|
369
369
|
PermissionNotFound: KnownErrorConstructor<KnownError & KnownErrorBrand<"PERMISSION_NOT_FOUND">, [permissionId: string]> & {
|
|
370
370
|
errorCode: "PERMISSION_NOT_FOUND";
|
|
371
371
|
};
|
|
372
|
-
PermissionScopeMismatch: KnownErrorConstructor<KnownError & KnownErrorBrand<"WRONG_PERMISSION_SCOPE">, [permissionId: string, expectedScope: "
|
|
372
|
+
PermissionScopeMismatch: KnownErrorConstructor<KnownError & KnownErrorBrand<"WRONG_PERMISSION_SCOPE">, [permissionId: string, expectedScope: "team" | "project", actualScope: "team" | "project" | null]> & {
|
|
373
373
|
errorCode: "WRONG_PERMISSION_SCOPE";
|
|
374
374
|
};
|
|
375
375
|
ContainedPermissionNotFound: KnownErrorConstructor<KnownError & KnownErrorBrand<"CONTAINED_PERMISSION_NOT_FOUND">, [permissionId: string]> & {
|
|
@@ -512,7 +512,7 @@ declare const KnownErrors: {
|
|
|
512
512
|
ItemNotFound: KnownErrorConstructor<KnownError & KnownErrorBrand<"ITEM_NOT_FOUND">, [itemId: string]> & {
|
|
513
513
|
errorCode: "ITEM_NOT_FOUND";
|
|
514
514
|
};
|
|
515
|
-
ItemCustomerTypeDoesNotMatch: KnownErrorConstructor<KnownError & KnownErrorBrand<"ITEM_CUSTOMER_TYPE_DOES_NOT_MATCH">, [itemId: string, customerId: string, itemCustomerType: "
|
|
515
|
+
ItemCustomerTypeDoesNotMatch: KnownErrorConstructor<KnownError & KnownErrorBrand<"ITEM_CUSTOMER_TYPE_DOES_NOT_MATCH">, [itemId: string, customerId: string, itemCustomerType: "team" | "user" | "custom" | undefined, actualCustomerType: "team" | "user" | "custom"]> & {
|
|
516
516
|
errorCode: "ITEM_CUSTOMER_TYPE_DOES_NOT_MATCH";
|
|
517
517
|
};
|
|
518
518
|
CustomerDoesNotExist: KnownErrorConstructor<KnownError & KnownErrorBrand<"CUSTOMER_DOES_NOT_EXIST">, [customerId: string]> & {
|
|
@@ -521,7 +521,7 @@ declare const KnownErrors: {
|
|
|
521
521
|
ProductDoesNotExist: KnownErrorConstructor<KnownError & KnownErrorBrand<"PRODUCT_DOES_NOT_EXIST">, [productId: string, context: "server_only" | "item_exists" | null]> & {
|
|
522
522
|
errorCode: "PRODUCT_DOES_NOT_EXIST";
|
|
523
523
|
};
|
|
524
|
-
ProductCustomerTypeDoesNotMatch: KnownErrorConstructor<KnownError & KnownErrorBrand<"PRODUCT_CUSTOMER_TYPE_DOES_NOT_MATCH">, [productId: string | undefined, customerId: string, productCustomerType: "
|
|
524
|
+
ProductCustomerTypeDoesNotMatch: KnownErrorConstructor<KnownError & KnownErrorBrand<"PRODUCT_CUSTOMER_TYPE_DOES_NOT_MATCH">, [productId: string | undefined, customerId: string, productCustomerType: "team" | "user" | "custom" | undefined, actualCustomerType: "team" | "user" | "custom"]> & {
|
|
525
525
|
errorCode: "PRODUCT_CUSTOMER_TYPE_DOES_NOT_MATCH";
|
|
526
526
|
};
|
|
527
527
|
ProductAlreadyGranted: KnownErrorConstructor<KnownError & KnownErrorBrand<"PRODUCT_ALREADY_GRANTED">, [productId: string, customerId: string]> & {
|
|
@@ -548,7 +548,7 @@ declare const KnownErrors: {
|
|
|
548
548
|
StripeAccountInfoNotFound: KnownErrorConstructor<KnownError & KnownErrorBrand<"STRIPE_ACCOUNT_INFO_NOT_FOUND">, []> & {
|
|
549
549
|
errorCode: "STRIPE_ACCOUNT_INFO_NOT_FOUND";
|
|
550
550
|
};
|
|
551
|
-
DefaultPaymentMethodRequired: KnownErrorConstructor<KnownError & KnownErrorBrand<"DEFAULT_PAYMENT_METHOD_REQUIRED">, [customerType: "
|
|
551
|
+
DefaultPaymentMethodRequired: KnownErrorConstructor<KnownError & KnownErrorBrand<"DEFAULT_PAYMENT_METHOD_REQUIRED">, [customerType: "team" | "user", customerId: string]> & {
|
|
552
552
|
errorCode: "DEFAULT_PAYMENT_METHOD_REQUIRED";
|
|
553
553
|
};
|
|
554
554
|
NewPurchasesBlocked: KnownErrorConstructor<KnownError & KnownErrorBrand<"NEW_PURCHASES_BLOCKED">, []> & {
|
package/dist/schema-fields.d.ts
CHANGED
|
@@ -174,7 +174,7 @@ declare const customDashboardsSchema: yup$1.MixedSchema<Record<string, {
|
|
|
174
174
|
displayName: string;
|
|
175
175
|
tsxSource: string;
|
|
176
176
|
}>, yup$1.AnyObject, undefined, "">;
|
|
177
|
-
declare const customerTypeSchema: yup$1.StringSchema<"
|
|
177
|
+
declare const customerTypeSchema: yup$1.StringSchema<"team" | "user" | "custom" | undefined, yup$1.AnyObject, undefined, "">;
|
|
178
178
|
/**
|
|
179
179
|
* Schema for a single product price. Each currency field (USD, EUR, etc.) is a decimal string
|
|
180
180
|
* like `"9.99"` or `"1000"` — never cent integers. See `MoneyAmount` for the exact format.
|
|
@@ -218,7 +218,7 @@ declare const productSchema: yup$1.ObjectSchema<{
|
|
|
218
218
|
displayName: string | undefined;
|
|
219
219
|
productLineId: string | undefined;
|
|
220
220
|
isAddOnTo: false | Record<string, true> | undefined;
|
|
221
|
-
customerType: "
|
|
221
|
+
customerType: "team" | "user" | "custom";
|
|
222
222
|
freeTrial: DayInterval | undefined;
|
|
223
223
|
serverOnly: boolean | undefined;
|
|
224
224
|
stackable: boolean | undefined;
|
|
@@ -257,7 +257,7 @@ declare const productSchemaWithMetadata: yup$1.ObjectSchema<{
|
|
|
257
257
|
displayName: string | undefined;
|
|
258
258
|
productLineId: string | undefined;
|
|
259
259
|
isAddOnTo: false | Record<string, true> | undefined;
|
|
260
|
-
customerType: "
|
|
260
|
+
customerType: "team" | "user" | "custom";
|
|
261
261
|
freeTrial: DayInterval | undefined;
|
|
262
262
|
serverOnly: boolean | undefined;
|
|
263
263
|
stackable: boolean | undefined;
|
|
@@ -298,7 +298,7 @@ declare const productSchemaWithMetadata: yup$1.ObjectSchema<{
|
|
|
298
298
|
}, "">;
|
|
299
299
|
declare const inlineProductSchema: yup$1.ObjectSchema<{
|
|
300
300
|
display_name: string;
|
|
301
|
-
customer_type: "
|
|
301
|
+
customer_type: "team" | "user" | "custom";
|
|
302
302
|
free_trial: DayInterval | undefined;
|
|
303
303
|
server_only: boolean;
|
|
304
304
|
stackable: boolean;
|
package/package.json
CHANGED
package/src/config-authoring.ts
CHANGED
|
@@ -27,11 +27,11 @@ type StrictStackConfig<T extends StackConfig> =
|
|
|
27
27
|
: T;
|
|
28
28
|
|
|
29
29
|
/** @deprecated Use `defineHexclaveConfig` from the `@hexclave/*` package instead — same symbol, new brand name. See https://docs.hexclave.com/migration. */
|
|
30
|
-
export function defineStackConfig
|
|
30
|
+
export function defineStackConfig(config: StrictStackConfig<StackConfig>): StackConfig {
|
|
31
31
|
return config;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
// Hexclave alias — separate function so it does not inherit the deprecation tag.
|
|
35
|
-
export function defineHexclaveConfig
|
|
35
|
+
export function defineHexclaveConfig(config: StrictStackConfig<HexclaveConfig>): HexclaveConfig {
|
|
36
36
|
return config;
|
|
37
37
|
}
|
|
@@ -32,6 +32,14 @@ const enabledOAuthProviderSchema = yupObject({
|
|
|
32
32
|
id: schemaFields.oauthIdSchema.defined(),
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
+
const pushedConfigErrorSchema = yupObject({
|
|
36
|
+
message: yupString().defined(),
|
|
37
|
+
}).defined();
|
|
38
|
+
|
|
39
|
+
const configWarningSchema = yupObject({
|
|
40
|
+
message: yupString().defined(),
|
|
41
|
+
}).defined();
|
|
42
|
+
|
|
35
43
|
const onboardingConfigChoiceValues = ["create-new", "link-existing"] as const;
|
|
36
44
|
const onboardingSignInMethodValues = ["credential", "magicLink", "passkey", "google", "github", "microsoft"] as const;
|
|
37
45
|
const onboardingPaymentsCountryValues = ["US", "OTHER"] as const;
|
|
@@ -89,6 +97,8 @@ export const projectsCrudAdminReadSchema = yupObject({
|
|
|
89
97
|
owner_team_id: schemaFields.yupString().nullable().defined(),
|
|
90
98
|
onboarding_status: schemaFields.projectOnboardingStatusSchema.defined(),
|
|
91
99
|
onboarding_state: projectOnboardingStateSchema.nullable().optional(),
|
|
100
|
+
pushed_config_error: pushedConfigErrorSchema.nullable().defined(),
|
|
101
|
+
config_warnings: yupArray(configWarningSchema).defined(),
|
|
92
102
|
/** @deprecated */
|
|
93
103
|
config: yupObject({
|
|
94
104
|
allow_localhost: schemaFields.projectAllowLocalhostSchema.defined(),
|
|
@@ -117,6 +127,8 @@ export const projectsCrudAdminReadSchema = yupObject({
|
|
|
117
127
|
export const projectsCrudClientReadSchema = yupObject({
|
|
118
128
|
id: schemaFields.projectIdSchema.defined(),
|
|
119
129
|
display_name: schemaFields.projectDisplayNameSchema.defined(),
|
|
130
|
+
pushed_config_error: pushedConfigErrorSchema.nullable().defined(),
|
|
131
|
+
config_warnings: yupArray(configWarningSchema).defined(),
|
|
120
132
|
config: yupObject({
|
|
121
133
|
sign_up_enabled: schemaFields.projectSignUpEnabledSchema.defined(),
|
|
122
134
|
credential_enabled: schemaFields.projectCredentialEnabledSchema.defined(),
|