@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.
Files changed (101) hide show
  1. package/README.md +82 -129
  2. package/fesm2022/irohalab-mira-sdk-angular.mjs +579 -734
  3. package/fesm2022/irohalab-mira-sdk-angular.mjs.map +1 -1
  4. package/index.d.ts +1823 -6
  5. package/package.json +3 -5
  6. package/api/api.d.ts +0 -4
  7. package/api/default.service.d.ts +0 -545
  8. package/api/default.serviceInterface.d.ts +0 -200
  9. package/api.module.d.ts +0 -11
  10. package/configuration.d.ts +0 -104
  11. package/encoder.d.ts +0 -11
  12. package/esm2022/api/api.mjs +0 -5
  13. package/esm2022/api/default.service.mjs +0 -1489
  14. package/esm2022/api/default.serviceInterface.mjs +0 -2
  15. package/esm2022/api.module.mjs +0 -40
  16. package/esm2022/configuration.mjs +0 -129
  17. package/esm2022/encoder.mjs +0 -19
  18. package/esm2022/index.mjs +0 -7
  19. package/esm2022/irohalab-mira-sdk-angular.mjs +0 -5
  20. package/esm2022/model/batchGetMainItemByIdListResult.mjs +0 -2
  21. package/esm2022/model/batchGetSubItemByIdListResult.mjs +0 -2
  22. package/esm2022/model/characterRelationsWithMainItems.mjs +0 -2
  23. package/esm2022/model/clientMapping.mjs +0 -2
  24. package/esm2022/model/createSubItemFavoriteRequestBody.mjs +0 -12
  25. package/esm2022/model/deleteClientMappingByMainItemResponse.mjs +0 -12
  26. package/esm2022/model/errorResponse.mjs +0 -12
  27. package/esm2022/model/favorite.mjs +0 -2
  28. package/esm2022/model/favoriteProgress.mjs +0 -12
  29. package/esm2022/model/favoriteStatus.mjs +0 -18
  30. package/esm2022/model/getOnAirItemListResponse.mjs +0 -2
  31. package/esm2022/model/idListRequestBody.mjs +0 -12
  32. package/esm2022/model/imageInfo.mjs +0 -12
  33. package/esm2022/model/itemCastCharacterRelation.mjs +0 -12
  34. package/esm2022/model/itemEntity.mjs +0 -2
  35. package/esm2022/model/itemPersonRelation.mjs +0 -12
  36. package/esm2022/model/itemRelation.mjs +0 -12
  37. package/esm2022/model/itemRelationsWithMainItems.mjs +0 -2
  38. package/esm2022/model/itemSubType.mjs +0 -56
  39. package/esm2022/model/itemType.mjs +0 -25
  40. package/esm2022/model/listFavoritesResponse.mjs +0 -2
  41. package/esm2022/model/listMainItemResponse.mjs +0 -2
  42. package/esm2022/model/listSubItemFavoriteResponse.mjs +0 -2
  43. package/esm2022/model/mainItem.mjs +0 -2
  44. package/esm2022/model/mainItemBasic.mjs +0 -2
  45. package/esm2022/model/mainType.mjs +0 -16
  46. package/esm2022/model/models.mjs +0 -39
  47. package/esm2022/model/onAirItem.mjs +0 -2
  48. package/esm2022/model/patchFavoriteBody.mjs +0 -2
  49. package/esm2022/model/personRelationsWithMainItems.mjs +0 -2
  50. package/esm2022/model/propertyType.mjs +0 -18
  51. package/esm2022/model/propertyValue.mjs +0 -2
  52. package/esm2022/model/propertyValueValue.mjs +0 -12
  53. package/esm2022/model/subItem.mjs +0 -12
  54. package/esm2022/model/subItemFavorite.mjs +0 -2
  55. package/esm2022/model/succeedEmptyResponse.mjs +0 -12
  56. package/esm2022/model/syncFavoritesRequestBody.mjs +0 -2
  57. package/esm2022/model/syncFavoritesRequestBodyFavoritesInner.mjs +0 -12
  58. package/esm2022/model/syncFavoritesResponse.mjs +0 -2
  59. package/esm2022/param.mjs +0 -2
  60. package/esm2022/variables.mjs +0 -9
  61. package/model/batchGetMainItemByIdListResult.d.ts +0 -14
  62. package/model/batchGetSubItemByIdListResult.d.ts +0 -14
  63. package/model/characterRelationsWithMainItems.d.ts +0 -16
  64. package/model/clientMapping.d.ts +0 -16
  65. package/model/createSubItemFavoriteRequestBody.d.ts +0 -13
  66. package/model/deleteClientMappingByMainItemResponse.d.ts +0 -16
  67. package/model/errorResponse.d.ts +0 -14
  68. package/model/favorite.d.ts +0 -22
  69. package/model/favoriteProgress.d.ts +0 -13
  70. package/model/favoriteStatus.d.ts +0 -18
  71. package/model/getOnAirItemListResponse.d.ts +0 -17
  72. package/model/idListRequestBody.d.ts +0 -13
  73. package/model/imageInfo.d.ts +0 -20
  74. package/model/itemCastCharacterRelation.d.ts +0 -25
  75. package/model/itemEntity.d.ts +0 -24
  76. package/model/itemPersonRelation.d.ts +0 -22
  77. package/model/itemRelation.d.ts +0 -22
  78. package/model/itemRelationsWithMainItems.d.ts +0 -20
  79. package/model/itemSubType.d.ts +0 -56
  80. package/model/itemType.d.ts +0 -25
  81. package/model/listFavoritesResponse.d.ts +0 -21
  82. package/model/listMainItemResponse.d.ts +0 -21
  83. package/model/listSubItemFavoriteResponse.d.ts +0 -18
  84. package/model/mainItem.d.ts +0 -42
  85. package/model/mainItemBasic.d.ts +0 -32
  86. package/model/mainType.d.ts +0 -16
  87. package/model/models.d.ts +0 -38
  88. package/model/onAirItem.d.ts +0 -28
  89. package/model/patchFavoriteBody.d.ts +0 -18
  90. package/model/personRelationsWithMainItems.d.ts +0 -18
  91. package/model/propertyType.d.ts +0 -18
  92. package/model/propertyValue.d.ts +0 -21
  93. package/model/propertyValueValue.d.ts +0 -17
  94. package/model/subItem.d.ts +0 -45
  95. package/model/subItemFavorite.d.ts +0 -17
  96. package/model/succeedEmptyResponse.d.ts +0 -13
  97. package/model/syncFavoritesRequestBody.d.ts +0 -15
  98. package/model/syncFavoritesRequestBodyFavoritesInner.d.ts +0 -15
  99. package/model/syncFavoritesResponse.d.ts +0 -18
  100. package/param.d.ts +0 -37
  101. 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 18.2.0.
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
- // without configuring providers
12
- import { MiraApiModule } from '';
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
- @NgModule({
54
- imports: [ MiraApiModule ],
55
- declarations: [ AppComponent ],
15
+ export const appConfig: ApplicationConfig = {
56
16
  providers: [
57
- {
58
- provide: MiraConfiguration,
59
- useFactory: (authService: AuthService) => new MiraConfiguration(
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
- bootstrap: [ AppComponent ]
70
- })
71
- export class AppModule {}
72
- ```
73
-
21
+ };
74
22
  ```
75
- import { DefaultApi } from '';
76
23
 
77
- export class AppComponent {
78
- constructor(private apiGateway: DefaultApi) { }
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
- Note: The MiraApiModule is restricted to being instantiated once app wide.
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
- @NgModule({
95
- imports: [
96
- MiraApiModule,
97
- OtherApiModule,
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
- ### Set service base path
110
- If different than the generated base path, during app bootstrap, you can provide the base path to your service.
111
-
112
- ```
113
- import { BASE_PATH } from '';
114
-
115
- bootstrap(AppComponent, [
116
- { provide: BASE_PATH, useValue: 'https://your-web-service.com' },
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
- import { BASE_PATH } from '';
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
- @NgModule({
125
- imports: [],
126
- declarations: [ AppComponent ],
127
- providers: [ provide: BASE_PATH, useValue: 'https://your-web-service.com' ],
128
- bootstrap: [ AppComponent ]
129
- })
130
- export class AppModule {}
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
- #### Using @angular/cli
135
- First extend your `src/environments/*.ts` files by adding the corresponding base path:
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
- In the src/app/app.module.ts:
145
- ```
146
- import { BASE_PATH } from '';
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
- @NgModule({
150
- declarations: [
151
- AppComponent
152
- ],
153
- imports: [ ],
154
- providers: [{ provide: BASE_PATH, useValue: environment.API_BASE_PATH }],
155
- bootstrap: [ AppComponent ]
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
- encodeParam: (param: Param) => myFancyParamEncoder(param),
128
+ encodeParam: (param: Param) => myFancyParamEncoder(param),
176
129
  })
177
130
  ```
178
131