@naturalpay/sdk 0.4.0 → 0.7.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.
Files changed (118) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/client.d.mts +7 -16
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -16
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -12
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -12
  9. package/client.mjs.map +1 -1
  10. package/internal/tslib.js +17 -17
  11. package/internal/utils/query.d.mts +3 -0
  12. package/internal/utils/query.d.mts.map +1 -1
  13. package/internal/utils/query.d.ts +3 -0
  14. package/internal/utils/query.d.ts.map +1 -1
  15. package/internal/utils/query.js +16 -3
  16. package/internal/utils/query.js.map +1 -1
  17. package/internal/utils/query.mjs +16 -2
  18. package/internal/utils/query.mjs.map +1 -1
  19. package/package.json +1 -1
  20. package/resources/agents.d.mts +435 -260
  21. package/resources/agents.d.mts.map +1 -1
  22. package/resources/agents.d.ts +435 -260
  23. package/resources/agents.d.ts.map +1 -1
  24. package/resources/agents.js +72 -20
  25. package/resources/agents.js.map +1 -1
  26. package/resources/agents.mjs +72 -20
  27. package/resources/agents.mjs.map +1 -1
  28. package/resources/customers.d.mts +243 -114
  29. package/resources/customers.d.mts.map +1 -1
  30. package/resources/customers.d.ts +243 -114
  31. package/resources/customers.d.ts.map +1 -1
  32. package/resources/customers.js +6 -7
  33. package/resources/customers.js.map +1 -1
  34. package/resources/customers.mjs +6 -7
  35. package/resources/customers.mjs.map +1 -1
  36. package/resources/index.d.mts +2 -4
  37. package/resources/index.d.mts.map +1 -1
  38. package/resources/index.d.ts +2 -4
  39. package/resources/index.d.ts.map +1 -1
  40. package/resources/index.js +1 -5
  41. package/resources/index.js.map +1 -1
  42. package/resources/index.mjs +0 -2
  43. package/resources/index.mjs.map +1 -1
  44. package/src/client.ts +23 -60
  45. package/src/internal/utils/query.ts +18 -2
  46. package/src/resources/agents.ts +541 -294
  47. package/src/resources/customers.ts +273 -132
  48. package/src/resources/index.ts +10 -24
  49. package/src/version.ts +1 -1
  50. package/version.d.mts +1 -1
  51. package/version.d.ts +1 -1
  52. package/version.js +1 -1
  53. package/version.mjs +1 -1
  54. package/internal/qs/formats.d.mts +0 -7
  55. package/internal/qs/formats.d.mts.map +0 -1
  56. package/internal/qs/formats.d.ts +0 -7
  57. package/internal/qs/formats.d.ts.map +0 -1
  58. package/internal/qs/formats.js +0 -13
  59. package/internal/qs/formats.js.map +0 -1
  60. package/internal/qs/formats.mjs +0 -9
  61. package/internal/qs/formats.mjs.map +0 -1
  62. package/internal/qs/index.d.mts +0 -10
  63. package/internal/qs/index.d.mts.map +0 -1
  64. package/internal/qs/index.d.ts +0 -10
  65. package/internal/qs/index.d.ts.map +0 -1
  66. package/internal/qs/index.js +0 -14
  67. package/internal/qs/index.js.map +0 -1
  68. package/internal/qs/index.mjs +0 -10
  69. package/internal/qs/index.mjs.map +0 -1
  70. package/internal/qs/stringify.d.mts +0 -3
  71. package/internal/qs/stringify.d.mts.map +0 -1
  72. package/internal/qs/stringify.d.ts +0 -3
  73. package/internal/qs/stringify.d.ts.map +0 -1
  74. package/internal/qs/stringify.js +0 -277
  75. package/internal/qs/stringify.js.map +0 -1
  76. package/internal/qs/stringify.mjs +0 -274
  77. package/internal/qs/stringify.mjs.map +0 -1
  78. package/internal/qs/types.d.mts +0 -57
  79. package/internal/qs/types.d.mts.map +0 -1
  80. package/internal/qs/types.d.ts +0 -57
  81. package/internal/qs/types.d.ts.map +0 -1
  82. package/internal/qs/types.js +0 -3
  83. package/internal/qs/types.js.map +0 -1
  84. package/internal/qs/types.mjs +0 -2
  85. package/internal/qs/types.mjs.map +0 -1
  86. package/internal/qs/utils.d.mts +0 -15
  87. package/internal/qs/utils.d.mts.map +0 -1
  88. package/internal/qs/utils.d.ts +0 -15
  89. package/internal/qs/utils.d.ts.map +0 -1
  90. package/internal/qs/utils.js +0 -230
  91. package/internal/qs/utils.js.map +0 -1
  92. package/internal/qs/utils.mjs +0 -217
  93. package/internal/qs/utils.mjs.map +0 -1
  94. package/resources/delegations.d.mts +0 -458
  95. package/resources/delegations.d.mts.map +0 -1
  96. package/resources/delegations.d.ts +0 -458
  97. package/resources/delegations.d.ts.map +0 -1
  98. package/resources/delegations.js +0 -47
  99. package/resources/delegations.js.map +0 -1
  100. package/resources/delegations.mjs +0 -43
  101. package/resources/delegations.mjs.map +0 -1
  102. package/resources/escalations.d.mts +0 -1124
  103. package/resources/escalations.d.mts.map +0 -1
  104. package/resources/escalations.d.ts +0 -1124
  105. package/resources/escalations.d.ts.map +0 -1
  106. package/resources/escalations.js +0 -110
  107. package/resources/escalations.js.map +0 -1
  108. package/resources/escalations.mjs +0 -106
  109. package/resources/escalations.mjs.map +0 -1
  110. package/src/internal/qs/LICENSE.md +0 -13
  111. package/src/internal/qs/README.md +0 -3
  112. package/src/internal/qs/formats.ts +0 -10
  113. package/src/internal/qs/index.ts +0 -13
  114. package/src/internal/qs/stringify.ts +0 -385
  115. package/src/internal/qs/types.ts +0 -71
  116. package/src/internal/qs/utils.ts +0 -265
  117. package/src/resources/delegations.ts +0 -580
  118. package/src/resources/escalations.ts +0 -1422
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,kBAAkB,GACxB,sBAAmB;AACpB,OAAO,EACL,MAAM,EACN,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,8BAA8B,EACnC,KAAK,gBAAgB,EACrB,KAAK,wCAAwC,EAC7C,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,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,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,kCAAkC,EACvC,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,GACtC,8BAA2B;AAC5B,OAAO,EACL,QAAQ,EACR,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,GACtB,sBAAmB;AACpB,OAAO,EACL,YAAY,EACZ,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,GAC1B,0BAAuB;AACxB,OAAO,EACL,SAAS,EACT,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,KAAK,kCAAkC,EACvC,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,GACtC,uBAAoB;AACrB,OAAO,EACL,MAAM,EACN,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,oBAAiB;AAClB,OAAO,EACL,QAAQ,EACR,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,GAC/B,sBAAmB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,OAAO,EACP,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,iBAA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UTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Webhooks = exports.Wallet = exports.Transfers = exports.Transactions = exports.Payments = exports.PaymentRequests = exports.Parties = exports.Invitations = exports.ExternalAccounts = exports.Escalations = exports.Delegations = exports.Customers = exports.Counterparties = exports.Agents = exports.APIKeys = void 0;
4
+ exports.Webhooks = exports.Wallet = exports.Transfers = exports.Transactions = exports.Payments = exports.PaymentRequests = exports.Parties = exports.Invitations = exports.ExternalAccounts = exports.Customers = exports.Counterparties = exports.Agents = exports.APIKeys = void 0;
5
5
  var api_keys_1 = require("./api-keys.js");
