kinde-testkit 0.4.0 → 0.5.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/CHANGELOG.md +8 -0
- package/README.md +48 -2
- package/dist/cli.js +1177 -124
- package/dist/index.cjs +1124 -111
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +150 -1
- package/dist/index.d.ts +150 -1
- package/dist/index.js +1120 -110
- package/dist/index.js.map +1 -1
- package/dist/vitest.d.ts +82 -0
- package/dist/vitest.js +1108 -110
- package/dist/vitest.js.map +1 -1
- package/package.json +3 -1
package/dist/vitest.d.ts
CHANGED
|
@@ -146,6 +146,7 @@ interface TestkitSeed {
|
|
|
146
146
|
familyName?: string | null;
|
|
147
147
|
picture?: string | null;
|
|
148
148
|
claims?: Record<string, unknown>;
|
|
149
|
+
properties?: Record<string, string | number | boolean>;
|
|
149
150
|
}>;
|
|
150
151
|
organizations?: Array<{
|
|
151
152
|
code: string;
|
|
@@ -162,6 +163,39 @@ interface TestkitSeed {
|
|
|
162
163
|
url: string;
|
|
163
164
|
events?: string[];
|
|
164
165
|
}>;
|
|
166
|
+
roles?: Array<{
|
|
167
|
+
key: string;
|
|
168
|
+
name?: string;
|
|
169
|
+
description?: string;
|
|
170
|
+
permissions?: string[];
|
|
171
|
+
isDefault?: boolean;
|
|
172
|
+
}>;
|
|
173
|
+
featureFlags?: Array<{
|
|
174
|
+
key: string;
|
|
175
|
+
name?: string;
|
|
176
|
+
type?: "boolean" | "string" | "integer";
|
|
177
|
+
value: boolean | string | number;
|
|
178
|
+
organizations?: Record<string, boolean | string | number>;
|
|
179
|
+
}>;
|
|
180
|
+
plans?: Array<{
|
|
181
|
+
key: string;
|
|
182
|
+
name?: string;
|
|
183
|
+
subscribers?: string[];
|
|
184
|
+
entitlements?: Array<{
|
|
185
|
+
featureKey: string;
|
|
186
|
+
featureName?: string;
|
|
187
|
+
priceName?: string;
|
|
188
|
+
fixedCharge?: number | null;
|
|
189
|
+
unitAmount?: number | null;
|
|
190
|
+
limitMax?: number | null;
|
|
191
|
+
limitMin?: number | null;
|
|
192
|
+
}>;
|
|
193
|
+
}>;
|
|
194
|
+
permissions?: Array<{
|
|
195
|
+
key: string;
|
|
196
|
+
name?: string;
|
|
197
|
+
description?: string;
|
|
198
|
+
}>;
|
|
165
199
|
applications?: Array<{
|
|
166
200
|
clientId: string;
|
|
167
201
|
clientSecret?: string;
|
|
@@ -181,6 +215,49 @@ interface ResolvedSeed {
|
|
|
181
215
|
url: string;
|
|
182
216
|
events?: string[];
|
|
183
217
|
}>;
|
|
218
|
+
roles: SeedRole[];
|
|
219
|
+
permissions: SeedPermission[];
|
|
220
|
+
featureFlags: SeedFeatureFlag[];
|
|
221
|
+
plans: SeedPlan[];
|
|
222
|
+
userProperties: Record<string, Record<string, string | number | boolean>>;
|
|
223
|
+
}
|
|
224
|
+
interface SeedFeatureFlag {
|
|
225
|
+
id: string;
|
|
226
|
+
key: string;
|
|
227
|
+
name: string;
|
|
228
|
+
type: "boolean" | "string" | "integer";
|
|
229
|
+
value: boolean | string | number;
|
|
230
|
+
organizations: Record<string, boolean | string | number>;
|
|
231
|
+
}
|
|
232
|
+
interface SeedPlan {
|
|
233
|
+
key: string;
|
|
234
|
+
name: string;
|
|
235
|
+
subscribers: string[];
|
|
236
|
+
subscribedOn: string;
|
|
237
|
+
entitlements: Array<{
|
|
238
|
+
id: string;
|
|
239
|
+
featureKey: string;
|
|
240
|
+
featureName: string;
|
|
241
|
+
priceName: string;
|
|
242
|
+
fixedCharge: number | null;
|
|
243
|
+
unitAmount: number | null;
|
|
244
|
+
limitMax: number | null;
|
|
245
|
+
limitMin: number | null;
|
|
246
|
+
}>;
|
|
247
|
+
}
|
|
248
|
+
interface SeedRole {
|
|
249
|
+
id: string;
|
|
250
|
+
key: string;
|
|
251
|
+
name: string;
|
|
252
|
+
description: string | null;
|
|
253
|
+
isDefault: boolean;
|
|
254
|
+
permissions: string[];
|
|
255
|
+
}
|
|
256
|
+
interface SeedPermission {
|
|
257
|
+
id: string;
|
|
258
|
+
key: string;
|
|
259
|
+
name: string;
|
|
260
|
+
description: string | null;
|
|
184
261
|
}
|
|
185
262
|
|
|
186
263
|
interface FailureRule {
|
|
@@ -277,6 +354,8 @@ declare class WebhookDispatcher {
|
|
|
277
354
|
send(options: SendWebhookOptions): Promise<WebhookDelivery[]>;
|
|
278
355
|
private deliver;
|
|
279
356
|
private buildData;
|
|
357
|
+
emit(type: string, data: Record<string, unknown>, source?: WebhookSource): void;
|
|
358
|
+
userEventData(user: KindeUser): Record<string, unknown>;
|
|
280
359
|
emitForUser(type: "user.created" | "user.authenticated", user: KindeUser): void;
|
|
281
360
|
private userData;
|
|
282
361
|
private userPayload;
|
|
@@ -294,6 +373,9 @@ interface StartKindeTestkitOptions {
|
|
|
294
373
|
seed?: TestkitSeed;
|
|
295
374
|
allowPublic?: boolean;
|
|
296
375
|
webhooks?: WebhookOptions;
|
|
376
|
+
https?: boolean | {
|
|
377
|
+
certDirectory?: string;
|
|
378
|
+
};
|
|
297
379
|
}
|
|
298
380
|
|
|
299
381
|
interface KindeTestAuth {
|