@payark/sdk-effect 0.1.2 → 0.1.5

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