@zyacreatives/shared 2.5.8 → 2.5.10

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.
@@ -255,6 +255,9 @@ export declare const NOTIFICATION_TYPES: {
255
255
  readonly APPLICATION_STATUS_CHANGE: "Application Status Change";
256
256
  readonly SYSTEM_STRIKE: "System Strike";
257
257
  readonly PROJECT_FEATURED: "Project Featured";
258
+ readonly PROJECT_TAG: "Project Tag";
259
+ readonly MENTION: "Mention";
260
+ readonly MARKETPLACE_DROP: "Marketplace Drop";
258
261
  };
259
262
  export declare const VENTURE_STAGES: {
260
263
  readonly IDEA: "Idea";
package/dist/constants.js CHANGED
@@ -253,6 +253,9 @@ exports.NOTIFICATION_TYPES = {
253
253
  APPLICATION_STATUS_CHANGE: "Application Status Change",
254
254
  SYSTEM_STRIKE: "System Strike",
255
255
  PROJECT_FEATURED: "Project Featured",
256
+ PROJECT_TAG: "Project Tag",
257
+ MENTION: "Mention",
258
+ MARKETPLACE_DROP: "Marketplace Drop",
256
259
  };
257
260
  exports.VENTURE_STAGES = {
258
261
  IDEA: "Idea",
@@ -14,6 +14,9 @@ export declare const NotificationEntitySchema: z.ZodObject<{
14
14
  readonly APPLICATION_STATUS_CHANGE: "Application Status Change";
15
15
  readonly SYSTEM_STRIKE: "System Strike";
16
16
  readonly PROJECT_FEATURED: "Project Featured";
17
+ readonly PROJECT_TAG: "Project Tag";
18
+ readonly MENTION: "Mention";
19
+ readonly MARKETPLACE_DROP: "Marketplace Drop";
17
20
  }>;
18
21
  entityId: z.ZodOptional<z.ZodCUID2>;
19
22
  parentId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
@@ -64,6 +67,9 @@ export declare const NotificationDetailsEntitySchema: z.ZodObject<{
64
67
  readonly APPLICATION_STATUS_CHANGE: "Application Status Change";
65
68
  readonly SYSTEM_STRIKE: "System Strike";
66
69
  readonly PROJECT_FEATURED: "Project Featured";
70
+ readonly PROJECT_TAG: "Project Tag";
71
+ readonly MENTION: "Mention";
72
+ readonly MARKETPLACE_DROP: "Marketplace Drop";
67
73
  }>;
68
74
  entityId: z.ZodOptional<z.ZodCUID2>;
69
75
  parentId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
@@ -136,6 +142,9 @@ export declare const ListNotificationsInputSchema: z.ZodObject<{
136
142
  readonly APPLICATION_STATUS_CHANGE: "Application Status Change";
137
143
  readonly SYSTEM_STRIKE: "System Strike";
138
144
  readonly PROJECT_FEATURED: "Project Featured";
145
+ readonly PROJECT_TAG: "Project Tag";
146
+ readonly MENTION: "Mention";
147
+ readonly MARKETPLACE_DROP: "Marketplace Drop";
139
148
  }>>;
140
149
  cursor: z.ZodOptional<z.ZodString>;
141
150
  unreadOnly: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>>;
@@ -156,6 +165,9 @@ export declare const ListNotificationsOutputSchema: z.ZodObject<{
156
165
  readonly APPLICATION_STATUS_CHANGE: "Application Status Change";
157
166
  readonly SYSTEM_STRIKE: "System Strike";
158
167
  readonly PROJECT_FEATURED: "Project Featured";
168
+ readonly PROJECT_TAG: "Project Tag";
169
+ readonly MENTION: "Mention";
170
+ readonly MARKETPLACE_DROP: "Marketplace Drop";
159
171
  }>;
160
172
  entityId: z.ZodOptional<z.ZodCUID2>;
161
173
  parentId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
@@ -1,4 +1,4 @@
1
- import z from "zod";
1
+ import { z } from "@hono/zod-openapi";
2
2
  export declare const SellerEntitySchema: z.ZodObject<{
3
3
  id: z.ZodCUID2;
4
4
  businessName: z.ZodString;
@@ -81,3 +81,10 @@ export declare const SellerProfileSchema: z.ZodObject<{
81
81
  }, z.core.$strip>>;
82
82
  }, z.core.$strip>;
83
83
  export type SellerProfile = z.infer<typeof SellerProfileSchema>;
84
+ export declare const GetStripeOnboardingUrlInputSchema: z.ZodObject<{
85
+ refreshUrl: z.ZodString;
86
+ returnUrl: z.ZodString;
87
+ }, z.core.$strip>;
88
+ export declare const GetStripeOnboardingUrlOutputSchema: z.ZodObject<{
89
+ url: z.ZodString;
90
+ }, z.core.$strip>;
@@ -1,37 +1,40 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.SellerProfileSchema = exports.UpdateSellerEntitySchema = exports.CreateSellerEntityInputSchema = exports.SellerEntitySchema = void 0;
7
- const zod_1 = __importDefault(require("zod"));
3
+ exports.GetStripeOnboardingUrlOutputSchema = exports.GetStripeOnboardingUrlInputSchema = exports.SellerProfileSchema = exports.UpdateSellerEntitySchema = exports.CreateSellerEntityInputSchema = exports.SellerEntitySchema = void 0;
4
+ const zod_openapi_1 = require("@hono/zod-openapi");
8
5
  const constants_1 = require("../constants");
9
6
  const payout_method_1 = require("./payout-method");
10
- exports.SellerEntitySchema = zod_1.default.object({
11
- id: zod_1.default.cuid2(),
12
- businessName: zod_1.default.string(), // Kept here for the app to consume!
13
- countryOfOperation: zod_1.default.enum(constants_1.COUNTRY_OF_OPERATION),
14
- stripeConnectId: zod_1.default.string().nullable(),
15
- paystackSubaccountCode: zod_1.default.string().nullable(),
16
- status: zod_1.default.enum(constants_1.SELLER_STATUS).default(constants_1.SELLER_STATUS.PENDING),
17
- createdAt: zod_1.default.coerce.date(),
18
- updatedAt: zod_1.default.coerce.date(),
7
+ exports.SellerEntitySchema = zod_openapi_1.z.object({
8
+ id: zod_openapi_1.z.cuid2(),
9
+ businessName: zod_openapi_1.z.string(),
10
+ countryOfOperation: zod_openapi_1.z.enum(constants_1.COUNTRY_OF_OPERATION),
11
+ stripeConnectId: zod_openapi_1.z.string().nullable(),
12
+ paystackSubaccountCode: zod_openapi_1.z.string().nullable(),
13
+ status: zod_openapi_1.z.enum(constants_1.SELLER_STATUS).default(constants_1.SELLER_STATUS.PENDING),
14
+ createdAt: zod_openapi_1.z.coerce.date(),
15
+ updatedAt: zod_openapi_1.z.coerce.date(),
19
16
  });
20
- // No businessName here, because the API doesn't accept it (it relies on the User table)
21
- exports.CreateSellerEntityInputSchema = zod_1.default.object({
22
- countryOfOperation: zod_1.default.enum(constants_1.COUNTRY_OF_OPERATION),
23
- bankCode: zod_1.default.string().nullable(),
24
- accountNumber: zod_1.default.string(),
25
- accountName: zod_1.default.string(),
17
+ exports.CreateSellerEntityInputSchema = zod_openapi_1.z.object({
18
+ countryOfOperation: zod_openapi_1.z.enum(constants_1.COUNTRY_OF_OPERATION),
19
+ bankCode: zod_openapi_1.z.string().nullable(),
20
+ accountNumber: zod_openapi_1.z.string(),
21
+ accountName: zod_openapi_1.z.string(),
26
22
  });
27
- exports.UpdateSellerEntitySchema = zod_1.default
23
+ exports.UpdateSellerEntitySchema = zod_openapi_1.z
28
24
  .object({
29
- countryOfOperation: zod_1.default.enum(constants_1.COUNTRY_OF_OPERATION),
30
- stripeConnectId: zod_1.default.string().nullable(),
31
- paystackSubaccountCode: zod_1.default.string().nullable(),
32
- status: zod_1.default.enum(constants_1.SELLER_STATUS),
25
+ countryOfOperation: zod_openapi_1.z.enum(constants_1.COUNTRY_OF_OPERATION),
26
+ stripeConnectId: zod_openapi_1.z.string().nullable(),
27
+ paystackSubaccountCode: zod_openapi_1.z.string().nullable(),
28
+ status: zod_openapi_1.z.enum(constants_1.SELLER_STATUS),
33
29
  })
34
30
  .partial();
35
31
  exports.SellerProfileSchema = exports.SellerEntitySchema.extend({
36
- payoutMethods: zod_1.default.array(payout_method_1.PayoutMethodEntitySchema),
32
+ payoutMethods: zod_openapi_1.z.array(payout_method_1.PayoutMethodEntitySchema),
33
+ });
34
+ exports.GetStripeOnboardingUrlInputSchema = zod_openapi_1.z.object({
35
+ refreshUrl: zod_openapi_1.z.string().url(),
36
+ returnUrl: zod_openapi_1.z.string().url(),
37
+ });
38
+ exports.GetStripeOnboardingUrlOutputSchema = zod_openapi_1.z.object({
39
+ url: zod_openapi_1.z.string().url(),
37
40
  });
@@ -54,7 +54,7 @@ exports.CreateTransactionInputSchema = exports.BaseTransactionSchema.pick({
54
54
  status: true,
55
55
  }).extend({
56
56
  discountApplied: exports.TransactionDiscountSnapshotSchema.optional(),
57
- providerTransactionId: zod_openapi_1.z.string().optional(), // Might not exist until after init
57
+ providerTransactionId: zod_openapi_1.z.string().optional(),
58
58
  });
59
59
  exports.UpdateTransactionWebhookInputSchema = zod_openapi_1.z.object({
60
60
  status: zod_openapi_1.z.enum(constants_1.TRANSACTION_STATUSES),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.5.8",
3
+ "version": "2.5.10",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/constants.ts CHANGED
@@ -288,6 +288,9 @@ export const NOTIFICATION_TYPES = {
288
288
  APPLICATION_STATUS_CHANGE: "Application Status Change",
289
289
  SYSTEM_STRIKE: "System Strike",
290
290
  PROJECT_FEATURED: "Project Featured",
291
+ PROJECT_TAG: "Project Tag",
292
+ MENTION: "Mention",
293
+ MARKETPLACE_DROP: "Marketplace Drop",
291
294
  } as const;
292
295
 
293
296
  export const VENTURE_STAGES = {
@@ -9,7 +9,6 @@ export const NotificationEntitySchema = z
9
9
  actorId: z.cuid2().openapi({ example: "user_actor_456" }),
10
10
  type: z.enum(NOTIFICATION_TYPES).openapi({ example: "LIKE" }),
11
11
  entityId: z.cuid2().optional().openapi({ example: "entity_789" }),
12
-
13
12
  parentId: z
14
13
  .cuid2()
15
14
  .optional()
@@ -1,10 +1,10 @@
1
- import z from "zod";
1
+ import { z } from "@hono/zod-openapi";
2
2
  import { COUNTRY_OF_OPERATION, SELLER_STATUS } from "../constants";
3
3
  import { PayoutMethodEntitySchema } from "./payout-method";
4
4
 
5
5
  export const SellerEntitySchema = z.object({
6
6
  id: z.cuid2(),
7
- businessName: z.string(), // Kept here for the app to consume!
7
+ businessName: z.string(),
8
8
  countryOfOperation: z.enum(COUNTRY_OF_OPERATION),
9
9
  stripeConnectId: z.string().nullable(),
10
10
  paystackSubaccountCode: z.string().nullable(),
@@ -12,15 +12,16 @@ export const SellerEntitySchema = z.object({
12
12
  createdAt: z.coerce.date(),
13
13
  updatedAt: z.coerce.date(),
14
14
  });
15
+
15
16
  export type SellerEntity = z.infer<typeof SellerEntitySchema>;
16
17
 
17
- // No businessName here, because the API doesn't accept it (it relies on the User table)
18
18
  export const CreateSellerEntityInputSchema = z.object({
19
19
  countryOfOperation: z.enum(COUNTRY_OF_OPERATION),
20
20
  bankCode: z.string().nullable(),
21
21
  accountNumber: z.string(),
22
22
  accountName: z.string(),
23
23
  });
24
+
24
25
  export type CreateSellerInput = z.infer<typeof CreateSellerEntityInputSchema>;
25
26
 
26
27
  export const UpdateSellerEntitySchema = z
@@ -31,6 +32,7 @@ export const UpdateSellerEntitySchema = z
31
32
  status: z.enum(SELLER_STATUS),
32
33
  })
33
34
  .partial();
35
+
34
36
  export type UpdateSellerInput = z.infer<typeof UpdateSellerEntitySchema>;
35
37
 
36
38
  export const SellerProfileSchema = SellerEntitySchema.extend({
@@ -38,3 +40,12 @@ export const SellerProfileSchema = SellerEntitySchema.extend({
38
40
  });
39
41
 
40
42
  export type SellerProfile = z.infer<typeof SellerProfileSchema>;
43
+
44
+ export const GetStripeOnboardingUrlInputSchema = z.object({
45
+ refreshUrl: z.string().url(),
46
+ returnUrl: z.string().url(),
47
+ });
48
+
49
+ export const GetStripeOnboardingUrlOutputSchema = z.object({
50
+ url: z.string().url(),
51
+ });
@@ -65,7 +65,7 @@ export const CreateTransactionInputSchema = BaseTransactionSchema.pick({
65
65
  status: true,
66
66
  }).extend({
67
67
  discountApplied: TransactionDiscountSnapshotSchema.optional(),
68
- providerTransactionId: z.string().optional(), // Might not exist until after init
68
+ providerTransactionId: z.string().optional(),
69
69
  });
70
70
 
71
71
  export const UpdateTransactionWebhookInputSchema = z.object({
@@ -83,6 +83,7 @@ export const TransactionEntitySchema = BaseTransactionSchema.extend({
83
83
  export type TransactionDiscountSnapshot = z.infer<
84
84
  typeof TransactionDiscountSnapshotSchema
85
85
  >;
86
+
86
87
  export type BaseTransactionEntity = z.infer<typeof BaseTransactionSchema>;
87
88
 
88
89
  export type InitTransactionInput = z.infer<typeof InitTransactionInputSchema>;