@onflay/node 0.1.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/README.md +87 -0
- package/dist/client.d.ts +65 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +215 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +61 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +132 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -0
- package/dist/onflay.d.ts +42 -0
- package/dist/onflay.d.ts.map +1 -0
- package/dist/onflay.js +60 -0
- package/dist/onflay.js.map +1 -0
- package/dist/pagination.d.ts +19 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +61 -0
- package/dist/pagination.js.map +1 -0
- package/dist/resources/checkout-sessions.d.ts +11 -0
- package/dist/resources/checkout-sessions.d.ts.map +1 -0
- package/dist/resources/checkout-sessions.js +20 -0
- package/dist/resources/checkout-sessions.js.map +1 -0
- package/dist/resources/customers.d.ts +17 -0
- package/dist/resources/customers.d.ts.map +1 -0
- package/dist/resources/customers.js +39 -0
- package/dist/resources/customers.js.map +1 -0
- package/dist/resources/payments.d.ts +11 -0
- package/dist/resources/payments.d.ts.map +1 -0
- package/dist/resources/payments.js +27 -0
- package/dist/resources/payments.js.map +1 -0
- package/dist/resources/prices.d.ts +24 -0
- package/dist/resources/prices.d.ts.map +1 -0
- package/dist/resources/prices.js +46 -0
- package/dist/resources/prices.js.map +1 -0
- package/dist/resources/products.d.ts +18 -0
- package/dist/resources/products.d.ts.map +1 -0
- package/dist/resources/products.js +40 -0
- package/dist/resources/products.js.map +1 -0
- package/dist/resources/subscriptions.d.ts +39 -0
- package/dist/resources/subscriptions.d.ts.map +1 -0
- package/dist/resources/subscriptions.js +62 -0
- package/dist/resources/subscriptions.js.map +1 -0
- package/dist/resources/usage.d.ts +26 -0
- package/dist/resources/usage.d.ts.map +1 -0
- package/dist/resources/usage.js +43 -0
- package/dist/resources/usage.js.map +1 -0
- package/dist/resources/webhook-endpoints.d.ts +20 -0
- package/dist/resources/webhook-endpoints.d.ts.map +1 -0
- package/dist/resources/webhook-endpoints.js +47 -0
- package/dist/resources/webhook-endpoints.js.map +1 -0
- package/dist/types/checkout-sessions.d.ts +39 -0
- package/dist/types/checkout-sessions.d.ts.map +1 -0
- package/dist/types/checkout-sessions.js +3 -0
- package/dist/types/checkout-sessions.js.map +1 -0
- package/dist/types/customers.d.ts +28 -0
- package/dist/types/customers.d.ts.map +1 -0
- package/dist/types/customers.js +3 -0
- package/dist/types/customers.js.map +1 -0
- package/dist/types/events.d.ts +55 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/events.js +23 -0
- package/dist/types/events.js.map +1 -0
- package/dist/types/payments.d.ts +25 -0
- package/dist/types/payments.d.ts.map +1 -0
- package/dist/types/payments.js +3 -0
- package/dist/types/payments.js.map +1 -0
- package/dist/types/prices.d.ts +57 -0
- package/dist/types/prices.d.ts.map +1 -0
- package/dist/types/prices.js +3 -0
- package/dist/types/prices.js.map +1 -0
- package/dist/types/products.d.ts +29 -0
- package/dist/types/products.d.ts.map +1 -0
- package/dist/types/products.js +3 -0
- package/dist/types/products.js.map +1 -0
- package/dist/types/shared.d.ts +34 -0
- package/dist/types/shared.d.ts.map +1 -0
- package/dist/types/shared.js +4 -0
- package/dist/types/shared.js.map +1 -0
- package/dist/types/subscriptions.d.ts +85 -0
- package/dist/types/subscriptions.d.ts.map +1 -0
- package/dist/types/subscriptions.js +3 -0
- package/dist/types/subscriptions.js.map +1 -0
- package/dist/types/usage.d.ts +35 -0
- package/dist/types/usage.d.ts.map +1 -0
- package/dist/types/usage.js +3 -0
- package/dist/types/usage.js.map +1 -0
- package/dist/types/webhook-endpoints.d.ts +48 -0
- package/dist/types/webhook-endpoints.d.ts.map +1 -0
- package/dist/types/webhook-endpoints.js +3 -0
- package/dist/types/webhook-endpoints.js.map +1 -0
- package/dist/version.d.ts +4 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +7 -0
- package/dist/version.js.map +1 -0
- package/package.json +43 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { OnflayMetadata } from './shared';
|
|
2
|
+
export type SubscriptionStatus = 'incomplete' | 'incomplete_expired' | 'trialing' | 'active' | 'past_due' | 'canceled' | 'unpaid' | 'paused' | 'expired';
|
|
3
|
+
export interface SubscriptionItem {
|
|
4
|
+
id: string;
|
|
5
|
+
priceId: string;
|
|
6
|
+
quantity: number;
|
|
7
|
+
}
|
|
8
|
+
export interface OnflaySubscription {
|
|
9
|
+
id: string;
|
|
10
|
+
object: 'subscription';
|
|
11
|
+
status: SubscriptionStatus;
|
|
12
|
+
customerId: string;
|
|
13
|
+
items: SubscriptionItem[];
|
|
14
|
+
currentPeriodStart: string;
|
|
15
|
+
currentPeriodEnd: string;
|
|
16
|
+
cancelAtPeriodEnd: boolean;
|
|
17
|
+
trialEnd?: string | null;
|
|
18
|
+
canceledAt?: string | null;
|
|
19
|
+
metadata?: OnflayMetadata;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
}
|
|
22
|
+
export interface CreateSubscriptionParams {
|
|
23
|
+
customerId: string;
|
|
24
|
+
items: {
|
|
25
|
+
priceId: string;
|
|
26
|
+
quantity?: number;
|
|
27
|
+
}[];
|
|
28
|
+
trialDays?: number;
|
|
29
|
+
metadata?: OnflayMetadata;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Behaviour for billing changes triggered by an in-place subscription
|
|
33
|
+
* update. Mirrors Stripe's proration model and is **the** canonical knob
|
|
34
|
+
* for tier upgrades/downgrades.
|
|
35
|
+
*
|
|
36
|
+
* - `create_prorations` (default for upgrades) — issue a prorated charge
|
|
37
|
+
* or credit immediately so the customer pays for what they got.
|
|
38
|
+
* - `none` — skip prorations entirely; the new price takes effect at the
|
|
39
|
+
* next renewal. Common for downgrades you want to "schedule".
|
|
40
|
+
* - `always_invoice` — run a prorated calculation and invoice it
|
|
41
|
+
* immediately (no draft/preview step).
|
|
42
|
+
*/
|
|
43
|
+
export type ProrationBehavior = 'create_prorations' | 'none' | 'always_invoice';
|
|
44
|
+
export interface UpdateSubscriptionParams {
|
|
45
|
+
/**
|
|
46
|
+
* Replacement set of items. Items not in the new list are removed; new
|
|
47
|
+
* `priceId`s are added. Quantities default to `1`. The CLI catalog
|
|
48
|
+
* upgrade pattern composes this with the immutable-price flow.
|
|
49
|
+
*/
|
|
50
|
+
items?: {
|
|
51
|
+
priceId: string;
|
|
52
|
+
quantity?: number;
|
|
53
|
+
}[];
|
|
54
|
+
/**
|
|
55
|
+
* If `true`, the subscription will not auto-renew at the next period
|
|
56
|
+
* boundary. The customer keeps access until `currentPeriodEnd`.
|
|
57
|
+
*/
|
|
58
|
+
cancelAtPeriodEnd?: boolean;
|
|
59
|
+
/** Defaults to `create_prorations`. */
|
|
60
|
+
prorationBehavior?: ProrationBehavior;
|
|
61
|
+
/**
|
|
62
|
+
* Optional explicit proration date (ISO-8601). When omitted, the
|
|
63
|
+
* server uses the request time. Useful for back-dated upgrades when
|
|
64
|
+
* you computed the proration externally.
|
|
65
|
+
*/
|
|
66
|
+
prorationDate?: string;
|
|
67
|
+
metadata?: OnflayMetadata;
|
|
68
|
+
}
|
|
69
|
+
export interface CancelSubscriptionParams {
|
|
70
|
+
/** When `true`, cancel at the end of the current period (default). */
|
|
71
|
+
atPeriodEnd?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* When `true` (and `atPeriodEnd: false`), prorate the unused portion
|
|
74
|
+
* of the period and refund the credit balance.
|
|
75
|
+
*/
|
|
76
|
+
prorate?: boolean;
|
|
77
|
+
reason?: string;
|
|
78
|
+
}
|
|
79
|
+
export interface ListSubscriptionsParams {
|
|
80
|
+
customerId?: string;
|
|
81
|
+
status?: SubscriptionStatus;
|
|
82
|
+
limit?: number;
|
|
83
|
+
cursor?: string;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=subscriptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../src/types/subscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,MAAM,MAAM,kBAAkB,GAC1B,YAAY,GACZ,oBAAoB,GACpB,UAAU,GACV,QAAQ,GACR,UAAU,GACV,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,GAAG,MAAM,GAAG,gBAAgB,CAAC;AAEhF,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,KAAK,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACjD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,uCAAuC;IACvC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAwB;IACvC,sEAAsE;IACtE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../src/types/subscriptions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type MeterAggregation = 'SUM' | 'MAX' | 'LAST';
|
|
2
|
+
export interface OnflayMeter {
|
|
3
|
+
id: string;
|
|
4
|
+
object: 'meter';
|
|
5
|
+
name: string;
|
|
6
|
+
eventName: string;
|
|
7
|
+
aggregation: MeterAggregation;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
}
|
|
10
|
+
export interface CreateMeterParams {
|
|
11
|
+
name: string;
|
|
12
|
+
/** Developer-facing token used in subsequent `report()` calls. */
|
|
13
|
+
eventName: string;
|
|
14
|
+
aggregation?: MeterAggregation;
|
|
15
|
+
}
|
|
16
|
+
export interface ReportUsageParams {
|
|
17
|
+
subscriptionId: string;
|
|
18
|
+
/** Either the meter id (`meter_*`) or its configured `eventName`. */
|
|
19
|
+
meter: string;
|
|
20
|
+
quantity: number;
|
|
21
|
+
timestamp?: Date | string;
|
|
22
|
+
/**
|
|
23
|
+
* Required. Stable per logical event; the server uses it (combined
|
|
24
|
+
* with the resolved meter id) to deduplicate retries.
|
|
25
|
+
*/
|
|
26
|
+
idempotencyKey: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ReportUsageResponse {
|
|
29
|
+
object: 'usage_record';
|
|
30
|
+
/** Indicates the report was accepted into the buffer (not yet flushed). */
|
|
31
|
+
accepted: boolean;
|
|
32
|
+
subscriptionId: string;
|
|
33
|
+
meterId: string;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=usage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/types/usage.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;AAEtD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,gBAAgB,CAAC;CAChC;AAED,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IAC1B;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,cAAc,CAAC;IACvB,2EAA2E;IAC3E,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.js","sourceRoot":"","sources":["../../src/types/usage.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { OnflayEventType } from './events';
|
|
2
|
+
export interface OnflayWebhookEndpoint {
|
|
3
|
+
id: string;
|
|
4
|
+
object: 'webhook_endpoint';
|
|
5
|
+
url: string;
|
|
6
|
+
events: (OnflayEventType | string)[];
|
|
7
|
+
description?: string | null;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
updatedAt: string;
|
|
11
|
+
}
|
|
12
|
+
export interface CreatedOnflayWebhookEndpoint extends OnflayWebhookEndpoint {
|
|
13
|
+
/** Plaintext signing secret. Returned ONLY at creation time. */
|
|
14
|
+
secret: string;
|
|
15
|
+
}
|
|
16
|
+
export interface CreateWebhookEndpointParams {
|
|
17
|
+
url: string;
|
|
18
|
+
events: (OnflayEventType | string)[];
|
|
19
|
+
description?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface UpdateWebhookEndpointParams {
|
|
22
|
+
url?: string;
|
|
23
|
+
events?: (OnflayEventType | string)[];
|
|
24
|
+
description?: string | null;
|
|
25
|
+
isActive?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface ListWebhookDeliveriesParams {
|
|
28
|
+
endpointId?: string;
|
|
29
|
+
status?: 'pending' | 'delivered' | 'failed' | 'exhausted';
|
|
30
|
+
cursor?: string;
|
|
31
|
+
limit?: number;
|
|
32
|
+
}
|
|
33
|
+
export interface OnflayWebhookDelivery {
|
|
34
|
+
id: string;
|
|
35
|
+
endpointId: string;
|
|
36
|
+
eventType: OnflayEventType | string;
|
|
37
|
+
status: 'PENDING' | 'DELIVERED' | 'FAILED' | 'EXHAUSTED';
|
|
38
|
+
attempts: number;
|
|
39
|
+
httpStatus: number | null;
|
|
40
|
+
lastAttemptAt: string | null;
|
|
41
|
+
nextRetryAt: string | null;
|
|
42
|
+
errorMessage: string | null;
|
|
43
|
+
responseBody: string | null;
|
|
44
|
+
payload?: unknown;
|
|
45
|
+
createdAt: string;
|
|
46
|
+
updatedAt: string;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=webhook-endpoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-endpoints.d.ts","sourceRoot":"","sources":["../../src/types/webhook-endpoints.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,kBAAkB,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,CAAC,eAAe,GAAG,MAAM,CAAC,EAAE,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,4BAA6B,SAAQ,qBAAqB;IACzE,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,2BAA2B;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,CAAC,eAAe,GAAG,MAAM,CAAC,EAAE,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,2BAA2B;IAC1C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,CAAC,eAAe,GAAG,MAAM,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,2BAA2B;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC1D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,eAAe,GAAG,MAAM,CAAC;IACpC,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook-endpoints.js","sourceRoot":"","sources":["../../src/types/webhook-endpoints.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,cAAc,sBAA+B,CAAC;AAC3D,eAAO,MAAM,kBAAkB,eAAe,CAAC"}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ONFLAY_API_VERSION = exports.SDK_USER_AGENT = exports.SDK_VERSION = void 0;
|
|
4
|
+
exports.SDK_VERSION = '0.1.0';
|
|
5
|
+
exports.SDK_USER_AGENT = `onflay-node/${exports.SDK_VERSION}`;
|
|
6
|
+
exports.ONFLAY_API_VERSION = '2026-01-01';
|
|
7
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,OAAO,CAAC;AACtB,QAAA,cAAc,GAAG,eAAe,mBAAW,EAAE,CAAC;AAC9C,QAAA,kBAAkB,GAAG,YAAY,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@onflay/node",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Official Node.js SDK for the Onflay platform.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=20.0.0"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/node": "^22.0.0",
|
|
24
|
+
"typescript": "^5.7.0"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"onflay",
|
|
31
|
+
"payments",
|
|
32
|
+
"subscriptions",
|
|
33
|
+
"merchant-of-record",
|
|
34
|
+
"sdk"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "tsc",
|
|
38
|
+
"dev": "tsc --watch",
|
|
39
|
+
"clean": "rm -rf dist .turbo",
|
|
40
|
+
"test": "echo \"(no tests yet)\"",
|
|
41
|
+
"lint": "echo \"(no lint configured)\""
|
|
42
|
+
}
|
|
43
|
+
}
|