@experteam-mx/ngx-services 20.1.17-alpha.1 → 20.1.17-alpha.2

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 CHANGED
@@ -1,80 +1,80 @@
1
- # @experteam-mx/ngx-services
2
-
3
- Common Angular services used across Experteam applications.
4
-
5
- ## Standalone setup (Angular v20+)
6
-
7
- Use `provideNgxServices(environment)` in your `ApplicationConfig.providers`.
8
-
9
- ```ts
10
- import { provideHttpClient, withInterceptors } from '@angular/common/http'
11
- import type { ApplicationConfig } from '@angular/core'
12
- import { provideRouter } from '@angular/router'
13
- import {
14
- apiHeadersInterceptor,
15
- apiTokenInterceptor,
16
- httpCachingInterceptor,
17
- provideNgxServices,
18
- type Environment
19
- } from '@experteam-mx/ngx-services'
20
- import { environment } from '../environments/environment'
21
- import { routes } from './app.routes'
22
-
23
- const envs = {
24
- ...environment,
25
- authCookie: 'token',
26
- cacheTtl: 3000
27
- } as Environment
28
-
29
- export const appConfig: ApplicationConfig = {
30
- providers: [
31
- provideRouter(routes),
32
- provideNgxServices(envs),
33
- provideHttpClient(withInterceptors([
34
- apiHeadersInterceptor,
35
- apiTokenInterceptor,
36
- httpCachingInterceptor
37
- ]))
38
- ]
39
- }
40
- ```
41
-
42
- `provideNgxServices` registers `ENVIRONMENT_TOKEN`, which is required by the API services and some interceptors in this package.
43
-
44
- ## NgModule compatibility
45
-
46
- `NgxServicesModule.forRoot(environment)` is still available for compatibility, but it is deprecated for new standalone applications and will be removed in `20.2.0`.
47
-
48
- ```ts
49
- import { importProvidersFrom } from '@angular/core'
50
- import { NgxServicesModule } from '@experteam-mx/ngx-services'
51
-
52
- providers: [
53
- importProvidersFrom([NgxServicesModule.forRoot(envs)])
54
- ]
55
- ```
56
-
57
- Prefer `provideNgxServices(envs)` for all new apps.
58
-
59
- ## Build
60
-
61
- ```bash
62
- ng build @experteam-mx/ngx-services
63
- ```
64
-
65
- Build output:
66
-
67
- `dist/experteam-mx/ngx-services`
68
-
69
- ## Publish
70
-
71
- ```bash
72
- cd dist/experteam-mx/ngx-services
73
- npm publish
74
- ```
75
-
76
- ## Test
77
-
78
- ```bash
79
- ng test @experteam-mx/ngx-services
80
- ```
1
+ # @experteam-mx/ngx-services
2
+
3
+ Common Angular services used across Experteam applications.
4
+
5
+ ## Standalone setup (Angular v20+)
6
+
7
+ Use `provideNgxServices(environment)` in your `ApplicationConfig.providers`.
8
+
9
+ ```ts
10
+ import { provideHttpClient, withInterceptors } from '@angular/common/http'
11
+ import type { ApplicationConfig } from '@angular/core'
12
+ import { provideRouter } from '@angular/router'
13
+ import {
14
+ apiHeadersInterceptor,
15
+ apiTokenInterceptor,
16
+ httpCachingInterceptor,
17
+ provideNgxServices,
18
+ type Environment
19
+ } from '@experteam-mx/ngx-services'
20
+ import { environment } from '../environments/environment'
21
+ import { routes } from './app.routes'
22
+
23
+ const envs = {
24
+ ...environment,
25
+ authCookie: 'token',
26
+ cacheTtl: 3000
27
+ } as Environment
28
+
29
+ export const appConfig: ApplicationConfig = {
30
+ providers: [
31
+ provideRouter(routes),
32
+ provideNgxServices(envs),
33
+ provideHttpClient(withInterceptors([
34
+ apiHeadersInterceptor,
35
+ apiTokenInterceptor,
36
+ httpCachingInterceptor
37
+ ]))
38
+ ]
39
+ }
40
+ ```
41
+
42
+ `provideNgxServices` registers `ENVIRONMENT_TOKEN`, which is required by the API services and some interceptors in this package.
43
+
44
+ ## NgModule compatibility
45
+
46
+ `NgxServicesModule.forRoot(environment)` is still available for compatibility, but it is deprecated for new standalone applications and will be removed in `20.2.0`.
47
+
48
+ ```ts
49
+ import { importProvidersFrom } from '@angular/core'
50
+ import { NgxServicesModule } from '@experteam-mx/ngx-services'
51
+
52
+ providers: [
53
+ importProvidersFrom([NgxServicesModule.forRoot(envs)])
54
+ ]
55
+ ```
56
+
57
+ Prefer `provideNgxServices(envs)` for all new apps.
58
+
59
+ ## Build
60
+
61
+ ```bash
62
+ ng build @experteam-mx/ngx-services
63
+ ```
64
+
65
+ Build output:
66
+
67
+ `dist/experteam-mx/ngx-services`
68
+
69
+ ## Publish
70
+
71
+ ```bash
72
+ cd dist/experteam-mx/ngx-services
73
+ npm publish
74
+ ```
75
+
76
+ ## Test
77
+
78
+ ```bash
79
+ ng test @experteam-mx/ngx-services
80
+ ```
@@ -1563,6 +1563,9 @@ class ApiCompaniesService {
1563
1563
  return this.http.put(`${this.url}/accounts/${id}`, body)
1564
1564
  .pipe(map(({ data }) => data));
1565
1565
  }
1566
+ patchAccount(id, body) {
1567
+ return this.http.patch(`${this.url}/accounts/${id}`, body);
1568
+ }
1566
1569
  /**
1567
1570
  * Fetches account entity data from the server based on the provided query parameters.
1568
1571
  *