@vxil/sdk 0.35.0 → 0.35.2
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/index.d.ts +44 -11
- package/dist/index.js +9 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -321,6 +321,33 @@ export interface FeatureConfig {
|
|
|
321
321
|
feature: string;
|
|
322
322
|
version: number;
|
|
323
323
|
manifest: Record<string, unknown>;
|
|
324
|
+
/** cms writes only (PUT /v1/config/cms): what the write changed in
|
|
325
|
+
* `features.cms.rules[]` (the App builder apps' rules). */
|
|
326
|
+
rules_summary?: ConfigRulesSummary;
|
|
327
|
+
}
|
|
328
|
+
/** One rules[] entry as a cms config write reports it. */
|
|
329
|
+
export interface ConfigRuleLine {
|
|
330
|
+
app: string;
|
|
331
|
+
kind: string;
|
|
332
|
+
collection: string;
|
|
333
|
+
sentence: string;
|
|
334
|
+
/** server: cms enforces it for every writer but the owner's server key; app: only writes through that App builder app are checked */
|
|
335
|
+
enforced_by: 'app' | 'server';
|
|
336
|
+
/** an added capacity / no_overlap rule only: the `list.field` keys the app's page does not provably write */
|
|
337
|
+
unwritten_keys?: string[];
|
|
338
|
+
}
|
|
339
|
+
/** `rules_summary` of a cms config write. */
|
|
340
|
+
export interface ConfigRulesSummary {
|
|
341
|
+
added: ConfigRuleLine[];
|
|
342
|
+
removed: ConfigRuleLine[];
|
|
343
|
+
/** w43: the rules that were waiting for Apply (their write had not landed
|
|
344
|
+
* yet) that this write's rules[] left out — dropped, never committed later.
|
|
345
|
+
* Absent when none. `quote` is the brief's own words for the rule. */
|
|
346
|
+
dropped_waiting?: Array<{
|
|
347
|
+
kind: string;
|
|
348
|
+
collection: string;
|
|
349
|
+
quote: string;
|
|
350
|
+
}>;
|
|
324
351
|
}
|
|
325
352
|
/** The failure-alert digest settings (`webhooks.alerts`, guide ch. 12). The
|
|
326
353
|
* digest mails the project's owner accounts; `chatWebhook` (ALERT-CHAT-DEST)
|
|
@@ -1941,6 +1968,9 @@ export interface PaymentsSubscriptionGrantedEventPayload {
|
|
|
1941
1968
|
product_id: string | null;
|
|
1942
1969
|
/** the provider of the purchase; null for a manual grant */
|
|
1943
1970
|
provider: string | null;
|
|
1971
|
+
/** a purchase's own environment; for a manual grant (since w44) the
|
|
1972
|
+
* project's configured payments environment. Typed nullable for events
|
|
1973
|
+
* recorded before that, which carried null. */
|
|
1944
1974
|
environment: PaymentsEventEnvironment | null;
|
|
1945
1975
|
level: 'info';
|
|
1946
1976
|
state: 'ok';
|
|
@@ -1967,11 +1997,11 @@ export interface PaymentsSubscriptionRevokedEventPayload {
|
|
|
1967
1997
|
* (RevenueCat — the store, not vxil, controls renewal). */
|
|
1968
1998
|
provider_subscription_active: boolean | null;
|
|
1969
1999
|
/** (w40) the ended row's environment — a provider row's own; for a manual
|
|
1970
|
-
* grant, the project's configured payments environment
|
|
1971
|
-
*
|
|
1972
|
-
*
|
|
1973
|
-
* stored `'production'` placeholder — so filter a manual grant's
|
|
1974
|
-
* `subscription_id`, not by `environment`. */
|
|
2000
|
+
* grant, the project's configured payments environment (since w44 its
|
|
2001
|
+
* `payments.subscription.granted` and `payments.entitlement.changed` name
|
|
2002
|
+
* the same). A manual grant's `payments.subscription.lapsed` still carries
|
|
2003
|
+
* the stored `'production'` placeholder — so filter a manual grant's
|
|
2004
|
+
* lifecycle by `subscription_id`, not by `environment`. */
|
|
1975
2005
|
environment: PaymentsEventEnvironment;
|
|
1976
2006
|
level: 'info';
|
|
1977
2007
|
state: 'ok';
|
|
@@ -3668,12 +3698,15 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
3668
3698
|
}) => Promise<VxilUser>;
|
|
3669
3699
|
/**
|
|
3670
3700
|
* Delete a user. By default this is a SOFT delete (sets deleted_at; the PII
|
|
3671
|
-
* persists for the 30-day retention window)
|
|
3672
|
-
*
|
|
3673
|
-
*
|
|
3674
|
-
*
|
|
3675
|
-
*
|
|
3676
|
-
* the
|
|
3701
|
+
* persists for the 30-day retention window): every live session is
|
|
3702
|
+
* revoked, but the sign-in identity is kept, so writing the row again
|
|
3703
|
+
* restores the user. Pass { erase: true } for GDPR Article 17 erasure: the
|
|
3704
|
+
* row is soft-deleted AND its PII (email/display_name/avatar_url/attributes)
|
|
3705
|
+
* is scrubbed, while the id is kept so cross-feature references stay
|
|
3706
|
+
* intact. The erase also erases the user's sign-in identity when there is
|
|
3707
|
+
* one (password removed, codes and links spent, social links deleted,
|
|
3708
|
+
* sessions revoked, the e-mail free at once), so one call is a full
|
|
3709
|
+
* account delete — the same as `auth.users.erase` (see guide ch. 9).
|
|
3677
3710
|
*/
|
|
3678
3711
|
delete: (id: string, opts?: {
|
|
3679
3712
|
erase?: boolean;
|
package/dist/index.js
CHANGED
|
@@ -666,12 +666,15 @@ export class Vxil {
|
|
|
666
666
|
patch: async (id, patch) => (await this.call('PATCH', `/v1/users/${encodeURIComponent(id)}`, patch)).data,
|
|
667
667
|
/**
|
|
668
668
|
* Delete a user. By default this is a SOFT delete (sets deleted_at; the PII
|
|
669
|
-
* persists for the 30-day retention window)
|
|
670
|
-
*
|
|
671
|
-
*
|
|
672
|
-
*
|
|
673
|
-
*
|
|
674
|
-
* the
|
|
669
|
+
* persists for the 30-day retention window): every live session is
|
|
670
|
+
* revoked, but the sign-in identity is kept, so writing the row again
|
|
671
|
+
* restores the user. Pass { erase: true } for GDPR Article 17 erasure: the
|
|
672
|
+
* row is soft-deleted AND its PII (email/display_name/avatar_url/attributes)
|
|
673
|
+
* is scrubbed, while the id is kept so cross-feature references stay
|
|
674
|
+
* intact. The erase also erases the user's sign-in identity when there is
|
|
675
|
+
* one (password removed, codes and links spent, social links deleted,
|
|
676
|
+
* sessions revoked, the e-mail free at once), so one call is a full
|
|
677
|
+
* account delete — the same as `auth.users.erase` (see guide ch. 9).
|
|
675
678
|
*/
|
|
676
679
|
delete: async (id, opts) => {
|
|
677
680
|
await this.call('DELETE', `/v1/users/${encodeURIComponent(id)}${opts?.erase ? '?erase=true' : ''}`);
|
package/package.json
CHANGED