@marcoappio/marco-config 5.0.1 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/marcoPublicConfig.d.ts +0 -12
- package/dist/marcoPublicConfig.d.ts.map +1 -1
- package/dist/marcoPublicConfig.js +0 -33
- package/dist/schemas/index.d.ts +0 -83
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +0 -2
- package/dist/schemas/models/user.d.ts +0 -41
- package/dist/schemas/models/user.d.ts.map +1 -1
- package/dist/schemas/models/user.js +0 -3
- package/dist/sdk/endpoints/index.d.ts +0 -53
- package/dist/sdk/endpoints/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/index.d.ts +0 -53
- package/dist/sdk/endpoints/private/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/models/user/getUser.d.ts +0 -41
- package/dist/sdk/endpoints/private/models/user/getUser.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/user/index.d.ts +0 -53
- package/dist/sdk/endpoints/private/user/index.d.ts.map +1 -1
- package/dist/sdk/endpoints/private/user/index.js +0 -4
- package/dist/sdk/index.d.ts +0 -59
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/validation/errors.d.ts +0 -12
- package/dist/sdk/validation/errors.d.ts.map +1 -1
- package/dist/sdk/validation/errors.js +0 -5
- package/dist/sdk/validation/index.d.ts +0 -6
- package/dist/sdk/validation/index.d.ts.map +1 -1
- package/dist/types/SDKError.d.ts +1 -1
- package/dist/types/SDKError.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +0 -2
- package/package.json +2 -2
- package/dist/schemas/mutators/mutatorSchemas.test.d.ts +0 -2
- package/dist/schemas/mutators/mutatorSchemas.test.d.ts.map +0 -1
- package/dist/schemas/mutators/mutatorSchemas.test.js +0 -39
- package/dist/schemas/stripe.d.ts +0 -43
- package/dist/schemas/stripe.d.ts.map +0 -1
- package/dist/schemas/stripe.js +0 -48
- package/dist/sdk/endpoints/private/user/createBillingPortalSession.d.ts +0 -30
- package/dist/sdk/endpoints/private/user/createBillingPortalSession.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/user/createBillingPortalSession.js +0 -19
- package/dist/sdk/endpoints/private/user/createCheckoutSession.d.ts +0 -27
- package/dist/sdk/endpoints/private/user/createCheckoutSession.d.ts.map +0 -1
- package/dist/sdk/endpoints/private/user/createCheckoutSession.js +0 -20
- package/dist/types/StripeSubscriptionStatus.d.ts +0 -3
- package/dist/types/StripeSubscriptionStatus.d.ts.map +0 -1
- package/dist/types/StripeSubscriptionStatus.js +0 -10
- package/dist/types/SubscriptionTier.d.ts +0 -3
- package/dist/types/SubscriptionTier.d.ts.map +0 -1
- package/dist/types/SubscriptionTier.js +0 -1
- package/dist/utils/threads/parseLabelIdList/parseLabelIdList.test.d.ts +0 -2
- package/dist/utils/threads/parseLabelIdList/parseLabelIdList.test.d.ts.map +0 -1
- package/dist/utils/threads/parseLabelIdList/parseLabelIdList.test.js +0 -18
- package/dist/utils/threads/processSearchTerm/processSearchTerm.test.d.ts +0 -2
- package/dist/utils/threads/processSearchTerm/processSearchTerm.test.d.ts.map +0 -1
- package/dist/utils/threads/processSearchTerm/processSearchTerm.test.js +0 -38
package/dist/sdk/index.d.ts
CHANGED
|
@@ -66,59 +66,6 @@ export declare const marcoSDK: {
|
|
|
66
66
|
user: typeof import("./endpoints/private/mutations/user");
|
|
67
67
|
};
|
|
68
68
|
user: {
|
|
69
|
-
createBillingPortalSession: import("..").EndpointConfig<"/v1/pv/user/create-billing-portal-session", import("valibot").ObjectSchema<{
|
|
70
|
-
readonly returnUrl: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").UrlAction<string, undefined>]>;
|
|
71
|
-
}, undefined>, import("valibot").GenericSchema | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
|
|
72
|
-
readonly data: import("valibot").ObjectSchema<{
|
|
73
|
-
readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
|
|
74
|
-
}, undefined>;
|
|
75
|
-
readonly status: import("valibot").LiteralSchema<401, undefined>;
|
|
76
|
-
}, undefined>, import("valibot").ObjectSchema<{
|
|
77
|
-
readonly data: import("valibot").ObjectSchema<{
|
|
78
|
-
readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
79
|
-
readonly issues: import("valibot").ObjectSchema<{
|
|
80
|
-
readonly nested: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
|
|
81
|
-
readonly other: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
|
|
82
|
-
readonly root: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
|
|
83
|
-
}, undefined>;
|
|
84
|
-
}, undefined>;
|
|
85
|
-
readonly status: import("valibot").LiteralSchema<400, undefined>;
|
|
86
|
-
}, undefined>, import("valibot").ObjectSchema<{
|
|
87
|
-
readonly data: import("valibot").ObjectSchema<{
|
|
88
|
-
readonly code: import("valibot").LiteralSchema<"SUBSCRIPTION_NOT_FOUND", undefined>;
|
|
89
|
-
}, undefined>;
|
|
90
|
-
readonly status: import("valibot").LiteralSchema<404, undefined>;
|
|
91
|
-
}, undefined>, import("valibot").ObjectSchema<{
|
|
92
|
-
readonly data: import("valibot").ObjectSchema<{
|
|
93
|
-
readonly url: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").UrlAction<string, undefined>]>;
|
|
94
|
-
}, undefined>;
|
|
95
|
-
readonly status: import("valibot").LiteralSchema<200, undefined>;
|
|
96
|
-
}, undefined>], undefined>>;
|
|
97
|
-
createCheckoutSession: import("..").EndpointConfig<"/v1/pv/user/create-checkout-session", import("valibot").ObjectSchema<{
|
|
98
|
-
readonly cancelUrl: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>]>;
|
|
99
|
-
readonly priceId: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>]>;
|
|
100
|
-
readonly successUrl: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").MinLengthAction<string, 1, undefined>]>;
|
|
101
|
-
}, undefined>, import("valibot").GenericSchema | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
|
|
102
|
-
readonly data: import("valibot").ObjectSchema<{
|
|
103
|
-
readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
|
|
104
|
-
}, undefined>;
|
|
105
|
-
readonly status: import("valibot").LiteralSchema<401, undefined>;
|
|
106
|
-
}, undefined>, import("valibot").ObjectSchema<{
|
|
107
|
-
readonly data: import("valibot").ObjectSchema<{
|
|
108
|
-
readonly code: import("valibot").LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
109
|
-
readonly issues: import("valibot").ObjectSchema<{
|
|
110
|
-
readonly nested: import("valibot").OptionalSchema<import("valibot").RecordSchema<import("valibot").StringSchema<undefined>, import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
|
|
111
|
-
readonly other: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
|
|
112
|
-
readonly root: import("valibot").OptionalSchema<import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
|
|
113
|
-
}, undefined>;
|
|
114
|
-
}, undefined>;
|
|
115
|
-
readonly status: import("valibot").LiteralSchema<400, undefined>;
|
|
116
|
-
}, undefined>, import("valibot").ObjectSchema<{
|
|
117
|
-
readonly data: import("valibot").ObjectSchema<{
|
|
118
|
-
readonly url: import("valibot").SchemaWithPipe<readonly [import("valibot").StringSchema<undefined>, import("valibot").UrlAction<string, undefined>]>;
|
|
119
|
-
}, undefined>;
|
|
120
|
-
readonly status: import("valibot").LiteralSchema<200, undefined>;
|
|
121
|
-
}, undefined>], undefined>>;
|
|
122
69
|
deleteUser: import("..").EndpointConfig<"/v1/pv/user", import("valibot").GenericSchema | undefined, import("valibot").GenericSchema | undefined, import("valibot").UnionSchema<[import("valibot").ObjectSchema<{
|
|
123
70
|
readonly data: import("valibot").ObjectSchema<{
|
|
124
71
|
readonly code: import("valibot").LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
|
|
@@ -432,12 +379,6 @@ export declare const marcoSDK: {
|
|
|
432
379
|
}, undefined>;
|
|
433
380
|
readonly status: import("valibot").LiteralSchema<409, undefined>;
|
|
434
381
|
}, undefined>;
|
|
435
|
-
readonly subscriptionNotFoundErrorSchema: import("valibot").ObjectSchema<{
|
|
436
|
-
readonly data: import("valibot").ObjectSchema<{
|
|
437
|
-
readonly code: import("valibot").LiteralSchema<"SUBSCRIPTION_NOT_FOUND", undefined>;
|
|
438
|
-
}, undefined>;
|
|
439
|
-
readonly status: import("valibot").LiteralSchema<404, undefined>;
|
|
440
|
-
}, undefined>;
|
|
441
382
|
readonly threadNotFoundErrorSchema: import("valibot").ObjectSchema<{
|
|
442
383
|
readonly data: import("valibot").ObjectSchema<{
|
|
443
384
|
readonly code: import("valibot").LiteralSchema<"THREAD_NOT_FOUND", undefined>;
|
package/dist/sdk/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sdk/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGpB,CAAA"}
|
|
@@ -131,12 +131,6 @@ export declare const viewNotFoundErrorSchema: v.ObjectSchema<{
|
|
|
131
131
|
}, undefined>;
|
|
132
132
|
readonly status: v.LiteralSchema<404, undefined>;
|
|
133
133
|
}, undefined>;
|
|
134
|
-
export declare const subscriptionNotFoundErrorSchema: v.ObjectSchema<{
|
|
135
|
-
readonly data: v.ObjectSchema<{
|
|
136
|
-
readonly code: v.LiteralSchema<"SUBSCRIPTION_NOT_FOUND", undefined>;
|
|
137
|
-
}, undefined>;
|
|
138
|
-
readonly status: v.LiteralSchema<404, undefined>;
|
|
139
|
-
}, undefined>;
|
|
140
134
|
export declare const validationFailedErrorSchema: v.ObjectSchema<{
|
|
141
135
|
readonly data: v.ObjectSchema<{
|
|
142
136
|
readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
@@ -293,12 +287,6 @@ export declare const errors: {
|
|
|
293
287
|
}, undefined>;
|
|
294
288
|
readonly status: v.LiteralSchema<409, undefined>;
|
|
295
289
|
}, undefined>;
|
|
296
|
-
readonly subscriptionNotFoundErrorSchema: v.ObjectSchema<{
|
|
297
|
-
readonly data: v.ObjectSchema<{
|
|
298
|
-
readonly code: v.LiteralSchema<"SUBSCRIPTION_NOT_FOUND", undefined>;
|
|
299
|
-
}, undefined>;
|
|
300
|
-
readonly status: v.LiteralSchema<404, undefined>;
|
|
301
|
-
}, undefined>;
|
|
302
290
|
readonly threadNotFoundErrorSchema: v.ObjectSchema<{
|
|
303
291
|
readonly data: v.ObjectSchema<{
|
|
304
292
|
readonly code: v.LiteralSchema<"THREAD_NOT_FOUND", undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/sdk/validation/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,yBAAyB;;;;;aAGpC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;aAGrC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;aAGrC,CAAA;AAEF,eAAO,MAAM,8BAA8B;;;;;aAGzC,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;;aAG5C,CAAA;AAEF,eAAO,MAAM,uCAAuC;;;;;aAGlD,CAAA;AAEF,eAAO,MAAM,qBAAqB;;;;;aAGhC,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;;aAGlC,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;;aAGlC,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;aAG3C,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;aAGrC,CAAA;AAEF,eAAO,MAAM,6BAA6B;;;;;aAGxC,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;;aAG5C,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;aAGrC,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;;aAGtC,CAAA;AAEF,eAAO,MAAM,yBAAyB;;;;;aAGpC,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;aAGnC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;aAGrC,C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MAAM,wBAAwB;;;;;aAGnC,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;;aAGlC,CAAA;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;aAUtC,CAAA;AAEF,eAAO,MAAM,uBAAuB;;;;;aAGlC,CAAA;AAEF,eAAO,MAAM,0BAA0B;;;;;aAGrC,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;;aAG5C,CAAA;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BT,CAAA"}
|
|
@@ -87,10 +87,6 @@ export const viewNotFoundErrorSchema = v.object({
|
|
|
87
87
|
data: v.object({ code: v.literal('VIEW_NOT_FOUND') }),
|
|
88
88
|
status: v.literal(404),
|
|
89
89
|
});
|
|
90
|
-
export const subscriptionNotFoundErrorSchema = v.object({
|
|
91
|
-
data: v.object({ code: v.literal('SUBSCRIPTION_NOT_FOUND') }),
|
|
92
|
-
status: v.literal(404),
|
|
93
|
-
});
|
|
94
90
|
export const validationFailedErrorSchema = v.object({
|
|
95
91
|
data: v.object({
|
|
96
92
|
code: v.literal('VALIDATION_FAILED'),
|
|
@@ -136,7 +132,6 @@ export const errors = {
|
|
|
136
132
|
labelNotFoundErrorSchema,
|
|
137
133
|
messageNotFoundErrorSchema,
|
|
138
134
|
mutationRejectedErrorSchema,
|
|
139
|
-
subscriptionNotFoundErrorSchema,
|
|
140
135
|
threadNotFoundErrorSchema,
|
|
141
136
|
userMarkedForDeletionErrorSchema,
|
|
142
137
|
userNotFoundErrorSchema,
|
|
@@ -126,12 +126,6 @@ export declare const validation: {
|
|
|
126
126
|
}, undefined>;
|
|
127
127
|
readonly status: import("valibot").LiteralSchema<409, undefined>;
|
|
128
128
|
}, undefined>;
|
|
129
|
-
readonly subscriptionNotFoundErrorSchema: import("valibot").ObjectSchema<{
|
|
130
|
-
readonly data: import("valibot").ObjectSchema<{
|
|
131
|
-
readonly code: import("valibot").LiteralSchema<"SUBSCRIPTION_NOT_FOUND", undefined>;
|
|
132
|
-
}, undefined>;
|
|
133
|
-
readonly status: import("valibot").LiteralSchema<404, undefined>;
|
|
134
|
-
}, undefined>;
|
|
135
129
|
readonly threadNotFoundErrorSchema: import("valibot").ObjectSchema<{
|
|
136
130
|
readonly data: import("valibot").ObjectSchema<{
|
|
137
131
|
readonly code: import("valibot").LiteralSchema<"THREAD_NOT_FOUND", undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/validation/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/validation/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAoB,CAAA"}
|
package/dist/types/SDKError.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as v from 'valibot';
|
|
2
2
|
import type { errors } from '../sdk/validation/errors';
|
|
3
|
-
export type SDKError = v.InferOutput<typeof errors.accountNotFoundErrorSchema> | v.InferOutput<typeof errors.aliasNotFoundErrorSchema> | v.InferOutput<typeof errors.attachmentNotFoundErrorSchema> | v.InferOutput<typeof errors.attachmentStateInvalidErrorSchema> | v.InferOutput<typeof errors.authCodeExpiredErrorSchema> | v.InferOutput<typeof errors.authCodeInvalidErrorSchema> | v.InferOutput<typeof errors.authCodePreviouslyUsedErrorSchema> | v.InferOutput<typeof errors.authFailedErrorSchema> | v.InferOutput<typeof errors.authRefreshTokenInvalid> | v.InferOutput<typeof errors.authServerResponseUnexpectedErrorSchema> | v.InferOutput<typeof errors.authTooManyAttemptsErrorSchema> | v.InferOutput<typeof errors.contactNotFoundErrorSchema> | v.InferOutput<typeof errors.draftNotFoundErrorSchema> | v.InferOutput<typeof errors.fileTooLargeErrorSchema> | v.InferOutput<typeof errors.invalidFileTypeErrorSchema> | v.InferOutput<typeof errors.invalidImageDimensionsErrorSchema> | v.InferOutput<typeof errors.inviteNotFoundErrorSchema> | v.InferOutput<typeof errors.labelAlreadyExistsErrorSchema> | v.InferOutput<typeof errors.labelNotFoundErrorSchema> | v.InferOutput<typeof errors.messageNotFoundErrorSchema> | v.InferOutput<typeof errors.mutationRejectedErrorSchema> | v.InferOutput<typeof errors.threadNotFoundErrorSchema> | v.InferOutput<typeof errors.userMarkedForDeletionErrorSchema> | v.InferOutput<typeof errors.userNotFoundErrorSchema> | v.InferOutput<typeof errors.validationFailedErrorSchema> | v.InferOutput<typeof errors.viewNotFoundErrorSchema
|
|
3
|
+
export type SDKError = v.InferOutput<typeof errors.accountNotFoundErrorSchema> | v.InferOutput<typeof errors.aliasNotFoundErrorSchema> | v.InferOutput<typeof errors.attachmentNotFoundErrorSchema> | v.InferOutput<typeof errors.attachmentStateInvalidErrorSchema> | v.InferOutput<typeof errors.authCodeExpiredErrorSchema> | v.InferOutput<typeof errors.authCodeInvalidErrorSchema> | v.InferOutput<typeof errors.authCodePreviouslyUsedErrorSchema> | v.InferOutput<typeof errors.authFailedErrorSchema> | v.InferOutput<typeof errors.authRefreshTokenInvalid> | v.InferOutput<typeof errors.authServerResponseUnexpectedErrorSchema> | v.InferOutput<typeof errors.authTooManyAttemptsErrorSchema> | v.InferOutput<typeof errors.contactNotFoundErrorSchema> | v.InferOutput<typeof errors.draftNotFoundErrorSchema> | v.InferOutput<typeof errors.fileTooLargeErrorSchema> | v.InferOutput<typeof errors.invalidFileTypeErrorSchema> | v.InferOutput<typeof errors.invalidImageDimensionsErrorSchema> | v.InferOutput<typeof errors.inviteNotFoundErrorSchema> | v.InferOutput<typeof errors.labelAlreadyExistsErrorSchema> | v.InferOutput<typeof errors.labelNotFoundErrorSchema> | v.InferOutput<typeof errors.messageNotFoundErrorSchema> | v.InferOutput<typeof errors.mutationRejectedErrorSchema> | v.InferOutput<typeof errors.threadNotFoundErrorSchema> | v.InferOutput<typeof errors.userMarkedForDeletionErrorSchema> | v.InferOutput<typeof errors.userNotFoundErrorSchema> | v.InferOutput<typeof errors.validationFailedErrorSchema> | v.InferOutput<typeof errors.viewNotFoundErrorSchema>;
|
|
4
4
|
//# sourceMappingURL=SDKError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDKError.d.ts","sourceRoot":"","sources":["../../src/types/SDKError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,CAAC,MAAM,SAAS,CAAA;AAEjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAA;AAEjE,MAAM,MAAM,QAAQ,GAChB,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,0BAA0B,CAAC,GACvD,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,wBAAwB,CAAC,GACrD,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,6BAA6B,CAAC,GAC1D,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,iCAAiC,CAAC,GAC9D,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,0BAA0B,CAAC,GACvD,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,0BAA0B,CAAC,GACvD,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,iCAAiC,CAAC,GAC9D,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,qBAAqB,CAAC,GAClD,CAAC,CAAC,WAAW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CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,wBAAwB,CAAC,GACrD,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,0BAA0B,CAAC,GACvD,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,2BAA2B,CAAC,GACxD,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,yBAAyB,CAAC,GACtD,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,gCAAgC,CAAC,GAC7D,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,uBAAuB,CAAC,GACpD,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,2BAA2B,CAAC,GACxD,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,CAAC,uBAAuB,CAAC,CAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -12,7 +12,5 @@ export * from './MessageRecipientType';
|
|
|
12
12
|
export * from './OAuthProvider';
|
|
13
13
|
export * from './PokeEvent';
|
|
14
14
|
export * from './SDKError';
|
|
15
|
-
export * from './StripeSubscriptionStatus';
|
|
16
|
-
export * from './SubscriptionTier';
|
|
17
15
|
export * from './UserSettings';
|
|
18
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,+BAA+B,CAAA;AAC7C,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,+BAA+B,CAAA;AAC7C,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,YAAY,CAAA;AAC1B,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,wBAAwB,CAAA;AACtC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,gBAAgB,CAAA"}
|
package/dist/types/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marcoappio/marco-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"author": "team@marcoapp.io",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": "git@github.com:marcoappio/marco-config.git",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"dist/",
|
|
13
|
+
"!dist/**/*.test.*",
|
|
13
14
|
".eslintrc.json"
|
|
14
15
|
],
|
|
15
16
|
"auto": {
|
|
@@ -27,7 +28,6 @@
|
|
|
27
28
|
"dependencies": {
|
|
28
29
|
"@orama/stemmers": "3.1.16",
|
|
29
30
|
"@orama/stopwords": "3.1.16",
|
|
30
|
-
"stripe": "20.3.0",
|
|
31
31
|
"type-fest": "5.4.2",
|
|
32
32
|
"valibot": "1.1.0"
|
|
33
33
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mutatorSchemas.test.d.ts","sourceRoot":"","sources":["../../../src/schemas/mutators/mutatorSchemas.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'bun:test';
|
|
2
|
-
import * as v from 'valibot';
|
|
3
|
-
import { mutatorSchemas } from './mutatorSchemas';
|
|
4
|
-
describe('mutatorSchemas.user.createFeedback', () => {
|
|
5
|
-
const testCases = [
|
|
6
|
-
{
|
|
7
|
-
description: 'omitted feedbackText',
|
|
8
|
-
input: {
|
|
9
|
-
id: 'user_01K4FZ8D9QCA8ZA9DCE3W1SET3',
|
|
10
|
-
rating: 5,
|
|
11
|
-
},
|
|
12
|
-
success: true,
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
description: 'non-empty feedbackText',
|
|
16
|
-
input: {
|
|
17
|
-
feedbackText: 'test-feedback-text',
|
|
18
|
-
id: 'user_01K4FZ8D9QCA8ZA9DCE3W1SET3',
|
|
19
|
-
rating: 5,
|
|
20
|
-
},
|
|
21
|
-
success: true,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
description: 'empty feedbackText',
|
|
25
|
-
input: {
|
|
26
|
-
feedbackText: '',
|
|
27
|
-
id: 'user_01K4FZ8D9QCA8ZA9DCE3W1SET3',
|
|
28
|
-
rating: 5,
|
|
29
|
-
},
|
|
30
|
-
success: false,
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
for (const testCase of testCases) {
|
|
34
|
-
it(`handles ${testCase.description}`, () => {
|
|
35
|
-
const result = v.safeParse(mutatorSchemas.user.createFeedback, testCase.input);
|
|
36
|
-
expect(result.success).toBe(testCase.success);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
});
|
package/dist/schemas/stripe.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import * as v from 'valibot';
|
|
2
|
-
export declare const stripeUserDataSchema: v.ObjectSchema<{
|
|
3
|
-
readonly customer: v.UnionSchema<[v.ObjectSchema<{
|
|
4
|
-
readonly deleted: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
5
|
-
readonly email: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
6
|
-
readonly id: v.StringSchema<undefined>;
|
|
7
|
-
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
8
|
-
readonly object: v.LiteralSchema<"customer", undefined>;
|
|
9
|
-
}, undefined>, v.ObjectSchema<{
|
|
10
|
-
readonly deleted: v.LiteralSchema<true, undefined>;
|
|
11
|
-
readonly id: v.StringSchema<undefined>;
|
|
12
|
-
readonly object: v.LiteralSchema<"customer", undefined>;
|
|
13
|
-
}, undefined>], undefined>;
|
|
14
|
-
readonly product: v.NullableSchema<v.ObjectSchema<{
|
|
15
|
-
readonly description: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
16
|
-
readonly id: v.StringSchema<undefined>;
|
|
17
|
-
readonly name: v.StringSchema<undefined>;
|
|
18
|
-
readonly object: v.LiteralSchema<"product", undefined>;
|
|
19
|
-
}, undefined>, undefined>;
|
|
20
|
-
readonly subscription: v.NullableSchema<v.ObjectSchema<{
|
|
21
|
-
readonly cancelAtPeriodEnd: v.BooleanSchema<undefined>;
|
|
22
|
-
readonly discounts: v.ArraySchema<v.ObjectSchema<{
|
|
23
|
-
readonly coupon: v.ObjectSchema<{
|
|
24
|
-
readonly amountOff: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
25
|
-
readonly id: v.StringSchema<undefined>;
|
|
26
|
-
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
27
|
-
readonly percentOff: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
28
|
-
}, undefined>;
|
|
29
|
-
readonly end: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
30
|
-
readonly id: v.StringSchema<undefined>;
|
|
31
|
-
readonly start: v.NumberSchema<undefined>;
|
|
32
|
-
}, undefined>, undefined>;
|
|
33
|
-
readonly id: v.StringSchema<undefined>;
|
|
34
|
-
readonly object: v.LiteralSchema<"subscription", undefined>;
|
|
35
|
-
readonly startDate: v.NumberSchema<undefined>;
|
|
36
|
-
readonly status: v.PicklistSchema<readonly ["active", "canceled", "incomplete", "incomplete_expired", "past_due", "paused", "trialing", "unpaid"], undefined>;
|
|
37
|
-
readonly trialEnd: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
38
|
-
readonly trialStart: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
39
|
-
}, undefined>, undefined>;
|
|
40
|
-
readonly subscriptionTier: v.NullableSchema<v.PicklistSchema<readonly ["tier1"], undefined>, undefined>;
|
|
41
|
-
}, undefined>;
|
|
42
|
-
export type StripeUserData = v.InferOutput<typeof stripeUserDataSchema>;
|
|
43
|
-
//# sourceMappingURL=stripe.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stripe.d.ts","sourceRoot":"","sources":["../../src/schemas/stripe.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAwE5B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAK/B,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,oBAAoB,CAAC,CAAA"}
|
package/dist/schemas/stripe.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import * as v from 'valibot';
|
|
2
|
-
import { STRIPE_SUBSCRIPTION_STATUSES, SUBSCRIPTION_TIERS } from '../types';
|
|
3
|
-
const stripeCustomerSchema = v.object({
|
|
4
|
-
deleted: v.optional(v.never()),
|
|
5
|
-
email: v.nullable(v.string()),
|
|
6
|
-
id: v.string(),
|
|
7
|
-
name: v.nullable(v.string()),
|
|
8
|
-
object: v.literal('customer'),
|
|
9
|
-
});
|
|
10
|
-
const stripeDeletedCustomerSchema = v.object({
|
|
11
|
-
deleted: v.literal(true),
|
|
12
|
-
id: v.string(),
|
|
13
|
-
object: v.literal('customer'),
|
|
14
|
-
});
|
|
15
|
-
const stripeProductSchema = v.object({
|
|
16
|
-
description: v.nullable(v.string()),
|
|
17
|
-
id: v.string(),
|
|
18
|
-
name: v.string(),
|
|
19
|
-
object: v.literal('product'),
|
|
20
|
-
});
|
|
21
|
-
const stripeCouponSchema = v.object({
|
|
22
|
-
amountOff: v.nullable(v.number()),
|
|
23
|
-
id: v.string(),
|
|
24
|
-
name: v.nullable(v.string()),
|
|
25
|
-
percentOff: v.nullable(v.number()),
|
|
26
|
-
});
|
|
27
|
-
const stripeDiscountSchema = v.object({
|
|
28
|
-
coupon: stripeCouponSchema,
|
|
29
|
-
end: v.nullable(v.number()),
|
|
30
|
-
id: v.string(),
|
|
31
|
-
start: v.number(),
|
|
32
|
-
});
|
|
33
|
-
const stripeSubscriptionSchema = v.object({
|
|
34
|
-
cancelAtPeriodEnd: v.boolean(),
|
|
35
|
-
discounts: v.array(stripeDiscountSchema),
|
|
36
|
-
id: v.string(),
|
|
37
|
-
object: v.literal('subscription'),
|
|
38
|
-
startDate: v.number(),
|
|
39
|
-
status: v.picklist(STRIPE_SUBSCRIPTION_STATUSES),
|
|
40
|
-
trialEnd: v.nullable(v.number()),
|
|
41
|
-
trialStart: v.nullable(v.number()),
|
|
42
|
-
});
|
|
43
|
-
export const stripeUserDataSchema = v.object({
|
|
44
|
-
customer: v.union([stripeCustomerSchema, stripeDeletedCustomerSchema]),
|
|
45
|
-
product: v.nullable(stripeProductSchema),
|
|
46
|
-
subscription: v.nullable(stripeSubscriptionSchema),
|
|
47
|
-
subscriptionTier: v.nullable(v.picklist(SUBSCRIPTION_TIERS)),
|
|
48
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as v from 'valibot';
|
|
2
|
-
export declare const createBillingPortalSession: import("../../../..").EndpointConfig<"/v1/pv/user/create-billing-portal-session", v.ObjectSchema<{
|
|
3
|
-
readonly returnUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
4
|
-
}, undefined>, v.GenericSchema | undefined, v.UnionSchema<[v.ObjectSchema<{
|
|
5
|
-
readonly data: v.ObjectSchema<{
|
|
6
|
-
readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
|
|
7
|
-
}, undefined>;
|
|
8
|
-
readonly status: v.LiteralSchema<401, undefined>;
|
|
9
|
-
}, undefined>, v.ObjectSchema<{
|
|
10
|
-
readonly data: v.ObjectSchema<{
|
|
11
|
-
readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
12
|
-
readonly issues: v.ObjectSchema<{
|
|
13
|
-
readonly nested: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
|
|
14
|
-
readonly other: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
15
|
-
readonly root: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
16
|
-
}, undefined>;
|
|
17
|
-
}, undefined>;
|
|
18
|
-
readonly status: v.LiteralSchema<400, undefined>;
|
|
19
|
-
}, undefined>, v.ObjectSchema<{
|
|
20
|
-
readonly data: v.ObjectSchema<{
|
|
21
|
-
readonly code: v.LiteralSchema<"SUBSCRIPTION_NOT_FOUND", undefined>;
|
|
22
|
-
}, undefined>;
|
|
23
|
-
readonly status: v.LiteralSchema<404, undefined>;
|
|
24
|
-
}, undefined>, v.ObjectSchema<{
|
|
25
|
-
readonly data: v.ObjectSchema<{
|
|
26
|
-
readonly url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
27
|
-
}, undefined>;
|
|
28
|
-
readonly status: v.LiteralSchema<200, undefined>;
|
|
29
|
-
}, undefined>], undefined>>;
|
|
30
|
-
//# sourceMappingURL=createBillingPortalSession.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createBillingPortalSession.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/private/user/createBillingPortalSession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAS5B,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAerC,CAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as v from 'valibot';
|
|
2
|
-
import { createEndpoint } from '../../../../sdk/endpoints/createEndpointConfig';
|
|
3
|
-
import { authFailedErrorSchema, subscriptionNotFoundErrorSchema, validationFailedErrorSchema, } from '../../../../sdk/validation/errors';
|
|
4
|
-
export const createBillingPortalSession = createEndpoint({
|
|
5
|
-
body: v.object({
|
|
6
|
-
returnUrl: v.pipe(v.string(), v.url()),
|
|
7
|
-
}),
|
|
8
|
-
method: 'POST',
|
|
9
|
-
path: '/v1/pv/user/create-billing-portal-session',
|
|
10
|
-
response: v.union([
|
|
11
|
-
authFailedErrorSchema,
|
|
12
|
-
validationFailedErrorSchema,
|
|
13
|
-
subscriptionNotFoundErrorSchema,
|
|
14
|
-
v.object({
|
|
15
|
-
data: v.object({ url: v.pipe(v.string(), v.url()) }),
|
|
16
|
-
status: v.literal(200),
|
|
17
|
-
}),
|
|
18
|
-
]),
|
|
19
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as v from 'valibot';
|
|
2
|
-
export declare const createCheckoutSession: import("../../../..").EndpointConfig<"/v1/pv/user/create-checkout-session", v.ObjectSchema<{
|
|
3
|
-
readonly cancelUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
4
|
-
readonly priceId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
5
|
-
readonly successUrl: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
|
|
6
|
-
}, undefined>, v.GenericSchema | undefined, v.UnionSchema<[v.ObjectSchema<{
|
|
7
|
-
readonly data: v.ObjectSchema<{
|
|
8
|
-
readonly code: v.LiteralSchema<"AUTHENTICATION_FAILED", undefined>;
|
|
9
|
-
}, undefined>;
|
|
10
|
-
readonly status: v.LiteralSchema<401, undefined>;
|
|
11
|
-
}, undefined>, v.ObjectSchema<{
|
|
12
|
-
readonly data: v.ObjectSchema<{
|
|
13
|
-
readonly code: v.LiteralSchema<"VALIDATION_FAILED", undefined>;
|
|
14
|
-
readonly issues: v.ObjectSchema<{
|
|
15
|
-
readonly nested: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>, undefined>;
|
|
16
|
-
readonly other: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
17
|
-
readonly root: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
18
|
-
}, undefined>;
|
|
19
|
-
}, undefined>;
|
|
20
|
-
readonly status: v.LiteralSchema<400, undefined>;
|
|
21
|
-
}, undefined>, v.ObjectSchema<{
|
|
22
|
-
readonly data: v.ObjectSchema<{
|
|
23
|
-
readonly url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
24
|
-
}, undefined>;
|
|
25
|
-
readonly status: v.LiteralSchema<200, undefined>;
|
|
26
|
-
}, undefined>], undefined>>;
|
|
27
|
-
//# sourceMappingURL=createCheckoutSession.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createCheckoutSession.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/endpoints/private/user/createCheckoutSession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAK5B,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;2BAgBhC,CAAA"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as v from 'valibot';
|
|
2
|
-
import { createEndpoint } from '../../../../sdk/endpoints/createEndpointConfig';
|
|
3
|
-
import { authFailedErrorSchema, validationFailedErrorSchema } from '../../../../sdk/validation/errors';
|
|
4
|
-
export const createCheckoutSession = createEndpoint({
|
|
5
|
-
body: v.object({
|
|
6
|
-
cancelUrl: v.pipe(v.string(), v.minLength(1)),
|
|
7
|
-
priceId: v.pipe(v.string(), v.minLength(1)),
|
|
8
|
-
successUrl: v.pipe(v.string(), v.minLength(1)),
|
|
9
|
-
}),
|
|
10
|
-
method: 'POST',
|
|
11
|
-
path: '/v1/pv/user/create-checkout-session',
|
|
12
|
-
response: v.union([
|
|
13
|
-
authFailedErrorSchema,
|
|
14
|
-
validationFailedErrorSchema,
|
|
15
|
-
v.object({
|
|
16
|
-
data: v.object({ url: v.pipe(v.string(), v.url()) }),
|
|
17
|
-
status: v.literal(200),
|
|
18
|
-
}),
|
|
19
|
-
]),
|
|
20
|
-
});
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const STRIPE_SUBSCRIPTION_STATUSES: readonly ["active", "canceled", "incomplete", "incomplete_expired", "past_due", "paused", "trialing", "unpaid"];
|
|
2
|
-
export type StripeSubscriptionStatus = (typeof STRIPE_SUBSCRIPTION_STATUSES)[number];
|
|
3
|
-
//# sourceMappingURL=StripeSubscriptionStatus.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StripeSubscriptionStatus.d.ts","sourceRoot":"","sources":["../../src/types/StripeSubscriptionStatus.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B,iHASiB,CAAA;AAE1D,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriptionTier.d.ts","sourceRoot":"","sources":["../../src/types/SubscriptionTier.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,oBAAqB,CAAA;AAEpD,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const SUBSCRIPTION_TIERS = ['tier1'];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parseLabelIdList.test.d.ts","sourceRoot":"","sources":["../../../../src/utils/threads/parseLabelIdList/parseLabelIdList.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'bun:test';
|
|
2
|
-
import { parseLabelIdList } from './index';
|
|
3
|
-
describe('parseLabelIdList', () => {
|
|
4
|
-
const testCases = [
|
|
5
|
-
{ description: 'parses space-separated IDs', expected: ['id1', 'id2', 'id3'], input: ' id1 id2 id3 ' },
|
|
6
|
-
{ description: 'handles single ID', expected: ['id1'], input: ' id1 ' },
|
|
7
|
-
{ description: 'handles empty string', expected: [], input: '' },
|
|
8
|
-
{ description: 'handles whitespace only', expected: [], input: ' ' },
|
|
9
|
-
{ description: 'handles no padding', expected: ['id1', 'id2'], input: 'id1 id2' },
|
|
10
|
-
{ description: 'handles extra internal spaces', expected: ['id1', 'id2'], input: 'id1 id2' },
|
|
11
|
-
{ description: 'handles UUID-style IDs', expected: ['abc-123', 'def-456'], input: ' abc-123 def-456 ' },
|
|
12
|
-
];
|
|
13
|
-
for (const { input, expected, description } of testCases) {
|
|
14
|
-
it(`should ${description}`, () => {
|
|
15
|
-
expect(parseLabelIdList(input)).toEqual(expected);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"processSearchTerm.test.d.ts","sourceRoot":"","sources":["../../../../src/utils/threads/processSearchTerm/processSearchTerm.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'bun:test';
|
|
2
|
-
import { processSearchTerm } from './processSearchTerm';
|
|
3
|
-
describe('processSearchTerm', () => {
|
|
4
|
-
const testCases = [
|
|
5
|
-
{ description: 'stems word to root form', expected: ['run'], input: 'running' },
|
|
6
|
-
{ description: 'stems -ing suffix', expected: ['jump'], input: 'jumping' },
|
|
7
|
-
{ description: 'stems plural', expected: ['cat'], input: 'cats' },
|
|
8
|
-
{ description: 'removes single stopword', expected: [], input: 'the' },
|
|
9
|
-
{ description: 'removes article stopword', expected: [], input: 'an' },
|
|
10
|
-
{ description: 'removes verb stopword', expected: [], input: 'is' },
|
|
11
|
-
{ description: 'removes stopwords from phrase', expected: ['quick', 'fox'], input: 'the quick fox' },
|
|
12
|
-
{ description: 'handles empty string', expected: [], input: '' },
|
|
13
|
-
{ description: 'handles whitespace only', expected: [], input: ' ' },
|
|
14
|
-
{ description: 'handles tabs and newlines', expected: [], input: '\t\n' },
|
|
15
|
-
{ description: 'returns empty for only stopwords', expected: [], input: 'the an' },
|
|
16
|
-
{ description: 'returns empty for multiple stopwords', expected: [], input: 'is are was were' },
|
|
17
|
-
{ description: 'deduplicates same-root words', expected: ['run'], input: 'run running runs' },
|
|
18
|
-
{ description: 'deduplicates stemmed variants', expected: ['happi'], input: 'happy happiness' },
|
|
19
|
-
{ description: 'normalizes uppercase', expected: ['hello'], input: 'HELLO' },
|
|
20
|
-
{ description: 'normalizes mixed case', expected: ['hello', 'world'], input: 'HeLLo WoRLd' },
|
|
21
|
-
{ description: 'handles extra spaces', expected: ['hello', 'world'], input: ' hello world ' },
|
|
22
|
-
{ description: 'handles mixed whitespace', expected: ['hello', 'world'], input: 'hello\t\nworld' },
|
|
23
|
-
{ description: 'preserves order of first occurrence', expected: ['world', 'hello'], input: 'world hello' },
|
|
24
|
-
{
|
|
25
|
-
description: 'handles mixed stopwords and content',
|
|
26
|
-
expected: ['meet', 'import'],
|
|
27
|
-
input: 'the meeting is important',
|
|
28
|
-
},
|
|
29
|
-
{ description: 'stems and filters mixed phrase', expected: ['import', 'messag'], input: 'an important message' },
|
|
30
|
-
{ description: 'passes through numbers unchanged', expected: ['123', 'test'], input: '123 test' },
|
|
31
|
-
{ description: 'passes through special characters unchanged', expected: ['@user', '#tag'], input: '@user #tag' },
|
|
32
|
-
];
|
|
33
|
-
for (const { input, expected, description } of testCases) {
|
|
34
|
-
it(`should ${description}`, () => {
|
|
35
|
-
expect(processSearchTerm(input)).toEqual(expected);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
});
|