@carlonicora/nextjs-jsonapi 2.0.3 → 2.1.1
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-DMh-zApr.d.mts +34 -0
- package/dist/AssistantInterface-DwdBzS9f.d.ts +34 -0
- package/dist/{BlockNoteEditor-QMZLV62B.js → BlockNoteEditor-DTW2BWIU.js} +22 -20
- package/dist/BlockNoteEditor-DTW2BWIU.js.map +1 -0
- package/dist/{BlockNoteEditor-QGEOVS3T.mjs → BlockNoteEditor-T7TIA5KG.mjs} +7 -5
- package/dist/BlockNoteEditor-T7TIA5KG.mjs.map +1 -0
- package/dist/{BlockNoteViewer-UW5VZ5UF.js → BlockNoteViewer-6N2GQWTI.js} +4 -2
- package/dist/BlockNoteViewer-6N2GQWTI.js.map +1 -0
- package/dist/{BlockNoteViewer-OPSCTHKJ.mjs → BlockNoteViewer-IBQRJ3WM.mjs} +4 -2
- package/dist/BlockNoteViewer-IBQRJ3WM.mjs.map +1 -0
- package/dist/billing/index.js +357 -357
- package/dist/billing/index.mjs +3 -3
- package/dist/{chunk-DS4IBFWA.js → chunk-6YIZX26T.js} +185 -33
- package/dist/chunk-6YIZX26T.js.map +1 -0
- package/dist/{chunk-PBKZYJRJ.js → chunk-C5SETS2R.js} +1258 -895
- package/dist/chunk-C5SETS2R.js.map +1 -0
- package/dist/{chunk-UXJAS6C5.js → chunk-JG7MCYCW.js} +7 -7
- package/dist/{chunk-UXJAS6C5.js.map → chunk-JG7MCYCW.js.map} +1 -1
- package/dist/{chunk-HN5ED7OF.mjs → chunk-MAWTFEY3.mjs} +2 -2
- package/dist/{chunk-QHGSBZCL.mjs → chunk-MOMRJHT3.mjs} +1100 -737
- package/dist/chunk-MOMRJHT3.mjs.map +1 -0
- package/dist/{chunk-BIL2WQEV.mjs → chunk-P5TMD7GK.mjs} +158 -6
- package/dist/chunk-P5TMD7GK.mjs.map +1 -0
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/index.d.mts +102 -11
- package/dist/components/index.d.ts +102 -11
- package/dist/components/index.js +12 -4
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +11 -3
- package/dist/contexts/index.d.mts +29 -3
- package/dist/contexts/index.d.ts +29 -3
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.d.mts +99 -2
- package/dist/core/index.d.ts +99 -2
- package/dist/core/index.js +8 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +7 -1
- package/dist/features/help/index.js +37 -37
- package/dist/features/help/index.mjs +3 -3
- package/dist/features/tokenusage/index.js +71 -71
- package/dist/features/tokenusage/index.mjs +3 -3
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/editors/BlockNoteEditor.tsx +5 -1
- package/src/components/editors/BlockNoteEditorSuggestionMenuController.tsx +14 -2
- package/src/components/index.ts +1 -0
- package/src/components/viewers/BlockNoteViewer.tsx +5 -1
- package/src/core/index.ts +2 -0
- package/src/core/registry/ModuleRegistry.ts +1 -0
- package/src/features/assistant/components/containers/AssistantPageContainer.tsx +123 -0
- package/src/features/assistant/components/index.ts +2 -0
- package/src/features/assistant/components/parts/AssistantBlockNoteComposer.tsx +135 -0
- package/src/features/assistant/components/parts/AssistantThread.tsx +4 -1
- package/src/features/assistant/contexts/AssistantContext.tsx +60 -13
- package/src/features/assistant/contexts/__tests__/AssistantContext.spec.tsx +81 -0
- package/src/features/assistant/data/Assistant.ts +29 -1
- package/src/features/assistant/data/AssistantInterface.ts +15 -0
- package/src/features/assistant/data/AssistantService.ts +19 -2
- package/src/features/assistant/data/__tests__/Assistant.scope.spec.ts +64 -0
- package/src/features/assistant-action/AssistantActionModule.ts +13 -0
- package/src/features/assistant-action/components/ApprovalActionCard.tsx +127 -0
- package/src/features/assistant-action/components/AssistantContainerWithApprovals.tsx +34 -0
- package/src/features/assistant-action/components/index.ts +2 -0
- package/src/features/assistant-action/data/AssistantAction.ts +58 -0
- package/src/features/assistant-action/data/AssistantActionInterface.ts +24 -0
- package/src/features/assistant-action/data/AssistantActionService.ts +51 -0
- package/src/features/assistant-action/data/__tests__/AssistantAction.spec.ts +171 -0
- package/src/features/assistant-action/data/index.ts +3 -0
- package/src/features/assistant-action/index.ts +2 -0
- package/src/features/assistant-message/components/MessageItem.tsx +57 -6
- package/src/features/assistant-message/components/MessageList.tsx +11 -2
- package/src/features/assistant-message/components/__tests__/MessageItem.mentions.spec.tsx +34 -0
- package/src/features/assistant-message/components/parts/MessageSourcesContainer.tsx +30 -13
- package/src/features/assistant-message/components/parts/tabs/CitationsTab.tsx +23 -5
- package/src/features/assistant-message/components/parts/tabs/ContentsTab.tsx +3 -1
- package/src/features/assistant-message/components/parts/tabs/ReferencesTab.tsx +4 -1
- package/src/features/assistant-message/components/parts/tabs/useEntityLabel.ts +35 -0
- package/src/features/assistant-message/data/AssistantMessage.ts +11 -2
- package/src/features/company/components/details/TokenStatusIndicator.tsx +18 -4
- package/src/features/index.ts +1 -0
- package/dist/AssistantInterface-B56qznuH.d.mts +0 -16
- package/dist/AssistantInterface-CHiJIYDY.d.ts +0 -16
- package/dist/BlockNoteEditor-QGEOVS3T.mjs.map +0 -1
- package/dist/BlockNoteEditor-QMZLV62B.js.map +0 -1
- package/dist/BlockNoteViewer-OPSCTHKJ.mjs.map +0 -1
- package/dist/BlockNoteViewer-UW5VZ5UF.js.map +0 -1
- package/dist/chunk-BIL2WQEV.mjs.map +0 -1
- package/dist/chunk-DS4IBFWA.js.map +0 -1
- package/dist/chunk-PBKZYJRJ.js.map +0 -1
- package/dist/chunk-QHGSBZCL.mjs.map +0 -1
- /package/dist/{chunk-HN5ED7OF.mjs.map → chunk-MAWTFEY3.mjs.map} +0 -0
package/dist/billing/index.mjs
CHANGED
|
@@ -48,11 +48,11 @@ import {
|
|
|
48
48
|
TabsList,
|
|
49
49
|
TabsTrigger,
|
|
50
50
|
useCurrentUserContext
|
|
51
|
-
} from "../chunk-
|
|
51
|
+
} from "../chunk-MOMRJHT3.mjs";
|
|
52
52
|
import {
|
|
53
53
|
getRoleId,
|
|
54
54
|
getStripePublishableKey
|
|
55
|
-
} from "../chunk-
|
|
55
|
+
} from "../chunk-MAWTFEY3.mjs";
|
|
56
56
|
import {
|
|
57
57
|
FeatureService,
|
|
58
58
|
StripeCustomerService,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
StripeSubscriptionService,
|
|
64
64
|
StripeUsageService,
|
|
65
65
|
cn
|
|
66
|
-
} from "../chunk-
|
|
66
|
+
} from "../chunk-P5TMD7GK.mjs";
|
|
67
67
|
import "../chunk-AUXK7QSA.mjs";
|
|
68
68
|
import "../chunk-C7C7VY4F.mjs";
|
|
69
69
|
import "../chunk-Z2CB63VG.mjs";
|
|
@@ -5637,6 +5637,8 @@ var Assistant = class extends AbstractApiData {
|
|
|
5637
5637
|
|
|
5638
5638
|
|
|
5639
5639
|
|
|
5640
|
+
|
|
5641
|
+
|
|
5640
5642
|
get title() {
|
|
5641
5643
|
return _nullishCoalesce(this._title, () => ( ""));
|
|
5642
5644
|
}
|
|
@@ -5646,6 +5648,12 @@ var Assistant = class extends AbstractApiData {
|
|
|
5646
5648
|
get engine() {
|
|
5647
5649
|
return this._engine;
|
|
5648
5650
|
}
|
|
5651
|
+
get boundContentType() {
|
|
5652
|
+
return this._boundContentType;
|
|
5653
|
+
}
|
|
5654
|
+
get boundContentId() {
|
|
5655
|
+
return this._boundContentId;
|
|
5656
|
+
}
|
|
5649
5657
|
rehydrate(data) {
|
|
5650
5658
|
super.rehydrate(data);
|
|
5651
5659
|
this._title = _optionalChain([data, 'access', _140 => _140.jsonApi, 'access', _141 => _141.attributes, 'optionalAccess', _142 => _142.title]);
|
|
@@ -5653,6 +5661,10 @@ var Assistant = class extends AbstractApiData {
|
|
|
5653
5661
|
const fromMeta = _optionalChain([data, 'access', _146 => _146.jsonApi, 'access', _147 => _147.meta, 'optionalAccess', _148 => _148.messageCount]);
|
|
5654
5662
|
const fromAttrs = _optionalChain([data, 'access', _149 => _149.jsonApi, 'access', _150 => _150.attributes, 'optionalAccess', _151 => _151.messageCount]);
|
|
5655
5663
|
this._messageCount = typeof fromMeta === "number" ? fromMeta : typeof fromAttrs === "number" ? fromAttrs : 0;
|
|
5664
|
+
const contentLinkage = _optionalChain([data, 'access', _152 => _152.jsonApi, 'access', _153 => _153.relationships, 'optionalAccess', _154 => _154.content, 'optionalAccess', _155 => _155.data]);
|
|
5665
|
+
const boundContent = Array.isArray(contentLinkage) ? contentLinkage[0] : contentLinkage;
|
|
5666
|
+
this._boundContentType = _optionalChain([boundContent, 'optionalAccess', _156 => _156.type]);
|
|
5667
|
+
this._boundContentId = _optionalChain([boundContent, 'optionalAccess', _157 => _157.id]);
|
|
5656
5668
|
return this;
|
|
5657
5669
|
}
|
|
5658
5670
|
createJsonApi(data) {
|
|
@@ -5660,11 +5672,20 @@ var Assistant = class extends AbstractApiData {
|
|
|
5660
5672
|
data: {
|
|
5661
5673
|
type: Modules.Assistant.name,
|
|
5662
5674
|
attributes: {
|
|
5663
|
-
|
|
5675
|
+
// narr8 convention for BlockNote-backed fields: the document travels
|
|
5676
|
+
// as a JSON string in the entity's own string attribute, exactly as
|
|
5677
|
+
// Npc.description does (`JSON.stringify` out, `JSON.parse` back).
|
|
5678
|
+
// The server detects the shape and derives the stored markdown.
|
|
5679
|
+
content: data.contentBlocks !== void 0 ? JSON.stringify(data.contentBlocks) : data.firstMessage,
|
|
5664
5680
|
...data.title !== void 0 ? { title: data.title } : {},
|
|
5665
5681
|
...data.howToMode !== void 0 ? { howToMode: data.howToMode } : {},
|
|
5666
5682
|
...data.limitToHowToId !== void 0 ? { limitToHowToId: data.limitToHowToId } : {}
|
|
5667
|
-
}
|
|
5683
|
+
},
|
|
5684
|
+
...data.boundContent !== void 0 ? {
|
|
5685
|
+
relationships: {
|
|
5686
|
+
content: { data: { type: data.boundContent.type, id: data.boundContent.id } }
|
|
5687
|
+
}
|
|
5688
|
+
} : {}
|
|
5668
5689
|
},
|
|
5669
5690
|
included: []
|
|
5670
5691
|
};
|
|
@@ -5757,11 +5778,11 @@ var AssistantMessage = (_class19 = class _AssistantMessage extends AbstractApiDa
|
|
|
5757
5778
|
this._inputTokens = attrs.inputTokens;
|
|
5758
5779
|
this._outputTokens = attrs.outputTokens;
|
|
5759
5780
|
this._messageType = attrs.messageType;
|
|
5760
|
-
const actionRelationship = _optionalChain([data, 'access',
|
|
5761
|
-
this._actionId = Array.isArray(actionRelationship) ? _optionalChain([actionRelationship, 'access',
|
|
5781
|
+
const actionRelationship = _optionalChain([data, 'access', _158 => _158.jsonApi, 'access', _159 => _159.relationships, 'optionalAccess', _160 => _160.action, 'optionalAccess', _161 => _161.data]);
|
|
5782
|
+
this._actionId = Array.isArray(actionRelationship) ? _optionalChain([actionRelationship, 'access', _162 => _162[0], 'optionalAccess', _163 => _163.id]) : _optionalChain([actionRelationship, 'optionalAccess', _164 => _164.id]);
|
|
5762
5783
|
const refs = this._readIncludedPolymorphic(data, "references", resolveReferenceableModules());
|
|
5763
5784
|
this._references = Array.isArray(refs) ? refs : refs ? [refs] : [];
|
|
5764
|
-
if (_optionalChain([data, 'access',
|
|
5785
|
+
if (_optionalChain([data, 'access', _165 => _165.jsonApi, 'access', _166 => _166.relationships, 'optionalAccess', _167 => _167.citations, 'optionalAccess', _168 => _168.data])) {
|
|
5765
5786
|
const citations = this._readIncludedWithMeta(
|
|
5766
5787
|
data,
|
|
5767
5788
|
"citations",
|
|
@@ -5803,7 +5824,11 @@ var AssistantMessage = (_class19 = class _AssistantMessage extends AbstractApiDa
|
|
|
5803
5824
|
data: {
|
|
5804
5825
|
type: Modules.AssistantMessage.name,
|
|
5805
5826
|
attributes: {
|
|
5806
|
-
|
|
5827
|
+
// narr8 convention for BlockNote-backed fields: the document travels
|
|
5828
|
+
// as a JSON string in the field's own string attribute (see
|
|
5829
|
+
// Npc.description). The server detects the shape and derives the
|
|
5830
|
+
// stored markdown from it.
|
|
5831
|
+
content: params.contentBlocks !== void 0 ? JSON.stringify(params.contentBlocks) : params.content,
|
|
5807
5832
|
...params.howToMode !== void 0 ? { howToMode: params.howToMode } : {},
|
|
5808
5833
|
...params.limitToHowToId !== void 0 ? { limitToHowToId: params.limitToHowToId } : {}
|
|
5809
5834
|
}
|
|
@@ -5844,9 +5869,16 @@ var AssistantService = class extends AbstractService {
|
|
|
5844
5869
|
endpoint: new EndpointCreator({ endpoint: Modules.Assistant, id: params.id }).generate()
|
|
5845
5870
|
});
|
|
5846
5871
|
}
|
|
5872
|
+
/**
|
|
5873
|
+
* Lists threads. `boundType`/`boundId` narrow the list to the threads bound
|
|
5874
|
+
* to one resource (e.g. a campaign), so a scoped surface never shows the
|
|
5875
|
+
* user's unrelated threads.
|
|
5876
|
+
*/
|
|
5847
5877
|
static async findMany(params = {}) {
|
|
5848
5878
|
const endpoint = new EndpointCreator({ endpoint: Modules.Assistant });
|
|
5849
5879
|
if (params.fetchAll) endpoint.addAdditionalParam("fetchAll", "true");
|
|
5880
|
+
if (params.boundType) endpoint.addAdditionalParam("boundType", params.boundType);
|
|
5881
|
+
if (params.boundId) endpoint.addAdditionalParam("boundId", params.boundId);
|
|
5850
5882
|
return this.callApi({
|
|
5851
5883
|
type: Modules.Assistant,
|
|
5852
5884
|
method: "GET" /* GET */,
|
|
@@ -5895,7 +5927,8 @@ var AssistantService = class extends AbstractService {
|
|
|
5895
5927
|
input: message.createAppendMessageJsonApi({
|
|
5896
5928
|
content: params.content,
|
|
5897
5929
|
howToMode: params.howToMode,
|
|
5898
|
-
limitToHowToId: params.limitToHowToId
|
|
5930
|
+
limitToHowToId: params.limitToHowToId,
|
|
5931
|
+
contentBlocks: params.contentBlocks
|
|
5899
5932
|
}),
|
|
5900
5933
|
overridesJsonApiCreation: true
|
|
5901
5934
|
});
|
|
@@ -5916,7 +5949,10 @@ var AssistantService = class extends AbstractService {
|
|
|
5916
5949
|
id: params.assistantId,
|
|
5917
5950
|
childEndpoint: Modules.AssistantMessage
|
|
5918
5951
|
}).generate(),
|
|
5919
|
-
input: message.createAppendMessageJsonApi({
|
|
5952
|
+
input: message.createAppendMessageJsonApi({
|
|
5953
|
+
content: params.content,
|
|
5954
|
+
contentBlocks: params.contentBlocks
|
|
5955
|
+
}),
|
|
5920
5956
|
overridesJsonApiCreation: true
|
|
5921
5957
|
});
|
|
5922
5958
|
}
|
|
@@ -5986,9 +6022,9 @@ var AssistantMessageService = class extends AbstractService {
|
|
|
5986
6022
|
id: params.assistantId,
|
|
5987
6023
|
childEndpoint: Modules.AssistantMessage
|
|
5988
6024
|
});
|
|
5989
|
-
if (_optionalChain([Modules, 'access',
|
|
6025
|
+
if (_optionalChain([Modules, 'access', _169 => _169.AssistantMessage, 'access', _170 => _170.inclusions, 'optionalAccess', _171 => _171.lists, 'optionalAccess', _172 => _172.fields]))
|
|
5990
6026
|
endpoint.limitToFields(Modules.AssistantMessage.inclusions.lists.fields);
|
|
5991
|
-
if (_optionalChain([Modules, 'access',
|
|
6027
|
+
if (_optionalChain([Modules, 'access', _173 => _173.AssistantMessage, 'access', _174 => _174.inclusions, 'optionalAccess', _175 => _175.lists, 'optionalAccess', _176 => _176.types]))
|
|
5992
6028
|
endpoint.limitToType(Modules.AssistantMessage.inclusions.lists.types);
|
|
5993
6029
|
return this.callApi({
|
|
5994
6030
|
type: Modules.AssistantMessage,
|
|
@@ -6002,9 +6038,9 @@ var AssistantMessageService = class extends AbstractService {
|
|
|
6002
6038
|
endpoint: Modules.AssistantMessage,
|
|
6003
6039
|
id: params.id
|
|
6004
6040
|
});
|
|
6005
|
-
if (_optionalChain([Modules, 'access',
|
|
6041
|
+
if (_optionalChain([Modules, 'access', _177 => _177.AssistantMessage, 'access', _178 => _178.inclusions, 'optionalAccess', _179 => _179.lists, 'optionalAccess', _180 => _180.fields]))
|
|
6006
6042
|
endpoint.limitToFields(Modules.AssistantMessage.inclusions.lists.fields);
|
|
6007
|
-
if (_optionalChain([Modules, 'access',
|
|
6043
|
+
if (_optionalChain([Modules, 'access', _181 => _181.AssistantMessage, 'access', _182 => _182.inclusions, 'optionalAccess', _183 => _183.lists, 'optionalAccess', _184 => _184.types]))
|
|
6008
6044
|
endpoint.limitToType(Modules.AssistantMessage.inclusions.lists.types);
|
|
6009
6045
|
return this.callApi({
|
|
6010
6046
|
type: Modules.AssistantMessage,
|
|
@@ -6024,6 +6060,119 @@ var AssistantMessageService = class extends AbstractService {
|
|
|
6024
6060
|
}
|
|
6025
6061
|
};
|
|
6026
6062
|
|
|
6063
|
+
// src/features/assistant-action/AssistantActionModule.ts
|
|
6064
|
+
|
|
6065
|
+
|
|
6066
|
+
// src/features/assistant-action/data/AssistantAction.ts
|
|
6067
|
+
var AssistantAction = class extends AbstractApiData {
|
|
6068
|
+
static {
|
|
6069
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "AssistantAction");
|
|
6070
|
+
}
|
|
6071
|
+
|
|
6072
|
+
|
|
6073
|
+
|
|
6074
|
+
|
|
6075
|
+
|
|
6076
|
+
get status() {
|
|
6077
|
+
return _nullishCoalesce(this._status, () => ( "expired"));
|
|
6078
|
+
}
|
|
6079
|
+
get toolName() {
|
|
6080
|
+
return _nullishCoalesce(this._toolName, () => ( ""));
|
|
6081
|
+
}
|
|
6082
|
+
get summary() {
|
|
6083
|
+
return _nullishCoalesce(this._summary, () => ( ""));
|
|
6084
|
+
}
|
|
6085
|
+
get resolvedAt() {
|
|
6086
|
+
return this._resolvedAt;
|
|
6087
|
+
}
|
|
6088
|
+
get expiresAt() {
|
|
6089
|
+
return this._expiresAt;
|
|
6090
|
+
}
|
|
6091
|
+
rehydrate(data) {
|
|
6092
|
+
super.rehydrate(data);
|
|
6093
|
+
this._status = data.jsonApi.attributes.status;
|
|
6094
|
+
this._toolName = data.jsonApi.attributes.toolName;
|
|
6095
|
+
this._summary = data.jsonApi.attributes.summary;
|
|
6096
|
+
this._resolvedAt = data.jsonApi.attributes.resolvedAt ? new Date(data.jsonApi.attributes.resolvedAt) : void 0;
|
|
6097
|
+
this._expiresAt = data.jsonApi.attributes.expiresAt ? new Date(data.jsonApi.attributes.expiresAt) : void 0;
|
|
6098
|
+
return this;
|
|
6099
|
+
}
|
|
6100
|
+
/**
|
|
6101
|
+
* Minimal payload (id only): the frontend never POSTs assistant actions —
|
|
6102
|
+
* approve/deny are body-less POSTs handled by AssistantActionService.
|
|
6103
|
+
*/
|
|
6104
|
+
createJsonApi(data) {
|
|
6105
|
+
return {
|
|
6106
|
+
data: {
|
|
6107
|
+
type: Modules.AssistantAction.name,
|
|
6108
|
+
id: data.id,
|
|
6109
|
+
attributes: {}
|
|
6110
|
+
},
|
|
6111
|
+
included: []
|
|
6112
|
+
};
|
|
6113
|
+
}
|
|
6114
|
+
};
|
|
6115
|
+
|
|
6116
|
+
// src/features/assistant-action/AssistantActionModule.ts
|
|
6117
|
+
var AssistantActionModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
6118
|
+
pageUrl: "/assistant-actions",
|
|
6119
|
+
name: "assistant-actions",
|
|
6120
|
+
model: AssistantAction,
|
|
6121
|
+
identifier: ["summary"],
|
|
6122
|
+
moduleId: "e3c27517-bac0-43cb-adff-cc20c4210c12",
|
|
6123
|
+
icon: _lucidereact.ShieldCheckIcon
|
|
6124
|
+
}), "AssistantActionModule");
|
|
6125
|
+
|
|
6126
|
+
// src/features/assistant-action/data/AssistantActionService.ts
|
|
6127
|
+
var AssistantActionService = class extends AbstractService {
|
|
6128
|
+
static {
|
|
6129
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "AssistantActionService");
|
|
6130
|
+
}
|
|
6131
|
+
/**
|
|
6132
|
+
* GET single assistant action by ID
|
|
6133
|
+
*/
|
|
6134
|
+
static async findOne(params) {
|
|
6135
|
+
return this.callApi({
|
|
6136
|
+
type: Modules.AssistantAction,
|
|
6137
|
+
method: "GET" /* GET */,
|
|
6138
|
+
endpoint: new EndpointCreator({
|
|
6139
|
+
endpoint: Modules.AssistantAction,
|
|
6140
|
+
id: params.id
|
|
6141
|
+
}).generate()
|
|
6142
|
+
});
|
|
6143
|
+
}
|
|
6144
|
+
/**
|
|
6145
|
+
* POST (body-less) approve action — resumes the paused run and
|
|
6146
|
+
* returns the resumed assistant message.
|
|
6147
|
+
*/
|
|
6148
|
+
static async approve(params) {
|
|
6149
|
+
return this.callApi({
|
|
6150
|
+
type: Modules.AssistantMessage,
|
|
6151
|
+
method: "POST" /* POST */,
|
|
6152
|
+
endpoint: new EndpointCreator({
|
|
6153
|
+
endpoint: Modules.AssistantAction,
|
|
6154
|
+
id: params.id,
|
|
6155
|
+
childEndpoint: "approve"
|
|
6156
|
+
}).generate()
|
|
6157
|
+
});
|
|
6158
|
+
}
|
|
6159
|
+
/**
|
|
6160
|
+
* POST (body-less) deny action — resumes the paused run with a denial and
|
|
6161
|
+
* returns the resumed assistant message.
|
|
6162
|
+
*/
|
|
6163
|
+
static async deny(params) {
|
|
6164
|
+
return this.callApi({
|
|
6165
|
+
type: Modules.AssistantMessage,
|
|
6166
|
+
method: "POST" /* POST */,
|
|
6167
|
+
endpoint: new EndpointCreator({
|
|
6168
|
+
endpoint: Modules.AssistantAction,
|
|
6169
|
+
id: params.id,
|
|
6170
|
+
childEndpoint: "deny"
|
|
6171
|
+
}).generate()
|
|
6172
|
+
});
|
|
6173
|
+
}
|
|
6174
|
+
};
|
|
6175
|
+
|
|
6027
6176
|
// src/features/chunk/ChunkModule.ts
|
|
6028
6177
|
|
|
6029
6178
|
|
|
@@ -6206,10 +6355,10 @@ var Notification = class extends AbstractApiData {
|
|
|
6206
6355
|
this._message = data.jsonApi.attributes.message;
|
|
6207
6356
|
this._actionUrl = data.jsonApi.attributes.actionUrl;
|
|
6208
6357
|
const rels = _nullishCoalesce(data.jsonApi.relationships, () => ( {}));
|
|
6209
|
-
const actorType = _optionalChain([rels, 'access',
|
|
6358
|
+
const actorType = _optionalChain([rels, 'access', _185 => _185.actor, 'optionalAccess', _186 => _186.data, 'optionalAccess', _187 => _187.type]);
|
|
6210
6359
|
this._actor = actorType ? this._readIncluded(data, "actor", Modules.findByName(actorType)) : void 0;
|
|
6211
|
-
const subjectName = Object.keys(rels).find((name) => name !== "actor" && _optionalChain([rels, 'access',
|
|
6212
|
-
const subjectType = subjectName ? _optionalChain([rels, 'access',
|
|
6360
|
+
const subjectName = Object.keys(rels).find((name) => name !== "actor" && _optionalChain([rels, 'access', _188 => _188[name], 'optionalAccess', _189 => _189.data, 'optionalAccess', _190 => _190.type]));
|
|
6361
|
+
const subjectType = subjectName ? _optionalChain([rels, 'access', _191 => _191[subjectName], 'optionalAccess', _192 => _192.data, 'optionalAccess', _193 => _193.type]) : void 0;
|
|
6213
6362
|
this._subject = subjectName && subjectType ? this._readIncluded(data, subjectName, Modules.findByName(subjectType)) : void 0;
|
|
6214
6363
|
return this;
|
|
6215
6364
|
}
|
|
@@ -6769,8 +6918,8 @@ var UserService = class extends AbstractService {
|
|
|
6769
6918
|
id: params.id,
|
|
6770
6919
|
childEndpoint: "user-relevance"
|
|
6771
6920
|
});
|
|
6772
|
-
if (_optionalChain([Modules, 'access',
|
|
6773
|
-
if (_optionalChain([Modules, 'access',
|
|
6921
|
+
if (_optionalChain([Modules, 'access', _194 => _194.User, 'access', _195 => _195.inclusions, 'optionalAccess', _196 => _196.lists, 'optionalAccess', _197 => _197.fields])) endpoint.limitToFields(Modules.User.inclusions.lists.fields);
|
|
6922
|
+
if (_optionalChain([Modules, 'access', _198 => _198.User, 'access', _199 => _199.inclusions, 'optionalAccess', _200 => _200.lists, 'optionalAccess', _201 => _201.types])) endpoint.limitToType(Modules.User.inclusions.lists.types);
|
|
6774
6923
|
return this.callApi({
|
|
6775
6924
|
type: Modules.User,
|
|
6776
6925
|
method: "GET" /* GET */,
|
|
@@ -7029,7 +7178,7 @@ var OAuthService = class extends AbstractService {
|
|
|
7029
7178
|
type: Modules.OAuth,
|
|
7030
7179
|
method: "GET" /* GET */,
|
|
7031
7180
|
endpoint: new EndpointCreator({ endpoint: "oauth/clients" }).generate(),
|
|
7032
|
-
next: _optionalChain([params, 'optionalAccess',
|
|
7181
|
+
next: _optionalChain([params, 'optionalAccess', _202 => _202.next])
|
|
7033
7182
|
});
|
|
7034
7183
|
}
|
|
7035
7184
|
/**
|
|
@@ -7055,7 +7204,7 @@ var OAuthService = class extends AbstractService {
|
|
|
7055
7204
|
});
|
|
7056
7205
|
return {
|
|
7057
7206
|
client: result.data,
|
|
7058
|
-
clientSecret: _optionalChain([result, 'access',
|
|
7207
|
+
clientSecret: _optionalChain([result, 'access', _203 => _203.meta, 'optionalAccess', _204 => _204.clientSecret])
|
|
7059
7208
|
};
|
|
7060
7209
|
}
|
|
7061
7210
|
/**
|
|
@@ -7094,7 +7243,7 @@ var OAuthService = class extends AbstractService {
|
|
|
7094
7243
|
}).generate()
|
|
7095
7244
|
});
|
|
7096
7245
|
return {
|
|
7097
|
-
clientSecret: _optionalChain([result, 'access',
|
|
7246
|
+
clientSecret: _optionalChain([result, 'access', _205 => _205.meta, 'optionalAccess', _206 => _206.clientSecret])
|
|
7098
7247
|
};
|
|
7099
7248
|
}
|
|
7100
7249
|
// ==========================================
|
|
@@ -7138,7 +7287,7 @@ var OAuthService = class extends AbstractService {
|
|
|
7138
7287
|
overridesJsonApiCreation: true
|
|
7139
7288
|
});
|
|
7140
7289
|
return {
|
|
7141
|
-
redirectUrl: _optionalChain([result, 'access',
|
|
7290
|
+
redirectUrl: _optionalChain([result, 'access', _207 => _207.meta, 'optionalAccess', _208 => _208.redirectUrl])
|
|
7142
7291
|
};
|
|
7143
7292
|
}
|
|
7144
7293
|
/**
|
|
@@ -7158,7 +7307,7 @@ var OAuthService = class extends AbstractService {
|
|
|
7158
7307
|
overridesJsonApiCreation: true
|
|
7159
7308
|
});
|
|
7160
7309
|
return {
|
|
7161
|
-
redirectUrl: _optionalChain([result, 'access',
|
|
7310
|
+
redirectUrl: _optionalChain([result, 'access', _209 => _209.meta, 'optionalAccess', _210 => _210.redirectUrl])
|
|
7162
7311
|
};
|
|
7163
7312
|
}
|
|
7164
7313
|
};
|
|
@@ -7342,15 +7491,15 @@ var WaitlistService = class extends AbstractService {
|
|
|
7342
7491
|
*/
|
|
7343
7492
|
static async findMany(params) {
|
|
7344
7493
|
const endpoint = new EndpointCreator({ endpoint: Modules.Waitlist });
|
|
7345
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
7346
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
7347
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
7494
|
+
if (_optionalChain([params, 'optionalAccess', _211 => _211.status])) endpoint.addAdditionalParam("status", params.status);
|
|
7495
|
+
if (_optionalChain([params, 'optionalAccess', _212 => _212.search])) endpoint.addAdditionalParam("search", params.search);
|
|
7496
|
+
if (_optionalChain([params, 'optionalAccess', _213 => _213.fetchAll])) endpoint.addAdditionalParam("fetchAll", "true");
|
|
7348
7497
|
return this.callApi({
|
|
7349
7498
|
type: Modules.Waitlist,
|
|
7350
7499
|
method: "GET" /* GET */,
|
|
7351
7500
|
endpoint: endpoint.generate(),
|
|
7352
|
-
next: _optionalChain([params, 'optionalAccess',
|
|
7353
|
-
previous: _optionalChain([params, 'optionalAccess',
|
|
7501
|
+
next: _optionalChain([params, 'optionalAccess', _214 => _214.next]),
|
|
7502
|
+
previous: _optionalChain([params, 'optionalAccess', _215 => _215.prev])
|
|
7354
7503
|
});
|
|
7355
7504
|
}
|
|
7356
7505
|
/**
|
|
@@ -7418,10 +7567,10 @@ var WaitlistService = class extends AbstractService {
|
|
|
7418
7567
|
method: "GET" /* GET */,
|
|
7419
7568
|
endpoint: endpoint.generate()
|
|
7420
7569
|
});
|
|
7421
|
-
const attributes = _optionalChain([response, 'access',
|
|
7570
|
+
const attributes = _optionalChain([response, 'access', _216 => _216.data, 'optionalAccess', _217 => _217._jsonApi, 'optionalAccess', _218 => _218.attributes]);
|
|
7422
7571
|
return {
|
|
7423
|
-
email: _optionalChain([attributes, 'optionalAccess',
|
|
7424
|
-
valid: _nullishCoalesce(_optionalChain([attributes, 'optionalAccess',
|
|
7572
|
+
email: _optionalChain([attributes, 'optionalAccess', _219 => _219.email]),
|
|
7573
|
+
valid: _nullishCoalesce(_optionalChain([attributes, 'optionalAccess', _220 => _220.valid]), () => ( false))
|
|
7425
7574
|
};
|
|
7426
7575
|
} catch (_error) {
|
|
7427
7576
|
return null;
|
|
@@ -7507,7 +7656,7 @@ var PermissionMapping = class extends AbstractApiData {
|
|
|
7507
7656
|
super.rehydrate(data);
|
|
7508
7657
|
this._roleId = data.jsonApi.attributes.roleId;
|
|
7509
7658
|
this._moduleId = data.jsonApi.attributes.moduleId;
|
|
7510
|
-
this._permissions = _optionalChain([data, 'access',
|
|
7659
|
+
this._permissions = _optionalChain([data, 'access', _221 => _221.jsonApi, 'access', _222 => _222.meta, 'optionalAccess', _223 => _223.permissions]);
|
|
7511
7660
|
return this;
|
|
7512
7661
|
}
|
|
7513
7662
|
};
|
|
@@ -8214,5 +8363,8 @@ var AuditLogModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (facto
|
|
|
8214
8363
|
|
|
8215
8364
|
|
|
8216
8365
|
|
|
8217
|
-
|
|
8218
|
-
|
|
8366
|
+
|
|
8367
|
+
|
|
8368
|
+
|
|
8369
|
+
exports.RehydrationFactory = RehydrationFactory; exports.AbstractApiData = AbstractApiData; exports.HttpMethod = HttpMethod; exports.getLastApiTotal = getLastApiTotal; exports.clearLastApiTotal = clearLastApiTotal; exports.getLastApiMeta = getLastApiMeta; exports.clearLastApiMeta = clearLastApiMeta; exports.setGlobalErrorHandler = setGlobalErrorHandler; exports.getGlobalErrorHandler = getGlobalErrorHandler; exports.AbstractService = AbstractService; exports.configureClientJsonApi = configureClientJsonApi; exports.getClientApiUrl = getClientApiUrl; exports.getClientAppUrl = getClientAppUrl; exports.getClientTrackablePages = getClientTrackablePages; exports.buildClientUrl = buildClientUrl; 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.MOBILE_BREAKPOINT = MOBILE_BREAKPOINT; exports.VIEWPORT_COOKIE_NAME = VIEWPORT_COOKIE_NAME; exports.getViewportContext = getViewportContext; exports.measureViewport = measureViewport; exports.persistViewport = persistViewport; exports.subscribeViewport = subscribeViewport; exports.useIsMobile = useIsMobile; exports.formatLocalDate = formatLocalDate; 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.validatePartitaIva = validatePartitaIva; exports.validateCodiceFiscale = validateCodiceFiscale; exports.validateItalianTaxCode = validateItalianTaxCode; exports.formatPartitaIva = formatPartitaIva; exports.formatCodiceFiscale = formatCodiceFiscale; 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.AssistantMessage = AssistantMessage; exports.AssistantService = AssistantService; exports.AssistantMessageModule = AssistantMessageModule; exports.AssistantMessageService = AssistantMessageService; exports.AssistantAction = AssistantAction; exports.AssistantActionModule = AssistantActionModule; exports.AssistantActionService = AssistantActionService; exports.Chunk = Chunk; exports.ChunkModule = ChunkModule; 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.RbacMatrixModel = RbacMatrixModel; exports.PermissionMappingModule = PermissionMappingModule; exports.ModulePathsModule = ModulePathsModule; exports.RbacMatrixModule = RbacMatrixModule; exports.ReferralStats = ReferralStats; exports.ReferralService = ReferralService; exports.ReferralModule = ReferralModule; exports.ReferralStatsModule = ReferralStatsModule; exports.TokenUsageAdminBreakdown = TokenUsageAdminBreakdown; exports.TokenUsageAdminSummary = TokenUsageAdminSummary; exports.TokenUsageAdminTimeline = TokenUsageAdminTimeline; exports.TokenUsageAdminSummaryModule = TokenUsageAdminSummaryModule; exports.TokenUsageAdminTimelineModule = TokenUsageAdminTimelineModule; exports.TokenUsageAdminBreakdownModule = TokenUsageAdminBreakdownModule; exports.AuditLog = AuditLog; exports.AuditLogService = AuditLogService; exports.AuditLogModule = AuditLogModule;
|
|
8370
|
+
//# sourceMappingURL=chunk-6YIZX26T.js.map
|