6
6
  Object.defineProperty(exports, "APIKeys", { enumerable: true, get: function () { return api_keys_1.APIKeys; } });
7
7
  var agents_1 = require("./agents.js");
@@ -10,10 +10,6 @@ var counterparties_1 = require("./counterparties.js");
10
10
  Object.defineProperty(exports, "Counterparties", { enumerable: true, get: function () { return counterparties_1.Counterparties; } });
11
11
  var customers_1 = require("./customers.js");
12
12
  Object.defineProperty(exports, "Customers", { enumerable: true, get: function () { return customers_1.Customers; } });
13
- var delegations_1 = require("./delegations.js");
14
- Object.defineProperty(exports, "Delegations", { enumerable: true, get: function () { return delegations_1.Delegations; } });
15
- var escalations_1 = require("./escalations.js");
16
- Object.defineProperty(exports, "Escalations", { enumerable: true, get: function () { return escalations_1.Escalations; } });
17
13
  var external_accounts_1 = require("./external-accounts.js");
18
14
  Object.defineProperty(exports, "ExternalAccounts", { enumerable: true, get: function () { return external_accounts_1.ExternalAccounts; } });
19
15
  var invitations_1 = require("./invitations.js");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0CAUoB;AATlB,mGAAA,OAAO,OAAA;AAUT,sCAgBkB;AAfhB,gGAAA,MAAM,OAAA;AAgBR,sDAA8G;AAArG,gHAAA,cAAc,OAAA;AACvB,4CAMqB;AALnB,sGAAA,SAAS,OAAA;AAMX,gDAMuB;AALrB,0GAAA,WAAW,OAAA;AAMb,gDAUuB;AATrB,0GAAA,WAAW,OAAA;AAUb,4DAM6B;AAL3B,qHAAA,gBAAgB,OAAA;AAMlB,gDAQuB;AAPrB,0GAAA,WAAW,OAAA;AAQb,wCAUmB;AATjB,kGAAA,OAAO,OAAA;AAUT,0DAc4B;AAb1B,mHAAA,eAAe,OAAA;AAcjB,0CAQoB;AAPlB,oGAAA,QAAQ,OAAA;AAQV,kDAMwB;AALtB,4GAAA,YAAY,OAAA;AAMd,4CAUqB;AATnB,sGAAA,SAAS,OAAA;AAUX,sCAMkB;AALhB,gGAAA,MAAM,OAAA;AAMR,0CAcoB;AAblB,oGAAA,QAAQ,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,0CAUoB;AATlB,mGAAA,OAAO,OAAA;AAUT,sCAoBkB;AAnBhB,gGAAA,MAAM,OAAA;AAoBR,sDAA8G;AAArG,gHAAA,cAAc,OAAA;AACvB,4CAMqB;AALnB,sGAAA,SAAS,OAAA;AAMX,4DAM6B;AAL3B,qHAAA,gBAAgB,OAAA;AAMlB,gDAQuB;AAPrB,0GAAA,WAAW,OAAA;AAQb,wCAUmB;AATjB,kGAAA,OAAO,OAAA;AAUT,0DAc4B;AAb1B,mHAAA,eAAe,OAAA;AAcjB,0CAQoB;AAPlB,oGAAA,QAAQ,OAAA;AAQV,kDAMwB;AALtB,4GAAA,YAAY,OAAA;AAMd,4CAUqB;AATnB,sGAAA,SAAS,OAAA;AAUX,sCAMkB;AALhB,gGAAA,MAAM,OAAA;AAMR,0CAcoB;AAblB,oGAAA,QAAQ,OAAA"}
