@aboutcircles/sdk-invitations 0.1.24 → 0.1.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.
Files changed (37) hide show
  1. package/dist/Distributions.d.ts +41 -0
  2. package/dist/Distributions.d.ts.map +1 -0
  3. package/dist/Distributions.js +170 -0
  4. package/dist/Referrals.d.ts +35 -20
  5. package/dist/Referrals.d.ts.map +1 -1
  6. package/dist/Referrals.js +84 -91
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +3 -3
  10. package/dist/tests/findInvitePath.test.d.ts +2 -0
  11. package/dist/tests/findInvitePath.test.d.ts.map +1 -0
  12. package/dist/tests/findInvitePath.test.js +41 -0
  13. package/dist/tests/fuzz/invite-checker.d.ts +2 -0
  14. package/dist/tests/fuzz/invite-checker.d.ts.map +1 -0
  15. package/dist/tests/fuzz/invite-checker.js +117 -0
  16. package/dist/tests/fuzz/networkFuzz.d.ts +6 -0
  17. package/dist/tests/fuzz/networkFuzz.d.ts.map +1 -0
  18. package/dist/tests/fuzz/networkFuzz.js +290 -0
  19. package/dist/tests/generateInvite.test.d.ts +2 -0
  20. package/dist/tests/generateInvite.test.d.ts.map +1 -0
  21. package/dist/tests/generateInvite.test.js +55 -0
  22. package/dist/tests/getRealInviters.test.d.ts +2 -0
  23. package/dist/tests/getRealInviters.test.d.ts.map +1 -0
  24. package/dist/tests/getRealInviters.test.js +77 -0
  25. package/dist/tests/helpers/mockFetch.d.ts +7 -0
  26. package/dist/tests/helpers/mockFetch.d.ts.map +1 -0
  27. package/dist/tests/helpers/mockFetch.js +282 -0
  28. package/dist/tests/helpers/scenario.d.ts +77 -0
  29. package/dist/tests/helpers/scenario.d.ts.map +1 -0
  30. package/dist/tests/helpers/scenario.js +104 -0
  31. package/dist/tests/helpers/scenarios.d.ts +40 -0
  32. package/dist/tests/helpers/scenarios.d.ts.map +1 -0
  33. package/dist/tests/helpers/scenarios.js +111 -0
  34. package/dist/types.d.ts +156 -23
  35. package/dist/types.d.ts.map +1 -1
  36. package/dist/types.js +26 -1
  37. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -16,56 +16,50 @@ export interface ReferralInfo {
16
16
  /**
17
17
  * Full referral record returned from my-referrals endpoint
18
18
  */
19
+ export interface ReferralSession {
20
+ id: string;
21
+ slug: string;
22
+ label: string | null;
23
+ }
19
24
  export interface Referral {
20
- /** Unique identifier */
21
25
  id: string;
22
- /** The referral private key */
23
26
  privateKey: string;
24
- /** Current status */
25
27
  status: ReferralStatus;
26
- /** The Safe account address */
27
28
  accountAddress?: string;
28
- /** When the referral was created */
29
29
  createdAt: string;
30
- /** When the account was confirmed on-chain */
30
+ pendingAt: string;
31
+ staleAt: string | null;
31
32
  confirmedAt: string | null;
32
- /** When the account was claimed */
33
33
  claimedAt: string | null;
34
+ /** Distribution sessions this key belongs to. Empty array if not assigned. */
35
+ sessions: ReferralSession[];
34
36
  }
35
- /**
36
- * Response from my-referrals endpoint
37
- */
38
37
  export interface ReferralList {
39
- /** List of referrals */
40
38
  referrals: Referral[];
41
- /** Total count */
42
39
  count: number;
40
+ total: number;
41
+ limit: number;
42
+ offset: number;
43
43
  }
44
44
  /**
45
- * Referral preview returned from the list endpoint (key is masked)
45
+ * Referral preview returned from the public list/{address} endpoint (key is masked)
46
46
  */
47
47
  export interface ReferralPreview {
48
- /** Unique identifier */
49
48
  id: string;
50
- /** Masked private key preview (e.g. "0x123456...cdef") */
49
+ /** Masked private key preview (e.g. "0x1234...7890") */
51
50
  keyPreview: string;
52
- /** Current status */
53
51
  status: ReferralStatus;
54
- /** The Safe account address */
55
52
  accountAddress: string | null;
56
- /** When the referral was created */
57
53
  createdAt: string;
58
- /** When the referral entered pending state */
59
54
  pendingAt: string | null;
60
- /** When the referral became stale */
61
55
  staleAt: string | null;
62
- /** When the account was confirmed on-chain */
63
56
  confirmedAt: string | null;
64
- /** When the account was claimed */
65
57
  claimedAt: string | null;
58
+ /** Whether this key is also present in at least one distribution session */
59
+ inSession: boolean;
66
60
  }
67
61
  /**
68
- * Paginated response from referrals/list endpoint
62
+ * Paginated response from the public list/{address} endpoint
69
63
  */
70
64
  export interface ReferralPreviewList {
71
65
  referrals: ReferralPreview[];
@@ -73,6 +67,8 @@ export interface ReferralPreviewList {
73
67
  total: number;
74
68
  limit: number;
75
69
  offset: number;
70
+ /** 'synced' = fresh RPC check, 'cached' = DB-cached status (30s TTL) */
71
+ syncStatus: "synced" | "cached";
76
72
  }
77
73
  /**
78
74
  * Error response from API
@@ -80,4 +76,141 @@ export interface ReferralPreviewList {
80
76
  export interface ApiError {
81
77
  error: string;
82
78
  }
79
+ /**
80
+ * Result from store-batch endpoint
81
+ */
82
+ export interface StoreBatchResult {
83
+ success: boolean;
84
+ stored: number;
85
+ failed: number;
86
+ errors?: Array<{
87
+ index: number;
88
+ keyPreview: string;
89
+ reason: string;
90
+ }>;
91
+ }
92
+ /**
93
+ * A distribution session gates access to an inviter's key pool
94
+ * via quota, expiry, and pause controls.
95
+ */
96
+ export interface DistributionSession {
97
+ id: string;
98
+ slug: string;
99
+ inviterAddress: string;
100
+ label: string | null;
101
+ quota: number;
102
+ dispensedCount: number;
103
+ expiresAt: string | null;
104
+ paused: boolean;
105
+ createdAt: string;
106
+ updatedAt: string;
107
+ /** Full URL for QR codes (only when DISTRIBUTION_BASE_URL is configured) */
108
+ distributionUrl: string | null;
109
+ }
110
+ /**
111
+ * Paginated list of distribution sessions
112
+ */
113
+ export interface DistributionSessionList {
114
+ sessions: DistributionSession[];
115
+ total: number;
116
+ limit: number;
117
+ offset: number;
118
+ }
119
+ /**
120
+ * Parameters for creating a distribution session
121
+ */
122
+ export interface CreateSessionParams {
123
+ /** Inviter's Ethereum address whose key pool this session draws from */
124
+ inviterAddress: string;
125
+ /** Maximum number of keys this session can dispense */
126
+ quota: number;
127
+ /** Human-readable label (e.g. "ETHDenver 2026 booth") */
128
+ label?: string;
129
+ /** ISO 8601 expiry timestamp */
130
+ expiresAt?: string;
131
+ }
132
+ /**
133
+ * Parameters for updating a distribution session
134
+ */
135
+ export interface UpdateSessionParams {
136
+ label?: string;
137
+ quota?: number;
138
+ /** New expiry (ISO 8601), or null to remove expiry */
139
+ expiresAt?: string | null;
140
+ paused?: boolean;
141
+ }
142
+ /**
143
+ * A single key entry within a distribution session
144
+ */
145
+ export interface SessionKey {
146
+ id: string;
147
+ privateKey: string;
148
+ signerAddress: string | null;
149
+ accountAddress: string | null;
150
+ status: "queued" | "dispatched" | "claimed";
151
+ dispatchedAt: string | null;
152
+ claimedAt: string | null;
153
+ addedAt: string;
154
+ }
155
+ /**
156
+ * Paginated list of keys in a distribution session
157
+ */
158
+ export interface SessionKeyList {
159
+ keys: SessionKey[];
160
+ total: number;
161
+ queuedCount: number;
162
+ dispatchedCount: number;
163
+ claimedCount: number;
164
+ limit: number;
165
+ offset: number;
166
+ }
167
+ /**
168
+ * Result from adding keys to a distribution session
169
+ */
170
+ export interface AddKeysResult {
171
+ added: number;
172
+ skipped: number;
173
+ claimed: number;
174
+ errors: Array<{
175
+ key: string;
176
+ error: string;
177
+ }>;
178
+ }
179
+ /**
180
+ * Result from dispensing a key via a distribution session slug.
181
+ */
182
+ export interface DispenseResult {
183
+ /** Full private key for the invitation link */
184
+ privateKey: string;
185
+ /** Inviter address that owns the key pool */
186
+ inviter: string;
187
+ /** Pre-built claim URL (only when DISTRIBUTION_BASE_URL configured) */
188
+ claimUrl?: string;
189
+ /** The session slug this key was dispensed through */
190
+ sessionSlug: string;
191
+ }
192
+ /**
193
+ * Error codes returned when dispense fails.
194
+ */
195
+ export type DispenseErrorCode = "SESSION_NOT_FOUND" | "POOL_EMPTY" | "SESSION_EXPIRED" | "QUOTA_EXHAUSTED" | "SESSION_PAUSED" | "RATE_LIMITED" | "UNKNOWN";
196
+ /**
197
+ * Typed error thrown by dispense() with a code for programmatic handling.
198
+ */
199
+ export declare class DispenseError extends Error {
200
+ readonly code: DispenseErrorCode;
201
+ readonly httpStatus: number;
202
+ constructor(message: string, code: DispenseErrorCode, httpStatus: number);
203
+ }
204
+ /**
205
+ * Error codes for distribution session CRUD operations.
206
+ */
207
+ export type SessionErrorCode = "VALIDATION_ERROR" | "NOT_FOUND" | "CONFLICT" | "SERVER_ERROR";
208
+ /**
209
+ * Typed error thrown by session CRUD methods.
210
+ */
211
+ export declare class SessionError extends Error {
212
+ readonly code: SessionErrorCode;
213
+ readonly httpStatus: number;
214
+ constructor(message: string, code: SessionErrorCode, httpStatus: number);
215
+ }
83
216
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAE7E;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,MAAM,EAAE,cAAc,CAAC;IACvB,8CAA8C;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,+BAA+B;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,MAAM,EAAE,cAAc,CAAC;IACvB,+BAA+B;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,mCAAmC;IACnC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,wBAAwB;IACxB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;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CAAC,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,mBAAmB,GACnB,YAAY,GACZ,iBAAiB,GACjB,iBAAiB,GACjB,gBAAgB,GAChB,cAAc,GACd,SAAS,CAAC;AAEd;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK;aAGpB,IAAI,EAAE,iBAAiB;aACvB,UAAU,EAAE,MAAM;gBAFlC,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,iBAAiB,EACvB,UAAU,EAAE,MAAM;CAKrC;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,kBAAkB,GAClB,WAAW,GACX,UAAU,GACV,cAAc,CAAC;AAEnB;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;aAGnB,IAAI,EAAE,gBAAgB;aACtB,UAAU,EAAE,MAAM;gBAFlC,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,gBAAgB,EACtB,UAAU,EAAE,MAAM;CAKrC"}
package/dist/types.js CHANGED
@@ -1 +1,26 @@
1
- export {};
1
+ /**
2
+ * Typed error thrown by dispense() with a code for programmatic handling.
3
+ */
4
+ export class DispenseError extends Error {
5
+ code;
6
+ httpStatus;
7
+ constructor(message, code, httpStatus) {
8
+ super(message);
9
+ this.code = code;
10
+ this.httpStatus = httpStatus;
11
+ this.name = "DispenseError";
12
+ }
13
+ }
14
+ /**
15
+ * Typed error thrown by session CRUD methods.
16
+ */
17
+ export class SessionError extends Error {
18
+ code;
19
+ httpStatus;
20
+ constructor(message, code, httpStatus) {
21
+ super(message);
22
+ this.code = code;
23
+ this.httpStatus = httpStatus;
24
+ this.name = "SessionError";
25
+ }
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aboutcircles/sdk-invitations",
3
- "version": "0.1.24",
3
+ "version": "0.1.25",
4
4
  "description": "Circles Invitations Module SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",