@carlonicora/nextjs-jsonapi 1.77.3 → 1.78.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/AssistantInterface-BYgI5z1-.d.mts +12 -0
- package/dist/AssistantInterface-DfDcz0gJ.d.ts +12 -0
- package/dist/AssistantMessageInterface-D0Kwf8CR.d.mts +36 -0
- package/dist/AssistantMessageInterface-DS_tyJTV.d.ts +36 -0
- package/dist/{BlockNoteEditor-UB7T7V67.js → BlockNoteEditor-2G5UYALC.js} +14 -14
- package/dist/{BlockNoteEditor-UB7T7V67.js.map → BlockNoteEditor-2G5UYALC.js.map} +1 -1
- package/dist/{BlockNoteEditor-7HAAXN3H.mjs → BlockNoteEditor-JXK3JGKJ.mjs} +4 -4
- package/dist/billing/index.js +346 -346
- package/dist/billing/index.mjs +3 -3
- package/dist/{chunk-FKLP4NED.js → chunk-FDJQRIMY.js} +320 -18
- package/dist/chunk-FDJQRIMY.js.map +1 -0
- package/dist/{chunk-XI35ALWY.mjs → chunk-I65SSQ5Z.mjs} +303 -1
- package/dist/chunk-I65SSQ5Z.mjs.map +1 -0
- package/dist/{chunk-F44ET4AC.mjs → chunk-NB6TIKHK.mjs} +2087 -1463
- package/dist/chunk-NB6TIKHK.mjs.map +1 -0
- package/dist/{chunk-JOJZRGZL.mjs → chunk-NZOUEN67.mjs} +2 -2
- package/dist/{chunk-OTZEXASK.js → chunk-X4YDETTD.js} +11 -11
- package/dist/{chunk-OTZEXASK.js.map → chunk-X4YDETTD.js.map} +1 -1
- package/dist/{chunk-CV7UOUKQ.js → chunk-ZEDB6JVB.js} +1356 -732
- package/dist/chunk-ZEDB6JVB.js.map +1 -0
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.d.mts +21 -2
- package/dist/components/index.d.ts +21 -2
- package/dist/components/index.js +10 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +9 -3
- package/dist/contexts/index.d.mts +26 -2
- package/dist/contexts/index.d.ts +26 -2
- package/dist/contexts/index.js +8 -4
- package/dist/contexts/index.js.map +1 -1
- package/dist/contexts/index.mjs +7 -3
- package/dist/core/index.d.mts +110 -3
- package/dist/core/index.d.ts +110 -3
- package/dist/core/index.js +14 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +13 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -2
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/index.ts +2 -0
- package/src/contexts/index.ts +1 -0
- package/src/core/index.ts +4 -0
- package/src/core/registry/ModuleRegistry.ts +9 -0
- package/src/features/assistant/AssistantModule.ts +19 -0
- package/src/features/assistant/components/containers/AssistantContainer.tsx +56 -0
- package/src/features/assistant/components/containers/__tests__/AssistantContainer.spec.tsx +101 -0
- package/src/features/assistant/components/index.ts +1 -0
- package/src/features/assistant/components/parts/AssistantComposer.tsx +56 -0
- package/src/features/assistant/components/parts/AssistantEmptyState.tsx +47 -0
- package/src/features/assistant/components/parts/AssistantSidebar.tsx +64 -0
- package/src/features/assistant/components/parts/AssistantStatusLine.tsx +19 -0
- package/src/features/assistant/components/parts/AssistantThread.tsx +36 -0
- package/src/features/assistant/components/parts/AssistantThreadHeader.tsx +91 -0
- package/src/features/assistant/components/parts/__tests__/AssistantComposer.spec.tsx +32 -0
- package/src/features/assistant/components/parts/__tests__/AssistantEmptyState.spec.tsx +27 -0
- package/src/features/assistant/components/parts/__tests__/AssistantSidebar.spec.tsx +58 -0
- package/src/features/assistant/components/parts/__tests__/AssistantStatusLine.spec.tsx +19 -0
- package/src/features/assistant/components/parts/__tests__/AssistantThread.spec.tsx +39 -0
- package/src/features/assistant/components/parts/__tests__/AssistantThreadHeader.spec.tsx +67 -0
- package/src/features/assistant/contexts/AssistantContext.tsx +255 -0
- package/src/features/assistant/contexts/__tests__/AssistantContext.spec.tsx +375 -0
- package/src/features/assistant/data/Assistant.ts +37 -0
- package/src/features/assistant/data/AssistantInterface.ts +11 -0
- package/src/features/assistant/data/AssistantService.ts +79 -0
- package/src/features/assistant/data/index.ts +3 -0
- package/src/features/assistant/index.ts +2 -0
- package/src/features/assistant/utils/__tests__/groupThreadsByBucket.spec.ts +24 -0
- package/src/features/assistant/utils/__tests__/resolveReferenceableModules.spec.ts +92 -0
- package/src/features/assistant/utils/groupThreadsByBucket.ts +26 -0
- package/src/features/assistant/utils/resolveReferenceableModules.ts +14 -0
- package/src/features/assistant-message/AssistantMessageModule.ts +28 -0
- package/src/features/assistant-message/components/MessageItem.tsx +60 -0
- package/src/features/assistant-message/components/MessageList.tsx +38 -0
- package/src/features/assistant-message/components/__tests__/MessageItem.spec.tsx +108 -0
- package/src/features/assistant-message/components/index.ts +2 -0
- package/src/features/assistant-message/components/parts/ReferenceBadges.tsx +46 -0
- package/src/features/assistant-message/components/parts/SuggestedFollowUps.tsx +52 -0
- package/src/features/assistant-message/components/parts/__tests__/ReferenceBadges.spec.tsx +59 -0
- package/src/features/assistant-message/components/parts/__tests__/SuggestedFollowUps.spec.tsx +29 -0
- package/src/features/assistant-message/data/AssistantMessage.ts +95 -0
- package/src/features/assistant-message/data/AssistantMessageInterface.ts +21 -0
- package/src/features/assistant-message/data/AssistantMessageService.ts +40 -0
- package/src/features/assistant-message/data/__tests__/AssistantMessage.spec.ts +158 -0
- package/src/features/assistant-message/data/index.ts +3 -0
- package/src/features/assistant-message/index.ts +2 -0
- package/src/features/user/contexts/CurrentUserContext.tsx +5 -13
- package/src/features/user/contexts/__tests__/CurrentUserContext.spec.tsx +141 -0
- package/src/index.ts +4 -0
- package/dist/HowToInterface-BKhnkzBp.d.ts +0 -17
- package/dist/HowToInterface-Cj8OuQFf.d.mts +0 -17
- package/dist/chunk-CV7UOUKQ.js.map +0 -1
- package/dist/chunk-F44ET4AC.mjs.map +0 -1
- package/dist/chunk-FKLP4NED.js.map +0 -1
- package/dist/chunk-XI35ALWY.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-7HAAXN3H.mjs.map → BlockNoteEditor-JXK3JGKJ.mjs.map} +0 -0
- /package/dist/{chunk-JOJZRGZL.mjs.map → chunk-NZOUEN67.mjs.map} +0 -0
package/dist/billing/index.mjs
CHANGED
|
@@ -47,11 +47,11 @@ import {
|
|
|
47
47
|
TabsList,
|
|
48
48
|
TabsTrigger,
|
|
49
49
|
useCurrentUserContext
|
|
50
|
-
} from "../chunk-
|
|
50
|
+
} from "../chunk-NB6TIKHK.mjs";
|
|
51
51
|
import {
|
|
52
52
|
getRoleId,
|
|
53
53
|
getStripePublishableKey
|
|
54
|
-
} from "../chunk-
|
|
54
|
+
} from "../chunk-NZOUEN67.mjs";
|
|
55
55
|
import {
|
|
56
56
|
FeatureService,
|
|
57
57
|
StripeCustomerService,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
StripeSubscriptionService,
|
|
63
63
|
StripeUsageService,
|
|
64
64
|
cn
|
|
65
|
-
} from "../chunk-
|
|
65
|
+
} from "../chunk-I65SSQ5Z.mjs";
|
|
66
66
|
import "../chunk-AUXK7QSA.mjs";
|
|
67
67
|
import "../chunk-C7C7VY4F.mjs";
|
|
68
68
|
import "../chunk-BTKJFMFL.mjs";
|
|
@@ -997,6 +997,12 @@ var ModuleRegistryClass = class {
|
|
|
997
997
|
}
|
|
998
998
|
return response;
|
|
999
999
|
}
|
|
1000
|
+
getAll() {
|
|
1001
|
+
if (this._modules.size === 0) {
|
|
1002
|
+
_chunk4MN547K7js.tryBootstrap.call(void 0, );
|
|
1003
|
+
}
|
|
1004
|
+
return Array.from(this._modules.values());
|
|
1005
|
+
}
|
|
1000
1006
|
};
|
|
1001
1007
|
var ModuleRegistry = new ModuleRegistryClass();
|
|
1002
1008
|
var Modules = new Proxy({}, {
|
|
@@ -5368,6 +5374,296 @@ var HowToService = class extends AbstractService {
|
|
|
5368
5374
|
}
|
|
5369
5375
|
};
|
|
5370
5376
|
|
|
5377
|
+
// src/features/assistant/AssistantModule.ts
|
|
5378
|
+
|
|
5379
|
+
|
|
5380
|
+
// src/features/assistant/data/Assistant.ts
|
|
5381
|
+
var Assistant = class extends AbstractApiData {
|
|
5382
|
+
static {
|
|
5383
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "Assistant");
|
|
5384
|
+
}
|
|
5385
|
+
|
|
5386
|
+
|
|
5387
|
+
get title() {
|
|
5388
|
+
return _nullishCoalesce(this._title, () => ( ""));
|
|
5389
|
+
}
|
|
5390
|
+
get messageCount() {
|
|
5391
|
+
return _nullishCoalesce(this._messageCount, () => ( 0));
|
|
5392
|
+
}
|
|
5393
|
+
rehydrate(data) {
|
|
5394
|
+
super.rehydrate(data);
|
|
5395
|
+
this._title = _optionalChain([data, 'access', _139 => _139.jsonApi, 'access', _140 => _140.attributes, 'optionalAccess', _141 => _141.title]);
|
|
5396
|
+
const fromMeta = _optionalChain([data, 'access', _142 => _142.jsonApi, 'access', _143 => _143.meta, 'optionalAccess', _144 => _144.messageCount]);
|
|
5397
|
+
const fromAttrs = _optionalChain([data, 'access', _145 => _145.jsonApi, 'access', _146 => _146.attributes, 'optionalAccess', _147 => _147.messageCount]);
|
|
5398
|
+
this._messageCount = typeof fromMeta === "number" ? fromMeta : typeof fromAttrs === "number" ? fromAttrs : 0;
|
|
5399
|
+
return this;
|
|
5400
|
+
}
|
|
5401
|
+
createJsonApi(data) {
|
|
5402
|
+
return {
|
|
5403
|
+
data: {
|
|
5404
|
+
type: Modules.Assistant.name,
|
|
5405
|
+
attributes: {
|
|
5406
|
+
content: data.firstMessage,
|
|
5407
|
+
...data.title !== void 0 ? { title: data.title } : {}
|
|
5408
|
+
}
|
|
5409
|
+
},
|
|
5410
|
+
included: []
|
|
5411
|
+
};
|
|
5412
|
+
}
|
|
5413
|
+
};
|
|
5414
|
+
|
|
5415
|
+
// src/features/assistant/AssistantModule.ts
|
|
5416
|
+
var AssistantModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
5417
|
+
pageUrl: "/assistants",
|
|
5418
|
+
name: "assistants",
|
|
5419
|
+
model: Assistant,
|
|
5420
|
+
moduleId: "2b39fd68-6a41-4f73-a2d0-4c8e8e3f9a42",
|
|
5421
|
+
icon: _lucidereact.BotIcon,
|
|
5422
|
+
identifier: ["title"],
|
|
5423
|
+
inclusions: {
|
|
5424
|
+
lists: {
|
|
5425
|
+
fields: [createJsonApiInclusion("assistants", [`title`])]
|
|
5426
|
+
}
|
|
5427
|
+
}
|
|
5428
|
+
}), "AssistantModule");
|
|
5429
|
+
|
|
5430
|
+
// src/features/assistant/data/AssistantService.ts
|
|
5431
|
+
var AssistantService = class extends AbstractService {
|
|
5432
|
+
static {
|
|
5433
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "AssistantService");
|
|
5434
|
+
}
|
|
5435
|
+
static async findOne(params) {
|
|
5436
|
+
return this.callApi({
|
|
5437
|
+
type: Modules.Assistant,
|
|
5438
|
+
method: "GET" /* GET */,
|
|
5439
|
+
endpoint: new EndpointCreator({ endpoint: Modules.Assistant, id: params.id }).generate()
|
|
5440
|
+
});
|
|
5441
|
+
}
|
|
5442
|
+
static async findMany(params = {}) {
|
|
5443
|
+
const endpoint = new EndpointCreator({ endpoint: Modules.Assistant });
|
|
5444
|
+
if (params.fetchAll) endpoint.addAdditionalParam("fetchAll", "true");
|
|
5445
|
+
return this.callApi({
|
|
5446
|
+
type: Modules.Assistant,
|
|
5447
|
+
method: "GET" /* GET */,
|
|
5448
|
+
endpoint: endpoint.generate()
|
|
5449
|
+
});
|
|
5450
|
+
}
|
|
5451
|
+
static async create(params) {
|
|
5452
|
+
return this.callApi({
|
|
5453
|
+
type: Modules.Assistant,
|
|
5454
|
+
method: "POST" /* POST */,
|
|
5455
|
+
endpoint: new EndpointCreator({ endpoint: Modules.Assistant }).generate(),
|
|
5456
|
+
input: params
|
|
5457
|
+
});
|
|
5458
|
+
}
|
|
5459
|
+
/**
|
|
5460
|
+
* Sends a new user message to an existing assistant thread. The agent turn
|
|
5461
|
+
* runs synchronously; the response is a two-element list: [user, assistant].
|
|
5462
|
+
*/
|
|
5463
|
+
static async appendMessage(params) {
|
|
5464
|
+
return this.callApi({
|
|
5465
|
+
type: Modules.AssistantMessage,
|
|
5466
|
+
method: "POST" /* POST */,
|
|
5467
|
+
endpoint: new EndpointCreator({
|
|
5468
|
+
endpoint: Modules.Assistant,
|
|
5469
|
+
id: params.assistantId,
|
|
5470
|
+
childEndpoint: Modules.AssistantMessage
|
|
5471
|
+
}).generate(),
|
|
5472
|
+
input: {
|
|
5473
|
+
data: {
|
|
5474
|
+
type: Modules.AssistantMessage.name,
|
|
5475
|
+
attributes: { content: params.content }
|
|
5476
|
+
}
|
|
5477
|
+
},
|
|
5478
|
+
overridesJsonApiCreation: true
|
|
5479
|
+
});
|
|
5480
|
+
}
|
|
5481
|
+
static async rename(params) {
|
|
5482
|
+
await this.callApi({
|
|
5483
|
+
type: Modules.Assistant,
|
|
5484
|
+
method: "PATCH" /* PATCH */,
|
|
5485
|
+
endpoint: new EndpointCreator({ endpoint: Modules.Assistant, id: params.id }).generate(),
|
|
5486
|
+
input: {
|
|
5487
|
+
data: {
|
|
5488
|
+
type: Modules.Assistant.name,
|
|
5489
|
+
id: params.id,
|
|
5490
|
+
attributes: { title: params.title }
|
|
5491
|
+
}
|
|
5492
|
+
},
|
|
5493
|
+
overridesJsonApiCreation: true
|
|
5494
|
+
});
|
|
5495
|
+
}
|
|
5496
|
+
static async delete(params) {
|
|
5497
|
+
await this.callApi({
|
|
5498
|
+
type: Modules.Assistant,
|
|
5499
|
+
method: "DELETE" /* DELETE */,
|
|
5500
|
+
endpoint: new EndpointCreator({ endpoint: Modules.Assistant, id: params.id }).generate()
|
|
5501
|
+
});
|
|
5502
|
+
}
|
|
5503
|
+
};
|
|
5504
|
+
|
|
5505
|
+
// src/features/assistant-message/AssistantMessageModule.ts
|
|
5506
|
+
|
|
5507
|
+
|
|
5508
|
+
// src/features/assistant/utils/resolveReferenceableModules.ts
|
|
5509
|
+
function resolveReferenceableModules() {
|
|
5510
|
+
return ModuleRegistry.getAll().filter((m) => {
|
|
5511
|
+
const cls = m.model;
|
|
5512
|
+
return cls && Array.isArray(cls.identifierFields) && cls.identifierFields.length > 0;
|
|
5513
|
+
});
|
|
5514
|
+
}
|
|
5515
|
+
_chunk7QVYU63Ejs.__name.call(void 0, resolveReferenceableModules, "resolveReferenceableModules");
|
|
5516
|
+
|
|
5517
|
+
// src/features/assistant-message/data/AssistantMessage.ts
|
|
5518
|
+
var AssistantMessage = class _AssistantMessage extends AbstractApiData {
|
|
5519
|
+
static {
|
|
5520
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "AssistantMessage");
|
|
5521
|
+
}
|
|
5522
|
+
|
|
5523
|
+
|
|
5524
|
+
|
|
5525
|
+
|
|
5526
|
+
|
|
5527
|
+
|
|
5528
|
+
|
|
5529
|
+
get role() {
|
|
5530
|
+
return _nullishCoalesce(this._role, () => ( "assistant"));
|
|
5531
|
+
}
|
|
5532
|
+
get content() {
|
|
5533
|
+
return _nullishCoalesce(this._content, () => ( ""));
|
|
5534
|
+
}
|
|
5535
|
+
get position() {
|
|
5536
|
+
return _nullishCoalesce(this._position, () => ( 0));
|
|
5537
|
+
}
|
|
5538
|
+
get suggestedQuestions() {
|
|
5539
|
+
return _nullishCoalesce(this._suggestedQuestions, () => ( []));
|
|
5540
|
+
}
|
|
5541
|
+
get inputTokens() {
|
|
5542
|
+
return this._inputTokens;
|
|
5543
|
+
}
|
|
5544
|
+
get outputTokens() {
|
|
5545
|
+
return this._outputTokens;
|
|
5546
|
+
}
|
|
5547
|
+
get references() {
|
|
5548
|
+
return _nullishCoalesce(this._references, () => ( []));
|
|
5549
|
+
}
|
|
5550
|
+
rehydrate(data) {
|
|
5551
|
+
super.rehydrate(data);
|
|
5552
|
+
const attrs = _nullishCoalesce(data.jsonApi.attributes, () => ( {}));
|
|
5553
|
+
this._role = attrs.role;
|
|
5554
|
+
this._content = attrs.content;
|
|
5555
|
+
this._position = typeof attrs.position === "number" ? attrs.position : Number(_nullishCoalesce(attrs.position, () => ( 0)));
|
|
5556
|
+
this._suggestedQuestions = Array.isArray(attrs.suggestedQuestions) ? attrs.suggestedQuestions : [];
|
|
5557
|
+
this._inputTokens = attrs.inputTokens;
|
|
5558
|
+
this._outputTokens = attrs.outputTokens;
|
|
5559
|
+
const refs = this._readIncludedPolymorphic(data, "references", resolveReferenceableModules());
|
|
5560
|
+
this._references = Array.isArray(refs) ? refs : refs ? [refs] : [];
|
|
5561
|
+
return this;
|
|
5562
|
+
}
|
|
5563
|
+
createJsonApi(data) {
|
|
5564
|
+
return {
|
|
5565
|
+
data: {
|
|
5566
|
+
type: Modules.AssistantMessage.name,
|
|
5567
|
+
id: data.id,
|
|
5568
|
+
attributes: {
|
|
5569
|
+
role: data.role,
|
|
5570
|
+
content: data.content,
|
|
5571
|
+
position: data.position
|
|
5572
|
+
},
|
|
5573
|
+
relationships: {
|
|
5574
|
+
assistant: {
|
|
5575
|
+
data: { type: Modules.Assistant.name, id: data.assistantId }
|
|
5576
|
+
}
|
|
5577
|
+
}
|
|
5578
|
+
},
|
|
5579
|
+
included: []
|
|
5580
|
+
};
|
|
5581
|
+
}
|
|
5582
|
+
static buildOptimistic(params) {
|
|
5583
|
+
const msg = new _AssistantMessage();
|
|
5584
|
+
const jsonApi = {
|
|
5585
|
+
id: `tmp-${crypto.randomUUID()}`,
|
|
5586
|
+
type: Modules.AssistantMessage.name,
|
|
5587
|
+
attributes: {
|
|
5588
|
+
role: "user",
|
|
5589
|
+
content: params.content,
|
|
5590
|
+
position: params.position
|
|
5591
|
+
}
|
|
5592
|
+
};
|
|
5593
|
+
if (params.assistantId) {
|
|
5594
|
+
jsonApi.relationships = {
|
|
5595
|
+
assistant: { data: { type: Modules.Assistant.name, id: params.assistantId } }
|
|
5596
|
+
};
|
|
5597
|
+
}
|
|
5598
|
+
msg.rehydrate({ jsonApi, included: [] });
|
|
5599
|
+
return msg;
|
|
5600
|
+
}
|
|
5601
|
+
};
|
|
5602
|
+
|
|
5603
|
+
// src/features/assistant-message/AssistantMessageModule.ts
|
|
5604
|
+
var AssistantMessageModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
5605
|
+
pageUrl: "/assistant-messages",
|
|
5606
|
+
name: "assistant-messages",
|
|
5607
|
+
model: AssistantMessage,
|
|
5608
|
+
moduleId: "5b2e10e4-3a01-4a59-9f0f-3c4a6c6a8e11",
|
|
5609
|
+
icon: _lucidereact.MessageSquareIcon,
|
|
5610
|
+
inclusions: {
|
|
5611
|
+
lists: {
|
|
5612
|
+
fields: [
|
|
5613
|
+
createJsonApiInclusion("assistant-messages", [
|
|
5614
|
+
`role`,
|
|
5615
|
+
`content`,
|
|
5616
|
+
`position`,
|
|
5617
|
+
`suggestedQuestions`,
|
|
5618
|
+
`inputTokens`,
|
|
5619
|
+
`outputTokens`,
|
|
5620
|
+
`references`
|
|
5621
|
+
])
|
|
5622
|
+
]
|
|
5623
|
+
}
|
|
5624
|
+
}
|
|
5625
|
+
}), "AssistantMessageModule");
|
|
5626
|
+
|
|
5627
|
+
// src/features/assistant-message/data/AssistantMessageService.ts
|
|
5628
|
+
var AssistantMessageService = class extends AbstractService {
|
|
5629
|
+
static {
|
|
5630
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "AssistantMessageService");
|
|
5631
|
+
}
|
|
5632
|
+
static async findByAssistant(params) {
|
|
5633
|
+
const endpoint = new EndpointCreator({
|
|
5634
|
+
endpoint: Modules.Assistant,
|
|
5635
|
+
id: params.assistantId,
|
|
5636
|
+
childEndpoint: Modules.AssistantMessage
|
|
5637
|
+
});
|
|
5638
|
+
return this.callApi({
|
|
5639
|
+
type: Modules.AssistantMessage,
|
|
5640
|
+
method: "GET" /* GET */,
|
|
5641
|
+
endpoint: endpoint.generate(),
|
|
5642
|
+
next: params.next
|
|
5643
|
+
});
|
|
5644
|
+
}
|
|
5645
|
+
static async findOne(params) {
|
|
5646
|
+
return this.callApi({
|
|
5647
|
+
type: Modules.AssistantMessage,
|
|
5648
|
+
method: "GET" /* GET */,
|
|
5649
|
+
endpoint: new EndpointCreator({
|
|
5650
|
+
endpoint: Modules.AssistantMessage,
|
|
5651
|
+
id: params.id
|
|
5652
|
+
}).generate()
|
|
5653
|
+
});
|
|
5654
|
+
}
|
|
5655
|
+
static async delete(params) {
|
|
5656
|
+
await this.callApi({
|
|
5657
|
+
type: Modules.AssistantMessage,
|
|
5658
|
+
method: "DELETE" /* DELETE */,
|
|
5659
|
+
endpoint: new EndpointCreator({
|
|
5660
|
+
endpoint: Modules.AssistantMessage,
|
|
5661
|
+
id: params.id
|
|
5662
|
+
}).generate()
|
|
5663
|
+
});
|
|
5664
|
+
}
|
|
5665
|
+
};
|
|
5666
|
+
|
|
5371
5667
|
// src/features/feature/data/feature.ts
|
|
5372
5668
|
var Feature = (_class19 = class extends AbstractApiData {constructor(...args16) { super(...args16); _class19.prototype.__init40.call(this); }
|
|
5373
5669
|
static {
|
|
@@ -6042,8 +6338,8 @@ var UserService = class extends AbstractService {
|
|
|
6042
6338
|
id: params.id,
|
|
6043
6339
|
childEndpoint: "user-relevance"
|
|
6044
6340
|
});
|
|
6045
|
-
if (_optionalChain([Modules, 'access',
|
|
6046
|
-
if (_optionalChain([Modules, 'access',
|
|
6341
|
+
if (_optionalChain([Modules, 'access', _148 => _148.User, 'access', _149 => _149.inclusions, 'optionalAccess', _150 => _150.lists, 'optionalAccess', _151 => _151.fields])) endpoint.limitToFields(Modules.User.inclusions.lists.fields);
|
|
6342
|
+
if (_optionalChain([Modules, 'access', _152 => _152.User, 'access', _153 => _153.inclusions, 'optionalAccess', _154 => _154.lists, 'optionalAccess', _155 => _155.types])) endpoint.limitToType(Modules.User.inclusions.lists.types);
|
|
6047
6343
|
return this.callApi({
|
|
6048
6344
|
type: Modules.User,
|
|
6049
6345
|
method: "GET" /* GET */,
|
|
@@ -6302,7 +6598,7 @@ var OAuthService = class extends AbstractService {
|
|
|
6302
6598
|
type: Modules.OAuth,
|
|
6303
6599
|
method: "GET" /* GET */,
|
|
6304
6600
|
endpoint: new EndpointCreator({ endpoint: "oauth/clients" }).generate(),
|
|
6305
|
-
next: _optionalChain([params, 'optionalAccess',
|
|
6601
|
+
next: _optionalChain([params, 'optionalAccess', _156 => _156.next])
|
|
6306
6602
|
});
|
|
6307
6603
|
}
|
|
6308
6604
|
/**
|
|
@@ -6328,7 +6624,7 @@ var OAuthService = class extends AbstractService {
|
|
|
6328
6624
|
});
|
|
6329
6625
|
return {
|
|
6330
6626
|
client: result.data,
|
|
6331
|
-
clientSecret: _optionalChain([result, 'access',
|
|
6627
|
+
clientSecret: _optionalChain([result, 'access', _157 => _157.meta, 'optionalAccess', _158 => _158.clientSecret])
|
|
6332
6628
|
};
|
|
6333
6629
|
}
|
|
6334
6630
|
/**
|
|
@@ -6367,7 +6663,7 @@ var OAuthService = class extends AbstractService {
|
|
|
6367
6663
|
}).generate()
|
|
6368
6664
|
});
|
|
6369
6665
|
return {
|
|
6370
|
-
clientSecret: _optionalChain([result, 'access',
|
|
6666
|
+
clientSecret: _optionalChain([result, 'access', _159 => _159.meta, 'optionalAccess', _160 => _160.clientSecret])
|
|
6371
6667
|
};
|
|
6372
6668
|
}
|
|
6373
6669
|
// ==========================================
|
|
@@ -6411,7 +6707,7 @@ var OAuthService = class extends AbstractService {
|
|
|
6411
6707
|
overridesJsonApiCreation: true
|
|
6412
6708
|
});
|
|
6413
6709
|
return {
|
|
6414
|
-
redirectUrl: _optionalChain([result, 'access',
|
|
6710
|
+
redirectUrl: _optionalChain([result, 'access', _161 => _161.meta, 'optionalAccess', _162 => _162.redirectUrl])
|
|
6415
6711
|
};
|
|
6416
6712
|
}
|
|
6417
6713
|
/**
|
|
@@ -6431,7 +6727,7 @@ var OAuthService = class extends AbstractService {
|
|
|
6431
6727
|
overridesJsonApiCreation: true
|
|
6432
6728
|
});
|
|
6433
6729
|
return {
|
|
6434
|
-
redirectUrl: _optionalChain([result, 'access',
|
|
6730
|
+
redirectUrl: _optionalChain([result, 'access', _163 => _163.meta, 'optionalAccess', _164 => _164.redirectUrl])
|
|
6435
6731
|
};
|
|
6436
6732
|
}
|
|
6437
6733
|
};
|
|
@@ -6615,15 +6911,15 @@ var WaitlistService = class extends AbstractService {
|
|
|
6615
6911
|
*/
|
|
6616
6912
|
static async findMany(params) {
|
|
6617
6913
|
const endpoint = new EndpointCreator({ endpoint: Modules.Waitlist });
|
|
6618
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
6619
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
6620
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
6914
|
+
if (_optionalChain([params, 'optionalAccess', _165 => _165.status])) endpoint.addAdditionalParam("status", params.status);
|
|
6915
|
+
if (_optionalChain([params, 'optionalAccess', _166 => _166.search])) endpoint.addAdditionalParam("search", params.search);
|
|
6916
|
+
if (_optionalChain([params, 'optionalAccess', _167 => _167.fetchAll])) endpoint.addAdditionalParam("fetchAll", "true");
|
|
6621
6917
|
return this.callApi({
|
|
6622
6918
|
type: Modules.Waitlist,
|
|
6623
6919
|
method: "GET" /* GET */,
|
|
6624
6920
|
endpoint: endpoint.generate(),
|
|
6625
|
-
next: _optionalChain([params, 'optionalAccess',
|
|
6626
|
-
previous: _optionalChain([params, 'optionalAccess',
|
|
6921
|
+
next: _optionalChain([params, 'optionalAccess', _168 => _168.next]),
|
|
6922
|
+
previous: _optionalChain([params, 'optionalAccess', _169 => _169.prev])
|
|
6627
6923
|
});
|
|
6628
6924
|
}
|
|
6629
6925
|
/**
|
|
@@ -6691,10 +6987,10 @@ var WaitlistService = class extends AbstractService {
|
|
|
6691
6987
|
method: "GET" /* GET */,
|
|
6692
6988
|
endpoint: endpoint.generate()
|
|
6693
6989
|
});
|
|
6694
|
-
const attributes = _optionalChain([response, 'access',
|
|
6990
|
+
const attributes = _optionalChain([response, 'access', _170 => _170.data, 'optionalAccess', _171 => _171._jsonApi, 'optionalAccess', _172 => _172.attributes]);
|
|
6695
6991
|
return {
|
|
6696
|
-
email: _optionalChain([attributes, 'optionalAccess',
|
|
6697
|
-
valid: _nullishCoalesce(_optionalChain([attributes, 'optionalAccess',
|
|
6992
|
+
email: _optionalChain([attributes, 'optionalAccess', _173 => _173.email]),
|
|
6993
|
+
valid: _nullishCoalesce(_optionalChain([attributes, 'optionalAccess', _174 => _174.valid]), () => ( false))
|
|
6698
6994
|
};
|
|
6699
6995
|
} catch (_error) {
|
|
6700
6996
|
return null;
|
|
@@ -6780,7 +7076,7 @@ var PermissionMapping = class extends AbstractApiData {
|
|
|
6780
7076
|
super.rehydrate(data);
|
|
6781
7077
|
this._roleId = data.jsonApi.attributes.roleId;
|
|
6782
7078
|
this._moduleId = data.jsonApi.attributes.moduleId;
|
|
6783
|
-
this._permissions = _optionalChain([data, 'access',
|
|
7079
|
+
this._permissions = _optionalChain([data, 'access', _175 => _175.jsonApi, 'access', _176 => _176.meta, 'optionalAccess', _177 => _177.permissions]);
|
|
6784
7080
|
return this;
|
|
6785
7081
|
}
|
|
6786
7082
|
};
|
|
@@ -7159,5 +7455,11 @@ var AuditLogModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (facto
|
|
|
7159
7455
|
|
|
7160
7456
|
|
|
7161
7457
|
|
|
7162
|
-
|
|
7163
|
-
|
|
7458
|
+
|
|
7459
|
+
|
|
7460
|
+
|
|
7461
|
+
|
|
7462
|
+
|
|
7463
|
+
|
|
7464
|
+
exports.RehydrationFactory = RehydrationFactory; exports.AbstractApiData = AbstractApiData; exports.HttpMethod = HttpMethod; exports.getLastApiTotal = getLastApiTotal; exports.clearLastApiTotal = clearLastApiTotal; exports.setGlobalErrorHandler = setGlobalErrorHandler; exports.getGlobalErrorHandler = getGlobalErrorHandler; exports.AbstractService = AbstractService; exports.configureClientJsonApi = configureClientJsonApi; exports.getClientApiUrl = getClientApiUrl; exports.getClientAppUrl = getClientAppUrl; exports.getClientTrackablePages = getClientTrackablePages; exports.ClientJsonApiGet = ClientJsonApiGet; exports.ClientJsonApiPost = ClientJsonApiPost; exports.ClientJsonApiPut = ClientJsonApiPut; exports.ClientJsonApiPatch = ClientJsonApiPatch; exports.ClientJsonApiDelete = ClientJsonApiDelete; exports.ClientHttpMethod = ClientHttpMethod; exports.setClientGlobalErrorHandler = setClientGlobalErrorHandler; exports.getClientGlobalErrorHandler = getClientGlobalErrorHandler; exports.ClientAbstractService = ClientAbstractService; exports.ModuleRegistrar = ModuleRegistrar; exports.ModuleRegistry = ModuleRegistry; exports.Modules = Modules; exports.EndpointCreator = EndpointCreator; exports.createJsonApiInclusion = createJsonApiInclusion; exports.rehydrate = rehydrate; exports.rehydrateList = rehydrateList; exports.cn = cn; exports.composeRefs = composeRefs; exports.useComposedRefs = useComposedRefs; exports.useIsMobile = useIsMobile; exports.formatDate = formatDate; exports.exists = exists; exports.TableOptions = TableOptions; exports.getTableOptions = getTableOptions; exports.getTableComponents = getTableComponents; exports.userObjectSchema = userObjectSchema; exports.entityObjectSchema = entityObjectSchema; exports.getInitials = getInitials; exports.BlockNoteDiffUtil = BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = BlockNoteWordDiffRendererUtil; exports.getIconByModule = getIconByModule; exports.getIcon = getIcon; exports.getIconByModuleName = getIconByModuleName; exports.getLucideIcon = getLucideIcon; exports.getLucideIconByModule = getLucideIconByModule; exports.getLucideIconByModuleName = getLucideIconByModuleName; exports.showToast = showToast; exports.showError = showError; exports.dismissToast = dismissToast; exports.showCustomToast = showCustomToast; exports.Action = Action; exports.checkPermissions = checkPermissions; exports.checkPermissionsFromServer = checkPermissionsFromServer; exports.getValueFromPath = getValueFromPath; exports.TotpAuthenticator = TotpAuthenticator; exports.TotpAuthenticatorModule = TotpAuthenticatorModule; exports.TotpSetup = TotpSetup; exports.TotpSetupModule = TotpSetupModule; exports.TotpVerify = TotpVerify; exports.TotpVerifyModule = TotpVerifyModule; exports.TotpVerifyLogin = TotpVerifyLogin; exports.TotpVerifyLoginModule = TotpVerifyLoginModule; exports.Passkey = Passkey; exports.PasskeyModule = PasskeyModule; exports.PasskeyRegistrationOptions = PasskeyRegistrationOptions; exports.PasskeyRegistrationOptionsModule = PasskeyRegistrationOptionsModule; exports.PasskeyRegistrationVerify = PasskeyRegistrationVerify; exports.PasskeyRegistrationVerifyModule = PasskeyRegistrationVerifyModule; exports.PasskeyRename = PasskeyRename; exports.PasskeyRenameModule = PasskeyRenameModule; exports.PasskeyVerifyLogin = PasskeyVerifyLogin; exports.PasskeyVerifyLoginModule = PasskeyVerifyLoginModule; exports.PasskeyAuthenticationOptions = PasskeyAuthenticationOptions; exports.PasskeyAuthenticationOptionsModule = PasskeyAuthenticationOptionsModule; exports.TwoFactorEnable = TwoFactorEnable; exports.TwoFactorEnableModule = TwoFactorEnableModule; exports.TwoFactorChallenge = TwoFactorChallenge; exports.TwoFactorChallengeModule = TwoFactorChallengeModule; exports.BackupCodeVerify = BackupCodeVerify; exports.BackupCodeVerifyModule = BackupCodeVerifyModule; exports.configureAuth = configureAuth; exports.getTokenHandler = getTokenHandler; exports.Auth = Auth; exports.AuthService = AuthService; exports.TwoFactorStatus = TwoFactorStatus; exports.TwoFactorService = TwoFactorService; exports.AuthComponent = AuthComponent; exports.AuthModule = AuthModule; exports.TwoFactorStatusModule = TwoFactorStatusModule; exports.BillingService = BillingService; exports.Billing = Billing; exports.BillingModule = BillingModule; exports.PaymentMethod = PaymentMethod; exports.StripeCustomer = StripeCustomer; exports.StripeCustomerService = StripeCustomerService; exports.StripeCustomerModule = StripeCustomerModule; exports.StripePaymentMethodModule = StripePaymentMethodModule; exports.StripeInvoice = StripeInvoice; exports.InvoiceStatus = InvoiceStatus; exports.StripeInvoiceService = StripeInvoiceService; exports.StripeInvoiceModule = StripeInvoiceModule; exports.StripePrice = StripePrice; exports.StripePriceService = StripePriceService; exports.StripePriceModule = StripePriceModule; exports.StripeProduct = StripeProduct; exports.StripeProductService = StripeProductService; exports.StripeProductModule = StripeProductModule; exports.StripeSubscription = StripeSubscription; exports.SubscriptionStatus = SubscriptionStatus; exports.StripeSubscriptionService = StripeSubscriptionService; exports.StripeSubscriptionModule = StripeSubscriptionModule; exports.StripeUsage = StripeUsage; exports.StripeUsageService = StripeUsageService; exports.StripeUsageModule = StripeUsageModule; exports.StripePromotionCodeService = StripePromotionCodeService; exports.StripePromotionCode = StripePromotionCode; exports.StripePromotionCodeModule = StripePromotionCodeModule; exports.Company = Company; exports.CompanyFields = CompanyFields; exports.CompanyService = CompanyService; exports.CompanyModule = CompanyModule; exports.Content = Content; exports.ContentFields = ContentFields; exports.ContentService = ContentService; exports.ContentModule = ContentModule; exports.HowTo = HowTo; exports.HowToModule = HowToModule; exports.HowToFields = HowToFields; exports.HowToService = HowToService; exports.Assistant = Assistant; exports.AssistantModule = AssistantModule; exports.AssistantService = AssistantService; exports.AssistantMessage = AssistantMessage; exports.AssistantMessageModule = AssistantMessageModule; exports.AssistantMessageService = AssistantMessageService; exports.Feature = Feature; exports.FeatureService = FeatureService; exports.FeatureModule = FeatureModule; exports.Module = Module; exports.ModuleModule = ModuleModule; exports.Notification = Notification; exports.NotificationFields = NotificationFields; exports.NotificationService = NotificationService; exports.NotificationModule = NotificationModule; exports.Push = Push; exports.PushService = PushService; exports.PushModule = PushModule; exports.Role = Role; exports.RoleFields = RoleFields; exports.RoleService = RoleService; exports.RoleModule = RoleModule; exports.S3 = S3; exports.S3Module = S3Module; exports.S3Service = S3Service; exports.User = User; exports.UserFields = UserFields; exports.UserService = UserService; exports.AuthorModule = AuthorModule; exports.UserModule = UserModule; exports.OAuthClient = OAuthClient; exports.OAuthModule = OAuthModule; exports.OAuthService = OAuthService; exports.OAUTH_SCOPE_DISPLAY = OAUTH_SCOPE_DISPLAY; exports.AVAILABLE_OAUTH_SCOPES = AVAILABLE_OAUTH_SCOPES; exports.DEFAULT_GRANT_TYPES = DEFAULT_GRANT_TYPES; exports.Waitlist = Waitlist; exports.WaitlistService = WaitlistService; exports.WaitlistStats = WaitlistStats; exports.WaitlistModule = WaitlistModule; exports.WaitlistStatsModule = WaitlistStatsModule; exports.PermissionMapping = PermissionMapping; exports.ModulePaths = ModulePaths; exports.PermissionMappingModule = PermissionMappingModule; exports.ModulePathsModule = ModulePathsModule; exports.ReferralStats = ReferralStats; exports.ReferralService = ReferralService; exports.ReferralModule = ReferralModule; exports.ReferralStatsModule = ReferralStatsModule; exports.AuditLog = AuditLog; exports.AuditLogService = AuditLogService; exports.AuditLogModule = AuditLogModule;
|
|
7465
|
+
//# sourceMappingURL=chunk-FDJQRIMY.js.map
|