@deeprelay/sdk 0.4.2 → 0.4.4
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/README.md +2 -2
- package/dist/apis/BillingApi.d.ts +4 -4
- package/dist/apis/BillingApi.js +4 -4
- package/dist/esm/apis/BillingApi.d.ts +4 -4
- package/dist/esm/apis/BillingApi.js +4 -4
- package/dist/esm/models/Problem.d.ts +1 -0
- package/dist/esm/models/Problem.js +1 -0
- package/dist/esm/models/RefereeStatus.d.ts +33 -4
- package/dist/esm/models/RefereeStatus.js +15 -1
- package/dist/esm/models/Referral.d.ts +10 -3
- package/dist/esm/models/Referral.js +2 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/models/Problem.d.ts +1 -0
- package/dist/models/Problem.js +1 -0
- package/dist/models/RefereeStatus.d.ts +33 -4
- package/dist/models/RefereeStatus.js +16 -2
- package/dist/models/Referral.d.ts +10 -3
- package/dist/models/Referral.js +2 -0
- package/dist/runtime.js +1 -1
- package/docs/BillingApi.md +2 -2
- package/docs/RefereeStatus.md +6 -0
- package/docs/Referral.md +2 -0
- package/package.json +1 -1
- package/src/apis/BillingApi.ts +4 -4
- package/src/models/Problem.ts +1 -0
- package/src/models/RefereeStatus.ts +41 -5
- package/src/models/Referral.ts +12 -3
- package/src/runtime.ts +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @deeprelay/sdk@0.4.
|
|
1
|
+
# @deeprelay/sdk@0.4.4
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the api.deeprelay.ai API.
|
|
4
4
|
|
|
@@ -194,7 +194,7 @@ and is automatically generated by the
|
|
|
194
194
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
195
195
|
|
|
196
196
|
- API version: `1.0.0`
|
|
197
|
-
- Package version: `0.4.
|
|
197
|
+
- Package version: `0.4.4`
|
|
198
198
|
- Generator version: `7.24.0`
|
|
199
199
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
200
200
|
|
|
@@ -64,12 +64,12 @@ export declare class BillingApi extends runtime.BaseAPI {
|
|
|
64
64
|
*/
|
|
65
65
|
createSubscriptionCheckoutRequestOpts(requestParameters: CreateSubscriptionCheckoutRequest): Promise<runtime.RequestOpts>;
|
|
66
66
|
/**
|
|
67
|
-
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses.
|
|
67
|
+
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses. While new payments are paused on the organization after several declined cards, a new checkout (a switch included) is refused with 429 `checkout_paused` and a Retry-After; renewing a plan billed through the previous payment account is never refused.
|
|
68
68
|
* Start a subscription checkout session
|
|
69
69
|
*/
|
|
70
70
|
createSubscriptionCheckoutRaw(requestParameters: CreateSubscriptionCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionCheckoutSession>>;
|
|
71
71
|
/**
|
|
72
|
-
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses.
|
|
72
|
+
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses. While new payments are paused on the organization after several declined cards, a new checkout (a switch included) is refused with 429 `checkout_paused` and a Retry-After; renewing a plan billed through the previous payment account is never refused.
|
|
73
73
|
* Start a subscription checkout session
|
|
74
74
|
*/
|
|
75
75
|
createSubscriptionCheckout(requestParameters?: CreateSubscriptionCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionCheckoutSession>;
|
|
@@ -134,12 +134,12 @@ export declare class BillingApi extends runtime.BaseAPI {
|
|
|
134
134
|
*/
|
|
135
135
|
getReferralRequestOpts(): Promise<runtime.RequestOpts>;
|
|
136
136
|
/**
|
|
137
|
-
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link;
|
|
137
|
+
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link; once a friend who signed up through it has made `qualify_deposit_cents` of net real deposits (card, auto-pay or crypto, less refunds), the referrer receives `reward_cents` and the friend receives `referee_reward_cents`, both as non-withdrawable credit, after a `hold_days` chargeback hold. Both rewards are reversed if the qualifying deposit is later refunded. The deposit commission is retired and `commission_pct` is 0; when it is non-zero the referrer also earns that percent of every real deposit the friend makes. `commission_earned_cents` still reports commission earned before retirement. Program rewards never apply to the subscription. The terms ride on the wire so a client never hard-codes the amounts. `referred` is ABSENT (not null) for an organization nobody referred — key on its presence. This is the same contract the dashboard\'s referral card reads.
|
|
138
138
|
* Get the org referral code, invite link, terms and stats
|
|
139
139
|
*/
|
|
140
140
|
getReferralRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Referral>>;
|
|
141
141
|
/**
|
|
142
|
-
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link;
|
|
142
|
+
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link; once a friend who signed up through it has made `qualify_deposit_cents` of net real deposits (card, auto-pay or crypto, less refunds), the referrer receives `reward_cents` and the friend receives `referee_reward_cents`, both as non-withdrawable credit, after a `hold_days` chargeback hold. Both rewards are reversed if the qualifying deposit is later refunded. The deposit commission is retired and `commission_pct` is 0; when it is non-zero the referrer also earns that percent of every real deposit the friend makes. `commission_earned_cents` still reports commission earned before retirement. Program rewards never apply to the subscription. The terms ride on the wire so a client never hard-codes the amounts. `referred` is ABSENT (not null) for an organization nobody referred — key on its presence. This is the same contract the dashboard\'s referral card reads.
|
|
143
143
|
* Get the org referral code, invite link, terms and stats
|
|
144
144
|
*/
|
|
145
145
|
getReferral(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Referral>;
|
package/dist/apis/BillingApi.js
CHANGED
|
@@ -116,7 +116,7 @@ class BillingApi extends runtime.BaseAPI {
|
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
119
|
-
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses.
|
|
119
|
+
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses. While new payments are paused on the organization after several declined cards, a new checkout (a switch included) is refused with 429 `checkout_paused` and a Retry-After; renewing a plan billed through the previous payment account is never refused.
|
|
120
120
|
* Start a subscription checkout session
|
|
121
121
|
*/
|
|
122
122
|
createSubscriptionCheckoutRaw(requestParameters, initOverrides) {
|
|
@@ -127,7 +127,7 @@ class BillingApi extends runtime.BaseAPI {
|
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
/**
|
|
130
|
-
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses.
|
|
130
|
+
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses. While new payments are paused on the organization after several declined cards, a new checkout (a switch included) is refused with 429 `checkout_paused` and a Retry-After; renewing a plan billed through the previous payment account is never refused.
|
|
131
131
|
* Start a subscription checkout session
|
|
132
132
|
*/
|
|
133
133
|
createSubscriptionCheckout() {
|
|
@@ -341,7 +341,7 @@ class BillingApi extends runtime.BaseAPI {
|
|
|
341
341
|
});
|
|
342
342
|
}
|
|
343
343
|
/**
|
|
344
|
-
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link;
|
|
344
|
+
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link; once a friend who signed up through it has made `qualify_deposit_cents` of net real deposits (card, auto-pay or crypto, less refunds), the referrer receives `reward_cents` and the friend receives `referee_reward_cents`, both as non-withdrawable credit, after a `hold_days` chargeback hold. Both rewards are reversed if the qualifying deposit is later refunded. The deposit commission is retired and `commission_pct` is 0; when it is non-zero the referrer also earns that percent of every real deposit the friend makes. `commission_earned_cents` still reports commission earned before retirement. Program rewards never apply to the subscription. The terms ride on the wire so a client never hard-codes the amounts. `referred` is ABSENT (not null) for an organization nobody referred — key on its presence. This is the same contract the dashboard\'s referral card reads.
|
|
345
345
|
* Get the org referral code, invite link, terms and stats
|
|
346
346
|
*/
|
|
347
347
|
getReferralRaw(initOverrides) {
|
|
@@ -352,7 +352,7 @@ class BillingApi extends runtime.BaseAPI {
|
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
354
|
/**
|
|
355
|
-
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link;
|
|
355
|
+
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link; once a friend who signed up through it has made `qualify_deposit_cents` of net real deposits (card, auto-pay or crypto, less refunds), the referrer receives `reward_cents` and the friend receives `referee_reward_cents`, both as non-withdrawable credit, after a `hold_days` chargeback hold. Both rewards are reversed if the qualifying deposit is later refunded. The deposit commission is retired and `commission_pct` is 0; when it is non-zero the referrer also earns that percent of every real deposit the friend makes. `commission_earned_cents` still reports commission earned before retirement. Program rewards never apply to the subscription. The terms ride on the wire so a client never hard-codes the amounts. `referred` is ABSENT (not null) for an organization nobody referred — key on its presence. This is the same contract the dashboard\'s referral card reads.
|
|
356
356
|
* Get the org referral code, invite link, terms and stats
|
|
357
357
|
*/
|
|
358
358
|
getReferral(initOverrides) {
|
|
@@ -64,12 +64,12 @@ export declare class BillingApi extends runtime.BaseAPI {
|
|
|
64
64
|
*/
|
|
65
65
|
createSubscriptionCheckoutRequestOpts(requestParameters: CreateSubscriptionCheckoutRequest): Promise<runtime.RequestOpts>;
|
|
66
66
|
/**
|
|
67
|
-
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses.
|
|
67
|
+
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses. While new payments are paused on the organization after several declined cards, a new checkout (a switch included) is refused with 429 `checkout_paused` and a Retry-After; renewing a plan billed through the previous payment account is never refused.
|
|
68
68
|
* Start a subscription checkout session
|
|
69
69
|
*/
|
|
70
70
|
createSubscriptionCheckoutRaw(requestParameters: CreateSubscriptionCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionCheckoutSession>>;
|
|
71
71
|
/**
|
|
72
|
-
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses.
|
|
72
|
+
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses. While new payments are paused on the organization after several declined cards, a new checkout (a switch included) is refused with 429 `checkout_paused` and a Retry-After; renewing a plan billed through the previous payment account is never refused.
|
|
73
73
|
* Start a subscription checkout session
|
|
74
74
|
*/
|
|
75
75
|
createSubscriptionCheckout(requestParameters?: CreateSubscriptionCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionCheckoutSession>;
|
|
@@ -134,12 +134,12 @@ export declare class BillingApi extends runtime.BaseAPI {
|
|
|
134
134
|
*/
|
|
135
135
|
getReferralRequestOpts(): Promise<runtime.RequestOpts>;
|
|
136
136
|
/**
|
|
137
|
-
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link;
|
|
137
|
+
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link; once a friend who signed up through it has made `qualify_deposit_cents` of net real deposits (card, auto-pay or crypto, less refunds), the referrer receives `reward_cents` and the friend receives `referee_reward_cents`, both as non-withdrawable credit, after a `hold_days` chargeback hold. Both rewards are reversed if the qualifying deposit is later refunded. The deposit commission is retired and `commission_pct` is 0; when it is non-zero the referrer also earns that percent of every real deposit the friend makes. `commission_earned_cents` still reports commission earned before retirement. Program rewards never apply to the subscription. The terms ride on the wire so a client never hard-codes the amounts. `referred` is ABSENT (not null) for an organization nobody referred — key on its presence. This is the same contract the dashboard\'s referral card reads.
|
|
138
138
|
* Get the org referral code, invite link, terms and stats
|
|
139
139
|
*/
|
|
140
140
|
getReferralRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Referral>>;
|
|
141
141
|
/**
|
|
142
|
-
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link;
|
|
142
|
+
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link; once a friend who signed up through it has made `qualify_deposit_cents` of net real deposits (card, auto-pay or crypto, less refunds), the referrer receives `reward_cents` and the friend receives `referee_reward_cents`, both as non-withdrawable credit, after a `hold_days` chargeback hold. Both rewards are reversed if the qualifying deposit is later refunded. The deposit commission is retired and `commission_pct` is 0; when it is non-zero the referrer also earns that percent of every real deposit the friend makes. `commission_earned_cents` still reports commission earned before retirement. Program rewards never apply to the subscription. The terms ride on the wire so a client never hard-codes the amounts. `referred` is ABSENT (not null) for an organization nobody referred — key on its presence. This is the same contract the dashboard\'s referral card reads.
|
|
143
143
|
* Get the org referral code, invite link, terms and stats
|
|
144
144
|
*/
|
|
145
145
|
getReferral(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Referral>;
|
|
@@ -113,7 +113,7 @@ export class BillingApi extends runtime.BaseAPI {
|
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
|
-
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses.
|
|
116
|
+
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses. While new payments are paused on the organization after several declined cards, a new checkout (a switch included) is refused with 429 `checkout_paused` and a Retry-After; renewing a plan billed through the previous payment account is never refused.
|
|
117
117
|
* Start a subscription checkout session
|
|
118
118
|
*/
|
|
119
119
|
createSubscriptionCheckoutRaw(requestParameters, initOverrides) {
|
|
@@ -124,7 +124,7 @@ export class BillingApi extends runtime.BaseAPI {
|
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
|
-
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses.
|
|
127
|
+
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses. While new payments are paused on the organization after several declined cards, a new checkout (a switch included) is refused with 429 `checkout_paused` and a Retry-After; renewing a plan billed through the previous payment account is never refused.
|
|
128
128
|
* Start a subscription checkout session
|
|
129
129
|
*/
|
|
130
130
|
createSubscriptionCheckout() {
|
|
@@ -338,7 +338,7 @@ export class BillingApi extends runtime.BaseAPI {
|
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
340
|
/**
|
|
341
|
-
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link;
|
|
341
|
+
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link; once a friend who signed up through it has made `qualify_deposit_cents` of net real deposits (card, auto-pay or crypto, less refunds), the referrer receives `reward_cents` and the friend receives `referee_reward_cents`, both as non-withdrawable credit, after a `hold_days` chargeback hold. Both rewards are reversed if the qualifying deposit is later refunded. The deposit commission is retired and `commission_pct` is 0; when it is non-zero the referrer also earns that percent of every real deposit the friend makes. `commission_earned_cents` still reports commission earned before retirement. Program rewards never apply to the subscription. The terms ride on the wire so a client never hard-codes the amounts. `referred` is ABSENT (not null) for an organization nobody referred — key on its presence. This is the same contract the dashboard\'s referral card reads.
|
|
342
342
|
* Get the org referral code, invite link, terms and stats
|
|
343
343
|
*/
|
|
344
344
|
getReferralRaw(initOverrides) {
|
|
@@ -349,7 +349,7 @@ export class BillingApi extends runtime.BaseAPI {
|
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
351
|
/**
|
|
352
|
-
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link;
|
|
352
|
+
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link; once a friend who signed up through it has made `qualify_deposit_cents` of net real deposits (card, auto-pay or crypto, less refunds), the referrer receives `reward_cents` and the friend receives `referee_reward_cents`, both as non-withdrawable credit, after a `hold_days` chargeback hold. Both rewards are reversed if the qualifying deposit is later refunded. The deposit commission is retired and `commission_pct` is 0; when it is non-zero the referrer also earns that percent of every real deposit the friend makes. `commission_earned_cents` still reports commission earned before retirement. Program rewards never apply to the subscription. The terms ride on the wire so a client never hard-codes the amounts. `referred` is ABSENT (not null) for an organization nobody referred — key on its presence. This is the same contract the dashboard\'s referral card reads.
|
|
353
353
|
* Get the org referral code, invite link, terms and stats
|
|
354
354
|
*/
|
|
355
355
|
getReferral(initOverrides) {
|
|
@@ -94,6 +94,7 @@ export declare const ProblemCodeEnum: {
|
|
|
94
94
|
readonly ModelNotAllowedForKey: "model_not_allowed_for_key";
|
|
95
95
|
readonly CreatorCheckUnavailable: "creator_check_unavailable";
|
|
96
96
|
readonly SwitchRenewalUnpaid: "switch_renewal_unpaid";
|
|
97
|
+
readonly CheckoutPaused: "checkout_paused";
|
|
97
98
|
readonly InternalError: "internal_error";
|
|
98
99
|
readonly OperationFailed: "operation_failed";
|
|
99
100
|
};
|
|
@@ -41,6 +41,7 @@ export const ProblemCodeEnum = {
|
|
|
41
41
|
ModelNotAllowedForKey: 'model_not_allowed_for_key',
|
|
42
42
|
CreatorCheckUnavailable: 'creator_check_unavailable',
|
|
43
43
|
SwitchRenewalUnpaid: 'switch_renewal_unpaid',
|
|
44
|
+
CheckoutPaused: 'checkout_paused',
|
|
44
45
|
InternalError: 'internal_error',
|
|
45
46
|
OperationFailed: 'operation_failed'
|
|
46
47
|
};
|
|
@@ -17,21 +17,41 @@
|
|
|
17
17
|
*/
|
|
18
18
|
export interface RefereeStatus {
|
|
19
19
|
/**
|
|
20
|
-
* Lifecycle state. `pending` until the
|
|
20
|
+
* Lifecycle state. `pending` until the gate is met; `qualified` inside the hold; `settled` once paid; `reversed` when the qualifying deposit was refunded after payout and both rewards were taken back.
|
|
21
21
|
* @type {RefereeStatusStatusEnum}
|
|
22
22
|
* @memberof RefereeStatus
|
|
23
23
|
*/
|
|
24
24
|
status: RefereeStatusStatusEnum;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* What qualifies this referral. `deposit` (net real deposits) for current referrals; `spend` (inference usage) for referrals made under the earlier program, which keep their original terms.
|
|
27
|
+
* @type {RefereeStatusGateEnum}
|
|
28
|
+
* @memberof RefereeStatus
|
|
29
|
+
*/
|
|
30
|
+
gate?: RefereeStatusGateEnum;
|
|
31
|
+
/**
|
|
32
|
+
* Progress toward the gate so far — net deposits for `deposit`, inference spend for `spend`.
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof RefereeStatus
|
|
35
|
+
*/
|
|
36
|
+
progressCents?: number;
|
|
37
|
+
/**
|
|
38
|
+
* The amount that qualifies the referral.
|
|
27
39
|
* @type {number}
|
|
28
40
|
* @memberof RefereeStatus
|
|
29
41
|
*/
|
|
42
|
+
goalCents?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Deprecated alias of `progress_cents`.
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof RefereeStatus
|
|
47
|
+
* @deprecated
|
|
48
|
+
*/
|
|
30
49
|
spentCents: number;
|
|
31
50
|
/**
|
|
32
|
-
*
|
|
51
|
+
* Deprecated alias of `goal_cents`.
|
|
33
52
|
* @type {number}
|
|
34
53
|
* @memberof RefereeStatus
|
|
54
|
+
* @deprecated
|
|
35
55
|
*/
|
|
36
56
|
qualifySpendCents: number;
|
|
37
57
|
/**
|
|
@@ -41,7 +61,7 @@ export interface RefereeStatus {
|
|
|
41
61
|
*/
|
|
42
62
|
rewardCents: number;
|
|
43
63
|
/**
|
|
44
|
-
* When the
|
|
64
|
+
* When the gate was met. Absent while pending.
|
|
45
65
|
* @type {Date}
|
|
46
66
|
* @memberof RefereeStatus
|
|
47
67
|
*/
|
|
@@ -67,8 +87,17 @@ export declare const RefereeStatusStatusEnum: {
|
|
|
67
87
|
readonly Qualified: "qualified";
|
|
68
88
|
readonly Settled: "settled";
|
|
69
89
|
readonly Rejected: "rejected";
|
|
90
|
+
readonly Reversed: "reversed";
|
|
70
91
|
};
|
|
71
92
|
export type RefereeStatusStatusEnum = typeof RefereeStatusStatusEnum[keyof typeof RefereeStatusStatusEnum];
|
|
93
|
+
/**
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
export declare const RefereeStatusGateEnum: {
|
|
97
|
+
readonly Deposit: "deposit";
|
|
98
|
+
readonly Spend: "spend";
|
|
99
|
+
};
|
|
100
|
+
export type RefereeStatusGateEnum = typeof RefereeStatusGateEnum[keyof typeof RefereeStatusGateEnum];
|
|
72
101
|
/**
|
|
73
102
|
* Check if a given object implements the RefereeStatus interface.
|
|
74
103
|
*/
|
|
@@ -18,7 +18,15 @@ export const RefereeStatusStatusEnum = {
|
|
|
18
18
|
Pending: 'pending',
|
|
19
19
|
Qualified: 'qualified',
|
|
20
20
|
Settled: 'settled',
|
|
21
|
-
Rejected: 'rejected'
|
|
21
|
+
Rejected: 'rejected',
|
|
22
|
+
Reversed: 'reversed'
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* @export
|
|
26
|
+
*/
|
|
27
|
+
export const RefereeStatusGateEnum = {
|
|
28
|
+
Deposit: 'deposit',
|
|
29
|
+
Spend: 'spend'
|
|
22
30
|
};
|
|
23
31
|
/**
|
|
24
32
|
* Check if a given object implements the RefereeStatus interface.
|
|
@@ -43,6 +51,9 @@ export function RefereeStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
43
51
|
}
|
|
44
52
|
return {
|
|
45
53
|
'status': json['status'],
|
|
54
|
+
'gate': json['gate'] == null ? undefined : json['gate'],
|
|
55
|
+
'progressCents': json['progress_cents'] == null ? undefined : json['progress_cents'],
|
|
56
|
+
'goalCents': json['goal_cents'] == null ? undefined : json['goal_cents'],
|
|
46
57
|
'spentCents': json['spent_cents'],
|
|
47
58
|
'qualifySpendCents': json['qualify_spend_cents'],
|
|
48
59
|
'rewardCents': json['reward_cents'],
|
|
@@ -60,6 +71,9 @@ export function RefereeStatusToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
60
71
|
}
|
|
61
72
|
return {
|
|
62
73
|
'status': value['status'],
|
|
74
|
+
'gate': value['gate'],
|
|
75
|
+
'progress_cents': value['progressCents'],
|
|
76
|
+
'goal_cents': value['goalCents'],
|
|
63
77
|
'spent_cents': value['spentCents'],
|
|
64
78
|
'qualify_spend_cents': value['qualifySpendCents'],
|
|
65
79
|
'reward_cents': value['rewardCents'],
|
|
@@ -30,13 +30,13 @@ export interface Referral {
|
|
|
30
30
|
*/
|
|
31
31
|
inviteUrl: string;
|
|
32
32
|
/**
|
|
33
|
-
* Friends who signed up through the link but have not yet reached the
|
|
33
|
+
* Friends who signed up through the link but have not yet reached the qualifying deposit.
|
|
34
34
|
* @type {number}
|
|
35
35
|
* @memberof Referral
|
|
36
36
|
*/
|
|
37
37
|
pending: number;
|
|
38
38
|
/**
|
|
39
|
-
* Friends past the
|
|
39
|
+
* Friends past the qualifying deposit whose reward is inside the chargeback hold.
|
|
40
40
|
* @type {number}
|
|
41
41
|
* @memberof Referral
|
|
42
42
|
*/
|
|
@@ -72,10 +72,17 @@ export interface Referral {
|
|
|
72
72
|
*/
|
|
73
73
|
refereeRewardCents: number;
|
|
74
74
|
/**
|
|
75
|
-
* The friend's cumulative
|
|
75
|
+
* The friend's cumulative net real deposits (card, auto-pay and crypto, less refunds) that qualify a referral.
|
|
76
76
|
* @type {number}
|
|
77
77
|
* @memberof Referral
|
|
78
78
|
*/
|
|
79
|
+
qualifyDepositCents?: number;
|
|
80
|
+
/**
|
|
81
|
+
* Deprecated — referrals now qualify on deposits. Mirrors `qualify_deposit_cents`.
|
|
82
|
+
* @type {number}
|
|
83
|
+
* @memberof Referral
|
|
84
|
+
* @deprecated
|
|
85
|
+
*/
|
|
79
86
|
qualifySpendCents: number;
|
|
80
87
|
/**
|
|
81
88
|
* Days between qualification and payout (chargeback hold).
|
|
@@ -59,6 +59,7 @@ export function ReferralFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
59
59
|
'commissionEarnedCents': json['commission_earned_cents'],
|
|
60
60
|
'rewardCents': json['reward_cents'],
|
|
61
61
|
'refereeRewardCents': json['referee_reward_cents'],
|
|
62
|
+
'qualifyDepositCents': json['qualify_deposit_cents'] == null ? undefined : json['qualify_deposit_cents'],
|
|
62
63
|
'qualifySpendCents': json['qualify_spend_cents'],
|
|
63
64
|
'holdDays': json['hold_days'],
|
|
64
65
|
'commissionPct': json['commission_pct'],
|
|
@@ -82,6 +83,7 @@ export function ReferralToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
82
83
|
'commission_earned_cents': value['commissionEarnedCents'],
|
|
83
84
|
'reward_cents': value['rewardCents'],
|
|
84
85
|
'referee_reward_cents': value['refereeRewardCents'],
|
|
86
|
+
'qualify_deposit_cents': value['qualifyDepositCents'],
|
|
85
87
|
'qualify_spend_cents': value['qualifySpendCents'],
|
|
86
88
|
'hold_days': value['holdDays'],
|
|
87
89
|
'commission_pct': value['commissionPct'],
|
package/dist/esm/runtime.js
CHANGED
|
@@ -61,7 +61,7 @@ export class Configuration {
|
|
|
61
61
|
return undefined;
|
|
62
62
|
}
|
|
63
63
|
get headers() {
|
|
64
|
-
return Object.assign({ 'User-Agent': 'deeprelay-sdk-ts/0.4.
|
|
64
|
+
return Object.assign({ 'User-Agent': 'deeprelay-sdk-ts/0.4.4' }, this.configuration.headers);
|
|
65
65
|
}
|
|
66
66
|
get credentials() {
|
|
67
67
|
return this.configuration.credentials;
|
package/dist/models/Problem.d.ts
CHANGED
|
@@ -94,6 +94,7 @@ export declare const ProblemCodeEnum: {
|
|
|
94
94
|
readonly ModelNotAllowedForKey: "model_not_allowed_for_key";
|
|
95
95
|
readonly CreatorCheckUnavailable: "creator_check_unavailable";
|
|
96
96
|
readonly SwitchRenewalUnpaid: "switch_renewal_unpaid";
|
|
97
|
+
readonly CheckoutPaused: "checkout_paused";
|
|
97
98
|
readonly InternalError: "internal_error";
|
|
98
99
|
readonly OperationFailed: "operation_failed";
|
|
99
100
|
};
|
package/dist/models/Problem.js
CHANGED
|
@@ -49,6 +49,7 @@ exports.ProblemCodeEnum = {
|
|
|
49
49
|
ModelNotAllowedForKey: 'model_not_allowed_for_key',
|
|
50
50
|
CreatorCheckUnavailable: 'creator_check_unavailable',
|
|
51
51
|
SwitchRenewalUnpaid: 'switch_renewal_unpaid',
|
|
52
|
+
CheckoutPaused: 'checkout_paused',
|
|
52
53
|
InternalError: 'internal_error',
|
|
53
54
|
OperationFailed: 'operation_failed'
|
|
54
55
|
};
|
|
@@ -17,21 +17,41 @@
|
|
|
17
17
|
*/
|
|
18
18
|
export interface RefereeStatus {
|
|
19
19
|
/**
|
|
20
|
-
* Lifecycle state. `pending` until the
|
|
20
|
+
* Lifecycle state. `pending` until the gate is met; `qualified` inside the hold; `settled` once paid; `reversed` when the qualifying deposit was refunded after payout and both rewards were taken back.
|
|
21
21
|
* @type {RefereeStatusStatusEnum}
|
|
22
22
|
* @memberof RefereeStatus
|
|
23
23
|
*/
|
|
24
24
|
status: RefereeStatusStatusEnum;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* What qualifies this referral. `deposit` (net real deposits) for current referrals; `spend` (inference usage) for referrals made under the earlier program, which keep their original terms.
|
|
27
|
+
* @type {RefereeStatusGateEnum}
|
|
28
|
+
* @memberof RefereeStatus
|
|
29
|
+
*/
|
|
30
|
+
gate?: RefereeStatusGateEnum;
|
|
31
|
+
/**
|
|
32
|
+
* Progress toward the gate so far — net deposits for `deposit`, inference spend for `spend`.
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof RefereeStatus
|
|
35
|
+
*/
|
|
36
|
+
progressCents?: number;
|
|
37
|
+
/**
|
|
38
|
+
* The amount that qualifies the referral.
|
|
27
39
|
* @type {number}
|
|
28
40
|
* @memberof RefereeStatus
|
|
29
41
|
*/
|
|
42
|
+
goalCents?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Deprecated alias of `progress_cents`.
|
|
45
|
+
* @type {number}
|
|
46
|
+
* @memberof RefereeStatus
|
|
47
|
+
* @deprecated
|
|
48
|
+
*/
|
|
30
49
|
spentCents: number;
|
|
31
50
|
/**
|
|
32
|
-
*
|
|
51
|
+
* Deprecated alias of `goal_cents`.
|
|
33
52
|
* @type {number}
|
|
34
53
|
* @memberof RefereeStatus
|
|
54
|
+
* @deprecated
|
|
35
55
|
*/
|
|
36
56
|
qualifySpendCents: number;
|
|
37
57
|
/**
|
|
@@ -41,7 +61,7 @@ export interface RefereeStatus {
|
|
|
41
61
|
*/
|
|
42
62
|
rewardCents: number;
|
|
43
63
|
/**
|
|
44
|
-
* When the
|
|
64
|
+
* When the gate was met. Absent while pending.
|
|
45
65
|
* @type {Date}
|
|
46
66
|
* @memberof RefereeStatus
|
|
47
67
|
*/
|
|
@@ -67,8 +87,17 @@ export declare const RefereeStatusStatusEnum: {
|
|
|
67
87
|
readonly Qualified: "qualified";
|
|
68
88
|
readonly Settled: "settled";
|
|
69
89
|
readonly Rejected: "rejected";
|
|
90
|
+
readonly Reversed: "reversed";
|
|
70
91
|
};
|
|
71
92
|
export type RefereeStatusStatusEnum = typeof RefereeStatusStatusEnum[keyof typeof RefereeStatusStatusEnum];
|
|
93
|
+
/**
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
export declare const RefereeStatusGateEnum: {
|
|
97
|
+
readonly Deposit: "deposit";
|
|
98
|
+
readonly Spend: "spend";
|
|
99
|
+
};
|
|
100
|
+
export type RefereeStatusGateEnum = typeof RefereeStatusGateEnum[keyof typeof RefereeStatusGateEnum];
|
|
72
101
|
/**
|
|
73
102
|
* Check if a given object implements the RefereeStatus interface.
|
|
74
103
|
*/
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.RefereeStatusStatusEnum = void 0;
|
|
16
|
+
exports.RefereeStatusGateEnum = exports.RefereeStatusStatusEnum = void 0;
|
|
17
17
|
exports.instanceOfRefereeStatus = instanceOfRefereeStatus;
|
|
18
18
|
exports.RefereeStatusFromJSON = RefereeStatusFromJSON;
|
|
19
19
|
exports.RefereeStatusFromJSONTyped = RefereeStatusFromJSONTyped;
|
|
@@ -26,7 +26,15 @@ exports.RefereeStatusStatusEnum = {
|
|
|
26
26
|
Pending: 'pending',
|
|
27
27
|
Qualified: 'qualified',
|
|
28
28
|
Settled: 'settled',
|
|
29
|
-
Rejected: 'rejected'
|
|
29
|
+
Rejected: 'rejected',
|
|
30
|
+
Reversed: 'reversed'
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
exports.RefereeStatusGateEnum = {
|
|
36
|
+
Deposit: 'deposit',
|
|
37
|
+
Spend: 'spend'
|
|
30
38
|
};
|
|
31
39
|
/**
|
|
32
40
|
* Check if a given object implements the RefereeStatus interface.
|
|
@@ -51,6 +59,9 @@ function RefereeStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
59
|
}
|
|
52
60
|
return {
|
|
53
61
|
'status': json['status'],
|
|
62
|
+
'gate': json['gate'] == null ? undefined : json['gate'],
|
|
63
|
+
'progressCents': json['progress_cents'] == null ? undefined : json['progress_cents'],
|
|
64
|
+
'goalCents': json['goal_cents'] == null ? undefined : json['goal_cents'],
|
|
54
65
|
'spentCents': json['spent_cents'],
|
|
55
66
|
'qualifySpendCents': json['qualify_spend_cents'],
|
|
56
67
|
'rewardCents': json['reward_cents'],
|
|
@@ -68,6 +79,9 @@ function RefereeStatusToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
68
79
|
}
|
|
69
80
|
return {
|
|
70
81
|
'status': value['status'],
|
|
82
|
+
'gate': value['gate'],
|
|
83
|
+
'progress_cents': value['progressCents'],
|
|
84
|
+
'goal_cents': value['goalCents'],
|
|
71
85
|
'spent_cents': value['spentCents'],
|
|
72
86
|
'qualify_spend_cents': value['qualifySpendCents'],
|
|
73
87
|
'reward_cents': value['rewardCents'],
|
|
@@ -30,13 +30,13 @@ export interface Referral {
|
|
|
30
30
|
*/
|
|
31
31
|
inviteUrl: string;
|
|
32
32
|
/**
|
|
33
|
-
* Friends who signed up through the link but have not yet reached the
|
|
33
|
+
* Friends who signed up through the link but have not yet reached the qualifying deposit.
|
|
34
34
|
* @type {number}
|
|
35
35
|
* @memberof Referral
|
|
36
36
|
*/
|
|
37
37
|
pending: number;
|
|
38
38
|
/**
|
|
39
|
-
* Friends past the
|
|
39
|
+
* Friends past the qualifying deposit whose reward is inside the chargeback hold.
|
|
40
40
|
* @type {number}
|
|
41
41
|
* @memberof Referral
|
|
42
42
|
*/
|
|
@@ -72,10 +72,17 @@ export interface Referral {
|
|
|
72
72
|
*/
|
|
73
73
|
refereeRewardCents: number;
|
|
74
74
|
/**
|
|
75
|
-
* The friend's cumulative
|
|
75
|
+
* The friend's cumulative net real deposits (card, auto-pay and crypto, less refunds) that qualify a referral.
|
|
76
76
|
* @type {number}
|
|
77
77
|
* @memberof Referral
|
|
78
78
|
*/
|
|
79
|
+
qualifyDepositCents?: number;
|
|
80
|
+
/**
|
|
81
|
+
* Deprecated — referrals now qualify on deposits. Mirrors `qualify_deposit_cents`.
|
|
82
|
+
* @type {number}
|
|
83
|
+
* @memberof Referral
|
|
84
|
+
* @deprecated
|
|
85
|
+
*/
|
|
79
86
|
qualifySpendCents: number;
|
|
80
87
|
/**
|
|
81
88
|
* Days between qualification and payout (chargeback hold).
|
package/dist/models/Referral.js
CHANGED
|
@@ -66,6 +66,7 @@ function ReferralFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
66
66
|
'commissionEarnedCents': json['commission_earned_cents'],
|
|
67
67
|
'rewardCents': json['reward_cents'],
|
|
68
68
|
'refereeRewardCents': json['referee_reward_cents'],
|
|
69
|
+
'qualifyDepositCents': json['qualify_deposit_cents'] == null ? undefined : json['qualify_deposit_cents'],
|
|
69
70
|
'qualifySpendCents': json['qualify_spend_cents'],
|
|
70
71
|
'holdDays': json['hold_days'],
|
|
71
72
|
'commissionPct': json['commission_pct'],
|
|
@@ -89,6 +90,7 @@ function ReferralToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
89
90
|
'commission_earned_cents': value['commissionEarnedCents'],
|
|
90
91
|
'reward_cents': value['rewardCents'],
|
|
91
92
|
'referee_reward_cents': value['refereeRewardCents'],
|
|
93
|
+
'qualify_deposit_cents': value['qualifyDepositCents'],
|
|
92
94
|
'qualify_spend_cents': value['qualifySpendCents'],
|
|
93
95
|
'hold_days': value['holdDays'],
|
|
94
96
|
'commission_pct': value['commissionPct'],
|
package/dist/runtime.js
CHANGED
|
@@ -69,7 +69,7 @@ class Configuration {
|
|
|
69
69
|
return undefined;
|
|
70
70
|
}
|
|
71
71
|
get headers() {
|
|
72
|
-
return Object.assign({ 'User-Agent': 'deeprelay-sdk-ts/0.4.
|
|
72
|
+
return Object.assign({ 'User-Agent': 'deeprelay-sdk-ts/0.4.4' }, this.configuration.headers);
|
|
73
73
|
}
|
|
74
74
|
get credentials() {
|
|
75
75
|
return this.configuration.credentials;
|
package/docs/BillingApi.md
CHANGED
|
@@ -102,7 +102,7 @@ example().catch(console.error);
|
|
|
102
102
|
|
|
103
103
|
Start a subscription checkout session
|
|
104
104
|
|
|
105
|
-
Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses.
|
|
105
|
+
Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses. While new payments are paused on the organization after several declined cards, a new checkout (a switch included) is refused with 429 `checkout_paused` and a Retry-After; renewing a plan billed through the previous payment account is never refused.
|
|
106
106
|
|
|
107
107
|
### Example
|
|
108
108
|
|
|
@@ -460,7 +460,7 @@ example().catch(console.error);
|
|
|
460
460
|
|
|
461
461
|
Get the org referral code, invite link, terms and stats
|
|
462
462
|
|
|
463
|
-
Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link;
|
|
463
|
+
Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link; once a friend who signed up through it has made `qualify_deposit_cents` of net real deposits (card, auto-pay or crypto, less refunds), the referrer receives `reward_cents` and the friend receives `referee_reward_cents`, both as non-withdrawable credit, after a `hold_days` chargeback hold. Both rewards are reversed if the qualifying deposit is later refunded. The deposit commission is retired and `commission_pct` is 0; when it is non-zero the referrer also earns that percent of every real deposit the friend makes. `commission_earned_cents` still reports commission earned before retirement. Program rewards never apply to the subscription. The terms ride on the wire so a client never hard-codes the amounts. `referred` is ABSENT (not null) for an organization nobody referred — key on its presence. This is the same contract the dashboard\'s referral card reads.
|
|
464
464
|
|
|
465
465
|
### Example
|
|
466
466
|
|
package/docs/RefereeStatus.md
CHANGED
|
@@ -8,6 +8,9 @@ Present only when the organization signed up through someone else\'s invite link
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`status` | string
|
|
11
|
+
`gate` | string
|
|
12
|
+
`progressCents` | number
|
|
13
|
+
`goalCents` | number
|
|
11
14
|
`spentCents` | number
|
|
12
15
|
`qualifySpendCents` | number
|
|
13
16
|
`rewardCents` | number
|
|
@@ -23,6 +26,9 @@ import type { RefereeStatus } from '@deeprelay/sdk'
|
|
|
23
26
|
// TODO: Update the object below with actual values
|
|
24
27
|
const example = {
|
|
25
28
|
"status": null,
|
|
29
|
+
"gate": null,
|
|
30
|
+
"progressCents": null,
|
|
31
|
+
"goalCents": null,
|
|
26
32
|
"spentCents": null,
|
|
27
33
|
"qualifySpendCents": null,
|
|
28
34
|
"rewardCents": null,
|
package/docs/Referral.md
CHANGED
|
@@ -16,6 +16,7 @@ Name | Type
|
|
|
16
16
|
`commissionEarnedCents` | number
|
|
17
17
|
`rewardCents` | number
|
|
18
18
|
`refereeRewardCents` | number
|
|
19
|
+
`qualifyDepositCents` | number
|
|
19
20
|
`qualifySpendCents` | number
|
|
20
21
|
`holdDays` | number
|
|
21
22
|
`commissionPct` | number
|
|
@@ -37,6 +38,7 @@ const example = {
|
|
|
37
38
|
"commissionEarnedCents": null,
|
|
38
39
|
"rewardCents": null,
|
|
39
40
|
"refereeRewardCents": null,
|
|
41
|
+
"qualifyDepositCents": null,
|
|
40
42
|
"qualifySpendCents": null,
|
|
41
43
|
"holdDays": null,
|
|
42
44
|
"commissionPct": null,
|
package/package.json
CHANGED
package/src/apis/BillingApi.ts
CHANGED
|
@@ -201,7 +201,7 @@ export class BillingApi extends runtime.BaseAPI {
|
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
/**
|
|
204
|
-
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses.
|
|
204
|
+
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses. While new payments are paused on the organization after several declined cards, a new checkout (a switch included) is refused with 429 `checkout_paused` and a Retry-After; renewing a plan billed through the previous payment account is never refused.
|
|
205
205
|
* Start a subscription checkout session
|
|
206
206
|
*/
|
|
207
207
|
async createSubscriptionCheckoutRaw(requestParameters: CreateSubscriptionCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionCheckoutSession>> {
|
|
@@ -212,7 +212,7 @@ export class BillingApi extends runtime.BaseAPI {
|
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
|
-
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses.
|
|
215
|
+
* Opens a hosted checkout session for a subscription plan and returns its URL. Requires the `billing:write` scope AND organization-admin privileges — subscribing spends organization money. This endpoint does NOT subscribe anyone. Checkout is a hosted page that needs a browser and a card, so the caller\'s job is to put the returned URL in front of a human. The subscription becomes active when payment completes, which is not synchronous with this call: poll `/billing/subscription` to confirm. `success_url` and `cancel_url` are optional and fall back to the deployment\'s configured redirects, which is what lets a command-line client start a purchase without having any URLs of its own. An empty request body is valid and means \"use every default\". When sent, they must be on the deployment\'s dashboard origin, else 422 `validation_failed`. `plan_key` names the plan to buy: `flat` (Base, the default when the field is omitted) or `plus`. It pins the plan the client DISPLAYED — an unknown key, or a plan this deployment does not offer, is a 400 rather than a silent purchase of a different tier. The `plans` array on `/billing/subscription` lists the accepted keys. One subscription per organization: a second checkout while an entitling subscription exists is a 409. To move an existing subscription to a bigger plan use `/billing/subscription/upgrade`. `method` picks how the plan is paid: `card` (dollars, card or Link; the default) or `upi` (rupees, UPI AutoPay, India). On an organization that already subscribes, an explicit `method` in the other currency is a switch, not a second subscription: the link saves the new card or UPI AutoPay mandate (nothing is charged), and once that completes the same plan is moved to the new currency, first charged on the current renewal date (that month is already paid). The answer then carries `switch_to` and `first_charge_at`. A switch is refused (409) within two days of renewal, while the plan is set to cancel, while an upgrade waits on its UPI payment, and in the currency the plan already uses. While new payments are paused on the organization after several declined cards, a new checkout (a switch included) is refused with 429 `checkout_paused` and a Retry-After; renewing a plan billed through the previous payment account is never refused.
|
|
216
216
|
* Start a subscription checkout session
|
|
217
217
|
*/
|
|
218
218
|
async createSubscriptionCheckout(requestParameters: CreateSubscriptionCheckoutRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionCheckoutSession> {
|
|
@@ -446,7 +446,7 @@ export class BillingApi extends runtime.BaseAPI {
|
|
|
446
446
|
}
|
|
447
447
|
|
|
448
448
|
/**
|
|
449
|
-
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link;
|
|
449
|
+
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link; once a friend who signed up through it has made `qualify_deposit_cents` of net real deposits (card, auto-pay or crypto, less refunds), the referrer receives `reward_cents` and the friend receives `referee_reward_cents`, both as non-withdrawable credit, after a `hold_days` chargeback hold. Both rewards are reversed if the qualifying deposit is later refunded. The deposit commission is retired and `commission_pct` is 0; when it is non-zero the referrer also earns that percent of every real deposit the friend makes. `commission_earned_cents` still reports commission earned before retirement. Program rewards never apply to the subscription. The terms ride on the wire so a client never hard-codes the amounts. `referred` is ABSENT (not null) for an organization nobody referred — key on its presence. This is the same contract the dashboard\'s referral card reads.
|
|
450
450
|
* Get the org referral code, invite link, terms and stats
|
|
451
451
|
*/
|
|
452
452
|
async getReferralRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Referral>> {
|
|
@@ -457,7 +457,7 @@ export class BillingApi extends runtime.BaseAPI {
|
|
|
457
457
|
}
|
|
458
458
|
|
|
459
459
|
/**
|
|
460
|
-
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link;
|
|
460
|
+
* Returns the organization\'s shareable referral code and invite link (minting the code on first read), the program terms, the referrer\'s stats, and — when this organization itself signed up through someone else\'s link — its own progress toward the referee reward. Requires the `billing:read` scope. The organization is taken from the authenticated API key, never from a parameter. The program: share the invite link; once a friend who signed up through it has made `qualify_deposit_cents` of net real deposits (card, auto-pay or crypto, less refunds), the referrer receives `reward_cents` and the friend receives `referee_reward_cents`, both as non-withdrawable credit, after a `hold_days` chargeback hold. Both rewards are reversed if the qualifying deposit is later refunded. The deposit commission is retired and `commission_pct` is 0; when it is non-zero the referrer also earns that percent of every real deposit the friend makes. `commission_earned_cents` still reports commission earned before retirement. Program rewards never apply to the subscription. The terms ride on the wire so a client never hard-codes the amounts. `referred` is ABSENT (not null) for an organization nobody referred — key on its presence. This is the same contract the dashboard\'s referral card reads.
|
|
461
461
|
* Get the org referral code, invite link, terms and stats
|
|
462
462
|
*/
|
|
463
463
|
async getReferral(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Referral> {
|
package/src/models/Problem.ts
CHANGED
|
@@ -100,6 +100,7 @@ export const ProblemCodeEnum = {
|
|
|
100
100
|
ModelNotAllowedForKey: 'model_not_allowed_for_key',
|
|
101
101
|
CreatorCheckUnavailable: 'creator_check_unavailable',
|
|
102
102
|
SwitchRenewalUnpaid: 'switch_renewal_unpaid',
|
|
103
|
+
CheckoutPaused: 'checkout_paused',
|
|
103
104
|
InternalError: 'internal_error',
|
|
104
105
|
OperationFailed: 'operation_failed'
|
|
105
106
|
} as const;
|
|
@@ -21,21 +21,41 @@ import { mapValues } from '../runtime';
|
|
|
21
21
|
*/
|
|
22
22
|
export interface RefereeStatus {
|
|
23
23
|
/**
|
|
24
|
-
* Lifecycle state. `pending` until the
|
|
24
|
+
* Lifecycle state. `pending` until the gate is met; `qualified` inside the hold; `settled` once paid; `reversed` when the qualifying deposit was refunded after payout and both rewards were taken back.
|
|
25
25
|
* @type {RefereeStatusStatusEnum}
|
|
26
26
|
* @memberof RefereeStatus
|
|
27
27
|
*/
|
|
28
28
|
status: RefereeStatusStatusEnum;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* What qualifies this referral. `deposit` (net real deposits) for current referrals; `spend` (inference usage) for referrals made under the earlier program, which keep their original terms.
|
|
31
|
+
* @type {RefereeStatusGateEnum}
|
|
32
|
+
* @memberof RefereeStatus
|
|
33
|
+
*/
|
|
34
|
+
gate?: RefereeStatusGateEnum;
|
|
35
|
+
/**
|
|
36
|
+
* Progress toward the gate so far — net deposits for `deposit`, inference spend for `spend`.
|
|
37
|
+
* @type {number}
|
|
38
|
+
* @memberof RefereeStatus
|
|
39
|
+
*/
|
|
40
|
+
progressCents?: number;
|
|
41
|
+
/**
|
|
42
|
+
* The amount that qualifies the referral.
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof RefereeStatus
|
|
45
|
+
*/
|
|
46
|
+
goalCents?: number;
|
|
47
|
+
/**
|
|
48
|
+
* Deprecated alias of `progress_cents`.
|
|
31
49
|
* @type {number}
|
|
32
50
|
* @memberof RefereeStatus
|
|
51
|
+
* @deprecated
|
|
33
52
|
*/
|
|
34
53
|
spentCents: number;
|
|
35
54
|
/**
|
|
36
|
-
*
|
|
55
|
+
* Deprecated alias of `goal_cents`.
|
|
37
56
|
* @type {number}
|
|
38
57
|
* @memberof RefereeStatus
|
|
58
|
+
* @deprecated
|
|
39
59
|
*/
|
|
40
60
|
qualifySpendCents: number;
|
|
41
61
|
/**
|
|
@@ -45,7 +65,7 @@ export interface RefereeStatus {
|
|
|
45
65
|
*/
|
|
46
66
|
rewardCents: number;
|
|
47
67
|
/**
|
|
48
|
-
* When the
|
|
68
|
+
* When the gate was met. Absent while pending.
|
|
49
69
|
* @type {Date}
|
|
50
70
|
* @memberof RefereeStatus
|
|
51
71
|
*/
|
|
@@ -72,10 +92,20 @@ export const RefereeStatusStatusEnum = {
|
|
|
72
92
|
Pending: 'pending',
|
|
73
93
|
Qualified: 'qualified',
|
|
74
94
|
Settled: 'settled',
|
|
75
|
-
Rejected: 'rejected'
|
|
95
|
+
Rejected: 'rejected',
|
|
96
|
+
Reversed: 'reversed'
|
|
76
97
|
} as const;
|
|
77
98
|
export type RefereeStatusStatusEnum = typeof RefereeStatusStatusEnum[keyof typeof RefereeStatusStatusEnum];
|
|
78
99
|
|
|
100
|
+
/**
|
|
101
|
+
* @export
|
|
102
|
+
*/
|
|
103
|
+
export const RefereeStatusGateEnum = {
|
|
104
|
+
Deposit: 'deposit',
|
|
105
|
+
Spend: 'spend'
|
|
106
|
+
} as const;
|
|
107
|
+
export type RefereeStatusGateEnum = typeof RefereeStatusGateEnum[keyof typeof RefereeStatusGateEnum];
|
|
108
|
+
|
|
79
109
|
|
|
80
110
|
/**
|
|
81
111
|
* Check if a given object implements the RefereeStatus interface.
|
|
@@ -99,6 +129,9 @@ export function RefereeStatusFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
99
129
|
return {
|
|
100
130
|
|
|
101
131
|
'status': json['status'],
|
|
132
|
+
'gate': json['gate'] == null ? undefined : json['gate'],
|
|
133
|
+
'progressCents': json['progress_cents'] == null ? undefined : json['progress_cents'],
|
|
134
|
+
'goalCents': json['goal_cents'] == null ? undefined : json['goal_cents'],
|
|
102
135
|
'spentCents': json['spent_cents'],
|
|
103
136
|
'qualifySpendCents': json['qualify_spend_cents'],
|
|
104
137
|
'rewardCents': json['reward_cents'],
|
|
@@ -120,6 +153,9 @@ export function RefereeStatusToJSONTyped(value?: RefereeStatus | null, ignoreDis
|
|
|
120
153
|
return {
|
|
121
154
|
|
|
122
155
|
'status': value['status'],
|
|
156
|
+
'gate': value['gate'],
|
|
157
|
+
'progress_cents': value['progressCents'],
|
|
158
|
+
'goal_cents': value['goalCents'],
|
|
123
159
|
'spent_cents': value['spentCents'],
|
|
124
160
|
'qualify_spend_cents': value['qualifySpendCents'],
|
|
125
161
|
'reward_cents': value['rewardCents'],
|
package/src/models/Referral.ts
CHANGED
|
@@ -41,13 +41,13 @@ export interface Referral {
|
|
|
41
41
|
*/
|
|
42
42
|
inviteUrl: string;
|
|
43
43
|
/**
|
|
44
|
-
* Friends who signed up through the link but have not yet reached the
|
|
44
|
+
* Friends who signed up through the link but have not yet reached the qualifying deposit.
|
|
45
45
|
* @type {number}
|
|
46
46
|
* @memberof Referral
|
|
47
47
|
*/
|
|
48
48
|
pending: number;
|
|
49
49
|
/**
|
|
50
|
-
* Friends past the
|
|
50
|
+
* Friends past the qualifying deposit whose reward is inside the chargeback hold.
|
|
51
51
|
* @type {number}
|
|
52
52
|
* @memberof Referral
|
|
53
53
|
*/
|
|
@@ -83,10 +83,17 @@ export interface Referral {
|
|
|
83
83
|
*/
|
|
84
84
|
refereeRewardCents: number;
|
|
85
85
|
/**
|
|
86
|
-
* The friend's cumulative
|
|
86
|
+
* The friend's cumulative net real deposits (card, auto-pay and crypto, less refunds) that qualify a referral.
|
|
87
87
|
* @type {number}
|
|
88
88
|
* @memberof Referral
|
|
89
89
|
*/
|
|
90
|
+
qualifyDepositCents?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Deprecated — referrals now qualify on deposits. Mirrors `qualify_deposit_cents`.
|
|
93
|
+
* @type {number}
|
|
94
|
+
* @memberof Referral
|
|
95
|
+
* @deprecated
|
|
96
|
+
*/
|
|
90
97
|
qualifySpendCents: number;
|
|
91
98
|
/**
|
|
92
99
|
* Days between qualification and payout (chargeback hold).
|
|
@@ -146,6 +153,7 @@ export function ReferralFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
146
153
|
'commissionEarnedCents': json['commission_earned_cents'],
|
|
147
154
|
'rewardCents': json['reward_cents'],
|
|
148
155
|
'refereeRewardCents': json['referee_reward_cents'],
|
|
156
|
+
'qualifyDepositCents': json['qualify_deposit_cents'] == null ? undefined : json['qualify_deposit_cents'],
|
|
149
157
|
'qualifySpendCents': json['qualify_spend_cents'],
|
|
150
158
|
'holdDays': json['hold_days'],
|
|
151
159
|
'commissionPct': json['commission_pct'],
|
|
@@ -173,6 +181,7 @@ export function ReferralToJSONTyped(value?: Referral | null, ignoreDiscriminator
|
|
|
173
181
|
'commission_earned_cents': value['commissionEarnedCents'],
|
|
174
182
|
'reward_cents': value['rewardCents'],
|
|
175
183
|
'referee_reward_cents': value['refereeRewardCents'],
|
|
184
|
+
'qualify_deposit_cents': value['qualifyDepositCents'],
|
|
176
185
|
'qualify_spend_cents': value['qualifySpendCents'],
|
|
177
186
|
'hold_days': value['holdDays'],
|
|
178
187
|
'commission_pct': value['commissionPct'],
|
package/src/runtime.ts
CHANGED
|
@@ -75,7 +75,7 @@ export class Configuration {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
get headers(): HTTPHeaders | undefined {
|
|
78
|
-
return { 'User-Agent': 'deeprelay-sdk-ts/0.4.
|
|
78
|
+
return { 'User-Agent': 'deeprelay-sdk-ts/0.4.4', ...this.configuration.headers };
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
get credentials(): RequestCredentials | undefined {
|