@payark/sdk-effect 0.1.3 → 0.1.6

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.mts CHANGED
@@ -1,906 +1,19 @@
1
1
  import * as effect_ParseResult from 'effect/ParseResult';
2
2
  import * as _effect_platform_HttpClientError from '@effect/platform/HttpClientError';
3
+ import { AuthenticationError, InternalServerError, IndustrialError, NotFoundError, ConflictError } from './api-spec.mjs';
4
+ export { AuthContext, AutomationGroup, CallbacksGroup, CheckoutGroup, CronSecurity, CustomersGroup, PayArkApi, PaymentsGroup, ProjectsGroup, RealtimeGroup, SecurityMiddleware, SubscriptionsGroup, TokensGroup, UserSecurity } from './api-spec.mjs';
3
5
  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
6
  import * as _effect_platform_HttpClientResponse from '@effect/platform/HttpClientResponse';
7
+ import * as effect_Brand from 'effect/Brand';
8
+ import { Effect, ParseResult, Context, Layer } from 'effect';
9
+ import { HttpClient } from '@effect/platform';
10
+ import { PayArkConfig, CreateCheckoutParams, CheckoutSession, ListPaymentsParams, PaginatedResponse, Payment, Project } from './schemas.mjs';
11
+ export { CallbackQueryParams, CheckoutSessionId, CreateCustomerParams, CreateSubscriptionParams, Customer, CustomerId, Email, Id, ListCustomersParams, ListSubscriptionsParams, Metadata, PaginationMeta, PayArkErrorBody, PaymentId, PaymentStatus, ProjectId, Provider, RealtimeTriggerPayload, Subscription, SubscriptionId, SubscriptionInterval, SubscriptionStatus, Timestamp, Timestamps, Token, TokenId, UpdateCustomerParams, WebhookEvent, WebhookEventType } from './schemas.mjs';
11
12
  import * as effect_Cause from 'effect/Cause';
12
13
  import * as effect_Types from 'effect/Types';