@@ -3,8 +3,6 @@ export { APIKeys, } from "./api-keys.mjs";
3
3
  export { Agents, } from "./agents.mjs";
4
4
  export { Counterparties } from "./counterparties.mjs";
5
5
  export { Customers, } from "./customers.mjs";
6
- export { Delegations, } from "./delegations.mjs";
7
- export { Escalations, } from "./escalations.mjs";
8
6
  export { ExternalAccounts, } from "./external-accounts.mjs";
9
7
  export { Invitations, } from "./invitations.mjs";
10
8
  export { Parties, } from "./parties.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,OAAO,GASR,uBAAmB;AACpB,OAAO,EACL,MAAM,GAeP,qBAAiB;AAClB,OAAO,EAAE,cAAc,EAA8D,6BAAyB;AAC9G,OAAO,EACL,SAAS,GAKV,wBAAoB;AACrB,OAAO,EACL,WAAW,GAKZ,0BAAsB;AACvB,OAAO,EACL,WAAW,GASZ,0BAAsB;AACvB,OAAO,EACL,gBAAgB,GAKjB,gCAA4B;AAC7B,OAAO,EACL,WAAW,GAOZ,0BAAsB;AACvB,OAAO,EACL,OAAO,GASR,sBAAkB;AACnB,OAAO,EACL,eAAe,GAahB,+BAA2B;AAC5B,OAAO,EACL,QAAQ,GAOT,uBAAmB;AACpB,OAAO,EACL,YAAY,GAKb,2BAAuB;AACxB,OAAO,EACL,SAAS,GASV,wBAAoB;AACrB,OAAO,EACL,MAAM,GAKP,qBAAiB;AAClB,OAAO,EACL,QAAQ,GAaT,uBAAmB"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,OAAO,GASR,uBAAmB;AACpB,OAAO,EACL,MAAM,GAmBP,qBAAiB;AAClB,OAAO,EAAE,cAAc,EAA8D,6BAAyB;AAC9G,OAAO,EACL,SAAS,GAKV,wBAAoB;AACrB,OAAO,EACL,gBAAgB,GAKjB,gCAA4B;AAC7B,OAAO,EACL,WAAW,GAOZ,0BAAsB;AACvB,OAAO,EACL,OAAO,GASR,sBAAkB;AACnB,OAAO,EACL,eAAe,GAahB,+BAA2B;AAC5B,OAAO,EACL,QAAQ,GAOT,uBAAmB;AACpB,OAAO,EACL,YAAY,GAKb,2BAAuB;AACxB,OAAO,EACL,SAAS,GASV,wBAAoB;AACrB,OAAO,EACL,MAAM,GAKP,qBAAiB;AAClB,OAAO,EACL,QAAQ,GAaT,uBAAmB"}
