@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.
@@ -31,22 +31,22 @@ name?: QNameParameter;
31
31
  };
32
32
 
33
33
  /**
34
- * A date where assets prior to this will be returned. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
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. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
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. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
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. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
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. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
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. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
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. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
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. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
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. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs on ar after this date will be returned. UTC is assumed if no timezone is provided
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. This can be a date-time string but it is interpreted as a date, i.e. `2020-01-01T00:00:00Z` is interpreted as `2020-01-01`. Any asset that occurs prior this date will be returned. UTC is assumed if no timezone is provided
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
  /**
@@ -207,27 +207,27 @@ export const createAsset = (
207
207
  options?: SecondParameter<typeof customInstance>,signal?: AbortSignal
208
208
  ) => {
209
209
 
210
- const formUrlEncoded = new URLSearchParams();
211
- formUrlEncoded.append('name', assetPostBodyBody.name)
210
+ const formData = new FormData();
211
+ formData.append('name', assetPostBodyBody.name)
212
212
  if(assetPostBodyBody.content_file !== undefined) {
213
- formUrlEncoded.append('content_file', assetPostBodyBody.content_file)
213
+ formData.append('content_file', assetPostBodyBody.content_file)
214
214
  }
215
215
  if(assetPostBodyBody.content_string !== undefined) {
216
- formUrlEncoded.append('content_string', assetPostBodyBody.content_string)
216
+ formData.append('content_string', assetPostBodyBody.content_string)
217
217
  }
218
- formUrlEncoded.append('scope', assetPostBodyBody.scope)
218
+ formData.append('scope', assetPostBodyBody.scope)
219
219
  if(assetPostBodyBody.scope_id !== undefined) {
220
- formUrlEncoded.append('scope_id', assetPostBodyBody.scope_id)
220
+ formData.append('scope_id', assetPostBodyBody.scope_id)
221
221
  }
222
- formUrlEncoded.append('secret', assetPostBodyBody.secret.toString())
222
+ formData.append('secret', assetPostBodyBody.secret.toString())
223
223
  if(assetPostBodyBody.description !== undefined) {
224
- formUrlEncoded.append('description', assetPostBodyBody.description)
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': 'application/x-www-form-urlencoded', },
230
- data: formUrlEncoded, signal
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 formUrlEncoded = new URLSearchParams();
438
+ const formData = new FormData();
439
439
  if(assetPatchBodyBody.content_file !== undefined) {
440
- formUrlEncoded.append('content_file', assetPatchBodyBody.content_file)
440
+ formData.append('content_file', assetPatchBodyBody.content_file)
441
441
  }
442
442
  if(assetPatchBodyBody.content_string !== undefined) {
443
- formUrlEncoded.append('content_string', assetPatchBodyBody.content_string)
443
+ formData.append('content_string', assetPatchBodyBody.content_string)
444
444
  }
445
445
  if(assetPatchBodyBody.description !== undefined) {
446
- formUrlEncoded.append('description', assetPatchBodyBody.description)
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': 'application/x-www-form-urlencoded', },
452
- data: formUrlEncoded
451
+ headers: {'Content-Type': 'multipart/form-data', },
452
+ data: formData
453
453
  },
454
454
  options);
455
455
  }