@delopay/sdk 0.392.0 → 0.398.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/{chunk-GN6GS4V2.js → chunk-BI74VQSZ.js} +128 -2
- package/dist/chunk-BI74VQSZ.js.map +1 -0
- package/dist/{index-C3WTfnm_.d.cts → index-BH8F0vge.d.cts} +479 -8
- package/dist/{index-C3WTfnm_.d.ts → index-BH8F0vge.d.ts} +479 -8
- package/dist/index.cjs +127 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.cjs +237 -3
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +319 -5
- package/dist/internal.d.ts +319 -5
- package/dist/internal.js +111 -3
- package/dist/internal.js.map +1 -1
- package/package.json +17 -19
- package/dist/chunk-GN6GS4V2.js.map +0 -1
|
@@ -1115,6 +1115,64 @@ var Connectors = class {
|
|
|
1115
1115
|
{ body: params }
|
|
1116
1116
|
);
|
|
1117
1117
|
}
|
|
1118
|
+
/**
|
|
1119
|
+
* Read how the return addresses of a connector's payment provider name the
|
|
1120
|
+
* merchant, per environment.
|
|
1121
|
+
* `GET /account/{merchantId}/connectors/{connectorId}/return-address`
|
|
1122
|
+
*
|
|
1123
|
+
* A return address is where the provider sends the buyer back after a step
|
|
1124
|
+
* it hosts. It belongs to the merchant, the provider and the environment,
|
|
1125
|
+
* so every connector account of that provider follows it.
|
|
1126
|
+
*/
|
|
1127
|
+
async getReturnAddress(merchantId, connectorId) {
|
|
1128
|
+
return this.request(
|
|
1129
|
+
"GET",
|
|
1130
|
+
`/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address`
|
|
1131
|
+
);
|
|
1132
|
+
}
|
|
1133
|
+
/**
|
|
1134
|
+
* Validate a proposed return address without saving it.
|
|
1135
|
+
* `POST /account/{merchantId}/connectors/{connectorId}/return-address/preview`
|
|
1136
|
+
*
|
|
1137
|
+
* Nothing is reserved: a generated identifier in the answer is an example.
|
|
1138
|
+
* Needs the same permission as saving.
|
|
1139
|
+
*
|
|
1140
|
+
* @example
|
|
1141
|
+
* ```typescript
|
|
1142
|
+
* const preview = await delopay.connectors.previewReturnAddress('mer_abc', 'mca_xyz', {
|
|
1143
|
+
* environment: 'live',
|
|
1144
|
+
* mode: 'anonymous',
|
|
1145
|
+
* share_webhook_identifier: true,
|
|
1146
|
+
* });
|
|
1147
|
+
* if (!preview.valid) console.warn(preview.errors);
|
|
1148
|
+
* ```
|
|
1149
|
+
*/
|
|
1150
|
+
async previewReturnAddress(merchantId, connectorId, params) {
|
|
1151
|
+
return this.request(
|
|
1152
|
+
"POST",
|
|
1153
|
+
`/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address/preview`,
|
|
1154
|
+
{ body: params }
|
|
1155
|
+
);
|
|
1156
|
+
}
|
|
1157
|
+
/**
|
|
1158
|
+
* Save the return address of a connector's payment provider for one
|
|
1159
|
+
* environment.
|
|
1160
|
+
* `PUT /account/{merchantId}/connectors/{connectorId}/return-address`
|
|
1161
|
+
*
|
|
1162
|
+
* Payments started afterwards get return addresses of the new form; every
|
|
1163
|
+
* address already handed to the provider keeps working. A refused proposal
|
|
1164
|
+
* answers 422 with error code `IR_06` and the message
|
|
1165
|
+
* `Return address refused: field:code,…`. A caller who may not edit every
|
|
1166
|
+
* connector account of the provider answers 403. Address changes are
|
|
1167
|
+
* limited per provider and environment (`rate_limit`).
|
|
1168
|
+
*/
|
|
1169
|
+
async updateReturnAddress(merchantId, connectorId, params) {
|
|
1170
|
+
return this.request(
|
|
1171
|
+
"PUT",
|
|
1172
|
+
`/account/${encodeURIComponent(merchantId)}/connectors/${encodeURIComponent(connectorId)}/return-address`,
|
|
1173
|
+
{ body: params }
|
|
1174
|
+
);
|
|
1175
|
+
}
|
|
1118
1176
|
/**
|
|
1119
1177
|
* Every webhook the connector's payment provider lists for its credentials
|
|
1120
1178
|
* in one environment: Delopay's own, other connector accounts', former
|
|
@@ -1317,7 +1375,8 @@ var Customers = class {
|
|
|
1317
1375
|
* Place an existing customer in a shop of the merchant, so the shop's API keys and team members
|
|
1318
1376
|
* find the customer before any payment. The customer keeps the shops they already belong to;
|
|
1319
1377
|
* placing one already in the shop changes nothing (`already_in_shop`). Needs a merchant-wide key:
|
|
1320
|
-
* a key bound to one shop is refused. `
|
|
1378
|
+
* a key bound to one shop is refused. An unknown customer answers `CustomerNotFound` (404).
|
|
1379
|
+
* `POST /customers/{customer_id}/shops`
|
|
1321
1380
|
*
|
|
1322
1381
|
* @param customerId - The customer to place.
|
|
1323
1382
|
* @param profileId - The shop. It must belong to the merchant.
|
|
@@ -2805,6 +2864,23 @@ var Payments = class {
|
|
|
2805
2864
|
async buyerRisk(paymentId, options) {
|
|
2806
2865
|
return this.request("GET", `/payments/${encodeURIComponent(paymentId)}/buyer-risk`, options);
|
|
2807
2866
|
}
|
|
2867
|
+
/**
|
|
2868
|
+
* Lift the holds put on an authorized payment when a chargeback prevention
|
|
2869
|
+
* alert or an AML hit on the same buyer arrived after it was scored and the
|
|
2870
|
+
* shop's `buyer_risk_source_changes` setting asked to hold it. Until then a
|
|
2871
|
+
* capture is refused with `IR_16`; after the release the payment can be
|
|
2872
|
+
* captured or cancelled as usual. A payment with no hold answers an empty
|
|
2873
|
+
* list. A caller scoped to one shop releases only that shop's payments.
|
|
2874
|
+
*
|
|
2875
|
+
* `POST /payments/{paymentId}/buyer-risk/release`
|
|
2876
|
+
*/
|
|
2877
|
+
async releaseBuyerRiskHold(paymentId, options) {
|
|
2878
|
+
return this.request(
|
|
2879
|
+
"POST",
|
|
2880
|
+
`/payments/${encodeURIComponent(paymentId)}/buyer-risk/release`,
|
|
2881
|
+
options
|
|
2882
|
+
);
|
|
2883
|
+
}
|
|
2808
2884
|
/**
|
|
2809
2885
|
* What the payment's checkout client was, for AI shopping agents: a
|
|
2810
2886
|
* verified agent (with its operator, protocol and key), an agent signature
|
|
@@ -5568,6 +5644,56 @@ var Users = class {
|
|
|
5568
5644
|
body: params
|
|
5569
5645
|
});
|
|
5570
5646
|
}
|
|
5647
|
+
/**
|
|
5648
|
+
* One team member's sign-in history: successes and failures with method,
|
|
5649
|
+
* address, location and device, filtered, sorted and paged as
|
|
5650
|
+
* `listLoginActivity` is. `GET /user/employees/{user_id}/login-activity`
|
|
5651
|
+
*
|
|
5652
|
+
* Needs the *Users* write permission. Answers only for a member
|
|
5653
|
+
* `listUsersInLineage` shows you; any other id is a 404 `UR_68` with
|
|
5654
|
+
* `data.reason: 'member_not_found'`. Sign-ins belong to the account, so
|
|
5655
|
+
* they are shown only for an account wholly in this merchant: refused with
|
|
5656
|
+
* a 400 `UR_68` `member_has_access_elsewhere` for an account that also
|
|
5657
|
+
* holds a role elsewhere, and `member_not_activated` for one that is only
|
|
5658
|
+
* invited. `TeamMemberDetails.can_view_sign_ins` answers the same rule.
|
|
5659
|
+
*/
|
|
5660
|
+
async listTeamMemberLoginActivity(userId, params) {
|
|
5661
|
+
const path2 = `/user/employees/${encodeURIComponent(userId)}/login-activity`;
|
|
5662
|
+
if (params === void 0) {
|
|
5663
|
+
return this.request("GET", path2);
|
|
5664
|
+
}
|
|
5665
|
+
return this.request("GET", path2, {
|
|
5666
|
+
query: csvQuery(params, ["event_type", "auth_method"])
|
|
5667
|
+
});
|
|
5668
|
+
}
|
|
5669
|
+
/**
|
|
5670
|
+
* One team member's live sessions: neither signed out nor expired.
|
|
5671
|
+
* `is_current` marks the caller's own session only.
|
|
5672
|
+
* `GET /user/employees/{user_id}/sessions`
|
|
5673
|
+
*
|
|
5674
|
+
* Same permission and refusals as `listTeamMemberLoginActivity`.
|
|
5675
|
+
*/
|
|
5676
|
+
async listTeamMemberSessions(userId) {
|
|
5677
|
+
return this.request("GET", `/user/employees/${encodeURIComponent(userId)}/sessions`);
|
|
5678
|
+
}
|
|
5679
|
+
/**
|
|
5680
|
+
* Sign a team member out everywhere: ends every session and token of the
|
|
5681
|
+
* member, at this merchant and at every other merchant the account belongs
|
|
5682
|
+
* to. `POST /user/employees/{user_id}/sessions/revoke-all`
|
|
5683
|
+
*
|
|
5684
|
+
* The account stays active and its password unchanged, so the member can
|
|
5685
|
+
* sign in again at once. Allowed on exactly the members whose password you
|
|
5686
|
+
* may reset with `resetTeamMemberPassword`, and refused with the same
|
|
5687
|
+
* `UR_68` reasons ({@link TeamMemberRefusal}).
|
|
5688
|
+
* `TeamMemberDetails.can_sign_out` answers the same rule. Recorded in the
|
|
5689
|
+
* audit log.
|
|
5690
|
+
*/
|
|
5691
|
+
async revokeTeamMemberSessions(userId) {
|
|
5692
|
+
return this.request(
|
|
5693
|
+
"POST",
|
|
5694
|
+
`/user/employees/${encodeURIComponent(userId)}/sessions/revoke-all`
|
|
5695
|
+
);
|
|
5696
|
+
}
|
|
5571
5697
|
/**
|
|
5572
5698
|
* Which checkout payment methods a member may change in your merchant.
|
|
5573
5699
|
* `GET /user/employees/{user_id}/method-access`
|
|
@@ -17684,4 +17810,4 @@ export {
|
|
|
17684
17810
|
decodeNativePanes,
|
|
17685
17811
|
encodeNativePanes
|
|
17686
17812
|
};
|
|
17687
|
-
//# sourceMappingURL=chunk-
|
|
17813
|
+
//# sourceMappingURL=chunk-BI74VQSZ.js.map
|