package/src/client.ts CHANGED
@@ -19,16 +19,20 @@ import * as API from './resources/index';
19
19
  import { APIPromise } from './core/api-promise';
20
20
  import { wrapIfNeeded as wrapEnvelopeBody } from './lib/envelope';
21
21
  import {
22
- AgentCreateInvitationsParams,
23
- AgentCreateInvitationsResponse,
22
+ AgentCreateCustomerParams,
23
+ AgentCreateCustomerResponse,
24
24
  AgentCreateParams,
25
25
  AgentCreateResponse,
26
+ AgentGetCustomerParams,
27
+ AgentGetCustomerResponse,
26
28
  AgentGetParams,
27
29
  AgentGetResponse,
28
- AgentListInvitationsForDeveloperParams,
29
- AgentListInvitationsForDeveloperResponse,
30
+ AgentListCustomersParams,
31
+ AgentListCustomersResponse,
30
32
  AgentListParams,
31
33
  AgentListResponse,
34
+ AgentRemoveCustomerParams,
35
+ AgentRemoveCustomerResponse,
32
36
  AgentRemoveParams,
33
37
  AgentRemoveResponse,
34
38
  AgentUpdateParams,
@@ -48,30 +52,12 @@ import {
48
52
  } from './resources/api-keys';
49
53
  import { Counterparties, CounterpartyListParams, CounterpartyListResponse } from './resources/counterparties';
50
54
  import {
51
- CustomerListInvitationsParams,
52
- CustomerListInvitationsResponse,
55
+ CustomerGetParams,
56
+ CustomerGetResponse,
53
57
  CustomerListParams,
54
58
  CustomerListResponse,
55
59
  Customers,
56
60
  } from './resources/customers';
57
- import {
58
- DelegationGetAgentDelegationParams,
59
- DelegationGetAgentDelegationResponse,
60
- DelegationListAgentDelegationsParams,
61
- DelegationListAgentDelegationsResponse,
62
- Delegations,
63
- } from './resources/delegations';
64
- import {
65
- EscalationApproveParams,
66
- EscalationApproveResponse,
67
- EscalationDenyParams,
68
- EscalationDenyResponse,
69
- EscalationGetParams,
70
- EscalationGetResponse,
71
- EscalationListParams,
72
- EscalationListResponse,
73
- Escalations,
74
- } from './resources/escalations';
75
61
  import {
76
62
  ExternalAccountListParams,
77
63
  ExternalAccountListResponse,
@@ -392,6 +378,9 @@ export class Natural {
392
378
  return buildHeaders([{ Authorization: `Bearer ${this.apiKey}` }]);
393
379
  }
394
380
 
381
+ /**
382
+ * Basic re-implementation of `qs.stringify` for primitive types.
383
+ */
395
384
  protected stringifyQuery(query: object | Record<string, unknown>): string {
396
385
  return stringifyQuery(query);
397
386
  }
@@ -913,10 +902,6 @@ export class Natural {
913
902
  * Customer management
914
903
  */
915
904
  customers: API.Customers = new API.Customers(this);
916
- /**
917
- * Agent delegation management
918
- */
919
- delegations: API.Delegations = new API.Delegations(this);
920
905
  /**
921
906
  * Party invitation management
922
907
  */
@@ -937,10 +922,6 @@ export class Natural {
937
922
  * Transaction activity and history operations
938
923
  */
939
924
  transactions: API.Transactions = new API.Transactions(this);
940
- /**
941
- * Payment approval escalation operations
942
- */
943
- escalations: API.Escalations = new API.Escalations(this);
944
925
  /**
945
926
  * Deposit and withdrawal operations
946
927
  */
@@ -963,13 +944,11 @@ Natural.Agents = Agents;
963
944
  Natural.APIKeys = APIKeys;
964
945
  Natural.Counterparties = Counterparties;
965
946
  Natural.Customers = Customers;
966
- Natural.Delegations = Delegations;
967
947
  Natural.Invitations = Invitations;
968
948
  Natural.Parties = Parties;
969
949
  Natural.PaymentRequests = PaymentRequests;
970
950
  Natural.Payments = Payments;
971
951
  Natural.Transactions = Transactions;
972
- Natural.Escalations = Escalations;
973
952
  Natural.Transfers = Transfers;
974
953
  Natural.Webhooks = Webhooks;
975
954
  Natural.Wallet = Wallet;
@@ -983,17 +962,21 @@ export declare namespace Natural {
983
962
  type AgentCreateResponse as AgentCreateResponse,
984
963
  type AgentUpdateResponse as AgentUpdateResponse,
985
964
  type AgentListResponse as AgentListResponse,
986
- type AgentCreateInvitationsResponse as AgentCreateInvitationsResponse,
965
+ type AgentCreateCustomerResponse as AgentCreateCustomerResponse,
987
966
  type AgentGetResponse as AgentGetResponse,
988
- type AgentListInvitationsForDeveloperResponse as AgentListInvitationsForDeveloperResponse,
967
+ type AgentGetCustomerResponse as AgentGetCustomerResponse,
968
+ type AgentListCustomersResponse as AgentListCustomersResponse,
989
969
  type AgentRemoveResponse as AgentRemoveResponse,
970
+ type AgentRemoveCustomerResponse as AgentRemoveCustomerResponse,
990
971
  type AgentCreateParams as AgentCreateParams,
991
972
  type AgentUpdateParams as AgentUpdateParams,
992
973
  type AgentListParams as AgentListParams,
993
- type AgentCreateInvitationsParams as AgentCreateInvitationsParams,
974
+ type AgentCreateCustomerParams as AgentCreateCustomerParams,
994
975
  type AgentGetParams as AgentGetParams,
995
- type AgentListInvitationsForDeveloperParams as AgentListInvitationsForDeveloperParams,
976
+ type AgentGetCustomerParams as AgentGetCustomerParams,
977
+ type AgentListCustomersParams as AgentListCustomersParams,
996
978
  type AgentRemoveParams as AgentRemoveParams,
979
+ type AgentRemoveCustomerParams as AgentRemoveCustomerParams,
997
980
  };
998
981
 
999
982
  export {
@@ -1017,17 +1000,9 @@ export declare namespace Natural {
1017
1000
  export {
1018
1001
  Customers as Customers,
1019
1002
  type CustomerListResponse as CustomerListResponse,
1020
- type CustomerListInvitationsResponse as CustomerListInvitationsResponse,
1003
+ type CustomerGetResponse as CustomerGetResponse,
1021
1004
  type CustomerListParams as CustomerListParams,
1022
- type CustomerListInvitationsParams as CustomerListInvitationsParams,
1023
- };
1024
-
1025
- export {
1026
- Delegations as Delegations,
1027
- type DelegationGetAgentDelegationResponse as DelegationGetAgentDelegationResponse,
1028
- type DelegationListAgentDelegationsResponse as DelegationListAgentDelegationsResponse,
1029
- type DelegationGetAgentDelegationParams as DelegationGetAgentDelegationParams,
1030
- type DelegationListAgentDelegationsParams as DelegationListAgentDelegationsParams,
1005
+ type CustomerGetParams as CustomerGetParams,
1031
1006
  };
1032
1007
 
1033
1008
  export {
@@ -1086,18 +1061,6 @@ export declare namespace Natural {
1086
1061
  type TransactionGetParams as TransactionGetParams,
1087
1062
  };
1088
1063
 
1089
- export {
1090
- Escalations as Escalations,
1091
- type EscalationListResponse as EscalationListResponse,
1092
- type EscalationApproveResponse as EscalationApproveResponse,
1093
- type EscalationDenyResponse as EscalationDenyResponse,
1094
- type EscalationGetResponse as EscalationGetResponse,
1095
- type EscalationListParams as EscalationListParams,
1096
- type EscalationApproveParams as EscalationApproveParams,
1097
- type EscalationDenyParams as EscalationDenyParams,
1098
- type EscalationGetParams as EscalationGetParams,
1099
- };
1100
-
1101
1064
  export {
1102
1065
  Transfers as Transfers,
1103
1066
  type TransferListResponse as TransferListResponse,
@@ -1,7 +1,23 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import * as qs from '../qs/stringify';
3
+ import { NaturalError } from '../../core/error';
4
4
 
5
+ /**
6
+ * Basic re-implementation of `qs.stringify` for primitive types.
7
+ */
5
8
  export function stringifyQuery(query: object | Record<string, unknown>) {
6
- return qs.stringify(query, { arrayFormat: 'comma' });
9
+ return Object.entries(query)
10
+ .filter(([_, value]) => typeof value !== 'undefined')
11
+ .map(([key, value]) => {
12
+ if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
13
+ return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
14
+ }
15
+ if (value === null) {
16
+ return `${encodeURIComponent(key)}=`;
17
+ }
18
+ throw new NaturalError(
19
+ `Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`,
20
+ );
21
+ })
22
+ .join('&');
7
23
  }