@mymehq/sdk 5.5.0 → 5.6.0

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 CHANGED
@@ -118,7 +118,7 @@ interface UpdateOptions {
118
118
  * stamped `source`. The server enforces `(source, source_id)` uniqueness
119
119
  * per tenant — a collision returns HTTP 409 `source_id_conflict`. PATCHing
120
120
  * the value the item already carries is a no-op success. Used by the
121
- * sync-agent (T-118) to preserve item identity through file renames.
121
+ * sync agent (T-118) to preserve item identity through file renames.
122
122
  */
123
123
  source_id?: string;
124
124
  /**
@@ -797,6 +797,24 @@ declare class MymeClient {
797
797
  * surface for emergency revocation — pair with `client.keys.revoke`. */
798
798
  list: (tenantId: string) => Promise<TenantApiKeySummary[]>;
799
799
  };
800
+ accountDeletion: {
801
+ /**
802
+ * Force a one-shot run of the pending-delete purger (T-124).
803
+ * Returns the number of accounts purged this tick. Useful when
804
+ * an account has just passed its grace window and the operator
805
+ * doesn't want to wait for the next scheduled sweep (default
806
+ * cadence: 1 hour).
807
+ *
808
+ * Idempotent: re-running with no eligible rows returns 0. Only
809
+ * sweeps accounts already past `pending_deletion_at + grace_days`
810
+ * — does not bypass the grace window. The `run_at` timestamp is
811
+ * server-stamped at the moment `runOnce()` begins.
812
+ */
813
+ purgeNow: () => Promise<{
814
+ purged_count: number;
815
+ run_at: string;
816
+ }>;
817
+ };
800
818
  };
801
819
  /**
802
820
  * Account-lifecycle surface (T-116).
package/dist/index.js CHANGED
@@ -1200,6 +1200,23 @@ var MymeClient = class {
1200
1200
  const res = await this.transport.request("GET", `/admin/tenants/${encodeURIComponent(tenantId)}/keys`);
1201
1201
  return res.data;
1202
1202
  }
1203
+ },
1204
+ accountDeletion: {
1205
+ /**
1206
+ * Force a one-shot run of the pending-delete purger (T-124).
1207
+ * Returns the number of accounts purged this tick. Useful when
1208
+ * an account has just passed its grace window and the operator
1209
+ * doesn't want to wait for the next scheduled sweep (default
1210
+ * cadence: 1 hour).
1211
+ *
1212
+ * Idempotent: re-running with no eligible rows returns 0. Only
1213
+ * sweeps accounts already past `pending_deletion_at + grace_days`
1214
+ * — does not bypass the grace window. The `run_at` timestamp is
1215
+ * server-stamped at the moment `runOnce()` begins.
1216
+ */
1217
+ purgeNow: async () => {
1218
+ return this.transport.request("POST", "/admin/account-deletion/purge-now");
1219
+ }
1203
1220
  }
1204
1221
  };
1205
1222
  // ---- Auth (T-116) ----
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mymehq/sdk",
3
- "version": "5.5.0",
3
+ "version": "5.6.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org",
@@ -20,7 +20,7 @@
20
20
  "dist"
21
21
  ],
22
22
  "dependencies": {
23
- "@mymehq/shared": "5.5.0"
23
+ "@mymehq/shared": "5.6.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "^22.0.0",