@delopay/sdk 0.185.0 → 0.186.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-LA4KAVRD.js → chunk-FRMLBRHG.js} +85 -1
- package/dist/chunk-FRMLBRHG.js.map +1 -0
- package/dist/index.cjs +84 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +422 -8
- package/dist/index.d.ts +422 -8
- package/dist/index.js +1 -1
- package/dist/internal.cjs +93 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +26 -4
- package/dist/internal.d.ts +26 -4
- package/dist/internal.js +10 -1
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-LA4KAVRD.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -4252,6 +4252,20 @@ var Users = class {
|
|
|
4252
4252
|
async deleteUserRole(params) {
|
|
4253
4253
|
return this.request("DELETE", "/user/employees/delete", { body: params });
|
|
4254
4254
|
}
|
|
4255
|
+
/**
|
|
4256
|
+
* Move a team member between a merchant-level role and shop-level roles.
|
|
4257
|
+
* `POST /user/employees/change-scope`
|
|
4258
|
+
*
|
|
4259
|
+
* A merchant-level `role_id` takes no `profile_ids`; a shop-level one needs
|
|
4260
|
+
* at least one. Every earlier merchant- and shop-level binding of the member
|
|
4261
|
+
* in your merchant is replaced. When the change takes a scope away, the
|
|
4262
|
+
* member's sessions end (`sessions_revoked: true`). Needs a caller at
|
|
4263
|
+
* merchant level or above. A refusal is a `UR_23` error whose `data.reason`
|
|
4264
|
+
* names the rule; an unknown `role_id` is `UR_22`.
|
|
4265
|
+
*/
|
|
4266
|
+
async changeMemberScope(params) {
|
|
4267
|
+
return this.request("POST", "/user/employees/change-scope", { body: params });
|
|
4268
|
+
}
|
|
4255
4269
|
/** Sign in via OIDC. `POST /user/oidc` */
|
|
4256
4270
|
async signInOidc(params) {
|
|
4257
4271
|
return this.request("POST", "/user/oidc", { body: params });
|
|
@@ -4801,6 +4815,24 @@ var Export = class {
|
|
|
4801
4815
|
options
|
|
4802
4816
|
);
|
|
4803
4817
|
}
|
|
4818
|
+
async transactionLines(params, options) {
|
|
4819
|
+
return runExport(
|
|
4820
|
+
this.request,
|
|
4821
|
+
"POST",
|
|
4822
|
+
"/export/transactions/lines",
|
|
4823
|
+
{ body: params ?? {} },
|
|
4824
|
+
options
|
|
4825
|
+
);
|
|
4826
|
+
}
|
|
4827
|
+
async transactionLinesForProfile(params, options) {
|
|
4828
|
+
return runExport(
|
|
4829
|
+
this.request,
|
|
4830
|
+
"POST",
|
|
4831
|
+
"/export/profile/transactions/lines",
|
|
4832
|
+
{ body: params ?? {} },
|
|
4833
|
+
options
|
|
4834
|
+
);
|
|
4835
|
+
}
|
|
4804
4836
|
async refunds(params, options) {
|
|
4805
4837
|
return runExport(this.request, "POST", "/refunds/list/export", { body: params ?? {} }, options);
|
|
4806
4838
|
}
|
|
@@ -5222,6 +5254,20 @@ var Products = class {
|
|
|
5222
5254
|
...this.scoped(profileId, options)
|
|
5223
5255
|
});
|
|
5224
5256
|
}
|
|
5257
|
+
/**
|
|
5258
|
+
* What a product sold in a window, per currency, net of the refunds credited
|
|
5259
|
+
* to its lines. Refunds that named no product line are not included.
|
|
5260
|
+
* `GET /products/{product_id}/sales`
|
|
5261
|
+
*
|
|
5262
|
+
* Needs payment read; refused (403) to a caller limited to some connector
|
|
5263
|
+
* accounts.
|
|
5264
|
+
*/
|
|
5265
|
+
async sales(productId, query, profileId, options) {
|
|
5266
|
+
return this.request("GET", `/products/${encodeURIComponent(productId)}/sales`, {
|
|
5267
|
+
...this.scoped(profileId, options),
|
|
5268
|
+
query: { ...query }
|
|
5269
|
+
});
|
|
5270
|
+
}
|
|
5225
5271
|
/**
|
|
5226
5272
|
* Change a product's name, description, image, metadata or category
|
|
5227
5273
|
* (`category_id: null` makes it uncategorized).
|
|
@@ -5525,6 +5571,44 @@ var Products = class {
|
|
|
5525
5571
|
...this.scoped(profileId, options)
|
|
5526
5572
|
});
|
|
5527
5573
|
}
|
|
5574
|
+
// --- provider sync -----------------------------------------------
|
|
5575
|
+
/**
|
|
5576
|
+
* Compare the product with its copy at every connected account it is tied
|
|
5577
|
+
* to. Reads the providers now; an unreadable provider answers `unknown`,
|
|
5578
|
+
* never `in_sync`.
|
|
5579
|
+
* `GET /products/{product_id}/provider-sync`
|
|
5580
|
+
*/
|
|
5581
|
+
async providerSync(productId, profileId, options) {
|
|
5582
|
+
return this.request("GET", `/products/${encodeURIComponent(productId)}/provider-sync`, {
|
|
5583
|
+
...this.scoped(profileId, options)
|
|
5584
|
+
});
|
|
5585
|
+
}
|
|
5586
|
+
/**
|
|
5587
|
+
* {@link providerSync} for 1 to 50 products at once, such as one page of the
|
|
5588
|
+
* product list. Unknown ids are left out of the answer.
|
|
5589
|
+
* `POST /products/provider-sync`
|
|
5590
|
+
*/
|
|
5591
|
+
async providerSyncBatch(request, profileId, options) {
|
|
5592
|
+
return this.request("POST", "/products/provider-sync", {
|
|
5593
|
+
body: request,
|
|
5594
|
+
...this.scoped(profileId, options)
|
|
5595
|
+
});
|
|
5596
|
+
}
|
|
5597
|
+
/**
|
|
5598
|
+
* Write the catalog's state onto one connected account's copy of the
|
|
5599
|
+
* product, for the differences a push changes and nothing else. When it
|
|
5600
|
+
* would change a difference not named in `confirmed`, nothing is written and
|
|
5601
|
+
* the answer carries `confirmation_outdated: true` with the current
|
|
5602
|
+
* differences in `result`; `nothing_to_push` answers without a provider
|
|
5603
|
+
* write when nothing pushable differs.
|
|
5604
|
+
* `POST /products/{product_id}/provider-sync/push`
|
|
5605
|
+
*/
|
|
5606
|
+
async providerPush(productId, request, profileId, options) {
|
|
5607
|
+
return this.request("POST", `/products/${encodeURIComponent(productId)}/provider-sync/push`, {
|
|
5608
|
+
body: request,
|
|
5609
|
+
...this.scoped(profileId, options)
|
|
5610
|
+
});
|
|
5611
|
+
}
|
|
5528
5612
|
};
|
|
5529
5613
|
|
|
5530
5614
|
// src/resources/processorCosts.ts
|