@yangsaiyam/helper 1.15.0 → 1.16.0

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/README.md CHANGED
@@ -76,6 +76,7 @@ src/
76
76
  - `routeLabelKey`
77
77
  - `routePathKey`
78
78
  - `CONTACT_FORM_ENQUIRY_TYPE`
79
+ - `CONTACT_FORM_ENQUIRY_TYPE_BY_SITE`
79
80
  - `FILE_STATUS`
80
81
  - `FILE_ORIGIN`
81
82
  - `getOptionByKey`
package/dist/index.cjs CHANGED
@@ -36,6 +36,7 @@ __export(index_exports, {
36
36
  CAREER_LOCATION: () => CAREER_LOCATION,
37
37
  CAREER_MODE: () => CAREER_MODE,
38
38
  CONTACT_FORM_ENQUIRY_TYPE: () => CONTACT_FORM_ENQUIRY_TYPE,
39
+ CONTACT_FORM_ENQUIRY_TYPE_BY_SITE: () => CONTACT_FORM_ENQUIRY_TYPE_BY_SITE,
39
40
  COUNTRY_CODE: () => COUNTRY_CODE,
40
41
  EMAIL_HISTORY_STATUS: () => EMAIL_HISTORY_STATUS,
41
42
  EMAIL_TEMPLATE_ROLES: () => EMAIL_TEMPLATE_ROLES,
@@ -146,8 +147,33 @@ var CAREER_LOCATION = [
146
147
  { key: 15, value: "Labuan", i18nKey: "career.location.15" }
147
148
  ];
148
149
 
150
+ // src/website/index.js
151
+ var Website;
152
+ (function(Website3) {
153
+ Website3[Website3["KORRE"] = 1] = "KORRE";
154
+ Website3[Website3["KORRE_LABS"] = 2] = "KORRE_LABS";
155
+ Website3[Website3["MCOM_MEDIA"] = 3] = "MCOM_MEDIA";
156
+ })(Website || (Website = {}));
157
+ var WEBSITES = {
158
+ [Website.KORRE]: {
159
+ id: Website.KORRE,
160
+ name: "Korre Evolution",
161
+ url: "https://public.korre.site/images/korre-evo.png"
162
+ },
163
+ [Website.KORRE_LABS]: {
164
+ id: Website.KORRE_LABS,
165
+ name: "Korre Labs",
166
+ url: "https://public.korre.site/images/korre-labs.png"
167
+ },
168
+ [Website.MCOM_MEDIA]: {
169
+ id: Website.MCOM_MEDIA,
170
+ name: "MCOM Media",
171
+ url: "https://public.korre.site/images/mcom-media.png"
172
+ }
173
+ };
174
+
149
175
  // src/contact-form/index.ts
150
- var CONTACT_FORM_ENQUIRY_TYPE = [
176
+ var KORRE_ENQUIRY_TYPE = [
151
177
  {
152
178
  key: 1,
153
179
  value: "Software Development",
@@ -160,6 +186,44 @@ var CONTACT_FORM_ENQUIRY_TYPE = [
160
186
  },
161
187
  { key: 3, value: "MCN Business", i18nKey: "contactForm.enquiryType.3" }
162
188
  ];
189
+ var MCOM_MEDIA_ENQUIRY_TYPE = [
190
+ {
191
+ key: 1,
192
+ value: "Media Buying",
193
+ i18nKey: "contactForm.enquiryType.mcomMedia.1"
194
+ },
195
+ {
196
+ key: 2,
197
+ value: "Creative Production",
198
+ i18nKey: "contactForm.enquiryType.mcomMedia.2"
199
+ },
200
+ {
201
+ key: 3,
202
+ value: "Influencer Marketing",
203
+ i18nKey: "contactForm.enquiryType.mcomMedia.3"
204
+ },
205
+ {
206
+ key: 4,
207
+ value: "Landing Page Optimization",
208
+ i18nKey: "contactForm.enquiryType.mcomMedia.4"
209
+ },
210
+ {
211
+ key: 5,
212
+ value: "Full Service",
213
+ i18nKey: "contactForm.enquiryType.mcomMedia.5"
214
+ },
215
+ {
216
+ key: 6,
217
+ value: "Not Sure",
218
+ i18nKey: "contactForm.enquiryType.mcomMedia.6"
219
+ }
220
+ ];
221
+ var CONTACT_FORM_ENQUIRY_TYPE = KORRE_ENQUIRY_TYPE;
222
+ var CONTACT_FORM_ENQUIRY_TYPE_BY_SITE = {
223
+ [Website.KORRE]: KORRE_ENQUIRY_TYPE,
224
+ [Website.KORRE_LABS]: [],
225
+ [Website.MCOM_MEDIA]: MCOM_MEDIA_ENQUIRY_TYPE
226
+ };
163
227
 
164
228
  // src/files/index.ts
165
229
  var FILE_STATUS = [
@@ -667,31 +731,6 @@ var ORIGIN = [
667
731
  { key: 3, value: "Maukerja", i18nKey: "track.origin.3" }
668
732
  ];
669
733
 
670
- // src/website/index.js
671
- var Website;
672
- (function(Website3) {
673
- Website3[Website3["KORRE"] = 1] = "KORRE";
674
- Website3[Website3["KORRE_LABS"] = 2] = "KORRE_LABS";
675
- Website3[Website3["MCOM_MEDIA"] = 3] = "MCOM_MEDIA";
676
- })(Website || (Website = {}));
677
- var WEBSITES = {
678
- [Website.KORRE]: {
679
- id: Website.KORRE,
680
- name: "Korre Evolution",
681
- url: "https://public.korre.site/images/korre-evo.png"
682
- },
683
- [Website.KORRE_LABS]: {
684
- id: Website.KORRE_LABS,
685
- name: "Korre Labs",
686
- url: "https://public.korre.site/images/korre-labs.png"
687
- },
688
- [Website.MCOM_MEDIA]: {
689
- id: Website.MCOM_MEDIA,
690
- name: "MCOM Media",
691
- url: "https://public.korre.site/images/mcom-media.png"
692
- }
693
- };
694
-
695
734
  // src/url-prefix/index.ts
696
735
  var URL_PREFIXES = {
697
736
  [Website.KORRE]: {
@@ -788,6 +827,7 @@ var EMAIL_HISTORY_STATUS = [
788
827
  CAREER_LOCATION,
789
828
  CAREER_MODE,
790
829
  CONTACT_FORM_ENQUIRY_TYPE,
830
+ CONTACT_FORM_ENQUIRY_TYPE_BY_SITE,
791
831
  COUNTRY_CODE,
792
832
  EMAIL_HISTORY_STATUS,
793
833
  EMAIL_TEMPLATE_ROLES,
package/dist/index.d.cts CHANGED
@@ -151,7 +151,30 @@ declare const CAREER_LOCATION: readonly [{
151
151
  readonly i18nKey: "career.location.15";
152
152
  }];
153
153
 
154
- declare const CONTACT_FORM_ENQUIRY_TYPE: readonly [{
154
+ declare enum Website {
155
+ KORRE = 1,
156
+ KORRE_LABS = 2,
157
+ MCOM_MEDIA = 3
158
+ }
159
+ declare const WEBSITES: {
160
+ 1: {
161
+ id: Website;
162
+ name: string;
163
+ url: string;
164
+ };
165
+ 2: {
166
+ id: Website;
167
+ name: string;
168
+ url: string;
169
+ };
170
+ 3: {
171
+ id: Website;
172
+ name: string;
173
+ url: string;
174
+ };
175
+ };
176
+
177
+ declare const KORRE_ENQUIRY_TYPE: readonly [{
155
178
  readonly key: 1;
156
179
  readonly value: "Software Development";
157
180
  readonly i18nKey: "contactForm.enquiryType.1";
@@ -164,14 +187,45 @@ declare const CONTACT_FORM_ENQUIRY_TYPE: readonly [{
164
187
  readonly value: "MCN Business";
165
188
  readonly i18nKey: "contactForm.enquiryType.3";
166
189
  }];
190
+ declare const MCOM_MEDIA_ENQUIRY_TYPE: readonly [{
191
+ readonly key: 1;
192
+ readonly value: "Media Buying";
193
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.1";
194
+ }, {
195
+ readonly key: 2;
196
+ readonly value: "Creative Production";
197
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.2";
198
+ }, {
199
+ readonly key: 3;
200
+ readonly value: "Influencer Marketing";
201
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.3";
202
+ }, {
203
+ readonly key: 4;
204
+ readonly value: "Landing Page Optimization";
205
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.4";
206
+ }, {
207
+ readonly key: 5;
208
+ readonly value: "Full Service";
209
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.5";
210
+ }, {
211
+ readonly key: 6;
212
+ readonly value: "Not Sure";
213
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.6";
214
+ }];
215
+ declare const CONTACT_FORM_ENQUIRY_TYPE: typeof KORRE_ENQUIRY_TYPE;
216
+ declare const CONTACT_FORM_ENQUIRY_TYPE_BY_SITE: {
217
+ readonly [Website.KORRE]: typeof KORRE_ENQUIRY_TYPE;
218
+ readonly [Website.KORRE_LABS]: readonly [];
219
+ readonly [Website.MCOM_MEDIA]: typeof MCOM_MEDIA_ENQUIRY_TYPE;
220
+ };
167
221
  /** Korre Evolution (site 1): every field maps to a standard column. */
168
222
  type KorreContactFormData = Record<string, never>;
169
223
  /** Korre Labs (site 2): no contact form yet. */
170
224
  type KorreLabsContactFormData = Record<string, never>;
171
225
  /**
172
226
  * MCOM Media (site 3): agency-intake extras beyond the standard columns.
173
- * `service` is provisional it may move to `enquiry_type` once the site-3
174
- * enquiry-type mapping is defined.
227
+ * The "Service Interested" dropdown is the standard `enquiry_type` column
228
+ * (see CONTACT_FORM_ENQUIRY_TYPE_BY_SITE), not a form_data field.
175
229
  */
176
230
  interface McomMediaContactFormData {
177
231
  company_name?: string;
@@ -180,7 +234,6 @@ interface McomMediaContactFormData {
180
234
  website?: string;
181
235
  country?: string;
182
236
  budget?: string;
183
- service?: string;
184
237
  timeline?: string;
185
238
  }
186
239
  /**
@@ -480,29 +533,6 @@ declare const URL_PREFIXES: {
480
533
  2: {};
481
534
  };
482
535
 
483
- declare enum Website {
484
- KORRE = 1,
485
- KORRE_LABS = 2,
486
- MCOM_MEDIA = 3
487
- }
488
- declare const WEBSITES: {
489
- 1: {
490
- id: Website;
491
- name: string;
492
- url: string;
493
- };
494
- 2: {
495
- id: Website;
496
- name: string;
497
- url: string;
498
- };
499
- 3: {
500
- id: Website;
501
- name: string;
502
- url: string;
503
- };
504
- };
505
-
506
536
  declare const COUNTRY_CODE: readonly [{
507
537
  readonly key: 1;
508
538
  readonly value: "MY";
@@ -711,4 +741,4 @@ declare const EMAIL_HISTORY_STATUS: readonly [{
711
741
  readonly i18nKey: "emailHistory.status.4";
712
742
  }];
713
743
 
714
- export { ASSESSMENT_QUESTION_TYPE, CAREER_CATEGORY, CAREER_JOB_TYPE, CAREER_LOCATION, CAREER_MODE, CONTACT_FORM_ENQUIRY_TYPE, COUNTRY_CODE, type CanonicalRole, type CanonicalTimezone, type ContactFormData, type ContactFormDataBySite, EMAIL_HISTORY_STATUS, EMAIL_TEMPLATE_ROLES, FILE_ORIGIN, FILE_STATUS, JOB_APPLICATION_STATUS, type KorreContactFormData, type KorreLabsContactFormData, LOCALE, MALAYSIA_STATE, type MappingOption, type McomMediaContactFormData, ORIGIN, PERMISSION_I18N_KEY, Permission, QuestionType, ROLE, ROLE_MAP, ROLE_PERMISSIONS, ROUTE, ROUTES, type RoleInput, type RoleValue, type RouteKey, type RouteMapping, STATES, TIMEZONE, TIMEZONE_CURRENT_UTC_OFFSET, TIMEZONE_TO_UTC, type TimezoneInput, URL_PREFIXES, WEBSITES, Website, buildLocalizedRoute, buildRoutePathName, convertTimestampToTimezone, getI18nKeyByKey, getLabelByKey, getOptionByKey, hasPermission, normalizeRole, normalizeTimezone, permissionLabelKey, roleLabelKey, roleToId, routeLabelKey, routePathKey, timezoneLabelKey, timezoneToUtc, toRecord };
744
+ export { ASSESSMENT_QUESTION_TYPE, CAREER_CATEGORY, CAREER_JOB_TYPE, CAREER_LOCATION, CAREER_MODE, CONTACT_FORM_ENQUIRY_TYPE, CONTACT_FORM_ENQUIRY_TYPE_BY_SITE, COUNTRY_CODE, type CanonicalRole, type CanonicalTimezone, type ContactFormData, type ContactFormDataBySite, EMAIL_HISTORY_STATUS, EMAIL_TEMPLATE_ROLES, FILE_ORIGIN, FILE_STATUS, JOB_APPLICATION_STATUS, type KorreContactFormData, type KorreLabsContactFormData, LOCALE, MALAYSIA_STATE, type MappingOption, type McomMediaContactFormData, ORIGIN, PERMISSION_I18N_KEY, Permission, QuestionType, ROLE, ROLE_MAP, ROLE_PERMISSIONS, ROUTE, ROUTES, type RoleInput, type RoleValue, type RouteKey, type RouteMapping, STATES, TIMEZONE, TIMEZONE_CURRENT_UTC_OFFSET, TIMEZONE_TO_UTC, type TimezoneInput, URL_PREFIXES, WEBSITES, Website, buildLocalizedRoute, buildRoutePathName, convertTimestampToTimezone, getI18nKeyByKey, getLabelByKey, getOptionByKey, hasPermission, normalizeRole, normalizeTimezone, permissionLabelKey, roleLabelKey, roleToId, routeLabelKey, routePathKey, timezoneLabelKey, timezoneToUtc, toRecord };
package/dist/index.d.ts CHANGED
@@ -151,7 +151,30 @@ declare const CAREER_LOCATION: readonly [{
151
151
  readonly i18nKey: "career.location.15";
152
152
  }];
153
153
 
154
- declare const CONTACT_FORM_ENQUIRY_TYPE: readonly [{
154
+ declare enum Website {
155
+ KORRE = 1,
156
+ KORRE_LABS = 2,
157
+ MCOM_MEDIA = 3
158
+ }
159
+ declare const WEBSITES: {
160
+ 1: {
161
+ id: Website;
162
+ name: string;
163
+ url: string;
164
+ };
165
+ 2: {
166
+ id: Website;
167
+ name: string;
168
+ url: string;
169
+ };
170
+ 3: {
171
+ id: Website;
172
+ name: string;
173
+ url: string;
174
+ };
175
+ };
176
+
177
+ declare const KORRE_ENQUIRY_TYPE: readonly [{
155
178
  readonly key: 1;
156
179
  readonly value: "Software Development";
157
180
  readonly i18nKey: "contactForm.enquiryType.1";
@@ -164,14 +187,45 @@ declare const CONTACT_FORM_ENQUIRY_TYPE: readonly [{
164
187
  readonly value: "MCN Business";
165
188
  readonly i18nKey: "contactForm.enquiryType.3";
166
189
  }];
190
+ declare const MCOM_MEDIA_ENQUIRY_TYPE: readonly [{
191
+ readonly key: 1;
192
+ readonly value: "Media Buying";
193
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.1";
194
+ }, {
195
+ readonly key: 2;
196
+ readonly value: "Creative Production";
197
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.2";
198
+ }, {
199
+ readonly key: 3;
200
+ readonly value: "Influencer Marketing";
201
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.3";
202
+ }, {
203
+ readonly key: 4;
204
+ readonly value: "Landing Page Optimization";
205
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.4";
206
+ }, {
207
+ readonly key: 5;
208
+ readonly value: "Full Service";
209
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.5";
210
+ }, {
211
+ readonly key: 6;
212
+ readonly value: "Not Sure";
213
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.6";
214
+ }];
215
+ declare const CONTACT_FORM_ENQUIRY_TYPE: typeof KORRE_ENQUIRY_TYPE;
216
+ declare const CONTACT_FORM_ENQUIRY_TYPE_BY_SITE: {
217
+ readonly [Website.KORRE]: typeof KORRE_ENQUIRY_TYPE;
218
+ readonly [Website.KORRE_LABS]: readonly [];
219
+ readonly [Website.MCOM_MEDIA]: typeof MCOM_MEDIA_ENQUIRY_TYPE;
220
+ };
167
221
  /** Korre Evolution (site 1): every field maps to a standard column. */
168
222
  type KorreContactFormData = Record<string, never>;
169
223
  /** Korre Labs (site 2): no contact form yet. */
170
224
  type KorreLabsContactFormData = Record<string, never>;
171
225
  /**
172
226
  * MCOM Media (site 3): agency-intake extras beyond the standard columns.
173
- * `service` is provisional it may move to `enquiry_type` once the site-3
174
- * enquiry-type mapping is defined.
227
+ * The "Service Interested" dropdown is the standard `enquiry_type` column
228
+ * (see CONTACT_FORM_ENQUIRY_TYPE_BY_SITE), not a form_data field.
175
229
  */
176
230
  interface McomMediaContactFormData {
177
231
  company_name?: string;
@@ -180,7 +234,6 @@ interface McomMediaContactFormData {
180
234
  website?: string;
181
235
  country?: string;
182
236
  budget?: string;
183
- service?: string;
184
237
  timeline?: string;
185
238
  }
186
239
  /**
@@ -480,29 +533,6 @@ declare const URL_PREFIXES: {
480
533
  2: {};
481
534
  };
482
535
 
483
- declare enum Website {
484
- KORRE = 1,
485
- KORRE_LABS = 2,
486
- MCOM_MEDIA = 3
487
- }
488
- declare const WEBSITES: {
489
- 1: {
490
- id: Website;
491
- name: string;
492
- url: string;
493
- };
494
- 2: {
495
- id: Website;
496
- name: string;
497
- url: string;
498
- };
499
- 3: {
500
- id: Website;
501
- name: string;
502
- url: string;
503
- };
504
- };
505
-
506
536
  declare const COUNTRY_CODE: readonly [{
507
537
  readonly key: 1;
508
538
  readonly value: "MY";
@@ -711,4 +741,4 @@ declare const EMAIL_HISTORY_STATUS: readonly [{
711
741
  readonly i18nKey: "emailHistory.status.4";
712
742
  }];
713
743
 
714
- export { ASSESSMENT_QUESTION_TYPE, CAREER_CATEGORY, CAREER_JOB_TYPE, CAREER_LOCATION, CAREER_MODE, CONTACT_FORM_ENQUIRY_TYPE, COUNTRY_CODE, type CanonicalRole, type CanonicalTimezone, type ContactFormData, type ContactFormDataBySite, EMAIL_HISTORY_STATUS, EMAIL_TEMPLATE_ROLES, FILE_ORIGIN, FILE_STATUS, JOB_APPLICATION_STATUS, type KorreContactFormData, type KorreLabsContactFormData, LOCALE, MALAYSIA_STATE, type MappingOption, type McomMediaContactFormData, ORIGIN, PERMISSION_I18N_KEY, Permission, QuestionType, ROLE, ROLE_MAP, ROLE_PERMISSIONS, ROUTE, ROUTES, type RoleInput, type RoleValue, type RouteKey, type RouteMapping, STATES, TIMEZONE, TIMEZONE_CURRENT_UTC_OFFSET, TIMEZONE_TO_UTC, type TimezoneInput, URL_PREFIXES, WEBSITES, Website, buildLocalizedRoute, buildRoutePathName, convertTimestampToTimezone, getI18nKeyByKey, getLabelByKey, getOptionByKey, hasPermission, normalizeRole, normalizeTimezone, permissionLabelKey, roleLabelKey, roleToId, routeLabelKey, routePathKey, timezoneLabelKey, timezoneToUtc, toRecord };
744
+ export { ASSESSMENT_QUESTION_TYPE, CAREER_CATEGORY, CAREER_JOB_TYPE, CAREER_LOCATION, CAREER_MODE, CONTACT_FORM_ENQUIRY_TYPE, CONTACT_FORM_ENQUIRY_TYPE_BY_SITE, COUNTRY_CODE, type CanonicalRole, type CanonicalTimezone, type ContactFormData, type ContactFormDataBySite, EMAIL_HISTORY_STATUS, EMAIL_TEMPLATE_ROLES, FILE_ORIGIN, FILE_STATUS, JOB_APPLICATION_STATUS, type KorreContactFormData, type KorreLabsContactFormData, LOCALE, MALAYSIA_STATE, type MappingOption, type McomMediaContactFormData, ORIGIN, PERMISSION_I18N_KEY, Permission, QuestionType, ROLE, ROLE_MAP, ROLE_PERMISSIONS, ROUTE, ROUTES, type RoleInput, type RoleValue, type RouteKey, type RouteMapping, STATES, TIMEZONE, TIMEZONE_CURRENT_UTC_OFFSET, TIMEZONE_TO_UTC, type TimezoneInput, URL_PREFIXES, WEBSITES, Website, buildLocalizedRoute, buildRoutePathName, convertTimestampToTimezone, getI18nKeyByKey, getLabelByKey, getOptionByKey, hasPermission, normalizeRole, normalizeTimezone, permissionLabelKey, roleLabelKey, roleToId, routeLabelKey, routePathKey, timezoneLabelKey, timezoneToUtc, toRecord };
package/dist/index.js CHANGED
@@ -64,8 +64,33 @@ var CAREER_LOCATION = [
64
64
  { key: 15, value: "Labuan", i18nKey: "career.location.15" }
65
65
  ];
66
66
 
67
+ // src/website/index.js
68
+ var Website;
69
+ (function(Website3) {
70
+ Website3[Website3["KORRE"] = 1] = "KORRE";
71
+ Website3[Website3["KORRE_LABS"] = 2] = "KORRE_LABS";
72
+ Website3[Website3["MCOM_MEDIA"] = 3] = "MCOM_MEDIA";
73
+ })(Website || (Website = {}));
74
+ var WEBSITES = {
75
+ [Website.KORRE]: {
76
+ id: Website.KORRE,
77
+ name: "Korre Evolution",
78
+ url: "https://public.korre.site/images/korre-evo.png"
79
+ },
80
+ [Website.KORRE_LABS]: {
81
+ id: Website.KORRE_LABS,
82
+ name: "Korre Labs",
83
+ url: "https://public.korre.site/images/korre-labs.png"
84
+ },
85
+ [Website.MCOM_MEDIA]: {
86
+ id: Website.MCOM_MEDIA,
87
+ name: "MCOM Media",
88
+ url: "https://public.korre.site/images/mcom-media.png"
89
+ }
90
+ };
91
+
67
92
  // src/contact-form/index.ts
68
- var CONTACT_FORM_ENQUIRY_TYPE = [
93
+ var KORRE_ENQUIRY_TYPE = [
69
94
  {
70
95
  key: 1,
71
96
  value: "Software Development",
@@ -78,6 +103,44 @@ var CONTACT_FORM_ENQUIRY_TYPE = [
78
103
  },
79
104
  { key: 3, value: "MCN Business", i18nKey: "contactForm.enquiryType.3" }
80
105
  ];
106
+ var MCOM_MEDIA_ENQUIRY_TYPE = [
107
+ {
108
+ key: 1,
109
+ value: "Media Buying",
110
+ i18nKey: "contactForm.enquiryType.mcomMedia.1"
111
+ },
112
+ {
113
+ key: 2,
114
+ value: "Creative Production",
115
+ i18nKey: "contactForm.enquiryType.mcomMedia.2"
116
+ },
117
+ {
118
+ key: 3,
119
+ value: "Influencer Marketing",
120
+ i18nKey: "contactForm.enquiryType.mcomMedia.3"
121
+ },
122
+ {
123
+ key: 4,
124
+ value: "Landing Page Optimization",
125
+ i18nKey: "contactForm.enquiryType.mcomMedia.4"
126
+ },
127
+ {
128
+ key: 5,
129
+ value: "Full Service",
130
+ i18nKey: "contactForm.enquiryType.mcomMedia.5"
131
+ },
132
+ {
133
+ key: 6,
134
+ value: "Not Sure",
135
+ i18nKey: "contactForm.enquiryType.mcomMedia.6"
136
+ }
137
+ ];
138
+ var CONTACT_FORM_ENQUIRY_TYPE = KORRE_ENQUIRY_TYPE;
139
+ var CONTACT_FORM_ENQUIRY_TYPE_BY_SITE = {
140
+ [Website.KORRE]: KORRE_ENQUIRY_TYPE,
141
+ [Website.KORRE_LABS]: [],
142
+ [Website.MCOM_MEDIA]: MCOM_MEDIA_ENQUIRY_TYPE
143
+ };
81
144
 
82
145
  // src/files/index.ts
83
146
  var FILE_STATUS = [
@@ -585,31 +648,6 @@ var ORIGIN = [
585
648
  { key: 3, value: "Maukerja", i18nKey: "track.origin.3" }
586
649
  ];
587
650
 
588
- // src/website/index.js
589
- var Website;
590
- (function(Website3) {
591
- Website3[Website3["KORRE"] = 1] = "KORRE";
592
- Website3[Website3["KORRE_LABS"] = 2] = "KORRE_LABS";
593
- Website3[Website3["MCOM_MEDIA"] = 3] = "MCOM_MEDIA";
594
- })(Website || (Website = {}));
595
- var WEBSITES = {
596
- [Website.KORRE]: {
597
- id: Website.KORRE,
598
- name: "Korre Evolution",
599
- url: "https://public.korre.site/images/korre-evo.png"
600
- },
601
- [Website.KORRE_LABS]: {
602
- id: Website.KORRE_LABS,
603
- name: "Korre Labs",
604
- url: "https://public.korre.site/images/korre-labs.png"
605
- },
606
- [Website.MCOM_MEDIA]: {
607
- id: Website.MCOM_MEDIA,
608
- name: "MCOM Media",
609
- url: "https://public.korre.site/images/mcom-media.png"
610
- }
611
- };
612
-
613
651
  // src/url-prefix/index.ts
614
652
  var URL_PREFIXES = {
615
653
  [Website.KORRE]: {
@@ -705,6 +743,7 @@ export {
705
743
  CAREER_LOCATION,
706
744
  CAREER_MODE,
707
745
  CONTACT_FORM_ENQUIRY_TYPE,
746
+ CONTACT_FORM_ENQUIRY_TYPE_BY_SITE,
708
747
  COUNTRY_CODE,
709
748
  EMAIL_HISTORY_STATUS,
710
749
  EMAIL_TEMPLATE_ROLES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yangsaiyam/helper",
3
- "version": "1.15.0",
3
+ "version": "1.16.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -1,4 +1,5 @@
1
- export declare const CONTACT_FORM_ENQUIRY_TYPE: readonly [{
1
+ import { Website } from "../website/index.js";
2
+ declare const KORRE_ENQUIRY_TYPE: readonly [{
2
3
  readonly key: 1;
3
4
  readonly value: "Software Development";
4
5
  readonly i18nKey: "contactForm.enquiryType.1";
@@ -11,14 +12,45 @@ export declare const CONTACT_FORM_ENQUIRY_TYPE: readonly [{
11
12
  readonly value: "MCN Business";
12
13
  readonly i18nKey: "contactForm.enquiryType.3";
13
14
  }];
15
+ declare const MCOM_MEDIA_ENQUIRY_TYPE: readonly [{
16
+ readonly key: 1;
17
+ readonly value: "Media Buying";
18
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.1";
19
+ }, {
20
+ readonly key: 2;
21
+ readonly value: "Creative Production";
22
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.2";
23
+ }, {
24
+ readonly key: 3;
25
+ readonly value: "Influencer Marketing";
26
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.3";
27
+ }, {
28
+ readonly key: 4;
29
+ readonly value: "Landing Page Optimization";
30
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.4";
31
+ }, {
32
+ readonly key: 5;
33
+ readonly value: "Full Service";
34
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.5";
35
+ }, {
36
+ readonly key: 6;
37
+ readonly value: "Not Sure";
38
+ readonly i18nKey: "contactForm.enquiryType.mcomMedia.6";
39
+ }];
40
+ export declare const CONTACT_FORM_ENQUIRY_TYPE: typeof KORRE_ENQUIRY_TYPE;
41
+ export declare const CONTACT_FORM_ENQUIRY_TYPE_BY_SITE: {
42
+ readonly [Website.KORRE]: typeof KORRE_ENQUIRY_TYPE;
43
+ readonly [Website.KORRE_LABS]: readonly [];
44
+ readonly [Website.MCOM_MEDIA]: typeof MCOM_MEDIA_ENQUIRY_TYPE;
45
+ };
14
46
  /** Korre Evolution (site 1): every field maps to a standard column. */
15
47
  export type KorreContactFormData = Record<string, never>;
16
48
  /** Korre Labs (site 2): no contact form yet. */
17
49
  export type KorreLabsContactFormData = Record<string, never>;
18
50
  /**
19
51
  * MCOM Media (site 3): agency-intake extras beyond the standard columns.
20
- * `service` is provisional it may move to `enquiry_type` once the site-3
21
- * enquiry-type mapping is defined.
52
+ * The "Service Interested" dropdown is the standard `enquiry_type` column
53
+ * (see CONTACT_FORM_ENQUIRY_TYPE_BY_SITE), not a form_data field.
22
54
  */
23
55
  export interface McomMediaContactFormData {
24
56
  company_name?: string;
@@ -27,7 +59,6 @@ export interface McomMediaContactFormData {
27
59
  website?: string;
28
60
  country?: string;
29
61
  budget?: string;
30
- service?: string;
31
62
  timeline?: string;
32
63
  }
33
64
  /**
@@ -40,3 +71,4 @@ export interface ContactFormDataBySite {
40
71
  3: McomMediaContactFormData;
41
72
  }
42
73
  export type ContactFormData = ContactFormDataBySite[keyof ContactFormDataBySite];
74
+ export {};
@@ -1,4 +1,5 @@
1
- export const CONTACT_FORM_ENQUIRY_TYPE = [
1
+ import { Website } from "../website/index.js";
2
+ const KORRE_ENQUIRY_TYPE = [
2
3
  {
3
4
  key: 1,
4
5
  value: "Software Development",
@@ -11,3 +12,41 @@ export const CONTACT_FORM_ENQUIRY_TYPE = [
11
12
  },
12
13
  { key: 3, value: "MCN Business", i18nKey: "contactForm.enquiryType.3" },
13
14
  ];
15
+ const MCOM_MEDIA_ENQUIRY_TYPE = [
16
+ {
17
+ key: 1,
18
+ value: "Media Buying",
19
+ i18nKey: "contactForm.enquiryType.mcomMedia.1",
20
+ },
21
+ {
22
+ key: 2,
23
+ value: "Creative Production",
24
+ i18nKey: "contactForm.enquiryType.mcomMedia.2",
25
+ },
26
+ {
27
+ key: 3,
28
+ value: "Influencer Marketing",
29
+ i18nKey: "contactForm.enquiryType.mcomMedia.3",
30
+ },
31
+ {
32
+ key: 4,
33
+ value: "Landing Page Optimization",
34
+ i18nKey: "contactForm.enquiryType.mcomMedia.4",
35
+ },
36
+ {
37
+ key: 5,
38
+ value: "Full Service",
39
+ i18nKey: "contactForm.enquiryType.mcomMedia.5",
40
+ },
41
+ {
42
+ key: 6,
43
+ value: "Not Sure",
44
+ i18nKey: "contactForm.enquiryType.mcomMedia.6",
45
+ },
46
+ ];
47
+ export const CONTACT_FORM_ENQUIRY_TYPE = KORRE_ENQUIRY_TYPE;
48
+ export const CONTACT_FORM_ENQUIRY_TYPE_BY_SITE = {
49
+ [Website.KORRE]: KORRE_ENQUIRY_TYPE,
50
+ [Website.KORRE_LABS]: [],
51
+ [Website.MCOM_MEDIA]: MCOM_MEDIA_ENQUIRY_TYPE,
52
+ };
@@ -1,6 +1,13 @@
1
1
  import type { MappingOption } from "../shared/types.js";
2
+ import { Website } from "../website/index.js";
2
3
 
3
- export const CONTACT_FORM_ENQUIRY_TYPE = [
4
+ /**
5
+ * Korre Evolution (site 1) enquiry types.
6
+ *
7
+ * Also re-exported flat as {@link CONTACT_FORM_ENQUIRY_TYPE} for backward
8
+ * compatibility with consumers that predate per-site enquiry types.
9
+ */
10
+ const KORRE_ENQUIRY_TYPE = [
4
11
  {
5
12
  key: 1,
6
13
  value: "Software Development",
@@ -14,6 +21,71 @@ export const CONTACT_FORM_ENQUIRY_TYPE = [
14
21
  { key: 3, value: "MCN Business", i18nKey: "contactForm.enquiryType.3" },
15
22
  ] as const satisfies readonly MappingOption[];
16
23
 
24
+ /**
25
+ * MCOM Media (site 3) enquiry types — the website's "Service Interested"
26
+ * dropdown (`form_data.service`), which is the site's `enquiry_type`.
27
+ *
28
+ * Keys restart at 1 per site, so a value only identifies a type together with
29
+ * its `site_id`. i18n keys are namespaced under `mcomMedia` rather than nested
30
+ * beneath `contactForm.enquiryType.3` because that key is already site 1's
31
+ * "MCN Business" label (a string cannot also be an object in the locale JSON).
32
+ */
33
+ const MCOM_MEDIA_ENQUIRY_TYPE = [
34
+ {
35
+ key: 1,
36
+ value: "Media Buying",
37
+ i18nKey: "contactForm.enquiryType.mcomMedia.1",
38
+ },
39
+ {
40
+ key: 2,
41
+ value: "Creative Production",
42
+ i18nKey: "contactForm.enquiryType.mcomMedia.2",
43
+ },
44
+ {
45
+ key: 3,
46
+ value: "Influencer Marketing",
47
+ i18nKey: "contactForm.enquiryType.mcomMedia.3",
48
+ },
49
+ {
50
+ key: 4,
51
+ value: "Landing Page Optimization",
52
+ i18nKey: "contactForm.enquiryType.mcomMedia.4",
53
+ },
54
+ {
55
+ key: 5,
56
+ value: "Full Service",
57
+ i18nKey: "contactForm.enquiryType.mcomMedia.5",
58
+ },
59
+ {
60
+ key: 6,
61
+ value: "Not Sure",
62
+ i18nKey: "contactForm.enquiryType.mcomMedia.6",
63
+ },
64
+ ] as const satisfies readonly MappingOption[];
65
+
66
+ /**
67
+ * Korre Evolution (site 1) enquiry types, exported flat for backward
68
+ * compatibility.
69
+ *
70
+ * New code should prefer {@link CONTACT_FORM_ENQUIRY_TYPE_BY_SITE}, which
71
+ * resolves enquiry types per site. Because per-site keys restart at 1, this
72
+ * flat list cannot represent every site at once — it remains site 1 only.
73
+ */
74
+ export const CONTACT_FORM_ENQUIRY_TYPE = KORRE_ENQUIRY_TYPE;
75
+
76
+ /**
77
+ * Enquiry-type options keyed by `site_id`.
78
+ *
79
+ * Keys restart at 1 within each site, so an `enquiry_type` value identifies a
80
+ * type only together with its `site_id`. 1 = KORRE, 2 = KORRE_LABS (no contact
81
+ * form yet), 3 = MCOM_MEDIA (see the {@link Website} enum).
82
+ */
83
+ export const CONTACT_FORM_ENQUIRY_TYPE_BY_SITE = {
84
+ [Website.KORRE]: KORRE_ENQUIRY_TYPE,
85
+ [Website.KORRE_LABS]: [],
86
+ [Website.MCOM_MEDIA]: MCOM_MEDIA_ENQUIRY_TYPE,
87
+ } as const satisfies Record<Website, readonly MappingOption[]>;
88
+
17
89
  /**
18
90
  * Per-site shape of `contact_form.form_data` (jsonb).
19
91
  *
@@ -30,8 +102,10 @@ export type KorreLabsContactFormData = Record<string, never>;
30
102
 
31
103
  /**
32
104
  * MCOM Media (site 3): agency-intake extras beyond the standard columns.
33
- * `service` is provisional — it may move to `enquiry_type` once the site-3
34
- * enquiry-type mapping is defined.
105
+ *
106
+ * The site's "Service Interested" dropdown is the standard `enquiry_type`
107
+ * column (see {@link CONTACT_FORM_ENQUIRY_TYPE_BY_SITE}), not a form_data field,
108
+ * so it no longer appears here.
35
109
  */
36
110
  export interface McomMediaContactFormData {
37
111
  company_name?: string;
@@ -40,7 +114,6 @@ export interface McomMediaContactFormData {
40
114
  website?: string;
41
115
  country?: string;
42
116
  budget?: string;
43
- service?: string;
44
117
  timeline?: string;
45
118
  }
46
119