@seliseblocks/client 0.1.1 → 0.1.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.
@@ -0,0 +1,18 @@
1
+ export type BlocksSendMailRequest = {
2
+ attachments?: string[];
3
+ bcc?: string[];
4
+ bodyDataContext?: Record<string, string>;
5
+ cc?: string[];
6
+ language?: string;
7
+ /** Defaults to the tenant's `x-blocks-key` on the server side when omitted. */
8
+ projectKey?: string;
9
+ purpose?: string;
10
+ replyTo?: string[];
11
+ sendPhoneNumberAsEmail?: boolean;
12
+ subjectDataContext?: Record<string, string>;
13
+ to?: string[];
14
+ };
15
+ export type BlocksSendMailToAnyRequest = BlocksSendMailRequest & {
16
+ isTestMail?: boolean;
17
+ };
18
+ export type BlocksMailPassThroughResponse = Record<string, unknown>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,89 @@
1
+ import { BlocksHttpClient } from "../http/http-client.js";
2
+ import { BlocksMfaBackupCodeUseRequest, BlocksMfaConfig, BlocksMfaConfigSaveRequest, BlocksMfaGenerateRequest, BlocksMfaPassThroughResponse, BlocksMfaResendRequest, BlocksMfaSetMethodRequest, BlocksMfaVerifyRequest, BlocksMfaVerifyTotpSetupRequest } from "./types.js";
3
+ /**
4
+ * MFA surface: enroll, verify, switch, or disable the signed-in user's own MFA and manage
5
+ * their own backup codes, plus `saveConfig` for the tenant-wide MFA policy. Like
6
+ * `identityProviders`/`config`/`clientCredentials` on `BlocksAuthenticationClient`, `saveConfig`
7
+ * is an admin/tenant-settings action -- IAM enforces the required role, the SDK does not gate it.
8
+ */
9
+ export declare class BlocksMfaClient {
10
+ private readonly http;
11
+ constructor(http: BlocksHttpClient);
12
+ /**
13
+ * What: reads the tenant's current MFA policy through `GET /iam/v4/mfa/config`.
14
+ * Why: consumer apps can check whether MFA is enabled/required before prompting enrollment.
15
+ * How: call with an authorized token; the SDK returns IAM's policy shape as-is.
16
+ */
17
+ config(): Promise<BlocksMfaConfig>;
18
+ /**
19
+ * What: saves the tenant's MFA policy through `POST /iam/v4/mfa/config`.
20
+ * Why: tenant admin/settings screens need to turn MFA on/off, require it for specific roles,
21
+ * or configure backup codes -- this is not a user self-service action.
22
+ * How: pass IAM's full config payload with an authorized, sufficiently-privileged token.
23
+ */
24
+ saveConfig(request: BlocksMfaConfigSaveRequest): Promise<BlocksMfaPassThroughResponse>;
25
+ readonly totp: {
26
+ /**
27
+ * What: starts TOTP enrollment through `POST /iam/v4/mfa/totp/setup`.
28
+ * Why: authenticator-app enrollment needs a secret/QR payload from IAM before the user can scan it.
29
+ * How: call for the signed-in user, then render IAM's returned secret/QR data in your enrollment UI.
30
+ */
31
+ setup: () => Promise<BlocksMfaPassThroughResponse>;
32
+ /**
33
+ * What: confirms TOTP enrollment through `POST /iam/v4/mfa/totp/verify-setup`.
34
+ * Why: IAM must confirm the user's authenticator app is correctly configured before enabling TOTP.
35
+ * How: pass the 6-digit `code` the user typed from their authenticator app.
36
+ */
37
+ verifySetup: (request: BlocksMfaVerifyTotpSetupRequest) => Promise<BlocksMfaPassThroughResponse>;
38
+ };
39
+ /**
40
+ * What: sends an OTP challenge through `POST /iam/v4/mfa/generate`.
41
+ * Why: email/SMS-based MFA needs IAM to issue and deliver a one-time code before verification.
42
+ * How: pass the target `mfaType`; IAM returns an `mfaId` to pass to `verify`/`resend`.
43
+ */
44
+ generate(request: BlocksMfaGenerateRequest): Promise<BlocksMfaPassThroughResponse>;
45
+ /**
46
+ * What: resends a pending OTP through `POST /iam/v4/mfa/resend`.
47
+ * Why: users may not receive the first code (SMS delay, spam filtering) and need a retry.
48
+ * How: pass the `mfaId` returned from `generate`.
49
+ */
50
+ resend(request: BlocksMfaResendRequest): Promise<BlocksMfaPassThroughResponse>;
51
+ /**
52
+ * What: verifies an OTP or step-up challenge through `POST /iam/v4/mfa/verify`.
53
+ * Why: login and sensitive in-app actions need this to confirm the code the user entered.
54
+ * How: pass `mfaId`, `verificationCode`, and `authType`; set `isFromTokenCall` when verifying as part of a token/login exchange rather than a standalone check.
55
+ */
56
+ verify(request: BlocksMfaVerifyRequest): Promise<BlocksMfaPassThroughResponse>;
57
+ /**
58
+ * What: sets the signed-in user's active MFA method through `PUT /iam/v4/mfa/method`.
59
+ * Why: users who have enrolled more than one method need to switch which one is active.
60
+ * How: pass the `mfaType` to activate; enroll it first (e.g. via `totp.setup`/`verifySetup`) if it isn't already.
61
+ */
62
+ setMethod(request: BlocksMfaSetMethodRequest): Promise<BlocksMfaPassThroughResponse>;
63
+ /**
64
+ * What: disables MFA for the signed-in user through `POST /iam/v4/mfa/disable`.
65
+ * Why: users need a self-service way to turn MFA off when the tenant's policy allows opt-out.
66
+ * How: call with an authorized token; IAM enforces whether opt-out is permitted for this tenant/role.
67
+ */
68
+ disable(): Promise<BlocksMfaPassThroughResponse>;
69
+ readonly backupCodes: {
70
+ /**
71
+ * What: lists the signed-in user's backup codes through `GET /iam/v4/mfa/backup-codes`.
72
+ * Why: account-security screens need to show how many unused recovery codes remain.
73
+ * How: call with an authorized token.
74
+ */
75
+ list: () => Promise<BlocksMfaPassThroughResponse>;
76
+ /**
77
+ * What: generates a fresh set of backup codes through `POST /iam/v4/mfa/backup-codes/generate`.
78
+ * Why: users need recovery codes for when their primary MFA method is unavailable.
79
+ * How: call once TOTP/OTP is enrolled; treat the response as sensitive and show it to the user only once.
80
+ */
81
+ generate: () => Promise<BlocksMfaPassThroughResponse>;
82
+ /**
83
+ * What: consumes one backup code through `POST /iam/v4/mfa/backup-codes/use`.
84
+ * Why: lets a user complete login/step-up when their primary MFA method is unavailable.
85
+ * How: pass the signed-in `userId` and the backup `code` the user entered; each code is single-use.
86
+ */
87
+ use: (request: BlocksMfaBackupCodeUseRequest) => Promise<BlocksMfaPassThroughResponse>;
88
+ };
89
+ }
@@ -0,0 +1,107 @@
1
+ const MFA_API = "/iam/v4/mfa";
2
+ /**
3
+ * MFA surface: enroll, verify, switch, or disable the signed-in user's own MFA and manage
4
+ * their own backup codes, plus `saveConfig` for the tenant-wide MFA policy. Like
5
+ * `identityProviders`/`config`/`clientCredentials` on `BlocksAuthenticationClient`, `saveConfig`
6
+ * is an admin/tenant-settings action -- IAM enforces the required role, the SDK does not gate it.
7
+ */
8
+ export class BlocksMfaClient {
9
+ http;
10
+ constructor(http) {
11
+ this.http = http;
12
+ }
13
+ /**
14
+ * What: reads the tenant's current MFA policy through `GET /iam/v4/mfa/config`.
15
+ * Why: consumer apps can check whether MFA is enabled/required before prompting enrollment.
16
+ * How: call with an authorized token; the SDK returns IAM's policy shape as-is.
17
+ */
18
+ config() {
19
+ return this.http.request(`${MFA_API}/config`);
20
+ }
21
+ /**
22
+ * What: saves the tenant's MFA policy through `POST /iam/v4/mfa/config`.
23
+ * Why: tenant admin/settings screens need to turn MFA on/off, require it for specific roles,
24
+ * or configure backup codes -- this is not a user self-service action.
25
+ * How: pass IAM's full config payload with an authorized, sufficiently-privileged token.
26
+ */
27
+ saveConfig(request) {
28
+ return this.http.request(`${MFA_API}/config`, { body: request });
29
+ }
30
+ totp = {
31
+ /**
32
+ * What: starts TOTP enrollment through `POST /iam/v4/mfa/totp/setup`.
33
+ * Why: authenticator-app enrollment needs a secret/QR payload from IAM before the user can scan it.
34
+ * How: call for the signed-in user, then render IAM's returned secret/QR data in your enrollment UI.
35
+ */
36
+ setup: () => this.http.request(`${MFA_API}/totp/setup`, { method: "POST" }),
37
+ /**
38
+ * What: confirms TOTP enrollment through `POST /iam/v4/mfa/totp/verify-setup`.
39
+ * Why: IAM must confirm the user's authenticator app is correctly configured before enabling TOTP.
40
+ * How: pass the 6-digit `code` the user typed from their authenticator app.
41
+ */
42
+ verifySetup: (request) => this.http.request(`${MFA_API}/totp/verify-setup`, { body: request })
43
+ };
44
+ /**
45
+ * What: sends an OTP challenge through `POST /iam/v4/mfa/generate`.
46
+ * Why: email/SMS-based MFA needs IAM to issue and deliver a one-time code before verification.
47
+ * How: pass the target `mfaType`; IAM returns an `mfaId` to pass to `verify`/`resend`.
48
+ */
49
+ generate(request) {
50
+ return this.http.request(`${MFA_API}/generate`, { body: request });
51
+ }
52
+ /**
53
+ * What: resends a pending OTP through `POST /iam/v4/mfa/resend`.
54
+ * Why: users may not receive the first code (SMS delay, spam filtering) and need a retry.
55
+ * How: pass the `mfaId` returned from `generate`.
56
+ */
57
+ resend(request) {
58
+ return this.http.request(`${MFA_API}/resend`, { body: request });
59
+ }
60
+ /**
61
+ * What: verifies an OTP or step-up challenge through `POST /iam/v4/mfa/verify`.
62
+ * Why: login and sensitive in-app actions need this to confirm the code the user entered.
63
+ * How: pass `mfaId`, `verificationCode`, and `authType`; set `isFromTokenCall` when verifying as part of a token/login exchange rather than a standalone check.
64
+ */
65
+ verify(request) {
66
+ return this.http.request(`${MFA_API}/verify`, { body: request });
67
+ }
68
+ /**
69
+ * What: sets the signed-in user's active MFA method through `PUT /iam/v4/mfa/method`.
70
+ * Why: users who have enrolled more than one method need to switch which one is active.
71
+ * How: pass the `mfaType` to activate; enroll it first (e.g. via `totp.setup`/`verifySetup`) if it isn't already.
72
+ */
73
+ setMethod(request) {
74
+ return this.http.request(`${MFA_API}/method`, {
75
+ body: request,
76
+ method: "PUT"
77
+ });
78
+ }
79
+ /**
80
+ * What: disables MFA for the signed-in user through `POST /iam/v4/mfa/disable`.
81
+ * Why: users need a self-service way to turn MFA off when the tenant's policy allows opt-out.
82
+ * How: call with an authorized token; IAM enforces whether opt-out is permitted for this tenant/role.
83
+ */
84
+ disable() {
85
+ return this.http.request(`${MFA_API}/disable`, { method: "POST" });
86
+ }
87
+ backupCodes = {
88
+ /**
89
+ * What: lists the signed-in user's backup codes through `GET /iam/v4/mfa/backup-codes`.
90
+ * Why: account-security screens need to show how many unused recovery codes remain.
91
+ * How: call with an authorized token.
92
+ */
93
+ list: () => this.http.request(`${MFA_API}/backup-codes`),
94
+ /**
95
+ * What: generates a fresh set of backup codes through `POST /iam/v4/mfa/backup-codes/generate`.
96
+ * Why: users need recovery codes for when their primary MFA method is unavailable.
97
+ * How: call once TOTP/OTP is enrolled; treat the response as sensitive and show it to the user only once.
98
+ */
99
+ generate: () => this.http.request(`${MFA_API}/backup-codes/generate`, { method: "POST" }),
100
+ /**
101
+ * What: consumes one backup code through `POST /iam/v4/mfa/backup-codes/use`.
102
+ * Why: lets a user complete login/step-up when their primary MFA method is unavailable.
103
+ * How: pass the signed-in `userId` and the backup `code` the user entered; each code is single-use.
104
+ */
105
+ use: (request) => this.http.request(`${MFA_API}/backup-codes/use`, { body: request })
106
+ };
107
+ }
@@ -0,0 +1,48 @@
1
+ export type BlocksMfaConfig = Record<string, unknown> & {
2
+ allowBackupCodes?: boolean;
3
+ allowUserOptOut?: boolean;
4
+ backupCodesCount?: number;
5
+ enableMfa?: boolean;
6
+ requireMfaForAllUsers?: boolean;
7
+ userMfaType?: number[];
8
+ };
9
+ export type BlocksMfaConfigSaveRequest = Record<string, unknown> & {
10
+ allowBackupCodes?: boolean;
11
+ allowUserOptOut?: boolean;
12
+ backupCodesCount?: number;
13
+ enableMfa?: boolean;
14
+ mfaExemptRoles?: string[];
15
+ mfaRequiredRoles?: string[];
16
+ mfaTemplate?: {
17
+ templateId?: string;
18
+ templateName?: string;
19
+ };
20
+ requireMfaForAllUsers?: boolean;
21
+ userMfaType?: number[];
22
+ };
23
+ export type BlocksMfaGenerateRequest = {
24
+ /** IAM-defined numeric MFA method (its enum names aren't in the swagger contract -- treat as opaque). */
25
+ mfaType: number;
26
+ sendPhoneNumberAsEmailDomain?: string;
27
+ };
28
+ export type BlocksMfaResendRequest = {
29
+ mfaId: string;
30
+ sendPhoneNumberAsEmailDomain?: string;
31
+ };
32
+ export type BlocksMfaVerifyRequest = {
33
+ authType: number;
34
+ isFromTokenCall?: boolean;
35
+ mfaId: string;
36
+ verificationCode: string;
37
+ };
38
+ export type BlocksMfaSetMethodRequest = {
39
+ mfaType: number;
40
+ };
41
+ export type BlocksMfaVerifyTotpSetupRequest = {
42
+ code: string;
43
+ };
44
+ export type BlocksMfaBackupCodeUseRequest = {
45
+ code: string;
46
+ userId: string;
47
+ };
48
+ export type BlocksMfaPassThroughResponse = Record<string, unknown>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,43 @@
1
+ import { BlocksHttpClient } from "../http/http-client.js";
2
+ import { BlocksGetNotificationsOptions, BlocksGetNotificationsResponse, BlocksGetUnreadNotificationsBySubscriptionFilterRequest, BlocksMarkNotificationAsReadRequest, BlocksNotifierPassThroughResponse, BlocksNotifyRequest, BlocksOfflineNotification } from "./types.js";
3
+ /**
4
+ * Real-time/offline notification surface: push a notification to specific users, roles, or
5
+ * subscription-filter matches, and read/manage the signed-in user's own notification inbox.
6
+ * Tenant-wide notification *channel configuration* (Notification/Save etc., under
7
+ * `BlocksIAMClient`/CLI `notification` commands) is a separate, admin-facing concern.
8
+ */
9
+ export declare class BlocksNotifierClient {
10
+ private readonly http;
11
+ constructor(http: BlocksHttpClient);
12
+ /**
13
+ * What: pushes a notification through `POST /logic/v4/Notifier/Notify`.
14
+ * Why: app code needs to notify specific users/roles, or everyone subscribed to a filter, in real time with an offline/persisted fallback.
15
+ * How: target with at least one of `userIds`/`roles`/`subscriptionFilters`; set `saveDenormalizedPayloadAsAnObject` if `denormalizedPayload` is a JSON string clients should receive parsed.
16
+ */
17
+ notify(request: BlocksNotifyRequest): Promise<BlocksNotifierPassThroughResponse>;
18
+ /**
19
+ * What: reads unread notifications matching a subscription filter through `GET /logic/v4/Notifier/GetUnreadNotificationsBySubscriptionFilter`.
20
+ * Why: clients that subscribe by filter (rather than by user id) need to catch up on what they missed while offline.
21
+ * How: pass `userId` and the same `subscriptionFilterData` shape used with `notify`. Swagger documents this endpoint
22
+ * as GET with a JSON body, which the Fetch spec forbids -- the SDK sends the same fields as a flattened query string instead.
23
+ */
24
+ getUnreadNotificationsBySubscriptionFilter(request: BlocksGetUnreadNotificationsBySubscriptionFilterRequest): Promise<BlocksOfflineNotification[]>;
25
+ /**
26
+ * What: lists the signed-in user's notifications through `GET /logic/v4/Notifier/GetNotifications`.
27
+ * Why: notification-inbox UIs need paged, sortable, filterable access plus unread/total counts.
28
+ * How: pass paging/sort/filter options; omit them for the API's defaults.
29
+ */
30
+ getNotifications(options?: BlocksGetNotificationsOptions): Promise<BlocksGetNotificationsResponse>;
31
+ /**
32
+ * What: marks every notification read through `POST /logic/v4/Notifier/MarkAllNotificationAsRead`.
33
+ * Why: inbox UIs offer a bulk "mark all as read" action.
34
+ * How: call with an authorized token for the signed-in user.
35
+ */
36
+ markAllNotificationAsRead(): Promise<BlocksNotifierPassThroughResponse>;
37
+ /**
38
+ * What: marks one notification read through `POST /logic/v4/Notifier/MarkNotificationAsRead`.
39
+ * Why: inbox UIs mark individual notifications read as the user views them.
40
+ * How: pass the notification's `id`.
41
+ */
42
+ markNotificationAsRead(request: BlocksMarkNotificationAsReadRequest): Promise<BlocksNotifierPassThroughResponse>;
43
+ }
@@ -0,0 +1,71 @@
1
+ const NOTIFIER_API = "/logic/v4/Notifier";
2
+ /**
3
+ * Real-time/offline notification surface: push a notification to specific users, roles, or
4
+ * subscription-filter matches, and read/manage the signed-in user's own notification inbox.
5
+ * Tenant-wide notification *channel configuration* (Notification/Save etc., under
6
+ * `BlocksIAMClient`/CLI `notification` commands) is a separate, admin-facing concern.
7
+ */
8
+ export class BlocksNotifierClient {
9
+ http;
10
+ constructor(http) {
11
+ this.http = http;
12
+ }
13
+ /**
14
+ * What: pushes a notification through `POST /logic/v4/Notifier/Notify`.
15
+ * Why: app code needs to notify specific users/roles, or everyone subscribed to a filter, in real time with an offline/persisted fallback.
16
+ * How: target with at least one of `userIds`/`roles`/`subscriptionFilters`; set `saveDenormalizedPayloadAsAnObject` if `denormalizedPayload` is a JSON string clients should receive parsed.
17
+ */
18
+ notify(request) {
19
+ return this.http.request(`${NOTIFIER_API}/Notify`, { body: request });
20
+ }
21
+ /**
22
+ * What: reads unread notifications matching a subscription filter through `GET /logic/v4/Notifier/GetUnreadNotificationsBySubscriptionFilter`.
23
+ * Why: clients that subscribe by filter (rather than by user id) need to catch up on what they missed while offline.
24
+ * How: pass `userId` and the same `subscriptionFilterData` shape used with `notify`. Swagger documents this endpoint
25
+ * as GET with a JSON body, which the Fetch spec forbids -- the SDK sends the same fields as a flattened query string instead.
26
+ */
27
+ getUnreadNotificationsBySubscriptionFilter(request) {
28
+ return this.http.request(`${NOTIFIER_API}/GetUnreadNotificationsBySubscriptionFilter`, {
29
+ query: {
30
+ OrderBy: request.orderBy,
31
+ "SubscriptionFilterData.ActionName": request.subscriptionFilterData?.actionName,
32
+ "SubscriptionFilterData.Context": request.subscriptionFilterData?.context,
33
+ "SubscriptionFilterData.Value": request.subscriptionFilterData?.value,
34
+ UserId: request.userId
35
+ }
36
+ });
37
+ }
38
+ /**
39
+ * What: lists the signed-in user's notifications through `GET /logic/v4/Notifier/GetNotifications`.
40
+ * Why: notification-inbox UIs need paged, sortable, filterable access plus unread/total counts.
41
+ * How: pass paging/sort/filter options; omit them for the API's defaults.
42
+ */
43
+ getNotifications(options = {}) {
44
+ return this.http.request(`${NOTIFIER_API}/GetNotifications`, {
45
+ query: {
46
+ Filter: options.filter,
47
+ IsUnreadOnly: options.isUnreadOnly,
48
+ Page: options.page,
49
+ PageSize: options.pageSize,
50
+ "Sort.IsDescending": options.sortDescending,
51
+ "Sort.Property": options.sortBy
52
+ }
53
+ });
54
+ }
55
+ /**
56
+ * What: marks every notification read through `POST /logic/v4/Notifier/MarkAllNotificationAsRead`.
57
+ * Why: inbox UIs offer a bulk "mark all as read" action.
58
+ * How: call with an authorized token for the signed-in user.
59
+ */
60
+ markAllNotificationAsRead() {
61
+ return this.http.request(`${NOTIFIER_API}/MarkAllNotificationAsRead`, { method: "POST" });
62
+ }
63
+ /**
64
+ * What: marks one notification read through `POST /logic/v4/Notifier/MarkNotificationAsRead`.
65
+ * Why: inbox UIs mark individual notifications read as the user views them.
66
+ * How: pass the notification's `id`.
67
+ */
68
+ markNotificationAsRead(request) {
69
+ return this.http.request(`${NOTIFIER_API}/MarkNotificationAsRead`, { body: request });
70
+ }
71
+ }
@@ -0,0 +1,50 @@
1
+ export type BlocksNotifierSubscriptionFilter = {
2
+ actionName?: string;
3
+ context?: string;
4
+ value?: string;
5
+ };
6
+ export type BlocksNotifyRequest = {
7
+ configurationName?: string;
8
+ connectionId?: string;
9
+ contentAvailable?: boolean;
10
+ denormalizedPayload?: string;
11
+ responseKey?: string;
12
+ responseValue?: string;
13
+ roles?: string[];
14
+ saveDenormalizedPayloadAsAnObject?: boolean;
15
+ subscriptionFilters?: BlocksNotifierSubscriptionFilter[];
16
+ userIds?: string[];
17
+ };
18
+ export type BlocksGetUnreadNotificationsBySubscriptionFilterRequest = {
19
+ /** IAM/Notifier-defined order enum (its meanings aren't in the swagger contract -- treat as opaque). */
20
+ orderBy?: 1 | 2;
21
+ subscriptionFilterData?: BlocksNotifierSubscriptionFilter;
22
+ userId?: string;
23
+ };
24
+ export type BlocksGetNotificationsOptions = {
25
+ filter?: string;
26
+ isUnreadOnly?: boolean;
27
+ page?: number;
28
+ pageSize?: number;
29
+ sortBy?: string;
30
+ sortDescending?: boolean;
31
+ };
32
+ export type BlocksOfflineNotification = Record<string, unknown> & {
33
+ correlationId?: string;
34
+ createdTime?: string;
35
+ denormalizedPayload?: string;
36
+ id?: string;
37
+ isRead?: boolean;
38
+ payload?: string;
39
+ readByRoles?: string[];
40
+ readByUserIds?: string[];
41
+ };
42
+ export type BlocksGetNotificationsResponse = {
43
+ notifications: Record<string, unknown>[];
44
+ totalNotificationsCount: number;
45
+ unReadNotificationsCount: number;
46
+ };
47
+ export type BlocksMarkNotificationAsReadRequest = {
48
+ id: string;
49
+ };
50
+ export type BlocksNotifierPassThroughResponse = Record<string, unknown>;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,48 +1,48 @@
1
- {
2
- "name": "@seliseblocks/client",
3
- "version": "0.1.1",
4
- "description": "Framework-neutral TypeScript client SDK for SELISE Blocks frontend applications.",
5
- "license": "MIT",
6
- "type": "module",
7
- "keywords": [
8
- "selise",
9
- "blocks",
10
- "sdk",
11
- "typescript",
12
- "frontend"
13
- ],
14
- "main": "./dist/index.js",
15
- "types": "./dist/index.d.ts",
16
- "exports": {
17
- ".": {
18
- "types": "./dist/index.d.ts",
19
- "import": "./dist/index.js"
20
- },
21
- "./package.json": "./package.json"
22
- },
23
- "publishConfig": {
24
- "access": "public"
25
- },
26
- "sideEffects": false,
27
- "files": [
28
- "dist",
29
- "README.md",
30
- "AI_USAGE_GUIDE.md",
31
- "LICENSE"
32
- ],
33
- "scripts": {
34
- "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
35
- "build": "npm run clean && tsc -p tsconfig.json",
36
- "lint": "tsc -p tsconfig.json --noEmit",
37
- "test": "npm run build && node --test test/*.test.mjs",
38
- "prepack": "npm run build",
39
- "prepublishOnly": "npm test"
40
- },
41
- "engines": {
42
- "node": ">=20"
43
- },
44
- "devDependencies": {
45
- "@types/node": "^22.0.0",
46
- "typescript": "^5.5.0"
47
- }
48
- }
1
+ {
2
+ "name": "@seliseblocks/client",
3
+ "version": "0.1.3",
4
+ "description": "Framework-neutral TypeScript client SDK for SELISE Blocks frontend applications.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "keywords": [
8
+ "selise",
9
+ "blocks",
10
+ "sdk",
11
+ "typescript",
12
+ "frontend"
13
+ ],
14
+ "main": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.js"
20
+ },
21
+ "./package.json": "./package.json"
22
+ },
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "sideEffects": false,
27
+ "files": [
28
+ "dist",
29
+ "README.md",
30
+ "AI_USAGE_GUIDE.md",
31
+ "LICENSE"
32
+ ],
33
+ "scripts": {
34
+ "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
35
+ "build": "npm run clean && tsc -p tsconfig.json",
36
+ "lint": "tsc -p tsconfig.json --noEmit",
37
+ "test": "npm run build && node --test test/*.test.mjs",
38
+ "prepack": "npm run build",
39
+ "prepublishOnly": "npm test"
40
+ },
41
+ "engines": {
42
+ "node": ">=20"
43
+ },
44
+ "devDependencies": {
45
+ "@types/node": "^22.0.0",
46
+ "typescript": "^5.5.0"
47
+ }
48
+ }