@or-sdk/account-settings 1.3.0-beta.631.0 → 1.3.0

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 CHANGED
@@ -3,6 +3,348 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.3.0](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.46...@or-sdk/account-settings@1.3.0) (2026-02-24)
7
+
8
+
9
+ ### Features
10
+
11
+ * **deployer:** Add methods 'fetchFlowLogsChunk' and 'fetchAllFlowLogs' to fetch flow logs ([6b70992](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/commit/6b70992ce3d1e4f308db69df700528f6eeffafcf))
12
+
13
+
14
+
15
+ ## [1.2.46](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.45...@or-sdk/account-settings@1.2.46) (2026-01-15)
16
+
17
+ **Note:** Version bump only for package @or-sdk/account-settings
18
+
19
+
20
+
21
+
22
+
23
+ ## [1.2.45](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.44...@or-sdk/account-settings@1.2.45) (2025-11-04)
24
+
25
+ **Note:** Version bump only for package @or-sdk/account-settings
26
+
27
+
28
+
29
+
30
+
31
+ ## [1.2.44](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.43...@or-sdk/account-settings@1.2.44) (2025-10-14)
32
+
33
+ **Note:** Version bump only for package @or-sdk/account-settings
34
+
35
+
36
+
37
+
38
+
39
+ ## [1.2.43](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.42...@or-sdk/account-settings@1.2.43) (2025-10-02)
40
+
41
+ **Note:** Version bump only for package @or-sdk/account-settings
42
+
43
+
44
+
45
+
46
+
47
+ ## [1.2.42](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.41...@or-sdk/account-settings@1.2.42) (2025-07-30)
48
+
49
+ **Note:** Version bump only for package @or-sdk/account-settings
50
+
51
+
52
+
53
+
54
+
55
+ ## [1.2.41](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.40...@or-sdk/account-settings@1.2.41) (2025-05-10)
56
+
57
+ **Note:** Version bump only for package @or-sdk/account-settings
58
+
59
+
60
+
61
+
62
+
63
+ ## [1.2.40](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.39...@or-sdk/account-settings@1.2.40) (2025-05-07)
64
+
65
+ **Note:** Version bump only for package @or-sdk/account-settings
66
+
67
+
68
+
69
+
70
+
71
+ ## [1.2.39](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.38...@or-sdk/account-settings@1.2.39) (2024-12-20)
72
+
73
+ **Note:** Version bump only for package @or-sdk/account-settings
74
+
75
+
76
+
77
+
78
+
79
+ ## [1.2.38](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.37...@or-sdk/account-settings@1.2.38) (2024-12-18)
80
+
81
+ **Note:** Version bump only for package @or-sdk/account-settings
82
+
83
+
84
+
85
+
86
+
87
+ ## [1.2.37](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.36...@or-sdk/account-settings@1.2.37) (2024-11-05)
88
+
89
+
90
+ ### Bug Fixes
91
+
92
+ * Improve readme examples ([29e1e35](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/commit/29e1e35ee0d48a529b94b782e33eab5cf83a3a0f))
93
+
94
+
95
+
96
+ ## [1.2.36](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.35...@or-sdk/account-settings@1.2.36) (2024-09-16)
97
+
98
+
99
+ ### Bug Fixes
100
+
101
+ * Update dependencies ([29b513a](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/commit/29b513ae80636e4363d8e2223dac5d499b2c79c8))
102
+
103
+
104
+
105
+ ## [1.2.35](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.34...@or-sdk/account-settings@1.2.35) (2024-08-15)
106
+
107
+ **Note:** Version bump only for package @or-sdk/account-settings
108
+
109
+
110
+
111
+
112
+
113
+ ## [1.2.34](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.33...@or-sdk/account-settings@1.2.34) (2024-08-09)
114
+
115
+ **Note:** Version bump only for package @or-sdk/account-settings
116
+
117
+
118
+
119
+
120
+
121
+ ## [1.2.33](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.32...@or-sdk/account-settings@1.2.33) (2024-08-06)
122
+
123
+
124
+ ### Bug Fixes
125
+
126
+ * Update build tools ([95411fd](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/commit/95411fd4764056751e6c2faeeaa958c22a3e5495))
127
+
128
+
129
+
130
+ ## [1.2.32](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.31...@or-sdk/account-settings@1.2.32) (2024-07-24)
131
+
132
+ **Note:** Version bump only for package @or-sdk/account-settings
133
+
134
+
135
+
136
+
137
+
138
+ ## [1.2.31](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.30...@or-sdk/account-settings@1.2.31) (2024-06-03)
139
+
140
+ **Note:** Version bump only for package @or-sdk/account-settings
141
+
142
+
143
+
144
+
145
+
146
+ ## [1.2.30](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.29...@or-sdk/account-settings@1.2.30) (2024-05-28)
147
+
148
+ **Note:** Version bump only for package @or-sdk/account-settings
149
+
150
+
151
+
152
+
153
+
154
+ ## [1.2.29](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.28...@or-sdk/account-settings@1.2.29) (2024-05-23)
155
+
156
+ **Note:** Version bump only for package @or-sdk/account-settings
157
+
158
+
159
+
160
+
161
+
162
+ ## [1.2.28](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.27...@or-sdk/account-settings@1.2.28) (2024-05-22)
163
+
164
+ **Note:** Version bump only for package @or-sdk/account-settings
165
+
166
+
167
+
168
+
169
+
170
+ ## [1.2.27](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.26...@or-sdk/account-settings@1.2.27) (2024-05-20)
171
+
172
+
173
+ ### Bug Fixes
174
+
175
+ * Sort package.json ([f00d2a0](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/commit/f00d2a002636d40177270fdf056b58ceea30dbad))
176
+
177
+
178
+
179
+ ## [1.2.26](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.25...@or-sdk/account-settings@1.2.26) (2024-05-20)
180
+
181
+ **Note:** Version bump only for package @or-sdk/account-settings
182
+
183
+
184
+
185
+
186
+
187
+ ## [1.2.25](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.24...@or-sdk/account-settings@1.2.25) (2024-05-14)
188
+
189
+ **Note:** Version bump only for package @or-sdk/account-settings
190
+
191
+
192
+
193
+
194
+
195
+ ## [1.2.24](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.23...@or-sdk/account-settings@1.2.24) (2024-04-09)
196
+
197
+
198
+ ### Bug Fixes
199
+
200
+ * update ts, review build pipeline ([e4dbf00](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/commit/e4dbf00b0aac58d94112fbd41ae5e4ae2312e566))
201
+
202
+
203
+
204
+ ## [1.2.23](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.22...@or-sdk/account-settings@1.2.23) (2024-03-30)
205
+
206
+ **Note:** Version bump only for package @or-sdk/account-settings
207
+
208
+
209
+
210
+
211
+
212
+ ## [1.2.22](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.21...@or-sdk/account-settings@1.2.22) (2024-03-26)
213
+
214
+ **Note:** Version bump only for package @or-sdk/account-settings
215
+
216
+
217
+
218
+
219
+
220
+ ## [1.2.21](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.20...@or-sdk/account-settings@1.2.21) (2024-02-29)
221
+
222
+ **Note:** Version bump only for package @or-sdk/account-settings
223
+
224
+
225
+
226
+
227
+
228
+ ## [1.2.20](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.19...@or-sdk/account-settings@1.2.20) (2024-02-20)
229
+
230
+ **Note:** Version bump only for package @or-sdk/account-settings
231
+
232
+
233
+
234
+
235
+
236
+ ## [1.2.19](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.18...@or-sdk/account-settings@1.2.19) (2024-02-16)
237
+
238
+ **Note:** Version bump only for package @or-sdk/account-settings
239
+
240
+
241
+
242
+
243
+
244
+ ## [1.2.18](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.17...@or-sdk/account-settings@1.2.18) (2024-02-12)
245
+
246
+ **Note:** Version bump only for package @or-sdk/account-settings
247
+
248
+
249
+
250
+
251
+
252
+ ## [1.2.17](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.16...@or-sdk/account-settings@1.2.17) (2024-02-05)
253
+
254
+ **Note:** Version bump only for package @or-sdk/account-settings
255
+
256
+
257
+
258
+
259
+
260
+ ## [1.2.16](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.15...@or-sdk/account-settings@1.2.16) (2024-02-02)
261
+
262
+ **Note:** Version bump only for package @or-sdk/account-settings
263
+
264
+
265
+
266
+
267
+
268
+ ## [1.2.15](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.14...@or-sdk/account-settings@1.2.15) (2024-02-01)
269
+
270
+ **Note:** Version bump only for package @or-sdk/account-settings
271
+
272
+
273
+
274
+
275
+
276
+ ## [1.2.14](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.13...@or-sdk/account-settings@1.2.14) (2024-02-01)
277
+
278
+ **Note:** Version bump only for package @or-sdk/account-settings
279
+
280
+
281
+
282
+
283
+
284
+ ## [1.2.13](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.12...@or-sdk/account-settings@1.2.13) (2023-12-04)
285
+
286
+ **Note:** Version bump only for package @or-sdk/account-settings
287
+
288
+
289
+
290
+
291
+
292
+ ## [1.2.12](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.11...@or-sdk/account-settings@1.2.12) (2023-09-13)
293
+
294
+ **Note:** Version bump only for package @or-sdk/account-settings
295
+
296
+
297
+
298
+
299
+
300
+ ## [1.2.11](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.10...@or-sdk/account-settings@1.2.11) (2023-06-13)
301
+
302
+ **Note:** Version bump only for package @or-sdk/account-settings
303
+
304
+
305
+
306
+
307
+
308
+ ## [1.2.10](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.9...@or-sdk/account-settings@1.2.10) (2023-06-01)
309
+
310
+ **Note:** Version bump only for package @or-sdk/account-settings
311
+
312
+
313
+
314
+
315
+
316
+ ## [1.2.9](https://gitlab.internal.onereach.io/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.8...@or-sdk/account-settings@1.2.9) (2023-03-16)
317
+
318
+ **Note:** Version bump only for package @or-sdk/account-settings
319
+
320
+
321
+
322
+
323
+
324
+ ### [1.2.8](https://gitlab.com/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.7...@or-sdk/account-settings@1.2.8) (2022-12-27)
325
+
326
+ **Note:** Version bump only for package @or-sdk/account-settings
327
+
328
+
329
+
330
+
331
+
332
+ ### [1.2.7](https://gitlab.com/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.6...@or-sdk/account-settings@1.2.7) (2022-11-21)
333
+
334
+ **Note:** Version bump only for package @or-sdk/account-settings
335
+
336
+
337
+
338
+
339
+
340
+ ### [1.2.6](https://gitlab.com/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.5...@or-sdk/account-settings@1.2.6) (2022-11-15)
341
+
342
+ **Note:** Version bump only for package @or-sdk/account-settings
343
+
344
+
345
+
346
+
347
+
6
348
  ### [1.2.5](https://gitlab.com/onereach/platform/or-sdk-next/compare/@or-sdk/account-settings@1.2.4...@or-sdk/account-settings@1.2.5) (2022-09-09)
