@memberjunction/graphql-dataprovider 5.44.0 → 5.45.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/index.d.cts CHANGED
@@ -1266,7 +1266,7 @@ declare class GraphQLDataProvider extends ProviderBase implements IEntityDataPro
1266
1266
  */
1267
1267
  declare function setupGraphQLClient(config: GraphQLProviderConfigData): Promise<GraphQLDataProvider>;
1268
1268
 
1269
- declare const PACKAGE_VERSION = "5.44.0";
1269
+ declare const PACKAGE_VERSION = "5.45.1";
1270
1270
 
1271
1271
  declare class GraphQLTransactionGroup extends TransactionGroupBase {
1272
1272
  private _provider;
@@ -1892,7 +1892,7 @@ declare class GraphQLSystemUserClient {
1892
1892
  */
1893
1893
  GetQueryDataByName(input: GetQueryDataByNameSystemUserInput): Promise<RunQuerySystemUserResult>;
1894
1894
  /**
1895
- * Creates a new query using the CreateQuerySystemUser mutation. This method is restricted to system users only.
1895
+ * Creates a new query using the CreateQueryExtended mutation. This method is restricted to system users only.
1896
1896
  * @param input - CreateQuerySystemUserInput containing all the query attributes including optional CategoryPath
1897
1897
  * @returns Promise containing the result of the query creation
1898
1898
  */
@@ -1904,7 +1904,7 @@ declare class GraphQLSystemUserClient {
1904
1904
  */
1905
1905
  UpdateQuery(input: UpdateQueryInput): Promise<UpdateQueryResult>;
1906
1906
  /**
1907
- * Deletes a query by ID using the DeleteQuerySystemResolver mutation. This method is restricted to system users only.
1907
+ * Deletes a query by ID using the DeleteQueryExtended mutation. This method is restricted to system users only.
1908
1908
  * @param ID - The ID of the query to delete
1909
1909
  * @param options - Optional delete options controlling action execution
1910
1910
  * @returns Promise containing the result of the query deletion
package/dist/index.d.mts CHANGED
@@ -1266,7 +1266,7 @@ declare class GraphQLDataProvider extends ProviderBase implements IEntityDataPro
1266
1266
  */
1267
1267
  declare function setupGraphQLClient(config: GraphQLProviderConfigData): Promise<GraphQLDataProvider>;
1268
1268
 
1269
- declare const PACKAGE_VERSION = "5.44.0";
1269
+ declare const PACKAGE_VERSION = "5.45.1";
1270
1270
 
1271
1271
  declare class GraphQLTransactionGroup extends TransactionGroupBase {
1272
1272
  private _provider;
@@ -1892,7 +1892,7 @@ declare class GraphQLSystemUserClient {
1892
1892
  */
1893
1893
  GetQueryDataByName(input: GetQueryDataByNameSystemUserInput): Promise<RunQuerySystemUserResult>;
1894
1894
  /**
1895
- * Creates a new query using the CreateQuerySystemUser mutation. This method is restricted to system users only.
1895
+ * Creates a new query using the CreateQueryExtended mutation. This method is restricted to system users only.
1896
1896
  * @param input - CreateQuerySystemUserInput containing all the query attributes including optional CategoryPath
1897
1897
  * @returns Promise containing the result of the query creation
1898
1898
  */
@@ -1904,7 +1904,7 @@ declare class GraphQLSystemUserClient {
1904
1904
  */
1905
1905
  UpdateQuery(input: UpdateQueryInput): Promise<UpdateQueryResult>;
1906
1906
  /**
1907
- * Deletes a query by ID using the DeleteQuerySystemResolver mutation. This method is restricted to system users only.
1907
+ * Deletes a query by ID using the DeleteQueryExtended mutation. This method is restricted to system users only.
1908
1908
  * @param ID - The ID of the query to delete
1909
1909
  * @param options - Optional delete options controlling action execution
1910
1910
  * @returns Promise containing the result of the query deletion
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- var se=Object.defineProperty;var d=(g,e)=>se(g,"name",{value:e,configurable:!0});import{gql as c,GraphQLClient as k}from"graphql-request";import{gql as ht}from"graphql-request";import{TransactionGroupBase as ne,TransactionResult as ae,LogError as l,LogStatus as A,LogErrorEx as P,ProviderBase as oe,UserInfo as q,getGraphQLTypeNameBase as T,ProviderType as ie,BaseEntityResult as G,EntityFieldTSType as N,TransactionItem as K,CompositeKey as ce,UserRoleInfo as ue,InMemoryLocalStorageProvider as le,BaseEntity as de,ProviderConfigDataBase as ye,SetProvider as me,StartupManager as ge,IsPlatformSQL as Se,IsVerboseLoggingEnabled as pe}from"@memberjunction/core";import{SafeJSONParse as D,CleanAndParseJSON as he,GetGlobalObjectStore as B,MJGlobal as j,MJEventType as J}from"@memberjunction/global";import{ViewInfo as W}from"@memberjunction/core-entities";import{BehaviorSubject as Ie,Observable as x,Subject as fe,Subscription as Re}from"rxjs";import{createClient as Ee}from"graphql-ws";import{v4 as De}from"uuid";import{openDB as ve}from"@tempfix/idb";class M{static{d(this,"FieldMapper")}static{this.DB_PREFIX="__mj_"}static{this.GQL_PREFIX="_mj__"}constructor(){}MapFields(e){if(e)for(const t in e){const r=this.MapFieldName(t);r!==t&&(e[r]=e[t],delete e[t])}return e}MapFieldName(e){return e.startsWith(M.DB_PREFIX)?M.GQL_PREFIX+e.substring(M.DB_PREFIX.length):e}ReverseMapFieldName(e){return e.startsWith(M.GQL_PREFIX)?M.DB_PREFIX+e.substring(M.GQL_PREFIX.length):e}ReverseMapFields(e){for(const t in e){const r=this.ReverseMapFieldName(t);r!==t&&(e[r]=e[t],delete e[t])}return e}}class z extends ne{static{d(this,"GraphQLTransactionGroup")}constructor(e){super(),this._provider=e}async HandleSubmit(){const e=c`
1
+ var se=Object.defineProperty;var d=(g,e)=>se(g,"name",{value:e,configurable:!0});import{gql as c,GraphQLClient as k}from"graphql-request";import{gql as ht}from"graphql-request";import{TransactionGroupBase as ne,TransactionResult as ae,LogError as l,LogStatus as A,LogErrorEx as P,ProviderBase as oe,UserInfo as q,getGraphQLTypeNameBase as T,ProviderType as ie,BaseEntityResult as U,EntityFieldTSType as N,TransactionItem as K,CompositeKey as ce,UserRoleInfo as ue,InMemoryLocalStorageProvider as le,BaseEntity as de,ProviderConfigDataBase as ye,SetProvider as me,StartupManager as ge,IsPlatformSQL as Se,IsVerboseLoggingEnabled as pe}from"@memberjunction/core";import{SafeJSONParse as D,CleanAndParseJSON as he,GetGlobalObjectStore as B,MJGlobal as j,MJEventType as J}from"@memberjunction/global";import{ViewInfo as W}from"@memberjunction/core-entities";import{BehaviorSubject as Ie,Observable as x,Subject as fe,Subscription as Re}from"rxjs";import{createClient as Ee}from"graphql-ws";import{v4 as De}from"uuid";import{openDB as ve}from"@tempfix/idb";class M{static{d(this,"FieldMapper")}static{this.DB_PREFIX="__mj_"}static{this.GQL_PREFIX="_mj__"}constructor(){}MapFields(e){if(e)for(const t in e){const r=this.MapFieldName(t);r!==t&&(e[r]=e[t],delete e[t])}return e}MapFieldName(e){return e.startsWith(M.DB_PREFIX)?M.GQL_PREFIX+e.substring(M.DB_PREFIX.length):e}ReverseMapFieldName(e){return e.startsWith(M.GQL_PREFIX)?M.DB_PREFIX+e.substring(M.GQL_PREFIX.length):e}ReverseMapFields(e){for(const t in e){const r=this.ReverseMapFieldName(t);r!==t&&(e[r]=e[t],delete e[t])}return e}}class z extends ne{static{d(this,"GraphQLTransactionGroup")}constructor(e){super(),this._provider=e}async HandleSubmit(){const e=c`
2
2
  mutation ExecuteTransactionGroup($group: TransactionInputType!) {
3
3
  ExecuteTransactionGroup(group: $group) {
4
4
  Success
@@ -305,7 +305,7 @@ var se=Object.defineProperty;var d=(g,e)=>se(g,"name",{value:e,configurable:!0})
305
305
  }
306
306
  }
307
307
  }
308
- `,r={entityDocumentID:e.entityDocumentID};e.maxRecords!==void 0&&(r.maxRecords=e.maxRecords),e.filter!==void 0&&(r.filter=e.filter);const s=await this._dataProvider.ExecuteGQL(t,r);if(!s?.FetchEntityVectors)throw new Error("Invalid response from server");return s.FetchEntityVectors}catch(t){const r=t;return l("GraphQLAIClient.FetchEntityVectors failed",void 0,r),{Success:!1,Results:[],TotalCount:0,ElapsedMs:0,ErrorMessage:r.message||"Unknown error"}}}}const F="5.44.0",w="default";class X{static{d(this,"BrowserStorageProviderBase")}constructor(){this._storage=new Map}getCategoryMap(e){const t=e||w;let r=this._storage.get(t);return r||(r=new Map,this._storage.set(t,r)),r}async GetItem(e,t){const s=this.getCategoryMap(t||w).get(e);return s===void 0?null:s}async GetItems(e,t){const r=new Map;if(e.length===0)return r;const s=this.getCategoryMap(t||w);for(const n of new Set(e)){const a=s.get(n);r.set(n,a===void 0?null:a)}return r}async SetItem(e,t,r){this.getCategoryMap(r||w).set(e,t)}async Remove(e,t){this.getCategoryMap(t||w).delete(e)}async ClearCategory(e){const t=e||w;this._storage.delete(t)}async GetCategoryKeys(e){const t=this._storage.get(e||w);return t?Array.from(t.keys()):[]}}const $e="MJ_Metadata",Pe=0;function Me(){try{const g=F.split("."),e=parseInt(g[0],10),t=parseInt(g[1],10);if(!Number.isFinite(e)||!Number.isFinite(t))throw new Error(`Could not parse major.minor from version "${F}"`);return e*1e3+t+Pe}catch(g){return P({error:g,message:"Failed to derive IDB version from PACKAGE_VERSION; using fallback 99999"}),99999}}d(Me,"computeIdbVersion");const Ae=Me(),Y=["mj:default","mj:Metadata","mj:RunViewCache","mj:RunQueryCache","mj:DatasetCache"];class Z extends X{static{d(this,"BrowserIndexedDBStorageProvider")}constructor(){super(),this._dbReady=!1,this.dbPromise=ve($e,Ae,{upgrade:d((e,t,r)=>{try{A(`[IDBCache] Upgrading IndexedDB schema v${t} \u2192 v${r} (package ${F}). Dropping all stores; caches will repopulate on first use.`);for(const s of Array.from(e.objectStoreNames))e.deleteObjectStore(s);for(const s of Y)e.objectStoreNames.contains(s)||e.createObjectStore(s)}catch(s){P({error:s,message:s?.message})}},"upgrade"),blocked:d((e,t)=>{A(`[IDBCache] Upgrade from v${e} to v${t} blocked by another tab. Close other tabs to allow the upgrade to proceed.`)},"blocked")}),this.dbPromise.then(e=>{this._dbReady=!0,e.onversionchange=()=>{A("[IDBCache] DB schema upgraded in another tab \u2014 closing local connection."),e.close(),this._dbReady=!1}}).catch(e=>{P({error:e,message:"IndexedDB initialization failed: "+e?.message})})}get IsReady(){return this._dbReady}isKnownCategory(e){const t=`mj:${e}`;return Y.includes(t)}getStoreName(e){const t=e||w;return this.isKnownCategory(t)?`mj:${t}`:"mj:default"}getStoreKey(e,t){const r=t||w;return this.isKnownCategory(r)?e:`[${r}]:${e}`}async SetItem(e,t,r){try{const s=await this.dbPromise,n=this.getStoreName(r),a=this.getStoreKey(e,r),i=s.transaction(n,"readwrite");await i.objectStore(n).put(t,a),await i.done}catch(s){P({error:s,message:s?.message})}}async GetItem(e,t){try{const r=await this.dbPromise,s=this.getStoreName(t),n=this.getStoreKey(e,t),a=await r.transaction(s).objectStore(s).get(n);return a===void 0?null:a}catch(r){return P({error:r,message:r?.message}),null}}async GetItems(e,t){const r=new Map;if(e.length===0)return r;try{const s=await this.dbPromise,n=this.getStoreName(t),a=Array.from(new Set(e)),i=a.map(f=>this.getStoreKey(f,t)),o=s.transaction(n,"readonly"),y=o.objectStore(n),u=i.map(f=>y.get(f)),h=await Promise.all(u);await o.done;for(let f=0;f<a.length;f++){const m=h[f];r.set(a[f],m===void 0?null:m)}return r}catch(s){P({error:s,message:s?.message});for(const n of new Set(e))r.set(n,null);return r}}async Remove(e,t){try{const r=await this.dbPromise,s=this.getStoreName(t),n=this.getStoreKey(e,t),a=r.transaction(s,"readwrite");await a.objectStore(s).delete(n),await a.done}catch(r){P({error:r,message:r?.message})}}async ClearCategory(e){try{const t=await this.dbPromise,r=e||w,s=this.getStoreName(e);if(this.isKnownCategory(r)){const n=t.transaction(s,"readwrite");await n.objectStore(s).clear(),await n.done}else{const n=`[${r}]:`,a=t.transaction("mj:default","readwrite"),i=a.objectStore("mj:default"),o=await i.getAllKeys();for(const y of o)typeof y=="string"&&y.startsWith(n)&&await i.delete(y);await a.done}}catch(t){P({error:t,message:t?.message})}}async GetCategoryKeys(e){try{const t=await this.dbPromise,r=e||w,s=this.getStoreName(e),i=await t.transaction(s,"readonly").objectStore(s).getAllKeys();if(this.isKnownCategory(r))return i.map(y=>String(y));const o=`[${r}]:`;return i.map(y=>String(y)).filter(y=>y.startsWith(o)).map(y=>y.slice(o.length))}catch(t){return P({error:t,message:t?.message}),[]}}}const b=new M,Ne=c`subscription RemoteOperationProgress($channelId: ID!) {
308
+ `,r={entityDocumentID:e.entityDocumentID};e.maxRecords!==void 0&&(r.maxRecords=e.maxRecords),e.filter!==void 0&&(r.filter=e.filter);const s=await this._dataProvider.ExecuteGQL(t,r);if(!s?.FetchEntityVectors)throw new Error("Invalid response from server");return s.FetchEntityVectors}catch(t){const r=t;return l("GraphQLAIClient.FetchEntityVectors failed",void 0,r),{Success:!1,Results:[],TotalCount:0,ElapsedMs:0,ErrorMessage:r.message||"Unknown error"}}}}const F="5.45.1",w="default";class X{static{d(this,"BrowserStorageProviderBase")}constructor(){this._storage=new Map}getCategoryMap(e){const t=e||w;let r=this._storage.get(t);return r||(r=new Map,this._storage.set(t,r)),r}async GetItem(e,t){const s=this.getCategoryMap(t||w).get(e);return s===void 0?null:s}async GetItems(e,t){const r=new Map;if(e.length===0)return r;const s=this.getCategoryMap(t||w);for(const n of new Set(e)){const a=s.get(n);r.set(n,a===void 0?null:a)}return r}async SetItem(e,t,r){this.getCategoryMap(r||w).set(e,t)}async Remove(e,t){this.getCategoryMap(t||w).delete(e)}async ClearCategory(e){const t=e||w;this._storage.delete(t)}async GetCategoryKeys(e){const t=this._storage.get(e||w);return t?Array.from(t.keys()):[]}}const $e="MJ_Metadata",Pe=0;function Me(){try{const g=F.split("."),e=parseInt(g[0],10),t=parseInt(g[1],10);if(!Number.isFinite(e)||!Number.isFinite(t))throw new Error(`Could not parse major.minor from version "${F}"`);return e*1e3+t+Pe}catch(g){return P({error:g,message:"Failed to derive IDB version from PACKAGE_VERSION; using fallback 99999"}),99999}}d(Me,"computeIdbVersion");const Ae=Me(),Y=["mj:default","mj:Metadata","mj:RunViewCache","mj:RunQueryCache","mj:DatasetCache"];class Z extends X{static{d(this,"BrowserIndexedDBStorageProvider")}constructor(){super(),this._dbReady=!1,this.dbPromise=ve($e,Ae,{upgrade:d((e,t,r)=>{try{A(`[IDBCache] Upgrading IndexedDB schema v${t} \u2192 v${r} (package ${F}). Dropping all stores; caches will repopulate on first use.`);for(const s of Array.from(e.objectStoreNames))e.deleteObjectStore(s);for(const s of Y)e.objectStoreNames.contains(s)||e.createObjectStore(s)}catch(s){P({error:s,message:s?.message})}},"upgrade"),blocked:d((e,t)=>{A(`[IDBCache] Upgrade from v${e} to v${t} blocked by another tab. Close other tabs to allow the upgrade to proceed.`)},"blocked")}),this.dbPromise.then(e=>{this._dbReady=!0,e.onversionchange=()=>{A("[IDBCache] DB schema upgraded in another tab \u2014 closing local connection."),e.close(),this._dbReady=!1}}).catch(e=>{P({error:e,message:"IndexedDB initialization failed: "+e?.message})})}get IsReady(){return this._dbReady}isKnownCategory(e){const t=`mj:${e}`;return Y.includes(t)}getStoreName(e){const t=e||w;return this.isKnownCategory(t)?`mj:${t}`:"mj:default"}getStoreKey(e,t){const r=t||w;return this.isKnownCategory(r)?e:`[${r}]:${e}`}async SetItem(e,t,r){try{const s=await this.dbPromise,n=this.getStoreName(r),a=this.getStoreKey(e,r),i=s.transaction(n,"readwrite");await i.objectStore(n).put(t,a),await i.done}catch(s){P({error:s,message:s?.message})}}async GetItem(e,t){try{const r=await this.dbPromise,s=this.getStoreName(t),n=this.getStoreKey(e,t),a=await r.transaction(s).objectStore(s).get(n);return a===void 0?null:a}catch(r){return P({error:r,message:r?.message}),null}}async GetItems(e,t){const r=new Map;if(e.length===0)return r;try{const s=await this.dbPromise,n=this.getStoreName(t),a=Array.from(new Set(e)),i=a.map(f=>this.getStoreKey(f,t)),o=s.transaction(n,"readonly"),y=o.objectStore(n),u=i.map(f=>y.get(f)),h=await Promise.all(u);await o.done;for(let f=0;f<a.length;f++){const m=h[f];r.set(a[f],m===void 0?null:m)}return r}catch(s){P({error:s,message:s?.message});for(const n of new Set(e))r.set(n,null);return r}}async Remove(e,t){try{const r=await this.dbPromise,s=this.getStoreName(t),n=this.getStoreKey(e,t),a=r.transaction(s,"readwrite");await a.objectStore(s).delete(n),await a.done}catch(r){P({error:r,message:r?.message})}}async ClearCategory(e){try{const t=await this.dbPromise,r=e||w,s=this.getStoreName(e);if(this.isKnownCategory(r)){const n=t.transaction(s,"readwrite");await n.objectStore(s).clear(),await n.done}else{const n=`[${r}]:`,a=t.transaction("mj:default","readwrite"),i=a.objectStore("mj:default"),o=await i.getAllKeys();for(const y of o)typeof y=="string"&&y.startsWith(n)&&await i.delete(y);await a.done}}catch(t){P({error:t,message:t?.message})}}async GetCategoryKeys(e){try{const t=await this.dbPromise,r=e||w,s=this.getStoreName(e),i=await t.transaction(s,"readonly").objectStore(s).getAllKeys();if(this.isKnownCategory(r))return i.map(y=>String(y));const o=`[${r}]:`;return i.map(y=>String(y)).filter(y=>y.startsWith(o)).map(y=>y.slice(o.length))}catch(t){return P({error:t,message:t?.message}),[]}}}const b=new M,Ne=c`subscription RemoteOperationProgress($channelId: ID!) {
309
309
  RemoteOperationProgress(channelId: $channelId) {
310
310
  ChannelId
311
311
  ProgressJSON
@@ -531,7 +531,7 @@ var se=Object.defineProperty;var d=(g,e)=>se(g,"name",{value:e,configurable:!0})
531
531
  Message
532
532
  }
533
533
  }
534
- }`,a={EntityName:e.EntityName,SurvivingRecordCompositeKey:{KeyValuePairs:this.ensureKeyValuePairValueIsString(e.SurvivingRecordCompositeKey.KeyValuePairs)},FieldMap:e.FieldMap?.map(o=>({FieldName:o.FieldName,Value:o.Value.toString()})),RecordsToMerge:e.RecordsToMerge.map(o=>o.Copy())};return(await this.ExecuteGQL(n,{request:a}))?.MergeRecords}catch(n){return l(n),{Success:!1,OverallStatus:n&&n.message?n.message:n,RecordStatus:[],RecordMergeLogID:"",Request:e}}}async Save(e,t,r){if(r?.IsParentEntitySave){const n=new G;return n.StartedAt=new Date,n.EndedAt=new Date,n.Type=e.IsSaved?"update":"create",n.Success=!0,n.NewValues=e.GetAll(),e.RegisterResultHistoryEntry(n),n.NewValues}const s=new G;try{e.RegisterTransactionPreprocessing();const n={input:{}},a=e.IsSaved?"Update":"Create";s.StartedAt=new Date,s.Type=e.IsSaved?"update":"create",s.OriginalValues=e.Fields.map(m=>({FieldName:m.CodeName,Value:m.Value})),e.RegisterResultHistoryEntry(s);const i=T(e.EntityInfo),o=`${a}${i}`,y=e.Fields.filter(m=>!m.ReadOnly||m.IsPrimaryKey&&e.IsSaved),u=` ${o}(input: $input) {
534
+ }`,a={EntityName:e.EntityName,SurvivingRecordCompositeKey:{KeyValuePairs:this.ensureKeyValuePairValueIsString(e.SurvivingRecordCompositeKey.KeyValuePairs)},FieldMap:e.FieldMap?.map(o=>({FieldName:o.FieldName,Value:o.Value.toString()})),RecordsToMerge:e.RecordsToMerge.map(o=>o.Copy())};return(await this.ExecuteGQL(n,{request:a}))?.MergeRecords}catch(n){return l(n),{Success:!1,OverallStatus:n&&n.message?n.message:n,RecordStatus:[],RecordMergeLogID:"",Request:e}}}async Save(e,t,r){if(r?.IsParentEntitySave){const n=new U;return n.StartedAt=new Date,n.EndedAt=new Date,n.Type=e.IsSaved?"update":"create",n.Success=!0,n.NewValues=e.GetAll(),e.RegisterResultHistoryEntry(n),n.NewValues}const s=new U;try{e.RegisterTransactionPreprocessing();const n={input:{}},a=e.IsSaved?"Update":"Create";s.StartedAt=new Date,s.Type=e.IsSaved?"update":"create",s.OriginalValues=e.Fields.map(m=>({FieldName:m.CodeName,Value:m.Value})),e.RegisterResultHistoryEntry(s);const i=T(e.EntityInfo),o=`${a}${i}`,y=e.Fields.filter(m=>!m.ReadOnly||m.IsPrimaryKey&&e.IsSaved),u=` ${o}(input: $input) {
535
535
  ${e.Fields.map(m=>b.MapFieldName(m.CodeName)).join(`
536
536
  `)}
537
537
  }`,h=c`mutation ${a}${i} ($input: ${o}Input!) {
@@ -549,7 +549,7 @@ var se=Object.defineProperty;var d=(g,e)=>se(g,"name",{value:e,configurable:!0})
549
549
  ${a.Fields.map(o=>o.CodeName).join(`
550
550
  `)}
551
551
  }
552
- `}return r}async Delete(e,t,r){const s=new G;try{e.RegisterTransactionPreprocessing(),s.StartedAt=new Date,s.Type="delete",s.OriginalValues=e.Fields.map(p=>({FieldName:p.CodeName,Value:p.Value})),e.RegisterResultHistoryEntry(s);const n={},a=[];let i="",o="",y="";for(let p of e.PrimaryKey.KeyValuePairs){const S=e.Fields.find(R=>R.Name.trim().toLowerCase()===p.FieldName.trim().toLowerCase());n[S.CodeName]=S.Value,a.push({varName:S.CodeName,inputType:S.EntityFieldInfo.GraphQLType+"!"}),i.length>0&&(i+=", "),i+=`${S.CodeName}: $${S.CodeName}`,o.length>0&&(o+=", "),o+=`$${S.CodeName}: ${S.EntityFieldInfo.GraphQLType}!`,y.length>0&&(y+=`
552
+ `}return r}async Delete(e,t,r){const s=new U;try{e.RegisterTransactionPreprocessing(),s.StartedAt=new Date,s.Type="delete",s.OriginalValues=e.Fields.map(p=>({FieldName:p.CodeName,Value:p.Value})),e.RegisterResultHistoryEntry(s);const n={},a=[];let i="",o="",y="";for(let p of e.PrimaryKey.KeyValuePairs){const S=e.Fields.find(R=>R.Name.trim().toLowerCase()===p.FieldName.trim().toLowerCase());n[S.CodeName]=S.Value,a.push({varName:S.CodeName,inputType:S.EntityFieldInfo.GraphQLType+"!"}),i.length>0&&(i+=", "),i+=`${S.CodeName}: $${S.CodeName}`,o.length>0&&(o+=", "),o+=`$${S.CodeName}: ${S.EntityFieldInfo.GraphQLType}!`,y.length>0&&(y+=`
553
553
  `),y+=`${S.CodeName}`}a.push({varName:"options___",inputType:"DeleteOptionsInput!"}),n.options___={SkipEntityAIActions:t?.SkipEntityAIActions??!1,SkipEntityActions:t?.SkipEntityActions??!1,ReplayOnly:t?.ReplayOnly??!1,IsParentEntityDelete:t?.IsParentEntityDelete??!1};const h="Delete"+T(e.EntityInfo),f=c`${h}(${i}, options___: $options___) {
554
554
  ${y}
555
555
  }
@@ -666,7 +666,7 @@ var se=Object.defineProperty;var d=(g,e)=>se(g,"name",{value:e,configurable:!0})
666
666
  ChildEntityNames
667
667
  ErrorMessage
668
668
  }
669
- }`;try{const n=await this.ExecuteGQL(s,{EntityName:e.Name,RecordID:t});return n?.FindISAChildEntities?.Success&&n.FindISAChildEntities.ChildEntityNames?n.FindISAChildEntities.ChildEntityNames.map(a=>({ChildEntityName:a})):[]}catch(n){return l(`FindISAChildEntities failed for ${e.Name}: ${n}`),[]}}}async function Te(g){const e=new I;return me(e),await e.Config(g),await e.preValidateAndRefresh(),j.Instance.RaiseEvent({event:J.LoggedIn,eventCode:null,component:this,args:null}),await ge.Instance.Startup(),e}d(Te,"setupGraphQLClient");class xe{static{d(this,"SyncRolesAndUsersResult")}}class Le{static{d(this,"RoleInput")}}class Fe{static{d(this,"UserInput")}}class Qe{static{d(this,"RolesAndUsersInput")}}var ee=(g=>(g.Create="Create",g.Update="Update",g.CreateOrUpdate="CreateOrUpdate",g.Delete="Delete",g.DeleteWithFilter="DeleteWithFilter",g))(ee||{});class Ue{static{d(this,"ActionItemInput")}}class Ge{static{d(this,"SyncDataResult")}constructor(){this.Results=[]}}class Ve{static{d(this,"ActionItemOutput")}}class _e{static{d(this,"GraphQLSystemUserClient")}get Client(){return this._client}constructor(e,t,r,s){const n={"x-session-id":r};this._sessionId=r,t&&(n.authorization="Bearer "+t),s&&(n["x-mj-api-key"]=s),this._client=new k(e,{headers:n})}resolvePlatformSQL(e){if(e!=null)return Se(e)?e.default:e}async GetData(e,t){try{const s=await this.Client.request(`query GetData($input: GetDataInputType!) {
669
+ }`;try{const n=await this.ExecuteGQL(s,{EntityName:e.Name,RecordID:t});return n?.FindISAChildEntities?.Success&&n.FindISAChildEntities.ChildEntityNames?n.FindISAChildEntities.ChildEntityNames.map(a=>({ChildEntityName:a})):[]}catch(n){return l(`FindISAChildEntities failed for ${e.Name}: ${n}`),[]}}}async function Te(g){const e=new I;return me(e),await e.Config(g),await e.preValidateAndRefresh(),j.Instance.RaiseEvent({event:J.LoggedIn,eventCode:null,component:this,args:null}),await ge.Instance.Startup(),e}d(Te,"setupGraphQLClient");class xe{static{d(this,"SyncRolesAndUsersResult")}}class Le{static{d(this,"RoleInput")}}class Fe{static{d(this,"UserInput")}}class Qe{static{d(this,"RolesAndUsersInput")}}var ee=(g=>(g.Create="Create",g.Update="Update",g.CreateOrUpdate="CreateOrUpdate",g.Delete="Delete",g.DeleteWithFilter="DeleteWithFilter",g))(ee||{});class Ge{static{d(this,"ActionItemInput")}}class Ue{static{d(this,"SyncDataResult")}constructor(){this.Results=[]}}class Ve{static{d(this,"ActionItemOutput")}}class _e{static{d(this,"GraphQLSystemUserClient")}get Client(){return this._client}constructor(e,t,r,s){const n={"x-session-id":r};this._sessionId=r,t&&(n.authorization="Bearer "+t),s&&(n["x-mj-api-key"]=s),this._client=new k(e,{headers:n})}resolvePlatformSQL(e){if(e!=null)return Se(e)?e.default:e}async GetData(e,t){try{const s=await this.Client.request(`query GetData($input: GetDataInputType!) {
670
670
  GetData(input: $input) {
671
671
  Success
672
672
  ErrorMessages
@@ -816,8 +816,8 @@ var se=Object.defineProperty;var d=(g,e)=>se(g,"name",{value:e,configurable:!0})
816
816
  ErrorMessage
817
817
  AppliedParameters
818
818
  }
819
- }`,r={QueryName:e.QueryName};e.CategoryID!==void 0&&(r.CategoryID=e.CategoryID),e.CategoryPath!==void 0&&(r.CategoryPath=e.CategoryPath),e.Parameters!==void 0&&(r.Parameters=e.Parameters),e.MaxRows!==void 0&&(r.MaxRows=e.MaxRows),e.StartRow!==void 0&&(r.StartRow=e.StartRow),e.Enrichment!==void 0&&(r.Enrichment=e.Enrichment);const s=await this.Client.request(t,r);return s&&s.GetQueryDataByNameSystemUser?{...s.GetQueryDataByNameSystemUser,Results:s.GetQueryDataByNameSystemUser.Results?D(s.GetQueryDataByNameSystemUser.Results):null}:{QueryID:"",QueryName:e.QueryName,Success:!1,Results:null,RowCount:0,TotalRowCount:0,ExecutionTime:0,ErrorMessage:"Query execution failed"}}catch(t){return l(`GraphQLSystemUserClient::GetQueryDataByNameSystemUser - Error executing query - ${t}`),{QueryID:"",QueryName:e.QueryName,Success:!1,Results:null,RowCount:0,TotalRowCount:0,ExecutionTime:0,ErrorMessage:t.toString()}}}async CreateQuery(e){try{const r=await this.Client.request(`mutation CreateQuerySystemUser($input: CreateQuerySystemUserInput!) {
820
- CreateQuerySystemUser(input: $input) {
819
+ }`,r={QueryName:e.QueryName};e.CategoryID!==void 0&&(r.CategoryID=e.CategoryID),e.CategoryPath!==void 0&&(r.CategoryPath=e.CategoryPath),e.Parameters!==void 0&&(r.Parameters=e.Parameters),e.MaxRows!==void 0&&(r.MaxRows=e.MaxRows),e.StartRow!==void 0&&(r.StartRow=e.StartRow),e.Enrichment!==void 0&&(r.Enrichment=e.Enrichment);const s=await this.Client.request(t,r);return s&&s.GetQueryDataByNameSystemUser?{...s.GetQueryDataByNameSystemUser,Results:s.GetQueryDataByNameSystemUser.Results?D(s.GetQueryDataByNameSystemUser.Results):null}:{QueryID:"",QueryName:e.QueryName,Success:!1,Results:null,RowCount:0,TotalRowCount:0,ExecutionTime:0,ErrorMessage:"Query execution failed"}}catch(t){return l(`GraphQLSystemUserClient::GetQueryDataByNameSystemUser - Error executing query - ${t}`),{QueryID:"",QueryName:e.QueryName,Success:!1,Results:null,RowCount:0,TotalRowCount:0,ExecutionTime:0,ErrorMessage:t.toString()}}}async CreateQuery(e){try{const r=await this.Client.request(`mutation CreateQueryExtended($input: CreateQuerySystemUserInput!) {
820
+ CreateQueryExtended(input: $input) {
821
821
  Success
822
822
  ErrorMessage
823
823
  Query {
@@ -875,8 +875,8 @@ var se=Object.defineProperty;var d=(g,e)=>se(g,"name",{value:e,configurable:!0})
875
875
  }
876
876
  }
877
877
  }
878
- }`,{input:e});return r&&r.CreateQuerySystemUser?r.CreateQuerySystemUser:{Success:!1,ErrorMessage:"Failed to create query"}}catch(t){return l(`GraphQLSystemUserClient::CreateQuery - Error creating query - ${t}`),{Success:!1,ErrorMessage:t.toString()}}}async UpdateQuery(e){try{const r=await this.Client.request(`mutation UpdateQuerySystemUser($input: UpdateQuerySystemUserInput!) {
879
- UpdateQuerySystemUser(input: $input) {
878
+ }`,{input:e});return r&&r.CreateQueryExtended?r.CreateQueryExtended:{Success:!1,ErrorMessage:"Failed to create query"}}catch(t){return l(`GraphQLSystemUserClient::CreateQuery - Error creating query - ${t}`),{Success:!1,ErrorMessage:t.toString()}}}async UpdateQuery(e){try{const r=await this.Client.request(`mutation UpdateQueryExtended($input: UpdateQuerySystemUserInput!) {
879
+ UpdateQueryExtended(input: $input) {
880
880
  Success
881
881
  ErrorMessage
882
882
  Query {
@@ -934,14 +934,14 @@ var se=Object.defineProperty;var d=(g,e)=>se(g,"name",{value:e,configurable:!0})
934
934
  }
935
935
  }
936
936
  }
937
- }`,{input:e});return r&&r.UpdateQuerySystemUser?r.UpdateQuerySystemUser:{Success:!1,ErrorMessage:"Failed to update query"}}catch(t){return l(`GraphQLSystemUserClient::UpdateQuery - Error updating query - ${t}`),{Success:!1,ErrorMessage:t.toString()}}}async DeleteQuery(e,t){try{if(!e||e.trim()==="")return l("GraphQLSystemUserClient::DeleteQuery - Invalid query ID: ID cannot be null or empty"),{Success:!1,ErrorMessage:"Invalid query ID: ID cannot be null or empty"};const r=`mutation DeleteQuerySystemResolver($ID: String!, $options: DeleteOptionsInput) {
938
- DeleteQuerySystemResolver(ID: $ID, options: $options) {
937
+ }`,{input:e});return r&&r.UpdateQueryExtended?r.UpdateQueryExtended:{Success:!1,ErrorMessage:"Failed to update query"}}catch(t){return l(`GraphQLSystemUserClient::UpdateQuery - Error updating query - ${t}`),{Success:!1,ErrorMessage:t.toString()}}}async DeleteQuery(e,t){try{if(!e||e.trim()==="")return l("GraphQLSystemUserClient::DeleteQuery - Invalid query ID: ID cannot be null or empty"),{Success:!1,ErrorMessage:"Invalid query ID: ID cannot be null or empty"};const r=`mutation DeleteQueryExtended($ID: String!, $options: DeleteOptionsInput) {
938
+ DeleteQueryExtended(ID: $ID, options: $options) {
939
939
  Success
940
940
  ErrorMessage
941
941
  ID
942
942
  Name
943
943
  }
944
- }`,s={ID:e};t!==void 0&&(s.options={SkipEntityAIActions:t.SkipEntityAIActions??!1,SkipEntityActions:t.SkipEntityActions??!1,ReplayOnly:t.ReplayOnly??!1,IsParentEntityDelete:t.IsParentEntityDelete??!1});const n=await this.Client.request(r,s);return n&&n.DeleteQuerySystemResolver?n.DeleteQuerySystemResolver:{Success:!1,ErrorMessage:"Failed to delete query"}}catch(r){let s="";if(r instanceof Error){if(s=r.message,"cause"in r&&r.cause){const n=r.cause;s+=` | Cause: ${n.message||n}`,"code"in n&&(s+=` | Code: ${n.code}`)}if("response"in r){const n=r.response;n?.status&&(s+=` | HTTP Status: ${n.status}`),n?.errors&&(s+=` | GraphQL Errors: ${JSON.stringify(n.errors)}`)}r.stack&&console.error("DeleteQuery stack trace:",r.stack)}else s=String(r);return l(`GraphQLSystemUserClient::DeleteQuery - Error deleting query - ${s}`),{Success:!1,ErrorMessage:s}}}async RunAIPrompt(e){try{const t=c`
944
+ }`,s={ID:e};t!==void 0&&(s.options={SkipEntityAIActions:t.SkipEntityAIActions??!1,SkipEntityActions:t.SkipEntityActions??!1,ReplayOnly:t.ReplayOnly??!1,IsParentEntityDelete:t.IsParentEntityDelete??!1});const n=await this.Client.request(r,s);return n&&n.DeleteQueryExtended?n.DeleteQueryExtended:{Success:!1,ErrorMessage:"Failed to delete query"}}catch(r){let s="";if(r instanceof Error){if(s=r.message,"cause"in r&&r.cause){const n=r.cause;s+=` | Cause: ${n.message||n}`,"code"in n&&(s+=` | Code: ${n.code}`)}if("response"in r){const n=r.response;n?.status&&(s+=` | HTTP Status: ${n.status}`),n?.errors&&(s+=` | GraphQL Errors: ${JSON.stringify(n.errors)}`)}r.stack&&console.error("DeleteQuery stack trace:",r.stack)}else s=String(r);return l(`GraphQLSystemUserClient::DeleteQuery - Error deleting query - ${s}`),{Success:!1,ErrorMessage:s}}}async RunAIPrompt(e){try{const t=c`
945
945
  query RunAIPromptSystemUser(
946
946
  $promptId: String!,
947
947
  $data: String,
@@ -1210,28 +1210,28 @@ var se=Object.defineProperty;var d=(g,e)=>se(g,"name",{value:e,configurable:!0})
1210
1210
  }
1211
1211
  }
1212
1212
  ${Q}
1213
- `,r=await this.dataProvider.ExecuteGQL(t,{input:{TargetListId:e.Delta.TargetListId,EntityName:e.Delta.EntityName,ToAdd:e.Delta.ToAdd,ToRemove:e.Delta.ToRemove,Unchanged:e.Delta.Unchanged,AddCount:e.Delta.Counts.Add,RemoveCount:e.Delta.Counts.Remove,UnchangedCount:e.Delta.Counts.Unchanged,SourceTotal:e.Delta.Counts.SourceTotal,TargetTotal:e.Delta.Counts.TargetTotal,DeltaToken:e.Delta.DeltaToken,ConfirmDrops:e.ConfirmDrops}});return U(r?.ApplyListDelta)}async MaterializeFromView(e,t){const r=c`
1213
+ `,r=await this.dataProvider.ExecuteGQL(t,{input:{TargetListId:e.Delta.TargetListId,EntityName:e.Delta.EntityName,ToAdd:e.Delta.ToAdd,ToRemove:e.Delta.ToRemove,Unchanged:e.Delta.Unchanged,AddCount:e.Delta.Counts.Add,RemoveCount:e.Delta.Counts.Remove,UnchangedCount:e.Delta.Counts.Unchanged,SourceTotal:e.Delta.Counts.SourceTotal,TargetTotal:e.Delta.Counts.TargetTotal,DeltaToken:e.Delta.DeltaToken,ConfirmDrops:e.ConfirmDrops}});return G(r?.ApplyListDelta)}async MaterializeFromView(e,t){const r=c`
1214
1214
  mutation MaterializeListFromView($viewId: String!, $options: MaterializeOptionsInput!) {
1215
1215
  MaterializeListFromView(viewId: $viewId, options: $options) {
1216
1216
  ...ApplyResultFields
1217
1217
  }
1218
1218
  }
1219
1219
  ${Q}
1220
- `,s=await this.dataProvider.ExecuteGQL(r,{viewId:e,options:{ListName:t.ListName,CategoryId:t.CategoryId,Description:t.Description,RememberLineage:t.RememberLineage,UseSnapshot:t.UseSnapshot,RefreshMode:t.RefreshMode}});return U(s?.MaterializeListFromView)}async AddViewResultsToList(e,t){const r=c`
1220
+ `,s=await this.dataProvider.ExecuteGQL(r,{viewId:e,options:{ListName:t.ListName,CategoryId:t.CategoryId,Description:t.Description,RememberLineage:t.RememberLineage,UseSnapshot:t.UseSnapshot,RefreshMode:t.RefreshMode}});return G(s?.MaterializeListFromView)}async AddViewResultsToList(e,t){const r=c`
1221
1221
  mutation AddViewResultsToList($viewId: String!, $listId: String!) {
1222
1222
  AddViewResultsToList(viewId: $viewId, listId: $listId) {
1223
1223
  ...ApplyResultFields
1224
1224
  }
1225
1225
  }
1226
1226
  ${Q}
1227
- `,s=await this.dataProvider.ExecuteGQL(r,{viewId:e,listId:t});return U(s?.AddViewResultsToList)}async RefreshFromSource(e){const t=c`
1227
+ `,s=await this.dataProvider.ExecuteGQL(r,{viewId:e,listId:t});return G(s?.AddViewResultsToList)}async RefreshFromSource(e){const t=c`
1228
1228
  mutation RefreshListFromSource($listId: String!, $mode: String!, $confirmDrops: Boolean!) {
1229
1229
  RefreshListFromSource(listId: $listId, mode: $mode, confirmDrops: $confirmDrops) {
1230
1230
  ...ApplyResultFields
1231
1231
  }
1232
1232
  }
1233
1233
  ${Q}
1234
- `,r=await this.dataProvider.ExecuteGQL(t,{listId:e.ListId,mode:e.Mode,confirmDrops:e.ConfirmDrops});return U(r?.RefreshListFromSource)}async ComposeLists(e){const t=c`
1234
+ `,r=await this.dataProvider.ExecuteGQL(t,{listId:e.ListId,mode:e.Mode,confirmDrops:e.ConfirmDrops});return G(r?.RefreshListFromSource)}async ComposeLists(e){const t=c`
1235
1235
  mutation ComposeLists($input: ComposeListsInput!) {
1236
1236
  ComposeLists(input: $input) {
1237
1237
  ...ListDeltaFields
@@ -1346,7 +1346,7 @@ var se=Object.defineProperty;var d=(g,e)=>se(g,"name",{value:e,configurable:!0})
1346
1346
  Message
1347
1347
  PermissionID
1348
1348
  }
1349
- `;function Je(g){return g.kind==="user"?{Kind:"user",UserID:g.userId}:{Kind:"role",RoleID:g.roleId}}d(Je,"serializeShareTarget");function _(g){if(!g||typeof g!="object")throw new Error("GraphQLListsClient: empty/invalid ShareResult response");const e=g;return{Success:e.Success,ResultCode:e.ResultCode,Message:e.Message,PermissionID:e.PermissionID??void 0}}d(_,"parseShareResult");function We(g){const e=g,t=e.Target.Kind==="user"?{kind:"user",userId:e.Target.UserID}:{kind:"role",roleId:e.Target.RoleID};return{PermissionID:e.PermissionID,ListID:e.ListID,Target:t,PermissionLevel:e.PermissionLevel,Status:e.Status,SharedByUserID:e.SharedByUserID??null,CreatedAt:new Date(e.CreatedAt)}}d(We,"parseShareSummary");function O(g){switch(g.kind){case"list":return{Kind:"list",ListID:g.listId};case"view":return{Kind:"view",ViewID:g.viewId};case"adhoc":return{Kind:"adhoc",EntityName:g.entityName,ExtraFilter:g.extraFilter}}}d(O,"serializeListSource");function re(g){if(!g||typeof g!="object")throw new Error("GraphQLListsClient: empty/invalid ListDelta response from server");const e=g;return{TargetListId:e.TargetListId,EntityName:e.EntityName,ToAdd:e.ToAdd,ToRemove:e.ToRemove,Unchanged:e.Unchanged,Counts:e.Counts,Warnings:e.Warnings.map(ze),DeltaToken:e.DeltaToken}}d(re,"parseListDelta");function ze(g){let e;if(g.DetailsJSON)try{e=JSON.parse(g.DetailsJSON)}catch(t){l(`GraphQLListsClient: failed to parse warning details JSON: ${t}`)}return{Code:g.Code,Message:g.Message,Details:e}}d(ze,"parseWarning");function U(g){if(!g||typeof g!="object")throw new Error("GraphQLListsClient: empty/invalid ApplyResult response from server");const e=g;return{Success:e.Success,ResultCode:e.ResultCode,Message:e.Message,CreatedListId:e.CreatedListId??void 0,TargetListId:e.TargetListId??void 0,Counts:e.AddedCount!=null||e.RemovedCount!=null||e.FailedCount!=null?{Added:e.AddedCount??0,Removed:e.RemovedCount??0,Failed:e.FailedCount??0}:void 0,Errors:e.Errors??void 0}}d(U,"parseApplyResult");class He{static{d(this,"GraphQLEncryptionClient")}constructor(e){this._dataProvider=e}async CreateAPIKey(e){try{const t=this.createAPIKeyVariables(e),r=await this.executeCreateAPIKeyMutation(t);return this.processCreateAPIKeyResult(r)}catch(t){return this.handleCreateAPIKeyError(t)}}createAPIKeyVariables(e){return{input:{Label:e.Label,Description:e.Description,ExpiresAt:e.ExpiresAt?.toISOString(),ScopeIDs:e.ScopeIDs}}}async executeCreateAPIKeyMutation(e){const t=c`
1349
+ `;function Je(g){return g.kind==="user"?{Kind:"user",UserID:g.userId}:{Kind:"role",RoleID:g.roleId}}d(Je,"serializeShareTarget");function _(g){if(!g||typeof g!="object")throw new Error("GraphQLListsClient: empty/invalid ShareResult response");const e=g;return{Success:e.Success,ResultCode:e.ResultCode,Message:e.Message,PermissionID:e.PermissionID??void 0}}d(_,"parseShareResult");function We(g){const e=g,t=e.Target.Kind==="user"?{kind:"user",userId:e.Target.UserID}:{kind:"role",roleId:e.Target.RoleID};return{PermissionID:e.PermissionID,ListID:e.ListID,Target:t,PermissionLevel:e.PermissionLevel,Status:e.Status,SharedByUserID:e.SharedByUserID??null,CreatedAt:new Date(e.CreatedAt)}}d(We,"parseShareSummary");function O(g){switch(g.kind){case"list":return{Kind:"list",ListID:g.listId};case"view":return{Kind:"view",ViewID:g.viewId};case"adhoc":return{Kind:"adhoc",EntityName:g.entityName,ExtraFilter:g.extraFilter}}}d(O,"serializeListSource");function re(g){if(!g||typeof g!="object")throw new Error("GraphQLListsClient: empty/invalid ListDelta response from server");const e=g;return{TargetListId:e.TargetListId,EntityName:e.EntityName,ToAdd:e.ToAdd,ToRemove:e.ToRemove,Unchanged:e.Unchanged,Counts:e.Counts,Warnings:e.Warnings.map(ze),DeltaToken:e.DeltaToken}}d(re,"parseListDelta");function ze(g){let e;if(g.DetailsJSON)try{e=JSON.parse(g.DetailsJSON)}catch(t){l(`GraphQLListsClient: failed to parse warning details JSON: ${t}`)}return{Code:g.Code,Message:g.Message,Details:e}}d(ze,"parseWarning");function G(g){if(!g||typeof g!="object")throw new Error("GraphQLListsClient: empty/invalid ApplyResult response from server");const e=g;return{Success:e.Success,ResultCode:e.ResultCode,Message:e.Message,CreatedListId:e.CreatedListId??void 0,TargetListId:e.TargetListId??void 0,Counts:e.AddedCount!=null||e.RemovedCount!=null||e.FailedCount!=null?{Added:e.AddedCount??0,Removed:e.RemovedCount??0,Failed:e.FailedCount??0}:void 0,Errors:e.Errors??void 0}}d(G,"parseApplyResult");class He{static{d(this,"GraphQLEncryptionClient")}constructor(e){this._dataProvider=e}async CreateAPIKey(e){try{const t=this.createAPIKeyVariables(e),r=await this.executeCreateAPIKeyMutation(t);return this.processCreateAPIKeyResult(r)}catch(t){return this.handleCreateAPIKeyError(t)}}createAPIKeyVariables(e){return{input:{Label:e.Label,Description:e.Description,ExpiresAt:e.ExpiresAt?.toISOString(),ScopeIDs:e.ScopeIDs}}}async executeCreateAPIKeyMutation(e){const t=c`
1350
1350
  mutation CreateAPIKey($input: CreateAPIKeyInput!) {
1351
1351
  CreateAPIKey(input: $input) {
1352
1352
  Success
@@ -2027,5 +2027,5 @@ var se=Object.defineProperty;var d=(g,e)=>se(g,"name",{value:e,configurable:!0})
2027
2027
  IntegrationGetConnectorCapabilities(companyIntegrationID: $companyIntegrationID) {
2028
2028
  Success Message SupportsGet SupportsCreate SupportsUpdate SupportsDelete SupportsSearch
2029
2029
  }
2030
- }`;return(await this._dataProvider.ExecuteGQL(t,{companyIntegrationID:e}))?.IntegrationGetConnectorCapabilities??{Success:!1,Message:"No response"}}catch(t){return{Success:!1,Message:t.message}}}handleError(e,t){const r=e;return l(`Error in integration discovery: ${r}`),{Success:!1,Message:`Error: ${r.message}`,Data:t}}}export{Ue as ActionItemInput,Ve as ActionItemOutput,Z as BrowserIndexedDBStorageProvider,X as BrowserStorageProviderBase,M as FieldMapper,$ as FireAndForgetHelper,Oe as GetDataOutput,H as GraphQLAIClient,Be as GraphQLActionClient,Ze as GraphQLClassifyClient,Xe as GraphQLClusterClient,tt as GraphQLComponentRegistryClient,I as GraphQLDataProvider,He as GraphQLEncryptionClient,st as GraphQLFileStorageClient,at as GraphQLIntegrationClient,je as GraphQLListsClient,Ye as GraphQLLiveKitClient,be as GraphQLProviderConfigData,nt as GraphQLSearchClient,_e as GraphQLSystemUserClient,et as GraphQLTestingClient,z as GraphQLTransactionGroup,rt as GraphQLVersionHistoryClient,F as PACKAGE_VERSION,Le as RoleInput,Qe as RolesAndUsersInput,qe as SimpleRemoteEntity,Ke as SimpleRemoteEntityField,ke as SimpleRemoteEntityOutput,ee as SyncDataAction,Ge as SyncDataResult,xe as SyncRolesAndUsersResult,Fe as UserInput,ht as gql,Te as setupGraphQLClient};
2030
+ }`;return(await this._dataProvider.ExecuteGQL(t,{companyIntegrationID:e}))?.IntegrationGetConnectorCapabilities??{Success:!1,Message:"No response"}}catch(t){return{Success:!1,Message:t.message}}}handleError(e,t){const r=e;return l(`Error in integration discovery: ${r}`),{Success:!1,Message:`Error: ${r.message}`,Data:t}}}export{Ge as ActionItemInput,Ve as ActionItemOutput,Z as BrowserIndexedDBStorageProvider,X as BrowserStorageProviderBase,M as FieldMapper,$ as FireAndForgetHelper,Oe as GetDataOutput,H as GraphQLAIClient,Be as GraphQLActionClient,Ze as GraphQLClassifyClient,Xe as GraphQLClusterClient,tt as GraphQLComponentRegistryClient,I as GraphQLDataProvider,He as GraphQLEncryptionClient,st as GraphQLFileStorageClient,at as GraphQLIntegrationClient,je as GraphQLListsClient,Ye as GraphQLLiveKitClient,be as GraphQLProviderConfigData,nt as GraphQLSearchClient,_e as GraphQLSystemUserClient,et as GraphQLTestingClient,z as GraphQLTransactionGroup,rt as GraphQLVersionHistoryClient,F as PACKAGE_VERSION,Le as RoleInput,Qe as RolesAndUsersInput,qe as SimpleRemoteEntity,Ke as SimpleRemoteEntityField,ke as SimpleRemoteEntityOutput,ee as SyncDataAction,Ue as SyncDataResult,xe as SyncRolesAndUsersResult,Fe as UserInput,ht as gql,Te as setupGraphQLClient};
2031
2031
  //# sourceMappingURL=index.mjs.map