@edirect/dynamics 11.0.48 → 11.0.49
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 +17 -17
- package/dist/README.md +17 -17
- package/dist/package.json +2 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ export class PolicySyncService {
|
|
|
58
58
|
async createContact(data: object): Promise<object | null> {
|
|
59
59
|
return this.dynamics.post(
|
|
60
60
|
'https://yourorg.crm.dynamics.com/api/data/v9.2/contacts',
|
|
61
|
-
data
|
|
61
|
+
data,
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -66,7 +66,7 @@ export class PolicySyncService {
|
|
|
66
66
|
async updateContact(id: string, data: object): Promise<object | null> {
|
|
67
67
|
return this.dynamics.patch(
|
|
68
68
|
`https://yourorg.crm.dynamics.com/api/data/v9.2/contacts(${id})`,
|
|
69
|
-
data
|
|
69
|
+
data,
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -75,7 +75,7 @@ export class PolicySyncService {
|
|
|
75
75
|
return this.dynamics.get(
|
|
76
76
|
'https://yourorg.crm.dynamics.com/api/data/v9.2/accounts',
|
|
77
77
|
{},
|
|
78
|
-
'client_credentials'
|
|
78
|
+
'client_credentials',
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -89,11 +89,11 @@ export class PolicySyncService {
|
|
|
89
89
|
|
|
90
90
|
Performs a GET request to the Dynamics API. Returns `null` if `DYNAMICS_ENABLED` is `false`.
|
|
91
91
|
|
|
92
|
-
| Parameter
|
|
93
|
-
|
|
94
|
-
| `url`
|
|
95
|
-
| `options`
|
|
96
|
-
| `grantType` | `'password' \| 'client_credentials'` | `'password'` | OAuth2 grant type to use
|
|
92
|
+
| Parameter | Type | Default | Description |
|
|
93
|
+
| ----------- | ------------------------------------ | ------------ | -------------------------------- |
|
|
94
|
+
| `url` | `string` | — | Full Dynamics API endpoint URL |
|
|
95
|
+
| `options` | `AxiosRequestConfig` | — | Additional Axios request options |
|
|
96
|
+
| `grantType` | `'password' \| 'client_credentials'` | `'password'` | OAuth2 grant type to use |
|
|
97
97
|
|
|
98
98
|
#### `post(url, data, options?, grantType?): Promise<object | null>`
|
|
99
99
|
|
|
@@ -117,15 +117,15 @@ Refreshes the current token. Falls back to `getAccessToken()` on failure.
|
|
|
117
117
|
|
|
118
118
|
## Environment Variables
|
|
119
119
|
|
|
120
|
-
| Variable
|
|
121
|
-
|
|
122
|
-
| `DYNAMICS_TOKEN_URL`
|
|
123
|
-
| `DYNAMICS_CLIENT_ID`
|
|
124
|
-
| `DYNAMICS_CLIENT_SECRET` | Client secret
|
|
125
|
-
| `DYNAMICS_USER_NAME`
|
|
126
|
-
| `DYNAMICS_PASSWORD`
|
|
127
|
-
| `DYNAMICS_RESOURCE`
|
|
128
|
-
| `DYNAMICS_ENABLED`
|
|
120
|
+
| Variable | Description | Required For |
|
|
121
|
+
| ------------------------ | ----------------------------------------------------------------- | -------------------- |
|
|
122
|
+
| `DYNAMICS_TOKEN_URL` | Azure AD OAuth2 token endpoint | All grant types |
|
|
123
|
+
| `DYNAMICS_CLIENT_ID` | Application client ID | All grant types |
|
|
124
|
+
| `DYNAMICS_CLIENT_SECRET` | Client secret | `client_credentials` |
|
|
125
|
+
| `DYNAMICS_USER_NAME` | Service account username | `password` |
|
|
126
|
+
| `DYNAMICS_PASSWORD` | Service account password | `password` |
|
|
127
|
+
| `DYNAMICS_RESOURCE` | Dynamics CRM resource URL | All grant types |
|
|
128
|
+
| `DYNAMICS_ENABLED` | Set to `'true'` to enable; any other value disables all API calls | All |
|
|
129
129
|
|
|
130
130
|
## Token Flow
|
|
131
131
|
|
package/dist/README.md
CHANGED
|
@@ -58,7 +58,7 @@ export class PolicySyncService {
|
|
|
58
58
|
async createContact(data: object): Promise<object | null> {
|
|
59
59
|
return this.dynamics.post(
|
|
60
60
|
'https://yourorg.crm.dynamics.com/api/data/v9.2/contacts',
|
|
61
|
-
data
|
|
61
|
+
data,
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -66,7 +66,7 @@ export class PolicySyncService {
|
|
|
66
66
|
async updateContact(id: string, data: object): Promise<object | null> {
|
|
67
67
|
return this.dynamics.patch(
|
|
68
68
|
`https://yourorg.crm.dynamics.com/api/data/v9.2/contacts(${id})`,
|
|
69
|
-
data
|
|
69
|
+
data,
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -75,7 +75,7 @@ export class PolicySyncService {
|
|
|
75
75
|
return this.dynamics.get(
|
|
76
76
|
'https://yourorg.crm.dynamics.com/api/data/v9.2/accounts',
|
|
77
77
|
{},
|
|
78
|
-
'client_credentials'
|
|
78
|
+
'client_credentials',
|
|
79
79
|
);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -89,11 +89,11 @@ export class PolicySyncService {
|
|
|
89
89
|
|
|
90
90
|
Performs a GET request to the Dynamics API. Returns `null` if `DYNAMICS_ENABLED` is `false`.
|
|
91
91
|
|
|
92
|
-
| Parameter
|
|
93
|
-
|
|
94
|
-
| `url`
|
|
95
|
-
| `options`
|
|
96
|
-
| `grantType` | `'password' \| 'client_credentials'` | `'password'` | OAuth2 grant type to use
|
|
92
|
+
| Parameter | Type | Default | Description |
|
|
93
|
+
| ----------- | ------------------------------------ | ------------ | -------------------------------- |
|
|
94
|
+
| `url` | `string` | — | Full Dynamics API endpoint URL |
|
|
95
|
+
| `options` | `AxiosRequestConfig` | — | Additional Axios request options |
|
|
96
|
+
| `grantType` | `'password' \| 'client_credentials'` | `'password'` | OAuth2 grant type to use |
|
|
97
97
|
|
|
98
98
|
#### `post(url, data, options?, grantType?): Promise<object | null>`
|
|
99
99
|
|
|
@@ -117,15 +117,15 @@ Refreshes the current token. Falls back to `getAccessToken()` on failure.
|
|
|
117
117
|
|
|
118
118
|
## Environment Variables
|
|
119
119
|
|
|
120
|
-
| Variable
|
|
121
|
-
|
|
122
|
-
| `DYNAMICS_TOKEN_URL`
|
|
123
|
-
| `DYNAMICS_CLIENT_ID`
|
|
124
|
-
| `DYNAMICS_CLIENT_SECRET` | Client secret
|
|
125
|
-
| `DYNAMICS_USER_NAME`
|
|
126
|
-
| `DYNAMICS_PASSWORD`
|
|
127
|
-
| `DYNAMICS_RESOURCE`
|
|
128
|
-
| `DYNAMICS_ENABLED`
|
|
120
|
+
| Variable | Description | Required For |
|
|
121
|
+
| ------------------------ | ----------------------------------------------------------------- | -------------------- |
|
|
122
|
+
| `DYNAMICS_TOKEN_URL` | Azure AD OAuth2 token endpoint | All grant types |
|
|
123
|
+
| `DYNAMICS_CLIENT_ID` | Application client ID | All grant types |
|
|
124
|
+
| `DYNAMICS_CLIENT_SECRET` | Client secret | `client_credentials` |
|
|
125
|
+
| `DYNAMICS_USER_NAME` | Service account username | `password` |
|
|
126
|
+
| `DYNAMICS_PASSWORD` | Service account password | `password` |
|
|
127
|
+
| `DYNAMICS_RESOURCE` | Dynamics CRM resource URL | All grant types |
|
|
128
|
+
| `DYNAMICS_ENABLED` | Set to `'true'` to enable; any other value disables all API calls | All |
|
|
129
129
|
|
|
130
130
|
## Token Flow
|
|
131
131
|
|
package/dist/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@edirect/config": "^11.0.48",
|
|
20
20
|
"@nestjs/axios": "^4.0.1",
|
|
21
|
-
"@nestjs/common": "^11.1.
|
|
21
|
+
"@nestjs/common": "^11.1.16",
|
|
22
22
|
"axios": "^1.13.6",
|
|
23
23
|
"lodash": "^4.17.23",
|
|
24
24
|
"tslib": "^2.8.1"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@types/express": "^5.0.6",
|
|
28
28
|
"@types/jest": "30.0.0",
|
|
29
29
|
"@types/lodash": "4.17.24",
|
|
30
|
-
"@types/node": "^25.
|
|
30
|
+
"@types/node": "^25.4.0"
|
|
31
31
|
},
|
|
32
32
|
"type": "commonjs"
|
|
33
33
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edirect/dynamics",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.49",
|
|
4
4
|
"packageScope": "@edirect",
|
|
5
5
|
"main": "./dist/src/index.js",
|
|
6
6
|
"types": "./dist/src/index.d.ts",
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@nestjs/axios": "^4.0.1",
|
|
21
|
-
"@nestjs/common": "^11.1.
|
|
21
|
+
"@nestjs/common": "^11.1.16",
|
|
22
22
|
"axios": "^1.13.6",
|
|
23
23
|
"lodash": "^4.17.23",
|
|
24
24
|
"tslib": "^2.8.1",
|
|
25
|
-
"@edirect/config": "11.0.
|
|
25
|
+
"@edirect/config": "11.0.49"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/express": "^5.0.6",
|
|
29
29
|
"@types/jest": "30.0.0",
|
|
30
30
|
"@types/lodash": "4.17.24",
|
|
31
|
-
"@types/node": "^25.
|
|
31
|
+
"@types/node": "^25.4.0"
|
|
32
32
|
},
|
|
33
33
|
"nx": {
|
|
34
34
|
"name": "@edirect/dynamics",
|