@meshmakers/octo-services 3.3.34 → 3.3.380
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/README.md +94 -13
- package/fesm2022/meshmakers-octo-services.mjs +2877 -236
- package/fesm2022/meshmakers-octo-services.mjs.map +1 -1
- package/package.json +9 -6
- package/types/meshmakers-octo-services.d.ts +20627 -0
- package/index.d.ts +0 -217
package/README.md
CHANGED
|
@@ -1,24 +1,105 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @meshmakers/octo-services
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Angular library providing services for interacting with OctoMesh backend APIs.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Features
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
- **HTTP Services** - REST API clients for Asset Repository, Identity Service, Bot Service
|
|
8
|
+
- **GraphQL Services** - Construction Kit queries for types, attributes, and models
|
|
9
|
+
- **Job Management** - Background job execution with progress tracking
|
|
10
|
+
- **Error Handling** - Apollo Link for GraphQL error handling with user notifications
|
|
9
11
|
|
|
10
|
-
##
|
|
12
|
+
## Documentation
|
|
13
|
+
|
|
14
|
+
- [Developer Documentation](docs/README.md) - Complete API reference and usage examples
|
|
15
|
+
- [AI Context](CLAUDE.md) - Guidelines for AI-assisted development
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
### 1. Implement Configuration Service
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { Injectable } from '@angular/core';
|
|
23
|
+
import { IConfigurationService, AddInConfiguration } from '@meshmakers/octo-services';
|
|
24
|
+
|
|
25
|
+
@Injectable({ providedIn: 'root' })
|
|
26
|
+
export class AppConfigurationService implements IConfigurationService {
|
|
27
|
+
private _config: AddInConfiguration = {} as AddInConfiguration;
|
|
28
|
+
|
|
29
|
+
get config(): AddInConfiguration {
|
|
30
|
+
return this._config;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async loadConfigAsync(): Promise<void> {
|
|
34
|
+
this._config = await fetch('/assets/config.json').then(r => r.json());
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 2. Register Providers
|
|
11
40
|
|
|
12
|
-
|
|
41
|
+
```typescript
|
|
42
|
+
import { CONFIGURATION_SERVICE } from '@meshmakers/octo-services';
|
|
43
|
+
import { AppConfigurationService } from './services/app-configuration.service';
|
|
13
44
|
|
|
14
|
-
|
|
45
|
+
export const appConfig: ApplicationConfig = {
|
|
46
|
+
providers: [
|
|
47
|
+
{ provide: CONFIGURATION_SERVICE, useClass: AppConfigurationService }
|
|
48
|
+
]
|
|
49
|
+
};
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 3. Use Services
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
import { HealthService, CkTypeSelectorService } from '@meshmakers/octo-services';
|
|
56
|
+
|
|
57
|
+
@Component({ ... })
|
|
58
|
+
export class MyComponent {
|
|
59
|
+
private readonly healthService = inject(HealthService);
|
|
60
|
+
private readonly ckTypeSelector = inject(CkTypeSelectorService);
|
|
61
|
+
|
|
62
|
+
async checkHealth(): Promise<void> {
|
|
63
|
+
const health = await this.healthService.getAssetRepoServiceHealthAsync();
|
|
64
|
+
console.log('Status:', health?.status);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
loadTypes(): void {
|
|
68
|
+
this.ckTypeSelector.getCkTypes({ searchText: 'Customer' })
|
|
69
|
+
.subscribe(result => console.log('Types:', result.items));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Available Services
|
|
75
|
+
|
|
76
|
+
| Service | Description |
|
|
77
|
+
|---------|-------------|
|
|
78
|
+
| `HealthService` | Backend health checks |
|
|
79
|
+
| `AssetRepoService` | Tenant and model management |
|
|
80
|
+
| `IdentityService` | User, role, and client management |
|
|
81
|
+
| `BotService` | Background job execution |
|
|
82
|
+
| `JobManagementService` | Job progress tracking with UI |
|
|
83
|
+
| `CkTypeSelectorService` | Query CK types |
|
|
84
|
+
| `CkTypeAttributeService` | Query CK type/record attributes |
|
|
85
|
+
| `CkModelService` | Check model availability and versions |
|
|
86
|
+
| `AttributeSelectorService` | Query available query columns |
|
|
87
|
+
|
|
88
|
+
## Build
|
|
15
89
|
|
|
16
|
-
|
|
90
|
+
```bash
|
|
91
|
+
# From frontend-libraries directory
|
|
92
|
+
npm run build:octo-services
|
|
93
|
+
```
|
|
17
94
|
|
|
18
|
-
##
|
|
95
|
+
## Test
|
|
19
96
|
|
|
20
|
-
|
|
97
|
+
```bash
|
|
98
|
+
npm test -- --project=@meshmakers/octo-services --watch=false
|
|
99
|
+
```
|
|
21
100
|
|
|
22
|
-
##
|
|
101
|
+
## Lint
|
|
23
102
|
|
|
24
|
-
|
|
103
|
+
```bash
|
|
104
|
+
npx ng lint @meshmakers/octo-services
|
|
105
|
+
```
|