@delopay/sdk 0.398.0 → 0.400.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-BI74VQSZ.js → chunk-AZRXI3FB.js} +147 -1
- package/dist/chunk-AZRXI3FB.js.map +1 -0
- package/dist/{index-BH8F0vge.d.cts → index-SqGJT_8j.d.cts} +270 -2
- package/dist/{index-BH8F0vge.d.ts → index-SqGJT_8j.d.ts} +270 -2
- package/dist/index.cjs +147 -0
- 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 +3 -1
- package/dist/internal.cjs +243 -1
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +241 -8
- package/dist/internal.d.ts +241 -8
- package/dist/internal.js +99 -2
- package/dist/internal.js.map +1 -1
- package/package.json +19 -17
- package/dist/chunk-BI74VQSZ.js.map +0 -1
package/dist/internal.js
CHANGED
|
@@ -116,6 +116,7 @@ import {
|
|
|
116
116
|
PAYPAL_CARD_LAYOUTS,
|
|
117
117
|
PAYPAL_LABEL_STYLES,
|
|
118
118
|
PRESENTATION_CONTRACT_VERSION,
|
|
119
|
+
PayoutDestinations,
|
|
119
120
|
PaypalDisputes,
|
|
120
121
|
Persons,
|
|
121
122
|
PresentationCache,
|
|
@@ -305,7 +306,7 @@ import {
|
|
|
305
306
|
visibleCustomFields,
|
|
306
307
|
whopAccentSwatch,
|
|
307
308
|
whopCardElement
|
|
308
|
-
} from "./chunk-
|
|
309
|
+
} from "./chunk-AZRXI3FB.js";
|
|
309
310
|
|
|
310
311
|
// src/internal/resources/admin.ts
|
|
311
312
|
var Admin = class {
|
|
@@ -717,6 +718,97 @@ var AdminPortal = class {
|
|
|
717
718
|
{ query: params }
|
|
718
719
|
);
|
|
719
720
|
}
|
|
721
|
+
/**
|
|
722
|
+
* Every staff flag of a person, active and removed, newest first, with
|
|
723
|
+
* those of the persons merged into it. A merged person reads as the person
|
|
724
|
+
* it merged into. Staff only; a flag changes no payment.
|
|
725
|
+
*
|
|
726
|
+
* `GET /admin-portal/persons/{merchantId}/{personId}/flags`
|
|
727
|
+
*/
|
|
728
|
+
async listPersonFlags(merchantId, personId) {
|
|
729
|
+
return this.request("GET", personFlags(merchantId, personId));
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* Flags a person for staff. The flag changes no payment and the merchant
|
|
733
|
+
* never sees it. A merged person's flag goes on the person it merged into.
|
|
734
|
+
* A person already flagged is refused with `IR_38` (400); a staff role that
|
|
735
|
+
* may not flag buyers gets a `403`.
|
|
736
|
+
*
|
|
737
|
+
* `POST /admin-portal/persons/{merchantId}/{personId}/flags`
|
|
738
|
+
*/
|
|
739
|
+
async flagPerson(merchantId, personId, body) {
|
|
740
|
+
return this.request("POST", personFlags(merchantId, personId), { body });
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
* Replaces an active flag's reason and note at the `version` read. A
|
|
744
|
+
* colleague's newer change, or a removal, since that read is refused with
|
|
745
|
+
* `IR_16` (400) rather than overwritten.
|
|
746
|
+
*
|
|
747
|
+
* `PUT /admin-portal/persons/{merchantId}/{personId}/flags/{flagId}`
|
|
748
|
+
*/
|
|
749
|
+
async updatePersonFlag(merchantId, personId, flagId, body) {
|
|
750
|
+
return this.request(
|
|
751
|
+
"PUT",
|
|
752
|
+
`${personFlags(merchantId, personId)}/${encodeURIComponent(flagId)}`,
|
|
753
|
+
{ body }
|
|
754
|
+
);
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* Removes a flag at the `version` read: the flag stops and stays in the
|
|
758
|
+
* history with who removed it and when, which is what this answers. A
|
|
759
|
+
* colleague's change since that read is refused with `IR_16` (400).
|
|
760
|
+
*
|
|
761
|
+
* `DELETE /admin-portal/persons/{merchantId}/{personId}/flags/{flagId}?version=`
|
|
762
|
+
*/
|
|
763
|
+
async removePersonFlag(merchantId, personId, flagId, version) {
|
|
764
|
+
return this.request(
|
|
765
|
+
"DELETE",
|
|
766
|
+
`${personFlags(merchantId, personId)}/${encodeURIComponent(flagId)}`,
|
|
767
|
+
{ query: { version } }
|
|
768
|
+
);
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* One page of a merchant's persons with an active flag, newest flag first.
|
|
772
|
+
* A flag on a merged person is listed under the person it merged into, and
|
|
773
|
+
* a person with two active flags is listed once, with the newer one.
|
|
774
|
+
*
|
|
775
|
+
* `GET /admin-portal/persons/{merchantId}/flagged`
|
|
776
|
+
*/
|
|
777
|
+
async listFlaggedPersons(merchantId, params) {
|
|
778
|
+
if (params === void 0) {
|
|
779
|
+
return this.request("GET", `${adminPersons(merchantId)}/flagged`);
|
|
780
|
+
}
|
|
781
|
+
return this.request("GET", `${adminPersons(merchantId)}/flagged`, {
|
|
782
|
+
query: params
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* Whether each of 1 to 100 persons of a merchant is flagged, one answer
|
|
787
|
+
* per asked person in the order asked. A merged person answers for the
|
|
788
|
+
* person it merged into; an unknown person is not flagged. No id, or more
|
|
789
|
+
* than 100, is a `400`.
|
|
790
|
+
*
|
|
791
|
+
* `GET /admin-portal/persons/{merchantId}/flag-status?person_ids=`
|
|
792
|
+
*/
|
|
793
|
+
async personFlagStatus(merchantId, personIds) {
|
|
794
|
+
return this.request("GET", `${adminPersons(merchantId)}/flag-status`, {
|
|
795
|
+
query: { person_ids: personIds.join(",") }
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* Persons flagged by staff at other merchants who share an email address
|
|
800
|
+
* or a device id with this person's 100 most recent payments, each once,
|
|
801
|
+
* newest flag first. A card, an IP address or device traits never match.
|
|
802
|
+
* A hint only: the persons stay separate and nothing is written.
|
|
803
|
+
*
|
|
804
|
+
* `GET /admin-portal/persons/{merchantId}/{personId}/flagged-elsewhere`
|
|
805
|
+
*/
|
|
806
|
+
async listFlaggedElsewhere(merchantId, personId) {
|
|
807
|
+
return this.request(
|
|
808
|
+
"GET",
|
|
809
|
+
`${adminPersons(merchantId)}/${encodeURIComponent(personId)}/flagged-elsewhere`
|
|
810
|
+
);
|
|
811
|
+
}
|
|
720
812
|
async exportTransactions(params, options) {
|
|
721
813
|
return runExport(
|
|
722
814
|
this.request,
|
|
@@ -737,7 +829,8 @@ var AdminPortal = class {
|
|
|
737
829
|
}
|
|
738
830
|
/**
|
|
739
831
|
* Full detail for a single transaction of ANY merchant — the same
|
|
740
|
-
* `PaymentResponse` the merchant `payments.retrieve` returns
|
|
832
|
+
* `PaymentResponse` the merchant `payments.retrieve` returns, with what only
|
|
833
|
+
* staff see beside it (`person_flagged`, `flagged_elsewhere`). Admin-scoped:
|
|
741
834
|
* the JWT (or admin API key) does not need to belong to the payment's
|
|
742
835
|
* merchant; the backend resolves the owning merchant and reads it read-only
|
|
743
836
|
* (no connector sync).
|
|
@@ -2029,6 +2122,9 @@ function transactionListQuery(params) {
|
|
|
2029
2122
|
function adminPersons(merchantId) {
|
|
2030
2123
|
return `/admin-portal/persons/${encodeURIComponent(merchantId)}`;
|
|
2031
2124
|
}
|
|
2125
|
+
function personFlags(merchantId, personId) {
|
|
2126
|
+
return `${adminPersons(merchantId)}/${encodeURIComponent(personId)}/flags`;
|
|
2127
|
+
}
|
|
2032
2128
|
function adminAccount(merchantId) {
|
|
2033
2129
|
return `/admin-portal/accounts/${encodeURIComponent(merchantId)}`;
|
|
2034
2130
|
}
|
|
@@ -3050,6 +3146,7 @@ export {
|
|
|
3050
3146
|
PAYPAL_CARD_LAYOUTS,
|
|
3051
3147
|
PAYPAL_LABEL_STYLES,
|
|
3052
3148
|
PRESENTATION_CONTRACT_VERSION,
|
|
3149
|
+
PayoutDestinations,
|
|
3053
3150
|
PaypalDisputes,
|
|
3054
3151
|
Persons,
|
|
3055
3152
|
PlatformBilling,
|