@payark/sdk-effect 0.1.0 → 0.1.3
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 +104 -54
- package/dist/index.d.mts +1954 -75
- package/dist/index.d.ts +1954 -75
- package/dist/index.js +415 -94
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +368 -90
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,118 +1,929 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as effect_ParseResult from 'effect/ParseResult';
|
|
2
|
+
import * as _effect_platform_HttpClientError from '@effect/platform/HttpClientError';
|
|
3
|
+
import * as _effect_platform_HttpApiError from '@effect/platform/HttpApiError';
|
|
4
|
+
import * as effect_Brand from 'effect/Brand';
|
|
5
|
+
import * as effect_Effect from 'effect/Effect';
|
|
6
|
+
import * as _effect_platform_HttpRouter from '@effect/platform/HttpRouter';
|
|
7
|
+
import * as effect_Redacted from 'effect/Redacted';
|
|
8
|
+
import { HttpApiGroup, HttpApiEndpoint, HttpApiMiddleware, HttpApiSecurity, HttpApi, HttpClient } from '@effect/platform';
|
|
9
|
+
import { Context, Schema, Effect, ParseResult, Layer } from 'effect';
|
|
10
|
+
import * as _effect_platform_HttpClientResponse from '@effect/platform/HttpClientResponse';
|
|
2
11
|
import * as effect_Cause from 'effect/Cause';
|
|
3
12
|
import * as effect_Types from 'effect/Types';
|
|
4
|
-
import { PayArkErrorCode, PayArkErrorBody, PayArkConfig, CreateCheckoutParams, ListPaymentsParams } from '@payark/sdk';
|
|
5
|
-
export { CheckoutSession, ListPaymentsParams, PaginatedResponse, PaginationMeta, PayArkConfig, PayArkErrorBody, PayArkErrorCode, Payment, PaymentStatus, Project, Provider, WebhookEvent, WebhookEventType } from '@payark/sdk';
|
|
6
|
-
import { Schema, ParseResult } from '@effect/schema';
|
|
7
|
-
import { HttpClient } from '@effect/platform';
|
|
8
13
|
|
|
9
|
-
declare const
|
|
10
|
-
readonly _tag: "
|
|
11
|
-
} &
|
|
14
|
+
declare const IndustrialError_base: Schema.TaggedErrorClass<IndustrialError, "IndustrialError", {
|
|
15
|
+
readonly _tag: Schema.tag<"IndustrialError">;
|
|
16
|
+
} & {
|
|
17
|
+
error: typeof Schema.String;
|
|
18
|
+
details: Schema.optional<typeof Schema.Any>;
|
|
19
|
+
}>;
|
|
12
20
|
/**
|
|
13
|
-
*
|
|
14
|
-
* Extends Data.TaggedError for easy matching in Effect.catchTag.
|
|
21
|
+
* Industrial Error Schema with Status mapping.
|
|
15
22
|
*/
|
|
16
|
-
declare class
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
declare class IndustrialError extends IndustrialError_base {
|
|
24
|
+
}
|
|
25
|
+
declare const AuthenticationError_base: Schema.TaggedErrorClass<AuthenticationError, "AuthenticationError", {
|
|
26
|
+
readonly _tag: Schema.tag<"AuthenticationError">;
|
|
27
|
+
} & {
|
|
28
|
+
error: typeof Schema.String;
|
|
29
|
+
}>;
|
|
30
|
+
declare class AuthenticationError extends AuthenticationError_base {
|
|
31
|
+
}
|
|
32
|
+
declare const NotFoundError_base: Schema.TaggedErrorClass<NotFoundError, "NotFoundError", {
|
|
33
|
+
readonly _tag: Schema.tag<"NotFoundError">;
|
|
34
|
+
} & {
|
|
35
|
+
error: typeof Schema.String;
|
|
36
|
+
}>;
|
|
37
|
+
declare class NotFoundError extends NotFoundError_base {
|
|
38
|
+
}
|
|
39
|
+
declare const InternalServerError_base: Schema.TaggedErrorClass<InternalServerError, "InternalServerError", {
|
|
40
|
+
readonly _tag: Schema.tag<"InternalServerError">;
|
|
41
|
+
} & {
|
|
42
|
+
error: typeof Schema.String;
|
|
43
|
+
details: Schema.optional<typeof Schema.Any>;
|
|
44
|
+
}>;
|
|
45
|
+
declare class InternalServerError extends InternalServerError_base {
|
|
46
|
+
}
|
|
47
|
+
declare const ConflictError_base: Schema.TaggedErrorClass<ConflictError, "ConflictError", {
|
|
48
|
+
readonly _tag: Schema.tag<"ConflictError">;
|
|
49
|
+
} & {
|
|
50
|
+
error: typeof Schema.String;
|
|
51
|
+
}>;
|
|
52
|
+
declare class ConflictError extends ConflictError_base {
|
|
24
53
|
}
|
|
25
|
-
|
|
26
54
|
/**
|
|
27
|
-
*
|
|
55
|
+
* PayArk Industrial API Specification.
|
|
56
|
+
* Single source of truth for the entire platform.
|
|
28
57
|
*/
|
|
29
|
-
|
|
58
|
+
interface AuthContext {
|
|
59
|
+
readonly project?: {
|
|
60
|
+
readonly id: string;
|
|
61
|
+
};
|
|
62
|
+
readonly user?: {
|
|
63
|
+
readonly id: string;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
declare const AuthContext: Context.Tag<AuthContext, AuthContext>;
|
|
67
|
+
declare const SecurityMiddleware_base: HttpApiMiddleware.TagClass.BaseSecurity<SecurityMiddleware, "SecurityMiddleware", {
|
|
68
|
+
readonly security: {
|
|
69
|
+
readonly bearer: HttpApiSecurity.Bearer;
|
|
70
|
+
};
|
|
71
|
+
readonly provides: Context.Tag<AuthContext, AuthContext>;
|
|
72
|
+
readonly failure: Schema.Union<[typeof AuthenticationError, typeof IndustrialError]>;
|
|
73
|
+
}, {
|
|
74
|
+
readonly bearer: (_: effect_Redacted.Redacted<string>) => effect_Effect.Effect<AuthContext, AuthenticationError | IndustrialError, _effect_platform_HttpRouter.HttpRouter.Provided>;
|
|
75
|
+
}, {
|
|
76
|
+
readonly bearer: HttpApiSecurity.Bearer;
|
|
77
|
+
}>;
|
|
78
|
+
declare class SecurityMiddleware extends SecurityMiddleware_base {
|
|
79
|
+
}
|
|
80
|
+
declare const CronSecurity_base: HttpApiMiddleware.TagClass.BaseSecurity<CronSecurity, "CronSecurity", {
|
|
81
|
+
readonly security: {
|
|
82
|
+
readonly secret: HttpApiSecurity.ApiKey;
|
|
83
|
+
};
|
|
84
|
+
readonly failure: Schema.Union<[typeof AuthenticationError, typeof IndustrialError]>;
|
|
85
|
+
}, {
|
|
86
|
+
readonly secret: (_: effect_Redacted.Redacted<string>) => effect_Effect.Effect<void, AuthenticationError | IndustrialError, _effect_platform_HttpRouter.HttpRouter.Provided>;
|
|
87
|
+
}, {
|
|
88
|
+
readonly secret: HttpApiSecurity.ApiKey;
|
|
89
|
+
}>;
|
|
90
|
+
declare class CronSecurity extends CronSecurity_base {
|
|
91
|
+
}
|
|
92
|
+
declare const UserSecurity_base: HttpApiMiddleware.TagClass.BaseSecurity<UserSecurity, "UserSecurity", {
|
|
93
|
+
readonly security: {
|
|
94
|
+
readonly bearer: HttpApiSecurity.Bearer;
|
|
95
|
+
};
|
|
96
|
+
readonly provides: Context.Tag<AuthContext, AuthContext>;
|
|
97
|
+
readonly failure: Schema.Union<[typeof AuthenticationError, typeof IndustrialError]>;
|
|
98
|
+
}, {
|
|
99
|
+
readonly bearer: (_: effect_Redacted.Redacted<string>) => effect_Effect.Effect<AuthContext, AuthenticationError | IndustrialError, _effect_platform_HttpRouter.HttpRouter.Provided>;
|
|
100
|
+
}, {
|
|
101
|
+
readonly bearer: HttpApiSecurity.Bearer;
|
|
102
|
+
}>;
|
|
103
|
+
declare class UserSecurity extends UserSecurity_base {
|
|
104
|
+
}
|
|
105
|
+
declare const CheckoutGroup: HttpApiGroup.HttpApiGroup<"checkout", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, never, {
|
|
106
|
+
readonly amount: number;
|
|
107
|
+
readonly currency: string;
|
|
108
|
+
readonly provider: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
|
|
109
|
+
readonly returnUrl: string;
|
|
110
|
+
readonly cancelUrl?: string | undefined;
|
|
111
|
+
readonly metadata?: {
|
|
112
|
+
readonly [x: string]: any;
|
|
113
|
+
} | undefined;
|
|
114
|
+
}, never, {
|
|
115
|
+
readonly id: string & effect_Brand.Brand<"CheckoutSessionId">;
|
|
116
|
+
readonly checkout_url: string;
|
|
117
|
+
readonly payment_method: {
|
|
118
|
+
readonly type: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
|
|
119
|
+
readonly url?: string | undefined;
|
|
120
|
+
readonly method?: "POST" | "GET" | undefined;
|
|
121
|
+
readonly fields?: {
|
|
122
|
+
readonly [x: string]: string;
|
|
123
|
+
} | undefined;
|
|
124
|
+
};
|
|
125
|
+
}, AuthenticationError | InternalServerError | IndustrialError, never, never>, AuthenticationError | IndustrialError, SecurityMiddleware, false>;
|
|
126
|
+
declare const PaymentsGroup: HttpApiGroup.HttpApiGroup<"payments", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", never, {
|
|
127
|
+
readonly limit?: number | undefined;
|
|
128
|
+
readonly offset?: number | undefined;
|
|
129
|
+
readonly projectId?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
|
|
130
|
+
}, never, never, {
|
|
131
|
+
readonly data: readonly {
|
|
132
|
+
readonly id: string & effect_Brand.Brand<"PaymentId">;
|
|
133
|
+
readonly amount: number;
|
|
134
|
+
readonly currency: string;
|
|
135
|
+
readonly status: "pending" | "success" | "failed";
|
|
136
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
137
|
+
readonly provider_ref?: string | null | undefined;
|
|
138
|
+
readonly metadata_json?: {
|
|
139
|
+
readonly [x: string]: any;
|
|
140
|
+
} | null | undefined;
|
|
141
|
+
readonly gateway_response?: any;
|
|
142
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
143
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
144
|
+
}[];
|
|
145
|
+
readonly meta: {
|
|
146
|
+
readonly total: number | null;
|
|
147
|
+
readonly limit: number;
|
|
148
|
+
readonly offset: number;
|
|
149
|
+
};
|
|
150
|
+
}, AuthenticationError | InternalServerError | IndustrialError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"retrieve", "GET", {
|
|
151
|
+
readonly id: string & effect_Brand.Brand<"Id">;
|
|
152
|
+
}, never, never, never, {
|
|
153
|
+
readonly id: string & effect_Brand.Brand<"PaymentId">;
|
|
154
|
+
readonly amount: number;
|
|
155
|
+
readonly currency: string;
|
|
156
|
+
readonly status: "pending" | "success" | "failed";
|
|
157
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
158
|
+
readonly provider_ref?: string | null | undefined;
|
|
159
|
+
readonly metadata_json?: {
|
|
160
|
+
readonly [x: string]: any;
|
|
161
|
+
} | null | undefined;
|
|
162
|
+
readonly gateway_response?: any;
|
|
163
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
164
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
165
|
+
}, AuthenticationError | InternalServerError | IndustrialError | NotFoundError, never, never>, AuthenticationError | IndustrialError, SecurityMiddleware, false>;
|
|
166
|
+
declare const CustomersGroup: HttpApiGroup.HttpApiGroup<"customers", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, never, {
|
|
167
|
+
readonly metadata?: {
|
|
168
|
+
readonly [x: string]: any;
|
|
169
|
+
} | undefined;
|
|
170
|
+
readonly project_id?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
|
|
171
|
+
readonly merchant_customer_id: string;
|
|
172
|
+
readonly email?: string | undefined;
|
|
173
|
+
readonly name?: string | undefined;
|
|
174
|
+
readonly phone?: string | undefined;
|
|
175
|
+
}, never, {
|
|
176
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
177
|
+
readonly metadata: {
|
|
178
|
+
readonly [x: string]: any;
|
|
179
|
+
} | null;
|
|
180
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
181
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
182
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
183
|
+
readonly merchant_customer_id: string;
|
|
184
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
185
|
+
readonly name: string | null;
|
|
186
|
+
readonly phone: string | null;
|
|
187
|
+
}, AuthenticationError | InternalServerError | IndustrialError | ConflictError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"retrieve", "GET", {
|
|
188
|
+
readonly id: string & effect_Brand.Brand<"Id">;
|
|
189
|
+
}, never, never, never, {
|
|
190
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
191
|
+
readonly metadata: {
|
|
192
|
+
readonly [x: string]: any;
|
|
193
|
+
} | null;
|
|
194
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
195
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
196
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
197
|
+
readonly merchant_customer_id: string;
|
|
198
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
199
|
+
readonly name: string | null;
|
|
200
|
+
readonly phone: string | null;
|
|
201
|
+
}, AuthenticationError | InternalServerError | IndustrialError | NotFoundError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"update", "PATCH", {
|
|
202
|
+
readonly id: string & effect_Brand.Brand<"Id">;
|
|
203
|
+
}, never, {
|
|
204
|
+
readonly metadata?: {
|
|
205
|
+
readonly [x: string]: any;
|
|
206
|
+
} | undefined;
|
|
207
|
+
readonly email?: string | undefined;
|
|
208
|
+
readonly name?: string | undefined;
|
|
209
|
+
readonly phone?: string | undefined;
|
|
210
|
+
}, never, {
|
|
211
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
212
|
+
readonly metadata: {
|
|
213
|
+
readonly [x: string]: any;
|
|
214
|
+
} | null;
|
|
215
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
216
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
217
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
218
|
+
readonly merchant_customer_id: string;
|
|
219
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
220
|
+
readonly name: string | null;
|
|
221
|
+
readonly phone: string | null;
|
|
222
|
+
}, AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", {
|
|
223
|
+
readonly id: string & effect_Brand.Brand<"Id">;
|
|
224
|
+
}, never, never, never, void, AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError, never, never>, AuthenticationError | IndustrialError, SecurityMiddleware, false>;
|
|
225
|
+
declare const SubscriptionsGroup: HttpApiGroup.HttpApiGroup<"subscriptions", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, never, {
|
|
226
|
+
readonly amount: number;
|
|
227
|
+
readonly currency: string;
|
|
228
|
+
readonly metadata?: {
|
|
229
|
+
readonly [x: string]: any;
|
|
230
|
+
} | undefined;
|
|
231
|
+
readonly project_id?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
|
|
232
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
233
|
+
readonly interval: "month" | "year" | "week";
|
|
234
|
+
readonly interval_count?: number | undefined;
|
|
235
|
+
readonly auto_send_link?: boolean | undefined;
|
|
236
|
+
}, never, {
|
|
237
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
238
|
+
readonly amount: number;
|
|
239
|
+
readonly currency: string;
|
|
240
|
+
readonly metadata?: {
|
|
241
|
+
readonly [x: string]: any;
|
|
242
|
+
} | null | undefined;
|
|
243
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
244
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
245
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
246
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
247
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
248
|
+
readonly interval: "month" | "year" | "week";
|
|
249
|
+
readonly interval_count: number;
|
|
250
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
251
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
252
|
+
readonly payment_link: string;
|
|
253
|
+
readonly auto_send_link: boolean;
|
|
254
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
255
|
+
}, AuthenticationError | InternalServerError | IndustrialError, SecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"retrieve", "GET", {
|
|
256
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
257
|
+
}, never, never, never, {
|
|
258
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
259
|
+
readonly amount: number;
|
|
260
|
+
readonly currency: string;
|
|
261
|
+
readonly metadata?: {
|
|
262
|
+
readonly [x: string]: any;
|
|
263
|
+
} | null | undefined;
|
|
264
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
265
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
266
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
267
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
268
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
269
|
+
readonly interval: "month" | "year" | "week";
|
|
270
|
+
readonly interval_count: number;
|
|
271
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
272
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
273
|
+
readonly payment_link: string;
|
|
274
|
+
readonly auto_send_link: boolean;
|
|
275
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
276
|
+
}, AuthenticationError | InternalServerError | IndustrialError | NotFoundError, SecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", never, {
|
|
277
|
+
readonly status?: "active" | "past_due" | "canceled" | "paused" | undefined;
|
|
278
|
+
readonly limit?: number | undefined;
|
|
279
|
+
readonly offset?: number | undefined;
|
|
280
|
+
readonly projectId?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
|
|
281
|
+
readonly customerId?: (string & effect_Brand.Brand<"CustomerId">) | undefined;
|
|
282
|
+
}, never, never, {
|
|
283
|
+
readonly data: readonly {
|
|
284
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
285
|
+
readonly amount: number;
|
|
286
|
+
readonly currency: string;
|
|
287
|
+
readonly metadata?: {
|
|
288
|
+
readonly [x: string]: any;
|
|
289
|
+
} | null | undefined;
|
|
290
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
291
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
292
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
293
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
294
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
295
|
+
readonly interval: "month" | "year" | "week";
|
|
296
|
+
readonly interval_count: number;
|
|
297
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
298
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
299
|
+
readonly payment_link: string;
|
|
300
|
+
readonly auto_send_link: boolean;
|
|
301
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
302
|
+
}[];
|
|
303
|
+
readonly meta: {
|
|
304
|
+
readonly total: number | null;
|
|
305
|
+
readonly limit: number;
|
|
306
|
+
readonly offset: number;
|
|
307
|
+
};
|
|
308
|
+
}, AuthenticationError | InternalServerError | IndustrialError, SecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"cancel", "POST", {
|
|
309
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
310
|
+
}, never, never, never, {
|
|
311
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
312
|
+
readonly amount: number;
|
|
313
|
+
readonly currency: string;
|
|
314
|
+
readonly metadata?: {
|
|
315
|
+
readonly [x: string]: any;
|
|
316
|
+
} | null | undefined;
|
|
317
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
318
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
319
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
320
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
321
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
322
|
+
readonly interval: "month" | "year" | "week";
|
|
323
|
+
readonly interval_count: number;
|
|
324
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
325
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
326
|
+
readonly payment_link: string;
|
|
327
|
+
readonly auto_send_link: boolean;
|
|
328
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
329
|
+
}, AuthenticationError | InternalServerError | IndustrialError | NotFoundError, SecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"activate", "POST", {
|
|
330
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
331
|
+
}, never, {
|
|
332
|
+
readonly provider: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
|
|
333
|
+
readonly returnUrl: string;
|
|
334
|
+
readonly cancelUrl?: string | undefined;
|
|
335
|
+
}, never, {
|
|
336
|
+
readonly checkout_url: string;
|
|
337
|
+
readonly payment_id: string;
|
|
338
|
+
}, InternalServerError | IndustrialError | NotFoundError, never, never>, never, never, false>;
|
|
339
|
+
declare const AutomationGroup: HttpApiGroup.HttpApiGroup<"automation", HttpApiEndpoint.HttpApiEndpoint<"reminders", "POST", never, never, never, never, {
|
|
340
|
+
readonly message: string;
|
|
341
|
+
readonly count: number;
|
|
342
|
+
}, InternalServerError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"reaper", "POST", never, never, never, never, {
|
|
343
|
+
readonly message: string;
|
|
344
|
+
readonly count: number;
|
|
345
|
+
}, InternalServerError, never, never>, AuthenticationError | IndustrialError, CronSecurity, false>;
|
|
346
|
+
declare const TokensGroup: HttpApiGroup.HttpApiGroup<"tokens", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, never, {
|
|
347
|
+
readonly name: string;
|
|
348
|
+
readonly scopes: readonly string[];
|
|
349
|
+
readonly expires_in_days?: number | undefined;
|
|
350
|
+
}, never, {
|
|
351
|
+
readonly id: string & effect_Brand.Brand<"TokenId">;
|
|
352
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
353
|
+
readonly name: string;
|
|
354
|
+
readonly scopes: readonly string[];
|
|
355
|
+
readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
356
|
+
readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
357
|
+
readonly token: string;
|
|
358
|
+
}, AuthenticationError | InternalServerError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", never, never, never, never, readonly {
|
|
359
|
+
readonly id: string & effect_Brand.Brand<"TokenId">;
|
|
360
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
361
|
+
readonly name: string;
|
|
362
|
+
readonly scopes: readonly string[];
|
|
363
|
+
readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
364
|
+
readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
365
|
+
}[], AuthenticationError | InternalServerError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", {
|
|
366
|
+
readonly id: string & effect_Brand.Brand<"TokenId">;
|
|
367
|
+
}, never, never, never, null, AuthenticationError | InternalServerError | NotFoundError, never, never>, AuthenticationError | IndustrialError, UserSecurity, false>;
|
|
368
|
+
declare const PayArkApi: HttpApi.HttpApi<"PayArkApi", HttpApiGroup.HttpApiGroup<"checkout", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, never, {
|
|
369
|
+
readonly amount: number;
|
|
370
|
+
readonly currency: string;
|
|
371
|
+
readonly provider: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
|
|
372
|
+
readonly returnUrl: string;
|
|
373
|
+
readonly cancelUrl?: string | undefined;
|
|
374
|
+
readonly metadata?: {
|
|
375
|
+
readonly [x: string]: any;
|
|
376
|
+
} | undefined;
|
|
377
|
+
}, never, {
|
|
378
|
+
readonly id: string & effect_Brand.Brand<"CheckoutSessionId">;
|
|
379
|
+
readonly checkout_url: string;
|
|
380
|
+
readonly payment_method: {
|
|
381
|
+
readonly type: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
|
|
382
|
+
readonly url?: string | undefined;
|
|
383
|
+
readonly method?: "POST" | "GET" | undefined;
|
|
384
|
+
readonly fields?: {
|
|
385
|
+
readonly [x: string]: string;
|
|
386
|
+
} | undefined;
|
|
387
|
+
};
|
|
388
|
+
}, AuthenticationError | InternalServerError | IndustrialError, never, never>, AuthenticationError | IndustrialError, SecurityMiddleware, false> | HttpApiGroup.HttpApiGroup<"payments", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", never, {
|
|
389
|
+
readonly limit?: number | undefined;
|
|
390
|
+
readonly offset?: number | undefined;
|
|
391
|
+
readonly projectId?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
|
|
392
|
+
}, never, never, {
|
|
393
|
+
readonly data: readonly {
|
|
394
|
+
readonly id: string & effect_Brand.Brand<"PaymentId">;
|
|
395
|
+
readonly amount: number;
|
|
396
|
+
readonly currency: string;
|
|
397
|
+
readonly status: "pending" | "success" | "failed";
|
|
398
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
399
|
+
readonly provider_ref?: string | null | undefined;
|
|
400
|
+
readonly metadata_json?: {
|
|
401
|
+
readonly [x: string]: any;
|
|
402
|
+
} | null | undefined;
|
|
403
|
+
readonly gateway_response?: any;
|
|
404
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
405
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
406
|
+
}[];
|
|
407
|
+
readonly meta: {
|
|
408
|
+
readonly total: number | null;
|
|
409
|
+
readonly limit: number;
|
|
410
|
+
readonly offset: number;
|
|
411
|
+
};
|
|
412
|
+
}, AuthenticationError | InternalServerError | IndustrialError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"retrieve", "GET", {
|
|
413
|
+
readonly id: string & effect_Brand.Brand<"Id">;
|
|
414
|
+
}, never, never, never, {
|
|
415
|
+
readonly id: string & effect_Brand.Brand<"PaymentId">;
|
|
416
|
+
readonly amount: number;
|
|
417
|
+
readonly currency: string;
|
|
418
|
+
readonly status: "pending" | "success" | "failed";
|
|
419
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
420
|
+
readonly provider_ref?: string | null | undefined;
|
|
421
|
+
readonly metadata_json?: {
|
|
422
|
+
readonly [x: string]: any;
|
|
423
|
+
} | null | undefined;
|
|
424
|
+
readonly gateway_response?: any;
|
|
425
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
426
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
427
|
+
}, AuthenticationError | InternalServerError | IndustrialError | NotFoundError, never, never>, AuthenticationError | IndustrialError, SecurityMiddleware, false> | HttpApiGroup.HttpApiGroup<"customers", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, never, {
|
|
428
|
+
readonly metadata?: {
|
|
429
|
+
readonly [x: string]: any;
|
|
430
|
+
} | undefined;
|
|
431
|
+
readonly project_id?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
|
|
432
|
+
readonly merchant_customer_id: string;
|
|
433
|
+
readonly email?: string | undefined;
|
|
434
|
+
readonly name?: string | undefined;
|
|
435
|
+
readonly phone?: string | undefined;
|
|
436
|
+
}, never, {
|
|
437
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
438
|
+
readonly metadata: {
|
|
439
|
+
readonly [x: string]: any;
|
|
440
|
+
} | null;
|
|
441
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
442
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
443
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
444
|
+
readonly merchant_customer_id: string;
|
|
445
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
446
|
+
readonly name: string | null;
|
|
447
|
+
readonly phone: string | null;
|
|
448
|
+
}, AuthenticationError | InternalServerError | IndustrialError | ConflictError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"retrieve", "GET", {
|
|
449
|
+
readonly id: string & effect_Brand.Brand<"Id">;
|
|
450
|
+
}, never, never, never, {
|
|
451
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
452
|
+
readonly metadata: {
|
|
453
|
+
readonly [x: string]: any;
|
|
454
|
+
} | null;
|
|
455
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
456
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
457
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
458
|
+
readonly merchant_customer_id: string;
|
|
459
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
460
|
+
readonly name: string | null;
|
|
461
|
+
readonly phone: string | null;
|
|
462
|
+
}, AuthenticationError | InternalServerError | IndustrialError | NotFoundError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"update", "PATCH", {
|
|
463
|
+
readonly id: string & effect_Brand.Brand<"Id">;
|
|
464
|
+
}, never, {
|
|
465
|
+
readonly metadata?: {
|
|
466
|
+
readonly [x: string]: any;
|
|
467
|
+
} | undefined;
|
|
468
|
+
readonly email?: string | undefined;
|
|
469
|
+
readonly name?: string | undefined;
|
|
470
|
+
readonly phone?: string | undefined;
|
|
471
|
+
}, never, {
|
|
472
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
473
|
+
readonly metadata: {
|
|
474
|
+
readonly [x: string]: any;
|
|
475
|
+
} | null;
|
|
476
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
477
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
478
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
479
|
+
readonly merchant_customer_id: string;
|
|
480
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
481
|
+
readonly name: string | null;
|
|
482
|
+
readonly phone: string | null;
|
|
483
|
+
}, AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", {
|
|
484
|
+
readonly id: string & effect_Brand.Brand<"Id">;
|
|
485
|
+
}, never, never, never, void, AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError, never, never>, AuthenticationError | IndustrialError, SecurityMiddleware, false> | HttpApiGroup.HttpApiGroup<"subscriptions", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, never, {
|
|
486
|
+
readonly amount: number;
|
|
487
|
+
readonly currency: string;
|
|
488
|
+
readonly metadata?: {
|
|
489
|
+
readonly [x: string]: any;
|
|
490
|
+
} | undefined;
|
|
491
|
+
readonly project_id?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
|
|
492
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
493
|
+
readonly interval: "month" | "year" | "week";
|
|
494
|
+
readonly interval_count?: number | undefined;
|
|
495
|
+
readonly auto_send_link?: boolean | undefined;
|
|
496
|
+
}, never, {
|
|
497
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
498
|
+
readonly amount: number;
|
|
499
|
+
readonly currency: string;
|
|
500
|
+
readonly metadata?: {
|
|
501
|
+
readonly [x: string]: any;
|
|
502
|
+
} | null | undefined;
|
|
503
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
504
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
505
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
506
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
507
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
508
|
+
readonly interval: "month" | "year" | "week";
|
|
509
|
+
readonly interval_count: number;
|
|
510
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
511
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
512
|
+
readonly payment_link: string;
|
|
513
|
+
readonly auto_send_link: boolean;
|
|
514
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
515
|
+
}, AuthenticationError | InternalServerError | IndustrialError, SecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"retrieve", "GET", {
|
|
516
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
517
|
+
}, never, never, never, {
|
|
518
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
519
|
+
readonly amount: number;
|
|
520
|
+
readonly currency: string;
|
|
521
|
+
readonly metadata?: {
|
|
522
|
+
readonly [x: string]: any;
|
|
523
|
+
} | null | undefined;
|
|
524
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
525
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
526
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
527
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
528
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
529
|
+
readonly interval: "month" | "year" | "week";
|
|
530
|
+
readonly interval_count: number;
|
|
531
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
532
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
533
|
+
readonly payment_link: string;
|
|
534
|
+
readonly auto_send_link: boolean;
|
|
535
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
536
|
+
}, AuthenticationError | InternalServerError | IndustrialError | NotFoundError, SecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", never, {
|
|
537
|
+
readonly status?: "active" | "past_due" | "canceled" | "paused" | undefined;
|
|
538
|
+
readonly limit?: number | undefined;
|
|
539
|
+
readonly offset?: number | undefined;
|
|
540
|
+
readonly projectId?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
|
|
541
|
+
readonly customerId?: (string & effect_Brand.Brand<"CustomerId">) | undefined;
|
|
542
|
+
}, never, never, {
|
|
543
|
+
readonly data: readonly {
|
|
544
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
545
|
+
readonly amount: number;
|
|
546
|
+
readonly currency: string;
|
|
547
|
+
readonly metadata?: {
|
|
548
|
+
readonly [x: string]: any;
|
|
549
|
+
} | null | undefined;
|
|
550
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
551
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
552
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
553
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
554
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
555
|
+
readonly interval: "month" | "year" | "week";
|
|
556
|
+
readonly interval_count: number;
|
|
557
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
558
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
559
|
+
readonly payment_link: string;
|
|
560
|
+
readonly auto_send_link: boolean;
|
|
561
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
562
|
+
}[];
|
|
563
|
+
readonly meta: {
|
|
564
|
+
readonly total: number | null;
|
|
565
|
+
readonly limit: number;
|
|
566
|
+
readonly offset: number;
|
|
567
|
+
};
|
|
568
|
+
}, AuthenticationError | InternalServerError | IndustrialError, SecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"cancel", "POST", {
|
|
569
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
570
|
+
}, never, never, never, {
|
|
571
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
572
|
+
readonly amount: number;
|
|
573
|
+
readonly currency: string;
|
|
574
|
+
readonly metadata?: {
|
|
575
|
+
readonly [x: string]: any;
|
|
576
|
+
} | null | undefined;
|
|
577
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
578
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
579
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
580
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
581
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
582
|
+
readonly interval: "month" | "year" | "week";
|
|
583
|
+
readonly interval_count: number;
|
|
584
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
585
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
586
|
+
readonly payment_link: string;
|
|
587
|
+
readonly auto_send_link: boolean;
|
|
588
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
589
|
+
}, AuthenticationError | InternalServerError | IndustrialError | NotFoundError, SecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"activate", "POST", {
|
|
590
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
591
|
+
}, never, {
|
|
592
|
+
readonly provider: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
|
|
593
|
+
readonly returnUrl: string;
|
|
594
|
+
readonly cancelUrl?: string | undefined;
|
|
595
|
+
}, never, {
|
|
596
|
+
readonly checkout_url: string;
|
|
597
|
+
readonly payment_id: string;
|
|
598
|
+
}, InternalServerError | IndustrialError | NotFoundError, never, never>, never, never, false> | HttpApiGroup.HttpApiGroup<"automation", HttpApiEndpoint.HttpApiEndpoint<"reminders", "POST", never, never, never, never, {
|
|
599
|
+
readonly message: string;
|
|
600
|
+
readonly count: number;
|
|
601
|
+
}, InternalServerError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"reaper", "POST", never, never, never, never, {
|
|
602
|
+
readonly message: string;
|
|
603
|
+
readonly count: number;
|
|
604
|
+
}, InternalServerError, never, never>, AuthenticationError | IndustrialError, CronSecurity, false> | HttpApiGroup.HttpApiGroup<"tokens", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, never, {
|
|
605
|
+
readonly name: string;
|
|
606
|
+
readonly scopes: readonly string[];
|
|
607
|
+
readonly expires_in_days?: number | undefined;
|
|
608
|
+
}, never, {
|
|
609
|
+
readonly id: string & effect_Brand.Brand<"TokenId">;
|
|
610
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
611
|
+
readonly name: string;
|
|
612
|
+
readonly scopes: readonly string[];
|
|
613
|
+
readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
614
|
+
readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
615
|
+
readonly token: string;
|
|
616
|
+
}, AuthenticationError | InternalServerError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", never, never, never, never, readonly {
|
|
617
|
+
readonly id: string & effect_Brand.Brand<"TokenId">;
|
|
618
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
619
|
+
readonly name: string;
|
|
620
|
+
readonly scopes: readonly string[];
|
|
621
|
+
readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
622
|
+
readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
623
|
+
}[], AuthenticationError | InternalServerError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", {
|
|
624
|
+
readonly id: string & effect_Brand.Brand<"TokenId">;
|
|
625
|
+
}, never, never, never, null, AuthenticationError | InternalServerError | NotFoundError, never, never>, AuthenticationError | IndustrialError, UserSecurity, false>, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError, never>;
|
|
626
|
+
|
|
30
627
|
/**
|
|
31
|
-
* Branded
|
|
628
|
+
* ── Branded Types ──
|
|
32
629
|
*/
|
|
630
|
+
declare const Id: Schema.brand<typeof Schema.String, "Id">;
|
|
631
|
+
type Id = Schema.Schema.Type<typeof Id>;
|
|
632
|
+
declare const ProjectId: Schema.brand<typeof Schema.String, "ProjectId">;
|
|
633
|
+
type ProjectId = Schema.Schema.Type<typeof ProjectId>;
|
|
634
|
+
declare const PaymentId: Schema.brand<typeof Schema.String, "PaymentId">;
|
|
635
|
+
type PaymentId = Schema.Schema.Type<typeof PaymentId>;
|
|
33
636
|
declare const CheckoutSessionId: Schema.brand<typeof Schema.String, "CheckoutSessionId">;
|
|
34
637
|
type CheckoutSessionId = Schema.Schema.Type<typeof CheckoutSessionId>;
|
|
638
|
+
declare const SubscriptionId: Schema.brand<typeof Schema.String, "SubscriptionId">;
|
|
639
|
+
type SubscriptionId = Schema.Schema.Type<typeof SubscriptionId>;
|
|
640
|
+
declare const CustomerId: Schema.brand<typeof Schema.String, "CustomerId">;
|
|
641
|
+
type CustomerId = Schema.Schema.Type<typeof CustomerId>;
|
|
642
|
+
declare const TokenId: Schema.brand<typeof Schema.String, "TokenId">;
|
|
643
|
+
type TokenId = Schema.Schema.Type<typeof TokenId>;
|
|
35
644
|
/**
|
|
36
|
-
*
|
|
645
|
+
* ── Atomic Atoms ──
|
|
37
646
|
*/
|
|
38
|
-
declare const
|
|
39
|
-
type
|
|
647
|
+
declare const Email: Schema.brand<Schema.filter<typeof Schema.String>, "Email">;
|
|
648
|
+
type Email = Schema.Schema.Type<typeof Email>;
|
|
649
|
+
declare const Timestamp: Schema.brand<typeof Schema.String, "Timestamp">;
|
|
650
|
+
type Timestamp = Schema.Schema.Type<typeof Timestamp>;
|
|
651
|
+
declare const Metadata: Schema.Record$<typeof Schema.String, typeof Schema.Any>;
|
|
652
|
+
type Metadata = Schema.Schema.Type<typeof Metadata>;
|
|
653
|
+
declare const Timestamps: Schema.Struct<{
|
|
654
|
+
created_at: Schema.brand<typeof Schema.String, "Timestamp">;
|
|
655
|
+
updated_at: Schema.brand<typeof Schema.String, "Timestamp">;
|
|
656
|
+
}>;
|
|
657
|
+
type Timestamps = Schema.Schema.Type<typeof Timestamps>;
|
|
40
658
|
/**
|
|
41
|
-
*
|
|
659
|
+
* ── Enums ──
|
|
42
660
|
*/
|
|
43
|
-
declare const
|
|
44
|
-
type
|
|
661
|
+
declare const Provider: Schema.Literal<["esewa", "khalti", "connectips", "imepay", "fonepay", "sandbox"]>;
|
|
662
|
+
type Provider = Schema.Schema.Type<typeof Provider>;
|
|
663
|
+
declare const PaymentStatus: Schema.Literal<["pending", "success", "failed"]>;
|
|
664
|
+
type PaymentStatus = Schema.Schema.Type<typeof PaymentStatus>;
|
|
665
|
+
declare const SubscriptionStatus: Schema.Literal<["active", "past_due", "canceled", "paused"]>;
|
|
666
|
+
type SubscriptionStatus = Schema.Schema.Type<typeof SubscriptionStatus>;
|
|
667
|
+
declare const SubscriptionInterval: Schema.Literal<["month", "year", "week"]>;
|
|
668
|
+
type SubscriptionInterval = Schema.Schema.Type<typeof SubscriptionInterval>;
|
|
45
669
|
/**
|
|
46
|
-
*
|
|
670
|
+
* ── Models ──
|
|
47
671
|
*/
|
|
48
|
-
declare const
|
|
672
|
+
declare const Customer: Schema.Struct<{
|
|
673
|
+
id: Schema.brand<typeof Schema.String, "CustomerId">;
|
|
674
|
+
merchant_customer_id: typeof Schema.String;
|
|
675
|
+
email: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "Email">>;
|
|
676
|
+
name: Schema.NullOr<typeof Schema.String>;
|
|
677
|
+
phone: Schema.NullOr<typeof Schema.String>;
|
|
678
|
+
project_id: Schema.brand<typeof Schema.String, "ProjectId">;
|
|
679
|
+
metadata: Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
|
|
680
|
+
created_at: Schema.brand<typeof Schema.String, "Timestamp">;
|
|
681
|
+
updated_at: Schema.optional<Schema.brand<typeof Schema.String, "Timestamp">>;
|
|
682
|
+
}>;
|
|
683
|
+
type Customer = Schema.Schema.Type<typeof Customer>;
|
|
684
|
+
declare const Payment: Schema.Struct<{
|
|
685
|
+
id: Schema.brand<typeof Schema.String, "PaymentId">;
|
|
686
|
+
project_id: Schema.brand<typeof Schema.String, "ProjectId">;
|
|
49
687
|
amount: typeof Schema.Number;
|
|
688
|
+
currency: typeof Schema.String;
|
|
689
|
+
status: Schema.Literal<["pending", "success", "failed"]>;
|
|
690
|
+
provider_ref: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
691
|
+
metadata_json: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
692
|
+
gateway_response: Schema.optional<Schema.NullOr<typeof Schema.Any>>;
|
|
693
|
+
created_at: Schema.brand<typeof Schema.String, "Timestamp">;
|
|
694
|
+
updated_at: Schema.optional<Schema.brand<typeof Schema.String, "Timestamp">>;
|
|
695
|
+
}>;
|
|
696
|
+
type Payment = Schema.Schema.Type<typeof Payment>;
|
|
697
|
+
declare const Subscription: Schema.Struct<{
|
|
698
|
+
id: Schema.brand<typeof Schema.String, "SubscriptionId">;
|
|
699
|
+
project_id: Schema.brand<typeof Schema.String, "ProjectId">;
|
|
700
|
+
customer_id: Schema.brand<typeof Schema.String, "CustomerId">;
|
|
701
|
+
status: Schema.Literal<["active", "past_due", "canceled", "paused"]>;
|
|
702
|
+
amount: typeof Schema.Number;
|
|
703
|
+
currency: typeof Schema.String;
|
|
704
|
+
interval: Schema.Literal<["month", "year", "week"]>;
|
|
705
|
+
interval_count: typeof Schema.Number;
|
|
706
|
+
current_period_start: Schema.brand<typeof Schema.String, "Timestamp">;
|
|
707
|
+
current_period_end: Schema.brand<typeof Schema.String, "Timestamp">;
|
|
708
|
+
payment_link: typeof Schema.String;
|
|
709
|
+
auto_send_link: typeof Schema.Boolean;
|
|
710
|
+
metadata: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
711
|
+
canceled_at: Schema.optional<Schema.NullOr<Schema.brand<typeof Schema.String, "Timestamp">>>;
|
|
712
|
+
created_at: Schema.brand<typeof Schema.String, "Timestamp">;
|
|
713
|
+
updated_at: Schema.optional<Schema.brand<typeof Schema.String, "Timestamp">>;
|
|
714
|
+
}>;
|
|
715
|
+
type Subscription = Schema.Schema.Type<typeof Subscription>;
|
|
716
|
+
declare const Project: Schema.Struct<{
|
|
717
|
+
id: Schema.brand<typeof Schema.String, "ProjectId">;
|
|
718
|
+
name: typeof Schema.String;
|
|
719
|
+
api_key_secret: typeof Schema.String;
|
|
720
|
+
created_at: Schema.brand<typeof Schema.String, "Timestamp">;
|
|
721
|
+
}>;
|
|
722
|
+
type Project = Schema.Schema.Type<typeof Project>;
|
|
723
|
+
declare const Token: Schema.Struct<{
|
|
724
|
+
id: Schema.brand<typeof Schema.String, "TokenId">;
|
|
725
|
+
name: typeof Schema.String;
|
|
726
|
+
scopes: Schema.Array$<typeof Schema.String>;
|
|
727
|
+
last_used_at: Schema.NullOr<Schema.brand<typeof Schema.String, "Timestamp">>;
|
|
728
|
+
expires_at: Schema.NullOr<Schema.brand<typeof Schema.String, "Timestamp">>;
|
|
729
|
+
created_at: Schema.brand<typeof Schema.String, "Timestamp">;
|
|
730
|
+
}>;
|
|
731
|
+
type Token = Schema.Schema.Type<typeof Token>;
|
|
732
|
+
/**
|
|
733
|
+
* ── Pagination ──
|
|
734
|
+
*/
|
|
735
|
+
declare const PaginationMeta: Schema.Struct<{
|
|
736
|
+
total: Schema.NullOr<typeof Schema.Number>;
|
|
737
|
+
limit: typeof Schema.Number;
|
|
738
|
+
offset: typeof Schema.Number;
|
|
739
|
+
}>;
|
|
740
|
+
type PaginationMeta = Schema.Schema.Type<typeof PaginationMeta>;
|
|
741
|
+
declare const PaginatedResponse: <A, I, R>(schema: Schema.Schema<A, I, R>) => Schema.Struct<{
|
|
742
|
+
data: Schema.Array$<Schema.Schema<A, I, R>>;
|
|
743
|
+
meta: Schema.Struct<{
|
|
744
|
+
total: Schema.NullOr<typeof Schema.Number>;
|
|
745
|
+
limit: typeof Schema.Number;
|
|
746
|
+
offset: typeof Schema.Number;
|
|
747
|
+
}>;
|
|
748
|
+
}>;
|
|
749
|
+
interface PaginatedResponse<T> {
|
|
750
|
+
readonly data: readonly T[];
|
|
751
|
+
readonly meta: PaginationMeta;
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* ── Params & Inputs ──
|
|
755
|
+
*/
|
|
756
|
+
declare const CreateCheckoutParams: Schema.Struct<{
|
|
757
|
+
amount: Schema.filter<typeof Schema.Number>;
|
|
50
758
|
currency: Schema.optionalWith<typeof Schema.String, {
|
|
51
|
-
default: () =>
|
|
759
|
+
default: () => string;
|
|
52
760
|
}>;
|
|
53
761
|
provider: Schema.Literal<["esewa", "khalti", "connectips", "imepay", "fonepay", "sandbox"]>;
|
|
54
762
|
returnUrl: typeof Schema.String;
|
|
55
763
|
cancelUrl: Schema.optional<typeof Schema.String>;
|
|
56
764
|
metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
|
|
57
765
|
}>;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
*/
|
|
61
|
-
declare const CheckoutSessionSchema: Schema.Struct<{
|
|
766
|
+
type CreateCheckoutParams = Schema.Schema.Type<typeof CreateCheckoutParams>;
|
|
767
|
+
declare const CheckoutSession: Schema.Struct<{
|
|
62
768
|
id: Schema.brand<typeof Schema.String, "CheckoutSessionId">;
|
|
63
769
|
checkout_url: typeof Schema.String;
|
|
64
770
|
payment_method: Schema.Struct<{
|
|
65
771
|
type: Schema.Literal<["esewa", "khalti", "connectips", "imepay", "fonepay", "sandbox"]>;
|
|
66
772
|
url: Schema.optional<typeof Schema.String>;
|
|
67
|
-
method: Schema.optional<Schema.
|
|
773
|
+
method: Schema.optional<Schema.Literal<["GET", "POST"]>>;
|
|
68
774
|
fields: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
|
|
69
775
|
}>;
|
|
70
776
|
}>;
|
|
777
|
+
type CheckoutSession = Schema.Schema.Type<typeof CheckoutSession>;
|
|
778
|
+
declare const CreateCustomerParams: Schema.Struct<{
|
|
779
|
+
merchant_customer_id: typeof Schema.String;
|
|
780
|
+
email: Schema.optional<typeof Schema.String>;
|
|
781
|
+
name: Schema.optional<typeof Schema.String>;
|
|
782
|
+
phone: Schema.optional<typeof Schema.String>;
|
|
783
|
+
project_id: Schema.optional<Schema.brand<typeof Schema.String, "ProjectId">>;
|
|
784
|
+
metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
|
|
785
|
+
}>;
|
|
786
|
+
type CreateCustomerParams = Schema.Schema.Type<typeof CreateCustomerParams>;
|
|
787
|
+
declare const ListPaymentsParams: Schema.Struct<{
|
|
788
|
+
limit: Schema.optional<typeof Schema.NumberFromString>;
|
|
789
|
+
offset: Schema.optional<typeof Schema.NumberFromString>;
|
|
790
|
+
projectId: Schema.optional<Schema.brand<typeof Schema.String, "ProjectId">>;
|
|
791
|
+
}>;
|
|
792
|
+
type ListPaymentsParams = Schema.Schema.Type<typeof ListPaymentsParams>;
|
|
793
|
+
declare const ListCustomersParams: Schema.Struct<{
|
|
794
|
+
limit: Schema.optional<typeof Schema.NumberFromString>;
|
|
795
|
+
offset: Schema.optional<typeof Schema.NumberFromString>;
|
|
796
|
+
email: Schema.optional<typeof Schema.String>;
|
|
797
|
+
projectId: Schema.optional<Schema.brand<typeof Schema.String, "ProjectId">>;
|
|
798
|
+
}>;
|
|
799
|
+
type ListCustomersParams = Schema.Schema.Type<typeof ListCustomersParams>;
|
|
800
|
+
declare const UpdateCustomerParams: Schema.Struct<{
|
|
801
|
+
email: Schema.optional<typeof Schema.String>;
|
|
802
|
+
name: Schema.optional<typeof Schema.String>;
|
|
803
|
+
phone: Schema.optional<typeof Schema.String>;
|
|
804
|
+
metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
|
|
805
|
+
}>;
|
|
806
|
+
type UpdateCustomerParams = Schema.Schema.Type<typeof UpdateCustomerParams>;
|
|
807
|
+
declare const CreateSubscriptionParams: Schema.Struct<{
|
|
808
|
+
customer_id: Schema.brand<typeof Schema.String, "CustomerId">;
|
|
809
|
+
amount: Schema.filter<typeof Schema.Number>;
|
|
810
|
+
currency: Schema.optionalWith<typeof Schema.String, {
|
|
811
|
+
default: () => string;
|
|
812
|
+
}>;
|
|
813
|
+
interval: Schema.Literal<["month", "year", "week"]>;
|
|
814
|
+
interval_count: Schema.optional<typeof Schema.Number>;
|
|
815
|
+
project_id: Schema.optional<Schema.brand<typeof Schema.String, "ProjectId">>;
|
|
816
|
+
auto_send_link: Schema.optional<typeof Schema.Boolean>;
|
|
817
|
+
metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
|
|
818
|
+
}>;
|
|
819
|
+
type CreateSubscriptionParams = Schema.Schema.Type<typeof CreateSubscriptionParams>;
|
|
820
|
+
declare const ListSubscriptionsParams: Schema.Struct<{
|
|
821
|
+
limit: Schema.optional<typeof Schema.NumberFromString>;
|
|
822
|
+
offset: Schema.optional<typeof Schema.NumberFromString>;
|
|
823
|
+
projectId: Schema.optional<Schema.brand<typeof Schema.String, "ProjectId">>;
|
|
824
|
+
customerId: Schema.optional<Schema.brand<typeof Schema.String, "CustomerId">>;
|
|
825
|
+
status: Schema.optional<Schema.Literal<["active", "past_due", "canceled", "paused"]>>;
|
|
826
|
+
}>;
|
|
827
|
+
type ListSubscriptionsParams = Schema.Schema.Type<typeof ListSubscriptionsParams>;
|
|
71
828
|
/**
|
|
72
|
-
*
|
|
829
|
+
* ── Client Config ──
|
|
73
830
|
*/
|
|
74
|
-
declare const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
provider_ref: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
81
|
-
metadata_json: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
82
|
-
gateway_response: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
83
|
-
created_at: typeof Schema.String;
|
|
84
|
-
updated_at: Schema.optional<typeof Schema.String>;
|
|
831
|
+
declare const PayArkConfig: Schema.Struct<{
|
|
832
|
+
apiKey: typeof Schema.String;
|
|
833
|
+
baseUrl: Schema.optional<typeof Schema.String>;
|
|
834
|
+
timeout: Schema.optional<typeof Schema.Number>;
|
|
835
|
+
maxRetries: Schema.optional<typeof Schema.Number>;
|
|
836
|
+
sandbox: Schema.optional<typeof Schema.Boolean>;
|
|
85
837
|
}>;
|
|
838
|
+
type PayArkConfig = Schema.Schema.Type<typeof PayArkConfig>;
|
|
86
839
|
/**
|
|
87
|
-
*
|
|
840
|
+
* ── Webhooks ──
|
|
88
841
|
*/
|
|
89
|
-
declare const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
842
|
+
declare const WebhookEventType: Schema.Literal<["payment.success", "payment.failed", "subscription.created", "subscription.payment_succeeded", "subscription.payment_failed", "subscription.renewal_due", "subscription.canceled"]>;
|
|
843
|
+
type WebhookEventType = Schema.Schema.Type<typeof WebhookEventType>;
|
|
844
|
+
declare const WebhookEvent: Schema.Struct<{
|
|
845
|
+
type: Schema.Literal<["payment.success", "payment.failed", "subscription.created", "subscription.payment_succeeded", "subscription.payment_failed", "subscription.renewal_due", "subscription.canceled"]>;
|
|
846
|
+
id: Schema.optional<typeof Schema.String>;
|
|
847
|
+
data: Schema.Union<[Schema.Struct<{
|
|
848
|
+
id: Schema.brand<typeof Schema.String, "PaymentId">;
|
|
849
|
+
project_id: Schema.brand<typeof Schema.String, "ProjectId">;
|
|
850
|
+
amount: typeof Schema.Number;
|
|
851
|
+
currency: typeof Schema.String;
|
|
852
|
+
status: Schema.Literal<["pending", "success", "failed"]>;
|
|
853
|
+
provider_ref: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
854
|
+
metadata_json: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
855
|
+
gateway_response: Schema.optional<Schema.NullOr<typeof Schema.Any>>;
|
|
856
|
+
created_at: Schema.brand<typeof Schema.String, "Timestamp">;
|
|
857
|
+
updated_at: Schema.optional<Schema.brand<typeof Schema.String, "Timestamp">>;
|
|
858
|
+
}>, Schema.Struct<{
|
|
859
|
+
id: Schema.brand<typeof Schema.String, "SubscriptionId">;
|
|
860
|
+
project_id: Schema.brand<typeof Schema.String, "ProjectId">;
|
|
861
|
+
customer_id: Schema.brand<typeof Schema.String, "CustomerId">;
|
|
862
|
+
status: Schema.Literal<["active", "past_due", "canceled", "paused"]>;
|
|
863
|
+
amount: typeof Schema.Number;
|
|
864
|
+
currency: typeof Schema.String;
|
|
865
|
+
interval: Schema.Literal<["month", "year", "week"]>;
|
|
866
|
+
interval_count: typeof Schema.Number;
|
|
867
|
+
current_period_start: Schema.brand<typeof Schema.String, "Timestamp">;
|
|
868
|
+
current_period_end: Schema.brand<typeof Schema.String, "Timestamp">;
|
|
869
|
+
payment_link: typeof Schema.String;
|
|
870
|
+
auto_send_link: typeof Schema.Boolean;
|
|
871
|
+
metadata: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
|
|
872
|
+
canceled_at: Schema.optional<Schema.NullOr<Schema.brand<typeof Schema.String, "Timestamp">>>;
|
|
873
|
+
created_at: Schema.brand<typeof Schema.String, "Timestamp">;
|
|
874
|
+
updated_at: Schema.optional<Schema.brand<typeof Schema.String, "Timestamp">>;
|
|
875
|
+
}>, Schema.Struct<{
|
|
876
|
+
id: Schema.brand<typeof Schema.String, "CustomerId">;
|
|
877
|
+
merchant_customer_id: typeof Schema.String;
|
|
878
|
+
email: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "Email">>;
|
|
879
|
+
name: Schema.NullOr<typeof Schema.String>;
|
|
880
|
+
phone: Schema.NullOr<typeof Schema.String>;
|
|
881
|
+
project_id: Schema.brand<typeof Schema.String, "ProjectId">;
|
|
882
|
+
metadata: Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
|
|
883
|
+
created_at: Schema.brand<typeof Schema.String, "Timestamp">;
|
|
884
|
+
updated_at: Schema.optional<Schema.brand<typeof Schema.String, "Timestamp">>;
|
|
885
|
+
}>, Schema.Struct<{
|
|
886
|
+
id: typeof Schema.String;
|
|
887
|
+
amount: Schema.optional<typeof Schema.Number>;
|
|
888
|
+
currency: Schema.optional<typeof Schema.String>;
|
|
889
|
+
status: typeof Schema.String;
|
|
890
|
+
metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
|
|
891
|
+
}>]>;
|
|
892
|
+
is_test: typeof Schema.Boolean;
|
|
893
|
+
created: Schema.optional<typeof Schema.Number>;
|
|
94
894
|
}>;
|
|
895
|
+
type WebhookEvent = Schema.Schema.Type<typeof WebhookEvent>;
|
|
95
896
|
/**
|
|
96
|
-
*
|
|
897
|
+
* ── Error Schemas ──
|
|
97
898
|
*/
|
|
98
|
-
declare const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
total: Schema.NullOr<typeof Schema.Number>;
|
|
102
|
-
limit: typeof Schema.Number;
|
|
103
|
-
offset: typeof Schema.Number;
|
|
104
|
-
}>;
|
|
899
|
+
declare const PayArkErrorBody$1: Schema.Struct<{
|
|
900
|
+
error: typeof Schema.String;
|
|
901
|
+
details: Schema.optional<typeof Schema.Any>;
|
|
105
902
|
}>;
|
|
106
|
-
type
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
903
|
+
type PayArkErrorBody$1 = Schema.Schema.Type<typeof PayArkErrorBody$1>;
|
|
904
|
+
|
|
905
|
+
/** Machine-readable error codes. */
|
|
906
|
+
type PayArkErrorCode = "authentication_error" | "permission_error" | "invalid_request_error" | "not_found_error" | "rate_limit_error" | "api_error" | "connection_error" | "unknown_error";
|
|
907
|
+
/** Raw error payload from the API. */
|
|
908
|
+
interface PayArkErrorBody {
|
|
909
|
+
readonly error: string;
|
|
910
|
+
readonly details?: any;
|
|
911
|
+
}
|
|
912
|
+
declare const PayArkEffectError_base: new <A extends Record<string, any> = {}>(args: effect_Types.Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => effect_Cause.YieldableError & {
|
|
913
|
+
readonly _tag: "PayArkEffectError";
|
|
914
|
+
} & Readonly<A>;
|
|
915
|
+
/**
|
|
916
|
+
* Effect-compatible error class for PayArk SDK.
|
|
917
|
+
* Extends Data.TaggedError for easy matching in Effect.catchTag.
|
|
918
|
+
*/
|
|
919
|
+
declare class PayArkEffectError extends PayArkEffectError_base<{
|
|
920
|
+
readonly message: string;
|
|
921
|
+
readonly statusCode: number;
|
|
922
|
+
readonly code: PayArkErrorCode;
|
|
923
|
+
readonly raw?: PayArkErrorBody;
|
|
924
|
+
}> {
|
|
925
|
+
/** Human-readable representation for logging/debugging. */
|
|
926
|
+
toString(): string;
|
|
116
927
|
}
|
|
117
928
|
|
|
118
929
|
/**
|
|
@@ -167,7 +978,1075 @@ declare class ProjectsEffect {
|
|
|
167
978
|
}
|
|
168
979
|
|
|
169
980
|
/**
|
|
170
|
-
*
|
|
981
|
+
* The Industrial SDK Client.
|
|
982
|
+
* Automatically derived from the PayArk HttpApi specification.
|
|
983
|
+
*
|
|
984
|
+
* This provides perfect type-sync between the server and client.
|
|
985
|
+
*/
|
|
986
|
+
declare const makeClient: (options?: {
|
|
987
|
+
readonly baseUrl?: string;
|
|
988
|
+
readonly httpClient?: HttpClient.HttpClient;
|
|
989
|
+
}) => Effect.Effect<{
|
|
990
|
+
readonly checkout: {
|
|
991
|
+
readonly create: <WithResponse extends boolean = false>(request: {
|
|
992
|
+
readonly payload: {
|
|
993
|
+
readonly amount: number;
|
|
994
|
+
readonly currency: string;
|
|
995
|
+
readonly provider: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
|
|
996
|
+
readonly returnUrl: string;
|
|
997
|
+
readonly cancelUrl?: string | undefined;
|
|
998
|
+
readonly metadata?: {
|
|
999
|
+
readonly [x: string]: any;
|
|
1000
|
+
} | undefined;
|
|
1001
|
+
};
|
|
1002
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1003
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1004
|
+
readonly id: string & effect_Brand.Brand<"CheckoutSessionId">;
|
|
1005
|
+
readonly checkout_url: string;
|
|
1006
|
+
readonly payment_method: {
|
|
1007
|
+
readonly type: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
|
|
1008
|
+
readonly url?: string | undefined;
|
|
1009
|
+
readonly method?: "POST" | "GET" | undefined;
|
|
1010
|
+
readonly fields?: {
|
|
1011
|
+
readonly [x: string]: string;
|
|
1012
|
+
} | undefined;
|
|
1013
|
+
};
|
|
1014
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1015
|
+
readonly id: string & effect_Brand.Brand<"CheckoutSessionId">;
|
|
1016
|
+
readonly checkout_url: string;
|
|
1017
|
+
readonly payment_method: {
|
|
1018
|
+
readonly type: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
|
|
1019
|
+
readonly url?: string | undefined;
|
|
1020
|
+
readonly method?: "POST" | "GET" | undefined;
|
|
1021
|
+
readonly fields?: {
|
|
1022
|
+
readonly [x: string]: string;
|
|
1023
|
+
} | undefined;
|
|
1024
|
+
};
|
|
1025
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1026
|
+
};
|
|
1027
|
+
readonly payments: {
|
|
1028
|
+
readonly list: <WithResponse extends boolean = false>(request: {
|
|
1029
|
+
readonly urlParams: {
|
|
1030
|
+
readonly limit?: number | undefined;
|
|
1031
|
+
readonly offset?: number | undefined;
|
|
1032
|
+
readonly projectId?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
|
|
1033
|
+
};
|
|
1034
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1035
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1036
|
+
readonly data: readonly {
|
|
1037
|
+
readonly id: string & effect_Brand.Brand<"PaymentId">;
|
|
1038
|
+
readonly amount: number;
|
|
1039
|
+
readonly currency: string;
|
|
1040
|
+
readonly status: "pending" | "success" | "failed";
|
|
1041
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1042
|
+
readonly provider_ref?: string | null | undefined;
|
|
1043
|
+
readonly metadata_json?: {
|
|
1044
|
+
readonly [x: string]: any;
|
|
1045
|
+
} | null | undefined;
|
|
1046
|
+
readonly gateway_response?: any;
|
|
1047
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1048
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1049
|
+
}[];
|
|
1050
|
+
readonly meta: {
|
|
1051
|
+
readonly total: number | null;
|
|
1052
|
+
readonly limit: number;
|
|
1053
|
+
readonly offset: number;
|
|
1054
|
+
};
|
|
1055
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1056
|
+
readonly data: readonly {
|
|
1057
|
+
readonly id: string & effect_Brand.Brand<"PaymentId">;
|
|
1058
|
+
readonly amount: number;
|
|
1059
|
+
readonly currency: string;
|
|
1060
|
+
readonly status: "pending" | "success" | "failed";
|
|
1061
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1062
|
+
readonly provider_ref?: string | null | undefined;
|
|
1063
|
+
readonly metadata_json?: {
|
|
1064
|
+
readonly [x: string]: any;
|
|
1065
|
+
} | null | undefined;
|
|
1066
|
+
readonly gateway_response?: any;
|
|
1067
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1068
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1069
|
+
}[];
|
|
1070
|
+
readonly meta: {
|
|
1071
|
+
readonly total: number | null;
|
|
1072
|
+
readonly limit: number;
|
|
1073
|
+
readonly offset: number;
|
|
1074
|
+
};
|
|
1075
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1076
|
+
readonly retrieve: <WithResponse extends boolean = false>(request: {
|
|
1077
|
+
readonly path: {
|
|
1078
|
+
readonly id: string & effect_Brand.Brand<"Id">;
|
|
1079
|
+
};
|
|
1080
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1081
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1082
|
+
readonly id: string & effect_Brand.Brand<"PaymentId">;
|
|
1083
|
+
readonly amount: number;
|
|
1084
|
+
readonly currency: string;
|
|
1085
|
+
readonly status: "pending" | "success" | "failed";
|
|
1086
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1087
|
+
readonly provider_ref?: string | null | undefined;
|
|
1088
|
+
readonly metadata_json?: {
|
|
1089
|
+
readonly [x: string]: any;
|
|
1090
|
+
} | null | undefined;
|
|
1091
|
+
readonly gateway_response?: any;
|
|
1092
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1093
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1094
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1095
|
+
readonly id: string & effect_Brand.Brand<"PaymentId">;
|
|
1096
|
+
readonly amount: number;
|
|
1097
|
+
readonly currency: string;
|
|
1098
|
+
readonly status: "pending" | "success" | "failed";
|
|
1099
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1100
|
+
readonly provider_ref?: string | null | undefined;
|
|
1101
|
+
readonly metadata_json?: {
|
|
1102
|
+
readonly [x: string]: any;
|
|
1103
|
+
} | null | undefined;
|
|
1104
|
+
readonly gateway_response?: any;
|
|
1105
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1106
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1107
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1108
|
+
};
|
|
1109
|
+
readonly customers: {
|
|
1110
|
+
readonly create: <WithResponse extends boolean = false>(request: {
|
|
1111
|
+
readonly payload: {
|
|
1112
|
+
readonly metadata?: {
|
|
1113
|
+
readonly [x: string]: any;
|
|
1114
|
+
} | undefined;
|
|
1115
|
+
readonly project_id?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
|
|
1116
|
+
readonly merchant_customer_id: string;
|
|
1117
|
+
readonly email?: string | undefined;
|
|
1118
|
+
readonly name?: string | undefined;
|
|
1119
|
+
readonly phone?: string | undefined;
|
|
1120
|
+
};
|
|
1121
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1122
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1123
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
1124
|
+
readonly metadata: {
|
|
1125
|
+
readonly [x: string]: any;
|
|
1126
|
+
} | null;
|
|
1127
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1128
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1129
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1130
|
+
readonly merchant_customer_id: string;
|
|
1131
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
1132
|
+
readonly name: string | null;
|
|
1133
|
+
readonly phone: string | null;
|
|
1134
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1135
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
1136
|
+
readonly metadata: {
|
|
1137
|
+
readonly [x: string]: any;
|
|
1138
|
+
} | null;
|
|
1139
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1140
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1141
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1142
|
+
readonly merchant_customer_id: string;
|
|
1143
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
1144
|
+
readonly name: string | null;
|
|
1145
|
+
readonly phone: string | null;
|
|
1146
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1147
|
+
readonly retrieve: <WithResponse extends boolean = false>(request: {
|
|
1148
|
+
readonly path: {
|
|
1149
|
+
readonly id: string & effect_Brand.Brand<"Id">;
|
|
1150
|
+
};
|
|
1151
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1152
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1153
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
1154
|
+
readonly metadata: {
|
|
1155
|
+
readonly [x: string]: any;
|
|
1156
|
+
} | null;
|
|
1157
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1158
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1159
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1160
|
+
readonly merchant_customer_id: string;
|
|
1161
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
1162
|
+
readonly name: string | null;
|
|
1163
|
+
readonly phone: string | null;
|
|
1164
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1165
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
1166
|
+
readonly metadata: {
|
|
1167
|
+
readonly [x: string]: any;
|
|
1168
|
+
} | null;
|
|
1169
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1170
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1171
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1172
|
+
readonly merchant_customer_id: string;
|
|
1173
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
1174
|
+
readonly name: string | null;
|
|
1175
|
+
readonly phone: string | null;
|
|
1176
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1177
|
+
readonly update: <WithResponse extends boolean = false>(request: {
|
|
1178
|
+
readonly path: {
|
|
1179
|
+
readonly id: string & effect_Brand.Brand<"Id">;
|
|
1180
|
+
};
|
|
1181
|
+
readonly payload: {
|
|
1182
|
+
readonly metadata?: {
|
|
1183
|
+
readonly [x: string]: any;
|
|
1184
|
+
} | undefined;
|
|
1185
|
+
readonly email?: string | undefined;
|
|
1186
|
+
readonly name?: string | undefined;
|
|
1187
|
+
readonly phone?: string | undefined;
|
|
1188
|
+
};
|
|
1189
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1190
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1191
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
1192
|
+
readonly metadata: {
|
|
1193
|
+
readonly [x: string]: any;
|
|
1194
|
+
} | null;
|
|
1195
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1196
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1197
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1198
|
+
readonly merchant_customer_id: string;
|
|
1199
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
1200
|
+
readonly name: string | null;
|
|
1201
|
+
readonly phone: string | null;
|
|
1202
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1203
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
1204
|
+
readonly metadata: {
|
|
1205
|
+
readonly [x: string]: any;
|
|
1206
|
+
} | null;
|
|
1207
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1208
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1209
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1210
|
+
readonly merchant_customer_id: string;
|
|
1211
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
1212
|
+
readonly name: string | null;
|
|
1213
|
+
readonly phone: string | null;
|
|
1214
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1215
|
+
readonly delete: <WithResponse extends boolean = false>(request: {
|
|
1216
|
+
readonly path: {
|
|
1217
|
+
readonly id: string & effect_Brand.Brand<"Id">;
|
|
1218
|
+
};
|
|
1219
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1220
|
+
}) => Effect.Effect<WithResponse extends true ? [void, _effect_platform_HttpClientResponse.HttpClientResponse] : void, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1221
|
+
};
|
|
1222
|
+
readonly subscriptions: {
|
|
1223
|
+
readonly create: <WithResponse extends boolean = false>(request: {
|
|
1224
|
+
readonly payload: {
|
|
1225
|
+
readonly amount: number;
|
|
1226
|
+
readonly currency: string;
|
|
1227
|
+
readonly metadata?: {
|
|
1228
|
+
readonly [x: string]: any;
|
|
1229
|
+
} | undefined;
|
|
1230
|
+
readonly project_id?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
|
|
1231
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1232
|
+
readonly interval: "month" | "year" | "week";
|
|
1233
|
+
readonly interval_count?: number | undefined;
|
|
1234
|
+
readonly auto_send_link?: boolean | undefined;
|
|
1235
|
+
};
|
|
1236
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1237
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1238
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1239
|
+
readonly amount: number;
|
|
1240
|
+
readonly currency: string;
|
|
1241
|
+
readonly metadata?: {
|
|
1242
|
+
readonly [x: string]: any;
|
|
1243
|
+
} | null | undefined;
|
|
1244
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
1245
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1246
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1247
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1248
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1249
|
+
readonly interval: "month" | "year" | "week";
|
|
1250
|
+
readonly interval_count: number;
|
|
1251
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
1252
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
1253
|
+
readonly payment_link: string;
|
|
1254
|
+
readonly auto_send_link: boolean;
|
|
1255
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
1256
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1257
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1258
|
+
readonly amount: number;
|
|
1259
|
+
readonly currency: string;
|
|
1260
|
+
readonly metadata?: {
|
|
1261
|
+
readonly [x: string]: any;
|
|
1262
|
+
} | null | undefined;
|
|
1263
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
1264
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1265
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1266
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1267
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1268
|
+
readonly interval: "month" | "year" | "week";
|
|
1269
|
+
readonly interval_count: number;
|
|
1270
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
1271
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
1272
|
+
readonly payment_link: string;
|
|
1273
|
+
readonly auto_send_link: boolean;
|
|
1274
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
1275
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1276
|
+
readonly retrieve: <WithResponse extends boolean = false>(request: {
|
|
1277
|
+
readonly path: {
|
|
1278
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1279
|
+
};
|
|
1280
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1281
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1282
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1283
|
+
readonly amount: number;
|
|
1284
|
+
readonly currency: string;
|
|
1285
|
+
readonly metadata?: {
|
|
1286
|
+
readonly [x: string]: any;
|
|
1287
|
+
} | null | undefined;
|
|
1288
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
1289
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1290
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1291
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1292
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1293
|
+
readonly interval: "month" | "year" | "week";
|
|
1294
|
+
readonly interval_count: number;
|
|
1295
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
1296
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
1297
|
+
readonly payment_link: string;
|
|
1298
|
+
readonly auto_send_link: boolean;
|
|
1299
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
1300
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1301
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1302
|
+
readonly amount: number;
|
|
1303
|
+
readonly currency: string;
|
|
1304
|
+
readonly metadata?: {
|
|
1305
|
+
readonly [x: string]: any;
|
|
1306
|
+
} | null | undefined;
|
|
1307
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
1308
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1309
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1310
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1311
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1312
|
+
readonly interval: "month" | "year" | "week";
|
|
1313
|
+
readonly interval_count: number;
|
|
1314
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
1315
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
1316
|
+
readonly payment_link: string;
|
|
1317
|
+
readonly auto_send_link: boolean;
|
|
1318
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
1319
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1320
|
+
readonly list: <WithResponse extends boolean = false>(request: {
|
|
1321
|
+
readonly urlParams: {
|
|
1322
|
+
readonly status?: "active" | "past_due" | "canceled" | "paused" | undefined;
|
|
1323
|
+
readonly limit?: number | undefined;
|
|
1324
|
+
readonly offset?: number | undefined;
|
|
1325
|
+
readonly projectId?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
|
|
1326
|
+
readonly customerId?: (string & effect_Brand.Brand<"CustomerId">) | undefined;
|
|
1327
|
+
};
|
|
1328
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1329
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1330
|
+
readonly data: readonly {
|
|
1331
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1332
|
+
readonly amount: number;
|
|
1333
|
+
readonly currency: string;
|
|
1334
|
+
readonly metadata?: {
|
|
1335
|
+
readonly [x: string]: any;
|
|
1336
|
+
} | null | undefined;
|
|
1337
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
1338
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1339
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1340
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1341
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1342
|
+
readonly interval: "month" | "year" | "week";
|
|
1343
|
+
readonly interval_count: number;
|
|
1344
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
1345
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
1346
|
+
readonly payment_link: string;
|
|
1347
|
+
readonly auto_send_link: boolean;
|
|
1348
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
1349
|
+
}[];
|
|
1350
|
+
readonly meta: {
|
|
1351
|
+
readonly total: number | null;
|
|
1352
|
+
readonly limit: number;
|
|
1353
|
+
readonly offset: number;
|
|
1354
|
+
};
|
|
1355
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1356
|
+
readonly data: readonly {
|
|
1357
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1358
|
+
readonly amount: number;
|
|
1359
|
+
readonly currency: string;
|
|
1360
|
+
readonly metadata?: {
|
|
1361
|
+
readonly [x: string]: any;
|
|
1362
|
+
} | null | undefined;
|
|
1363
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
1364
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1365
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1366
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1367
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1368
|
+
readonly interval: "month" | "year" | "week";
|
|
1369
|
+
readonly interval_count: number;
|
|
1370
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
1371
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
1372
|
+
readonly payment_link: string;
|
|
1373
|
+
readonly auto_send_link: boolean;
|
|
1374
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
1375
|
+
}[];
|
|
1376
|
+
readonly meta: {
|
|
1377
|
+
readonly total: number | null;
|
|
1378
|
+
readonly limit: number;
|
|
1379
|
+
readonly offset: number;
|
|
1380
|
+
};
|
|
1381
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1382
|
+
readonly cancel: <WithResponse extends boolean = false>(request: {
|
|
1383
|
+
readonly path: {
|
|
1384
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1385
|
+
};
|
|
1386
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1387
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1388
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1389
|
+
readonly amount: number;
|
|
1390
|
+
readonly currency: string;
|
|
1391
|
+
readonly metadata?: {
|
|
1392
|
+
readonly [x: string]: any;
|
|
1393
|
+
} | null | undefined;
|
|
1394
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
1395
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1396
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1397
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1398
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1399
|
+
readonly interval: "month" | "year" | "week";
|
|
1400
|
+
readonly interval_count: number;
|
|
1401
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
1402
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
1403
|
+
readonly payment_link: string;
|
|
1404
|
+
readonly auto_send_link: boolean;
|
|
1405
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
1406
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1407
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1408
|
+
readonly amount: number;
|
|
1409
|
+
readonly currency: string;
|
|
1410
|
+
readonly metadata?: {
|
|
1411
|
+
readonly [x: string]: any;
|
|
1412
|
+
} | null | undefined;
|
|
1413
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
1414
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1415
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1416
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1417
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1418
|
+
readonly interval: "month" | "year" | "week";
|
|
1419
|
+
readonly interval_count: number;
|
|
1420
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
1421
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
1422
|
+
readonly payment_link: string;
|
|
1423
|
+
readonly auto_send_link: boolean;
|
|
1424
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
1425
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1426
|
+
readonly activate: <WithResponse extends boolean = false>(request: {
|
|
1427
|
+
readonly path: {
|
|
1428
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1429
|
+
};
|
|
1430
|
+
readonly payload: {
|
|
1431
|
+
readonly provider: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
|
|
1432
|
+
readonly returnUrl: string;
|
|
1433
|
+
readonly cancelUrl?: string | undefined;
|
|
1434
|
+
};
|
|
1435
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1436
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1437
|
+
readonly checkout_url: string;
|
|
1438
|
+
readonly payment_id: string;
|
|
1439
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1440
|
+
readonly checkout_url: string;
|
|
1441
|
+
readonly payment_id: string;
|
|
1442
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1443
|
+
};
|
|
1444
|
+
readonly automation: {
|
|
1445
|
+
readonly reminders: <WithResponse extends boolean = false>(request: void | {
|
|
1446
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1447
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1448
|
+
readonly message: string;
|
|
1449
|
+
readonly count: number;
|
|
1450
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1451
|
+
readonly message: string;
|
|
1452
|
+
readonly count: number;
|
|
1453
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1454
|
+
readonly reaper: <WithResponse extends boolean = false>(request: void | {
|
|
1455
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1456
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1457
|
+
readonly message: string;
|
|
1458
|
+
readonly count: number;
|
|
1459
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1460
|
+
readonly message: string;
|
|
1461
|
+
readonly count: number;
|
|
1462
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1463
|
+
};
|
|
1464
|
+
readonly tokens: {
|
|
1465
|
+
readonly create: <WithResponse extends boolean = false>(request: {
|
|
1466
|
+
readonly payload: {
|
|
1467
|
+
readonly name: string;
|
|
1468
|
+
readonly scopes: readonly string[];
|
|
1469
|
+
readonly expires_in_days?: number | undefined;
|
|
1470
|
+
};
|
|
1471
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1472
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1473
|
+
readonly id: string & effect_Brand.Brand<"TokenId">;
|
|
1474
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1475
|
+
readonly name: string;
|
|
1476
|
+
readonly scopes: readonly string[];
|
|
1477
|
+
readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
1478
|
+
readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
1479
|
+
readonly token: string;
|
|
1480
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1481
|
+
readonly id: string & effect_Brand.Brand<"TokenId">;
|
|
1482
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1483
|
+
readonly name: string;
|
|
1484
|
+
readonly scopes: readonly string[];
|
|
1485
|
+
readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
1486
|
+
readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
1487
|
+
readonly token: string;
|
|
1488
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1489
|
+
readonly list: <WithResponse extends boolean = false>(request: void | {
|
|
1490
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1491
|
+
}) => Effect.Effect<WithResponse extends true ? [readonly {
|
|
1492
|
+
readonly id: string & effect_Brand.Brand<"TokenId">;
|
|
1493
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1494
|
+
readonly name: string;
|
|
1495
|
+
readonly scopes: readonly string[];
|
|
1496
|
+
readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
1497
|
+
readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
1498
|
+
}[], _effect_platform_HttpClientResponse.HttpClientResponse] : readonly {
|
|
1499
|
+
readonly id: string & effect_Brand.Brand<"TokenId">;
|
|
1500
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1501
|
+
readonly name: string;
|
|
1502
|
+
readonly scopes: readonly string[];
|
|
1503
|
+
readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
1504
|
+
readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
1505
|
+
}[], _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1506
|
+
readonly delete: <WithResponse extends boolean = false>(request: {
|
|
1507
|
+
readonly path: {
|
|
1508
|
+
readonly id: string & effect_Brand.Brand<"TokenId">;
|
|
1509
|
+
};
|
|
1510
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1511
|
+
}) => Effect.Effect<WithResponse extends true ? [null, _effect_platform_HttpClientResponse.HttpClientResponse] : null, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1512
|
+
};
|
|
1513
|
+
}, never, HttpClient.HttpClient>;
|
|
1514
|
+
declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-effect/PayArkClient", {
|
|
1515
|
+
readonly checkout: {
|
|
1516
|
+
readonly create: <WithResponse extends boolean = false>(request: {
|
|
1517
|
+
readonly payload: {
|
|
1518
|
+
readonly amount: number;
|
|
1519
|
+
readonly currency: string;
|
|
1520
|
+
readonly provider: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
|
|
1521
|
+
readonly returnUrl: string;
|
|
1522
|
+
readonly cancelUrl?: string | undefined;
|
|
1523
|
+
readonly metadata?: {
|
|
1524
|
+
readonly [x: string]: any;
|
|
1525
|
+
} | undefined;
|
|
1526
|
+
};
|
|
1527
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1528
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1529
|
+
readonly id: string & effect_Brand.Brand<"CheckoutSessionId">;
|
|
1530
|
+
readonly checkout_url: string;
|
|
1531
|
+
readonly payment_method: {
|
|
1532
|
+
readonly type: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
|
|
1533
|
+
readonly url?: string | undefined;
|
|
1534
|
+
readonly method?: "POST" | "GET" | undefined;
|
|
1535
|
+
readonly fields?: {
|
|
1536
|
+
readonly [x: string]: string;
|
|
1537
|
+
} | undefined;
|
|
1538
|
+
};
|
|
1539
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1540
|
+
readonly id: string & effect_Brand.Brand<"CheckoutSessionId">;
|
|
1541
|
+
readonly checkout_url: string;
|
|
1542
|
+
readonly payment_method: {
|
|
1543
|
+
readonly type: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
|
|
1544
|
+
readonly url?: string | undefined;
|
|
1545
|
+
readonly method?: "POST" | "GET" | undefined;
|
|
1546
|
+
readonly fields?: {
|
|
1547
|
+
readonly [x: string]: string;
|
|
1548
|
+
} | undefined;
|
|
1549
|
+
};
|
|
1550
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1551
|
+
};
|
|
1552
|
+
readonly payments: {
|
|
1553
|
+
readonly list: <WithResponse extends boolean = false>(request: {
|
|
1554
|
+
readonly urlParams: {
|
|
1555
|
+
readonly limit?: number | undefined;
|
|
1556
|
+
readonly offset?: number | undefined;
|
|
1557
|
+
readonly projectId?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
|
|
1558
|
+
};
|
|
1559
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1560
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1561
|
+
readonly data: readonly {
|
|
1562
|
+
readonly id: string & effect_Brand.Brand<"PaymentId">;
|
|
1563
|
+
readonly amount: number;
|
|
1564
|
+
readonly currency: string;
|
|
1565
|
+
readonly status: "pending" | "success" | "failed";
|
|
1566
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1567
|
+
readonly provider_ref?: string | null | undefined;
|
|
1568
|
+
readonly metadata_json?: {
|
|
1569
|
+
readonly [x: string]: any;
|
|
1570
|
+
} | null | undefined;
|
|
1571
|
+
readonly gateway_response?: any;
|
|
1572
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1573
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1574
|
+
}[];
|
|
1575
|
+
readonly meta: {
|
|
1576
|
+
readonly total: number | null;
|
|
1577
|
+
readonly limit: number;
|
|
1578
|
+
readonly offset: number;
|
|
1579
|
+
};
|
|
1580
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1581
|
+
readonly data: readonly {
|
|
1582
|
+
readonly id: string & effect_Brand.Brand<"PaymentId">;
|
|
1583
|
+
readonly amount: number;
|
|
1584
|
+
readonly currency: string;
|
|
1585
|
+
readonly status: "pending" | "success" | "failed";
|
|
1586
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1587
|
+
readonly provider_ref?: string | null | undefined;
|
|
1588
|
+
readonly metadata_json?: {
|
|
1589
|
+
readonly [x: string]: any;
|
|
1590
|
+
} | null | undefined;
|
|
1591
|
+
readonly gateway_response?: any;
|
|
1592
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1593
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1594
|
+
}[];
|
|
1595
|
+
readonly meta: {
|
|
1596
|
+
readonly total: number | null;
|
|
1597
|
+
readonly limit: number;
|
|
1598
|
+
readonly offset: number;
|
|
1599
|
+
};
|
|
1600
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1601
|
+
readonly retrieve: <WithResponse extends boolean = false>(request: {
|
|
1602
|
+
readonly path: {
|
|
1603
|
+
readonly id: string & effect_Brand.Brand<"Id">;
|
|
1604
|
+
};
|
|
1605
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1606
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1607
|
+
readonly id: string & effect_Brand.Brand<"PaymentId">;
|
|
1608
|
+
readonly amount: number;
|
|
1609
|
+
readonly currency: string;
|
|
1610
|
+
readonly status: "pending" | "success" | "failed";
|
|
1611
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1612
|
+
readonly provider_ref?: string | null | undefined;
|
|
1613
|
+
readonly metadata_json?: {
|
|
1614
|
+
readonly [x: string]: any;
|
|
1615
|
+
} | null | undefined;
|
|
1616
|
+
readonly gateway_response?: any;
|
|
1617
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1618
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1619
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1620
|
+
readonly id: string & effect_Brand.Brand<"PaymentId">;
|
|
1621
|
+
readonly amount: number;
|
|
1622
|
+
readonly currency: string;
|
|
1623
|
+
readonly status: "pending" | "success" | "failed";
|
|
1624
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1625
|
+
readonly provider_ref?: string | null | undefined;
|
|
1626
|
+
readonly metadata_json?: {
|
|
1627
|
+
readonly [x: string]: any;
|
|
1628
|
+
} | null | undefined;
|
|
1629
|
+
readonly gateway_response?: any;
|
|
1630
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1631
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1632
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1633
|
+
};
|
|
1634
|
+
readonly customers: {
|
|
1635
|
+
readonly create: <WithResponse extends boolean = false>(request: {
|
|
1636
|
+
readonly payload: {
|
|
1637
|
+
readonly metadata?: {
|
|
1638
|
+
readonly [x: string]: any;
|
|
1639
|
+
} | undefined;
|
|
1640
|
+
readonly project_id?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
|
|
1641
|
+
readonly merchant_customer_id: string;
|
|
1642
|
+
readonly email?: string | undefined;
|
|
1643
|
+
readonly name?: string | undefined;
|
|
1644
|
+
readonly phone?: string | undefined;
|
|
1645
|
+
};
|
|
1646
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1647
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1648
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
1649
|
+
readonly metadata: {
|
|
1650
|
+
readonly [x: string]: any;
|
|
1651
|
+
} | null;
|
|
1652
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1653
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1654
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1655
|
+
readonly merchant_customer_id: string;
|
|
1656
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
1657
|
+
readonly name: string | null;
|
|
1658
|
+
readonly phone: string | null;
|
|
1659
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1660
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
1661
|
+
readonly metadata: {
|
|
1662
|
+
readonly [x: string]: any;
|
|
1663
|
+
} | null;
|
|
1664
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1665
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1666
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1667
|
+
readonly merchant_customer_id: string;
|
|
1668
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
1669
|
+
readonly name: string | null;
|
|
1670
|
+
readonly phone: string | null;
|
|
1671
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1672
|
+
readonly retrieve: <WithResponse extends boolean = false>(request: {
|
|
1673
|
+
readonly path: {
|
|
1674
|
+
readonly id: string & effect_Brand.Brand<"Id">;
|
|
1675
|
+
};
|
|
1676
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1677
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1678
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
1679
|
+
readonly metadata: {
|
|
1680
|
+
readonly [x: string]: any;
|
|
1681
|
+
} | null;
|
|
1682
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1683
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1684
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1685
|
+
readonly merchant_customer_id: string;
|
|
1686
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
1687
|
+
readonly name: string | null;
|
|
1688
|
+
readonly phone: string | null;
|
|
1689
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1690
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
1691
|
+
readonly metadata: {
|
|
1692
|
+
readonly [x: string]: any;
|
|
1693
|
+
} | null;
|
|
1694
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1695
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1696
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1697
|
+
readonly merchant_customer_id: string;
|
|
1698
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
1699
|
+
readonly name: string | null;
|
|
1700
|
+
readonly phone: string | null;
|
|
1701
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1702
|
+
readonly update: <WithResponse extends boolean = false>(request: {
|
|
1703
|
+
readonly path: {
|
|
1704
|
+
readonly id: string & effect_Brand.Brand<"Id">;
|
|
1705
|
+
};
|
|
1706
|
+
readonly payload: {
|
|
1707
|
+
readonly metadata?: {
|
|
1708
|
+
readonly [x: string]: any;
|
|
1709
|
+
} | undefined;
|
|
1710
|
+
readonly email?: string | undefined;
|
|
1711
|
+
readonly name?: string | undefined;
|
|
1712
|
+
readonly phone?: string | undefined;
|
|
1713
|
+
};
|
|
1714
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1715
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1716
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
1717
|
+
readonly metadata: {
|
|
1718
|
+
readonly [x: string]: any;
|
|
1719
|
+
} | null;
|
|
1720
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1721
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1722
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1723
|
+
readonly merchant_customer_id: string;
|
|
1724
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
1725
|
+
readonly name: string | null;
|
|
1726
|
+
readonly phone: string | null;
|
|
1727
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1728
|
+
readonly id: string & effect_Brand.Brand<"CustomerId">;
|
|
1729
|
+
readonly metadata: {
|
|
1730
|
+
readonly [x: string]: any;
|
|
1731
|
+
} | null;
|
|
1732
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1733
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1734
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1735
|
+
readonly merchant_customer_id: string;
|
|
1736
|
+
readonly email: (string & effect_Brand.Brand<"Email">) | null;
|
|
1737
|
+
readonly name: string | null;
|
|
1738
|
+
readonly phone: string | null;
|
|
1739
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1740
|
+
readonly delete: <WithResponse extends boolean = false>(request: {
|
|
1741
|
+
readonly path: {
|
|
1742
|
+
readonly id: string & effect_Brand.Brand<"Id">;
|
|
1743
|
+
};
|
|
1744
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1745
|
+
}) => Effect.Effect<WithResponse extends true ? [void, _effect_platform_HttpClientResponse.HttpClientResponse] : void, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1746
|
+
};
|
|
1747
|
+
readonly subscriptions: {
|
|
1748
|
+
readonly create: <WithResponse extends boolean = false>(request: {
|
|
1749
|
+
readonly payload: {
|
|
1750
|
+
readonly amount: number;
|
|
1751
|
+
readonly currency: string;
|
|
1752
|
+
readonly metadata?: {
|
|
1753
|
+
readonly [x: string]: any;
|
|
1754
|
+
} | undefined;
|
|
1755
|
+
readonly project_id?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
|
|
1756
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1757
|
+
readonly interval: "month" | "year" | "week";
|
|
1758
|
+
readonly interval_count?: number | undefined;
|
|
1759
|
+
readonly auto_send_link?: boolean | undefined;
|
|
1760
|
+
};
|
|
1761
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1762
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1763
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1764
|
+
readonly amount: number;
|
|
1765
|
+
readonly currency: string;
|
|
1766
|
+
readonly metadata?: {
|
|
1767
|
+
readonly [x: string]: any;
|
|
1768
|
+
} | null | undefined;
|
|
1769
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
1770
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1771
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1772
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1773
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1774
|
+
readonly interval: "month" | "year" | "week";
|
|
1775
|
+
readonly interval_count: number;
|
|
1776
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
1777
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
1778
|
+
readonly payment_link: string;
|
|
1779
|
+
readonly auto_send_link: boolean;
|
|
1780
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
1781
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1782
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1783
|
+
readonly amount: number;
|
|
1784
|
+
readonly currency: string;
|
|
1785
|
+
readonly metadata?: {
|
|
1786
|
+
readonly [x: string]: any;
|
|
1787
|
+
} | null | undefined;
|
|
1788
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
1789
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1790
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1791
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1792
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1793
|
+
readonly interval: "month" | "year" | "week";
|
|
1794
|
+
readonly interval_count: number;
|
|
1795
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
1796
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
1797
|
+
readonly payment_link: string;
|
|
1798
|
+
readonly auto_send_link: boolean;
|
|
1799
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
1800
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1801
|
+
readonly retrieve: <WithResponse extends boolean = false>(request: {
|
|
1802
|
+
readonly path: {
|
|
1803
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1804
|
+
};
|
|
1805
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1806
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1807
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1808
|
+
readonly amount: number;
|
|
1809
|
+
readonly currency: string;
|
|
1810
|
+
readonly metadata?: {
|
|
1811
|
+
readonly [x: string]: any;
|
|
1812
|
+
} | null | undefined;
|
|
1813
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
1814
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1815
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1816
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1817
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1818
|
+
readonly interval: "month" | "year" | "week";
|
|
1819
|
+
readonly interval_count: number;
|
|
1820
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
1821
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
1822
|
+
readonly payment_link: string;
|
|
1823
|
+
readonly auto_send_link: boolean;
|
|
1824
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
1825
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1826
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1827
|
+
readonly amount: number;
|
|
1828
|
+
readonly currency: string;
|
|
1829
|
+
readonly metadata?: {
|
|
1830
|
+
readonly [x: string]: any;
|
|
1831
|
+
} | null | undefined;
|
|
1832
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
1833
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1834
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1835
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1836
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1837
|
+
readonly interval: "month" | "year" | "week";
|
|
1838
|
+
readonly interval_count: number;
|
|
1839
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
1840
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
1841
|
+
readonly payment_link: string;
|
|
1842
|
+
readonly auto_send_link: boolean;
|
|
1843
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
1844
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1845
|
+
readonly list: <WithResponse extends boolean = false>(request: {
|
|
1846
|
+
readonly urlParams: {
|
|
1847
|
+
readonly status?: "active" | "past_due" | "canceled" | "paused" | undefined;
|
|
1848
|
+
readonly limit?: number | undefined;
|
|
1849
|
+
readonly offset?: number | undefined;
|
|
1850
|
+
readonly projectId?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
|
|
1851
|
+
readonly customerId?: (string & effect_Brand.Brand<"CustomerId">) | undefined;
|
|
1852
|
+
};
|
|
1853
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1854
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1855
|
+
readonly data: readonly {
|
|
1856
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1857
|
+
readonly amount: number;
|
|
1858
|
+
readonly currency: string;
|
|
1859
|
+
readonly metadata?: {
|
|
1860
|
+
readonly [x: string]: any;
|
|
1861
|
+
} | null | undefined;
|
|
1862
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
1863
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1864
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1865
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1866
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1867
|
+
readonly interval: "month" | "year" | "week";
|
|
1868
|
+
readonly interval_count: number;
|
|
1869
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
1870
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
1871
|
+
readonly payment_link: string;
|
|
1872
|
+
readonly auto_send_link: boolean;
|
|
1873
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
1874
|
+
}[];
|
|
1875
|
+
readonly meta: {
|
|
1876
|
+
readonly total: number | null;
|
|
1877
|
+
readonly limit: number;
|
|
1878
|
+
readonly offset: number;
|
|
1879
|
+
};
|
|
1880
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1881
|
+
readonly data: readonly {
|
|
1882
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1883
|
+
readonly amount: number;
|
|
1884
|
+
readonly currency: string;
|
|
1885
|
+
readonly metadata?: {
|
|
1886
|
+
readonly [x: string]: any;
|
|
1887
|
+
} | null | undefined;
|
|
1888
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
1889
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1890
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1891
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1892
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1893
|
+
readonly interval: "month" | "year" | "week";
|
|
1894
|
+
readonly interval_count: number;
|
|
1895
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
1896
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
1897
|
+
readonly payment_link: string;
|
|
1898
|
+
readonly auto_send_link: boolean;
|
|
1899
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
1900
|
+
}[];
|
|
1901
|
+
readonly meta: {
|
|
1902
|
+
readonly total: number | null;
|
|
1903
|
+
readonly limit: number;
|
|
1904
|
+
readonly offset: number;
|
|
1905
|
+
};
|
|
1906
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1907
|
+
readonly cancel: <WithResponse extends boolean = false>(request: {
|
|
1908
|
+
readonly path: {
|
|
1909
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1910
|
+
};
|
|
1911
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1912
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1913
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1914
|
+
readonly amount: number;
|
|
1915
|
+
readonly currency: string;
|
|
1916
|
+
readonly metadata?: {
|
|
1917
|
+
readonly [x: string]: any;
|
|
1918
|
+
} | null | undefined;
|
|
1919
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
1920
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1921
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1922
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1923
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1924
|
+
readonly interval: "month" | "year" | "week";
|
|
1925
|
+
readonly interval_count: number;
|
|
1926
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
1927
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
1928
|
+
readonly payment_link: string;
|
|
1929
|
+
readonly auto_send_link: boolean;
|
|
1930
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
1931
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1932
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1933
|
+
readonly amount: number;
|
|
1934
|
+
readonly currency: string;
|
|
1935
|
+
readonly metadata?: {
|
|
1936
|
+
readonly [x: string]: any;
|
|
1937
|
+
} | null | undefined;
|
|
1938
|
+
readonly status: "active" | "past_due" | "canceled" | "paused";
|
|
1939
|
+
readonly project_id: string & effect_Brand.Brand<"ProjectId">;
|
|
1940
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
1941
|
+
readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
|
|
1942
|
+
readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
|
|
1943
|
+
readonly interval: "month" | "year" | "week";
|
|
1944
|
+
readonly interval_count: number;
|
|
1945
|
+
readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
|
|
1946
|
+
readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
|
|
1947
|
+
readonly payment_link: string;
|
|
1948
|
+
readonly auto_send_link: boolean;
|
|
1949
|
+
readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
|
|
1950
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1951
|
+
readonly activate: <WithResponse extends boolean = false>(request: {
|
|
1952
|
+
readonly path: {
|
|
1953
|
+
readonly id: string & effect_Brand.Brand<"SubscriptionId">;
|
|
1954
|
+
};
|
|
1955
|
+
readonly payload: {
|
|
1956
|
+
readonly provider: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
|
|
1957
|
+
readonly returnUrl: string;
|
|
1958
|
+
readonly cancelUrl?: string | undefined;
|
|
1959
|
+
};
|
|
1960
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1961
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1962
|
+
readonly checkout_url: string;
|
|
1963
|
+
readonly payment_id: string;
|
|
1964
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1965
|
+
readonly checkout_url: string;
|
|
1966
|
+
readonly payment_id: string;
|
|
1967
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1968
|
+
};
|
|
1969
|
+
readonly automation: {
|
|
1970
|
+
readonly reminders: <WithResponse extends boolean = false>(request: void | {
|
|
1971
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1972
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1973
|
+
readonly message: string;
|
|
1974
|
+
readonly count: number;
|
|
1975
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1976
|
+
readonly message: string;
|
|
1977
|
+
readonly count: number;
|
|
1978
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1979
|
+
readonly reaper: <WithResponse extends boolean = false>(request: void | {
|
|
1980
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1981
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1982
|
+
readonly message: string;
|
|
1983
|
+
readonly count: number;
|
|
1984
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
1985
|
+
readonly message: string;
|
|
1986
|
+
readonly count: number;
|
|
1987
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
1988
|
+
};
|
|
1989
|
+
readonly tokens: {
|
|
1990
|
+
readonly create: <WithResponse extends boolean = false>(request: {
|
|
1991
|
+
readonly payload: {
|
|
1992
|
+
readonly name: string;
|
|
1993
|
+
readonly scopes: readonly string[];
|
|
1994
|
+
readonly expires_in_days?: number | undefined;
|
|
1995
|
+
};
|
|
1996
|
+
readonly withResponse?: WithResponse | undefined;
|
|
1997
|
+
}) => Effect.Effect<WithResponse extends true ? [{
|
|
1998
|
+
readonly id: string & effect_Brand.Brand<"TokenId">;
|
|
1999
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
2000
|
+
readonly name: string;
|
|
2001
|
+
readonly scopes: readonly string[];
|
|
2002
|
+
readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
2003
|
+
readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
2004
|
+
readonly token: string;
|
|
2005
|
+
}, _effect_platform_HttpClientResponse.HttpClientResponse] : {
|
|
2006
|
+
readonly id: string & effect_Brand.Brand<"TokenId">;
|
|
2007
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
2008
|
+
readonly name: string;
|
|
2009
|
+
readonly scopes: readonly string[];
|
|
2010
|
+
readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
2011
|
+
readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
2012
|
+
readonly token: string;
|
|
2013
|
+
}, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
2014
|
+
readonly list: <WithResponse extends boolean = false>(request: void | {
|
|
2015
|
+
readonly withResponse?: WithResponse | undefined;
|
|
2016
|
+
}) => Effect.Effect<WithResponse extends true ? [readonly {
|
|
2017
|
+
readonly id: string & effect_Brand.Brand<"TokenId">;
|
|
2018
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
2019
|
+
readonly name: string;
|
|
2020
|
+
readonly scopes: readonly string[];
|
|
2021
|
+
readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
2022
|
+
readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
2023
|
+
}[], _effect_platform_HttpClientResponse.HttpClientResponse] : readonly {
|
|
2024
|
+
readonly id: string & effect_Brand.Brand<"TokenId">;
|
|
2025
|
+
readonly created_at: string & effect_Brand.Brand<"Timestamp">;
|
|
2026
|
+
readonly name: string;
|
|
2027
|
+
readonly scopes: readonly string[];
|
|
2028
|
+
readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
2029
|
+
readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
|
|
2030
|
+
}[], _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
2031
|
+
readonly delete: <WithResponse extends boolean = false>(request: {
|
|
2032
|
+
readonly path: {
|
|
2033
|
+
readonly id: string & effect_Brand.Brand<"TokenId">;
|
|
2034
|
+
};
|
|
2035
|
+
readonly withResponse?: WithResponse | undefined;
|
|
2036
|
+
}) => Effect.Effect<WithResponse extends true ? [null, _effect_platform_HttpClientResponse.HttpClientResponse] : null, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
|
|
2037
|
+
};
|
|
2038
|
+
}>;
|
|
2039
|
+
/**
|
|
2040
|
+
* Service Tag for the Industrial Client.
|
|
2041
|
+
*/
|
|
2042
|
+
declare class PayArkClient extends PayArkClient_base {
|
|
2043
|
+
static readonly Live: (options?: {
|
|
2044
|
+
readonly baseUrl?: string;
|
|
2045
|
+
readonly httpClient?: HttpClient.HttpClient;
|
|
2046
|
+
}) => Layer.Layer<PayArkClient, never, HttpClient.HttpClient>;
|
|
2047
|
+
}
|
|
2048
|
+
/**
|
|
2049
|
+
* Main entry point for the Effect-based PayArk API (Legacy wrapper).
|
|
171
2050
|
*/
|
|
172
2051
|
declare class PayArkEffect {
|
|
173
2052
|
private readonly config;
|
|
@@ -190,7 +2069,7 @@ declare class PayArkEffect {
|
|
|
190
2069
|
}
|
|
191
2070
|
declare const PayArk_base: Context.TagClass<PayArk, "@payark/sdk-effect/PayArk", PayArkEffect>;
|
|
192
2071
|
/**
|
|
193
|
-
* Service tag for the PayArk API.
|
|
2072
|
+
* Service tag for the PayArk API (Legacy).
|
|
194
2073
|
*/
|
|
195
2074
|
declare class PayArk extends PayArk_base {
|
|
196
2075
|
/**
|
|
@@ -199,4 +2078,4 @@ declare class PayArk extends PayArk_base {
|
|
|
199
2078
|
static readonly Live: (config: PayArkConfig) => Layer.Layer<PayArk, never, never>;
|
|
200
2079
|
}
|
|
201
2080
|
|
|
202
|
-
export { CheckoutSessionId,
|
|
2081
|
+
export { AuthContext, AuthenticationError, AutomationGroup, CheckoutGroup, CheckoutSession, CheckoutSessionId, ConflictError, CreateCheckoutParams, CreateCustomerParams, CreateSubscriptionParams, CronSecurity, Customer, CustomerId, CustomersGroup, Email, Id, IndustrialError, InternalServerError, ListCustomersParams, ListPaymentsParams, ListSubscriptionsParams, Metadata, NotFoundError, PaginatedResponse, PaginationMeta, PayArk, PayArkApi, PayArkClient, PayArkConfig, PayArkEffect, PayArkEffectError, PayArkErrorBody$1 as PayArkErrorBody, Payment, PaymentId, PaymentStatus, PaymentsGroup, Project, ProjectId, Provider, SecurityMiddleware, Subscription, SubscriptionId, SubscriptionInterval, SubscriptionStatus, SubscriptionsGroup, Timestamp, Timestamps, Token, TokenId, TokensGroup, UpdateCustomerParams, UserSecurity, WebhookEvent, WebhookEventType, makeClient };
|