dodopayments 2.24.0 → 2.25.1
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/CHANGELOG.md +23 -0
- package/bin/migration-config.json +15 -169
- package/client.d.mts +2 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -8
- package/client.d.ts.map +1 -1
- package/client.js +0 -6
- package/client.js.map +1 -1
- package/client.mjs +0 -6
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/customers/customers.d.mts +8 -1
- package/resources/customers/customers.d.mts.map +1 -1
- package/resources/customers/customers.d.ts +8 -1
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +8 -0
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +8 -0
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.mts +1 -1
- package/resources/customers/index.d.mts.map +1 -1
- package/resources/customers/index.d.ts +1 -1
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/index.js.map +1 -1
- package/resources/customers/index.mjs.map +1 -1
- package/resources/disputes.d.mts +12 -0
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +12 -0
- package/resources/disputes.d.ts.map +1 -1
- package/resources/index.d.mts +1 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -2
- package/resources/index.mjs.map +1 -1
- package/resources/invoices/payments.d.mts +0 -1
- package/resources/invoices/payments.d.mts.map +1 -1
- package/resources/invoices/payments.d.ts +0 -1
- package/resources/invoices/payments.d.ts.map +1 -1
- package/resources/invoices/payments.js +0 -7
- package/resources/invoices/payments.js.map +1 -1
- package/resources/invoices/payments.mjs +0 -7
- package/resources/invoices/payments.mjs.map +1 -1
- package/src/client.ts +2 -34
- package/src/resources/customers/customers.ts +21 -0
- package/src/resources/customers/index.ts +1 -0
- package/src/resources/disputes.ts +15 -0
- package/src/resources/index.ts +1 -14
- package/src/resources/invoices/payments.ts +0 -8
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/product-collections/groups/groups.d.mts +0 -107
- package/resources/product-collections/groups/groups.d.mts.map +0 -1
- package/resources/product-collections/groups/groups.d.ts +0 -107
- package/resources/product-collections/groups/groups.d.ts.map +0 -1
- package/resources/product-collections/groups/groups.js +0 -37
- package/resources/product-collections/groups/groups.js.map +0 -1
- package/resources/product-collections/groups/groups.mjs +0 -32
- package/resources/product-collections/groups/groups.mjs.map +0 -1
- package/resources/product-collections/groups/index.d.mts +0 -3
- package/resources/product-collections/groups/index.d.mts.map +0 -1
- package/resources/product-collections/groups/index.d.ts +0 -3
- package/resources/product-collections/groups/index.d.ts.map +0 -1
- package/resources/product-collections/groups/index.js +0 -9
- package/resources/product-collections/groups/index.js.map +0 -1
- package/resources/product-collections/groups/index.mjs +0 -4
- package/resources/product-collections/groups/index.mjs.map +0 -1
- package/resources/product-collections/groups/items.d.mts +0 -91
- package/resources/product-collections/groups/items.d.mts.map +0 -1
- package/resources/product-collections/groups/items.d.ts +0 -91
- package/resources/product-collections/groups/items.d.ts.map +0 -1
- package/resources/product-collections/groups/items.js +0 -30
- package/resources/product-collections/groups/items.js.map +0 -1
- package/resources/product-collections/groups/items.mjs +0 -26
- package/resources/product-collections/groups/items.mjs.map +0 -1
- package/resources/product-collections/groups.d.mts +0 -2
- package/resources/product-collections/groups.d.mts.map +0 -1
- package/resources/product-collections/groups.d.ts +0 -2
- package/resources/product-collections/groups.d.ts.map +0 -1
- package/resources/product-collections/groups.js +0 -6
- package/resources/product-collections/groups.js.map +0 -1
- package/resources/product-collections/groups.mjs +0 -3
- package/resources/product-collections/groups.mjs.map +0 -1
- package/resources/product-collections/index.d.mts +0 -3
- package/resources/product-collections/index.d.mts.map +0 -1
- package/resources/product-collections/index.d.ts +0 -3
- package/resources/product-collections/index.d.ts.map +0 -1
- package/resources/product-collections/index.js +0 -9
- package/resources/product-collections/index.js.map +0 -1
- package/resources/product-collections/index.mjs +0 -4
- package/resources/product-collections/index.mjs.map +0 -1
- package/resources/product-collections/product-collections.d.mts +0 -307
- package/resources/product-collections/product-collections.d.mts.map +0 -1
- package/resources/product-collections/product-collections.d.ts +0 -307
- package/resources/product-collections/product-collections.d.ts.map +0 -1
- package/resources/product-collections/product-collections.js +0 -49
- package/resources/product-collections/product-collections.js.map +0 -1
- package/resources/product-collections/product-collections.mjs +0 -44
- package/resources/product-collections/product-collections.mjs.map +0 -1
- package/resources/product-collections.d.mts +0 -2
- package/resources/product-collections.d.mts.map +0 -1
- package/resources/product-collections.d.ts +0 -2
- package/resources/product-collections.d.ts.map +0 -1
- package/resources/product-collections.js +0 -6
- package/resources/product-collections.js.map +0 -1
- package/resources/product-collections.mjs +0 -3
- package/resources/product-collections.mjs.map +0 -1
- package/resources/your-webhook-url.d.mts +0 -85
- package/resources/your-webhook-url.d.mts.map +0 -1
- package/resources/your-webhook-url.d.ts +0 -85
- package/resources/your-webhook-url.d.ts.map +0 -1
- package/resources/your-webhook-url.js +0 -26
- package/resources/your-webhook-url.js.map +0 -1
- package/resources/your-webhook-url.mjs +0 -22
- package/resources/your-webhook-url.mjs.map +0 -1
- package/src/resources/product-collections/groups/groups.ts +0 -174
- package/src/resources/product-collections/groups/index.ts +0 -16
- package/src/resources/product-collections/groups/items.ts +0 -149
- package/src/resources/product-collections/groups.ts +0 -3
- package/src/resources/product-collections/index.ts +0 -22
- package/src/resources/product-collections/product-collections.ts +0 -472
- package/src/resources/product-collections.ts +0 -3
- package/src/resources/your-webhook-url.ts +0 -138
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product-collections.js","sourceRoot":"","sources":["../../src/resources/product-collections/product-collections.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAGlD,sEAA6C;AAC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AE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED,SAAS,CAAC,EAAU,EAAE,OAAwB;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,wBAAwB,EAAE,YAAY,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;IAED,YAAY,CACV,EAAU,EACV,SAAiE,EAAE,EACnE,OAAwB;QAExB,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,wBAAwB,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;CACF;AApDD,gDAoDC;AAqXD,kBAAkB,CAAC,MAAM,GAAG,eAAM,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
-
import * as GroupsAPI from "./groups/groups.mjs";
|
|
4
|
-
import { Groups, } from "./groups/groups.mjs";
|
|
5
|
-
import { DefaultPageNumberPagination, } from "../../core/pagination.mjs";
|
|
6
|
-
import { buildHeaders } from "../../internal/headers.mjs";
|
|
7
|
-
import { path } from "../../internal/utils/path.mjs";
|
|
8
|
-
export class ProductCollections extends APIResource {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.groups = new GroupsAPI.Groups(this._client);
|
|
12
|
-
}
|
|
13
|
-
create(body, options) {
|
|
14
|
-
return this._client.post('/product-collections', { body, ...options });
|
|
15
|
-
}
|
|
16
|
-
retrieve(id, options) {
|
|
17
|
-
return this._client.get(path `/product-collections/${id}`, options);
|
|
18
|
-
}
|
|
19
|
-
update(id, body, options) {
|
|
20
|
-
return this._client.patch(path `/product-collections/${id}`, {
|
|
21
|
-
body,
|
|
22
|
-
...options,
|
|
23
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
list(query = {}, options) {
|
|
27
|
-
return this._client.getAPIList('/product-collections', (DefaultPageNumberPagination), { query, ...options });
|
|
28
|
-
}
|
|
29
|
-
delete(id, options) {
|
|
30
|
-
return this._client.delete(path `/product-collections/${id}`, {
|
|
31
|
-
...options,
|
|
32
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
unarchive(id, options) {
|
|
36
|
-
return this._client.post(path `/product-collections/${id}/unarchive`, options);
|
|
37
|
-
}
|
|
38
|
-
updateImages(id, params = {}, options) {
|
|
39
|
-
const { force_update } = params ?? {};
|
|
40
|
-
return this._client.put(path `/product-collections/${id}/images`, { query: { force_update }, ...options });
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
ProductCollections.Groups = Groups;
|
|
44
|
-
//# sourceMappingURL=product-collections.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product-collections.mjs","sourceRoot":"","sources":["../../src/resources/product-collections/product-collections.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,KAAK,SAAS;OACd,EAKL,MAAM,GACP;OAEM,EACL,2BAA2B,GAG5B;OACM,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,kBAAmB,SAAQ,WAAW;IAAnD;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAmDhE,CAAC;IAjDC,MAAM,CACJ,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,G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ACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,wBAAwB,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;CACF;AAqXD,kBAAkB,CAAC,MAAM,GAAG,MAAM,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product-collections.d.mts","sourceRoot":"","sources":["../src/resources/product-collections.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product-collections.d.ts","sourceRoot":"","sources":["../src/resources/product-collections.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const tslib_1 = require("../internal/tslib.js");
|
|
5
|
-
tslib_1.__exportStar(require("./product-collections/index.js"), exports);
|
|
6
|
-
//# sourceMappingURL=product-collections.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product-collections.js","sourceRoot":"","sources":["../src/resources/product-collections.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,yEAA4C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product-collections.mjs","sourceRoot":"","sources":["../src/resources/product-collections.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import * as DisputesAPI from "./disputes.mjs";
|
|
3
|
-
import * as LicenseKeysAPI from "./license-keys.mjs";
|
|
4
|
-
import * as PaymentsAPI from "./payments.mjs";
|
|
5
|
-
import * as RefundsAPI from "./refunds.mjs";
|
|
6
|
-
import * as SubscriptionsAPI from "./subscriptions.mjs";
|
|
7
|
-
import * as WebhookEventsAPI from "./webhook-events.mjs";
|
|
8
|
-
import * as BalancesAPI from "./credit-entitlements/balances.mjs";
|
|
9
|
-
import { APIPromise } from "../core/api-promise.mjs";
|
|
10
|
-
import { RequestOptions } from "../internal/request-options.mjs";
|
|
11
|
-
export declare class YourWebhookURL extends APIResource {
|
|
12
|
-
create(params: YourWebhookURLCreateParams, options?: RequestOptions): APIPromise<void>;
|
|
13
|
-
}
|
|
14
|
-
export interface YourWebhookURLCreateParams {
|
|
15
|
-
/**
|
|
16
|
-
* Body param
|
|
17
|
-
*/
|
|
18
|
-
business_id: string;
|
|
19
|
-
/**
|
|
20
|
-
* Body param: The latest data at the time of delivery attempt
|
|
21
|
-
*/
|
|
22
|
-
data: YourWebhookURLCreateParams.Payment | YourWebhookURLCreateParams.Subscription | YourWebhookURLCreateParams.Refund | YourWebhookURLCreateParams.Dispute | YourWebhookURLCreateParams.LicenseKey | YourWebhookURLCreateParams.CreditLedgerEntry | YourWebhookURLCreateParams.CreditBalanceLow;
|
|
23
|
-
/**
|
|
24
|
-
* Body param: The timestamp of when the event occurred (not necessarily the same
|
|
25
|
-
* of when it was delivered)
|
|
26
|
-
*/
|
|
27
|
-
timestamp: string;
|
|
28
|
-
/**
|
|
29
|
-
* Body param: Event types for Dodo events
|
|
30
|
-
*/
|
|
31
|
-
type: WebhookEventsAPI.WebhookEventType;
|
|
32
|
-
/**
|
|
33
|
-
* Header param: Unique identifier for the webhook
|
|
34
|
-
*/
|
|
35
|
-
'webhook-id': string;
|
|
36
|
-
/**
|
|
37
|
-
* Header param: Signature of the Webhook
|
|
38
|
-
*/
|
|
39
|
-
'webhook-signature': string;
|
|
40
|
-
/**
|
|
41
|
-
* Header param: Unix timestamp when the webhook was sent
|
|
42
|
-
*/
|
|
43
|
-
'webhook-timestamp': string;
|
|
44
|
-
}
|
|
45
|
-
export declare namespace YourWebhookURLCreateParams {
|
|
46
|
-
interface Payment extends PaymentsAPI.Payment {
|
|
47
|
-
payload_type: 'Payment';
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Response struct representing subscription details
|
|
51
|
-
*/
|
|
52
|
-
interface Subscription extends SubscriptionsAPI.Subscription {
|
|
53
|
-
payload_type: 'Subscription';
|
|
54
|
-
}
|
|
55
|
-
interface Refund extends RefundsAPI.Refund {
|
|
56
|
-
payload_type: 'Refund';
|
|
57
|
-
}
|
|
58
|
-
interface Dispute extends DisputesAPI.GetDispute {
|
|
59
|
-
payload_type: 'Dispute';
|
|
60
|
-
}
|
|
61
|
-
interface LicenseKey extends LicenseKeysAPI.LicenseKey {
|
|
62
|
-
payload_type: 'LicenseKey';
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Response for a ledger entry
|
|
66
|
-
*/
|
|
67
|
-
interface CreditLedgerEntry extends BalancesAPI.CreditLedgerEntry {
|
|
68
|
-
payload_type: 'CreditLedgerEntry';
|
|
69
|
-
}
|
|
70
|
-
interface CreditBalanceLow {
|
|
71
|
-
available_balance: string;
|
|
72
|
-
credit_entitlement_id: string;
|
|
73
|
-
credit_entitlement_name: string;
|
|
74
|
-
customer_id: string;
|
|
75
|
-
payload_type: 'CreditBalanceLow';
|
|
76
|
-
subscription_credits_amount: string;
|
|
77
|
-
subscription_id: string;
|
|
78
|
-
threshold_amount: string;
|
|
79
|
-
threshold_percent: number;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
export declare namespace YourWebhookURL {
|
|
83
|
-
export { type YourWebhookURLCreateParams as YourWebhookURLCreateParams };
|
|
84
|
-
}
|
|
85
|
-
//# sourceMappingURL=your-webhook-url.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"your-webhook-url.d.mts","sourceRoot":"","sources":["../src/resources/your-webhook-url.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,cAAc;OACnB,KAAK,WAAW;OAChB,KAAK,UAAU;OACf,KAAK,gBAA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AAiB,iBAAkB,SAAQ,WAAW,CAAC,iBAAiB;QACtE,YAAY,EAAE,mBAAmB,CAAC;KACnC;IAED,UAAiB,gBAAgB;QAC/B,iBAAiB,EAAE,MAAM,CAAC;QAE1B,qBAAqB,EAAE,MAAM,CAAC;QAE9B,uBAAuB,EAAE,MAAM,CAAC;QAEhC,WAAW,EAAE,MAAM,CAAC;QAEpB,YAAY,EAAE,kBAAkB,CAAC;QAEjC,2BAA2B,EAAE,MAAM,CAAC;QAEpC,eAAe,EAAE,MAAM,CAAC;QAExB,gBAAgB,EAAE,MAAM,CAAC;QAEzB,iBAAiB,EAAE,MAAM,CAAC;KAC3B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EAAE,KAAK,0BAA0B,IAAI,0BAA0B,EAAE,CAAC;CAC1E"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import * as DisputesAPI from "./disputes.js";
|
|
3
|
-
import * as LicenseKeysAPI from "./license-keys.js";
|
|
4
|
-
import * as PaymentsAPI from "./payments.js";
|
|
5
|
-
import * as RefundsAPI from "./refunds.js";
|
|
6
|
-
import * as SubscriptionsAPI from "./subscriptions.js";
|
|
7
|
-
import * as WebhookEventsAPI from "./webhook-events.js";
|
|
8
|
-
import * as BalancesAPI from "./credit-entitlements/balances.js";
|
|
9
|
-
import { APIPromise } from "../core/api-promise.js";
|
|
10
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
11
|
-
export declare class YourWebhookURL extends APIResource {
|
|
12
|
-
create(params: YourWebhookURLCreateParams, options?: RequestOptions): APIPromise<void>;
|
|
13
|
-
}
|
|
14
|
-
export interface YourWebhookURLCreateParams {
|
|
15
|
-
/**
|
|
16
|
-
* Body param
|
|
17
|
-
*/
|
|
18
|
-
business_id: string;
|
|
19
|
-
/**
|
|
20
|
-
* Body param: The latest data at the time of delivery attempt
|
|
21
|
-
*/
|
|
22
|
-
data: YourWebhookURLCreateParams.Payment | YourWebhookURLCreateParams.Subscription | YourWebhookURLCreateParams.Refund | YourWebhookURLCreateParams.Dispute | YourWebhookURLCreateParams.LicenseKey | YourWebhookURLCreateParams.CreditLedgerEntry | YourWebhookURLCreateParams.CreditBalanceLow;
|
|
23
|
-
/**
|
|
24
|
-
* Body param: The timestamp of when the event occurred (not necessarily the same
|
|
25
|
-
* of when it was delivered)
|
|
26
|
-
*/
|
|
27
|
-
timestamp: string;
|
|
28
|
-
/**
|
|
29
|
-
* Body param: Event types for Dodo events
|
|
30
|
-
*/
|
|
31
|
-
type: WebhookEventsAPI.WebhookEventType;
|
|
32
|
-
/**
|
|
33
|
-
* Header param: Unique identifier for the webhook
|
|
34
|
-
*/
|
|
35
|
-
'webhook-id': string;
|
|
36
|
-
/**
|
|
37
|
-
* Header param: Signature of the Webhook
|
|
38
|
-
*/
|
|
39
|
-
'webhook-signature': string;
|
|
40
|
-
/**
|
|
41
|
-
* Header param: Unix timestamp when the webhook was sent
|
|
42
|
-
*/
|
|
43
|
-
'webhook-timestamp': string;
|
|
44
|
-
}
|
|
45
|
-
export declare namespace YourWebhookURLCreateParams {
|
|
46
|
-
interface Payment extends PaymentsAPI.Payment {
|
|
47
|
-
payload_type: 'Payment';
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Response struct representing subscription details
|
|
51
|
-
*/
|
|
52
|
-
interface Subscription extends SubscriptionsAPI.Subscription {
|
|
53
|
-
payload_type: 'Subscription';
|
|
54
|
-
}
|
|
55
|
-
interface Refund extends RefundsAPI.Refund {
|
|
56
|
-
payload_type: 'Refund';
|
|
57
|
-
}
|
|
58
|
-
interface Dispute extends DisputesAPI.GetDispute {
|
|
59
|
-
payload_type: 'Dispute';
|
|
60
|
-
}
|
|
61
|
-
interface LicenseKey extends LicenseKeysAPI.LicenseKey {
|
|
62
|
-
payload_type: 'LicenseKey';
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Response for a ledger entry
|
|
66
|
-
*/
|
|
67
|
-
interface CreditLedgerEntry extends BalancesAPI.CreditLedgerEntry {
|
|
68
|
-
payload_type: 'CreditLedgerEntry';
|
|
69
|
-
}
|
|
70
|
-
interface CreditBalanceLow {
|
|
71
|
-
available_balance: string;
|
|
72
|
-
credit_entitlement_id: string;
|
|
73
|
-
credit_entitlement_name: string;
|
|
74
|
-
customer_id: string;
|
|
75
|
-
payload_type: 'CreditBalanceLow';
|
|
76
|
-
subscription_credits_amount: string;
|
|
77
|
-
subscription_id: string;
|
|
78
|
-
threshold_amount: string;
|
|
79
|
-
threshold_percent: number;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
export declare namespace YourWebhookURL {
|
|
83
|
-
export { type YourWebhookURLCreateParams as YourWebhookURLCreateParams };
|
|
84
|
-
}
|
|
85
|
-
//# sourceMappingURL=your-webhook-url.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"your-webhook-url.d.ts","sourceRoot":"","sources":["../src/resources/your-webhook-url.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,cAAc;OACnB,KAAK,WAAW;OAChB,KAAK,UAAU;OACf,KAAK,gBAAgB;OACrB,KAAK,gBAAgB;OACrB,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB,qBAAa,cAAe,SAAQ,WAAW;IAC7C,MAAM,CAAC,MAAM,EAAE,0BAA0B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC;CAqBvF;AAED,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,IAAI,EACA,0BAA0B,CAAC,OAAO,GAClC,0BAA0B,CAAC,YAAY,GACvC,0BAA0B,CAAC,MAAM,GACjC,0BAA0B,CAAC,OAAO,GAClC,0BAA0B,CAAC,UAAU,GACrC,0BAA0B,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AAK,0BAA0B,IAAI,0BAA0B,EAAE,CAAC;CAC1E"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.YourWebhookURL = void 0;
|
|
5
|
-
const resource_1 = require("../core/resource.js");
|
|
6
|
-
const headers_1 = require("../internal/headers.js");
|
|
7
|
-
class YourWebhookURL extends resource_1.APIResource {
|
|
8
|
-
create(params, options) {
|
|
9
|
-
const { 'webhook-id': webhookID, 'webhook-signature': webhookSignature, 'webhook-timestamp': webhookTimestamp, ...body } = params;
|
|
10
|
-
return this._client.post('/your-webhook-url', {
|
|
11
|
-
body,
|
|
12
|
-
...options,
|
|
13
|
-
headers: (0, headers_1.buildHeaders)([
|
|
14
|
-
{
|
|
15
|
-
Accept: '*/*',
|
|
16
|
-
'webhook-id': webhookID,
|
|
17
|
-
'webhook-signature': webhookSignature,
|
|
18
|
-
'webhook-timestamp': webhookTimestamp,
|
|
19
|
-
},
|
|
20
|
-
options?.headers,
|
|
21
|
-
]),
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.YourWebhookURL = YourWebhookURL;
|
|
26
|
-
//# sourceMappingURL=your-webhook-url.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"your-webhook-url.js","sourceRoot":"","sources":["../src/resources/your-webhook-url.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAS/C,oDAAmD;AAGnD,MAAa,cAAe,SAAQ,sBAAW;IAC7C,MAAM,CAAC,MAAkC,EAAE,OAAwB;QACjE,MAAM,EACJ,YAAY,EAAE,SAAS,EACvB,mBAAmB,EAAE,gBAAgB,EACrC,mBAAmB,EAAE,gBAAgB,EACrC,GAAG,IAAI,EACR,GAAG,MAAM,CAAC;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE;YAC5C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,MAAM,EAAE,KAAK;oBACb,YAAY,EAAE,SAAS;oBACvB,mBAAmB,EAAE,gBAAgB;oBACrC,mBAAmB,EAAE,gBAAgB;iBACtC;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAtBD,wCAsBC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../core/resource.mjs";
|
|
3
|
-
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
-
export class YourWebhookURL extends APIResource {
|
|
5
|
-
create(params, options) {
|
|
6
|
-
const { 'webhook-id': webhookID, 'webhook-signature': webhookSignature, 'webhook-timestamp': webhookTimestamp, ...body } = params;
|
|
7
|
-
return this._client.post('/your-webhook-url', {
|
|
8
|
-
body,
|
|
9
|
-
...options,
|
|
10
|
-
headers: buildHeaders([
|
|
11
|
-
{
|
|
12
|
-
Accept: '*/*',
|
|
13
|
-
'webhook-id': webhookID,
|
|
14
|
-
'webhook-signature': webhookSignature,
|
|
15
|
-
'webhook-timestamp': webhookTimestamp,
|
|
16
|
-
},
|
|
17
|
-
options?.headers,
|
|
18
|
-
]),
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=your-webhook-url.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"your-webhook-url.mjs","sourceRoot":"","sources":["../src/resources/your-webhook-url.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OASf,EAAE,YAAY,EAAE;AAGvB,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC7C,MAAM,CAAC,MAAkC,EAAE,OAAwB;QACjE,MAAM,EACJ,YAAY,EAAE,SAAS,EACvB,mBAAmB,EAAE,gBAAgB,EACrC,mBAAmB,EAAE,gBAAgB,EACrC,GAAG,IAAI,EACR,GAAG,MAAM,CAAC;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE;YAC5C,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,MAAM,EAAE,KAAK;oBACb,YAAY,EAAE,SAAS;oBACvB,mBAAmB,EAAE,gBAAgB;oBACrC,mBAAmB,EAAE,gBAAgB;iBACtC;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import * as MiscAPI from '../../misc';
|
|
5
|
-
import * as ProductsAPI from '../../products/products';
|
|
6
|
-
import * as ItemsAPI from './items';
|
|
7
|
-
import { ItemCreateParams, ItemCreateResponse, ItemDeleteParams, ItemUpdateParams, Items } from './items';
|
|
8
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
9
|
-
import { buildHeaders } from '../../../internal/headers';
|
|
10
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
11
|
-
import { path } from '../../../internal/utils/path';
|
|
12
|
-
|
|
13
|
-
export class Groups extends APIResource {
|
|
14
|
-
items: ItemsAPI.Items = new ItemsAPI.Items(this._client);
|
|
15
|
-
|
|
16
|
-
create(id: string, body: GroupCreateParams, options?: RequestOptions): APIPromise<GroupCreateResponse> {
|
|
17
|
-
return this._client.post(path`/product-collections/${id}/groups`, { body, ...options });
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
update(groupID: string, params: GroupUpdateParams, options?: RequestOptions): APIPromise<void> {
|
|
21
|
-
const { id, ...body } = params;
|
|
22
|
-
return this._client.patch(path`/product-collections/${id}/groups/${groupID}`, {
|
|
23
|
-
body,
|
|
24
|
-
...options,
|
|
25
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
delete(groupID: string, params: GroupDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
30
|
-
const { id } = params;
|
|
31
|
-
return this._client.delete(path`/product-collections/${id}/groups/${groupID}`, {
|
|
32
|
-
...options,
|
|
33
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface GroupCreateResponse {
|
|
39
|
-
group_id: string;
|
|
40
|
-
|
|
41
|
-
products: Array<GroupCreateResponse.Product>;
|
|
42
|
-
|
|
43
|
-
status: boolean;
|
|
44
|
-
|
|
45
|
-
group_name?: string | null;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export namespace GroupCreateResponse {
|
|
49
|
-
export interface Product {
|
|
50
|
-
id: string;
|
|
51
|
-
|
|
52
|
-
addons_count: number;
|
|
53
|
-
|
|
54
|
-
files_count: number;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Whether this product has any credit entitlements attached
|
|
58
|
-
*/
|
|
59
|
-
has_credit_entitlements: boolean;
|
|
60
|
-
|
|
61
|
-
is_recurring: boolean;
|
|
62
|
-
|
|
63
|
-
license_key_enabled: boolean;
|
|
64
|
-
|
|
65
|
-
meters_count: number;
|
|
66
|
-
|
|
67
|
-
product_id: string;
|
|
68
|
-
|
|
69
|
-
status: boolean;
|
|
70
|
-
|
|
71
|
-
currency?: MiscAPI.Currency | null;
|
|
72
|
-
|
|
73
|
-
description?: string | null;
|
|
74
|
-
|
|
75
|
-
name?: string | null;
|
|
76
|
-
|
|
77
|
-
price?: number | null;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* One-time price details.
|
|
81
|
-
*/
|
|
82
|
-
price_detail?: ProductsAPI.Price | null;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Represents the different categories of taxation applicable to various products
|
|
86
|
-
* and services.
|
|
87
|
-
*/
|
|
88
|
-
tax_category?: MiscAPI.TaxCategory | null;
|
|
89
|
-
|
|
90
|
-
tax_inclusive?: boolean | null;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface GroupCreateParams {
|
|
95
|
-
/**
|
|
96
|
-
* Products in this group
|
|
97
|
-
*/
|
|
98
|
-
products: Array<GroupCreateParams.Product>;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Optional group name. Multiple groups can have null names, but named groups must
|
|
102
|
-
* be unique per collection
|
|
103
|
-
*/
|
|
104
|
-
group_name?: string | null;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Status of the group (defaults to true if not provided)
|
|
108
|
-
*/
|
|
109
|
-
status?: boolean | null;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
export namespace GroupCreateParams {
|
|
113
|
-
export interface Product {
|
|
114
|
-
/**
|
|
115
|
-
* Product ID to include in the group
|
|
116
|
-
*/
|
|
117
|
-
product_id: string;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Status of the product in this group (defaults to true if not provided)
|
|
121
|
-
*/
|
|
122
|
-
status?: boolean | null;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export interface GroupUpdateParams {
|
|
127
|
-
/**
|
|
128
|
-
* Path param: Product Collection Id
|
|
129
|
-
*/
|
|
130
|
-
id: string;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Body param: Optional group name update: Some(Some(name)) = set name, Some(None)
|
|
134
|
-
* = clear name, None = no change
|
|
135
|
-
*/
|
|
136
|
-
group_name?: string | null;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Body param: Optional new order for products in this group (array of
|
|
140
|
-
* product_collection_group_pdts UUIDs)
|
|
141
|
-
*/
|
|
142
|
-
product_order?: Array<string> | null;
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Body param: Optional status update
|
|
146
|
-
*/
|
|
147
|
-
status?: boolean | null;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export interface GroupDeleteParams {
|
|
151
|
-
/**
|
|
152
|
-
* Product Collection Id
|
|
153
|
-
*/
|
|
154
|
-
id: string;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
Groups.Items = Items;
|
|
158
|
-
|
|
159
|
-
export declare namespace Groups {
|
|
160
|
-
export {
|
|
161
|
-
type GroupCreateResponse as GroupCreateResponse,
|
|
162
|
-
type GroupCreateParams as GroupCreateParams,
|
|
163
|
-
type GroupUpdateParams as GroupUpdateParams,
|
|
164
|
-
type GroupDeleteParams as GroupDeleteParams,
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
export {
|
|
168
|
-
Items as Items,
|
|
169
|
-
type ItemCreateResponse as ItemCreateResponse,
|
|
170
|
-
type ItemCreateParams as ItemCreateParams,
|
|
171
|
-
type ItemUpdateParams as ItemUpdateParams,
|
|
172
|
-
type ItemDeleteParams as ItemDeleteParams,
|
|
173
|
-
};
|
|
174
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
Groups,
|
|
5
|
-
type GroupCreateResponse,
|
|
6
|
-
type GroupCreateParams,
|
|
7
|
-
type GroupUpdateParams,
|
|
8
|
-
type GroupDeleteParams,
|
|
9
|
-
} from './groups';
|
|
10
|
-
export {
|
|
11
|
-
Items,
|
|
12
|
-
type ItemCreateResponse,
|
|
13
|
-
type ItemCreateParams,
|
|
14
|
-
type ItemUpdateParams,
|
|
15
|
-
type ItemDeleteParams,
|
|
16
|
-
} from './items';
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import * as MiscAPI from '../../misc';
|
|
5
|
-
import * as ProductsAPI from '../../products/products';
|
|
6
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
7
|
-
import { buildHeaders } from '../../../internal/headers';
|
|
8
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
9
|
-
import { path } from '../../../internal/utils/path';
|
|
10
|
-
|
|
11
|
-
export class Items extends APIResource {
|
|
12
|
-
create(
|
|
13
|
-
groupID: string,
|
|
14
|
-
params: ItemCreateParams,
|
|
15
|
-
options?: RequestOptions,
|
|
16
|
-
): APIPromise<ItemCreateResponse> {
|
|
17
|
-
const { id, ...body } = params;
|
|
18
|
-
return this._client.post(path`/product-collections/${id}/groups/${groupID}/items`, { body, ...options });
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
update(itemID: string, params: ItemUpdateParams, options?: RequestOptions): APIPromise<void> {
|
|
22
|
-
const { id, group_id, ...body } = params;
|
|
23
|
-
return this._client.patch(path`/product-collections/${id}/groups/${group_id}/items/${itemID}`, {
|
|
24
|
-
body,
|
|
25
|
-
...options,
|
|
26
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
delete(itemID: string, params: ItemDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
31
|
-
const { id, group_id } = params;
|
|
32
|
-
return this._client.delete(path`/product-collections/${id}/groups/${group_id}/items/${itemID}`, {
|
|
33
|
-
...options,
|
|
34
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export type ItemCreateResponse = Array<ItemCreateResponse.ItemCreateResponseItem>;
|
|
40
|
-
|
|
41
|
-
export namespace ItemCreateResponse {
|
|
42
|
-
export interface ItemCreateResponseItem {
|
|
43
|
-
id: string;
|
|
44
|
-
|
|
45
|
-
addons_count: number;
|
|
46
|
-
|
|
47
|
-
files_count: number;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Whether this product has any credit entitlements attached
|
|
51
|
-
*/
|
|
52
|
-
has_credit_entitlements: boolean;
|
|
53
|
-
|
|
54
|
-
is_recurring: boolean;
|
|
55
|
-
|
|
56
|
-
license_key_enabled: boolean;
|
|
57
|
-
|
|
58
|
-
meters_count: number;
|
|
59
|
-
|
|
60
|
-
product_id: string;
|
|
61
|
-
|
|
62
|
-
status: boolean;
|
|
63
|
-
|
|
64
|
-
currency?: MiscAPI.Currency | null;
|
|
65
|
-
|
|
66
|
-
description?: string | null;
|
|
67
|
-
|
|
68
|
-
name?: string | null;
|
|
69
|
-
|
|
70
|
-
price?: number | null;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* One-time price details.
|
|
74
|
-
*/
|
|
75
|
-
price_detail?: ProductsAPI.Price | null;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Represents the different categories of taxation applicable to various products
|
|
79
|
-
* and services.
|
|
80
|
-
*/
|
|
81
|
-
tax_category?: MiscAPI.TaxCategory | null;
|
|
82
|
-
|
|
83
|
-
tax_inclusive?: boolean | null;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export interface ItemCreateParams {
|
|
88
|
-
/**
|
|
89
|
-
* Path param: Product Collection Id
|
|
90
|
-
*/
|
|
91
|
-
id: string;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Body param: Products to add to the group
|
|
95
|
-
*/
|
|
96
|
-
products: Array<ItemCreateParams.Product>;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export namespace ItemCreateParams {
|
|
100
|
-
export interface Product {
|
|
101
|
-
/**
|
|
102
|
-
* Product ID to include in the group
|
|
103
|
-
*/
|
|
104
|
-
product_id: string;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Status of the product in this group (defaults to true if not provided)
|
|
108
|
-
*/
|
|
109
|
-
status?: boolean | null;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export interface ItemUpdateParams {
|
|
114
|
-
/**
|
|
115
|
-
* Path param: Product Collection Id
|
|
116
|
-
*/
|
|
117
|
-
id: string;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Path param: Product Collection Group Id
|
|
121
|
-
*/
|
|
122
|
-
group_id: string;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Body param: Status of the product in the group
|
|
126
|
-
*/
|
|
127
|
-
status: boolean;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export interface ItemDeleteParams {
|
|
131
|
-
/**
|
|
132
|
-
* Product Collection Id
|
|
133
|
-
*/
|
|
134
|
-
id: string;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Product Collection Group Id
|
|
138
|
-
*/
|
|
139
|
-
group_id: string;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export declare namespace Items {
|
|
143
|
-
export {
|
|
144
|
-
type ItemCreateResponse as ItemCreateResponse,
|
|
145
|
-
type ItemCreateParams as ItemCreateParams,
|
|
146
|
-
type ItemUpdateParams as ItemUpdateParams,
|
|
147
|
-
type ItemDeleteParams as ItemDeleteParams,
|
|
148
|
-
};
|
|
149
|
-
}
|