@feelflow/ffid-sdk 8.1.0 → 10.0.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/README.md +1010 -960
- package/dist/{FFIDCookieLink-Bwr0FBrV.d.cts → FFIDCookieLink-yt5SUr-W.d.cts} +47 -3
- package/dist/{FFIDCookieLink-Bwr0FBrV.d.ts → FFIDCookieLink-yt5SUr-W.d.ts} +47 -3
- package/dist/{chunk-CPXTIRB6.cjs → chunk-2LU2F3F2.cjs} +283 -11
- package/dist/{chunk-P5A6C5SK.js → chunk-OXW6QSTO.js} +270 -12
- package/dist/{chunk-XELXXL2F.cjs → chunk-RZCQ22GH.cjs} +29 -9
- package/dist/{chunk-RHBZHSRD.js → chunk-S2AEBJRX.js} +29 -9
- package/dist/components/index.cjs +8 -8
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/consent/index.cjs +63 -63
- package/dist/consent/index.d.cts +2 -2
- package/dist/consent/index.d.ts +2 -2
- package/dist/consent/index.js +1 -1
- package/dist/{ffid-client-B0cORHac.d.ts → ffid-client-5uxXRgIO.d.ts} +686 -376
- package/dist/{ffid-client-6aLs9Fqc.d.cts → ffid-client-CumygXXz.d.cts} +686 -376
- package/dist/{index-BG7g99pK.d.ts → index-KjewcNn1.d.cts} +813 -2
- package/dist/{index-BG7g99pK.d.cts → index-KjewcNn1.d.ts} +813 -2
- package/dist/index.cjs +151 -95
- package/dist/index.d.cts +116 -505
- package/dist/index.d.ts +116 -505
- package/dist/index.js +3 -3
- package/dist/server/index.cjs +253 -11
- package/dist/server/index.d.cts +2 -2
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +253 -11
- package/dist/server/test/index.d.cts +1 -1
- package/dist/server/test/index.d.ts +1 -1
- package/dist/webhooks/index.d.cts +112 -7
- package/dist/webhooks/index.d.ts +112 -7
- package/package.json +131 -131
package/dist/webhooks/index.d.ts
CHANGED
|
@@ -39,6 +39,74 @@ declare class FFIDWebhookPayloadError extends FFIDWebhookError {
|
|
|
39
39
|
constructor(message?: string);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* `credits.*` webhook payloads (SDK 10.0.0, FFID CREDITS_API §8).
|
|
44
|
+
*
|
|
45
|
+
* Separate file to keep `types.ts` small. Mirrors the FFID server's
|
|
46
|
+
* `src/lib/webhooks/credits-payloads.ts`; the FFID repository type-checks the two
|
|
47
|
+
* against each other (`sdk-credits-payloads.sync.test.ts`).
|
|
48
|
+
*/
|
|
49
|
+
/**
|
|
50
|
+
* Fields every `credits.*` payload carries (10.0.0, CREDITS_API §8).
|
|
51
|
+
*
|
|
52
|
+
* `credits.*` events are broadcast to every endpoint subscribed to the event type,
|
|
53
|
+
* so compare `serviceCode` with your own service code before acting. It is absent
|
|
54
|
+
* only when FFID could not resolve it — do not read absence as "not for this service".
|
|
55
|
+
*/
|
|
56
|
+
interface FFIDCreditsEventBase {
|
|
57
|
+
subscriptionId: string;
|
|
58
|
+
organizationId: string;
|
|
59
|
+
/** Time the event happened (ISO 8601) */
|
|
60
|
+
occurredAt: string;
|
|
61
|
+
serviceCode?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* `credits.granted` — a monthly / manual / pack grant was created. Sent once per
|
|
65
|
+
* grant (`grantId`). A pack purchase also sends `credits.pack_purchased`.
|
|
66
|
+
*/
|
|
67
|
+
interface FFIDCreditsGrantedPayload extends FFIDCreditsEventBase {
|
|
68
|
+
grantId: string;
|
|
69
|
+
kind: 'monthly' | 'manual' | 'pack';
|
|
70
|
+
amount: number;
|
|
71
|
+
expiresAt: string;
|
|
72
|
+
/** Only when `kind === 'monthly'` */
|
|
73
|
+
periodStart?: string;
|
|
74
|
+
/** Only when `kind === 'monthly'` */
|
|
75
|
+
periodEnd?: string;
|
|
76
|
+
/** Balance read after the grant — a reference value; the balance API is authoritative */
|
|
77
|
+
balanceAfter: number;
|
|
78
|
+
}
|
|
79
|
+
/** `credits.low` — the balance fell below the low threshold (once per period) */
|
|
80
|
+
interface FFIDCreditsLowPayload extends FFIDCreditsEventBase {
|
|
81
|
+
available: number;
|
|
82
|
+
monthlyCredits: number;
|
|
83
|
+
thresholdPercent: number;
|
|
84
|
+
/** End of the current period; null only when FFID could not read it */
|
|
85
|
+
periodEnd: string | null;
|
|
86
|
+
}
|
|
87
|
+
/** `credits.exhausted` — the balance reached 0 (once per period) */
|
|
88
|
+
interface FFIDCreditsExhaustedPayload extends FFIDCreditsEventBase {
|
|
89
|
+
available: number;
|
|
90
|
+
monthlyCredits: number;
|
|
91
|
+
/** End of the current period; null only when FFID could not read it */
|
|
92
|
+
periodEnd: string | null;
|
|
93
|
+
}
|
|
94
|
+
/** `credits.pack_purchased` — a credit pack purchase completed and its credits were granted */
|
|
95
|
+
interface FFIDCreditsPackPurchasedPayload extends FFIDCreditsEventBase {
|
|
96
|
+
operationId: string;
|
|
97
|
+
grantId: string;
|
|
98
|
+
packCode: string;
|
|
99
|
+
/** Credits granted in total (pack credits × `quantity`) */
|
|
100
|
+
credits: number;
|
|
101
|
+
quantity: number;
|
|
102
|
+
/** Amount paid (tax-inclusive, smallest currency unit) */
|
|
103
|
+
amount: number;
|
|
104
|
+
currency: string;
|
|
105
|
+
expiresAt: string;
|
|
106
|
+
/** User who bought the pack */
|
|
107
|
+
purchasedBy: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
42
110
|
/**
|
|
43
111
|
* FFID Webhook SDK Type Definitions
|
|
44
112
|
*
|
|
@@ -47,7 +115,7 @@ declare class FFIDWebhookPayloadError extends FFIDWebhookError {
|
|
|
47
115
|
*/
|
|
48
116
|
|
|
49
117
|
/** All supported webhook event types */
|
|
50
|
-
type FFIDWebhookEventType = 'subscription.created' | 'subscription.reactivated' | 'subscription.updated' | 'subscription.canceled' | 'subscription.downgrade_scheduled' | 'subscription.downgrade_applied' | 'subscription.downgrade_canceled' | 'subscription.trial_ending' | 'subscription.payment_failed' | 'user.created' | 'user.updated' | 'user.deleted' | 'user.deletion_requested' | 'organization.created' | 'organization.updated' | 'organization.member.added' | 'organization.member.removed' | 'organization.member.role_changed' | 'legal.document.updated' | 'legal.agreement.required' | 'system.maintenance.scheduled' | 'system.maintenance.started' | 'system.maintenance.completed' | 'announcement.published' | 'test.ping';
|
|
118
|
+
type FFIDWebhookEventType = 'subscription.created' | 'subscription.reactivated' | 'subscription.updated' | 'subscription.canceled' | 'subscription.downgrade_scheduled' | 'subscription.downgrade_applied' | 'subscription.downgrade_canceled' | 'subscription.trial_ending' | 'subscription.payment_failed' | 'user.created' | 'user.updated' | 'user.deleted' | 'user.deletion_requested' | 'organization.created' | 'organization.updated' | 'organization.member.added' | 'organization.member.removed' | 'organization.member.role_changed' | 'legal.document.updated' | 'legal.agreement.required' | 'system.maintenance.scheduled' | 'system.maintenance.started' | 'system.maintenance.completed' | 'announcement.published' | 'credits.granted' | 'credits.low' | 'credits.exhausted' | 'credits.pack_purchased' | 'test.ping';
|
|
51
119
|
interface FFIDSubscriptionCreatedPayload {
|
|
52
120
|
subscriptionId: string;
|
|
53
121
|
organizationId?: string;
|
|
@@ -64,12 +132,27 @@ interface FFIDSubscriptionCreatedPayload {
|
|
|
64
132
|
*/
|
|
65
133
|
serviceCode?: string;
|
|
66
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* `subscription.updated`.
|
|
137
|
+
*
|
|
138
|
+
* 9.0.0 aligned this type with what FFID sends (#6380): `status` is always present, and
|
|
139
|
+
* `subscriptionId` / `organizationId` are absent when the event comes from a Stripe notice
|
|
140
|
+
* whose subscription FFID could not match to its own record (check before use).
|
|
141
|
+
* `previousPlan` was removed — FFID never sent it.
|
|
142
|
+
*/
|
|
67
143
|
interface FFIDSubscriptionUpdatedPayload {
|
|
68
|
-
|
|
144
|
+
/**
|
|
145
|
+
* Subscription status after the change — the raw status string (FFID's or Stripe's), not a
|
|
146
|
+
* closed enum. Use `effectiveStatus` for access decisions.
|
|
147
|
+
*/
|
|
148
|
+
status: string;
|
|
149
|
+
/** FFID subscription UUID. Absent when FFID could not match the Stripe subscription */
|
|
150
|
+
subscriptionId?: string;
|
|
151
|
+
/** Stripe subscription id (`sub_...`). Present on events that come from Stripe notices */
|
|
152
|
+
stripeSubscriptionId?: string;
|
|
69
153
|
organizationId?: string;
|
|
154
|
+
/** Plan code after the change */
|
|
70
155
|
plan?: string;
|
|
71
|
-
previousPlan?: string;
|
|
72
|
-
status?: string;
|
|
73
156
|
effectiveStatus?: EffectiveSubscriptionStatus;
|
|
74
157
|
gracePeriodEndsAt?: string | null;
|
|
75
158
|
/**
|
|
@@ -242,9 +325,27 @@ interface FFIDSubscriptionDowngradeCanceledPayload {
|
|
|
242
325
|
*/
|
|
243
326
|
serviceCode?: string;
|
|
244
327
|
}
|
|
328
|
+
/**
|
|
329
|
+
* `subscription.trial_ending` — sent when Stripe announces that a trial is about to end.
|
|
330
|
+
*
|
|
331
|
+
* 9.0.0 aligned this type with what FFID sends (#6380). FFID does not resolve its own
|
|
332
|
+
* subscription UUID for this event; identify the subscription by `stripeSubscriptionId`
|
|
333
|
+
* (and the service by `serviceCode`).
|
|
334
|
+
*/
|
|
245
335
|
interface FFIDSubscriptionTrialEndingPayload {
|
|
246
|
-
|
|
247
|
-
|
|
336
|
+
/** Stripe subscription id (`sub_...`) */
|
|
337
|
+
stripeSubscriptionId: string;
|
|
338
|
+
/**
|
|
339
|
+
* Days until the trial ends, rounded **up** at the moment FFID processed Stripe's notice
|
|
340
|
+
* (a trial ending later the same day is `1`). `0` only when the trial had already ended by
|
|
341
|
+
* then. Fixed when the event is created — a redelivered event carries the same value.
|
|
342
|
+
*/
|
|
343
|
+
daysRemaining: number;
|
|
344
|
+
/**
|
|
345
|
+
* Trial end date **for display**, in Japanese long form in JST (e.g. `2026年10月3日`) — not
|
|
346
|
+
* an ISO timestamp. `(無効な日時)` when FFID could not read Stripe's timestamp. Use
|
|
347
|
+
* `daysRemaining` for any calculation.
|
|
348
|
+
*/
|
|
248
349
|
trialEndDate: string;
|
|
249
350
|
/**
|
|
250
351
|
* Code of the service the subscription belongs to (e.g. `chatbot-v2`), resolved by FFID when
|
|
@@ -420,6 +521,10 @@ interface FFIDWebhookEventMap {
|
|
|
420
521
|
'system.maintenance.started': FFIDSystemMaintenancePayload;
|
|
421
522
|
'system.maintenance.completed': FFIDSystemMaintenancePayload;
|
|
422
523
|
'announcement.published': FFIDAnnouncementPublishedPayload;
|
|
524
|
+
'credits.granted': FFIDCreditsGrantedPayload;
|
|
525
|
+
'credits.low': FFIDCreditsLowPayload;
|
|
526
|
+
'credits.exhausted': FFIDCreditsExhaustedPayload;
|
|
527
|
+
'credits.pack_purchased': FFIDCreditsPackPurchasedPayload;
|
|
423
528
|
'test.ping': FFIDTestPingPayload;
|
|
424
529
|
}
|
|
425
530
|
/** A webhook event envelope with typed payload */
|
|
@@ -545,4 +650,4 @@ declare function createFFIDWebhookHandler(config: FFIDWebhookHandlerConfig): {
|
|
|
545
650
|
/** Type of the FFID Webhook handler */
|
|
546
651
|
type FFIDWebhookHandler = ReturnType<typeof createFFIDWebhookHandler>;
|
|
547
652
|
|
|
548
|
-
export { DEFAULT_TOLERANCE_SECONDS, type FFIDLegalAgreementRequiredPayload, type FFIDLegalDocumentUpdatedPayload, type FFIDOrganizationCreatedPayload, type FFIDOrganizationMemberAddedPayload, type FFIDOrganizationMemberRemovedPayload, type FFIDOrganizationMemberRoleChangedPayload, type FFIDOrganizationUpdatedPayload, type FFIDSubscriptionCanceledPayload, type FFIDSubscriptionCreatedPayload, type FFIDSubscriptionDowngradeAppliedPayload, type FFIDSubscriptionDowngradeCanceledPayload, type FFIDSubscriptionDowngradeScheduledPayload, type FFIDSubscriptionPaymentFailedPayload, type FFIDSubscriptionReactivatedPayload, type FFIDSubscriptionTrialEndingPayload, type FFIDSubscriptionUpdatedPayload, type FFIDSystemMaintenancePayload, type FFIDTestPingPayload, type FFIDUserCreatedPayload, type FFIDUserDeletedPayload, type FFIDUserDeletionRequestedPayload, type FFIDUserUpdatedPayload, FFIDWebhookError, type FFIDWebhookEvent, type FFIDWebhookEventHandler, type FFIDWebhookEventMap, type FFIDWebhookEventType, type FFIDWebhookHandler, type FFIDWebhookHandlerConfig, type FFIDWebhookLogger, FFIDWebhookPayloadError, FFIDWebhookSignatureError, FFIDWebhookTimestampError, FFID_WEBHOOK_EVENT_ID_HEADER, FFID_WEBHOOK_SIGNATURE_HEADER, FFID_WEBHOOK_SIGNATURE_VERSION, FFID_WEBHOOK_TIMESTAMP_HEADER, computeSignature, createFFIDWebhookHandler, parseSignatureHeader, verifyWebhookSignature };
|
|
653
|
+
export { DEFAULT_TOLERANCE_SECONDS, type FFIDAnnouncementPublishedPayload, type FFIDCreditsExhaustedPayload, type FFIDCreditsGrantedPayload, type FFIDCreditsLowPayload, type FFIDCreditsPackPurchasedPayload, type FFIDLegalAgreementRequiredPayload, type FFIDLegalDocumentUpdatedPayload, type FFIDOrganizationCreatedPayload, type FFIDOrganizationMemberAddedPayload, type FFIDOrganizationMemberRemovedPayload, type FFIDOrganizationMemberRoleChangedPayload, type FFIDOrganizationUpdatedPayload, type FFIDSubscriptionCanceledPayload, type FFIDSubscriptionCreatedPayload, type FFIDSubscriptionDowngradeAppliedPayload, type FFIDSubscriptionDowngradeCanceledPayload, type FFIDSubscriptionDowngradeScheduledPayload, type FFIDSubscriptionPaymentFailedPayload, type FFIDSubscriptionReactivatedPayload, type FFIDSubscriptionTrialEndingPayload, type FFIDSubscriptionUpdatedPayload, type FFIDSystemMaintenancePayload, type FFIDTestPingPayload, type FFIDUserCreatedPayload, type FFIDUserDeletedPayload, type FFIDUserDeletionRequestedPayload, type FFIDUserUpdatedPayload, FFIDWebhookError, type FFIDWebhookEvent, type FFIDWebhookEventHandler, type FFIDWebhookEventMap, type FFIDWebhookEventType, type FFIDWebhookHandler, type FFIDWebhookHandlerConfig, type FFIDWebhookLogger, FFIDWebhookPayloadError, FFIDWebhookSignatureError, FFIDWebhookTimestampError, FFID_WEBHOOK_EVENT_ID_HEADER, FFID_WEBHOOK_SIGNATURE_HEADER, FFID_WEBHOOK_SIGNATURE_VERSION, FFID_WEBHOOK_TIMESTAMP_HEADER, computeSignature, createFFIDWebhookHandler, parseSignatureHeader, verifyWebhookSignature };
|
package/package.json
CHANGED
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@feelflow/ffid-sdk",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "FeelFlow ID Platform SDK for React/Next.js applications",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"feelflow",
|
|
7
|
-
"ffid",
|
|
8
|
-
"sdk",
|
|
9
|
-
"react",
|
|
10
|
-
"nextjs",
|
|
11
|
-
"authentication"
|
|
12
|
-
],
|
|
13
|
-
"author": "FeelFlow <dev@feelflow.net>",
|
|
14
|
-
"license": "MIT",
|
|
15
|
-
"homepage": "https://github.com/feel-flow/feelflow-id-platform/tree/develop/sdk/typescript#readme",
|
|
16
|
-
"bugs": {
|
|
17
|
-
"url": "https://github.com/feel-flow/feelflow-id-platform/issues"
|
|
18
|
-
},
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "https://github.com/feel-flow/feelflow-id-platform.git",
|
|
22
|
-
"directory": "sdk/typescript"
|
|
23
|
-
},
|
|
24
|
-
"type": "module",
|
|
25
|
-
"main": "./dist/index.cjs",
|
|
26
|
-
"module": "./dist/index.js",
|
|
27
|
-
"types": "./dist/index.d.ts",
|
|
28
|
-
"exports": {
|
|
29
|
-
".": {
|
|
30
|
-
"types": "./dist/index.d.ts",
|
|
31
|
-
"import": "./dist/index.js",
|
|
32
|
-
"require": "./dist/index.cjs"
|
|
33
|
-
},
|
|
34
|
-
"./components": {
|
|
35
|
-
"types": "./dist/components/index.d.ts",
|
|
36
|
-
"import": "./dist/components/index.js",
|
|
37
|
-
"require": "./dist/components/index.cjs"
|
|
38
|
-
},
|
|
39
|
-
"./consent": {
|
|
40
|
-
"types": "./dist/consent/index.d.ts",
|
|
41
|
-
"import": "./dist/consent/index.js",
|
|
42
|
-
"require": "./dist/consent/index.cjs"
|
|
43
|
-
},
|
|
44
|
-
"./legal": {
|
|
45
|
-
"types": "./dist/legal/index.d.ts",
|
|
46
|
-
"import": "./dist/legal/index.js",
|
|
47
|
-
"require": "./dist/legal/index.cjs"
|
|
48
|
-
},
|
|
49
|
-
"./webhooks": {
|
|
50
|
-
"types": "./dist/webhooks/index.d.ts",
|
|
51
|
-
"import": "./dist/webhooks/index.js",
|
|
52
|
-
"require": "./dist/webhooks/index.cjs"
|
|
53
|
-
},
|
|
54
|
-
"./announcements": {
|
|
55
|
-
"types": "./dist/announcements/index.d.ts",
|
|
56
|
-
"import": "./dist/announcements/index.js",
|
|
57
|
-
"require": "./dist/announcements/index.cjs"
|
|
58
|
-
},
|
|
59
|
-
"./agency": {
|
|
60
|
-
"types": "./dist/agency/index.d.ts",
|
|
61
|
-
"import": "./dist/agency/index.js",
|
|
62
|
-
"require": "./dist/agency/index.cjs"
|
|
63
|
-
},
|
|
64
|
-
"./server": {
|
|
65
|
-
"types": "./dist/server/index.d.ts",
|
|
66
|
-
"import": "./dist/server/index.js",
|
|
67
|
-
"require": "./dist/server/index.cjs"
|
|
68
|
-
},
|
|
69
|
-
"./server/test": {
|
|
70
|
-
"types": "./dist/server/test/index.d.ts",
|
|
71
|
-
"import": "./dist/server/test/index.js",
|
|
72
|
-
"require": "./dist/server/test/index.cjs"
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
"files": [
|
|
76
|
-
"dist",
|
|
77
|
-
"README.md"
|
|
78
|
-
],
|
|
79
|
-
"sideEffects": false,
|
|
80
|
-
"scripts": {
|
|
81
|
-
"build": "rimraf dist && tsup",
|
|
82
|
-
"dev": "tsup --watch",
|
|
83
|
-
"type-check": "tsc --noEmit",
|
|
84
|
-
"lint": "eslint src",
|
|
85
|
-
"lint:fix": "eslint src --fix",
|
|
86
|
-
"test": "vitest run",
|
|
87
|
-
"test:watch": "vitest",
|
|
88
|
-
"test:coverage": "vitest run --coverage",
|
|
89
|
-
"prepublishOnly": "npm run build",
|
|
90
|
-
"sdk:publish": "./scripts/publish.sh"
|
|
91
|
-
},
|
|
92
|
-
"dependencies": {
|
|
93
|
-
"jose": "^6.0.0",
|
|
94
|
-
"zod": "^4.4.3"
|
|
95
|
-
},
|
|
96
|
-
"peerDependencies": {
|
|
97
|
-
"react": "^18.0.0 || ^19.0.0",
|
|
98
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
99
|
-
},
|
|
100
|
-
"peerDependenciesMeta": {
|
|
101
|
-
"react": {
|
|
102
|
-
"optional": true
|
|
103
|
-
},
|
|
104
|
-
"react-dom": {
|
|
105
|
-
"optional": true
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
"devDependencies": {
|
|
109
|
-
"@testing-library/jest-dom": "^6.0.0",
|
|
110
|
-
"@testing-library/react": "^16.0.0",
|
|
111
|
-
"@types/node": "^22.19.17",
|
|
112
|
-
"@types/react": "^19.0.0",
|
|
113
|
-
"@types/react-dom": "^19.0.0",
|
|
114
|
-
"@typescript-eslint/eslint-plugin": "^8.58.0",
|
|
115
|
-
"@typescript-eslint/parser": "^8.58.0",
|
|
116
|
-
"eslint-plugin-react-hooks": "^7.0.1",
|
|
117
|
-
"jsdom": "^27.0.0",
|
|
118
|
-
"react": "^19.0.0",
|
|
119
|
-
"react-dom": "^19.0.0",
|
|
120
|
-
"rimraf": "^6.1.2",
|
|
121
|
-
"tsup": "^8.0.0",
|
|
122
|
-
"typescript": "^5.0.0",
|
|
123
|
-
"vitest": "^4.0.0"
|
|
124
|
-
},
|
|
125
|
-
"engines": {
|
|
126
|
-
"node": ">=18.0.0"
|
|
127
|
-
},
|
|
128
|
-
"publishConfig": {
|
|
129
|
-
"access": "public"
|
|
130
|
-
}
|
|
131
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@feelflow/ffid-sdk",
|
|
3
|
+
"version": "10.0.0",
|
|
4
|
+
"description": "FeelFlow ID Platform SDK for React/Next.js applications",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"feelflow",
|
|
7
|
+
"ffid",
|
|
8
|
+
"sdk",
|
|
9
|
+
"react",
|
|
10
|
+
"nextjs",
|
|
11
|
+
"authentication"
|
|
12
|
+
],
|
|
13
|
+
"author": "FeelFlow <dev@feelflow.net>",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"homepage": "https://github.com/feel-flow/feelflow-id-platform/tree/develop/sdk/typescript#readme",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/feel-flow/feelflow-id-platform/issues"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/feel-flow/feelflow-id-platform.git",
|
|
22
|
+
"directory": "sdk/typescript"
|
|
23
|
+
},
|
|
24
|
+
"type": "module",
|
|
25
|
+
"main": "./dist/index.cjs",
|
|
26
|
+
"module": "./dist/index.js",
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"import": "./dist/index.js",
|
|
32
|
+
"require": "./dist/index.cjs"
|
|
33
|
+
},
|
|
34
|
+
"./components": {
|
|
35
|
+
"types": "./dist/components/index.d.ts",
|
|
36
|
+
"import": "./dist/components/index.js",
|
|
37
|
+
"require": "./dist/components/index.cjs"
|
|
38
|
+
},
|
|
39
|
+
"./consent": {
|
|
40
|
+
"types": "./dist/consent/index.d.ts",
|
|
41
|
+
"import": "./dist/consent/index.js",
|
|
42
|
+
"require": "./dist/consent/index.cjs"
|
|
43
|
+
},
|
|
44
|
+
"./legal": {
|
|
45
|
+
"types": "./dist/legal/index.d.ts",
|
|
46
|
+
"import": "./dist/legal/index.js",
|
|
47
|
+
"require": "./dist/legal/index.cjs"
|
|
48
|
+
},
|
|
49
|
+
"./webhooks": {
|
|
50
|
+
"types": "./dist/webhooks/index.d.ts",
|
|
51
|
+
"import": "./dist/webhooks/index.js",
|
|
52
|
+
"require": "./dist/webhooks/index.cjs"
|
|
53
|
+
},
|
|
54
|
+
"./announcements": {
|
|
55
|
+
"types": "./dist/announcements/index.d.ts",
|
|
56
|
+
"import": "./dist/announcements/index.js",
|
|
57
|
+
"require": "./dist/announcements/index.cjs"
|
|
58
|
+
},
|
|
59
|
+
"./agency": {
|
|
60
|
+
"types": "./dist/agency/index.d.ts",
|
|
61
|
+
"import": "./dist/agency/index.js",
|
|
62
|
+
"require": "./dist/agency/index.cjs"
|
|
63
|
+
},
|
|
64
|
+
"./server": {
|
|
65
|
+
"types": "./dist/server/index.d.ts",
|
|
66
|
+
"import": "./dist/server/index.js",
|
|
67
|
+
"require": "./dist/server/index.cjs"
|
|
68
|
+
},
|
|
69
|
+
"./server/test": {
|
|
70
|
+
"types": "./dist/server/test/index.d.ts",
|
|
71
|
+
"import": "./dist/server/test/index.js",
|
|
72
|
+
"require": "./dist/server/test/index.cjs"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"files": [
|
|
76
|
+
"dist",
|
|
77
|
+
"README.md"
|
|
78
|
+
],
|
|
79
|
+
"sideEffects": false,
|
|
80
|
+
"scripts": {
|
|
81
|
+
"build": "rimraf dist && tsup",
|
|
82
|
+
"dev": "tsup --watch",
|
|
83
|
+
"type-check": "tsc --noEmit",
|
|
84
|
+
"lint": "eslint src",
|
|
85
|
+
"lint:fix": "eslint src --fix",
|
|
86
|
+
"test": "vitest run",
|
|
87
|
+
"test:watch": "vitest",
|
|
88
|
+
"test:coverage": "vitest run --coverage",
|
|
89
|
+
"prepublishOnly": "npm run build",
|
|
90
|
+
"sdk:publish": "./scripts/publish.sh"
|
|
91
|
+
},
|
|
92
|
+
"dependencies": {
|
|
93
|
+
"jose": "^6.0.0",
|
|
94
|
+
"zod": "^4.4.3"
|
|
95
|
+
},
|
|
96
|
+
"peerDependencies": {
|
|
97
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
98
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
99
|
+
},
|
|
100
|
+
"peerDependenciesMeta": {
|
|
101
|
+
"react": {
|
|
102
|
+
"optional": true
|
|
103
|
+
},
|
|
104
|
+
"react-dom": {
|
|
105
|
+
"optional": true
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"devDependencies": {
|
|
109
|
+
"@testing-library/jest-dom": "^6.0.0",
|
|
110
|
+
"@testing-library/react": "^16.0.0",
|
|
111
|
+
"@types/node": "^22.19.17",
|
|
112
|
+
"@types/react": "^19.0.0",
|
|
113
|
+
"@types/react-dom": "^19.0.0",
|
|
114
|
+
"@typescript-eslint/eslint-plugin": "^8.58.0",
|
|
115
|
+
"@typescript-eslint/parser": "^8.58.0",
|
|
116
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
117
|
+
"jsdom": "^27.0.0",
|
|
118
|
+
"react": "^19.0.0",
|
|
119
|
+
"react-dom": "^19.0.0",
|
|
120
|
+
"rimraf": "^6.1.2",
|
|
121
|
+
"tsup": "^8.0.0",
|
|
122
|
+
"typescript": "^5.0.0",
|
|
123
|
+
"vitest": "^4.0.0"
|
|
124
|
+
},
|
|
125
|
+
"engines": {
|
|
126
|
+
"node": ">=18.0.0"
|
|
127
|
+
},
|
|
128
|
+
"publishConfig": {
|
|
129
|
+
"access": "public"
|
|
130
|
+
}
|
|
131
|
+
}
|