13
-
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
- }>;
20
- /**
21
- * Industrial Error Schema with Status mapping.
22
- */
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 {
53
- }
54
- /**
55
- * PayArk Industrial API Specification.
56
- * Single source of truth for the entire platform.
57
- */
58
- interface AuthContext {
59
- readonly project?: {
60
- readonly id: string;
61
- };
62
- readonly user?: {
63
- readonly id: string;
64
- };
65
- }
66
- declare const AuthContext: Context.Tag<AuthContext, AuthContext>;
67
- declare const SecurityMiddleware_base: HttpApiMiddleware.TagClass.BaseSecurity<SecurityMiddleware, "SecurityMiddleware", {
68
- readonly security: {
69
- readonly bearer: HttpApiSecurity.Bearer;
70
- };
71
- readonly provides: Context.Tag<AuthContext, AuthContext>;
72
- readonly failure: Schema.Union<[typeof AuthenticationError, typeof IndustrialError]>;
73
- }, {
74
- readonly bearer: (_: effect_Redacted.Redacted<string>) => effect_Effect.Effect<AuthContext, AuthenticationError | IndustrialError, _effect_platform_HttpRouter.HttpRouter.Provided>;
75
- }, {
76
- readonly bearer: HttpApiSecurity.Bearer;
77
- }>;
78
- declare class SecurityMiddleware extends SecurityMiddleware_base {
79
- }
80
- declare const CronSecurity_base: HttpApiMiddleware.TagClass.BaseSecurity<CronSecurity, "CronSecurity", {
81
- readonly security: {
82
- readonly secret: HttpApiSecurity.ApiKey;
83
- };
84
- readonly failure: Schema.Union<[typeof AuthenticationError, typeof IndustrialError]>;
85
- }, {
86
- readonly secret: (_: effect_Redacted.Redacted<string>) => effect_Effect.Effect<void, AuthenticationError | IndustrialError, _effect_platform_HttpRouter.HttpRouter.Provided>;
87
- }, {
88
- readonly secret: HttpApiSecurity.ApiKey;
89
- }>;
90
- declare class CronSecurity extends CronSecurity_base {
91
- }
92
- declare const UserSecurity_base: HttpApiMiddleware.TagClass.BaseSecurity<UserSecurity, "UserSecurity", {
93
- readonly security: {
94
- readonly bearer: HttpApiSecurity.Bearer;
95
- };
96
- readonly provides: Context.Tag<AuthContext, AuthContext>;
97
- readonly failure: Schema.Union<[typeof AuthenticationError, typeof IndustrialError]>;
98
- }, {
99
- readonly bearer: (_: effect_Redacted.Redacted<string>) => effect_Effect.Effect<AuthContext, AuthenticationError | IndustrialError, _effect_platform_HttpRouter.HttpRouter.Provided>;
100
- }, {
101
- readonly bearer: HttpApiSecurity.Bearer;
102
- }>;
103
- declare class UserSecurity extends UserSecurity_base {
104
- }
105
- declare const CheckoutGroup: HttpApiGroup.HttpApiGroup<"checkout", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, never, {
106
- readonly amount: number;
107
- readonly currency: string;
108
- readonly provider: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
109
- readonly returnUrl: string;
110
- readonly cancelUrl?: string | undefined;
111
- readonly metadata?: {
112
- readonly [x: string]: any;
113
- } | undefined;
114
- }, never, {
115
- readonly id: string & effect_Brand.Brand<"CheckoutSessionId">;
116
- readonly checkout_url: string;
117
- readonly payment_method: {
118
- readonly type: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
119
- readonly url?: string | undefined;
120
- readonly method?: "POST" | "GET" | undefined;
121
- readonly fields?: {
122
- readonly [x: string]: string;
123
- } | undefined;
124
- };
125
- }, AuthenticationError | InternalServerError | IndustrialError, never, never>, AuthenticationError | IndustrialError, SecurityMiddleware, false>;
126
- declare const PaymentsGroup: HttpApiGroup.HttpApiGroup<"payments", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", never, {
127
- readonly limit?: number | undefined;
128
- readonly offset?: number | undefined;
129
- readonly projectId?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
130
- }, never, never, {
131
- readonly data: readonly {
132
- readonly id: string & effect_Brand.Brand<"PaymentId">;
133
- readonly amount: number;
134
- readonly currency: string;
135
- readonly status: "pending" | "success" | "failed";
136
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
137
- readonly provider_ref?: string | null | undefined;
138
- readonly metadata_json?: {
139
- readonly [x: string]: any;
140
- } | null | undefined;
141
- readonly gateway_response?: any;
142
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
143
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
144
- }[];
145
- readonly meta: {
146
- readonly total: number | null;
147
- readonly limit: number;
148
- readonly offset: number;
149
- };
150
- }, AuthenticationError | InternalServerError | IndustrialError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"retrieve", "GET", {
151
- readonly id: string & effect_Brand.Brand<"Id">;
152
- }, never, never, never, {
153
- readonly id: string & effect_Brand.Brand<"PaymentId">;
154
- readonly amount: number;
155
- readonly currency: string;
156
- readonly status: "pending" | "success" | "failed";
157
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
158
- readonly provider_ref?: string | null | undefined;
159
- readonly metadata_json?: {
160
- readonly [x: string]: any;
161
- } | null | undefined;
162
- readonly gateway_response?: any;
163
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
164
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
165
- }, AuthenticationError | InternalServerError | IndustrialError | NotFoundError, never, never>, AuthenticationError | IndustrialError, SecurityMiddleware, false>;
166
- declare const CustomersGroup: HttpApiGroup.HttpApiGroup<"customers", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, never, {
167
- readonly metadata?: {
168
- readonly [x: string]: any;
169
- } | undefined;
170
- readonly project_id?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
171
- readonly merchant_customer_id: string;
172
- readonly email?: string | undefined;
173
- readonly name?: string | undefined;
174
- readonly phone?: string | undefined;
175
- }, never, {
176
- readonly id: string & effect_Brand.Brand<"CustomerId">;
177
- readonly metadata: {
178
- readonly [x: string]: any;
179
- } | null;
180
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
181
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
182
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
183
- readonly merchant_customer_id: string;
184
- readonly email: (string & effect_Brand.Brand<"Email">) | null;
185
- readonly name: string | null;
186
- readonly phone: string | null;
187
- }, AuthenticationError | InternalServerError | IndustrialError | ConflictError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"retrieve", "GET", {
188
- readonly id: string & effect_Brand.Brand<"Id">;
189
- }, never, never, never, {
190
- readonly id: string & effect_Brand.Brand<"CustomerId">;
191
- readonly metadata: {
192
- readonly [x: string]: any;
193
- } | null;
194
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
195
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
196
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
197
- readonly merchant_customer_id: string;
198
- readonly email: (string & effect_Brand.Brand<"Email">) | null;
199
- readonly name: string | null;
200
- readonly phone: string | null;
201
- }, AuthenticationError | InternalServerError | IndustrialError | NotFoundError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"update", "PATCH", {
202
- readonly id: string & effect_Brand.Brand<"Id">;
203
- }, never, {
204
- readonly metadata?: {
205
- readonly [x: string]: any;
206
- } | undefined;
207
- readonly email?: string | undefined;
208
- readonly name?: string | undefined;
209
- readonly phone?: string | undefined;
210
- }, never, {
211
- readonly id: string & effect_Brand.Brand<"CustomerId">;
212
- readonly metadata: {
213
- readonly [x: string]: any;
214
- } | null;
215
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
216
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
217
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
218
- readonly merchant_customer_id: string;
219
- readonly email: (string & effect_Brand.Brand<"Email">) | null;
220
- readonly name: string | null;
221
- readonly phone: string | null;
222
- }, AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", {
223
- readonly id: string & effect_Brand.Brand<"Id">;
224
- }, never, never, never, void, AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError, never, never>, AuthenticationError | IndustrialError, SecurityMiddleware, false>;
225
- declare const SubscriptionsGroup: HttpApiGroup.HttpApiGroup<"subscriptions", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, never, {
226
- readonly amount: number;
227
- readonly currency: string;
228
- readonly metadata?: {
229
- readonly [x: string]: any;
230
- } | undefined;
231
- readonly project_id?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
232
- readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
233
- readonly interval: "month" | "year" | "week";
234
- readonly interval_count?: number | undefined;
235
- readonly auto_send_link?: boolean | undefined;
236
- }, never, {
237
- readonly id: string & effect_Brand.Brand<"SubscriptionId">;
238
- readonly amount: number;
239
- readonly currency: string;
240
- readonly metadata?: {
241
- readonly [x: string]: any;
242
- } | null | undefined;
243
- readonly status: "active" | "past_due" | "canceled" | "paused";
244
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
245
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
246
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
247
- readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
248
- readonly interval: "month" | "year" | "week";
249
- readonly interval_count: number;
250
- readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
251
- readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
252
- readonly payment_link: string;
253
- readonly auto_send_link: boolean;
254
- readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
255
- }, AuthenticationError | InternalServerError | IndustrialError, SecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"retrieve", "GET", {
256
- readonly id: string & effect_Brand.Brand<"SubscriptionId">;
257
- }, never, never, never, {
258
- readonly id: string & effect_Brand.Brand<"SubscriptionId">;
259
- readonly amount: number;
260
- readonly currency: string;
261
- readonly metadata?: {
262
- readonly [x: string]: any;
263
- } | null | undefined;
264
- readonly status: "active" | "past_due" | "canceled" | "paused";
265
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
266
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
267
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
268
- readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
269
- readonly interval: "month" | "year" | "week";
270
- readonly interval_count: number;
271
- readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
272
- readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
273
- readonly payment_link: string;
274
- readonly auto_send_link: boolean;
275
- readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
276
- }, AuthenticationError | InternalServerError | IndustrialError | NotFoundError, SecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", never, {
277
- readonly status?: "active" | "past_due" | "canceled" | "paused" | undefined;
278
- readonly limit?: number | undefined;
279
- readonly offset?: number | undefined;
280
- readonly projectId?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
281
- readonly customerId?: (string & effect_Brand.Brand<"CustomerId">) | undefined;
282
- }, never, never, {
283
- readonly data: readonly {
284
- readonly id: string & effect_Brand.Brand<"SubscriptionId">;
285
- readonly amount: number;
286
- readonly currency: string;
287
- readonly metadata?: {
288
- readonly [x: string]: any;
289
- } | null | undefined;
290
- readonly status: "active" | "past_due" | "canceled" | "paused";
291
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
292
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
293
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
294
- readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
295
- readonly interval: "month" | "year" | "week";
296
- readonly interval_count: number;
297
- readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
298
- readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
299
- readonly payment_link: string;
300
- readonly auto_send_link: boolean;
301
- readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
302
- }[];
303
- readonly meta: {
304
- readonly total: number | null;
305
- readonly limit: number;
306
- readonly offset: number;
307
- };
308
- }, AuthenticationError | InternalServerError | IndustrialError, SecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"cancel", "POST", {
309
- readonly id: string & effect_Brand.Brand<"SubscriptionId">;
310
- }, never, never, never, {
311
- readonly id: string & effect_Brand.Brand<"SubscriptionId">;
312
- readonly amount: number;
313
- readonly currency: string;
314
- readonly metadata?: {
315
- readonly [x: string]: any;
316
- } | null | undefined;
317
- readonly status: "active" | "past_due" | "canceled" | "paused";
318
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
319
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
320
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
321
- readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
322
- readonly interval: "month" | "year" | "week";
323
- readonly interval_count: number;
324
- readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
325
- readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
326
- readonly payment_link: string;
327
- readonly auto_send_link: boolean;
328
- readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
329
- }, AuthenticationError | InternalServerError | IndustrialError | NotFoundError, SecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"activate", "POST", {
330
- readonly id: string & effect_Brand.Brand<"SubscriptionId">;
331
- }, never, {
332
- readonly provider: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
333
- readonly returnUrl: string;
334
- readonly cancelUrl?: string | undefined;
335
- }, never, {
336
- readonly checkout_url: string;
337
- readonly payment_id: string;
338
- }, InternalServerError | IndustrialError | NotFoundError, never, never>, never, never, false>;
339
- declare const AutomationGroup: HttpApiGroup.HttpApiGroup<"automation", HttpApiEndpoint.HttpApiEndpoint<"reminders", "POST", never, never, never, never, {
340
- readonly message: string;
341
- readonly count: number;
342
- }, InternalServerError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"reaper", "POST", never, never, never, never, {
343
- readonly message: string;
344
- readonly count: number;
345
- }, InternalServerError, never, never>, AuthenticationError | IndustrialError, CronSecurity, false>;
346
- declare const TokensGroup: HttpApiGroup.HttpApiGroup<"tokens", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, never, {
347
- readonly name: string;
348
- readonly scopes: readonly string[];
349
- readonly expires_in_days?: number | undefined;
350
- }, never, {
351
- readonly id: string & effect_Brand.Brand<"TokenId">;
352
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
353
- readonly name: string;
354
- readonly scopes: readonly string[];
355
- readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
356
- readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
357
- readonly token: string;
358
- }, AuthenticationError | InternalServerError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", never, never, never, never, readonly {
359
- readonly id: string & effect_Brand.Brand<"TokenId">;
360
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
361
- readonly name: string;
362
- readonly scopes: readonly string[];
363
- readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
364
- readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
365
- }[], AuthenticationError | InternalServerError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", {
366
- readonly id: string & effect_Brand.Brand<"TokenId">;
367
- }, never, never, never, null, AuthenticationError | InternalServerError | NotFoundError, never, never>, AuthenticationError | IndustrialError, UserSecurity, false>;
368
- declare const PayArkApi: HttpApi.HttpApi<"PayArkApi", HttpApiGroup.HttpApiGroup<"checkout", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, never, {
369
- readonly amount: number;
370
- readonly currency: string;
371
- readonly provider: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
372
- readonly returnUrl: string;
373
- readonly cancelUrl?: string | undefined;
374
- readonly metadata?: {
375
- readonly [x: string]: any;
376
- } | undefined;
377
- }, never, {
378
- readonly id: string & effect_Brand.Brand<"CheckoutSessionId">;
379
- readonly checkout_url: string;
380
- readonly payment_method: {
381
- readonly type: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
382
- readonly url?: string | undefined;
383
- readonly method?: "POST" | "GET" | undefined;
384
- readonly fields?: {
385
- readonly [x: string]: string;
386
- } | undefined;
387
- };
388
- }, AuthenticationError | InternalServerError | IndustrialError, never, never>, AuthenticationError | IndustrialError, SecurityMiddleware, false> | HttpApiGroup.HttpApiGroup<"payments", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", never, {
389
- readonly limit?: number | undefined;
390
- readonly offset?: number | undefined;
391
- readonly projectId?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
392
- }, never, never, {
393
- readonly data: readonly {
394
- readonly id: string & effect_Brand.Brand<"PaymentId">;
395
- readonly amount: number;
396
- readonly currency: string;
397
- readonly status: "pending" | "success" | "failed";
398
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
399
- readonly provider_ref?: string | null | undefined;
400
- readonly metadata_json?: {
401
- readonly [x: string]: any;
402
- } | null | undefined;
403
- readonly gateway_response?: any;
404
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
405
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
406
- }[];
407
- readonly meta: {
408
- readonly total: number | null;
409
- readonly limit: number;
410
- readonly offset: number;
411
- };
412
- }, AuthenticationError | InternalServerError | IndustrialError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"retrieve", "GET", {
413
- readonly id: string & effect_Brand.Brand<"Id">;
414
- }, never, never, never, {
415
- readonly id: string & effect_Brand.Brand<"PaymentId">;
416
- readonly amount: number;
417
- readonly currency: string;
418
- readonly status: "pending" | "success" | "failed";
419
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
420
- readonly provider_ref?: string | null | undefined;
421
- readonly metadata_json?: {
422
- readonly [x: string]: any;
423
- } | null | undefined;
424
- readonly gateway_response?: any;
425
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
426
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
427
- }, AuthenticationError | InternalServerError | IndustrialError | NotFoundError, never, never>, AuthenticationError | IndustrialError, SecurityMiddleware, false> | HttpApiGroup.HttpApiGroup<"customers", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, never, {
428
- readonly metadata?: {
429
- readonly [x: string]: any;
430
- } | undefined;
431
- readonly project_id?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
432
- readonly merchant_customer_id: string;
433
- readonly email?: string | undefined;
434
- readonly name?: string | undefined;
435
- readonly phone?: string | undefined;
436
- }, never, {
437
- readonly id: string & effect_Brand.Brand<"CustomerId">;
438
- readonly metadata: {
439
- readonly [x: string]: any;
440
- } | null;
441
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
442
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
443
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
444
- readonly merchant_customer_id: string;
445
- readonly email: (string & effect_Brand.Brand<"Email">) | null;
446
- readonly name: string | null;
447
- readonly phone: string | null;
448
- }, AuthenticationError | InternalServerError | IndustrialError | ConflictError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"retrieve", "GET", {
449
- readonly id: string & effect_Brand.Brand<"Id">;
450
- }, never, never, never, {
451
- readonly id: string & effect_Brand.Brand<"CustomerId">;
452
- readonly metadata: {
453
- readonly [x: string]: any;
454
- } | null;
455
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
456
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
457
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
458
- readonly merchant_customer_id: string;
459
- readonly email: (string & effect_Brand.Brand<"Email">) | null;
460
- readonly name: string | null;
461
- readonly phone: string | null;
462
- }, AuthenticationError | InternalServerError | IndustrialError | NotFoundError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"update", "PATCH", {
463
- readonly id: string & effect_Brand.Brand<"Id">;
464
- }, never, {
465
- readonly metadata?: {
466
- readonly [x: string]: any;
467
- } | undefined;
468
- readonly email?: string | undefined;
469
- readonly name?: string | undefined;
470
- readonly phone?: string | undefined;
471
- }, never, {
472
- readonly id: string & effect_Brand.Brand<"CustomerId">;
473
- readonly metadata: {
474
- readonly [x: string]: any;
475
- } | null;
476
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
477
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
478
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
479
- readonly merchant_customer_id: string;
480
- readonly email: (string & effect_Brand.Brand<"Email">) | null;
481
- readonly name: string | null;
482
- readonly phone: string | null;
483
- }, AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", {
484
- readonly id: string & effect_Brand.Brand<"Id">;
485
- }, never, never, never, void, AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError, never, never>, AuthenticationError | IndustrialError, SecurityMiddleware, false> | HttpApiGroup.HttpApiGroup<"subscriptions", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, never, {
486
- readonly amount: number;
487
- readonly currency: string;
488
- readonly metadata?: {
489
- readonly [x: string]: any;
490
- } | undefined;
491
- readonly project_id?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
492
- readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
493
- readonly interval: "month" | "year" | "week";
494
- readonly interval_count?: number | undefined;
495
- readonly auto_send_link?: boolean | undefined;
496
- }, never, {
497
- readonly id: string & effect_Brand.Brand<"SubscriptionId">;
498
- readonly amount: number;
499
- readonly currency: string;
500
- readonly metadata?: {
501
- readonly [x: string]: any;
502
- } | null | undefined;
503
- readonly status: "active" | "past_due" | "canceled" | "paused";
504
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
505
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
506
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
507
- readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
508
- readonly interval: "month" | "year" | "week";
509
- readonly interval_count: number;
510
- readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
511
- readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
512
- readonly payment_link: string;
513
- readonly auto_send_link: boolean;
514
- readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
515
- }, AuthenticationError | InternalServerError | IndustrialError, SecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"retrieve", "GET", {
516
- readonly id: string & effect_Brand.Brand<"SubscriptionId">;
517
- }, never, never, never, {
518
- readonly id: string & effect_Brand.Brand<"SubscriptionId">;
519
- readonly amount: number;
520
- readonly currency: string;
521
- readonly metadata?: {
522
- readonly [x: string]: any;
523
- } | null | undefined;
524
- readonly status: "active" | "past_due" | "canceled" | "paused";
525
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
526
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
527
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
528
- readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
529
- readonly interval: "month" | "year" | "week";
530
- readonly interval_count: number;
531
- readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
532
- readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
533
- readonly payment_link: string;
534
- readonly auto_send_link: boolean;
535
- readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
536
- }, AuthenticationError | InternalServerError | IndustrialError | NotFoundError, SecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", never, {
537
- readonly status?: "active" | "past_due" | "canceled" | "paused" | undefined;
538
- readonly limit?: number | undefined;
539
- readonly offset?: number | undefined;
540
- readonly projectId?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
541
- readonly customerId?: (string & effect_Brand.Brand<"CustomerId">) | undefined;
542
- }, never, never, {
543
- readonly data: readonly {
544
- readonly id: string & effect_Brand.Brand<"SubscriptionId">;
545
- readonly amount: number;
546
- readonly currency: string;
547
- readonly metadata?: {
548
- readonly [x: string]: any;
549
- } | null | undefined;
550
- readonly status: "active" | "past_due" | "canceled" | "paused";
551
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
552
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
553
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
554
- readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
555
- readonly interval: "month" | "year" | "week";
556
- readonly interval_count: number;
557
- readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
558
- readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
559
- readonly payment_link: string;
560
- readonly auto_send_link: boolean;
561
- readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
562
- }[];
563
- readonly meta: {
564
- readonly total: number | null;
565
- readonly limit: number;
566
- readonly offset: number;
567
- };
568
- }, AuthenticationError | InternalServerError | IndustrialError, SecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"cancel", "POST", {
569
- readonly id: string & effect_Brand.Brand<"SubscriptionId">;
570
- }, never, never, never, {
571
- readonly id: string & effect_Brand.Brand<"SubscriptionId">;
572
- readonly amount: number;
573
- readonly currency: string;
574
- readonly metadata?: {
575
- readonly [x: string]: any;
576
- } | null | undefined;
577
- readonly status: "active" | "past_due" | "canceled" | "paused";
578
- readonly project_id: string & effect_Brand.Brand<"ProjectId">;
579
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
580
- readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
581
- readonly customer_id: string & effect_Brand.Brand<"CustomerId">;
582
- readonly interval: "month" | "year" | "week";
583
- readonly interval_count: number;
584
- readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
585
- readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
586
- readonly payment_link: string;
587
- readonly auto_send_link: boolean;
588
- readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
589
- }, AuthenticationError | InternalServerError | IndustrialError | NotFoundError, SecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"activate", "POST", {
590
- readonly id: string & effect_Brand.Brand<"SubscriptionId">;
591
- }, never, {
592
- readonly provider: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
593
- readonly returnUrl: string;
594
- readonly cancelUrl?: string | undefined;
595
- }, never, {
596
- readonly checkout_url: string;
597
- readonly payment_id: string;
598
- }, InternalServerError | IndustrialError | NotFoundError, never, never>, never, never, false> | HttpApiGroup.HttpApiGroup<"automation", HttpApiEndpoint.HttpApiEndpoint<"reminders", "POST", never, never, never, never, {
599
- readonly message: string;
600
- readonly count: number;
601
- }, InternalServerError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"reaper", "POST", never, never, never, never, {
602
- readonly message: string;
603
- readonly count: number;
604
- }, InternalServerError, never, never>, AuthenticationError | IndustrialError, CronSecurity, false> | HttpApiGroup.HttpApiGroup<"tokens", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", never, never, {
605
- readonly name: string;
606
- readonly scopes: readonly string[];
607
- readonly expires_in_days?: number | undefined;
608
- }, never, {
609
- readonly id: string & effect_Brand.Brand<"TokenId">;
610
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
611
- readonly name: string;
612
- readonly scopes: readonly string[];
613
- readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
614
- readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
615
- readonly token: string;
616
- }, AuthenticationError | InternalServerError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", never, never, never, never, readonly {
617
- readonly id: string & effect_Brand.Brand<"TokenId">;
618
- readonly created_at: string & effect_Brand.Brand<"Timestamp">;
619
- readonly name: string;
620
- readonly scopes: readonly string[];
621
- readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
622
- readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
623
- }[], AuthenticationError | InternalServerError, never, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", {
624
- readonly id: string & effect_Brand.Brand<"TokenId">;
625
- }, never, never, never, null, AuthenticationError | InternalServerError | NotFoundError, never, never>, AuthenticationError | IndustrialError, UserSecurity, false>, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError, never>;
626
-
627
- /**
628
- * ── Branded Types ──
629
- */
630
- declare const Id: Schema.brand<typeof Schema.String, "Id">;
631
- type Id = Schema.Schema.Type<typeof Id>;
632
- declare const ProjectId: Schema.brand<typeof Schema.String, "ProjectId">;
633
- type ProjectId = Schema.Schema.Type<typeof ProjectId>;
634
- declare const PaymentId: Schema.brand<typeof Schema.String, "PaymentId">;
635
- type PaymentId = Schema.Schema.Type<typeof PaymentId>;
636
- declare const CheckoutSessionId: Schema.brand<typeof Schema.String, "CheckoutSessionId">;
637
- type CheckoutSessionId = Schema.Schema.Type<typeof CheckoutSessionId>;
638
- declare const SubscriptionId: Schema.brand<typeof Schema.String, "SubscriptionId">;
639
- type SubscriptionId = Schema.Schema.Type<typeof SubscriptionId>;
640
- declare const CustomerId: Schema.brand<typeof Schema.String, "CustomerId">;
641
- type CustomerId = Schema.Schema.Type<typeof CustomerId>;
642
- declare const TokenId: Schema.brand<typeof Schema.String, "TokenId">;
643
- type TokenId = Schema.Schema.Type<typeof TokenId>;
644
- /**
645
- * ── Atomic Atoms ──
646
- */
647
- declare const Email: Schema.brand<Schema.filter<typeof Schema.String>, "Email">;
648
- type Email = Schema.Schema.Type<typeof Email>;
649
- declare const Timestamp: Schema.brand<typeof Schema.String, "Timestamp">;
650
- type Timestamp = Schema.Schema.Type<typeof Timestamp>;
651
- declare const Metadata: Schema.Record$<typeof Schema.String, typeof Schema.Any>;
652
- type Metadata = Schema.Schema.Type<typeof Metadata>;
653
- declare const Timestamps: Schema.Struct<{
654
- created_at: Schema.brand<typeof Schema.String, "Timestamp">;
655
- updated_at: Schema.brand<typeof Schema.String, "Timestamp">;
656
- }>;
657
- type Timestamps = Schema.Schema.Type<typeof Timestamps>;
658
- /**
659
- * ── Enums ──
660
- */
661
- declare const Provider: Schema.Literal<["esewa", "khalti", "connectips", "imepay", "fonepay", "sandbox"]>;
662
- type Provider = Schema.Schema.Type<typeof Provider>;
663
- declare const PaymentStatus: Schema.Literal<["pending", "success", "failed"]>;
664
- type PaymentStatus = Schema.Schema.Type<typeof PaymentStatus>;
665
- declare const SubscriptionStatus: Schema.Literal<["active", "past_due", "canceled", "paused"]>;
666
- type SubscriptionStatus = Schema.Schema.Type<typeof SubscriptionStatus>;
667
- declare const SubscriptionInterval: Schema.Literal<["month", "year", "week"]>;
668
- type SubscriptionInterval = Schema.Schema.Type<typeof SubscriptionInterval>;
669
- /**
670
- * ── Models ──
671
- */
672
- declare const Customer: Schema.Struct<{
673
- id: Schema.brand<typeof Schema.String, "CustomerId">;
674
- merchant_customer_id: typeof Schema.String;
675
- email: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "Email">>;
676
- name: Schema.NullOr<typeof Schema.String>;
677
- phone: Schema.NullOr<typeof Schema.String>;
678
- project_id: Schema.brand<typeof Schema.String, "ProjectId">;
679
- metadata: Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
680
- created_at: Schema.brand<typeof Schema.String, "Timestamp">;
681
- updated_at: Schema.optional<Schema.brand<typeof Schema.String, "Timestamp">>;
682
- }>;
683
- type Customer = Schema.Schema.Type<typeof Customer>;
684
- declare const Payment: Schema.Struct<{
685
- id: Schema.brand<typeof Schema.String, "PaymentId">;
686
- project_id: Schema.brand<typeof Schema.String, "ProjectId">;
687
- amount: typeof Schema.Number;
688
- currency: typeof Schema.String;
689
- status: Schema.Literal<["pending", "success", "failed"]>;
690
- provider_ref: Schema.optional<Schema.NullOr<typeof Schema.String>>;
691
- metadata_json: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
692
- gateway_response: Schema.optional<Schema.NullOr<typeof Schema.Any>>;
693
- created_at: Schema.brand<typeof Schema.String, "Timestamp">;
694
- updated_at: Schema.optional<Schema.brand<typeof Schema.String, "Timestamp">>;
695
- }>;
696
- type Payment = Schema.Schema.Type<typeof Payment>;
697
- declare const Subscription: Schema.Struct<{
698
- id: Schema.brand<typeof Schema.String, "SubscriptionId">;
699
- project_id: Schema.brand<typeof Schema.String, "ProjectId">;
700
- customer_id: Schema.brand<typeof Schema.String, "CustomerId">;
701
- status: Schema.Literal<["active", "past_due", "canceled", "paused"]>;
702
- amount: typeof Schema.Number;
703
- currency: typeof Schema.String;
704
- interval: Schema.Literal<["month", "year", "week"]>;
705
- interval_count: typeof Schema.Number;
706
- current_period_start: Schema.brand<typeof Schema.String, "Timestamp">;
707
- current_period_end: Schema.brand<typeof Schema.String, "Timestamp">;
708
- payment_link: typeof Schema.String;
709
- auto_send_link: typeof Schema.Boolean;
710
- metadata: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
711
- canceled_at: Schema.optional<Schema.NullOr<Schema.brand<typeof Schema.String, "Timestamp">>>;
712
- created_at: Schema.brand<typeof Schema.String, "Timestamp">;
713
- updated_at: Schema.optional<Schema.brand<typeof Schema.String, "Timestamp">>;
714
- }>;
715
- type Subscription = Schema.Schema.Type<typeof Subscription>;
716
- declare const Project: Schema.Struct<{
717
- id: Schema.brand<typeof Schema.String, "ProjectId">;
718
- name: typeof Schema.String;
719
- api_key_secret: typeof Schema.String;
720
- created_at: Schema.brand<typeof Schema.String, "Timestamp">;
721
- }>;
722
- type Project = Schema.Schema.Type<typeof Project>;
723
- declare const Token: Schema.Struct<{
724
- id: Schema.brand<typeof Schema.String, "TokenId">;
725
- name: typeof Schema.String;
726
- scopes: Schema.Array$<typeof Schema.String>;
727
- last_used_at: Schema.NullOr<Schema.brand<typeof Schema.String, "Timestamp">>;
728
- expires_at: Schema.NullOr<Schema.brand<typeof Schema.String, "Timestamp">>;
729
- created_at: Schema.brand<typeof Schema.String, "Timestamp">;
730
- }>;
731
- type Token = Schema.Schema.Type<typeof Token>;
732
- /**
733
- * ── Pagination ──
734
- */
735
- declare const PaginationMeta: Schema.Struct<{
736
- total: Schema.NullOr<typeof Schema.Number>;
737
- limit: typeof Schema.Number;
738
- offset: typeof Schema.Number;
739
- }>;
740
- type PaginationMeta = Schema.Schema.Type<typeof PaginationMeta>;
741
- declare const PaginatedResponse: <A, I, R>(schema: Schema.Schema<A, I, R>) => Schema.Struct<{
742
- data: Schema.Array$<Schema.Schema<A, I, R>>;
743
- meta: Schema.Struct<{
744
- total: Schema.NullOr<typeof Schema.Number>;
745
- limit: typeof Schema.Number;
746
- offset: typeof Schema.Number;
747
- }>;
748
- }>;
749
- interface PaginatedResponse<T> {
750
- readonly data: readonly T[];
751
- readonly meta: PaginationMeta;
752
- }
753
- /**
754
- * ── Params & Inputs ──
755
- */
756
- declare const CreateCheckoutParams: Schema.Struct<{
757
- amount: Schema.filter<typeof Schema.Number>;
758
- currency: Schema.optionalWith<typeof Schema.String, {
759
- default: () => string;
760
- }>;
761
- provider: Schema.Literal<["esewa", "khalti", "connectips", "imepay", "fonepay", "sandbox"]>;
762
- returnUrl: typeof Schema.String;
763
- cancelUrl: Schema.optional<typeof Schema.String>;
764
- metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
765
- }>;
766
- type CreateCheckoutParams = Schema.Schema.Type<typeof CreateCheckoutParams>;
767
- declare const CheckoutSession: Schema.Struct<{
768
- id: Schema.brand<typeof Schema.String, "CheckoutSessionId">;
769
- checkout_url: typeof Schema.String;
770
- payment_method: Schema.Struct<{
771
- type: Schema.Literal<["esewa", "khalti", "connectips", "imepay", "fonepay", "sandbox"]>;
772
- url: Schema.optional<typeof Schema.String>;
773
- method: Schema.optional<Schema.Literal<["GET", "POST"]>>;
774
- fields: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
775
- }>;
776
- }>;
777
- type CheckoutSession = Schema.Schema.Type<typeof CheckoutSession>;
778
- declare const CreateCustomerParams: Schema.Struct<{
779
- merchant_customer_id: typeof Schema.String;
780
- email: Schema.optional<typeof Schema.String>;
781
- name: Schema.optional<typeof Schema.String>;
782
- phone: Schema.optional<typeof Schema.String>;
783
- project_id: Schema.optional<Schema.brand<typeof Schema.String, "ProjectId">>;
784
- metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
785
- }>;
786
- type CreateCustomerParams = Schema.Schema.Type<typeof CreateCustomerParams>;
787
- declare const ListPaymentsParams: Schema.Struct<{
788
- limit: Schema.optional<typeof Schema.NumberFromString>;
789
- offset: Schema.optional<typeof Schema.NumberFromString>;
790
- projectId: Schema.optional<Schema.brand<typeof Schema.String, "ProjectId">>;
791
- }>;
792
- type ListPaymentsParams = Schema.Schema.Type<typeof ListPaymentsParams>;
793
- declare const ListCustomersParams: Schema.Struct<{
794
- limit: Schema.optional<typeof Schema.NumberFromString>;
795
- offset: Schema.optional<typeof Schema.NumberFromString>;
796
- email: Schema.optional<typeof Schema.String>;
797
- projectId: Schema.optional<Schema.brand<typeof Schema.String, "ProjectId">>;
798
- }>;
799
- type ListCustomersParams = Schema.Schema.Type<typeof ListCustomersParams>;
800
- declare const UpdateCustomerParams: Schema.Struct<{
801
- email: Schema.optional<typeof Schema.String>;
802
- name: Schema.optional<typeof Schema.String>;
803
- phone: Schema.optional<typeof Schema.String>;
804
- metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
805
- }>;
806
- type UpdateCustomerParams = Schema.Schema.Type<typeof UpdateCustomerParams>;
807
- declare const CreateSubscriptionParams: Schema.Struct<{
808
- customer_id: Schema.brand<typeof Schema.String, "CustomerId">;
809
- amount: Schema.filter<typeof Schema.Number>;
810
- currency: Schema.optionalWith<typeof Schema.String, {
811
- default: () => string;
812
- }>;
813
- interval: Schema.Literal<["month", "year", "week"]>;
814
- interval_count: Schema.optional<typeof Schema.Number>;
815
- project_id: Schema.optional<Schema.brand<typeof Schema.String, "ProjectId">>;
816
- auto_send_link: Schema.optional<typeof Schema.Boolean>;
817
- metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
818
- }>;
819
- type CreateSubscriptionParams = Schema.Schema.Type<typeof CreateSubscriptionParams>;
820
- declare const ListSubscriptionsParams: Schema.Struct<{
821
- limit: Schema.optional<typeof Schema.NumberFromString>;
822
- offset: Schema.optional<typeof Schema.NumberFromString>;
823
- projectId: Schema.optional<Schema.brand<typeof Schema.String, "ProjectId">>;
824
- customerId: Schema.optional<Schema.brand<typeof Schema.String, "CustomerId">>;
825
- status: Schema.optional<Schema.Literal<["active", "past_due", "canceled", "paused"]>>;
826
- }>;
827
- type ListSubscriptionsParams = Schema.Schema.Type<typeof ListSubscriptionsParams>;
828
- /**
829
- * ── Client Config ──
830
- */
831
- declare const PayArkConfig: Schema.Struct<{
832
- apiKey: typeof Schema.String;
833
- baseUrl: Schema.optional<typeof Schema.String>;
834
- timeout: Schema.optional<typeof Schema.Number>;
835
- maxRetries: Schema.optional<typeof Schema.Number>;
836
- sandbox: Schema.optional<typeof Schema.Boolean>;
837
- }>;
838
- type PayArkConfig = Schema.Schema.Type<typeof PayArkConfig>;
839
- /**
840
- * ── Webhooks ──
841
- */
842
- declare const WebhookEventType: Schema.Literal<["payment.success", "payment.failed", "subscription.created", "subscription.payment_succeeded", "subscription.payment_failed", "subscription.renewal_due", "subscription.canceled"]>;
843
- type WebhookEventType = Schema.Schema.Type<typeof WebhookEventType>;
844
- declare const WebhookEvent: Schema.Struct<{
845
- type: Schema.Literal<["payment.success", "payment.failed", "subscription.created", "subscription.payment_succeeded", "subscription.payment_failed", "subscription.renewal_due", "subscription.canceled"]>;
846
- id: Schema.optional<typeof Schema.String>;
847
- data: Schema.Union<[Schema.Struct<{
848
- id: Schema.brand<typeof Schema.String, "PaymentId">;
849
- project_id: Schema.brand<typeof Schema.String, "ProjectId">;
850
- amount: typeof Schema.Number;
851
- currency: typeof Schema.String;
852
- status: Schema.Literal<["pending", "success", "failed"]>;
853
- provider_ref: Schema.optional<Schema.NullOr<typeof Schema.String>>;
854
- metadata_json: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
855
- gateway_response: Schema.optional<Schema.NullOr<typeof Schema.Any>>;
856
- created_at: Schema.brand<typeof Schema.String, "Timestamp">;
857
- updated_at: Schema.optional<Schema.brand<typeof Schema.String, "Timestamp">>;
858
- }>, Schema.Struct<{
859
- id: Schema.brand<typeof Schema.String, "SubscriptionId">;
860
- project_id: Schema.brand<typeof Schema.String, "ProjectId">;
861
- customer_id: Schema.brand<typeof Schema.String, "CustomerId">;
862
- status: Schema.Literal<["active", "past_due", "canceled", "paused"]>;
863
- amount: typeof Schema.Number;
864
- currency: typeof Schema.String;
865
- interval: Schema.Literal<["month", "year", "week"]>;
866
- interval_count: typeof Schema.Number;
867
- current_period_start: Schema.brand<typeof Schema.String, "Timestamp">;
868
- current_period_end: Schema.brand<typeof Schema.String, "Timestamp">;
869
- payment_link: typeof Schema.String;
870
- auto_send_link: typeof Schema.Boolean;
871
- metadata: Schema.optional<Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Any>>>;
872
- canceled_at: Schema.optional<Schema.NullOr<Schema.brand<typeof Schema.String, "Timestamp">>>;
873
- created_at: Schema.brand<typeof Schema.String, "Timestamp">;
874
- updated_at: Schema.optional<Schema.brand<typeof Schema.String, "Timestamp">>;
875
- }>, Schema.Struct<{
876
- id: Schema.brand<typeof Schema.String, "CustomerId">;
877
- merchant_customer_id: typeof Schema.String;
878
- email: Schema.NullOr<Schema.brand<Schema.filter<typeof Schema.String>, "Email">>;
879
- name: Schema.NullOr<typeof Schema.String>;
880
- phone: Schema.NullOr<typeof Schema.String>;
881
- project_id: Schema.brand<typeof Schema.String, "ProjectId">;
882
- metadata: Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
883
- created_at: Schema.brand<typeof Schema.String, "Timestamp">;
884
- updated_at: Schema.optional<Schema.brand<typeof Schema.String, "Timestamp">>;
885
- }>, Schema.Struct<{
886
- id: typeof Schema.String;
887
- amount: Schema.optional<typeof Schema.Number>;
888
- currency: Schema.optional<typeof Schema.String>;
889
- status: typeof Schema.String;
890
- metadata: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Any>>;
891
- }>]>;
892
- is_test: typeof Schema.Boolean;
893
- created: Schema.optional<typeof Schema.Number>;
894
- }>;
895
- type WebhookEvent = Schema.Schema.Type<typeof WebhookEvent>;
896
- /**
897
- * ── Error Schemas ──
898
- */
899
- declare const PayArkErrorBody$1: Schema.Struct<{
900
- error: typeof Schema.String;
901
- details: Schema.optional<typeof Schema.Any>;
902
- }>;
903
- type PayArkErrorBody$1 = Schema.Schema.Type<typeof PayArkErrorBody$1>;
14
+ import 'effect/Effect';
15
+ import '@effect/platform/HttpRouter';
16
+ import 'effect/Redacted';
904
17
 
