zorihq 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/resources/v1/index.d.mts +1 -1
- package/resources/v1/index.d.ts +1 -1
- package/resources/v1/index.js +4 -4
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +1 -1
- package/resources/v1/payment-providers/index.d.mts +3 -0
- package/resources/v1/payment-providers/index.d.mts.map +1 -0
- package/resources/v1/payment-providers/index.d.ts +3 -0
- package/resources/v1/payment-providers/index.d.ts.map +1 -0
- package/resources/v1/payment-providers/index.js +9 -0
- package/resources/v1/payment-providers/index.js.map +1 -0
- package/resources/v1/payment-providers/index.mjs +4 -0
- package/resources/v1/payment-providers/index.mjs.map +1 -0
- package/resources/v1/payment-providers/payment-providers.d.mts +154 -0
- package/resources/v1/payment-providers/payment-providers.d.mts.map +1 -0
- package/resources/v1/payment-providers/payment-providers.d.ts +154 -0
- package/resources/v1/payment-providers/payment-providers.d.ts.map +1 -0
- package/resources/v1/payment-providers/payment-providers.js +98 -0
- package/resources/v1/payment-providers/payment-providers.js.map +1 -0
- package/resources/v1/payment-providers/payment-providers.mjs +93 -0
- package/resources/v1/payment-providers/payment-providers.mjs.map +1 -0
- package/resources/v1/payment-providers/stripe/app.d.mts +39 -0
- package/resources/v1/payment-providers/stripe/app.d.mts.map +1 -0
- package/resources/v1/payment-providers/stripe/app.d.ts +39 -0
- package/resources/v1/payment-providers/stripe/app.d.ts.map +1 -0
- package/resources/v1/payment-providers/stripe/app.js +24 -0
- package/resources/v1/payment-providers/stripe/app.js.map +1 -0
- package/resources/v1/payment-providers/stripe/app.mjs +20 -0
- package/resources/v1/payment-providers/stripe/app.mjs.map +1 -0
- package/resources/v1/payment-providers/stripe/index.d.mts +3 -0
- package/resources/v1/payment-providers/stripe/index.d.mts.map +1 -0
- package/resources/v1/payment-providers/stripe/index.d.ts +3 -0
- package/resources/v1/payment-providers/stripe/index.d.ts.map +1 -0
- package/resources/v1/payment-providers/stripe/index.js +9 -0
- package/resources/v1/payment-providers/stripe/index.js.map +1 -0
- package/resources/v1/payment-providers/stripe/index.mjs +4 -0
- package/resources/v1/payment-providers/stripe/index.mjs.map +1 -0
- package/resources/v1/payment-providers/stripe/stripe.d.mts +10 -0
- package/resources/v1/payment-providers/stripe/stripe.d.mts.map +1 -0
- package/resources/v1/payment-providers/stripe/stripe.d.ts +10 -0
- package/resources/v1/payment-providers/stripe/stripe.d.ts.map +1 -0
- package/resources/v1/payment-providers/stripe/stripe.js +17 -0
- package/resources/v1/payment-providers/stripe/stripe.js.map +1 -0
- package/resources/v1/payment-providers/stripe/stripe.mjs +12 -0
- package/resources/v1/payment-providers/stripe/stripe.mjs.map +1 -0
- package/resources/v1/payment-providers/stripe.d.mts +2 -0
- package/resources/v1/payment-providers/stripe.d.mts.map +1 -0
- package/resources/v1/payment-providers/stripe.d.ts +2 -0
- package/resources/v1/payment-providers/stripe.d.ts.map +1 -0
- package/resources/v1/payment-providers/stripe.js +6 -0
- package/resources/v1/payment-providers/stripe.js.map +1 -0
- package/resources/v1/payment-providers/stripe.mjs +3 -0
- package/resources/v1/payment-providers/stripe.mjs.map +1 -0
- package/resources/v1/payment-providers.d.mts +1 -149
- package/resources/v1/payment-providers.d.mts.map +1 -1
- package/resources/v1/payment-providers.d.ts +1 -149
- package/resources/v1/payment-providers.d.ts.map +1 -1
- package/resources/v1/payment-providers.js +2 -86
- package/resources/v1/payment-providers.js.map +1 -1
- package/resources/v1/payment-providers.mjs +1 -84
- package/resources/v1/payment-providers.mjs.map +1 -1
- package/resources/v1/revenue/cohort.d.mts +84 -0
- package/resources/v1/revenue/cohort.d.mts.map +1 -0
- package/resources/v1/revenue/cohort.d.ts +84 -0
- package/resources/v1/revenue/cohort.d.ts.map +1 -0
- package/resources/v1/revenue/cohort.js +24 -0
- package/resources/v1/revenue/cohort.js.map +1 -0
- package/resources/v1/revenue/cohort.mjs +20 -0
- package/resources/v1/revenue/cohort.mjs.map +1 -0
- package/resources/v1/revenue/index.d.mts +1 -0
- package/resources/v1/revenue/index.d.mts.map +1 -1
- package/resources/v1/revenue/index.d.ts +1 -0
- package/resources/v1/revenue/index.d.ts.map +1 -1
- package/resources/v1/revenue/index.js +3 -1
- package/resources/v1/revenue/index.js.map +1 -1
- package/resources/v1/revenue/index.mjs +1 -0
- package/resources/v1/revenue/index.mjs.map +1 -1
- package/resources/v1/revenue/revenue.d.mts +15 -0
- package/resources/v1/revenue/revenue.d.mts.map +1 -1
- package/resources/v1/revenue/revenue.d.ts +15 -0
- package/resources/v1/revenue/revenue.d.ts.map +1 -1
- package/resources/v1/revenue/revenue.js +4 -0
- package/resources/v1/revenue/revenue.js.map +1 -1
- package/resources/v1/revenue/revenue.mjs +4 -0
- package/resources/v1/revenue/revenue.mjs.map +1 -1
- package/resources/v1/v1.d.mts +2 -2
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +2 -2
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +2 -2
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +2 -2
- package/resources/v1/v1.mjs.map +1 -1
- package/src/resources/v1/index.ts +1 -1
- package/src/resources/v1/payment-providers/index.ts +17 -0
- package/src/resources/v1/payment-providers/payment-providers.ts +238 -0
- package/src/resources/v1/payment-providers/stripe/app.ts +56 -0
- package/src/resources/v1/payment-providers/stripe/index.ts +4 -0
- package/src/resources/v1/payment-providers/stripe/stripe.ts +19 -0
- package/src/resources/v1/payment-providers/stripe.ts +3 -0
- package/src/resources/v1/payment-providers.ts +1 -228
- package/src/resources/v1/revenue/cohort.ts +111 -0
- package/src/resources/v1/revenue/index.ts +1 -0
- package/src/resources/v1/revenue/revenue.ts +23 -0
- package/src/resources/v1/v1.ts +15 -15
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.11.1 (2025-11-02)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.11.0...v0.11.1](https://github.com/ZoriHQ/typescript-api-sdk/compare/v0.11.0...v0.11.1)
|
|
6
|
+
|
|
3
7
|
## 0.11.0 (2025-10-30)
|
|
4
8
|
|
|
5
9
|
Full Changelog: [v0.10.1...v0.11.0](https://github.com/ZoriHQ/typescript-api-sdk/compare/v0.10.1...v0.11.0)
|
package/package.json
CHANGED
package/resources/v1/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Analytics, type ActiveUsersResponse, type BounceRateByPageMetric, type BounceRateResponse, type ChurnRateResponse, type CohortAnalysisResponse, type CohortData, type CountryDataPoint, type DashboardMetricsResponse, type EventFilterOptionsResponse, type EventsOverTimeDataPoint, type ManualIdentifyRequest, type ManualIdentifyResponse, type OriginDataPoint, type RecentEvent, type RecentEventsResponse, type ReturnRateResponse, type SessionMetricsResponse, type TopVisitor, type TopVisitorsResponse, type UniqueVisitorsDataPoint, type UniqueVisitorsTimelineResponse, type VisitorDataPoint, type VisitorEvent, type VisitorProfileResponse, type VisitorsByCountryResponse, type VisitorsByDeviceResponse, type VisitorsByOriginResponse, type AnalyticsDashboardParams, } from "./analytics/index.mjs";
|
|
2
2
|
export { Auth, type LoginRequest, type LoginResponse, type AuthLoginParams } from "./auth.mjs";
|
|
3
|
-
export { PaymentProviders, type CreatePaymentProviderRequest, type ListPaymentProvidersResponse, type PaymentProviderResponse, type ProviderField, type ProviderInstructionsResponse, type UpdatePaymentProviderRequest, type PaymentProviderDeleteResponse, type PaymentProviderCreateParams, type PaymentProviderUpdateParams, type PaymentProviderListParams, type PaymentProviderInstructionsParams, } from "./payment-providers.mjs";
|
|
3
|
+
export { PaymentProviders, type CreatePaymentProviderRequest, type ListPaymentProvidersResponse, type PaymentProviderResponse, type ProviderField, type ProviderInstructionsResponse, type UpdatePaymentProviderRequest, type PaymentProviderDeleteResponse, type PaymentProviderCreateParams, type PaymentProviderUpdateParams, type PaymentProviderListParams, type PaymentProviderInstructionsParams, } from "./payment-providers/index.mjs";
|
|
4
4
|
export { Projects, type CreateProjectRequest, type ListProjectsResponse, type Project, type ProjectResponse, type UpdateProjectRequest, type ProjectDeleteResponse, type ProjectCreateParams, type ProjectUpdateParams, } from "./projects.mjs";
|
|
5
5
|
export { Revenue, type AttributionByOriginResponse, type AttributionByUtmResponse, type ConversionMetricsResponse, type CustomerProfileResponse, type DashboardResponse, type OriginAttributionDataPoint, type Payment, type RevenueOverTimeDataPoint, type TimelineDataPoint, type TimelineResponse, type TopCustomer, type TopCustomersResponse, type UtmAttributionDataPoint, type RevenueDashboardParams, type RevenueTimelineParams, } from "./revenue/index.mjs";
|
|
6
6
|
export { V1 } from "./v1.mjs";
|
package/resources/v1/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Analytics, type ActiveUsersResponse, type BounceRateByPageMetric, type BounceRateResponse, type ChurnRateResponse, type CohortAnalysisResponse, type CohortData, type CountryDataPoint, type DashboardMetricsResponse, type EventFilterOptionsResponse, type EventsOverTimeDataPoint, type ManualIdentifyRequest, type ManualIdentifyResponse, type OriginDataPoint, type RecentEvent, type RecentEventsResponse, type ReturnRateResponse, type SessionMetricsResponse, type TopVisitor, type TopVisitorsResponse, type UniqueVisitorsDataPoint, type UniqueVisitorsTimelineResponse, type VisitorDataPoint, type VisitorEvent, type VisitorProfileResponse, type VisitorsByCountryResponse, type VisitorsByDeviceResponse, type VisitorsByOriginResponse, type AnalyticsDashboardParams, } from "./analytics/index.js";
|
|
2
2
|
export { Auth, type LoginRequest, type LoginResponse, type AuthLoginParams } from "./auth.js";
|
|
3
|
-
export { PaymentProviders, type CreatePaymentProviderRequest, type ListPaymentProvidersResponse, type PaymentProviderResponse, type ProviderField, type ProviderInstructionsResponse, type UpdatePaymentProviderRequest, type PaymentProviderDeleteResponse, type PaymentProviderCreateParams, type PaymentProviderUpdateParams, type PaymentProviderListParams, type PaymentProviderInstructionsParams, } from "./payment-providers.js";
|
|
3
|
+
export { PaymentProviders, type CreatePaymentProviderRequest, type ListPaymentProvidersResponse, type PaymentProviderResponse, type ProviderField, type ProviderInstructionsResponse, type UpdatePaymentProviderRequest, type PaymentProviderDeleteResponse, type PaymentProviderCreateParams, type PaymentProviderUpdateParams, type PaymentProviderListParams, type PaymentProviderInstructionsParams, } from "./payment-providers/index.js";
|
|
4
4
|
export { Projects, type CreateProjectRequest, type ListProjectsResponse, type Project, type ProjectResponse, type UpdateProjectRequest, type ProjectDeleteResponse, type ProjectCreateParams, type ProjectUpdateParams, } from "./projects.js";
|
|
5
5
|
export { Revenue, type AttributionByOriginResponse, type AttributionByUtmResponse, type ConversionMetricsResponse, type CustomerProfileResponse, type DashboardResponse, type OriginAttributionDataPoint, type Payment, type RevenueOverTimeDataPoint, type TimelineDataPoint, type TimelineResponse, type TopCustomer, type TopCustomersResponse, type UtmAttributionDataPoint, type RevenueDashboardParams, type RevenueTimelineParams, } from "./revenue/index.js";
|
|
6
6
|
export { V1 } from "./v1.js";
|
package/resources/v1/index.js
CHANGED
|
@@ -6,12 +6,12 @@ var index_1 = require("./analytics/index.js");
|
|
|
6
6
|
Object.defineProperty(exports, "Analytics", { enumerable: true, get: function () { return index_1.Analytics; } });
|
|
7
7
|
var auth_1 = require("./auth.js");
|
|
8
8
|
Object.defineProperty(exports, "Auth", { enumerable: true, get: function () { return auth_1.Auth; } });
|
|
9
|
-
var
|
|
10
|
-
Object.defineProperty(exports, "PaymentProviders", { enumerable: true, get: function () { return
|
|
9
|
+
var index_2 = require("./payment-providers/index.js");
|
|
10
|
+
Object.defineProperty(exports, "PaymentProviders", { enumerable: true, get: function () { return index_2.PaymentProviders; } });
|
|
11
11
|
var projects_1 = require("./projects.js");
|
|
12
12
|
Object.defineProperty(exports, "Projects", { enumerable: true, get: function () { return projects_1.Projects; } });
|
|
13
|
-
var
|
|
14
|
-
Object.defineProperty(exports, "Revenue", { enumerable: true, get: function () { return
|
|
13
|
+
var index_3 = require("./revenue/index.js");
|
|
14
|
+
Object.defineProperty(exports, "Revenue", { enumerable: true, get: function () { return index_3.Revenue; } });
|
|
15
15
|
var v1_1 = require("./v1.js");
|
|
16
16
|
Object.defineProperty(exports, "V1", { enumerable: true, get: function () { return v1_1.V1; } });
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/v1/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8CA8B2B;AA7BzB,kGAAA,SAAS,OAAA;AA8BX,kCAA2F;AAAlF,4FAAA,IAAI,OAAA;AACb,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/v1/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8CA8B2B;AA7BzB,kGAAA,SAAS,OAAA;AA8BX,kCAA2F;AAAlF,4FAAA,IAAI,OAAA;AACb,sDAamC;AAZjC,yGAAA,gBAAgB,OAAA;AAalB,0CAUoB;AATlB,oGAAA,QAAQ,OAAA;AAUV,4CAiByB;AAhBvB,gGAAA,OAAO,OAAA;AAiBT,8BAA0B;AAAjB,wFAAA,EAAE,OAAA"}
|
package/resources/v1/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
export { Analytics, } from "./analytics/index.mjs";
|
|
3
3
|
export { Auth } from "./auth.mjs";
|
|
4
|
-
export { PaymentProviders, } from "./payment-providers.mjs";
|
|
4
|
+
export { PaymentProviders, } from "./payment-providers/index.mjs";
|
|
5
5
|
export { Projects, } from "./projects.mjs";
|
|
6
6
|
export { Revenue, } from "./revenue/index.mjs";
|
|
7
7
|
export { V1 } from "./v1.mjs";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { PaymentProviders, type CreatePaymentProviderRequest, type ListPaymentProvidersResponse, type PaymentProviderResponse, type ProviderField, type ProviderInstructionsResponse, type UpdatePaymentProviderRequest, type PaymentProviderDeleteResponse, type PaymentProviderCreateParams, type PaymentProviderUpdateParams, type PaymentProviderListParams, type PaymentProviderInstructionsParams, } from "./payment-providers.mjs";
|
|
2
|
+
export { Stripe } from "./stripe/index.mjs";
|
|
3
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/payment-providers/index.ts"],"names":[],"mappings":"OAEO,EACL,gBAAgB,EAChB,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,iCAAiC,GACvC;OACM,EAAE,MAAM,EAAE"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { PaymentProviders, type CreatePaymentProviderRequest, type ListPaymentProvidersResponse, type PaymentProviderResponse, type ProviderField, type ProviderInstructionsResponse, type UpdatePaymentProviderRequest, type PaymentProviderDeleteResponse, type PaymentProviderCreateParams, type PaymentProviderUpdateParams, type PaymentProviderListParams, type PaymentProviderInstructionsParams, } from "./payment-providers.js";
|
|
2
|
+
export { Stripe } from "./stripe/index.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/payment-providers/index.ts"],"names":[],"mappings":"OAEO,EACL,gBAAgB,EAChB,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,iCAAiC,GACvC;OACM,EAAE,MAAM,EAAE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Stripe = exports.PaymentProviders = void 0;
|
|
5
|
+
var payment_providers_1 = require("./payment-providers.js");
|
|
6
|
+
Object.defineProperty(exports, "PaymentProviders", { enumerable: true, get: function () { return payment_providers_1.PaymentProviders; } });
|
|
7
|
+
var index_1 = require("./stripe/index.js");
|
|
8
|
+
Object.defineProperty(exports, "Stripe", { enumerable: true, get: function () { return index_1.Stripe; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/v1/payment-providers/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAa6B;AAZ3B,qHAAA,gBAAgB,OAAA;AAalB,2CAAwC;AAA/B,+FAAA,MAAM,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/v1/payment-providers/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,gBAAgB,GAYjB;OACM,EAAE,MAAM,EAAE"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
+
import * as StripeAPI from "./stripe/stripe.mjs";
|
|
3
|
+
import { Stripe } from "./stripe/stripe.mjs";
|
|
4
|
+
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
5
|
+
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
6
|
+
export declare class PaymentProviders extends APIResource {
|
|
7
|
+
stripe: StripeAPI.Stripe;
|
|
8
|
+
/**
|
|
9
|
+
* Connect a new payment provider to a project
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const paymentProviderResponse =
|
|
14
|
+
* await client.v1.paymentProviders.create({
|
|
15
|
+
* api_key: 'sk_test_xxxxx',
|
|
16
|
+
* project_id: '550e8400-e29b-41d4-a716-446655440000',
|
|
17
|
+
* provider_type: 'stripe',
|
|
18
|
+
* webhook_secret: 'whsec_xxxxx',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
create(body: PaymentProviderCreateParams, options?: RequestOptions): APIPromise<PaymentProviderResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Update payment provider credentials or settings
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const paymentProviderResponse =
|
|
29
|
+
* await client.v1.paymentProviders.update('id');
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
update(id: string, body: PaymentProviderUpdateParams, options?: RequestOptions): APIPromise<PaymentProviderResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Get all payment providers for the organization
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const listPaymentProvidersResponse =
|
|
39
|
+
* await client.v1.paymentProviders.list();
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
list(query?: PaymentProviderListParams | null | undefined, options?: RequestOptions): APIPromise<ListPaymentProvidersResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Disconnect a payment provider from a project
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const paymentProvider =
|
|
49
|
+
* await client.v1.paymentProviders.delete('id');
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
delete(id: string, options?: RequestOptions): APIPromise<PaymentProviderDeleteResponse>;
|
|
53
|
+
/**
|
|
54
|
+
* Get a single payment provider by ID
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const paymentProviderResponse =
|
|
59
|
+
* await client.v1.paymentProviders.get('id');
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
get(id: string, options?: RequestOptions): APIPromise<PaymentProviderResponse>;
|
|
63
|
+
/**
|
|
64
|
+
* Get instructions for connecting a payment provider (OAuth URL or manual
|
|
65
|
+
* credentials)
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const providerInstructionsResponse =
|
|
70
|
+
* await client.v1.paymentProviders.instructions({
|
|
71
|
+
* provider_type: 'stripe',
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
instructions(query: PaymentProviderInstructionsParams, options?: RequestOptions): APIPromise<ProviderInstructionsResponse>;
|
|
76
|
+
}
|
|
77
|
+
export interface CreatePaymentProviderRequest {
|
|
78
|
+
api_key: string;
|
|
79
|
+
project_id: string;
|
|
80
|
+
provider_type: 'stripe' | 'paddle' | 'paypal' | 'lemon_squeezy' | 'square';
|
|
81
|
+
webhook_secret: string;
|
|
82
|
+
}
|
|
83
|
+
export interface ListPaymentProvidersResponse {
|
|
84
|
+
providers?: Array<PaymentProviderResponse>;
|
|
85
|
+
total?: number;
|
|
86
|
+
}
|
|
87
|
+
export interface PaymentProviderResponse {
|
|
88
|
+
id?: string;
|
|
89
|
+
created_at?: string;
|
|
90
|
+
is_active?: boolean;
|
|
91
|
+
last_synced_at?: string;
|
|
92
|
+
organization_id?: string;
|
|
93
|
+
project_id?: string;
|
|
94
|
+
provider_type?: 'stripe' | 'paddle' | 'paypal' | 'lemon_squeezy' | 'square';
|
|
95
|
+
updated_at?: string;
|
|
96
|
+
}
|
|
97
|
+
export interface ProviderField {
|
|
98
|
+
help_text?: string;
|
|
99
|
+
label?: string;
|
|
100
|
+
name?: string;
|
|
101
|
+
placeholder?: string;
|
|
102
|
+
required?: boolean;
|
|
103
|
+
type?: string;
|
|
104
|
+
}
|
|
105
|
+
export interface ProviderInstructionsResponse {
|
|
106
|
+
/**
|
|
107
|
+
* "oauth" or "manual"
|
|
108
|
+
*/
|
|
109
|
+
connection_method?: string;
|
|
110
|
+
fields?: Array<ProviderField>;
|
|
111
|
+
instructions?: string;
|
|
112
|
+
oauth_url?: string;
|
|
113
|
+
provider_type?: 'stripe' | 'paddle' | 'paypal' | 'lemon_squeezy' | 'square';
|
|
114
|
+
}
|
|
115
|
+
export interface UpdatePaymentProviderRequest {
|
|
116
|
+
api_key?: string;
|
|
117
|
+
is_active?: boolean;
|
|
118
|
+
webhook_secret?: string;
|
|
119
|
+
}
|
|
120
|
+
export type PaymentProviderDeleteResponse = {
|
|
121
|
+
[key: string]: string;
|
|
122
|
+
};
|
|
123
|
+
export interface PaymentProviderCreateParams {
|
|
124
|
+
api_key: string;
|
|
125
|
+
project_id: string;
|
|
126
|
+
provider_type: 'stripe' | 'paddle' | 'paypal' | 'lemon_squeezy' | 'square';
|
|
127
|
+
webhook_secret: string;
|
|
128
|
+
}
|
|
129
|
+
export interface PaymentProviderUpdateParams {
|
|
130
|
+
api_key?: string;
|
|
131
|
+
is_active?: boolean;
|
|
132
|
+
webhook_secret?: string;
|
|
133
|
+
}
|
|
134
|
+
export interface PaymentProviderListParams {
|
|
135
|
+
/**
|
|
136
|
+
* Filter by project ID
|
|
137
|
+
*/
|
|
138
|
+
project_id?: string;
|
|
139
|
+
}
|
|
140
|
+
export interface PaymentProviderInstructionsParams {
|
|
141
|
+
/**
|
|
142
|
+
* Provider type
|
|
143
|
+
*/
|
|
144
|
+
provider_type: 'stripe' | 'paddle' | 'paypal' | 'lemon_squeezy' | 'square';
|
|
145
|
+
/**
|
|
146
|
+
* Project ID (required for Stripe Connect)
|
|
147
|
+
*/
|
|
148
|
+
project_id?: string;
|
|
149
|
+
}
|
|
150
|
+
export declare namespace PaymentProviders {
|
|
151
|
+
export { type CreatePaymentProviderRequest as CreatePaymentProviderRequest, type ListPaymentProvidersResponse as ListPaymentProvidersResponse, type PaymentProviderResponse as PaymentProviderResponse, type ProviderField as ProviderField, type ProviderInstructionsResponse as ProviderInstructionsResponse, type UpdatePaymentProviderRequest as UpdatePaymentProviderRequest, type PaymentProviderDeleteResponse as PaymentProviderDeleteResponse, type PaymentProviderCreateParams as PaymentProviderCreateParams, type PaymentProviderUpdateParams as PaymentProviderUpdateParams, type PaymentProviderListParams as PaymentProviderListParams, type PaymentProviderInstructionsParams as PaymentProviderInstructionsParams, };
|
|
152
|
+
export { Stripe as Stripe };
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=payment-providers.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-providers.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/payment-providers/payment-providers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,MAAM,EAAE;OACV,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAE9D;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAI,EAAE,2BAA2B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAIxG;;;;;;;;OAQG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;IAItC;;;;;;;;OAQG;IACH,IAAI,CACF,KAAK,GAAE,yBAAyB,GAAG,IAAI,GAAG,SAAc,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;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,MAAM,CAAC;CACrB;AAID,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,iCAAiC,IAAI,iCAAiC,GAC5E,CAAC;IAEF,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,CAAC;CAC7B"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { APIResource } from "../../../core/resource.js";
|
|
2
|
+
import * as StripeAPI from "./stripe/stripe.js";
|
|
3
|
+
import { Stripe } from "./stripe/stripe.js";
|
|
4
|
+
import { APIPromise } from "../../../core/api-promise.js";
|
|
5
|
+
import { RequestOptions } from "../../../internal/request-options.js";
|
|
6
|
+
export declare class PaymentProviders extends APIResource {
|
|
7
|
+
stripe: StripeAPI.Stripe;
|
|
8
|
+
/**
|
|
9
|
+
* Connect a new payment provider to a project
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const paymentProviderResponse =
|
|
14
|
+
* await client.v1.paymentProviders.create({
|
|
15
|
+
* api_key: 'sk_test_xxxxx',
|
|
16
|
+
* project_id: '550e8400-e29b-41d4-a716-446655440000',
|
|
17
|
+
* provider_type: 'stripe',
|
|
18
|
+
* webhook_secret: 'whsec_xxxxx',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
create(body: PaymentProviderCreateParams, options?: RequestOptions): APIPromise<PaymentProviderResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Update payment provider credentials or settings
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const paymentProviderResponse =
|
|
29
|
+
* await client.v1.paymentProviders.update('id');
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
update(id: string, body: PaymentProviderUpdateParams, options?: RequestOptions): APIPromise<PaymentProviderResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Get all payment providers for the organization
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const listPaymentProvidersResponse =
|
|
39
|
+
* await client.v1.paymentProviders.list();
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
list(query?: PaymentProviderListParams | null | undefined, options?: RequestOptions): APIPromise<ListPaymentProvidersResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Disconnect a payment provider from a project
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const paymentProvider =
|
|
49
|
+
* await client.v1.paymentProviders.delete('id');
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
delete(id: string, options?: RequestOptions): APIPromise<PaymentProviderDeleteResponse>;
|
|
53
|
+
/**
|
|
54
|
+
* Get a single payment provider by ID
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const paymentProviderResponse =
|
|
59
|
+
* await client.v1.paymentProviders.get('id');
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
get(id: string, options?: RequestOptions): APIPromise<PaymentProviderResponse>;
|
|
63
|
+
/**
|
|
64
|
+
* Get instructions for connecting a payment provider (OAuth URL or manual
|
|
65
|
+
* credentials)
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const providerInstructionsResponse =
|
|
70
|
+
* await client.v1.paymentProviders.instructions({
|
|
71
|
+
* provider_type: 'stripe',
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
instructions(query: PaymentProviderInstructionsParams, options?: RequestOptions): APIPromise<ProviderInstructionsResponse>;
|
|
76
|
+
}
|
|
77
|
+
export interface CreatePaymentProviderRequest {
|
|
78
|
+
api_key: string;
|
|
79
|
+
project_id: string;
|
|
80
|
+
provider_type: 'stripe' | 'paddle' | 'paypal' | 'lemon_squeezy' | 'square';
|
|
81
|
+
webhook_secret: string;
|
|
82
|
+
}
|
|
83
|
+
export interface ListPaymentProvidersResponse {
|
|
84
|
+
providers?: Array<PaymentProviderResponse>;
|
|
85
|
+
total?: number;
|
|
86
|
+
}
|
|
87
|
+
export interface PaymentProviderResponse {
|
|
88
|
+
id?: string;
|
|
89
|
+
created_at?: string;
|
|
90
|
+
is_active?: boolean;
|
|
91
|
+
last_synced_at?: string;
|
|
92
|
+
organization_id?: string;
|
|
93
|
+
project_id?: string;
|
|
94
|
+
provider_type?: 'stripe' | 'paddle' | 'paypal' | 'lemon_squeezy' | 'square';
|
|
95
|
+
updated_at?: string;
|
|
96
|
+
}
|
|
97
|
+
export interface ProviderField {
|
|
98
|
+
help_text?: string;
|
|
99
|
+
label?: string;
|
|
100
|
+
name?: string;
|
|
101
|
+
placeholder?: string;
|
|
102
|
+
required?: boolean;
|
|
103
|
+
type?: string;
|
|
104
|
+
}
|
|
105
|
+
export interface ProviderInstructionsResponse {
|
|
106
|
+
/**
|
|
107
|
+
* "oauth" or "manual"
|
|
108
|
+
*/
|
|
109
|
+
connection_method?: string;
|
|
110
|
+
fields?: Array<ProviderField>;
|
|
111
|
+
instructions?: string;
|
|
112
|
+
oauth_url?: string;
|
|
113
|
+
provider_type?: 'stripe' | 'paddle' | 'paypal' | 'lemon_squeezy' | 'square';
|
|
114
|
+
}
|
|
115
|
+
export interface UpdatePaymentProviderRequest {
|
|
116
|
+
api_key?: string;
|
|
117
|
+
is_active?: boolean;
|
|
118
|
+
webhook_secret?: string;
|
|
119
|
+
}
|
|
120
|
+
export type PaymentProviderDeleteResponse = {
|
|
121
|
+
[key: string]: string;
|
|
122
|
+
};
|
|
123
|
+
export interface PaymentProviderCreateParams {
|
|
124
|
+
api_key: string;
|
|
125
|
+
project_id: string;
|
|
126
|
+
provider_type: 'stripe' | 'paddle' | 'paypal' | 'lemon_squeezy' | 'square';
|
|
127
|
+
webhook_secret: string;
|
|
128
|
+
}
|
|
129
|
+
export interface PaymentProviderUpdateParams {
|
|
130
|
+
api_key?: string;
|
|
131
|
+
is_active?: boolean;
|
|
132
|
+
webhook_secret?: string;
|
|
133
|
+
}
|
|
134
|
+
export interface PaymentProviderListParams {
|
|
135
|
+
/**
|
|
136
|
+
* Filter by project ID
|
|
137
|
+
*/
|
|
138
|
+
project_id?: string;
|
|
139
|
+
}
|
|
140
|
+
export interface PaymentProviderInstructionsParams {
|
|
141
|
+
/**
|
|
142
|
+
* Provider type
|
|
143
|
+
*/
|
|
144
|
+
provider_type: 'stripe' | 'paddle' | 'paypal' | 'lemon_squeezy' | 'square';
|
|
145
|
+
/**
|
|
146
|
+
* Project ID (required for Stripe Connect)
|
|
147
|
+
*/
|
|
148
|
+
project_id?: string;
|
|
149
|
+
}
|
|
150
|
+
export declare namespace PaymentProviders {
|
|
151
|
+
export { type CreatePaymentProviderRequest as CreatePaymentProviderRequest, type ListPaymentProvidersResponse as ListPaymentProvidersResponse, type PaymentProviderResponse as PaymentProviderResponse, type ProviderField as ProviderField, type ProviderInstructionsResponse as ProviderInstructionsResponse, type UpdatePaymentProviderRequest as UpdatePaymentProviderRequest, type PaymentProviderDeleteResponse as PaymentProviderDeleteResponse, type PaymentProviderCreateParams as PaymentProviderCreateParams, type PaymentProviderUpdateParams as PaymentProviderUpdateParams, type PaymentProviderListParams as PaymentProviderListParams, type PaymentProviderInstructionsParams as PaymentProviderInstructionsParams, };
|
|
152
|
+
export { Stripe as Stripe };
|
|
153
|
+
}
|
|
154
|
+
//# sourceMappingURL=payment-providers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-providers.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/payment-providers/payment-providers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,MAAM,EAAE;OACV,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAE9D;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAI,EAAE,2BAA2B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAIxG;;;;;;;;OAQG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;IAItC;;;;;;;;OAQG;IACH,IAAI,CACF,KAAK,GAAE,yBAAyB,GAAG,IAAI,GAAG,SAAc,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAI3C;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;IAIvF;;;;;;;;OAQG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAI9E;;;;;;;;;;;OAWG;IACH,YAAY,CACV,KAAK,EAAE,iCAAiC,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;CAG5C;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,CAAC;IAEhB,UAAU,EAAE,MAAM,CAAC;IAEnB,aAAa,EAAE,QAAQ,GAAG,QAAQ,GAAG,Q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,EAAE,CAAC;CAC7B"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PaymentProviders = void 0;
|
|
5
|
+
const tslib_1 = require("../../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../../core/resource.js");
|
|
7
|
+
const StripeAPI = tslib_1.__importStar(require("./stripe/stripe.js"));
|
|
8
|
+
const stripe_1 = require("./stripe/stripe.js");
|
|
9
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
10
|
+
class PaymentProviders extends resource_1.APIResource {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.stripe = new StripeAPI.Stripe(this._client);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Connect a new payment provider to a project
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const paymentProviderResponse =
|
|
21
|
+
* await client.v1.paymentProviders.create({
|
|
22
|
+
* api_key: 'sk_test_xxxxx',
|
|
23
|
+
* project_id: '550e8400-e29b-41d4-a716-446655440000',
|
|
24
|
+
* provider_type: 'stripe',
|
|
25
|
+
* webhook_secret: 'whsec_xxxxx',
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
create(body, options) {
|
|
30
|
+
return this._client.post('/api/v1/payment-providers', { body, ...options });
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Update payment provider credentials or settings
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const paymentProviderResponse =
|
|
38
|
+
* await client.v1.paymentProviders.update('id');
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
update(id, body, options) {
|
|
42
|
+
return this._client.put((0, path_1.path) `/api/v1/payment-providers/${id}`, { body, ...options });
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Get all payment providers for the organization
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const listPaymentProvidersResponse =
|
|
50
|
+
* await client.v1.paymentProviders.list();
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
list(query = {}, options) {
|
|
54
|
+
return this._client.get('/api/v1/payment-providers', { query, ...options });
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Disconnect a payment provider from a project
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const paymentProvider =
|
|
62
|
+
* await client.v1.paymentProviders.delete('id');
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
delete(id, options) {
|
|
66
|
+
return this._client.delete((0, path_1.path) `/api/v1/payment-providers/${id}`, options);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Get a single payment provider by ID
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const paymentProviderResponse =
|
|
74
|
+
* await client.v1.paymentProviders.get('id');
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
get(id, options) {
|
|
78
|
+
return this._client.get((0, path_1.path) `/api/v1/payment-providers/${id}`, options);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Get instructions for connecting a payment provider (OAuth URL or manual
|
|
82
|
+
* credentials)
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* const providerInstructionsResponse =
|
|
87
|
+
* await client.v1.paymentProviders.instructions({
|
|
88
|
+
* provider_type: 'stripe',
|
|
89
|
+
* });
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
instructions(query, options) {
|
|
93
|
+
return this._client.get('/api/v1/payment-providers/instructions', { query, ...options });
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
exports.PaymentProviders = PaymentProviders;
|
|
97
|
+
PaymentProviders.Stripe = stripe_1.Stripe;
|
|
98
|
+
//# sourceMappingURL=payment-providers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-providers.js","sourceRoot":"","sources":["../../../src/resources/v1/payment-providers/payment-providers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,sEAA6C;AAC7C,+CAAyC;AAGzC,0DAAoD;AAEpD,MAAa,gBAAiB,SAAQ,sBAAW;IAAjD;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiGhE,CAAC;IA/FC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAiC,EAAE,OAAwB;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CACJ,EAAU,EACV,IAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,6BAA6B,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CACF,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,6BAA6B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;;;OAQG;IACH,GAAG,CAAC,EAAU,EAAE,OAAwB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,6BAA6B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;;OAWG;IACH,YAAY,CACV,KAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wCAAwC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF;AAlGD,4CAkGC;AAgHD,gBAAgB,CAAC,MAAM,GAAG,eAAM,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
+
import * as StripeAPI from "./stripe/stripe.mjs";
|
|
4
|
+
import { Stripe } from "./stripe/stripe.mjs";
|
|
5
|
+
import { path } from "../../../internal/utils/path.mjs";
|
|
6
|
+
export class PaymentProviders extends APIResource {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.stripe = new StripeAPI.Stripe(this._client);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Connect a new payment provider to a project
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const paymentProviderResponse =
|
|
17
|
+
* await client.v1.paymentProviders.create({
|
|
18
|
+
* api_key: 'sk_test_xxxxx',
|
|
19
|
+
* project_id: '550e8400-e29b-41d4-a716-446655440000',
|
|
20
|
+
* provider_type: 'stripe',
|
|
21
|
+
* webhook_secret: 'whsec_xxxxx',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
create(body, options) {
|
|
26
|
+
return this._client.post('/api/v1/payment-providers', { body, ...options });
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Update payment provider credentials or settings
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const paymentProviderResponse =
|
|
34
|
+
* await client.v1.paymentProviders.update('id');
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
update(id, body, options) {
|
|
38
|
+
return this._client.put(path `/api/v1/payment-providers/${id}`, { body, ...options });
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Get all payment providers for the organization
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const listPaymentProvidersResponse =
|
|
46
|
+
* await client.v1.paymentProviders.list();
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
list(query = {}, options) {
|
|
50
|
+
return this._client.get('/api/v1/payment-providers', { query, ...options });
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Disconnect a payment provider from a project
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const paymentProvider =
|
|
58
|
+
* await client.v1.paymentProviders.delete('id');
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
delete(id, options) {
|
|
62
|
+
return this._client.delete(path `/api/v1/payment-providers/${id}`, options);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Get a single payment provider by ID
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const paymentProviderResponse =
|
|
70
|
+
* await client.v1.paymentProviders.get('id');
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
get(id, options) {
|
|
74
|
+
return this._client.get(path `/api/v1/payment-providers/${id}`, options);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Get instructions for connecting a payment provider (OAuth URL or manual
|
|
78
|
+
* credentials)
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const providerInstructionsResponse =
|
|
83
|
+
* await client.v1.paymentProviders.instructions({
|
|
84
|
+
* provider_type: 'stripe',
|
|
85
|
+
* });
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
instructions(query, options) {
|
|
89
|
+
return this._client.get('/api/v1/payment-providers/instructions', { query, ...options });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
PaymentProviders.Stripe = Stripe;
|
|
93
|
+
//# sourceMappingURL=payment-providers.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-providers.mjs","sourceRoot":"","sources":["../../../src/resources/v1/payment-providers/payment-providers.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,MAAM,EAAE;OAGV,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAAjD;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiGhE,CAAC;IA/FC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAiC,EAAE,OAAwB;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CACJ,EAAU,EACV,IAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,6BAA6B,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CACF,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE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