@delopay/sdk 0.5.1 → 0.6.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/dist/index.cjs CHANGED
@@ -68,103 +68,6 @@ var DelopayAuthenticationError = class extends DelopayError {
68
68
  }
69
69
  };
70
70
 
71
- // src/resources/admin.ts
72
- var Admin = class {
73
- constructor(request) {
74
- this.request = request;
75
- }
76
- async signIn(params) {
77
- return this.request("POST", "/admin/signin", { body: params });
78
- }
79
- async createInternalUser(params) {
80
- return this.request("POST", "/admin/internal_signup", { body: params });
81
- }
82
- async createTenant(params) {
83
- return this.request("POST", "/admin/tenant_signup", { body: params });
84
- }
85
- /**
86
- * Create a new merchant admin user and merchant account atomically.
87
- *
88
- * This is the correct endpoint for bootstrapping the first admin user in a
89
- * fresh deployment — `internal_signup`/`tenant_signup` both require
90
- * pre-existing merchant records that don't exist on a clean database.
91
- *
92
- * `POST /admin/signup_with_merchant_id`
93
- */
94
- async signupWithMerchantId(params) {
95
- return this.request("POST", "/admin/signup_with_merchant_id", { body: params });
96
- }
97
- /** Toggle public signup on/off. `POST /admin/settings/signup` */
98
- async setSignupSettings(params) {
99
- return this.request("POST", "/admin/settings/signup", { body: params });
100
- }
101
- /** Read current public-signup status. `GET /admin/settings/signup` */
102
- async getSignupSettings() {
103
- return this.request("GET", "/admin/settings/signup");
104
- }
105
- /** Full merchant bootstrap — user + merchant + project + profile + keys. `POST /admin/onboard_merchant` */
106
- async onboardMerchant(params) {
107
- return this.request("POST", "/admin/onboard_merchant", { body: params });
108
- }
109
- };
110
-
111
- // src/resources/adminPortal.ts
112
- var AdminPortal = class {
113
- constructor(request) {
114
- this.request = request;
115
- }
116
- async listCustomers(params) {
117
- return this.request("GET", "/admin-portal/customers", {
118
- query: params
119
- });
120
- }
121
- async getCustomer(customerId) {
122
- return this.request("GET", `/admin-portal/customers/${encodeURIComponent(customerId)}`);
123
- }
124
- async listTransactions(params) {
125
- return this.request("GET", "/admin-portal/transactions", {
126
- query: params
127
- });
128
- }
129
- async analytics(params) {
130
- return this.request("GET", "/admin-portal/analytics", {
131
- query: params
132
- });
133
- }
134
- async overviewStats() {
135
- return this.request("GET", "/admin-portal/overview-stats");
136
- }
137
- async paymentAnalytics(params) {
138
- return this.request("GET", "/admin-portal/payment-analytics", {
139
- query: params
140
- });
141
- }
142
- /**
143
- * Retrieve a merchant account via the admin portal. Unlike
144
- * `merchantAccounts.retrieve`, this route accepts an admin JWT (or admin API
145
- * key) and does not require the JWT to be scoped to the target merchant.
146
- */
147
- async retrieveAccount(merchantId) {
148
- return this.request("GET", `/admin-portal/accounts/${encodeURIComponent(merchantId)}`);
149
- }
150
- /**
151
- * Update a merchant account via the admin portal. Authenticated via admin JWT
152
- * or admin API key.
153
- */
154
- async updateAccount(merchantId, params) {
155
- return this.request("POST", `/admin-portal/accounts/${encodeURIComponent(merchantId)}`, {
156
- body: params
157
- });
158
- }
159
- /**
160
- * Delete a merchant account via the admin portal. Authenticated via admin JWT
161
- * or admin API key.
162
- */
163
- async deleteAccount(merchantId) {
164
- return this.request("DELETE", `/admin-portal/accounts/${encodeURIComponent(merchantId)}`);
165
- }
166
- };
167
-
168
71
  // src/resources/apiKeys.ts
169
72
  var ApiKeys = class {
170
73
  constructor(request) {
@@ -237,21 +140,6 @@ var ApiKeys = class {
237
140
  }
238
141
  };
239
142
 
240
- // src/resources/auditLogs.ts
241
- var AuditLogs = class {
242
- constructor(request) {
243
- this.request = request;
244
- }
245
- async list(params) {
246
- return this.request("GET", "/admin-portal/audit", {
247
- query: params
248
- });
249
- }
250
- async retrieve(logId) {
251
- return this.request("GET", `/admin-portal/audit/${encodeURIComponent(logId)}`);
252
- }
253
- };
254
-
255
143
  // src/resources/authentication.ts
256
144
  var Authentication = class {
257
145
  constructor(request) {
@@ -2105,8 +1993,7 @@ var Users = class {
2105
1993
  * `generateRecoveryCodes`, `terminate2fa`) and setting it on the client
2106
1994
  * via `setJwtToken` before calling this method. `body.token` must still
2107
1995
  * be the original `EmailToken` from the reset-link URL — the handler
2108
- * decodes it a second time to find the user
2109
- * (`delopay-backend/crates/router/src/core/user.rs:687`).
1996
+ * decodes it a second time to find the user.
2110
1997
  */
2111
1998
  async resetPassword(params) {
2112
1999
  return this.request("POST", "/user/reset_password", { body: params });
@@ -2199,14 +2086,6 @@ var Users = class {
2199
2086
  async deleteUserRole(params) {
2200
2087
  return this.request("DELETE", "/user/user/delete", { body: params });
2201
2088
  }
2202
- async getDashboardMetadata(params) {
2203
- return this.request("GET", "/user/data", {
2204
- query: params
2205
- });
2206
- }
2207
- async setDashboardMetadata(params) {
2208
- return this.request("POST", "/user/data", { body: params });
2209
- }
2210
2089
  // --- Advanced methods (Task 4.7) ---
2211
2090
  /** Sign in (v2). `POST /user/v2/signin` */
2212
2091
  async signInV2(params) {
@@ -2296,10 +2175,6 @@ var Users = class {
2296
2175
  async resendInvite(params) {
2297
2176
  return this.request("POST", "/user/user/resend_invite", { body: params });
2298
2177
  }
2299
- /** Clone connector. `POST /user/clone_connector` */
2300
- async cloneConnector(params) {
2301
- return this.request("POST", "/user/clone_connector", { body: params });
2302
- }
2303
2178
  /** Get role (v2). `GET /user/role/v2` */
2304
2179
  async getRoleV2() {
2305
2180
  return this.request("GET", "/user/role/v2");
@@ -2856,10 +2731,7 @@ var Delopay = class {
2856
2731
  this.authentication = new Authentication(request);
2857
2732
  this.verification = new Verification(request);
2858
2733
  this.users = new Users(request);
2859
- this.admin = new Admin(request);
2860
- this.adminPortal = new AdminPortal(request);
2861
2734
  this.apiKeys = new ApiKeys(request);
2862
- this.auditLogs = new AuditLogs(request);
2863
2735
  this.billing = new Billing(request);
2864
2736
  this.blocklist = new Blocklist(request);
2865
2737
  this.cardIssuers = new CardIssuers(request);