@vxil/sdk 0.35.1 → 0.35.3
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 +21 -13
- package/dist/index.js +9 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -957,7 +957,9 @@ export interface PaymentsWebhookEvent {
|
|
|
957
957
|
/** received | processed | error | sig_failed | parse_failed | reprocessed |
|
|
958
958
|
* ignored (a well-formed provider type we deliberately do not fold) |
|
|
959
959
|
* unowned (no end user resolvable) | rejected_environment (a sandbox event
|
|
960
|
-
* the tenant did not opt into)
|
|
960
|
+
* the tenant did not opt into) | rejected_test_store (a RevenueCat Test Store
|
|
961
|
+
* purchase under `revenuecat.testStore: 'reject'`) — the last four are
|
|
962
|
+
* 200-acked, never folded. */
|
|
961
963
|
outcome: string | null;
|
|
962
964
|
/** the PROVIDER-reported environment of the delivery ('production' |
|
|
963
965
|
* 'sandbox') — a separate axis from the API key's live/test label. */
|
|
@@ -1968,6 +1970,9 @@ export interface PaymentsSubscriptionGrantedEventPayload {
|
|
|
1968
1970
|
product_id: string | null;
|
|
1969
1971
|
/** the provider of the purchase; null for a manual grant */
|
|
1970
1972
|
provider: string | null;
|
|
1973
|
+
/** a purchase's own environment; for a manual grant (since w44) the
|
|
1974
|
+
* project's configured payments environment. Typed nullable for events
|
|
1975
|
+
* recorded before that, which carried null. */
|
|
1971
1976
|
environment: PaymentsEventEnvironment | null;
|
|
1972
1977
|
level: 'info';
|
|
1973
1978
|
state: 'ok';
|
|
@@ -1994,11 +1999,11 @@ export interface PaymentsSubscriptionRevokedEventPayload {
|
|
|
1994
1999
|
* (RevenueCat — the store, not vxil, controls renewal). */
|
|
1995
2000
|
provider_subscription_active: boolean | null;
|
|
1996
2001
|
/** (w40) the ended row's environment — a provider row's own; for a manual
|
|
1997
|
-
* grant, the project's configured payments environment
|
|
1998
|
-
*
|
|
1999
|
-
*
|
|
2000
|
-
* stored `'production'` placeholder — so filter a manual grant's
|
|
2001
|
-
* `subscription_id`, not by `environment`. */
|
|
2002
|
+
* grant, the project's configured payments environment (since w44 its
|
|
2003
|
+
* `payments.subscription.granted` and `payments.entitlement.changed` name
|
|
2004
|
+
* the same). A manual grant's `payments.subscription.lapsed` still carries
|
|
2005
|
+
* the stored `'production'` placeholder — so filter a manual grant's
|
|
2006
|
+
* lifecycle by `subscription_id`, not by `environment`. */
|
|
2002
2007
|
environment: PaymentsEventEnvironment;
|
|
2003
2008
|
level: 'info';
|
|
2004
2009
|
state: 'ok';
|
|
@@ -3695,12 +3700,15 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
3695
3700
|
}) => Promise<VxilUser>;
|
|
3696
3701
|
/**
|
|
3697
3702
|
* Delete a user. By default this is a SOFT delete (sets deleted_at; the PII
|
|
3698
|
-
* persists for the 30-day retention window)
|
|
3699
|
-
*
|
|
3700
|
-
*
|
|
3701
|
-
*
|
|
3702
|
-
*
|
|
3703
|
-
* the
|
|
3703
|
+
* persists for the 30-day retention window): every live session is
|
|
3704
|
+
* revoked, but the sign-in identity is kept, so writing the row again
|
|
3705
|
+
* restores the user. Pass { erase: true } for GDPR Article 17 erasure: the
|
|
3706
|
+
* row is soft-deleted AND its PII (email/display_name/avatar_url/attributes)
|
|
3707
|
+
* is scrubbed, while the id is kept so cross-feature references stay
|
|
3708
|
+
* intact. The erase also erases the user's sign-in identity when there is
|
|
3709
|
+
* one (password removed, codes and links spent, social links deleted,
|
|
3710
|
+
* sessions revoked, the e-mail free at once), so one call is a full
|
|
3711
|
+
* account delete — the same as `auth.users.erase` (see guide ch. 9).
|
|
3704
3712
|
*/
|
|
3705
3713
|
delete: (id: string, opts?: {
|
|
3706
3714
|
erase?: boolean;
|
|
@@ -7978,7 +7986,7 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
|
|
|
7978
7986
|
list: (q?: {
|
|
7979
7987
|
provider?: "mock" | "stripe" | "paddle" | "revenuecat" | "paypal";
|
|
7980
7988
|
event_type?: string;
|
|
7981
|
-
outcome?: "received" | "processed" | "error" | "sig_failed" | "parse_failed" | "reprocessed" | "ignored" | "unowned" | "rejected_environment";
|
|
7989
|
+
outcome?: "received" | "processed" | "error" | "sig_failed" | "parse_failed" | "reprocessed" | "ignored" | "unowned" | "rejected_environment" | "rejected_test_store";
|
|
7982
7990
|
/** the provider-reported environment axis (not the API key's label) */
|
|
7983
7991
|
environment?: "production" | "sandbox";
|
|
7984
7992
|
/** exact match on the normalised charge id (= `payments.charge.*`'s
|
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