7
349
 
8
350
  **Note:** Version bump only for package @or-sdk/account-settings
package/README.md CHANGED
@@ -10,12 +10,12 @@ import { AccountSettings } from '@or-sdk/account-settings'
10
10
  // with direct api url
11
11
  const accountSettings = new AccountSettings({
12
12
  token: 'my-account-token-string',
13
- sdkUrl: 'http://example.account-settings/endpoint'
13
+ sdkUrl: 'http://example.sdk-api/endpoint'
14
14
  });
15
15
 
16
16
  // with service discovery(slower)
17
17
  const accountSettings = new AccountSettings({
18
18
  token: 'my-account-token-string',
19
- discoveryUrl: 'http://example.account-settings/endpoint'
19
+ discoveryUrl: 'http://example.discovery/endpoint'
20
20
  });
21
21
  ```
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -52,7 +52,7 @@ var AccountSettings = (function () {
52
52
  return __awaiter(this, void 0, void 0, function () {
53
53
  var route;
54
54
  return __generator(this, function (_a) {
55
- route = "/".concat(this.sdkApi.currentAccountId ? "/accounts/".concat(this.sdkApi.currentAccountId) : '', "/account-settings");
55
+ route = "/".concat(this._getPathPrefix(), "/account-settings");
56
56
  return [2, this.sdkApi.makeRequest({
57
57
  method: 'GET',
58
58
  route: route,
@@ -66,7 +66,7 @@ var AccountSettings = (function () {
66
66
  return __generator(this, function (_a) {
67
67
  switch (_a.label) {
68
68
  case 0:
69
- route = "/".concat(this.sdkApi.currentAccountId ? "/accounts/".concat(this.sdkApi.currentAccountId) : '', "/account-settings/").concat(encodeURIComponent(key));
69
+ route = "/".concat(this._getPathPrefix(), "/account-settings/").concat(encodeURIComponent(key));
70
70
  return [4, this.sdkApi.makeRequest({
71
71
  method: 'GET',
72
72
  route: route,
@@ -82,7 +82,7 @@ var AccountSettings = (function () {
82
82
  return __awaiter(this, void 0, void 0, function () {
83
83
  var route;
84
84
  return __generator(this, function (_a) {
85
- route = "/".concat(this.sdkApi.currentAccountId ? "/accounts/".concat(this.sdkApi.currentAccountId) : '', "/account-settings");
85
+ route = "/".concat(this._getPathPrefix(), "/account-settings");
86
86
  return [2, this.sdkApi.makeRequest({
87
87
  method: 'POST',
88
88
  route: route,
@@ -97,7 +97,7 @@ var AccountSettings = (function () {
97
97
  return __generator(this, function (_a) {
98
98
  switch (_a.label) {
99
99
  case 0:
100
- route = "/".concat(this.sdkApi.currentAccountId ? "/accounts/".concat(this.sdkApi.currentAccountId) : '', "/account-settings/").concat(encodeURIComponent(key));
100
+ route = "/".concat(this._getPathPrefix(), "/account-settings/").concat(encodeURIComponent(key));
101
101
  return [4, this.sdkApi.makeRequest({
102
102
  method: 'POST',
103
103
  route: route,
@@ -114,7 +114,7 @@ var AccountSettings = (function () {
114
114
  return __awaiter(this, void 0, void 0, function () {
115
115
  var route;
116
116
  return __generator(this, function (_a) {
117
- route = "/".concat(this.sdkApi.currentAccountId ? "/accounts/".concat(this.sdkApi.currentAccountId) : '', "/account-settings/").concat(encodeURIComponent(key));
117
+ route = "/".concat(this._getPathPrefix(), "/account-settings/").concat(encodeURIComponent(key));
118
118
  return [2, this.sdkApi.makeRequest({
119
119
  method: 'DELETE',
120
120
  route: route,
@@ -122,6 +122,9 @@ var AccountSettings = (function () {
122
122
  });
123
123
  });
124
124
  };
125
+ AccountSettings.prototype._getPathPrefix = function () {
126
+ return this.sdkApi.currentAccountId ? "/accounts/".concat(this.sdkApi.currentAccountId) : '';
127
+ };
125
128
  return AccountSettings;
126
129
  }());
127
130
  exports.AccountSettings = AccountSettings;
@@ -1 +1 @@
1
- {"version":3,"file":"AccountSettings.js","sourceRoot":"","sources":["../../src/AccountSettings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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W,CAAwB;gCACrE,MAAM,EAAE,MAAM;gCACd,KAAK,OAAA;gCACL,IAAI,MAAA;6BACL,CAAC,EAAA;;wBAJM,KAAK,GAAK,CAAA,SAIhB,CAAA,MAJW;wBAMb,WAAO,KAAK,EAAC;;;;KACd;IAQY,6CAAmB,GAAhC,UAAiC,GAAW;;;;gBACpC,KAAK,GAAG,WAAI,IAAI,CAAC,cAAc,EAAE,+BAAqB,kBAAkB,CAAC,GAAG,CAAC,CAAE,CAAC;gBAEtF,WAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAO;wBACnC,MAAM,EAAE,QAAQ;wBAChB,KAAK,OAAA;qBACN,CAAC,EAAC;;;KACJ;IAMS,wCAAc,GAAxB;QACE,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,oBAAa,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACzF,CAAC;IACH,sBAAC;AAAD,CAAC,AAtGD,IAsGC;AAtGY,0CAAe"}
@@ -1,6 +1,14 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
1
10
  import { SdkApi } from '@or-sdk/sdk-api';
2
11
  export class AccountSettings {
3
- sdkApi;
4
12
  constructor(params) {
5
13
  const { token, discoveryUrl, accountId, sdkUrl } = params;
6
14
  this.sdkApi = new SdkApi({
@@ -10,44 +18,57 @@ export class AccountSettings {
10
18
  sdkUrl,
11
19
  });
12
20
  }
13
- async getAllSettings() {
14
- const route = `/${this.sdkApi.currentAccountId ? `/accounts/${this.sdkApi.currentAccountId}` : ''}/account-settings`;
15
- return this.sdkApi.makeRequest({
16
- method: 'GET',
17
- route,
21
+ getAllSettings() {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const route = `/${this._getPathPrefix()}/account-settings`;
24
+ return this.sdkApi.makeRequest({
25
+ method: 'GET',
26
+ route,
27
+ });
18
28
  });
19
29
  }
20
- async getSettingsByKey(key) {
21
- const route = `/${this.sdkApi.currentAccountId ? `/accounts/${this.sdkApi.currentAccountId}` : ''}/account-settings/${encodeURIComponent(key)}`;
22
- const { value } = await this.sdkApi.makeRequest({
23
- method: 'GET',
24
- route,
30
+ getSettingsByKey(key) {
31
+ return __awaiter(this, void 0, void 0, function* () {
32
+ const route = `/${this._getPathPrefix()}/account-settings/${encodeURIComponent(key)}`;
33
+ const { value } = yield this.sdkApi.makeRequest({
34
+ method: 'GET',
35
+ route,
36
+ });
37
+ return value;
25
38
  });
26
- return value;
27
39
  }
28
- async setAllSettings(data) {
29
- const route = `/${this.sdkApi.currentAccountId ? `/accounts/${this.sdkApi.currentAccountId}` : ''}/account-settings`;
30
- return this.sdkApi.makeRequest({
31
- method: 'POST',
32
- route,
33
- data,
40
+ setAllSettings(data) {
41
+ return __awaiter(this, void 0, void 0, function* () {
42
+ const route = `/${this._getPathPrefix()}/account-settings`;
43
+ return this.sdkApi.makeRequest({
44
+ method: 'POST',
45
+ route,
46
+ data,
47
+ });
34
48
  });
35
49
  }
36
- async setSettingsByKey(key, data) {
37
- const route = `/${this.sdkApi.currentAccountId ? `/accounts/${this.sdkApi.currentAccountId}` : ''}/account-settings/${encodeURIComponent(key)}`;
38
- const { value } = await this.sdkApi.makeRequest({
39
- method: 'POST',
40
- route,
41
- data,
50
+ setSettingsByKey(key, data) {
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ const route = `/${this._getPathPrefix()}/account-settings/${encodeURIComponent(key)}`;
53
+ const { value } = yield this.sdkApi.makeRequest({
54
+ method: 'POST',
55
+ route,
56
+ data,
57
+ });
58
+ return value;
42
59
  });
43
- return value;
44
60
  }
45
- async deleteSettingsByKey(key) {
46
- const route = `/${this.sdkApi.currentAccountId ? `/accounts/${this.sdkApi.currentAccountId}` : ''}/account-settings/${encodeURIComponent(key)}`;
47
- return this.sdkApi.makeRequest({
48
- method: 'DELETE',
49
- route,
61
+ deleteSettingsByKey(key) {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ const route = `/${this._getPathPrefix()}/account-settings/${encodeURIComponent(key)}`;
64
+ return this.sdkApi.makeRequest({
65
+ method: 'DELETE',
66
+ route,
67
+ });
50
68
  });
51
69
  }
70
+ _getPathPrefix() {
71
+ return this.sdkApi.currentAccountId ? `/accounts/${this.sdkApi.currentAccountId}` : '';
72
+ }
52
73
  }
53
74
  //# sourceMappingURL=AccountSettings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccountSettings.js","sourceRoot":"","sources":["../../src/AccountSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAIzC,MAAM,OAAO,eAAe;IACT,MAAM,CAAS;IAEhC,YAAY,MAA6B;QACvC,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;QAE1D,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC;YACvB,KAAK;YACL,YAAY;YACZ,SAAS;YACT,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAQM,KAAK,CAAC,cAAc;QACzB,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC;QAErH,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAiB;YAC7C,MAAM,EAAE,KAAK;YACb,KAAK;SACN,CAA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,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,cAAc,EAAE,mBAAmB,CAAC;YAE3D,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAiB;gBAC7C,MAAM,EAAE,MAAM;gBACd,KAAK;gBACL,IAAI;aACL,CAAC,CAAC;QACL,CAAC;KAAA;IAQY,gBAAgB,CAAC,GAAW,EAAE,IAAiB;;YAC1D,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,cAAc,EAAE,qBAAqB,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC;YAEtF,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,CAAwB;gBACrE,MAAM,EAAE,MAAM;gBACd,KAAK;gBACL,IAAI;aACL,CAAC,CAAC;YAEH,OAAO,KAAK,CAAC;QACf,CAAC;KAAA;IAQY,mBAAmB,CAAC,GAAW;;YAC1C,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,cAAc,EAAE,qBAAqB,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC;YAEtF,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAO;gBACnC,MAAM,EAAE,QAAQ;gBAChB,KAAK;aACN,CAAC,CAAC;QACL,CAAC;KAAA;IAMS,cAAc;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACzF,CAAC;CACF"}
@@ -1,4 +1,4 @@
1
- import { AccountSettingsConfig, AllSettingsObj, SettingsObj } from './types';
1
+ import type { AccountSettingsConfig, AllSettingsObj, SettingsObj } from './types';
2
2
  export declare class AccountSettings {
3
3
  private readonly sdkApi;
4
4
  constructor(params: AccountSettingsConfig);
@@ -7,5 +7,6 @@ export declare class AccountSettings {
7
7
  setAllSettings(data: AllSettingsObj): Promise<AllSettingsObj>;
8
8
  setSettingsByKey(key: string, data: SettingsObj): Promise<SettingsObj>;
9
9
  deleteSettingsByKey(key: string): Promise<void>;
10
+ protected _getPathPrefix(): string;
10
11
  }
11
12
  //# sourceMappingURL=AccountSettings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccountSettings.d.ts","sourceRoot":"","sources":["../../src/AccountSettings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAyB,WAAW,EAAE,MAAM,SAAS,CAAC;AAGpG,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;gBAEpB,MAAM,EAAE,qBAAqB;IAiB5B,cAAc,IAAI,OAAO,CAAC,cAAc,CAAC;IAezC,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAiBnD,cAAc,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;IAgB7D,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAkBtE,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAQ7D"}
1
+ {"version":3,"file":"AccountSettings.d.ts","sourceRoot":"","sources":["../../src/AccountSettings.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAyB,WAAW,EAAE,MAAM,SAAS,CAAC;AAGzG,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;gBAEpB,MAAM,EAAE,qBAAqB;IAiB5B,cAAc,IAAI,OAAO,CAAC,cAAc,CAAC;IAezC,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAiBnD,cAAc,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;IAgB7D,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IAkBtE,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAa5D,SAAS,CAAC,cAAc,IAAI,MAAM;CAGnC"}
@@ -1,17 +1,17 @@
1
1
  import { Token } from '@or-sdk/base';
2
- export declare type AccountSettingsConfig = {
2
+ export type AccountSettingsConfig = {
3
3
  token: Token;
4
4
  discoveryUrl?: string;
5
5
  accountId?: string;
6
6
  sdkUrl?: string;
7
7
  };
8
- export declare type SettingsObj = {
8
+ export type SettingsObj = {
9
9
  [key: string]: unknown;
10
10
  };
11
- export declare type AllSettingsObj = {
11
+ export type AllSettingsObj = {
12
12
  [key: string]: SettingsObj;
13
13
  };
14
- export declare type SettingsByKeyResponse = {
14
+ export type SettingsByKeyResponse = {
15
15
  value: SettingsObj;
16
16
  };
17
17
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,oBAAY,qBAAqB,GAAG;IAIlC,KAAK,EAAE,KAAK,CAAC;IAKb,YAAY,CAAC,EAAE,MAAM,CAAC;IAKtB,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,WAAW,GAAG;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC;CAC5B,CAAC;AAEF,oBAAY,qBAAqB,GAAG;IAClC,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,MAAM,MAAM,qBAAqB,GAAG;IAIlC,KAAK,EAAE,KAAK,CAAC;IAKb,YAAY,CAAC,EAAE,MAAM,CAAC;IAKtB,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,WAAW,CAAC;CACpB,CAAC"}
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@or-sdk/account-settings",
3
- "version": "1.3.0-beta.631.0",
3
+ "version": "1.3.0",
4
+ "license": "Apache-2.0",
4
5
  "main": "dist/cjs/index.js",
5
6
  "module": "dist/esm/index.js",
6
7
  "types": "dist/types/index.d.ts",
7
8
  "scripts": {
8
- "build": "pnpm clean && pnpm build:esm && pnpm build:cjs",
9
+ "build": "pnpm clean && concurrently 'pnpm:build:*(!watch)'",
9
10
  "build:cjs": "tsc --project tsconfig.json",
10
11
  "build:esm": "tsc --project tsconfig.esm.json",
11
12
  "build:types": "tsc --project tsconfig.types.json",
12
- "build:watch": "concurrently -r --hide 1,2 \"pnpm build:watch:cjs\" \"pnpm build:watch:esm\" \"pnpm build:watch:types\"",
13
+ "build:watch": "concurrently 'pnpm:build:watch:*'",
13
14
  "build:watch:cjs": "tsc --project tsconfig.json -w",
14
15
  "build:watch:esm": "tsc --project tsconfig.esm.json -w",
15
16
  "build:watch:types": "tsc --project tsconfig.types.json -w",
@@ -17,14 +18,15 @@
17
18
  "dev": "pnpm build:watch:esm"
18
19
  },
19
20
  "dependencies": {
20
- "@or-sdk/base": "^0.27.0-beta.631.0",
21
- "@or-sdk/sdk-api": "^0.25.0-beta.631.0"
21
+ "@or-sdk/base": "^0.43.0",
22
+ "@or-sdk/sdk-api": "^0.27.0"
22
23
  },
23
24
  "devDependencies": {
24
- "concurrently": "^6.4.0",
25
- "typescript": "^4.4.4"
25
+ "concurrently": "9.0.1",
26
+ "typescript": "5.6.2"
26
27
  },
27
28
  "publishConfig": {
28
29
  "access": "public"
29
- }
30
+ },
31
+ "gitHead": "ce62679c119c54ef41fd0d8f7084c563c3b21b24"
30
32
  }
@@ -1,5 +1,6 @@
1
1
  import { SdkApi } from '@or-sdk/sdk-api';
2
- import { AccountSettingsConfig, AllSettingsObj, SettingsByKeyResponse, SettingsObj } from './types';
2
+
3
+ import type { AccountSettingsConfig, AllSettingsObj, SettingsByKeyResponse, SettingsObj } from './types';
3
4
 
4
5
 
5
6
  export class AccountSettings {
@@ -23,7 +24,7 @@ export class AccountSettings {
23
24
  * ```