905
18
  /** Machine-readable error codes. */
906
19
  type PayArkErrorCode = "authentication_error" | "permission_error" | "invalid_request_error" | "not_found_error" | "rate_limit_error" | "api_error" | "connection_error" | "unknown_error";
@@ -990,22 +103,23 @@ declare const makeClient: (options?: {
990
103
  readonly checkout: {
991
104
  readonly create: <WithResponse extends boolean = false>(request: {
992
105
  readonly payload: {
993
- readonly amount: number;
106
+ readonly amount?: (number & effect_Brand.Brand<"MinorUnitsInt">) | undefined;
994
107
  readonly currency: string;
995
108
  readonly provider: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
996
- readonly returnUrl: string;
997
- readonly cancelUrl?: string | undefined;
109
+ readonly returnUrl: string & effect_Brand.Brand<"UrlString">;
110
+ readonly cancelUrl?: (string & effect_Brand.Brand<"UrlString">) | undefined;
998
111
  readonly metadata?: {
999
112
  readonly [x: string]: any;
1000
113
  } | undefined;
114
+ readonly subscriptionId?: (string & effect_Brand.Brand<"SubscriptionId">) | undefined;
1001
115
  };
1002
116
  readonly withResponse?: WithResponse | undefined;
1003
117
  }) => Effect.Effect<WithResponse extends true ? [{
1004
118
  readonly id: string & effect_Brand.Brand<"CheckoutSessionId">;
1005
- readonly checkout_url: string;
119
+ readonly checkout_url: string & effect_Brand.Brand<"UrlString">;
1006
120
  readonly payment_method: {
1007
121
  readonly type: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
1008
- readonly url?: string | undefined;
122
+ readonly url?: (string & effect_Brand.Brand<"UrlString">) | undefined;
1009
123
  readonly method?: "POST" | "GET" | undefined;
1010
124
  readonly fields?: {
1011
125
  readonly [x: string]: string;
@@ -1013,10 +127,10 @@ declare const makeClient: (options?: {
1013
127
  };
1014
128
  }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
1015
129
  readonly id: string & effect_Brand.Brand<"CheckoutSessionId">;
1016
- readonly checkout_url: string;
130
+ readonly checkout_url: string & effect_Brand.Brand<"UrlString">;
1017
131
  readonly payment_method: {
1018
132
  readonly type: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
1019
- readonly url?: string | undefined;
133
+ readonly url?: (string & effect_Brand.Brand<"UrlString">) | undefined;
1020
134
  readonly method?: "POST" | "GET" | undefined;
1021
135
  readonly fields?: {
1022
136
  readonly [x: string]: string;
@@ -1113,9 +227,9 @@ declare const makeClient: (options?: {
1113
227
  readonly [x: string]: any;
1114
228
  } | undefined;
1115
229
  readonly project_id?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
1116
- readonly merchant_customer_id: string;
1117
- readonly email?: string | undefined;
1118
- readonly name?: string | undefined;
230
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
231
+ readonly email?: (string & effect_Brand.Brand<"Email">) | undefined;
232
+ readonly name?: (string & effect_Brand.Brand<"NonEmptyString">) | undefined;
1119
233
  readonly phone?: string | undefined;
1120
234
  };
1121
235
  readonly withResponse?: WithResponse | undefined;
@@ -1127,9 +241,9 @@ declare const makeClient: (options?: {
1127
241
  readonly project_id: string & effect_Brand.Brand<"ProjectId">;
1128
242
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1129
243
  readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
1130
- readonly merchant_customer_id: string;
244
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
1131
245
  readonly email: (string & effect_Brand.Brand<"Email">) | null;
1132
- readonly name: string | null;
246
+ readonly name: (string & effect_Brand.Brand<"NonEmptyString">) | null;
1133
247
  readonly phone: string | null;
1134
248
  }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
1135
249
  readonly id: string & effect_Brand.Brand<"CustomerId">;
@@ -1139,11 +253,59 @@ declare const makeClient: (options?: {
1139
253
  readonly project_id: string & effect_Brand.Brand<"ProjectId">;
1140
254
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1141
255
  readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
1142
- readonly merchant_customer_id: string;
256
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
1143
257
  readonly email: (string & effect_Brand.Brand<"Email">) | null;
1144
- readonly name: string | null;
258
+ readonly name: (string & effect_Brand.Brand<"NonEmptyString">) | null;
1145
259
  readonly phone: string | null;
1146
260
  }, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
261
+ readonly list: <WithResponse extends boolean = false>(request: {
262
+ readonly urlParams: {
263
+ readonly limit?: number | undefined;
264
+ readonly offset?: number | undefined;
265
+ readonly projectId?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
266
+ readonly merchant_customer_id?: string | undefined;
267
+ readonly email?: string | undefined;
268
+ };
269
+ readonly withResponse?: WithResponse | undefined;
270
+ }) => Effect.Effect<WithResponse extends true ? [{
271
+ readonly data: readonly {
272
+ readonly id: string & effect_Brand.Brand<"CustomerId">;
273
+ readonly metadata: {
274
+ readonly [x: string]: any;
275
+ } | null;
276
+ readonly project_id: string & effect_Brand.Brand<"ProjectId">;
277
+ readonly created_at: string & effect_Brand.Brand<"Timestamp">;
278
+ readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
279
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
280
+ readonly email: (string & effect_Brand.Brand<"Email">) | null;
281
+ readonly name: (string & effect_Brand.Brand<"NonEmptyString">) | null;
282
+ readonly phone: string | null;
283
+ }[];
284
+ readonly meta: {
285
+ readonly total: number | null;
286
+ readonly limit: number;
287
+ readonly offset: number;
288
+ };
289
+ }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
290
+ readonly data: readonly {
291
+ readonly id: string & effect_Brand.Brand<"CustomerId">;
292
+ readonly metadata: {
293
+ readonly [x: string]: any;
294
+ } | null;
295
+ readonly project_id: string & effect_Brand.Brand<"ProjectId">;
296
+ readonly created_at: string & effect_Brand.Brand<"Timestamp">;
297
+ readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
298
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
299
+ readonly email: (string & effect_Brand.Brand<"Email">) | null;
300
+ readonly name: (string & effect_Brand.Brand<"NonEmptyString">) | null;
301
+ readonly phone: string | null;
302
+ }[];
303
+ readonly meta: {
304
+ readonly total: number | null;
305
+ readonly limit: number;
306
+ readonly offset: number;
307
+ };
308
+ }, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
1147
309
  readonly retrieve: <WithResponse extends boolean = false>(request: {
1148
310
  readonly path: {
1149
311
  readonly id: string & effect_Brand.Brand<"Id">;
@@ -1157,9 +319,9 @@ declare const makeClient: (options?: {
1157
319
  readonly project_id: string & effect_Brand.Brand<"ProjectId">;
1158
320
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1159
321
  readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
1160
- readonly merchant_customer_id: string;
322
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
1161
323
  readonly email: (string & effect_Brand.Brand<"Email">) | null;
1162
- readonly name: string | null;
324
+ readonly name: (string & effect_Brand.Brand<"NonEmptyString">) | null;
1163
325
  readonly phone: string | null;
1164
326
  }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
1165
327
  readonly id: string & effect_Brand.Brand<"CustomerId">;
@@ -1169,9 +331,9 @@ declare const makeClient: (options?: {
1169
331
  readonly project_id: string & effect_Brand.Brand<"ProjectId">;
1170
332
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1171
333
  readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
1172
- readonly merchant_customer_id: string;
334
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
1173
335
  readonly email: (string & effect_Brand.Brand<"Email">) | null;
1174
- readonly name: string | null;
336
+ readonly name: (string & effect_Brand.Brand<"NonEmptyString">) | null;
1175
337
  readonly phone: string | null;
1176
338
  }, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
1177
339
  readonly update: <WithResponse extends boolean = false>(request: {
@@ -1182,8 +344,8 @@ declare const makeClient: (options?: {
1182
344
  readonly metadata?: {
1183
345
  readonly [x: string]: any;
1184
346
  } | undefined;
1185
- readonly email?: string | undefined;
1186
- readonly name?: string | undefined;
347
+ readonly email?: (string & effect_Brand.Brand<"Email">) | undefined;
348
+ readonly name?: (string & effect_Brand.Brand<"NonEmptyString">) | undefined;
1187
349
  readonly phone?: string | undefined;
1188
350
  };
1189
351
  readonly withResponse?: WithResponse | undefined;
@@ -1195,9 +357,9 @@ declare const makeClient: (options?: {
1195
357
  readonly project_id: string & effect_Brand.Brand<"ProjectId">;
1196
358
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1197
359
  readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
1198
- readonly merchant_customer_id: string;
360
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
1199
361
  readonly email: (string & effect_Brand.Brand<"Email">) | null;
1200
- readonly name: string | null;
362
+ readonly name: (string & effect_Brand.Brand<"NonEmptyString">) | null;
1201
363
  readonly phone: string | null;
1202
364
  }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
1203
365
  readonly id: string & effect_Brand.Brand<"CustomerId">;
@@ -1207,9 +369,9 @@ declare const makeClient: (options?: {
1207
369
  readonly project_id: string & effect_Brand.Brand<"ProjectId">;
1208
370
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1209
371
  readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
1210
- readonly merchant_customer_id: string;
372
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
1211
373
  readonly email: (string & effect_Brand.Brand<"Email">) | null;
1212
- readonly name: string | null;
374
+ readonly name: (string & effect_Brand.Brand<"NonEmptyString">) | null;
1213
375
  readonly phone: string | null;
1214
376
  }, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
1215
377
  readonly delete: <WithResponse extends boolean = false>(request: {
@@ -1222,7 +384,7 @@ declare const makeClient: (options?: {
1222
384
  readonly subscriptions: {
1223
385
  readonly create: <WithResponse extends boolean = false>(request: {
1224
386
  readonly payload: {
1225
- readonly amount: number;
387
+ readonly amount: number & effect_Brand.Brand<"MinorUnitsInt">;
1226
388
  readonly currency: string;
1227
389
  readonly metadata?: {
1228
390
  readonly [x: string]: any;
@@ -1250,7 +412,7 @@ declare const makeClient: (options?: {
1250
412
  readonly interval_count: number;
1251
413
  readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
1252
414
  readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
1253
- readonly payment_link: string;
415
+ readonly payment_link: string & effect_Brand.Brand<"UrlString">;
1254
416
  readonly auto_send_link: boolean;
1255
417
  readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
1256
418
  }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
@@ -1269,7 +431,7 @@ declare const makeClient: (options?: {
1269
431
  readonly interval_count: number;
1270
432
  readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
1271
433
  readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
1272
- readonly payment_link: string;
434
+ readonly payment_link: string & effect_Brand.Brand<"UrlString">;
1273
435
  readonly auto_send_link: boolean;
1274
436
  readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
1275
437
  }, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
@@ -1294,7 +456,7 @@ declare const makeClient: (options?: {
1294
456
  readonly interval_count: number;
1295
457
  readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
1296
458
  readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
1297
- readonly payment_link: string;
459
+ readonly payment_link: string & effect_Brand.Brand<"UrlString">;
1298
460
  readonly auto_send_link: boolean;
1299
461
  readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
1300
462
  }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
@@ -1313,7 +475,7 @@ declare const makeClient: (options?: {
1313
475
  readonly interval_count: number;
1314
476
  readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
1315
477
  readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
1316
- readonly payment_link: string;
478
+ readonly payment_link: string & effect_Brand.Brand<"UrlString">;
1317
479
  readonly auto_send_link: boolean;
1318
480
  readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
1319
481
  }, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
@@ -1343,7 +505,7 @@ declare const makeClient: (options?: {
1343
505
  readonly interval_count: number;
1344
506
  readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
1345
507
  readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
1346
- readonly payment_link: string;
508
+ readonly payment_link: string & effect_Brand.Brand<"UrlString">;
1347
509
  readonly auto_send_link: boolean;
1348
510
  readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
1349
511
  }[];
@@ -1369,7 +531,7 @@ declare const makeClient: (options?: {
1369
531
  readonly interval_count: number;
1370
532
  readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
1371
533
  readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
1372
- readonly payment_link: string;
534
+ readonly payment_link: string & effect_Brand.Brand<"UrlString">;
1373
535
  readonly auto_send_link: boolean;
1374
536
  readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
1375
537
  }[];
@@ -1400,7 +562,7 @@ declare const makeClient: (options?: {
1400
562
  readonly interval_count: number;
1401
563
  readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
1402
564
  readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
1403
- readonly payment_link: string;
565
+ readonly payment_link: string & effect_Brand.Brand<"UrlString">;
1404
566
  readonly auto_send_link: boolean;
1405
567
  readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
1406
568
  }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
@@ -1419,7 +581,7 @@ declare const makeClient: (options?: {
1419
581
  readonly interval_count: number;
1420
582
  readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
1421
583
  readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
1422
- readonly payment_link: string;
584
+ readonly payment_link: string & effect_Brand.Brand<"UrlString">;
1423
585
  readonly auto_send_link: boolean;
1424
586
  readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
1425
587
  }, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
@@ -1472,7 +634,7 @@ declare const makeClient: (options?: {
1472
634
  }) => Effect.Effect<WithResponse extends true ? [{
1473
635
  readonly id: string & effect_Brand.Brand<"TokenId">;
1474
636
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1475
- readonly name: string;
637
+ readonly name: string & effect_Brand.Brand<"NonEmptyString">;
1476
638
  readonly scopes: readonly string[];
1477
639
  readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
1478
640
  readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
@@ -1480,7 +642,7 @@ declare const makeClient: (options?: {
1480
642
  }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
1481
643
  readonly id: string & effect_Brand.Brand<"TokenId">;
1482
644
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1483
- readonly name: string;
645
+ readonly name: string & effect_Brand.Brand<"NonEmptyString">;
1484
646
  readonly scopes: readonly string[];
1485
647
  readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
1486
648
  readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
@@ -1491,14 +653,14 @@ declare const makeClient: (options?: {
1491
653
  }) => Effect.Effect<WithResponse extends true ? [readonly {
1492
654
  readonly id: string & effect_Brand.Brand<"TokenId">;
1493
655
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1494
- readonly name: string;
656
+ readonly name: string & effect_Brand.Brand<"NonEmptyString">;
1495
657
  readonly scopes: readonly string[];
1496
658
  readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
1497
659
  readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
1498
660
  }[], _effect_platform_HttpClientResponse.HttpClientResponse] : readonly {
1499
661
  readonly id: string & effect_Brand.Brand<"TokenId">;
1500
662
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1501
- readonly name: string;
663
+ readonly name: string & effect_Brand.Brand<"NonEmptyString">;
1502
664
  readonly scopes: readonly string[];
1503
665
  readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
1504
666
  readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
@@ -1510,27 +672,80 @@ declare const makeClient: (options?: {
1510
672
  readonly withResponse?: WithResponse | undefined;
1511
673
  }) => Effect.Effect<WithResponse extends true ? [null, _effect_platform_HttpClientResponse.HttpClientResponse] : null, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
1512
674
  };
675
+ readonly projects: {
676
+ readonly list: <WithResponse extends boolean = false>(request: void | {
677
+ readonly withResponse?: WithResponse | undefined;
678
+ }) => Effect.Effect<WithResponse extends true ? [readonly {
679
+ readonly id: string & effect_Brand.Brand<"ProjectId">;
680
+ readonly created_at: string & effect_Brand.Brand<"Timestamp">;
681
+ readonly name: string & effect_Brand.Brand<"NonEmptyString">;
682
+ readonly api_key_secret: string;
683
+ }[], _effect_platform_HttpClientResponse.HttpClientResponse] : readonly {
684
+ readonly id: string & effect_Brand.Brand<"ProjectId">;
685
+ readonly created_at: string & effect_Brand.Brand<"Timestamp">;
686
+ readonly name: string & effect_Brand.Brand<"NonEmptyString">;
687
+ readonly api_key_secret: string;
688
+ }[], _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
689
+ };
690
+ readonly callbacks: {
691
+ readonly handle: <WithResponse extends boolean = false>(request: {
692
+ readonly path: {
693
+ readonly provider: string;
694
+ };
695
+ readonly urlParams: {
696
+ readonly data?: string | undefined;
697
+ readonly payment_id?: string | undefined;
698
+ readonly pidx?: string | undefined;
699
+ };
700
+ readonly withResponse?: WithResponse | undefined;
701
+ }) => 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>;
702
+ };
703
+ readonly realtime: {
704
+ readonly connect: <WithResponse extends boolean = false>(request: {
705
+ readonly urlParams: {
706
+ readonly token: string;
707
+ };
708
+ readonly withResponse?: WithResponse | undefined;
709
+ }) => 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>;
710
+ readonly trigger: <WithResponse extends boolean = false>(request: {
711
+ readonly urlParams: {
712
+ readonly token?: string | undefined;
713
+ };
714
+ readonly payload: {
715
+ readonly data?: any;
716
+ readonly event?: "payment.success" | "payment.failed" | "subscription.created" | "subscription.payment_succeeded" | "subscription.payment_failed" | "subscription.renewal_due" | "subscription.canceled" | undefined;
717
+ };
718
+ readonly withResponse?: WithResponse | undefined;
719
+ }) => Effect.Effect<WithResponse extends true ? [{
720
+ readonly status: string;
721
+ readonly event?: string | undefined;
722
+ }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
723
+ readonly status: string;
724
+ readonly event?: string | undefined;
725
+ }, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
726
+ };
1513
727
  }, never, HttpClient.HttpClient>;
1514
728
  declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-effect/PayArkClient", {
1515
729
  readonly checkout: {
1516
730
  readonly create: <WithResponse extends boolean = false>(request: {
1517
731
  readonly payload: {
1518
- readonly amount: number;
732
+ readonly amount?: (number & effect_Brand.Brand<"MinorUnitsInt">) | undefined;
1519
733
  readonly currency: string;
1520
734
  readonly provider: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
1521
- readonly returnUrl: string;
1522
- readonly cancelUrl?: string | undefined;
735
+ readonly returnUrl: string & effect_Brand.Brand<"UrlString">;
736
+ readonly cancelUrl?: (string & effect_Brand.Brand<"UrlString">) | undefined;
1523
737
  readonly metadata?: {
1524
738
  readonly [x: string]: any;
1525
739
  } | undefined;
740
+ readonly subscriptionId?: (string & effect_Brand.Brand<"SubscriptionId">) | undefined;
1526
741
  };
1527
742
  readonly withResponse?: WithResponse | undefined;
1528
743
  }) => Effect.Effect<WithResponse extends true ? [{
1529
744
  readonly id: string & effect_Brand.Brand<"CheckoutSessionId">;
1530
- readonly checkout_url: string;
745
+ readonly checkout_url: string & effect_Brand.Brand<"UrlString">;
1531
746
  readonly payment_method: {
1532
747
  readonly type: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
1533
- readonly url?: string | undefined;
748
+ readonly url?: (string & effect_Brand.Brand<"UrlString">) | undefined;
1534
749
  readonly method?: "POST" | "GET" | undefined;
1535
750
  readonly fields?: {
1536
751
  readonly [x: string]: string;
@@ -1538,10 +753,10 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1538
753
  };
1539
754
  }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
1540
755
  readonly id: string & effect_Brand.Brand<"CheckoutSessionId">;
1541
- readonly checkout_url: string;
756
+ readonly checkout_url: string & effect_Brand.Brand<"UrlString">;
1542
757
  readonly payment_method: {
1543
758
  readonly type: "esewa" | "khalti" | "connectips" | "imepay" | "fonepay" | "sandbox";
1544
- readonly url?: string | undefined;
759
+ readonly url?: (string & effect_Brand.Brand<"UrlString">) | undefined;
1545
760
  readonly method?: "POST" | "GET" | undefined;
1546
761
  readonly fields?: {
1547
762
  readonly [x: string]: string;
@@ -1638,9 +853,9 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1638
853
  readonly [x: string]: any;
1639
854
  } | undefined;
1640
855
  readonly project_id?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
1641
- readonly merchant_customer_id: string;
1642
- readonly email?: string | undefined;
1643
- readonly name?: string | undefined;
856
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
857
+ readonly email?: (string & effect_Brand.Brand<"Email">) | undefined;
858
+ readonly name?: (string & effect_Brand.Brand<"NonEmptyString">) | undefined;
1644
859
  readonly phone?: string | undefined;
1645
860
  };
1646
861
  readonly withResponse?: WithResponse | undefined;
@@ -1652,9 +867,9 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1652
867
  readonly project_id: string & effect_Brand.Brand<"ProjectId">;
1653
868
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1654
869
  readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
1655
- readonly merchant_customer_id: string;
870
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
1656
871
  readonly email: (string & effect_Brand.Brand<"Email">) | null;
1657
- readonly name: string | null;
872
+ readonly name: (string & effect_Brand.Brand<"NonEmptyString">) | null;
1658
873
  readonly phone: string | null;
1659
874
  }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
1660
875
  readonly id: string & effect_Brand.Brand<"CustomerId">;
@@ -1664,11 +879,59 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1664
879
  readonly project_id: string & effect_Brand.Brand<"ProjectId">;
1665
880
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1666
881
  readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
1667
- readonly merchant_customer_id: string;
882
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
1668
883
  readonly email: (string & effect_Brand.Brand<"Email">) | null;
1669
- readonly name: string | null;
884
+ readonly name: (string & effect_Brand.Brand<"NonEmptyString">) | null;
1670
885
  readonly phone: string | null;
1671
886
  }, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
887
+ readonly list: <WithResponse extends boolean = false>(request: {
888
+ readonly urlParams: {
889
+ readonly limit?: number | undefined;
890
+ readonly offset?: number | undefined;
891
+ readonly projectId?: (string & effect_Brand.Brand<"ProjectId">) | undefined;
892
+ readonly merchant_customer_id?: string | undefined;
893
+ readonly email?: string | undefined;
894
+ };
895
+ readonly withResponse?: WithResponse | undefined;
896
+ }) => Effect.Effect<WithResponse extends true ? [{
897
+ readonly data: readonly {
898
+ readonly id: string & effect_Brand.Brand<"CustomerId">;
899
+ readonly metadata: {
900
+ readonly [x: string]: any;
901
+ } | null;
902
+ readonly project_id: string & effect_Brand.Brand<"ProjectId">;
903
+ readonly created_at: string & effect_Brand.Brand<"Timestamp">;
904
+ readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
905
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
906
+ readonly email: (string & effect_Brand.Brand<"Email">) | null;
907
+ readonly name: (string & effect_Brand.Brand<"NonEmptyString">) | null;
908
+ readonly phone: string | null;
909
+ }[];
910
+ readonly meta: {
911
+ readonly total: number | null;
912
+ readonly limit: number;
913
+ readonly offset: number;
914
+ };
915
+ }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
916
+ readonly data: readonly {
917
+ readonly id: string & effect_Brand.Brand<"CustomerId">;
918
+ readonly metadata: {
919
+ readonly [x: string]: any;
920
+ } | null;
921
+ readonly project_id: string & effect_Brand.Brand<"ProjectId">;
922
+ readonly created_at: string & effect_Brand.Brand<"Timestamp">;
923
+ readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
924
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
925
+ readonly email: (string & effect_Brand.Brand<"Email">) | null;
926
+ readonly name: (string & effect_Brand.Brand<"NonEmptyString">) | null;
927
+ readonly phone: string | null;
928
+ }[];
929
+ readonly meta: {
930
+ readonly total: number | null;
931
+ readonly limit: number;
932
+ readonly offset: number;
933
+ };
934
+ }, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
1672
935
  readonly retrieve: <WithResponse extends boolean = false>(request: {
1673
936
  readonly path: {
1674
937
  readonly id: string & effect_Brand.Brand<"Id">;
@@ -1682,9 +945,9 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1682
945
  readonly project_id: string & effect_Brand.Brand<"ProjectId">;
1683
946
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1684
947
  readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
1685
- readonly merchant_customer_id: string;
948
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
1686
949
  readonly email: (string & effect_Brand.Brand<"Email">) | null;
1687
- readonly name: string | null;
950
+ readonly name: (string & effect_Brand.Brand<"NonEmptyString">) | null;
1688
951
  readonly phone: string | null;
1689
952
  }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
1690
953
  readonly id: string & effect_Brand.Brand<"CustomerId">;
@@ -1694,9 +957,9 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1694
957
  readonly project_id: string & effect_Brand.Brand<"ProjectId">;
1695
958
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1696
959
  readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
1697
- readonly merchant_customer_id: string;
960
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
1698
961
  readonly email: (string & effect_Brand.Brand<"Email">) | null;
1699
- readonly name: string | null;
962
+ readonly name: (string & effect_Brand.Brand<"NonEmptyString">) | null;
1700
963
  readonly phone: string | null;
1701
964
  }, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
1702
965
  readonly update: <WithResponse extends boolean = false>(request: {
@@ -1707,8 +970,8 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1707
970
  readonly metadata?: {
1708
971
  readonly [x: string]: any;
1709
972
  } | undefined;
1710
- readonly email?: string | undefined;
1711
- readonly name?: string | undefined;
973
+ readonly email?: (string & effect_Brand.Brand<"Email">) | undefined;
974
+ readonly name?: (string & effect_Brand.Brand<"NonEmptyString">) | undefined;
1712
975
  readonly phone?: string | undefined;
1713
976
  };
1714
977
  readonly withResponse?: WithResponse | undefined;
@@ -1720,9 +983,9 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1720
983
  readonly project_id: string & effect_Brand.Brand<"ProjectId">;
1721
984
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1722
985
  readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
1723
- readonly merchant_customer_id: string;
986
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
1724
987
  readonly email: (string & effect_Brand.Brand<"Email">) | null;
1725
- readonly name: string | null;
988
+ readonly name: (string & effect_Brand.Brand<"NonEmptyString">) | null;
1726
989
  readonly phone: string | null;
1727
990
  }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
1728
991
  readonly id: string & effect_Brand.Brand<"CustomerId">;
@@ -1732,9 +995,9 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1732
995
  readonly project_id: string & effect_Brand.Brand<"ProjectId">;
1733
996
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1734
997
  readonly updated_at?: (string & effect_Brand.Brand<"Timestamp">) | undefined;
1735
- readonly merchant_customer_id: string;
998
+ readonly merchant_customer_id: string & effect_Brand.Brand<"NonEmptyString">;
1736
999
  readonly email: (string & effect_Brand.Brand<"Email">) | null;
1737
- readonly name: string | null;
1000
+ readonly name: (string & effect_Brand.Brand<"NonEmptyString">) | null;
1738
1001
  readonly phone: string | null;
1739
1002
  }, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
1740
1003
  readonly delete: <WithResponse extends boolean = false>(request: {
@@ -1747,7 +1010,7 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1747
1010
  readonly subscriptions: {
1748
1011
  readonly create: <WithResponse extends boolean = false>(request: {
1749
1012
  readonly payload: {
1750
- readonly amount: number;
1013
+ readonly amount: number & effect_Brand.Brand<"MinorUnitsInt">;
1751
1014
  readonly currency: string;
1752
1015
  readonly metadata?: {
1753
1016
  readonly [x: string]: any;
@@ -1775,7 +1038,7 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1775
1038
  readonly interval_count: number;
1776
1039
  readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
1777
1040
  readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
1778
- readonly payment_link: string;
1041
+ readonly payment_link: string & effect_Brand.Brand<"UrlString">;
1779
1042
  readonly auto_send_link: boolean;
1780
1043
  readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
1781
1044
  }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
@@ -1794,7 +1057,7 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1794
1057
  readonly interval_count: number;
1795
1058
  readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
1796
1059
  readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
1797
- readonly payment_link: string;
1060
+ readonly payment_link: string & effect_Brand.Brand<"UrlString">;
1798
1061
  readonly auto_send_link: boolean;
1799
1062
  readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
1800
1063
  }, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
@@ -1819,7 +1082,7 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1819
1082
  readonly interval_count: number;
1820
1083
  readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
1821
1084
  readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
1822
- readonly payment_link: string;
1085
+ readonly payment_link: string & effect_Brand.Brand<"UrlString">;
1823
1086
  readonly auto_send_link: boolean;
1824
1087
  readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
1825
1088
  }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
@@ -1838,7 +1101,7 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1838
1101
  readonly interval_count: number;
1839
1102
  readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
1840
1103
  readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
1841
- readonly payment_link: string;
1104
+ readonly payment_link: string & effect_Brand.Brand<"UrlString">;
1842
1105
  readonly auto_send_link: boolean;
1843
1106
  readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
1844
1107
  }, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
@@ -1868,7 +1131,7 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1868
1131
  readonly interval_count: number;
1869
1132
  readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
1870
1133
  readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
1871
- readonly payment_link: string;
1134
+ readonly payment_link: string & effect_Brand.Brand<"UrlString">;
1872
1135
  readonly auto_send_link: boolean;
1873
1136
  readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
1874
1137
  }[];
@@ -1894,7 +1157,7 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1894
1157
  readonly interval_count: number;
1895
1158
  readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
1896
1159
  readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
1897
- readonly payment_link: string;
1160
+ readonly payment_link: string & effect_Brand.Brand<"UrlString">;
1898
1161
  readonly auto_send_link: boolean;
1899
1162
  readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
1900
1163
  }[];
@@ -1925,7 +1188,7 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1925
1188
  readonly interval_count: number;
1926
1189
  readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
1927
1190
  readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
1928
- readonly payment_link: string;
1191
+ readonly payment_link: string & effect_Brand.Brand<"UrlString">;
1929
1192
  readonly auto_send_link: boolean;
1930
1193
  readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
1931
1194
  }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
@@ -1944,7 +1207,7 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1944
1207
  readonly interval_count: number;
1945
1208
  readonly current_period_start: string & effect_Brand.Brand<"Timestamp">;
1946
1209
  readonly current_period_end: string & effect_Brand.Brand<"Timestamp">;
1947
- readonly payment_link: string;
1210
+ readonly payment_link: string & effect_Brand.Brand<"UrlString">;
1948
1211
  readonly auto_send_link: boolean;
1949
1212
  readonly canceled_at?: (string & effect_Brand.Brand<"Timestamp">) | null | undefined;
1950
1213
  }, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
@@ -1997,7 +1260,7 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
1997
1260
  }) => Effect.Effect<WithResponse extends true ? [{
1998
1261
  readonly id: string & effect_Brand.Brand<"TokenId">;
1999
1262
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
2000
- readonly name: string;
1263
+ readonly name: string & effect_Brand.Brand<"NonEmptyString">;
2001
1264
  readonly scopes: readonly string[];
2002
1265
  readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
2003
1266
  readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
@@ -2005,7 +1268,7 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
2005
1268
  }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
2006
1269
  readonly id: string & effect_Brand.Brand<"TokenId">;
2007
1270
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
2008
- readonly name: string;
1271
+ readonly name: string & effect_Brand.Brand<"NonEmptyString">;
2009
1272
  readonly scopes: readonly string[];
2010
1273
  readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
2011
1274
  readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
@@ -2016,14 +1279,14 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
2016
1279
  }) => Effect.Effect<WithResponse extends true ? [readonly {
2017
1280
  readonly id: string & effect_Brand.Brand<"TokenId">;
2018
1281
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
2019
- readonly name: string;
1282
+ readonly name: string & effect_Brand.Brand<"NonEmptyString">;
2020
1283
  readonly scopes: readonly string[];
2021
1284
  readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
2022
1285
  readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
2023
1286
  }[], _effect_platform_HttpClientResponse.HttpClientResponse] : readonly {
2024
1287
  readonly id: string & effect_Brand.Brand<"TokenId">;
2025
1288
  readonly created_at: string & effect_Brand.Brand<"Timestamp">;
2026
- readonly name: string;
1289
+ readonly name: string & effect_Brand.Brand<"NonEmptyString">;
2027
1290
  readonly scopes: readonly string[];
2028
1291
  readonly last_used_at: (string & effect_Brand.Brand<"Timestamp">) | null;
2029
1292
  readonly expires_at: (string & effect_Brand.Brand<"Timestamp">) | null;
@@ -2035,6 +1298,58 @@ declare const PayArkClient_base: Context.TagClass<PayArkClient, "@payark/sdk-eff
2035
1298
  readonly withResponse?: WithResponse | undefined;
2036
1299
  }) => Effect.Effect<WithResponse extends true ? [null, _effect_platform_HttpClientResponse.HttpClientResponse] : null, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
2037
1300
  };
1301
+ readonly projects: {
1302
+ readonly list: <WithResponse extends boolean = false>(request: void | {
1303
+ readonly withResponse?: WithResponse | undefined;
1304
+ }) => Effect.Effect<WithResponse extends true ? [readonly {
1305
+ readonly id: string & effect_Brand.Brand<"ProjectId">;
1306
+ readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1307
+ readonly name: string & effect_Brand.Brand<"NonEmptyString">;
1308
+ readonly api_key_secret: string;
1309
+ }[], _effect_platform_HttpClientResponse.HttpClientResponse] : readonly {
1310
+ readonly id: string & effect_Brand.Brand<"ProjectId">;
1311
+ readonly created_at: string & effect_Brand.Brand<"Timestamp">;
1312
+ readonly name: string & effect_Brand.Brand<"NonEmptyString">;
1313
+ readonly api_key_secret: string;
1314
+ }[], _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
1315
+ };
1316
+ readonly callbacks: {
1317
+ readonly handle: <WithResponse extends boolean = false>(request: {
1318
+ readonly path: {
1319
+ readonly provider: string;
1320
+ };
1321
+ readonly urlParams: {
1322
+ readonly data?: string | undefined;
1323
+ readonly payment_id?: string | undefined;
1324
+ readonly pidx?: string | undefined;
1325
+ };
1326
+ readonly withResponse?: WithResponse | undefined;
1327
+ }) => 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>;
1328
+ };
1329
+ readonly realtime: {
1330
+ readonly connect: <WithResponse extends boolean = false>(request: {
1331
+ readonly urlParams: {
1332
+ readonly token: string;
1333
+ };
1334
+ readonly withResponse?: WithResponse | undefined;
1335
+ }) => 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>;
1336
+ readonly trigger: <WithResponse extends boolean = false>(request: {
1337
+ readonly urlParams: {
1338
+ readonly token?: string | undefined;
1339
+ };
1340
+ readonly payload: {
1341
+ readonly data?: any;
1342
+ readonly event?: "payment.success" | "payment.failed" | "subscription.created" | "subscription.payment_succeeded" | "subscription.payment_failed" | "subscription.renewal_due" | "subscription.canceled" | undefined;
1343
+ };
1344
+ readonly withResponse?: WithResponse | undefined;
1345
+ }) => Effect.Effect<WithResponse extends true ? [{
1346
+ readonly status: string;
1347
+ readonly event?: string | undefined;
1348
+ }, _effect_platform_HttpClientResponse.HttpClientResponse] : {
1349
+ readonly status: string;
1350
+ readonly event?: string | undefined;
1351
+ }, _effect_platform_HttpApiError.HttpApiDecodeError | AuthenticationError | InternalServerError | IndustrialError | NotFoundError | ConflictError | _effect_platform_HttpClientError.HttpClientError | effect_ParseResult.ParseError, never>;
1352
+ };
2038
1353
  }>;
2039
1354
  /**
2040
1355
  * Service Tag for the Industrial Client.
@@ -2078,4 +1393,4 @@ declare class PayArk extends PayArk_base {
2078
1393
  static readonly Live: (config: PayArkConfig) => Layer.Layer<PayArk, never, never>;
2079
1394
  }
2080
1395
 
2081
- export { AuthContext, AuthenticationError, AutomationGroup, CheckoutGroup, CheckoutSession, CheckoutSessionId, ConflictError, CreateCheckoutParams, CreateCustomerParams, CreateSubscriptionParams, CronSecurity, Customer, CustomerId, CustomersGroup, Email, Id, IndustrialError, InternalServerError, ListCustomersParams, ListPaymentsParams, ListSubscriptionsParams, Metadata, NotFoundError, PaginatedResponse, PaginationMeta, PayArk, PayArkApi, PayArkClient, PayArkConfig, PayArkEffect, PayArkEffectError, PayArkErrorBody$1 as PayArkErrorBody, Payment, PaymentId, PaymentStatus, PaymentsGroup, Project, ProjectId, Provider, SecurityMiddleware, Subscription, SubscriptionId, SubscriptionInterval, SubscriptionStatus, SubscriptionsGroup, Timestamp, Timestamps, Token, TokenId, TokensGroup, UpdateCustomerParams, UserSecurity, WebhookEvent, WebhookEventType, makeClient };
1396
+ export { AuthenticationError, CheckoutSession, ConflictError, CreateCheckoutParams, IndustrialError, InternalServerError, ListPaymentsParams, NotFoundError, PaginatedResponse, PayArk, PayArkClient, PayArkConfig, PayArkEffect, PayArkEffectError, Payment, Project, makeClient };