@irohalab/mira-sdk-angular 1.14.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -129
- package/fesm2022/irohalab-mira-sdk-angular.mjs +579 -734
- package/fesm2022/irohalab-mira-sdk-angular.mjs.map +1 -1
- package/index.d.ts +1823 -6
- package/package.json +3 -5
- package/api/api.d.ts +0 -4
- package/api/default.service.d.ts +0 -545
- package/api/default.serviceInterface.d.ts +0 -200
- package/api.module.d.ts +0 -11
- package/configuration.d.ts +0 -104
- package/encoder.d.ts +0 -11
- package/esm2022/api/api.mjs +0 -5
- package/esm2022/api/default.service.mjs +0 -1489
- package/esm2022/api/default.serviceInterface.mjs +0 -2
- package/esm2022/api.module.mjs +0 -40
- package/esm2022/configuration.mjs +0 -129
- package/esm2022/encoder.mjs +0 -19
- package/esm2022/index.mjs +0 -7
- package/esm2022/irohalab-mira-sdk-angular.mjs +0 -5
- package/esm2022/model/batchGetMainItemByIdListResult.mjs +0 -2
- package/esm2022/model/batchGetSubItemByIdListResult.mjs +0 -2
- package/esm2022/model/characterRelationsWithMainItems.mjs +0 -2
- package/esm2022/model/clientMapping.mjs +0 -2
- package/esm2022/model/createSubItemFavoriteRequestBody.mjs +0 -12
- package/esm2022/model/deleteClientMappingByMainItemResponse.mjs +0 -12
- package/esm2022/model/errorResponse.mjs +0 -12
- package/esm2022/model/favorite.mjs +0 -2
- package/esm2022/model/favoriteProgress.mjs +0 -12
- package/esm2022/model/favoriteStatus.mjs +0 -18
- package/esm2022/model/getOnAirItemListResponse.mjs +0 -2
- package/esm2022/model/idListRequestBody.mjs +0 -12
- package/esm2022/model/imageInfo.mjs +0 -12
- package/esm2022/model/itemCastCharacterRelation.mjs +0 -12
- package/esm2022/model/itemEntity.mjs +0 -2
- package/esm2022/model/itemPersonRelation.mjs +0 -12
- package/esm2022/model/itemRelation.mjs +0 -12
- package/esm2022/model/itemRelationsWithMainItems.mjs +0 -2
- package/esm2022/model/itemSubType.mjs +0 -56
- package/esm2022/model/itemType.mjs +0 -25
- package/esm2022/model/listFavoritesResponse.mjs +0 -2
- package/esm2022/model/listMainItemResponse.mjs +0 -2
- package/esm2022/model/listSubItemFavoriteResponse.mjs +0 -2
- package/esm2022/model/mainItem.mjs +0 -2
- package/esm2022/model/mainItemBasic.mjs +0 -2
- package/esm2022/model/mainType.mjs +0 -16
- package/esm2022/model/models.mjs +0 -39
- package/esm2022/model/onAirItem.mjs +0 -2
- package/esm2022/model/patchFavoriteBody.mjs +0 -2
- package/esm2022/model/personRelationsWithMainItems.mjs +0 -2
- package/esm2022/model/propertyType.mjs +0 -18
- package/esm2022/model/propertyValue.mjs +0 -2
- package/esm2022/model/propertyValueValue.mjs +0 -12
- package/esm2022/model/subItem.mjs +0 -12
- package/esm2022/model/subItemFavorite.mjs +0 -2
- package/esm2022/model/succeedEmptyResponse.mjs +0 -12
- package/esm2022/model/syncFavoritesRequestBody.mjs +0 -2
- package/esm2022/model/syncFavoritesRequestBodyFavoritesInner.mjs +0 -12
- package/esm2022/model/syncFavoritesResponse.mjs +0 -2
- package/esm2022/param.mjs +0 -2
- package/esm2022/variables.mjs +0 -9
- package/model/batchGetMainItemByIdListResult.d.ts +0 -14
- package/model/batchGetSubItemByIdListResult.d.ts +0 -14
- package/model/characterRelationsWithMainItems.d.ts +0 -16
- package/model/clientMapping.d.ts +0 -16
- package/model/createSubItemFavoriteRequestBody.d.ts +0 -13
- package/model/deleteClientMappingByMainItemResponse.d.ts +0 -16
- package/model/errorResponse.d.ts +0 -14
- package/model/favorite.d.ts +0 -22
- package/model/favoriteProgress.d.ts +0 -13
- package/model/favoriteStatus.d.ts +0 -18
- package/model/getOnAirItemListResponse.d.ts +0 -17
- package/model/idListRequestBody.d.ts +0 -13
- package/model/imageInfo.d.ts +0 -20
- package/model/itemCastCharacterRelation.d.ts +0 -25
- package/model/itemEntity.d.ts +0 -24
- package/model/itemPersonRelation.d.ts +0 -22
- package/model/itemRelation.d.ts +0 -22
- package/model/itemRelationsWithMainItems.d.ts +0 -20
- package/model/itemSubType.d.ts +0 -56
- package/model/itemType.d.ts +0 -25
- package/model/listFavoritesResponse.d.ts +0 -21
- package/model/listMainItemResponse.d.ts +0 -21
- package/model/listSubItemFavoriteResponse.d.ts +0 -18
- package/model/mainItem.d.ts +0 -42
- package/model/mainItemBasic.d.ts +0 -32
- package/model/mainType.d.ts +0 -16
- package/model/models.d.ts +0 -38
- package/model/onAirItem.d.ts +0 -28
- package/model/patchFavoriteBody.d.ts +0 -18
- package/model/personRelationsWithMainItems.d.ts +0 -18
- package/model/propertyType.d.ts +0 -18
- package/model/propertyValue.d.ts +0 -21
- package/model/propertyValueValue.d.ts +0 -17
- package/model/subItem.d.ts +0 -45
- package/model/subItemFavorite.d.ts +0 -17
- package/model/succeedEmptyResponse.d.ts +0 -13
- package/model/syncFavoritesRequestBody.d.ts +0 -15
- package/model/syncFavoritesRequestBodyFavoritesInner.d.ts +0 -15
- package/model/syncFavoritesResponse.d.ts +0 -18
- package/param.d.ts +0 -37
- package/variables.d.ts +0 -8
package/README.md
CHANGED
|
@@ -1,160 +1,112 @@
|
|
|
1
1
|
# MiraSdkAngular
|
|
2
2
|
|
|
3
|
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 19.2.26.
|
|
4
4
|
|
|
5
5
|
#### General usage
|
|
6
6
|
|
|
7
7
|
In your Angular project:
|
|
8
8
|
|
|
9
|
+
```typescript
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
import { HttpClientModule } from '@angular/common/http';
|
|
14
|
-
|
|
15
|
-
@NgModule({
|
|
16
|
-
imports: [
|
|
17
|
-
MiraApiModule,
|
|
18
|
-
// make sure to import the HttpClientModule in the AppModule only,
|
|
19
|
-
// see https://github.com/angular/angular/issues/20575
|
|
20
|
-
HttpClientModule
|
|
21
|
-
],
|
|
22
|
-
declarations: [ AppComponent ],
|
|
23
|
-
providers: [],
|
|
24
|
-
bootstrap: [ AppComponent ]
|
|
25
|
-
})
|
|
26
|
-
export class AppModule {}
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
// configuring providers
|
|
31
|
-
import { MiraApiModule, MiraConfiguration, MiraConfigurationParameters } from '';
|
|
32
|
-
|
|
33
|
-
export function apiConfigFactory (): MiraConfiguration {
|
|
34
|
-
const params: MiraConfigurationParameters = {
|
|
35
|
-
// set configuration parameters here.
|
|
36
|
-
}
|
|
37
|
-
return new MiraConfiguration(params);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@NgModule({
|
|
41
|
-
imports: [ MiraApiModule.forRoot(apiConfigFactory) ],
|
|
42
|
-
declarations: [ AppComponent ],
|
|
43
|
-
providers: [],
|
|
44
|
-
bootstrap: [ AppComponent ]
|
|
45
|
-
})
|
|
46
|
-
export class AppModule {}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
// configuring providers with an authentication service that manages your access tokens
|
|
51
|
-
import { MiraApiModule, MiraConfiguration } from '';
|
|
11
|
+
import { ApplicationConfig } from '@angular/core';
|
|
12
|
+
import { provideHttpClient } from '@angular/common/http';
|
|
13
|
+
import { provideApi } from '';
|
|
52
14
|
|
|
53
|
-
|
|
54
|
-
imports: [ MiraApiModule ],
|
|
55
|
-
declarations: [ AppComponent ],
|
|
15
|
+
export const appConfig: ApplicationConfig = {
|
|
56
16
|
providers: [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
{
|
|
61
|
-
basePath: environment.apiUrl,
|
|
62
|
-
accessToken: authService.getAccessToken.bind(authService)
|
|
63
|
-
}
|
|
64
|
-
),
|
|
65
|
-
deps: [AuthService],
|
|
66
|
-
multi: false
|
|
67
|
-
}
|
|
17
|
+
// ...
|
|
18
|
+
provideHttpClient(),
|
|
19
|
+
provideApi()
|
|
68
20
|
],
|
|
69
|
-
|
|
70
|
-
})
|
|
71
|
-
export class AppModule {}
|
|
72
|
-
```
|
|
73
|
-
|
|
21
|
+
};
|
|
74
22
|
```
|
|
75
|
-
import { DefaultApi } from '';
|
|
76
23
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
24
|
+
**NOTE**
|
|
25
|
+
If you're still using `AppModule` and haven't [migrated](https://angular.dev/reference/migrations/standalone) yet, you can still import an Angular module:
|
|
26
|
+
```typescript
|
|
27
|
+
import { MiraApiModule } from '';
|
|
80
28
|
```
|
|
81
29
|
|
|
82
|
-
|
|
83
|
-
This is to ensure that all services are treated as singletons.
|
|
84
|
-
|
|
85
|
-
#### Using multiple OpenAPI files / APIs / MiraApiModules
|
|
86
|
-
In order to use multiple `MiraApiModules` generated from different OpenAPI files,
|
|
87
|
-
you can create an alias name when importing the modules
|
|
88
|
-
in order to avoid naming conflicts:
|
|
89
|
-
```
|
|
90
|
-
import { MiraApiModule } from 'my-api-path';
|
|
91
|
-
import { MiraApiModule as OtherApiModule } from 'my-other-api-path';
|
|
92
|
-
import { HttpClientModule } from '@angular/common/http';
|
|
30
|
+
If different from the generated base path, during app bootstrap, you can provide the base path to your service.
|
|
93
31
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
// make sure to import the HttpClientModule in the AppModule only,
|
|
99
|
-
// see https://github.com/angular/angular/issues/20575
|
|
100
|
-
HttpClientModule
|
|
101
|
-
]
|
|
102
|
-
})
|
|
103
|
-
export class AppModule {
|
|
32
|
+
```typescript
|
|
33
|
+
import { ApplicationConfig } from '@angular/core';
|
|
34
|
+
import { provideHttpClient } from '@angular/common/http';
|
|
35
|
+
import { provideApi } from '';
|
|
104
36
|
|
|
105
|
-
|
|
37
|
+
export const appConfig: ApplicationConfig = {
|
|
38
|
+
providers: [
|
|
39
|
+
// ...
|
|
40
|
+
provideHttpClient(),
|
|
41
|
+
provideApi('http://localhost:9999')
|
|
42
|
+
],
|
|
43
|
+
};
|
|
106
44
|
```
|
|
107
45
|
|
|
46
|
+
```typescript
|
|
47
|
+
// with a custom configuration
|
|
48
|
+
import { ApplicationConfig } from '@angular/core';
|
|
49
|
+
import { provideHttpClient } from '@angular/common/http';
|
|
50
|
+
import { provideApi } from '';
|
|
108
51
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
52
|
+
export const appConfig: ApplicationConfig = {
|
|
53
|
+
providers: [
|
|
54
|
+
// ...
|
|
55
|
+
provideHttpClient(),
|
|
56
|
+
provideApi({
|
|
57
|
+
withCredentials: true,
|
|
58
|
+
username: 'user',
|
|
59
|
+
password: 'password'
|
|
60
|
+
})
|
|
61
|
+
],
|
|
62
|
+
};
|
|
118
63
|
```
|
|
119
|
-
or
|
|
120
64
|
|
|
121
|
-
```
|
|
122
|
-
|
|
65
|
+
```typescript
|
|
66
|
+
// with factory building a custom configuration
|
|
67
|
+
import { ApplicationConfig } from '@angular/core';
|
|
68
|
+
import { provideHttpClient } from '@angular/common/http';
|
|
69
|
+
import { provideApi, MiraConfiguration } from '';
|
|
123
70
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
71
|
+
export const appConfig: ApplicationConfig = {
|
|
72
|
+
providers: [
|
|
73
|
+
// ...
|
|
74
|
+
provideHttpClient(),
|
|
75
|
+
{
|
|
76
|
+
provide: MiraConfiguration,
|
|
77
|
+
useFactory: (authService: AuthService) => new MiraConfiguration({
|
|
78
|
+
basePath: 'http://localhost:9999',
|
|
79
|
+
withCredentials: true,
|
|
80
|
+
username: authService.getUsername(),
|
|
81
|
+
password: authService.getPassword(),
|
|
82
|
+
}),
|
|
83
|
+
deps: [AuthService],
|
|
84
|
+
multi: false
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
};
|
|
131
88
|
```
|
|
132
89
|
|
|
90
|
+
### Using multiple OpenAPI files / APIs
|
|
133
91
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
```
|
|
138
|
-
export const environment = {
|
|
139
|
-
production: false,
|
|
140
|
-
API_BASE_PATH: 'http://127.0.0.1:8080'
|
|
141
|
-
};
|
|
142
|
-
```
|
|
92
|
+
In order to use multiple APIs generated from different OpenAPI files,
|
|
93
|
+
you can create an alias name when importing the modules
|
|
94
|
+
in order to avoid naming conflicts:
|
|
143
95
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
import {
|
|
96
|
+
```typescript
|
|
97
|
+
import { provideApi as provideUserApi } from 'my-user-api-path';
|
|
98
|
+
import { provideApi as provideAdminApi } from 'my-admin-api-path';
|
|
99
|
+
import { HttpClientModule } from '@angular/common/http';
|
|
147
100
|
import { environment } from '../environments/environment';
|
|
148
101
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
export class AppModule { }
|
|
102
|
+
export const appConfig: ApplicationConfig = {
|
|
103
|
+
providers: [
|
|
104
|
+
// ...
|
|
105
|
+
provideHttpClient(),
|
|
106
|
+
provideUserApi(environment.basePath),
|
|
107
|
+
provideAdminApi(environment.basePath),
|
|
108
|
+
],
|
|
109
|
+
};
|
|
158
110
|
```
|
|
159
111
|
|
|
160
112
|
### Customizing path parameter encoding
|
|
@@ -170,9 +122,10 @@ pass an arrow-function or method-reference to the `encodeParam` property of the
|
|
|
170
122
|
(see [General Usage](#general-usage) above).
|
|
171
123
|
|
|
172
124
|
Example value for use in your Configuration-Provider:
|
|
125
|
+
|
|
173
126
|
```typescript
|
|
174
127
|
new Configuration({
|
|
175
|
-
|
|
128
|
+
encodeParam: (param: Param) => myFancyParamEncoder(param),
|
|
176
129
|
})
|
|
177
130
|
```
|
|
178
131
|
|