@carlonicora/nextjs-jsonapi 3.22.0 → 3.24.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/{AssistantMessageInterface-CuaMDs2i.d.ts → AssistantMessageInterface-1Kbz8RVs.d.ts} +34 -1
- package/dist/{AssistantMessageInterface-Du3ShThp.d.mts → AssistantMessageInterface-CoxJyuFM.d.mts} +34 -1
- package/dist/{BlockNoteEditor-VEEMWB2J.js → BlockNoteEditor-PTD2V4CH.js} +19 -19
- package/dist/{BlockNoteEditor-VEEMWB2J.js.map → BlockNoteEditor-PTD2V4CH.js.map} +1 -1
- package/dist/{BlockNoteEditor-5QBGVWE7.mjs → BlockNoteEditor-Q2WEDMKJ.mjs} +4 -4
- package/dist/{BlockNoteViewer-ZY4ZF3HO.mjs → BlockNoteViewer-WO6GTDSI.mjs} +2 -2
- package/dist/{BlockNoteViewer-XCGBX4ST.js → BlockNoteViewer-WOXEJ6RM.js} +3 -3
- package/dist/{BlockNoteViewer-XCGBX4ST.js.map → BlockNoteViewer-WOXEJ6RM.js.map} +1 -1
- package/dist/{HandbookSectionInterface-DqU_d0sy.d.mts → HandbookSectionInterface-BYsmnPEz.d.mts} +36 -0
- package/dist/{HandbookSectionInterface-DFj2zErb.d.ts → HandbookSectionInterface-OePKPbqN.d.ts} +36 -0
- package/dist/billing/index.js +401 -401
- package/dist/billing/index.mjs +3 -3
- package/dist/{chunk-CK47KSFV.mjs → chunk-2O3SFHQ7.mjs} +91 -39
- package/dist/chunk-2O3SFHQ7.mjs.map +1 -0
- package/dist/{chunk-SYQMVTIC.js → chunk-3D2MCVRZ.js} +7 -7
- package/dist/{chunk-SYQMVTIC.js.map → chunk-3D2MCVRZ.js.map} +1 -1
- package/dist/{chunk-XYSWOW5G.js → chunk-3YJF7QY4.js} +1358 -1116
- package/dist/chunk-3YJF7QY4.js.map +1 -0
- package/dist/{chunk-5G7I3OUB.mjs → chunk-GJHKOG5L.mjs} +1419 -1177
- package/dist/chunk-GJHKOG5L.mjs.map +1 -0
- package/dist/{chunk-U55JQ4NY.mjs → chunk-HAI7G6MD.mjs} +2 -2
- package/dist/{chunk-MWZCCOTS.js → chunk-IV4DTYXN.js} +91 -39
- package/dist/chunk-IV4DTYXN.js.map +1 -0
- package/dist/client/index.d.mts +13 -2
- package/dist/client/index.d.ts +13 -2
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.d.mts +90 -31
- package/dist/components/index.d.ts +90 -31
- package/dist/components/index.js +8 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +7 -3
- package/dist/contexts/index.d.mts +11 -2
- package/dist/contexts/index.d.ts +11 -2
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.d.mts +29 -7
- package/dist/core/index.d.ts +29 -7
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/features/help/index.js +37 -37
- package/dist/features/help/index.mjs +3 -3
- package/dist/features/tokenusage/index.js +101 -101
- package/dist/features/tokenusage/index.mjs +3 -3
- package/dist/index.d.mts +3 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{oauth.interface-CD90ycYz.d.ts → oauth.interface-BZKZAPRw.d.ts} +8 -1
- package/dist/{oauth.interface-DRE3NAKc.d.mts → oauth.interface-nVwnzxJw.d.mts} +8 -1
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/forms/__tests__/EditorSheet.test.tsx +5 -3
- package/src/core/utils/__tests__/translateResponse.test.ts +3 -1
- package/src/features/ai-connection/components/forms/AiConnectionEditor.tsx +1 -0
- package/src/features/ai-connection/components/lists/AiConnectionTypeCard.tsx +9 -0
- package/src/features/ai-connection/data/__tests__/ai-connection.test.ts +51 -0
- package/src/features/ai-connection/data/ai-connection.interface.ts +18 -0
- package/src/features/ai-connection/data/ai-connection.ts +63 -0
- package/src/features/ai-connection/i18n-keys.ts +9 -0
- package/src/features/assistant/components/containers/AssistantContainer.tsx +105 -36
- package/src/features/assistant/components/containers/__tests__/AssistantContainer.spec.tsx +163 -1
- package/src/features/assistant/components/parts/AssistantComposer.tsx +38 -15
- package/src/features/assistant/components/parts/AssistantEmptyState.tsx +5 -3
- package/src/features/assistant/components/parts/AssistantSidebar.tsx +26 -7
- package/src/features/assistant/components/parts/__tests__/AssistantComposer.spec.tsx +8 -0
- package/src/features/assistant/components/parts/__tests__/AssistantSidebar.spec.tsx +7 -0
- package/src/features/assistant/contexts/AssistantContext.tsx +91 -7
- package/src/features/assistant/contexts/__tests__/AssistantContext.spec.tsx +196 -0
- package/src/features/assistant-action/components/AssistantContainerWithApprovals.tsx +23 -1
- package/src/features/assistant-message/components/EntityMentionLink.tsx +28 -0
- package/src/features/assistant-message/components/__tests__/EntityMentionLink.spec.tsx +58 -0
- package/src/features/assistant-message/components/index.ts +1 -0
- package/src/features/assistant-message/components/parts/tabs/ContentsTab.tsx +1 -1
- package/src/features/assistant-message/components/parts/tabs/ReferencesTab.tsx +2 -2
- package/src/features/auth/components/forms/__tests__/Logout.spec.tsx +3 -2
- package/src/features/oauth/components/OAuthClientForm.tsx +21 -4
- package/src/features/oauth/components/__tests__/OAuthClientForm.spec.tsx +63 -0
- package/src/features/oauth/components/consent/OAuthCompanySelector.tsx +54 -0
- package/src/features/oauth/components/consent/OAuthConsentActions.tsx +5 -2
- package/src/features/oauth/components/consent/OAuthConsentHeader.tsx +10 -6
- package/src/features/oauth/components/consent/OAuthConsentScreen.tsx +33 -13
- package/src/features/oauth/components/consent/OAuthScopeList.tsx +4 -1
- package/src/features/oauth/components/consent/__tests__/OAuthConsentHeader.spec.tsx +25 -0
- package/src/features/oauth/components/consent/__tests__/OAuthConsentScreen.spec.tsx +126 -0
- package/src/features/oauth/components/consent/index.ts +1 -0
- package/src/features/oauth/data/__tests__/oauth.service.spec.ts +103 -0
- package/src/features/oauth/data/oauth.service.ts +3 -13
- package/src/features/oauth/data/oauth.ts +30 -1
- package/src/features/oauth/hooks/useOAuthConsent.ts +34 -3
- package/src/features/oauth/interfaces/oauth.interface.ts +11 -25
- package/src/hooks/__tests__/useDataListRetriever.test.ts +1 -1
- package/dist/AssistantInterface-RvZzlcA_.d.ts +0 -36
- package/dist/AssistantInterface-jL56dyNc.d.mts +0 -36
- package/dist/chunk-5G7I3OUB.mjs.map +0 -1
- package/dist/chunk-CK47KSFV.mjs.map +0 -1
- package/dist/chunk-MWZCCOTS.js.map +0 -1
- package/dist/chunk-XYSWOW5G.js.map +0 -1
- /package/dist/{BlockNoteEditor-5QBGVWE7.mjs.map → BlockNoteEditor-Q2WEDMKJ.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-ZY4ZF3HO.mjs.map → BlockNoteViewer-WO6GTDSI.mjs.map} +0 -0
- /package/dist/{chunk-U55JQ4NY.mjs.map → chunk-HAI7G6MD.mjs.map} +0 -0
package/dist/billing/index.mjs
CHANGED
|
@@ -62,12 +62,12 @@ import {
|
|
|
62
62
|
useCurrentUserContext,
|
|
63
63
|
useDataListRetriever,
|
|
64
64
|
usePageUrlGenerator
|
|
65
|
-
} from "../chunk-
|
|
65
|
+
} from "../chunk-GJHKOG5L.mjs";
|
|
66
66
|
import {
|
|
67
67
|
getRoleId,
|
|
68
68
|
getStripePublishableKey,
|
|
69
69
|
useI18nRouter
|
|
70
|
-
} from "../chunk-
|
|
70
|
+
} from "../chunk-HAI7G6MD.mjs";
|
|
71
71
|
import {
|
|
72
72
|
FeatureService,
|
|
73
73
|
Modules,
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
cn,
|
|
82
82
|
rehydrate,
|
|
83
83
|
showToast
|
|
84
|
-
} from "../chunk-
|
|
84
|
+
} from "../chunk-2O3SFHQ7.mjs";
|
|
85
85
|
import "../chunk-AUXK7QSA.mjs";
|
|
86
86
|
import "../chunk-C7C7VY4F.mjs";
|
|
87
87
|
import "../chunk-BMVA2IM5.mjs";
|
|
@@ -5030,6 +5030,15 @@ var AiConnection = class extends AbstractApiData {
|
|
|
5030
5030
|
_language;
|
|
5031
5031
|
_directFormat;
|
|
5032
5032
|
_directProvider;
|
|
5033
|
+
_costPerImage;
|
|
5034
|
+
_negativePrompt;
|
|
5035
|
+
_width;
|
|
5036
|
+
_height;
|
|
5037
|
+
_steps;
|
|
5038
|
+
_cfgScale;
|
|
5039
|
+
_safeMode;
|
|
5040
|
+
_hideWatermark;
|
|
5041
|
+
_imageFormat;
|
|
5033
5042
|
_hasApiKey;
|
|
5034
5043
|
_hasGoogleCredentials;
|
|
5035
5044
|
_companyId;
|
|
@@ -5102,6 +5111,33 @@ var AiConnection = class extends AbstractApiData {
|
|
|
5102
5111
|
get directProvider() {
|
|
5103
5112
|
return this._directProvider;
|
|
5104
5113
|
}
|
|
5114
|
+
get costPerImage() {
|
|
5115
|
+
return this._costPerImage;
|
|
5116
|
+
}
|
|
5117
|
+
get negativePrompt() {
|
|
5118
|
+
return this._negativePrompt;
|
|
5119
|
+
}
|
|
5120
|
+
get width() {
|
|
5121
|
+
return this._width;
|
|
5122
|
+
}
|
|
5123
|
+
get height() {
|
|
5124
|
+
return this._height;
|
|
5125
|
+
}
|
|
5126
|
+
get steps() {
|
|
5127
|
+
return this._steps;
|
|
5128
|
+
}
|
|
5129
|
+
get cfgScale() {
|
|
5130
|
+
return this._cfgScale;
|
|
5131
|
+
}
|
|
5132
|
+
get safeMode() {
|
|
5133
|
+
return this._safeMode;
|
|
5134
|
+
}
|
|
5135
|
+
get hideWatermark() {
|
|
5136
|
+
return this._hideWatermark;
|
|
5137
|
+
}
|
|
5138
|
+
get imageFormat() {
|
|
5139
|
+
return this._imageFormat;
|
|
5140
|
+
}
|
|
5105
5141
|
get hasApiKey() {
|
|
5106
5142
|
return this._hasApiKey ?? false;
|
|
5107
5143
|
}
|
|
@@ -5137,6 +5173,15 @@ var AiConnection = class extends AbstractApiData {
|
|
|
5137
5173
|
this._language = attributes.language;
|
|
5138
5174
|
this._directFormat = attributes.directFormat;
|
|
5139
5175
|
this._directProvider = attributes.directProvider;
|
|
5176
|
+
this._costPerImage = attributes.costPerImage;
|
|
5177
|
+
this._negativePrompt = attributes.negativePrompt;
|
|
5178
|
+
this._width = attributes.width;
|
|
5179
|
+
this._height = attributes.height;
|
|
5180
|
+
this._steps = attributes.steps;
|
|
5181
|
+
this._cfgScale = attributes.cfgScale;
|
|
5182
|
+
this._safeMode = attributes.safeMode;
|
|
5183
|
+
this._hideWatermark = attributes.hideWatermark;
|
|
5184
|
+
this._imageFormat = attributes.imageFormat;
|
|
5140
5185
|
this._hasApiKey = attributes.hasApiKey;
|
|
5141
5186
|
this._hasGoogleCredentials = attributes.hasGoogleCredentials;
|
|
5142
5187
|
this._companyId = attributes.companyId;
|
|
@@ -5178,7 +5223,16 @@ var AiConnection = class extends AbstractApiData {
|
|
|
5178
5223
|
"directUrl",
|
|
5179
5224
|
"language",
|
|
5180
5225
|
"directFormat",
|
|
5181
|
-
"directProvider"
|
|
5226
|
+
"directProvider",
|
|
5227
|
+
"costPerImage",
|
|
5228
|
+
"negativePrompt",
|
|
5229
|
+
"width",
|
|
5230
|
+
"height",
|
|
5231
|
+
"steps",
|
|
5232
|
+
"cfgScale",
|
|
5233
|
+
"safeMode",
|
|
5234
|
+
"hideWatermark",
|
|
5235
|
+
"imageFormat"
|
|
5182
5236
|
].forEach(setIfDefined);
|
|
5183
5237
|
if (data.apiKey) response.data.attributes.apiKey = data.apiKey;
|
|
5184
5238
|
if (data.googleCredentialsBase64) {
|
|
@@ -8230,6 +8284,33 @@ var OAuthClient = class extends AbstractApiData {
|
|
|
8230
8284
|
if (data.isActive !== void 0) response.data.attributes.isActive = data.isActive;
|
|
8231
8285
|
return response;
|
|
8232
8286
|
}
|
|
8287
|
+
/**
|
|
8288
|
+
* Body for POST /oauth/authorize/approve.
|
|
8289
|
+
* The authorize endpoints speak the RFC 6749 wire format (snake_case keys,
|
|
8290
|
+
* no JSON:API envelope), so this dedicated method owns that shape and the
|
|
8291
|
+
* service sends it with `overridesJsonApiCreation`.
|
|
8292
|
+
*/
|
|
8293
|
+
createApproveAuthorizationJsonApi(params) {
|
|
8294
|
+
return {
|
|
8295
|
+
client_id: params.clientId,
|
|
8296
|
+
redirect_uri: params.redirectUri,
|
|
8297
|
+
scope: params.scope,
|
|
8298
|
+
state: params.state,
|
|
8299
|
+
code_challenge: params.codeChallenge,
|
|
8300
|
+
code_challenge_method: params.codeChallengeMethod,
|
|
8301
|
+
company_id: params.companyId
|
|
8302
|
+
};
|
|
8303
|
+
}
|
|
8304
|
+
/**
|
|
8305
|
+
* Body for POST /oauth/authorize/deny (RFC 6749 wire format, see above).
|
|
8306
|
+
*/
|
|
8307
|
+
createDenyAuthorizationJsonApi(params) {
|
|
8308
|
+
return {
|
|
8309
|
+
client_id: params.clientId,
|
|
8310
|
+
redirect_uri: params.redirectUri,
|
|
8311
|
+
state: params.state
|
|
8312
|
+
};
|
|
8313
|
+
}
|
|
8233
8314
|
};
|
|
8234
8315
|
|
|
8235
8316
|
// src/features/oauth/oauth.module.ts
|
|
@@ -8353,14 +8434,7 @@ var OAuthService = class extends AbstractService {
|
|
|
8353
8434
|
type: Modules.OAuth,
|
|
8354
8435
|
method: "POST" /* POST */,
|
|
8355
8436
|
endpoint: new EndpointCreator({ endpoint: "oauth/authorize/approve" }).generate(),
|
|
8356
|
-
input:
|
|
8357
|
-
client_id: params.clientId,
|
|
8358
|
-
redirect_uri: params.redirectUri,
|
|
8359
|
-
scope: params.scope,
|
|
8360
|
-
state: params.state,
|
|
8361
|
-
code_challenge: params.codeChallenge,
|
|
8362
|
-
code_challenge_method: params.codeChallengeMethod
|
|
8363
|
-
},
|
|
8437
|
+
input: new OAuthClient().createApproveAuthorizationJsonApi(params),
|
|
8364
8438
|
overridesJsonApiCreation: true
|
|
8365
8439
|
});
|
|
8366
8440
|
return {
|
|
@@ -8376,11 +8450,7 @@ var OAuthService = class extends AbstractService {
|
|
|
8376
8450
|
type: Modules.OAuth,
|
|
8377
8451
|
method: "POST" /* POST */,
|
|
8378
8452
|
endpoint: new EndpointCreator({ endpoint: "oauth/authorize/deny" }).generate(),
|
|
8379
|
-
input:
|
|
8380
|
-
client_id: params.clientId,
|
|
8381
|
-
redirect_uri: params.redirectUri,
|
|
8382
|
-
state: params.state
|
|
8383
|
-
},
|
|
8453
|
+
input: new OAuthClient().createDenyAuthorizationJsonApi(params),
|
|
8384
8454
|
overridesJsonApiCreation: true
|
|
8385
8455
|
});
|
|
8386
8456
|
return {
|
|
@@ -8403,36 +8473,18 @@ var OAUTH_SCOPE_DISPLAY = {
|
|
|
8403
8473
|
description: "Write access to your data",
|
|
8404
8474
|
icon: "pencil"
|
|
8405
8475
|
},
|
|
8406
|
-
"photographs:read": {
|
|
8407
|
-
scope: "photographs:read",
|
|
8408
|
-
name: "View Photographs",
|
|
8409
|
-
description: "Access and download your photo library",
|
|
8410
|
-
icon: "image"
|
|
8411
|
-
},
|
|
8412
|
-
"photographs:write": {
|
|
8413
|
-
scope: "photographs:write",
|
|
8414
|
-
name: "Upload Photographs",
|
|
8415
|
-
description: "Add new photos to your rolls",
|
|
8416
|
-
icon: "upload"
|
|
8417
|
-
},
|
|
8418
|
-
"rolls:read": {
|
|
8419
|
-
scope: "rolls:read",
|
|
8420
|
-
name: "View Rolls",
|
|
8421
|
-
description: "See your film rolls and collections",
|
|
8422
|
-
icon: "film"
|
|
8423
|
-
},
|
|
8424
|
-
"rolls:write": {
|
|
8425
|
-
scope: "rolls:write",
|
|
8426
|
-
name: "Manage Rolls",
|
|
8427
|
-
description: "Create and modify film rolls",
|
|
8428
|
-
icon: "folder-plus"
|
|
8429
|
-
},
|
|
8430
8476
|
profile: {
|
|
8431
8477
|
scope: "profile",
|
|
8432
8478
|
name: "View Profile",
|
|
8433
8479
|
description: "Access your name and email",
|
|
8434
8480
|
icon: "user"
|
|
8435
8481
|
},
|
|
8482
|
+
mcp: {
|
|
8483
|
+
scope: "mcp",
|
|
8484
|
+
name: "MCP Server Access",
|
|
8485
|
+
description: "Let an AI assistant read and act on your data through the MCP server",
|
|
8486
|
+
icon: "shield"
|
|
8487
|
+
},
|
|
8436
8488
|
admin: {
|
|
8437
8489
|
scope: "admin",
|
|
8438
8490
|
name: "Administrative Access",
|
|
@@ -9711,4 +9763,4 @@ export {
|
|
|
9711
9763
|
AuditLogService,
|
|
9712
9764
|
AuditLogModule
|
|
9713
9765
|
};
|
|
9714
|
-
//# sourceMappingURL=chunk-
|
|
9766
|
+
//# sourceMappingURL=chunk-2O3SFHQ7.mjs.map
|