@meshmakers/octo-services 3.2.18-0 → 3.2.20-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.
@@ -1,8 +1,11 @@
1
1
  import { map, finalize } from 'rxjs/operators';
2
- import { PagedResultDto } from '@meshmakers/shared-services';
2
+ import * as i1 from '@meshmakers/shared-services';
3
+ import { PagedResultDto, DataSourceBase } from '@meshmakers/shared-services';
3
4
  import { InMemoryCache } from '@apollo/client/core';
4
5
  import * as i0 from '@angular/core';
5
- import { NgModule } from '@angular/core';
6
+ import { Injectable, NgModule } from '@angular/core';
7
+ import { ApolloError } from '@apollo/client/errors';
8
+ import { map as map$1 } from 'rxjs';
6
9
 
7
10
  class PagedGraphResultDto extends PagedResultDto {
8
11
  document;
@@ -133,6 +136,56 @@ class OctoGraphQLServiceBase {
133
136
  }
134
137
  }
135
138
 
139
+ class OctoMessageService {
140
+ messageService;
141
+ constructor(messageService) {
142
+ this.messageService = messageService;
143
+ }
144
+ showErrorWithDetails(error) {
145
+ if (error.constructor.name === ApolloError.prototype.constructor.name) {
146
+ console.info("is apollo error");
147
+ if (error.graphQLErrors) {
148
+ for (const graphQLError of error.graphQLErrors) {
149
+ const path = graphQLError.path?.join('.');
150
+ const message = `${path}: ${graphQLError.message}`;
151
+ this.messageService.showError(message, "Request because of GraphQL error failed");
152
+ }
153
+ }
154
+ else if (error.networkError) {
155
+ this.messageService.showError(error.networkError.message, "Request because of network error failed");
156
+ }
157
+ else if (error.clientErrors) {
158
+ let message = "";
159
+ for (const clientError of error.clientErrors) {
160
+ if (message.length > 0) {
161
+ message += "\n";
162
+ }
163
+ message += `${clientError.message}`;
164
+ }
165
+ this.messageService.showError(message, "Request because of client error failed");
166
+ }
167
+ else if (error.protocolErrors) {
168
+ let message = "";
169
+ for (const clientError of error.protocolErrors) {
170
+ if (message.length > 0) {
171
+ message += "\n";
172
+ }
173
+ message += `${clientError.message}`;
174
+ }
175
+ this.messageService.showError(message, "Request because of protocol error failed");
176
+ }
177
+ else {
178
+ this.messageService.showErrorWithDetails(error);
179
+ }
180
+ }
181
+ }
182
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: OctoMessageService, deps: [{ token: i1.MessageService }], target: i0.ɵɵFactoryTarget.Injectable });
183
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: OctoMessageService });
184
+ }
185
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: OctoMessageService, decorators: [{
186
+ type: Injectable
187
+ }], ctorParameters: () => [{ type: i1.MessageService }] });
188
+
136
189
  class OctoServiceOptions {
137
190
  assetServices;
138
191
  defaultDataSourceId;
@@ -150,15 +203,16 @@ class OctoServicesModule {
150
203
  {
151
204
  provide: OctoServiceOptions,
152
205
  useValue: octoServiceOptions
153
- }
206
+ },
207
+ OctoMessageService
154
208
  ]
155
209
  };
156
210
  }
157
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: OctoServicesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
158
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.4", ngImport: i0, type: OctoServicesModule });
159
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: OctoServicesModule });
211
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: OctoServicesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
212
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.5", ngImport: i0, type: OctoServicesModule });
213
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: OctoServicesModule });
160
214
  }
