@squonk/account-server-client 4.2.0-rc.4 → 4.2.0-rc.5
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/asset/asset.cjs +16 -16
- package/asset/asset.cjs.map +1 -1
- package/asset/asset.js +16 -16
- package/asset/asset.js.map +1 -1
- package/index.cjs.map +1 -1
- package/index.d.cts +10 -10
- package/index.d.ts +10 -10
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/account-server-api.schemas.ts +10 -10
- package/src/asset/asset.ts +16 -16
|
@@ -31,22 +31,22 @@ name?: QNameParameter;
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
|
-
* A date where assets prior to this will be returned.
|
|
34
|
+
* A date where assets prior to this will be returned. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
|
|
35
35
|
*/
|
|
36
36
|
export type QUntilParameter = string;
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* A date from which to retrieve assets.
|
|
39
|
+
* A date from which to retrieve assets. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
|
|
40
40
|
*/
|
|
41
41
|
export type QFromParameter = string;
|
|
42
42
|
|
|
43
43
|
export type GetUnitChargesParams = {
|
|
44
44
|
/**
|
|
45
|
-
* A date from which to retrieve assets.
|
|
45
|
+
* A date from which to retrieve assets. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
|
|
46
46
|
*/
|
|
47
47
|
from?: QFromParameter;
|
|
48
48
|
/**
|
|
49
|
-
* A date where assets prior to this will be returned.
|
|
49
|
+
* A date where assets prior to this will be returned. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
|
|
50
50
|
*/
|
|
51
51
|
until?: QUntilParameter;
|
|
52
52
|
/**
|
|
@@ -57,11 +57,11 @@ pbp?: QPbpParameter;
|
|
|
57
57
|
|
|
58
58
|
export type GetProductChargesParams = {
|
|
59
59
|
/**
|
|
60
|
-
* A date from which to retrieve assets.
|
|
60
|
+
* A date from which to retrieve assets. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
|
|
61
61
|
*/
|
|
62
62
|
from?: QFromParameter;
|
|
63
63
|
/**
|
|
64
|
-
* A date where assets prior to this will be returned.
|
|
64
|
+
* A date where assets prior to this will be returned. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
|
|
65
65
|
*/
|
|
66
66
|
until?: QUntilParameter;
|
|
67
67
|
/**
|
|
@@ -72,11 +72,11 @@ pbp?: QPbpParameter;
|
|
|
72
72
|
|
|
73
73
|
export type GetOrganisationChargesParams = {
|
|
74
74
|
/**
|
|
75
|
-
* A date from which to retrieve assets.
|
|
75
|
+
* A date from which to retrieve assets. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
|
|
76
76
|
*/
|
|
77
77
|
from?: QFromParameter;
|
|
78
78
|
/**
|
|
79
|
-
* A date where assets prior to this will be returned.
|
|
79
|
+
* A date where assets prior to this will be returned. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
|
|
80
80
|
*/
|
|
81
81
|
until?: QUntilParameter;
|
|
82
82
|
/**
|
|
@@ -87,11 +87,11 @@ pbp?: QPbpParameter;
|
|
|
87
87
|
|
|
88
88
|
export type GetChargesParams = {
|
|
89
89
|
/**
|
|
90
|
-
* A date from which to retrieve assets.
|
|
90
|
+
* A date from which to retrieve assets. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
|
|
91
91
|
*/
|
|
92
92
|
from?: QFromParameter;
|
|
93
93
|
/**
|
|
94
|
-
* A date where assets prior to this will be returned.
|
|
94
|
+
* A date where assets prior to this will be returned. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
|
|
95
95
|
*/
|
|
96
96
|
until?: QUntilParameter;
|
|
97
97
|
/**
|
package/src/asset/asset.ts
CHANGED
|
@@ -207,27 +207,27 @@ export const createAsset = (
|
|
|
207
207
|
options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
|
|
208
208
|
) => {
|
|
209
209
|
|
|
210
|
-
const
|
|
211
|
-
|
|
210
|
+
const formData = new FormData();
|
|
211
|
+
formData.append('name', assetPostBodyBody.name)
|
|
212
212
|
if(assetPostBodyBody.content_file !== undefined) {
|
|
213
|
-
|
|
213
|
+
formData.append('content_file', assetPostBodyBody.content_file)
|
|
214
214
|
}
|
|
215
215
|
if(assetPostBodyBody.content_string !== undefined) {
|
|
216
|
-
|
|
216
|
+
formData.append('content_string', assetPostBodyBody.content_string)
|
|
217
217
|
}
|
|
218
|
-
|
|
218
|
+
formData.append('scope', assetPostBodyBody.scope)
|
|
219
219
|
if(assetPostBodyBody.scope_id !== undefined) {
|
|
220
|
-
|
|
220
|
+
formData.append('scope_id', assetPostBodyBody.scope_id)
|
|
221
221
|
}
|
|
222
|
-
|
|
222
|
+
formData.append('secret', assetPostBodyBody.secret.toString())
|
|
223
223
|
if(assetPostBodyBody.description !== undefined) {
|
|
224
|
-
|
|
224
|
+
formData.append('description', assetPostBodyBody.description)
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
return customInstance<AssetPostResponse>(
|
|
228
228
|
{url: `/asset`, method: 'POST',
|
|
229
|
-
headers: {'Content-Type': '
|
|
230
|
-
data:
|
|
229
|
+
headers: {'Content-Type': 'multipart/form-data', },
|
|
230
|
+
data: formData, signal
|
|
231
231
|
},
|
|
232
232
|
options);
|
|
233
233
|
}
|
|
@@ -435,21 +435,21 @@ export const patchAsset = (
|
|
|
435
435
|
assetPatchBodyBody: AssetPatchBodyBody,
|
|
436
436
|
options?: SecondParameter<typeof customInstance>,) => {
|
|
437
437
|
|
|
438
|
-
const
|
|
438
|
+
const formData = new FormData();
|
|
439
439
|
if(assetPatchBodyBody.content_file !== undefined) {
|
|
440
|
-
|
|
440
|
+
formData.append('content_file', assetPatchBodyBody.content_file)
|
|
441
441
|
}
|
|
442
442
|
if(assetPatchBodyBody.content_string !== undefined) {
|
|
443
|
-
|
|
443
|
+
formData.append('content_string', assetPatchBodyBody.content_string)
|
|
444
444
|
}
|
|
445
445
|
if(assetPatchBodyBody.description !== undefined) {
|
|
446
|
-
|
|
446
|
+
formData.append('description', assetPatchBodyBody.description)
|
|
447
447
|
}
|
|
448
448
|
|
|
449
449
|
return customInstance<void>(
|
|
450
450
|
{url: `/asset/${assetId}`, method: 'PATCH',
|
|
451
|
-
headers: {'Content-Type': '
|
|
452
|
-
data:
|
|
451
|
+
headers: {'Content-Type': 'multipart/form-data', },
|
|
452
|
+
data: formData
|
|
453
453
|
},
|
|
454
454
|
options);
|
|
455
455
|
}
|