@deliverart/sdk-js-user 0.0.1 → 0.0.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/CHANGELOG.md +7 -0
- package/dist/index.cjs +8 -2
- package/dist/index.js +8 -2
- package/package.json +1 -1
- package/src/plugin.ts +8 -2
package/CHANGELOG.md
ADDED
package/dist/index.cjs
CHANGED
|
@@ -127,13 +127,19 @@ var UserPlugin = class {
|
|
|
127
127
|
},
|
|
128
128
|
async update(id, data) {
|
|
129
129
|
const response = await client.http.patch(`/users/${id}`, data, {
|
|
130
|
-
headers: {
|
|
130
|
+
headers: {
|
|
131
|
+
"Content-Type": "application/merge-patch+json",
|
|
132
|
+
Accept: "application/json"
|
|
133
|
+
}
|
|
131
134
|
});
|
|
132
135
|
return response.data;
|
|
133
136
|
},
|
|
134
137
|
async create(data) {
|
|
135
138
|
const response = await client.http.post(`/users`, data, {
|
|
136
|
-
headers: {
|
|
139
|
+
headers: {
|
|
140
|
+
"Content-Type": "application/json",
|
|
141
|
+
Accept: "application/json"
|
|
142
|
+
}
|
|
137
143
|
});
|
|
138
144
|
return response.data;
|
|
139
145
|
},
|
package/dist/index.js
CHANGED
|
@@ -95,13 +95,19 @@ var UserPlugin = class {
|
|
|
95
95
|
},
|
|
96
96
|
async update(id, data) {
|
|
97
97
|
const response = await client.http.patch(`/users/${id}`, data, {
|
|
98
|
-
headers: {
|
|
98
|
+
headers: {
|
|
99
|
+
"Content-Type": "application/merge-patch+json",
|
|
100
|
+
Accept: "application/json"
|
|
101
|
+
}
|
|
99
102
|
});
|
|
100
103
|
return response.data;
|
|
101
104
|
},
|
|
102
105
|
async create(data) {
|
|
103
106
|
const response = await client.http.post(`/users`, data, {
|
|
104
|
-
headers: {
|
|
107
|
+
headers: {
|
|
108
|
+
"Content-Type": "application/json",
|
|
109
|
+
Accept: "application/json"
|
|
110
|
+
}
|
|
105
111
|
});
|
|
106
112
|
return response.data;
|
|
107
113
|
},
|
package/package.json
CHANGED
package/src/plugin.ts
CHANGED
|
@@ -24,13 +24,19 @@ export class UserPlugin implements ApiClientPlugin<UserExtension> {
|
|
|
24
24
|
},
|
|
25
25
|
async update(id: string, data: Partial<User>) {
|
|
26
26
|
const response = await client.http.patch<User>(`/users/${id}`, data, {
|
|
27
|
-
headers: {
|
|
27
|
+
headers: {
|
|
28
|
+
'Content-Type': 'application/merge-patch+json',
|
|
29
|
+
Accept: 'application/json',
|
|
30
|
+
},
|
|
28
31
|
})
|
|
29
32
|
return response.data
|
|
30
33
|
},
|
|
31
34
|
async create(data: Partial<User>) {
|
|
32
35
|
const response = await client.http.post<User>(`/users`, data, {
|
|
33
|
-
headers: {
|
|
36
|
+
headers: {
|
|
37
|
+
'Content-Type': 'application/json',
|
|
38
|
+
Accept: 'application/json',
|
|
39
|
+
},
|
|
34
40
|
})
|
|
35
41
|
return response.data
|
|
36
42
|
},
|