24
25
  */
25
26
  public async getAllSettings(): Promise<AllSettingsObj> {
26
- const route = `/${this.sdkApi.currentAccountId ? `/accounts/${this.sdkApi.currentAccountId}` : ''}/account-settings`;
27
+ const route = `/${this._getPathPrefix()}/account-settings`;
27
28
 
28
29
  return this.sdkApi.makeRequest<AllSettingsObj>({
29
30
  method: 'GET',
@@ -38,7 +39,7 @@ export class AccountSettings {
38
39
  * ```
39
40
  */
40
41
  public async getSettingsByKey(key: string): Promise<SettingsObj> {
41
- const route = `/${this.sdkApi.currentAccountId ? `/accounts/${this.sdkApi.currentAccountId}` : ''}/account-settings/${encodeURIComponent(key)}`;
42
+ const route = `/${this._getPathPrefix()}/account-settings/${encodeURIComponent(key)}`;
42
43
 
43
44
  const { value } = await this.sdkApi.makeRequest<SettingsByKeyResponse>({
44
45
  method: 'GET',
@@ -55,7 +56,7 @@ export class AccountSettings {
55
56
  * ```
56
57
  */
57
58
  public async setAllSettings(data: AllSettingsObj): Promise<AllSettingsObj> {
58
- const route = `/${this.sdkApi.currentAccountId ? `/accounts/${this.sdkApi.currentAccountId}` : ''}/account-settings`;
59
+ const route = `/${this._getPathPrefix()}/account-settings`;
59
60
 
60
61
  return this.sdkApi.makeRequest<AllSettingsObj>({
61
62
  method: 'POST',
@@ -71,7 +72,7 @@ export class AccountSettings {
71
72
  * ```
72
73
  */
73
74
  public async setSettingsByKey(key: string, data: SettingsObj): Promise<SettingsObj> {
74
- const route = `/${this.sdkApi.currentAccountId ? `/accounts/${this.sdkApi.currentAccountId}` : ''}/account-settings/${encodeURIComponent(key)}`;
75
+ const route = `/${this._getPathPrefix()}/account-settings/${encodeURIComponent(key)}`;
75
76
 
76
77
  const { value } = await this.sdkApi.makeRequest<SettingsByKeyResponse>({
77
78
  method: 'POST',
@@ -89,11 +90,19 @@ export class AccountSettings {
89
90
  * ```
90
91
  */
91
92
  public async deleteSettingsByKey(key: string): Promise<void> {
92
- const route = `/${this.sdkApi.currentAccountId ? `/accounts/${this.sdkApi.currentAccountId}` : ''}/account-settings/${encodeURIComponent(key)}`;
93
+ const route = `/${this._getPathPrefix()}/account-settings/${encodeURIComponent(key)}`;
93
94
 
94
95
  return this.sdkApi.makeRequest<void>({
95
96
  method: 'DELETE',
96
97
  route,
97
98
  });
98
99
  }
100
+
101
+ /**
102
+ * Get API path prefix for cross-account use based on `currentAccountId`
103
+ * @returns path prefix
104
+ */
105
+ protected _getPathPrefix(): string {
106
+ return this.sdkApi.currentAccountId ? `/accounts/${this.sdkApi.currentAccountId}` : '';
107
+ }
99
108
  }
package/tsconfig.esm.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "outDir": "./dist/esm",
5
5
  "declarationDir": "./dist/types",
6
6
  "module": "ES6",
7
- "target": "es2022",
7
+ "target": "es6",
8
8
  "rootDir": "./src",
9
9
  "declaration": true,
10
10
  "declarationMap": true
@@ -5,6 +5,7 @@
5
5
  "rootDir": "./src",
6
6
  "declaration": true,
7
7
  "declarationMap": true,
8
- "emitDeclarationOnly": true
8
+ "emitDeclarationOnly": true,
9
+ "removeComments": false
9
10
  }
10
- }
11
+ }