@timardex/cluemart-shared 1.0.14 → 1.0.15
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.cjs +79 -35
- package/dist/index.d.mts +18 -15
- package/dist/index.d.ts +18 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +79 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -89,7 +89,6 @@ __export(index_exports, {
|
|
|
89
89
|
resetPasswordSchema: () => resetPasswordSchema,
|
|
90
90
|
sortDatesByProximity: () => sortDatesByProximity,
|
|
91
91
|
stallApplicationInfo: () => stallApplicationInfo,
|
|
92
|
-
stallApplicationInfoDropdowns: () => stallApplicationInfoDropdowns,
|
|
93
92
|
stallApplicationInfoPaymentTarget: () => stallApplicationInfoPaymentTarget,
|
|
94
93
|
stallHolderSchema: () => stallHolderSchema,
|
|
95
94
|
stallholderApplyFormSchema: () => stallholderApplyFormSchema,
|
|
@@ -190,23 +189,23 @@ var EnumInviteStatus = /* @__PURE__ */ ((EnumInviteStatus2) => {
|
|
|
190
189
|
EnumInviteStatus2["ACCEPTED"] = "Accepted";
|
|
191
190
|
EnumInviteStatus2["COMPLETED"] = "Completed";
|
|
192
191
|
EnumInviteStatus2["EXPIRED"] = "Expired";
|
|
193
|
-
EnumInviteStatus2["NO_STATUS"] = "
|
|
192
|
+
EnumInviteStatus2["NO_STATUS"] = "No_Status";
|
|
194
193
|
EnumInviteStatus2["PENDING"] = "Pending";
|
|
195
194
|
EnumInviteStatus2["REJECTED"] = "Rejected";
|
|
196
|
-
EnumInviteStatus2["WAITING"] = "
|
|
195
|
+
EnumInviteStatus2["WAITING"] = "Waiting";
|
|
197
196
|
return EnumInviteStatus2;
|
|
198
197
|
})(EnumInviteStatus || {});
|
|
199
198
|
var EnumRejectionPolicy = /* @__PURE__ */ ((EnumRejectionPolicy2) => {
|
|
200
|
-
EnumRejectionPolicy2["SINGLE_DATE_ALLOWED"] = "
|
|
201
|
-
EnumRejectionPolicy2["MULTI_DATE_ALLOWED"] = "
|
|
199
|
+
EnumRejectionPolicy2["SINGLE_DATE_ALLOWED"] = "single_date_allowed";
|
|
200
|
+
EnumRejectionPolicy2["MULTI_DATE_ALLOWED"] = "multi_date_allowed";
|
|
202
201
|
return EnumRejectionPolicy2;
|
|
203
202
|
})(EnumRejectionPolicy || {});
|
|
204
203
|
var EnumPaymentMethod = /* @__PURE__ */ ((EnumPaymentMethod3) => {
|
|
205
|
-
EnumPaymentMethod3["CASH"] = "
|
|
206
|
-
EnumPaymentMethod3["EFTPOS"] = "
|
|
207
|
-
EnumPaymentMethod3["BANK_TRANSFER"] = "
|
|
208
|
-
EnumPaymentMethod3["PAYPAL"] = "
|
|
209
|
-
EnumPaymentMethod3["STRIPE"] = "
|
|
204
|
+
EnumPaymentMethod3["CASH"] = "cash";
|
|
205
|
+
EnumPaymentMethod3["EFTPOS"] = "eftpos";
|
|
206
|
+
EnumPaymentMethod3["BANK_TRANSFER"] = "bank_transfer";
|
|
207
|
+
EnumPaymentMethod3["PAYPAL"] = "paypal";
|
|
208
|
+
EnumPaymentMethod3["STRIPE"] = "stripe";
|
|
210
209
|
return EnumPaymentMethod3;
|
|
211
210
|
})(EnumPaymentMethod || {});
|
|
212
211
|
var EnumResourceType = /* @__PURE__ */ ((EnumResourceType2) => {
|
|
@@ -341,8 +340,8 @@ var truncateText = (text, maxLength = 30) => {
|
|
|
341
340
|
return text.length > maxLength ? text.substring(0, maxLength) + "..." : text;
|
|
342
341
|
};
|
|
343
342
|
var mapArrayToOptions = (items) => items.map((item) => ({
|
|
344
|
-
label: item,
|
|
345
|
-
value: item
|
|
343
|
+
label: item.replace(/_/g, " "),
|
|
344
|
+
value: item.replace(/\s+/g, "_").toLowerCase()
|
|
346
345
|
}));
|
|
347
346
|
var capitalizeFirstLetter = (str) => {
|
|
348
347
|
return str.split(" ").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
|
|
@@ -564,6 +563,7 @@ var globalResourceSchema = yup.object().shape({
|
|
|
564
563
|
|
|
565
564
|
// src/yupSchema/market.ts
|
|
566
565
|
var yup2 = __toESM(require("yup"));
|
|
566
|
+
var nzBankAccountRegex = /^\d{2}-\d{4}-\d{7}-\d{2}$/;
|
|
567
567
|
var marketSchema = globalResourceSchema.shape({
|
|
568
568
|
dateTime: yup2.array().of(dateTimeSchema).required("DateTime is required"),
|
|
569
569
|
location: locationSchema,
|
|
@@ -576,7 +576,33 @@ var marketSchema = globalResourceSchema.shape({
|
|
|
576
576
|
),
|
|
577
577
|
paymentDueHours: yup2.number().typeError("Payment due hours must be a number").min(1, "Payment due hours must be at least 1").required("Payment due hours is required").test("no-leading-zeros", "", noLeadingZeros("Payment due hours")),
|
|
578
578
|
paymentMethod: yup2.mixed().oneOf(Object.values(EnumPaymentMethod)).required("Please select a Payment method"),
|
|
579
|
-
paymentTarget: yup2.
|
|
579
|
+
paymentTarget: yup2.object().when("paymentMethod", (paymentMethod, schema) => {
|
|
580
|
+
const isBankTransfer = paymentMethod.includes(
|
|
581
|
+
"bank_transfer" /* BANK_TRANSFER */
|
|
582
|
+
);
|
|
583
|
+
if (!isBankTransfer) {
|
|
584
|
+
return schema.shape({
|
|
585
|
+
accountHolderName: yup2.string().notRequired(),
|
|
586
|
+
accountNumber: yup2.string().notRequired(),
|
|
587
|
+
link: yup2.string().trim().required("Link is required for PayPal/Stripe")
|
|
588
|
+
});
|
|
589
|
+
} else if (isBankTransfer) {
|
|
590
|
+
return schema.shape({
|
|
591
|
+
accountHolderName: yup2.string().trim().required("Account holder name is required for bank transfer"),
|
|
592
|
+
accountNumber: yup2.string().trim().required("Account number is required for bank transfer").matches(
|
|
593
|
+
nzBankAccountRegex,
|
|
594
|
+
"Account number must be in format: XX-XXXX-XXXXXXX-XX"
|
|
595
|
+
),
|
|
596
|
+
link: yup2.string().notRequired()
|
|
597
|
+
});
|
|
598
|
+
} else {
|
|
599
|
+
return schema.shape({
|
|
600
|
+
accountHolderName: yup2.string().notRequired(),
|
|
601
|
+
accountNumber: yup2.string().notRequired(),
|
|
602
|
+
link: yup2.string().notRequired()
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
}),
|
|
580
606
|
rejectionPolicy: yup2.mixed().oneOf(Object.values(EnumRejectionPolicy)).required("Rejection policy is required"),
|
|
581
607
|
stallCapacity: yup2.number().typeError("Stall capacity must be a number").min(1, "Stall capacity must be at least 1").integer("Stall capacity must be a whole number").required("Stall capacity is required").test("no-leading-zeros", "", noLeadingZeros("Stall capacity"))
|
|
582
608
|
}),
|
|
@@ -741,8 +767,12 @@ var defaultMarketFormValues = {
|
|
|
741
767
|
applicationDeadlineHours: 0,
|
|
742
768
|
paymentDueHours: 0,
|
|
743
769
|
paymentMethod: "",
|
|
744
|
-
paymentTarget:
|
|
745
|
-
|
|
770
|
+
paymentTarget: {
|
|
771
|
+
accountHolderName: "",
|
|
772
|
+
accountNumber: "",
|
|
773
|
+
link: ""
|
|
774
|
+
},
|
|
775
|
+
rejectionPolicy: "multi_date_allowed" /* MULTI_DATE_ALLOWED */,
|
|
746
776
|
stallCapacity: 0
|
|
747
777
|
},
|
|
748
778
|
tags: null
|
|
@@ -1635,6 +1665,26 @@ var MARKET_LOCATION_FIELDS_FRAGMENT = import_client8.gql`
|
|
|
1635
1665
|
type
|
|
1636
1666
|
}
|
|
1637
1667
|
`;
|
|
1668
|
+
var PAYMENT_TARGET_FIELDS_FRAGMENT = import_client8.gql`
|
|
1669
|
+
fragment PaymentTargetFields on PaymentTargetType {
|
|
1670
|
+
accountHolderName
|
|
1671
|
+
accountNumber
|
|
1672
|
+
link
|
|
1673
|
+
}
|
|
1674
|
+
`;
|
|
1675
|
+
var STALL_APPLICATION_INFO_FIELDS_FRAGMENT = import_client8.gql`
|
|
1676
|
+
fragment StallApplicationInfoFields on StallApplicationInfoType {
|
|
1677
|
+
applicationDeadlineHours
|
|
1678
|
+
paymentDueHours
|
|
1679
|
+
paymentMethod
|
|
1680
|
+
paymentTarget {
|
|
1681
|
+
...PaymentTargetFields
|
|
1682
|
+
}
|
|
1683
|
+
rejectionPolicy
|
|
1684
|
+
stallCapacity
|
|
1685
|
+
}
|
|
1686
|
+
${PAYMENT_TARGET_FIELDS_FRAGMENT}
|
|
1687
|
+
`;
|
|
1638
1688
|
var MARKET = import_client8.gql`
|
|
1639
1689
|
fragment MarketFields on MarketType {
|
|
1640
1690
|
_id
|
|
@@ -1665,12 +1715,7 @@ var MARKET = import_client8.gql`
|
|
|
1665
1715
|
region
|
|
1666
1716
|
relationIds
|
|
1667
1717
|
stallApplicationInfo {
|
|
1668
|
-
|
|
1669
|
-
paymentDueHours
|
|
1670
|
-
paymentMethod
|
|
1671
|
-
paymentTarget
|
|
1672
|
-
rejectionPolicy
|
|
1673
|
-
stallCapacity
|
|
1718
|
+
...StallApplicationInfoFields
|
|
1674
1719
|
}
|
|
1675
1720
|
tags
|
|
1676
1721
|
updatedAt
|
|
@@ -1679,6 +1724,7 @@ var MARKET = import_client8.gql`
|
|
|
1679
1724
|
${MARKET_LOCATION_FIELDS_FRAGMENT}
|
|
1680
1725
|
${OWNER_FIELDS_FRAGMENT}
|
|
1681
1726
|
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
1727
|
+
${STALL_APPLICATION_INFO_FIELDS_FRAGMENT}
|
|
1682
1728
|
`;
|
|
1683
1729
|
var GET_MARKETS = import_client8.gql`
|
|
1684
1730
|
query getMarkets {
|
|
@@ -2989,22 +3035,21 @@ var stallApplicationInfo = [
|
|
|
2989
3035
|
placeholder: "Payment Due Hours"
|
|
2990
3036
|
}
|
|
2991
3037
|
];
|
|
2992
|
-
var stallApplicationInfoPaymentTarget =
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
}
|
|
2998
|
-
var stallApplicationInfoDropdowns = [
|
|
3038
|
+
var stallApplicationInfoPaymentTarget = [
|
|
3039
|
+
{
|
|
3040
|
+
helperText: "Account holder name *",
|
|
3041
|
+
name: "stallApplicationInfo.paymentTarget.accountHolderName",
|
|
3042
|
+
placeholder: "Account holder name"
|
|
3043
|
+
},
|
|
2999
3044
|
{
|
|
3000
|
-
helperText: "
|
|
3001
|
-
name: "stallApplicationInfo.
|
|
3002
|
-
placeholder: "
|
|
3045
|
+
helperText: "Account number *",
|
|
3046
|
+
name: "stallApplicationInfo.paymentTarget.accountNumber",
|
|
3047
|
+
placeholder: "Account number"
|
|
3003
3048
|
},
|
|
3004
3049
|
{
|
|
3005
|
-
helperText: "
|
|
3006
|
-
name: "stallApplicationInfo.
|
|
3007
|
-
placeholder: "
|
|
3050
|
+
helperText: "Link to payment target *",
|
|
3051
|
+
name: "stallApplicationInfo.paymentTarget.link",
|
|
3052
|
+
placeholder: "Link to payment target"
|
|
3008
3053
|
}
|
|
3009
3054
|
];
|
|
3010
3055
|
var marketStartDateFields = [
|
|
@@ -3548,7 +3593,6 @@ var categoryColors = {
|
|
|
3548
3593
|
resetPasswordSchema,
|
|
3549
3594
|
sortDatesByProximity,
|
|
3550
3595
|
stallApplicationInfo,
|
|
3551
|
-
stallApplicationInfoDropdowns,
|
|
3552
3596
|
stallApplicationInfoPaymentTarget,
|
|
3553
3597
|
stallHolderSchema,
|
|
3554
3598
|
stallholderApplyFormSchema,
|
package/dist/index.d.mts
CHANGED
|
@@ -7,21 +7,21 @@ declare enum EnumInviteStatus {
|
|
|
7
7
|
ACCEPTED = "Accepted",
|
|
8
8
|
COMPLETED = "Completed",
|
|
9
9
|
EXPIRED = "Expired",
|
|
10
|
-
NO_STATUS = "
|
|
10
|
+
NO_STATUS = "No_Status",
|
|
11
11
|
PENDING = "Pending",
|
|
12
12
|
REJECTED = "Rejected",
|
|
13
|
-
WAITING = "
|
|
13
|
+
WAITING = "Waiting"
|
|
14
14
|
}
|
|
15
15
|
declare enum EnumRejectionPolicy {
|
|
16
|
-
SINGLE_DATE_ALLOWED = "
|
|
17
|
-
MULTI_DATE_ALLOWED = "
|
|
16
|
+
SINGLE_DATE_ALLOWED = "single_date_allowed",
|
|
17
|
+
MULTI_DATE_ALLOWED = "multi_date_allowed"
|
|
18
18
|
}
|
|
19
19
|
declare enum EnumPaymentMethod {
|
|
20
|
-
CASH = "
|
|
21
|
-
EFTPOS = "
|
|
22
|
-
BANK_TRANSFER = "
|
|
23
|
-
PAYPAL = "
|
|
24
|
-
STRIPE = "
|
|
20
|
+
CASH = "cash",
|
|
21
|
+
EFTPOS = "eftpos",
|
|
22
|
+
BANK_TRANSFER = "bank_transfer",
|
|
23
|
+
PAYPAL = "paypal",
|
|
24
|
+
STRIPE = "stripe"
|
|
25
25
|
}
|
|
26
26
|
declare enum EnumResourceType {
|
|
27
27
|
MARKET = "market",
|
|
@@ -220,7 +220,11 @@ type StallApplicationInfoType = {
|
|
|
220
220
|
applicationDeadlineHours: number;
|
|
221
221
|
paymentDueHours: number;
|
|
222
222
|
paymentMethod: EnumPaymentMethod;
|
|
223
|
-
paymentTarget:
|
|
223
|
+
paymentTarget: {
|
|
224
|
+
accountHolderName?: string;
|
|
225
|
+
accountNumber?: string;
|
|
226
|
+
link?: string;
|
|
227
|
+
};
|
|
224
228
|
rejectionPolicy: EnumRejectionPolicy;
|
|
225
229
|
stallCapacity: number;
|
|
226
230
|
};
|
|
@@ -745,7 +749,7 @@ declare const marketSchema: yup.ObjectSchema<{
|
|
|
745
749
|
paymentMethod: NonNullable<EnumPaymentMethod | undefined>;
|
|
746
750
|
applicationDeadlineHours: number;
|
|
747
751
|
paymentDueHours: number;
|
|
748
|
-
paymentTarget:
|
|
752
|
+
paymentTarget: {};
|
|
749
753
|
rejectionPolicy: NonNullable<EnumRejectionPolicy | undefined>;
|
|
750
754
|
stallCapacity: number;
|
|
751
755
|
};
|
|
@@ -775,7 +779,7 @@ declare const marketSchema: yup.ObjectSchema<{
|
|
|
775
779
|
applicationDeadlineHours: undefined;
|
|
776
780
|
paymentDueHours: undefined;
|
|
777
781
|
paymentMethod: undefined;
|
|
778
|
-
paymentTarget:
|
|
782
|
+
paymentTarget: {};
|
|
779
783
|
rejectionPolicy: undefined;
|
|
780
784
|
stallCapacity: undefined;
|
|
781
785
|
};
|
|
@@ -1263,8 +1267,7 @@ declare const producedIngOptions: OptionItem[];
|
|
|
1263
1267
|
|
|
1264
1268
|
declare const marketBasicInfoFields: FormField[];
|
|
1265
1269
|
declare const stallApplicationInfo: FormField[];
|
|
1266
|
-
declare const stallApplicationInfoPaymentTarget: FormField;
|
|
1267
|
-
declare const stallApplicationInfoDropdowns: FormField[];
|
|
1270
|
+
declare const stallApplicationInfoPaymentTarget: FormField[];
|
|
1268
1271
|
declare const marketStartDateFields: FormDateField[];
|
|
1269
1272
|
declare const marketPriceByDateFields: FormField[];
|
|
1270
1273
|
declare const marketEndDateFields: FormDateField[];
|
|
@@ -1283,4 +1286,4 @@ declare const profileFields: FormField[];
|
|
|
1283
1286
|
declare const availableCategories: Category[];
|
|
1284
1287
|
declare const categoryColors: Record<string, string>;
|
|
1285
1288
|
|
|
1286
|
-
export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, type DateTimeWithPrice, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions, EnumRejectionPolicy, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, type SatllholderWithConnectionDatesType, type StallApplicationInfoType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, dateFormat, dateTimeSchema, defaultMarketFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, emailSchema, endDateAfterStartDateTest, endDateNotInPastTest, endTimeMustBeAfterStartTimeTest, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, globalResourceSchema, locationSchema, loginFields, loginSchema, mapArrayToOptions, marketBasicInfoFields, marketEndDateFields, marketPriceByDateFields, marketSchema, marketStartDateFields, noLeadingZeros, packagingOptions, passwordSchema, paymentMethodOptions, producedIngOptions, profileFields, registerFields, registerSchema, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, requestPasswordResetSchema, resetPasswordFields, resetPasswordSchema, sortDatesByProximity, stallApplicationInfo,
|
|
1289
|
+
export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, type DateTimeWithPrice, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions, EnumRejectionPolicy, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, type SatllholderWithConnectionDatesType, type StallApplicationInfoType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, dateFormat, dateTimeSchema, defaultMarketFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, emailSchema, endDateAfterStartDateTest, endDateNotInPastTest, endTimeMustBeAfterStartTimeTest, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, globalResourceSchema, locationSchema, loginFields, loginSchema, mapArrayToOptions, marketBasicInfoFields, marketEndDateFields, marketPriceByDateFields, marketSchema, marketStartDateFields, noLeadingZeros, packagingOptions, passwordSchema, paymentMethodOptions, producedIngOptions, profileFields, registerFields, registerSchema, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, requestPasswordResetSchema, resetPasswordFields, resetPasswordSchema, sortDatesByProximity, stallApplicationInfo, stallApplicationInfoPaymentTarget, stallHolderSchema, stallholderApplyFormSchema, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, startDateNotInPastTest, startTimeCannotBeInPastTest, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useMarketForm, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateToken, useValidateTokenForm, userSchema, validateTokenFields, validateTokenSchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -7,21 +7,21 @@ declare enum EnumInviteStatus {
|
|
|
7
7
|
ACCEPTED = "Accepted",
|
|
8
8
|
COMPLETED = "Completed",
|
|
9
9
|
EXPIRED = "Expired",
|
|
10
|
-
NO_STATUS = "
|
|
10
|
+
NO_STATUS = "No_Status",
|
|
11
11
|
PENDING = "Pending",
|
|
12
12
|
REJECTED = "Rejected",
|
|
13
|
-
WAITING = "
|
|
13
|
+
WAITING = "Waiting"
|
|
14
14
|
}
|
|
15
15
|
declare enum EnumRejectionPolicy {
|
|
16
|
-
SINGLE_DATE_ALLOWED = "
|
|
17
|
-
MULTI_DATE_ALLOWED = "
|
|
16
|
+
SINGLE_DATE_ALLOWED = "single_date_allowed",
|
|
17
|
+
MULTI_DATE_ALLOWED = "multi_date_allowed"
|
|
18
18
|
}
|
|
19
19
|
declare enum EnumPaymentMethod {
|
|
20
|
-
CASH = "
|
|
21
|
-
EFTPOS = "
|
|
22
|
-
BANK_TRANSFER = "
|
|
23
|
-
PAYPAL = "
|
|
24
|
-
STRIPE = "
|
|
20
|
+
CASH = "cash",
|
|
21
|
+
EFTPOS = "eftpos",
|
|
22
|
+
BANK_TRANSFER = "bank_transfer",
|
|
23
|
+
PAYPAL = "paypal",
|
|
24
|
+
STRIPE = "stripe"
|
|
25
25
|
}
|
|
26
26
|
declare enum EnumResourceType {
|
|
27
27
|
MARKET = "market",
|
|
@@ -220,7 +220,11 @@ type StallApplicationInfoType = {
|
|
|
220
220
|
applicationDeadlineHours: number;
|
|
221
221
|
paymentDueHours: number;
|
|
222
222
|
paymentMethod: EnumPaymentMethod;
|
|
223
|
-
paymentTarget:
|
|
223
|
+
paymentTarget: {
|
|
224
|
+
accountHolderName?: string;
|
|
225
|
+
accountNumber?: string;
|
|
226
|
+
link?: string;
|
|
227
|
+
};
|
|
224
228
|
rejectionPolicy: EnumRejectionPolicy;
|
|
225
229
|
stallCapacity: number;
|
|
226
230
|
};
|
|
@@ -745,7 +749,7 @@ declare const marketSchema: yup.ObjectSchema<{
|
|
|
745
749
|
paymentMethod: NonNullable<EnumPaymentMethod | undefined>;
|
|
746
750
|
applicationDeadlineHours: number;
|
|
747
751
|
paymentDueHours: number;
|
|
748
|
-
paymentTarget:
|
|
752
|
+
paymentTarget: {};
|
|
749
753
|
rejectionPolicy: NonNullable<EnumRejectionPolicy | undefined>;
|
|
750
754
|
stallCapacity: number;
|
|
751
755
|
};
|
|
@@ -775,7 +779,7 @@ declare const marketSchema: yup.ObjectSchema<{
|
|
|
775
779
|
applicationDeadlineHours: undefined;
|
|
776
780
|
paymentDueHours: undefined;
|
|
777
781
|
paymentMethod: undefined;
|
|
778
|
-
paymentTarget:
|
|
782
|
+
paymentTarget: {};
|
|
779
783
|
rejectionPolicy: undefined;
|
|
780
784
|
stallCapacity: undefined;
|
|
781
785
|
};
|
|
@@ -1263,8 +1267,7 @@ declare const producedIngOptions: OptionItem[];
|
|
|
1263
1267
|
|
|
1264
1268
|
declare const marketBasicInfoFields: FormField[];
|
|
1265
1269
|
declare const stallApplicationInfo: FormField[];
|
|
1266
|
-
declare const stallApplicationInfoPaymentTarget: FormField;
|
|
1267
|
-
declare const stallApplicationInfoDropdowns: FormField[];
|
|
1270
|
+
declare const stallApplicationInfoPaymentTarget: FormField[];
|
|
1268
1271
|
declare const marketStartDateFields: FormDateField[];
|
|
1269
1272
|
declare const marketPriceByDateFields: FormField[];
|
|
1270
1273
|
declare const marketEndDateFields: FormDateField[];
|
|
@@ -1283,4 +1286,4 @@ declare const profileFields: FormField[];
|
|
|
1283
1286
|
declare const availableCategories: Category[];
|
|
1284
1287
|
declare const categoryColors: Record<string, string>;
|
|
1285
1288
|
|
|
1286
|
-
export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, type DateTimeWithPrice, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions, EnumRejectionPolicy, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, type SatllholderWithConnectionDatesType, type StallApplicationInfoType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, dateFormat, dateTimeSchema, defaultMarketFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, emailSchema, endDateAfterStartDateTest, endDateNotInPastTest, endTimeMustBeAfterStartTimeTest, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, globalResourceSchema, locationSchema, loginFields, loginSchema, mapArrayToOptions, marketBasicInfoFields, marketEndDateFields, marketPriceByDateFields, marketSchema, marketStartDateFields, noLeadingZeros, packagingOptions, passwordSchema, paymentMethodOptions, producedIngOptions, profileFields, registerFields, registerSchema, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, requestPasswordResetSchema, resetPasswordFields, resetPasswordSchema, sortDatesByProximity, stallApplicationInfo,
|
|
1289
|
+
export { type BaseResourceType, type BaseResourceTypeFormData, type Category, type ChatInput, type ChatMessageInput, type ChatMessageType, type ChatType, type CreateLoginFormData, type CreateMarketFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateStallholderApplyFormFormData, type CreateStallholderFormData, type CreateUserFormData, type CreateValidateTokenFormData, type DateTimeType, type DateTimeWithPrice, EnumInviteStatus, EnumNotification, EnumPaymentMethod, EnumRegions, EnumRejectionPolicy, EnumRelationResource, EnumResourceType, EnumResourceTypeIcon, EnumUserLicence, EnumUserRole, type FormDateField, type FormField, type GeocodeLocation, type ImageObjectType, ImageTypeEnum, type LocationType, type LoginFormData, type MapMultiLocation, type MarketFormData, type MarketType, type MarketWithConnectionDatesType, type NotificationType, type Nullable, type OptionItem, type PlacePrediction, type PosterInputType, type Region, type RegisterFormData, type RelationDate, type RelationLog, type RelationType, type RequestPasswordResetFormData, type ResetPasswordFormData, type ResourceConnectionsType, type ResourceImageType, type SatllholderWithConnectionDatesType, type StallApplicationInfoType, type StallholderApplyFormFormData, type StallholderApplyFormType, type StallholderAttributes, type StallholderFormData, type StallholderLocation, type StallholderType, type Subcategory, type UserFormData, type UserType, type ValidateTokenFormData, availableCategories, availableCityOptions, availableRegionOptions, availableRegionTypes, availableTagTypes, capitalizeFirstLetter, categoryColors, dateFormat, dateTimeSchema, defaultMarketFormValues, defaultRegion, defaultStallholderApplyFormValues, defaultStallholderFormValues, emailSchema, endDateAfterStartDateTest, endDateNotInPastTest, endTimeMustBeAfterStartTimeTest, formatDate, formatTimestamp, getCurrentAndFutureDates, getFutureDatesAfterThreshold, globalDefaultValues, globalResourceSchema, locationSchema, loginFields, loginSchema, mapArrayToOptions, marketBasicInfoFields, marketEndDateFields, marketPriceByDateFields, marketSchema, marketStartDateFields, noLeadingZeros, packagingOptions, passwordSchema, paymentMethodOptions, producedIngOptions, profileFields, registerFields, registerSchema, rejectionPolicyOptions, removeTypename, requestPasswordResetFields, requestPasswordResetSchema, resetPasswordFields, resetPasswordSchema, sortDatesByProximity, stallApplicationInfo, stallApplicationInfoPaymentTarget, stallHolderSchema, stallholderApplyFormSchema, stallholderBasicInfoFields, stallholderElectricity, stallholderEndDateFields, stallholderFullAddress, stallholderGazebo, stallholderLocationDescription, stallholderMultiLocation, stallholderPackaging, stallholderPaymentMethod, stallholderPriceRange, stallholderProducedIn, stallholderStallSize, stallholderStartDateFields, stallholderTable, startDateNotInPastTest, startTimeCannotBeInPastTest, statusOptions, tagOptions, timeFormat, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useCreateChat, useCreateMarket, useCreatePoster, useCreateRelation, useCreateStallholder, useCreateStallholderApplyForm, useCreateUser, useDeleteChat, useDeleteMarket, useDeleteRelation, useDeleteStallholder, useGetChat, useGetChatSubscription, useGetMarket, useGetMarketRelations, useGetMarkets, useGetMarketsByRegion, useGetMarketsNearMe, useGetNotification, useGetRelation, useGetRelationByMarketAndStallholder, useGetResourceConnections, useGetStallholder, useGetStallholderApplyForm, useGetStallholderRelations, useGetStallholders, useGetStallholdersByRegion, useGetUser, useGetUserChats, useGetUserFavourites, useGetUserMarkets, useGetUserNotifications, useGetUsers, useLocationSearch, useLogin, useLoginForm, useMarketForm, useRegister, useRegisterForm, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRequestPasswordReset, useRequestPasswordResetForm, useResetPassword, useResetPasswordForm, useSearchMarkets, useSearchStallholders, useSendChatMessage, useStallholderApplyForm, useStallholderForm, useUpdateMarket, useUpdateRelation, useUpdateStallholder, useUpdateStallholderApplyForm, useUpdateUser, useUserForm, useValidateToken, useValidateTokenForm, userSchema, validateTokenFields, validateTokenSchema };
|