161
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: OctoServicesModule, decorators: [{
215
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.5", ngImport: i0, type: OctoServicesModule, decorators: [{
162
216
  type: NgModule,
163
217
  args: [{
164
218
  declarations: [],
@@ -181,6 +235,108 @@ class GraphQL {
181
235
  const GraphQLCommonIgnoredProperties = ['__typename'];
182
236
  const GraphQLCloneIgnoredProperties = ['id', 'rtId', 'ckTypeId', '__typename'];
183
237
 
238
+ class GraphQlDataSource extends DataSourceBase {
239
+ }
240
+ class AssetRepoGraphQlDataSource extends GraphQlDataSource {
241
+ messageService;
242
+ query;
243
+ defaultSort;
244
+ queryRef;
245
+ subscription;
246
+ constructor(messageService, query, defaultSort = null) {
247
+ super();
248
+ this.messageService = messageService;
249
+ this.query = query;
250
+ this.defaultSort = defaultSort;
251
+ this.queryRef = null;
252
+ this.subscription = null;
253
+ }
254
+ clear() {
255
+ super.clear();
256
+ this.queryRef?.stopPolling();
257
+ this.queryRef = null;
258
+ this.subscription?.unsubscribe();
259
+ this.subscription = null;
260
+ }
261
+ async refetch() {
262
+ await this.queryRef?.refetch();
263
+ }
264
+ async refetchWith(skip = 0, take = 10, searchFilter = null, fieldFilter = null, sort = null) {
265
+ const variables = this.createVariables(skip, take, searchFilter, fieldFilter, sort);
266
+ await this.queryRef?.refetch(variables);
267
+ }
268
+ createVariables(skip = 0, take = 10, searchFilter = null, fieldFilter = null, sort = null) {
269
+ // Default sort
270
+ if ((!sort || (sort && sort.length === 0)) && searchFilter === null) {
271
+ sort = new Array();
272
+ if (this.defaultSort) {
273
+ sort = this.defaultSort;
274
+ }
275
+ }
276
+ return {
277
+ first: take,
278
+ after: GraphQL.offsetToCursor(skip),
279
+ sort,
280
+ searchFilter,
281
+ fieldFilters: fieldFilter
282
+ };
283
+ }
284
+ loadData(skip = 0, take = 10, searchFilter = null, fieldFilter = null, sort = null) {
285
+ super.onBeginLoad();
286
+ this.clear();
287
+ const variables = this.createVariables(skip, take, searchFilter, fieldFilter, sort);
288
+ this.queryRef = this.query.watch(variables, { errorPolicy: 'all' });
289
+ this.subscription = this.queryRef.valueChanges
290
+ .pipe(map$1((v, i) => this.executeLoad(v, i)))
291
+ .subscribe({
292
+ next: (pagedResult) => super.onCompleteLoad(pagedResult),
293
+ error: (e) => {
294
+ this.messageService.showErrorWithDetails(e);
295
+ super.onCompleteLoad(new PagedResultDto());
296
+ }
297
+ });
298
+ }
299
+ executeLoad(_value, _index) {
300
+ return new PagedResultDto();
301
+ }
302
+ }
303
+
304
+ /* eslint-disable */
305
+ // @generated
306
+ // This file was automatically generated and should not be edited.
307
+ /** Defines the operator of field compare */
308
+ var FieldFilterOperatorsDto;
309
+ (function (FieldFilterOperatorsDto) {
310
+ FieldFilterOperatorsDto["AnyEqDto"] = "ANY_EQ";
311
+ FieldFilterOperatorsDto["AnyLikeDto"] = "ANY_LIKE";
312
+ FieldFilterOperatorsDto["EqualsDto"] = "EQUALS";
313
+ FieldFilterOperatorsDto["GreaterEqualThanDto"] = "GREATER_EQUAL_THAN";
314
+ FieldFilterOperatorsDto["GreaterThanDto"] = "GREATER_THAN";
315
+ FieldFilterOperatorsDto["InDto"] = "IN";
316
+ FieldFilterOperatorsDto["LessEqualThanDto"] = "LESS_EQUAL_THAN";
317
+ FieldFilterOperatorsDto["LessThanDto"] = "LESS_THAN";
318
+ FieldFilterOperatorsDto["LikeDto"] = "LIKE";
319
+ FieldFilterOperatorsDto["MatchRegExDto"] = "MATCH_REG_EX";
320
+ FieldFilterOperatorsDto["NotEqualsDto"] = "NOT_EQUALS";
321
+ FieldFilterOperatorsDto["NotInDto"] = "NOT_IN";
322
+ })(FieldFilterOperatorsDto || (FieldFilterOperatorsDto = {}));
323
+ /** The type of search that is used (a text based search using text analysis (high performance, scoring, maybe more false positives) or filtering of attributes (lower performance, more exact results) */
324
+ var SearchFilterTypesDto;
325
+ (function (SearchFilterTypesDto) {
326
+ SearchFilterTypesDto["AttributeFilterDto"] = "ATTRIBUTE_FILTER";
327
+ SearchFilterTypesDto["TextSearchDto"] = "TEXT_SEARCH";
328
+ })(SearchFilterTypesDto || (SearchFilterTypesDto = {}));
329
+ /** Defines the sort order */
330
+ var SortOrdersDto;
331
+ (function (SortOrdersDto) {
332
+ SortOrdersDto["AscendingDto"] = "ASCENDING";
333
+ SortOrdersDto["DefaultDto"] = "DEFAULT";
334
+ SortOrdersDto["DescendingDto"] = "DESCENDING";
335
+ })(SortOrdersDto || (SortOrdersDto = {}));
336
+ //==============================================================
337
+ // END Enums and Input Objects
338
+ //==============================================================
339
+
184
340
  /*
185
341
  * Public API Surface of octo-services
186
342
  */
@@ -189,5 +345,5 @@ const GraphQLCloneIgnoredProperties = ['id', 'rtId', 'ckTypeId', '__typename'];
189
345
  * Generated bundle index. Do not edit.
190
346
  */
191
347
 
192
- export { GraphQL, GraphQLCloneIgnoredProperties, GraphQLCommonIgnoredProperties, OctoGraphQLServiceBase, OctoServiceOptions, OctoServicesModule, PagedGraphResultDto };
348
+ export { AssetRepoGraphQlDataSource, FieldFilterOperatorsDto, GraphQL, GraphQLCloneIgnoredProperties, GraphQLCommonIgnoredProperties, GraphQlDataSource, OctoGraphQLServiceBase, OctoMessageService, OctoServiceOptions, OctoServicesModule, PagedGraphResultDto, SearchFilterTypesDto, SortOrdersDto };
193
349
  //# sourceMappingURL=meshmakers-octo-services.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"meshmakers-octo-services.mjs","sources":["../../../../projects/meshmakers/octo-services/src/lib/models/pagedGraphResultDto.ts","../../../../projects/meshmakers/octo-services/src/lib/services/octo-graph-ql-service-base.ts","../../../../projects/meshmakers/octo-services/src/lib/options/octo-service-options.ts","../../../../projects/meshmakers/octo-services/src/lib/octo-services.module.ts","../../../../projects/meshmakers/octo-services/src/lib/shared/graphQL.ts","../../../../projects/meshmakers/octo-services/src/public-api.ts","../../../../projects/meshmakers/octo-services/src/meshmakers-octo-services.ts"],"sourcesContent":["import { PagedResultDto } from '@meshmakers/shared-services';\n\nexport class PagedGraphResultDto<P, C> extends PagedResultDto<C> {\n document: P | null;\n\n constructor() {\n super();\n\n this.document = null;\n }\n}\n","import { DocumentNode } from 'graphql';\nimport { finalize, map } from 'rxjs/operators';\nimport { Apollo } from 'apollo-angular';\nimport { OctoServiceOptions } from '../options/octo-service-options';\nimport { PagedGraphResultDto } from '../models/pagedGraphResultDto';\nimport { PagedResultDto } from '@meshmakers/shared-services';\nimport { HttpLink } from 'apollo-angular/http';\nimport { ApolloQueryResult, InMemoryCache } from '@apollo/client/core';\nimport { OperationVariables } from '@apollo/client/core/types';\nimport { Observable } from 'rxjs';\n\nexport class OctoGraphQLServiceBase {\n constructor(\n private readonly apollo: Apollo,\n private readonly httpLink: HttpLink,\n private readonly octoServiceOptions: OctoServiceOptions\n ) {}\n\n protected getEntities<TResult, TEntity, TVariable extends OperationVariables>(\n tenantId: string,\n variables: TVariable,\n queryNode: DocumentNode,\n watchQuery: boolean,\n f: (resultSet: PagedResultDto<TEntity>, result: TResult) => void\n ): Observable<PagedResultDto<TEntity>> {\n const query = watchQuery\n ? this.prepareWatchQuery<TResult, TVariable>(tenantId, variables, queryNode)\n : this.prepareQuery<TResult, TVariable>(tenantId, variables, queryNode);\n return query.pipe(\n map((result) => {\n const resultSet = new PagedResultDto<TEntity>();\n\n if (result.errors != null) {\n console.error(result.errors);\n throw Error('Error in GraphQL statement.');\n } else if (result.data) {\n f(resultSet, result.data);\n }\n return resultSet;\n })\n );\n }\n\n protected getGraphEntities<TResult, TP, TC, TVariable extends OperationVariables>(\n tenantId: string,\n variables: TVariable,\n queryNode: DocumentNode,\n watchQuery: boolean,\n f: (resultSet: PagedGraphResultDto<TP, TC>, result: TResult) => void\n ): Observable<PagedGraphResultDto<TP, TC>> {\n const query = watchQuery\n ? this.prepareWatchQuery<TResult, TVariable>(tenantId, variables, queryNode)\n : this.prepareQuery<TResult, TVariable>(tenantId, variables, queryNode);\n return query.pipe(\n map((result) => {\n const resultSet = new PagedGraphResultDto<TP, TC>();\n\n if (result.errors != null) {\n console.error(result.errors);\n throw Error('Error in GraphQL statement.');\n } else if (result.data) {\n f(resultSet, result.data);\n }\n return resultSet;\n })\n );\n }\n\n protected getEntityDetail<TResult, TEntity, TVariable extends OperationVariables>(\n tenantId: string,\n variables: TVariable,\n queryNode: DocumentNode,\n watchQuery: boolean,\n f: (result: TResult) => TEntity\n ): Observable<TEntity | null> {\n const query = watchQuery\n ? this.prepareWatchQuery<TResult, TVariable>(tenantId, variables, queryNode)\n : this.prepareQuery<TResult, TVariable>(tenantId, variables, queryNode);\n return query.pipe(\n map((result) => {\n if (result.errors != null) {\n console.error(result.errors);\n throw Error('Error in GraphQL statement.');\n } else if (result.data) {\n return f(result.data);\n }\n return null;\n })\n );\n }\n\n protected createUpdateEntity<TResult, TEntity, TVariable extends OperationVariables>(\n tenantId: string,\n variables: TVariable,\n queryNode: DocumentNode,\n f: (result: TResult | null | undefined) => TEntity\n ): Observable<TEntity> {\n this.createApolloForTenant(tenantId);\n\n return this.apollo\n .use(tenantId)\n .mutate<TResult>({\n mutation: queryNode,\n variables\n })\n .pipe(\n map((value) => f(value.data)),\n finalize(() => {\n const promise = this.apollo.use(tenantId).client.reFetchObservableQueries(true);\n promise\n .then(() => {})\n .catch((error: string) => {\n console.error(error);\n });\n })\n );\n }\n\n protected deleteEntity<TResult, TVariable extends OperationVariables>(\n tenantId: string,\n variables: TVariable,\n queryNode: DocumentNode,\n f: (result: TResult | null | undefined) => boolean\n ): Observable<boolean> {\n this.createApolloForTenant(tenantId);\n\n return this.apollo\n .use(tenantId)\n .mutate<TResult>({\n mutation: queryNode,\n variables\n })\n .pipe(\n map((value) => f(value.data)),\n finalize(() => {\n const promise = this.apollo.use(tenantId).client.reFetchObservableQueries(true);\n promise\n .then(() => {})\n .catch((error: string) => {\n console.error(error);\n });\n })\n );\n }\n\n private createApolloForTenant(tenantId: string): void {\n const result = this.apollo.use(tenantId);\n if (result) {\n return;\n }\n\n const service = this.octoServiceOptions.assetServices ?? '';\n const uri = `${service}tenants/${tenantId}/GraphQL`;\n\n this.apollo.createNamed(tenantId, {\n link: this.httpLink.create({ uri }),\n cache: new InMemoryCache({\n dataIdFromObject: (o) => (o['rtId'] as string)\n })\n });\n }\n\n private prepareWatchQuery<TResult, TVariable extends OperationVariables>(\n tenantId: string,\n variables: TVariable,\n queryNode: DocumentNode\n ): Observable<ApolloQueryResult<TResult>> {\n this.createApolloForTenant(tenantId);\n\n return this.apollo.use(tenantId).watchQuery<TResult>({\n query: queryNode,\n variables\n }).valueChanges;\n }\n\n private prepareQuery<TResult, TVariable extends OperationVariables>(\n tenantId: string,\n variables: TVariable,\n queryNode: DocumentNode\n ): Observable<ApolloQueryResult<TResult>> {\n this.createApolloForTenant(tenantId);\n\n return this.apollo.use(tenantId).query<TResult>({\n query: queryNode,\n variables,\n fetchPolicy: 'network-only'\n });\n }\n}\n","export class OctoServiceOptions {\n assetServices: string | null;\n defaultDataSourceId?: string;\n\n constructor() {\n this.assetServices = null;\n this.defaultDataSourceId = undefined;\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { OctoServiceOptions } from './options/octo-service-options';\n\n@NgModule({\n declarations: [],\n imports: [],\n exports: []\n})\nexport class OctoServicesModule {\n static forRoot(octoServiceOptions: OctoServiceOptions): ModuleWithProviders<OctoServicesModule> {\n return {\n ngModule: OctoServicesModule,\n providers: [\n {\n provide: OctoServiceOptions,\n useValue: octoServiceOptions\n }\n ]\n };\n }\n}\n","export class GraphQL {\n public static getCursor(position: number): string {\n return btoa(`arrayconnection:${position}`);\n }\n\n public static offsetToCursor(offset: number): string | null {\n if (!offset) {\n return null;\n }\n\n return this.getCursor(offset - 1);\n }\n}\n\nexport const GraphQLCommonIgnoredProperties = ['__typename'];\nexport const GraphQLCloneIgnoredProperties = ['id', 'rtId', 'ckTypeId', '__typename'];\n","/*\n * Public API Surface of octo-services\n */\n\nexport * from './lib/services/octo-graph-ql-service-base';\nexport * from './lib/options/octo-service-options';\nexport * from './lib/octo-services.module';\nexport * from './lib/models/pagedGraphResultDto';\nexport * from './lib/shared/graphQL';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAEM,MAAO,mBAA0B,SAAQ,cAAiB,CAAA;AAC9D,IAAA,QAAQ;AAER,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AAEP,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;;AAEvB;;MCCY,sBAAsB,CAAA;AAEd,IAAA,MAAA;AACA,IAAA,QAAA;AACA,IAAA,kBAAA;AAHnB,IAAA,WAAA,CACmB,MAAc,EACd,QAAkB,EAClB,kBAAsC,EAAA;QAFtC,IAAM,CAAA,MAAA,GAAN,MAAM;QACN,IAAQ,CAAA,QAAA,GAAR,QAAQ;QACR,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB;;IAG3B,WAAW,CACnB,QAAgB,EAChB,SAAoB,EACpB,SAAuB,EACvB,UAAmB,EACnB,CAAgE,EAAA;QAEhE,MAAM,KAAK,GAAG;cACV,IAAI,CAAC,iBAAiB,CAAqB,QAAQ,EAAE,SAAS,EAAE,SAAS;cACzE,IAAI,CAAC,YAAY,CAAqB,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC;QACzE,OAAO,KAAK,CAAC,IAAI,CACf,GAAG,CAAC,CAAC,MAAM,KAAI;AACb,YAAA,MAAM,SAAS,GAAG,IAAI,cAAc,EAAW;AAE/C,YAAA,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI,EAAE;AACzB,gBAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;AAC5B,gBAAA,MAAM,KAAK,CAAC,6BAA6B,CAAC;;AACrC,iBAAA,IAAI,MAAM,CAAC,IAAI,EAAE;AACtB,gBAAA,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC;;AAE3B,YAAA,OAAO,SAAS;SACjB,C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-services.mjs","sources":["../../../../projects/meshmakers/octo-services/src/lib/models/pagedGraphResultDto.ts","../../../../projects/meshmakers/octo-services/src/lib/services/octo-graph-ql-service-base.ts","../../../../projects/meshmakers/octo-services/src/lib/services/octo-message.service.ts","../../../../projects/meshmakers/octo-services/src/lib/options/octo-service-options.ts","../../../../projects/meshmakers/octo-services/src/lib/octo-services.module.ts","../../../../projects/meshmakers/octo-services/src/lib/shared/graphQL.ts","../../../../projects/meshmakers/octo-services/src/lib/services/assetRepoGraphQlDataSource.ts","../../../../projects/meshmakers/octo-services/src/lib/shared/globalTypes.ts","../../../../projects/meshmakers/octo-services/src/public-api.ts","../../../../projects/meshmakers/octo-services/src/meshmakers-octo-services.ts"],"sourcesContent":["import { PagedResultDto } from '@meshmakers/shared-services';\n\nexport class PagedGraphResultDto<P, C> extends PagedResultDto<C> {\n document: P | null;\n\n constructor() {\n super();\n\n this.document = null;\n }\n}\n","import { DocumentNode } from 'graphql';\nimport { finalize, map } from 'rxjs/operators';\nimport { Apollo } from 'apollo-angular';\nimport { OctoServiceOptions } from '../options/octo-service-options';\nimport { PagedGraphResultDto } from '../models/pagedGraphResultDto';\nimport { PagedResultDto } from '@meshmakers/shared-services';\nimport { HttpLink } from 'apollo-angular/http';\nimport { ApolloQueryResult, InMemoryCache } from '@apollo/client/core';\nimport { OperationVariables } from '@apollo/client/core/types';\nimport { Observable } from 'rxjs';\n\nexport class OctoGraphQLServiceBase {\n constructor(\n private readonly apollo: Apollo,\n private readonly httpLink: HttpLink,\n private readonly octoServiceOptions: OctoServiceOptions\n ) {}\n\n protected getEntities<TResult, TEntity, TVariable extends OperationVariables>(\n tenantId: string,\n variables: TVariable,\n queryNode: DocumentNode,\n watchQuery: boolean,\n f: (resultSet: PagedResultDto<TEntity>, result: TResult) => void\n ): Observable<PagedResultDto<TEntity>> {\n const query = watchQuery\n ? this.prepareWatchQuery<TResult, TVariable>(tenantId, variables, queryNode)\n : this.prepareQuery<TResult, TVariable>(tenantId, variables, queryNode);\n return query.pipe(\n map((result) => {\n const resultSet = new PagedResultDto<TEntity>();\n\n if (result.errors != null) {\n console.error(result.errors);\n throw Error('Error in GraphQL statement.');\n } else if (result.data) {\n f(resultSet, result.data);\n }\n return resultSet;\n })\n );\n }\n\n protected getGraphEntities<TResult, TP, TC, TVariable extends OperationVariables>(\n tenantId: string,\n variables: TVariable,\n queryNode: DocumentNode,\n watchQuery: boolean,\n f: (resultSet: PagedGraphResultDto<TP, TC>, result: TResult) => void\n ): Observable<PagedGraphResultDto<TP, TC>> {\n const query = watchQuery\n ? this.prepareWatchQuery<TResult, TVariable>(tenantId, variables, queryNode)\n : this.prepareQuery<TResult, TVariable>(tenantId, variables, queryNode);\n return query.pipe(\n map((result) => {\n const resultSet = new PagedGraphResultDto<TP, TC>();\n\n if (result.errors != null) {\n console.error(result.errors);\n throw Error('Error in GraphQL statement.');\n } else if (result.data) {\n f(resultSet, result.data);\n }\n return resultSet;\n })\n );\n }\n\n protected getEntityDetail<TResult, TEntity, TVariable extends OperationVariables>(\n tenantId: string,\n variables: TVariable,\n queryNode: DocumentNode,\n watchQuery: boolean,\n f: (result: TResult) => TEntity\n ): Observable<TEntity | null> {\n const query = watchQuery\n ? this.prepareWatchQuery<TResult, TVariable>(tenantId, variables, queryNode)\n : this.prepareQuery<TResult, TVariable>(tenantId, variables, queryNode);\n return query.pipe(\n map((result) => {\n if (result.errors != null) {\n console.error(result.errors);\n throw Error('Error in GraphQL statement.');\n } else if (result.data) {\n return f(result.data);\n }\n return null;\n })\n );\n }\n\n protected createUpdateEntity<TResult, TEntity, TVariable extends OperationVariables>(\n tenantId: string,\n variables: TVariable,\n queryNode: DocumentNode,\n f: (result: TResult | null | undefined) => TEntity\n ): Observable<TEntity> {\n this.createApolloForTenant(tenantId);\n\n return this.apollo\n .use(tenantId)\n .mutate<TResult>({\n mutation: queryNode,\n variables\n })\n .pipe(\n map((value) => f(value.data)),\n finalize(() => {\n const promise = this.apollo.use(tenantId).client.reFetchObservableQueries(true);\n promise\n .then(() => {})\n .catch((error: string) => {\n console.error(error);\n });\n })\n );\n }\n\n protected deleteEntity<TResult, TVariable extends OperationVariables>(\n tenantId: string,\n variables: TVariable,\n queryNode: DocumentNode,\n f: (result: TResult | null | undefined) => boolean\n ): Observable<boolean> {\n this.createApolloForTenant(tenantId);\n\n return this.apollo\n .use(tenantId)\n .mutate<TResult>({\n mutation: queryNode,\n variables\n })\n .pipe(\n map((value) => f(value.data)),\n finalize(() => {\n const promise = this.apollo.use(tenantId).client.reFetchObservableQueries(true);\n promise\n .then(() => {})\n .catch((error: string) => {\n console.error(error);\n });\n })\n );\n }\n\n private createApolloForTenant(tenantId: string): void {\n const result = this.apollo.use(tenantId);\n if (result) {\n return;\n }\n\n const service = this.octoServiceOptions.assetServices ?? '';\n const uri = `${service}tenants/${tenantId}/GraphQL`;\n\n this.apollo.createNamed(tenantId, {\n link: this.httpLink.create({ uri }),\n cache: new InMemoryCache({\n dataIdFromObject: (o) => (o['rtId'] as string)\n })\n });\n }\n\n private prepareWatchQuery<TResult, TVariable extends OperationVariables>(\n tenantId: string,\n variables: TVariable,\n queryNode: DocumentNode\n ): Observable<ApolloQueryResult<TResult>> {\n this.createApolloForTenant(tenantId);\n\n return this.apollo.use(tenantId).watchQuery<TResult>({\n query: queryNode,\n variables\n }).valueChanges;\n }\n\n private prepareQuery<TResult, TVariable extends OperationVariables>(\n tenantId: string,\n variables: TVariable,\n queryNode: DocumentNode\n ): Observable<ApolloQueryResult<TResult>> {\n this.createApolloForTenant(tenantId);\n\n return this.apollo.use(tenantId).query<TResult>({\n query: queryNode,\n variables,\n fetchPolicy: 'network-only'\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { MessageService } from \"@meshmakers/shared-services\";\nimport { ApolloError } from \"@apollo/client/errors\";\n\n@Injectable()\nexport class OctoMessageService{\n\n constructor(private readonly messageService: MessageService) {\n }\n\n showErrorWithDetails(error: any): void {\n if (error.constructor.name === ApolloError.prototype.constructor.name)\n {\n console.info(\"is apollo error\");\n\n if (error.graphQLErrors) {\n for (const graphQLError of error.graphQLErrors) {\n const path = graphQLError.path?.join('.');\n const message = `${path}: ${graphQLError.message}`;\n this.messageService.showError(message, \"Request because of GraphQL error failed\");\n }\n }\n else if (error.networkError) {\n this.messageService.showError(error.networkError.message, \"Request because of network error failed\");\n }\n else if (error.clientErrors) {\n let message = \"\";\n for (const clientError of error.clientErrors) {\n if (message.length > 0) {\n message += \"\\n\";\n }\n message += `${clientError.message}`;\n }\n this.messageService.showError(message, \"Request because of client error failed\");\n }\n else if (error.protocolErrors) {\n let message = \"\";\n for (const clientError of error.protocolErrors) {\n if (message.length > 0) {\n message += \"\\n\";\n }\n message += `${clientError.message}`;\n }\n this.messageService.showError(message, \"Request because of protocol error failed\");\n }\n else {\n this.messageService.showErrorWithDetails(error);\n }\n }\n }\n\n}\n","export class OctoServiceOptions {\n assetServices: string | null;\n defaultDataSourceId?: string;\n\n constructor() {\n this.assetServices = null;\n this.defaultDataSourceId = undefined;\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { OctoServiceOptions } from './options/octo-service-options';\nimport { OctoMessageService } from \"./services/octo-message.service\";\n\n@NgModule({\n declarations: [],\n imports: [],\n exports: []\n})\nexport class OctoServicesModule {\n static forRoot(octoServiceOptions: OctoServiceOptions): ModuleWithProviders<OctoServicesModule> {\n return {\n ngModule: OctoServicesModule,\n providers: [\n {\n provide: OctoServiceOptions,\n useValue: octoServiceOptions\n },\n OctoMessageService\n ]\n };\n }\n}\n","export class GraphQL {\n public static getCursor(position: number): string {\n return btoa(`arrayconnection:${position}`);\n }\n\n public static offsetToCursor(offset: number): string | null {\n if (!offset) {\n return null;\n }\n\n return this.getCursor(offset - 1);\n }\n}\n\nexport const GraphQLCommonIgnoredProperties = ['__typename'];\nexport const GraphQLCloneIgnoredProperties = ['id', 'rtId', 'ckTypeId', '__typename'];\n","import { map, Subscription } from 'rxjs';\nimport { DataSourceBase, MessageService, PagedResultDto } from '@meshmakers/shared-services';\nimport { FieldFilterDto, InputMaybe, SearchFilterDto, SortDto } from '../shared/globalTypes';\nimport { Query, QueryRef } from 'apollo-angular';\nimport type { ApolloQueryResult, OperationVariables } from '@apollo/client/core';\nimport { GraphQL } from \"../shared/graphQL\";\n\nexport interface IQueryVariablesDto extends OperationVariables {\n first?: number | null | undefined;\n after?: string | null | undefined;\n sort?: InputMaybe<InputMaybe<SortDto> | InputMaybe<SortDto>[]> | undefined;\n searchFilter?: InputMaybe<SearchFilterDto> | undefined;\n fieldFilters?: InputMaybe<InputMaybe<FieldFilterDto>[] | InputMaybe<FieldFilterDto>>;\n}\n\nexport abstract class GraphQlDataSource<TDto> extends DataSourceBase<TDto> {\n public abstract refetch(): Promise<void>;\n\n public abstract refetchWith(\n skip?: number,\n take?: number,\n searchFilter?: SearchFilterDto | null,\n fieldFilter?: FieldFilterDto[] | null,\n sort?: SortDto[] | null\n ): Promise<void>;\n\n public abstract loadData(\n skip?: number,\n take?: number,\n searchFilter?: SearchFilterDto | null,\n fieldFilter?: FieldFilterDto[] | null,\n sort?: SortDto[] | null\n ): void;\n}\n\nexport class AssetRepoGraphQlDataSource<TDto, TQueryDto, TVariablesDto extends IQueryVariablesDto> extends GraphQlDataSource<TDto> {\n private queryRef: QueryRef<TQueryDto, TVariablesDto> | null;\n private subscription: Subscription | null;\n\n constructor(\n protected messageService: MessageService,\n private readonly query: Query<TQueryDto, TVariablesDto>,\n private readonly defaultSort: SortDto[] | null = null\n ) {\n super();\n this.queryRef = null;\n this.subscription = null;\n }\n\n override clear(): void {\n super.clear();\n this.queryRef?.stopPolling();\n this.queryRef = null;\n this.subscription?.unsubscribe();\n this.subscription = null;\n }\n\n public async refetch(): Promise<void> {\n await this.queryRef?.refetch();\n }\n\n public async refetchWith(\n skip = 0,\n take = 10,\n searchFilter: SearchFilterDto | null = null,\n fieldFilter: FieldFilterDto[] | null = null,\n sort: SortDto[] | null = null\n ): Promise<void> {\n const variables = this.createVariables(skip, take, searchFilter, fieldFilter, sort);\n await this.queryRef?.refetch(variables);\n }\n\n protected createVariables(\n skip = 0,\n take = 10,\n searchFilter: SearchFilterDto | null = null,\n fieldFilter: FieldFilterDto[] | null = null,\n sort: SortDto[] | null = null\n ): TVariablesDto {\n // Default sort\n if ((!sort || (sort && sort.length === 0)) && searchFilter === null) {\n sort = new Array<SortDto>();\n if (this.defaultSort) {\n sort = this.defaultSort;\n }\n }\n\n return {\n first: take,\n after: GraphQL.offsetToCursor(skip),\n sort,\n searchFilter,\n fieldFilters: fieldFilter\n } as TVariablesDto;\n }\n\n public loadData(\n skip = 0,\n take = 10,\n searchFilter: SearchFilterDto | null = null,\n fieldFilter: FieldFilterDto[] | null = null,\n sort: SortDto[] | null = null\n ): void {\n super.onBeginLoad();\n this.clear();\n\n const variables = this.createVariables(skip, take, searchFilter, fieldFilter, sort);\n this.queryRef = this.query.watch(variables, { errorPolicy: 'all' });\n\n this.subscription = this.queryRef.valueChanges\n .pipe(\n map((v, i) => this.executeLoad(v, i)))\n .subscribe({\n next: (pagedResult) => super.onCompleteLoad(pagedResult),\n error: (e) => {\n this.messageService.showErrorWithDetails(e);\n super.onCompleteLoad(new PagedResultDto<TDto>());\n }\n });\n }\n\n protected executeLoad(_value: ApolloQueryResult<TQueryDto>, _index: number): PagedResultDto<TDto> {\n return new PagedResultDto<TDto>();\n }\n}\n","/* eslint-disable */\n// @generated\n// This file was automatically generated and should not be edited.\n\n//==============================================================\n// START Enums and Input Objects\n//==============================================================\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\n\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n ID: { input: string; output: string; }\n String: { input: string; output: string; }\n Boolean: { input: boolean; output: boolean; }\n Int: { input: number; output: number; }\n Float: { input: number; output: number; }\n BigInt: { input: any; output: any; }\n CkAttributeId: { input: string; output: string; }\n CkEnumId: { input: string; output: string; }\n CkModelId: { input: any; output: any; }\n CkRecordId: { input: string; output: string; }\n CkTypeId: { input: string; output: string; }\n DateTime: { input: any; output: any; }\n Decimal: { input: any; output: any; }\n LargeBinary: { input: any; output: any; }\n OctoObjectId: { input: string; output: string; }\n Seconds: { input: any; output: any; }\n SimpleScalar: { input: any; output: any; }\n ULong: { input: any; output: any; }\n Uri: { input: any; output: any; }\n};\n\nexport type FieldFilterDto = {\n attributePath: Scalars['String']['input'];\n comparisonValue?: InputMaybe<Scalars['SimpleScalar']['input']>;\n operator: FieldFilterOperatorsDto;\n};\n\n/** Defines the operator of field compare */\nexport enum FieldFilterOperatorsDto {\n AnyEqDto = 'ANY_EQ',\n AnyLikeDto = 'ANY_LIKE',\n EqualsDto = 'EQUALS',\n GreaterEqualThanDto = 'GREATER_EQUAL_THAN',\n GreaterThanDto = 'GREATER_THAN',\n InDto = 'IN',\n LessEqualThanDto = 'LESS_EQUAL_THAN',\n LessThanDto = 'LESS_THAN',\n LikeDto = 'LIKE',\n MatchRegExDto = 'MATCH_REG_EX',\n NotEqualsDto = 'NOT_EQUALS',\n NotInDto = 'NOT_IN'\n}\n\n\nexport type SearchFilterDto = {\n attributePaths?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;\n language?: InputMaybe<Scalars['String']['input']>;\n searchTerm: Scalars['String']['input'];\n type?: InputMaybe<SearchFilterTypesDto>;\n};\n\n/** The type of search that is used (a text based search using text analysis (high performance, scoring, maybe more false positives) or filtering of attributes (lower performance, more exact results) */\nexport enum SearchFilterTypesDto {\n AttributeFilterDto = 'ATTRIBUTE_FILTER',\n TextSearchDto = 'TEXT_SEARCH'\n}\n\nexport type SortDto = {\n attributePath: Scalars['String']['input'];\n sortOrder?: InputMaybe<SortOrdersDto>;\n};\n\n/** Defines the sort order */\nexport enum SortOrdersDto {\n AscendingDto = 'ASCENDING',\n DefaultDto = 'DEFAULT',\n DescendingDto = 'DESCENDING'\n}\n\n//==============================================================\n// END Enums and Input Objects\n//==============================================================\n","/*\n * Public API Surface of octo-services\n */\n\nexport * from './lib/services/octo-graph-ql-service-base';\nexport * from './lib/services/octo-message.service';\nexport * from './lib/options/octo-service-options';\nexport * from './lib/octo-services.module';\nexport * from './lib/models/pagedGraphResultDto';\nexport * from './lib/shared/graphQL';\nexport * from './lib/services/assetRepoGraphQlDataSource';\nexport * from './lib/shared/globalTypes';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["map"],"mappings":";;;;;;;;;AAEM,MAAO,mBAA0B,SAAQ,cAAiB,CAAA;AAC9D,IAAA,QAAQ;AAER,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AAEP,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI;;AAEvB;;MCCY,sBAAsB,CAAA;AAEd,IAAA,MAAA;AACA,IAAA,QAAA;AACA,IAAA,kBAAA;AAHnB,IAAA,WAAA,CACmB,MAAc,EACd,QAAkB,EAClB,kBAAsC,EAAA;QAFtC,IAAM,CAAA,MAAA,GAAN,MAAM;QACN,IAAQ,CAAA,QAAA,GAAR,QAAQ;QACR,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB;;IAG3B,WAAW,CACnB,QAAgB,EAChB,SAAoB,EACpB,SAAuB,EACvB,UAAmB,EACnB,CAAgE,EAAA;QAEhE,MAAM,KAAK,GAAG;cACV,IAAI,CAAC,iBAAiB,CAAqB,QAAQ,EAAE,SAAS,EAAE,SAAS;cACzE,IAAI,CAAC,YAAY,CAAqB,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC;QACzE,OAAO,KAAK,CAAC,IAAI,CACf,GAAG,CAAC,CAAC,MAAM,KAAI;AACb,YAAA,MAAM,SAAS,GAAG,IAAI,cAAc,EAAW;AAE/C,YAAA,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI,EAAE;AACzB,gBAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;AAC5B,gBAAA,MAAM,KAAK,CAAC,6BAA6B,CAAC;;AACrC,iBAAA,IAAI,MAAM,CAAC,IAAI,EAAE;AACtB,gBAAA,CAA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,CAAA,aAAA,CAAA,GAAA,WAAyB;AACzB,IAAA,uBAAA,CAAA,SAAA,CAAA,GAAA,MAAgB;AAChB,IAAA,uBAAA,CAAA,eAAA,CAAA,GAAA,cAA8B;AAC9B,IAAA,uBAAA,CAAA,cAAA,CAAA,GAAA,YAA2B;AAC3B,IAAA,uBAAA,CAAA,UAAA,CAAA,GAAA,QAAmB;AACrB,CAAC,EAbW,uBAAuB,KAAvB,uBAAuB,GAalC,EAAA,CAAA,CAAA;AAUD;IACY;AAAZ,CAAA,UAAY,oBAAoB,EAAA;AAC9B,IAAA,oBAAA,CAAA,oBAAA,CAAA,GAAA,kBAAuC;AACvC,IAAA,oBAAA,CAAA,eAAA,CAAA,GAAA,aAA6B;AAC/B,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,GAG/B,EAAA,CAAA,CAAA;AAOD;IACY;AAAZ,CAAA,UAAY,aAAa,EAAA;AACvB,IAAA,aAAA,CAAA,cAAA,CAAA,GAAA,WAA0B;AAC1B,IAAA,aAAA,CAAA,YAAA,CAAA,GAAA,SAAsB;AACtB,IAAA,aAAA,CAAA,eAAA,CAAA,GAAA,YAA4B;AAC9B,CAAC,EAJW,aAAa,KAAb,aAAa,GAIxB,EAAA,CAAA,CAAA;AAED;AACA;AACA;;ACnFA;;AAEG;;ACFH;;AAEG;;;;"}
@@ -0,0 +1,30 @@
1
+ import { DataSourceBase, MessageService, PagedResultDto } from '@meshmakers/shared-services';
2
+ import { FieldFilterDto, InputMaybe, SearchFilterDto, SortDto } from '../shared/globalTypes';
3
+ import { Query } from 'apollo-angular';
4
+ import type { ApolloQueryResult, OperationVariables } from '@apollo/client/core';
5
+ export interface IQueryVariablesDto extends OperationVariables {
6
+ first?: number | null | undefined;
7
+ after?: string | null | undefined;
8
+ sort?: InputMaybe<InputMaybe<SortDto> | InputMaybe<SortDto>[]> | undefined;
9
+ searchFilter?: InputMaybe<SearchFilterDto> | undefined;
10
+ fieldFilters?: InputMaybe<InputMaybe<FieldFilterDto>[] | InputMaybe<FieldFilterDto>>;
11
+ }
12
+ export declare abstract class GraphQlDataSource<TDto> extends DataSourceBase<TDto> {
13
+ abstract refetch(): Promise<void>;
14
+ abstract refetchWith(skip?: number, take?: number, searchFilter?: SearchFilterDto | null, fieldFilter?: FieldFilterDto[] | null, sort?: SortDto[] | null): Promise<void>;
15
+ abstract loadData(skip?: number, take?: number, searchFilter?: SearchFilterDto | null, fieldFilter?: FieldFilterDto[] | null, sort?: SortDto[] | null): void;
16
+ }
17
+ export declare class AssetRepoGraphQlDataSource<TDto, TQueryDto, TVariablesDto extends IQueryVariablesDto> extends GraphQlDataSource<TDto> {
18
+ protected messageService: MessageService;
19
+ private readonly query;
20
+ private readonly defaultSort;
21
+ private queryRef;
22
+ private subscription;
23
+ constructor(messageService: MessageService, query: Query<TQueryDto, TVariablesDto>, defaultSort?: SortDto[] | null);
24
+ clear(): void;
25
+ refetch(): Promise<void>;
26
+ refetchWith(skip?: number, take?: number, searchFilter?: SearchFilterDto | null, fieldFilter?: FieldFilterDto[] | null, sort?: SortDto[] | null): Promise<void>;
27
+ protected createVariables(skip?: number, take?: number, searchFilter?: SearchFilterDto | null, fieldFilter?: FieldFilterDto[] | null, sort?: SortDto[] | null): TVariablesDto;
28
+ loadData(skip?: number, take?: number, searchFilter?: SearchFilterDto | null, fieldFilter?: FieldFilterDto[] | null, sort?: SortDto[] | null): void;
29
+ protected executeLoad(_value: ApolloQueryResult<TQueryDto>, _index: number): PagedResultDto<TDto>;
30
+ }
@@ -0,0 +1,9 @@
1
+ import { MessageService } from "@meshmakers/shared-services";
2
+ import * as i0 from "@angular/core";
3
+ export declare class OctoMessageService {
4
+ private readonly messageService;
5
+ constructor(messageService: MessageService);
6
+ showErrorWithDetails(error: any): void;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<OctoMessageService, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<OctoMessageService>;
9
+ }
@@ -0,0 +1,122 @@
1
+ export type Maybe<T> = T | null;
2
+ export type InputMaybe<T> = Maybe<T>;
3
+ /** All built-in and custom scalars, mapped to their actual values */
4
+ export type Scalars = {
5
+ ID: {
6
+ input: string;
7
+ output: string;
8
+ };
9
+ String: {
10
+ input: string;
11
+ output: string;
12
+ };
13
+ Boolean: {
14
+ input: boolean;
15
+ output: boolean;
16
+ };
17
+ Int: {
18
+ input: number;
19
+ output: number;
20
+ };
21
+ Float: {
22
+ input: number;
23
+ output: number;
24
+ };
25
+ BigInt: {
26
+ input: any;
27
+ output: any;
28
+ };
29
+ CkAttributeId: {
30
+ input: string;
31
+ output: string;
32
+ };
33
+ CkEnumId: {
34
+ input: string;
35
+ output: string;
36
+ };
37
+ CkModelId: {
38
+ input: any;
39
+ output: any;
40
+ };
41
+ CkRecordId: {
42
+ input: string;
43
+ output: string;
44
+ };
45
+ CkTypeId: {
46
+ input: string;
47
+ output: string;
48
+ };
49
+ DateTime: {
50
+ input: any;
51
+ output: any;
52
+ };
53
+ Decimal: {
54
+ input: any;
55
+ output: any;
56
+ };
57
+ LargeBinary: {
58
+ input: any;
59
+ output: any;
60
+ };
61
+ OctoObjectId: {
62
+ input: string;
63
+ output: string;
64
+ };
65
+ Seconds: {
66
+ input: any;
67
+ output: any;
68
+ };
69
+ SimpleScalar: {
70
+ input: any;
71
+ output: any;
72
+ };
73
+ ULong: {
74
+ input: any;
75
+ output: any;
76
+ };
77
+ Uri: {
78
+ input: any;
79
+ output: any;
80
+ };
81
+ };
82
+ export type FieldFilterDto = {
83
+ attributePath: Scalars['String']['input'];
84
+ comparisonValue?: InputMaybe<Scalars['SimpleScalar']['input']>;
85
+ operator: FieldFilterOperatorsDto;
86
+ };
87
+ /** Defines the operator of field compare */
88
+ export declare enum FieldFilterOperatorsDto {
89
+ AnyEqDto = "ANY_EQ",
90
+ AnyLikeDto = "ANY_LIKE",
91
+ EqualsDto = "EQUALS",
92
+ GreaterEqualThanDto = "GREATER_EQUAL_THAN",
93
+ GreaterThanDto = "GREATER_THAN",
94
+ InDto = "IN",
95
+ LessEqualThanDto = "LESS_EQUAL_THAN",
96
+ LessThanDto = "LESS_THAN",
97
+ LikeDto = "LIKE",
98
+ MatchRegExDto = "MATCH_REG_EX",
99
+ NotEqualsDto = "NOT_EQUALS",
100
+ NotInDto = "NOT_IN"
101
+ }
102
+ export type SearchFilterDto = {
103
+ attributePaths?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
104
+ language?: InputMaybe<Scalars['String']['input']>;
105
+ searchTerm: Scalars['String']['input'];
106
+ type?: InputMaybe<SearchFilterTypesDto>;
107
+ };
108
+ /** The type of search that is used (a text based search using text analysis (high performance, scoring, maybe more false positives) or filtering of attributes (lower performance, more exact results) */
109
+ export declare enum SearchFilterTypesDto {
110
+ AttributeFilterDto = "ATTRIBUTE_FILTER",
111
+ TextSearchDto = "TEXT_SEARCH"
112
+ }
113
+ export type SortDto = {
114
+ attributePath: Scalars['String']['input'];
115
+ sortOrder?: InputMaybe<SortOrdersDto>;
116
+ };
117
+ /** Defines the sort order */
118
+ export declare enum SortOrdersDto {
119
+ AscendingDto = "ASCENDING",
120
+ DefaultDto = "DEFAULT",
121
+ DescendingDto = "DESCENDING"
122
+ }
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@meshmakers/octo-services",
3
- "version": "3.2.18-0",
3
+ "version": "3.2.20-0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.1.2",
6
- "@angular/core": "^19.1.2"
6
+ "@angular/core": "^19.1.2",
7
+ "apollo-angular": "^8.0.2"
7
8
  },
8
9
  "dependencies": {
9
10
  "tslib": "^2.6.3"
package/public-api.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  export * from './lib/services/octo-graph-ql-service-base';
2
+ export * from './lib/services/octo-message.service';
2
3
  export * from './lib/options/octo-service-options';
3
4
  export * from './lib/octo-services.module';
4
5
  export * from './lib/models/pagedGraphResultDto';
5
6
  export * from './lib/shared/graphQL';
7
+ export * from './lib/services/assetRepoGraphQlDataSource';
8
+ export * from './lib/shared/globalTypes';