capivara-solidaria-ts-sdk 1.0.6 → 1.0.7
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/enums/index.d.mts +71 -1
- package/dist/enums/index.d.ts +71 -1
- package/dist/enums/index.js +156 -1
- package/dist/enums/index.js.map +1 -1
- package/dist/enums/index.mjs +135 -1
- package/dist/enums/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +156 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +135 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/enums/index.d.mts
CHANGED
|
@@ -1178,4 +1178,74 @@ declare const PAGE_TEMPLATES: {
|
|
|
1178
1178
|
};
|
|
1179
1179
|
};
|
|
1180
1180
|
|
|
1181
|
-
|
|
1181
|
+
declare const CampaignGoalType: {
|
|
1182
|
+
readonly money: "money";
|
|
1183
|
+
readonly items: "items";
|
|
1184
|
+
readonly volunteers: "volunteers";
|
|
1185
|
+
readonly signatures: "signatures";
|
|
1186
|
+
readonly other: "other";
|
|
1187
|
+
};
|
|
1188
|
+
type CampaignGoalType = (typeof CampaignGoalType)[keyof typeof CampaignGoalType];
|
|
1189
|
+
declare const isCampaignGoalType: (value: unknown) => value is CampaignGoalType;
|
|
1190
|
+
declare const CAMPAIGN_GOAL_TYPE_LABELS: readonly ["Financeiro", "Itens", "Voluntários", "Abaixo-assinado", "Outro"];
|
|
1191
|
+
type CampaignGoalTypeLabel = (typeof CAMPAIGN_GOAL_TYPE_LABELS)[number];
|
|
1192
|
+
declare const isCampaignGoalTypeLabel: (value: unknown) => value is CampaignGoalTypeLabel;
|
|
1193
|
+
declare const CAMPAIGN_GOAL_TYPE_TO_LABEL: {
|
|
1194
|
+
readonly money: "Financeiro";
|
|
1195
|
+
readonly items: "Itens";
|
|
1196
|
+
readonly volunteers: "Voluntários";
|
|
1197
|
+
readonly signatures: "Abaixo-assinado";
|
|
1198
|
+
readonly other: "Outro";
|
|
1199
|
+
};
|
|
1200
|
+
declare const toCampaignGoalType: (value: string) => CampaignGoalType | undefined;
|
|
1201
|
+
declare const toCampaignGoalTypeLabel: (value: CampaignGoalType) => CampaignGoalTypeLabel;
|
|
1202
|
+
|
|
1203
|
+
declare const CampaignStatus: {
|
|
1204
|
+
readonly draft: "draft";
|
|
1205
|
+
readonly published: "published";
|
|
1206
|
+
readonly active: "active";
|
|
1207
|
+
readonly paused: "paused";
|
|
1208
|
+
readonly finished: "finished";
|
|
1209
|
+
readonly cancelled: "cancelled";
|
|
1210
|
+
};
|
|
1211
|
+
type CampaignStatus = (typeof CampaignStatus)[keyof typeof CampaignStatus];
|
|
1212
|
+
declare const isCampaignStatus: (value: unknown) => value is CampaignStatus;
|
|
1213
|
+
declare const CAMPAIGN_STATUS_LABELS: readonly ["Rascunho", "Publicado", "Ativa", "Pausada", "Finalizada", "Cancelado"];
|
|
1214
|
+
type CampaignStatusLabel = (typeof CAMPAIGN_STATUS_LABELS)[number];
|
|
1215
|
+
declare const isCampaignStatusLabel: (value: unknown) => value is CampaignStatusLabel;
|
|
1216
|
+
declare const CAMPAIGN_STATUS_TO_LABEL: {
|
|
1217
|
+
readonly draft: "Rascunho";
|
|
1218
|
+
readonly published: "Publicado";
|
|
1219
|
+
readonly active: "Ativa";
|
|
1220
|
+
readonly paused: "Pausada";
|
|
1221
|
+
readonly finished: "Finalizada";
|
|
1222
|
+
readonly cancelled: "Cancelado";
|
|
1223
|
+
};
|
|
1224
|
+
declare const toCampaignStatus: (value: string) => CampaignStatus | undefined;
|
|
1225
|
+
declare const toCampaignStatusLabel: (value: CampaignStatus) => CampaignStatusLabel;
|
|
1226
|
+
|
|
1227
|
+
declare const CampaignType: {
|
|
1228
|
+
readonly donation: "donation";
|
|
1229
|
+
readonly volunteering: "volunteering";
|
|
1230
|
+
readonly event: "event";
|
|
1231
|
+
readonly awareness: "awareness";
|
|
1232
|
+
readonly project: "project";
|
|
1233
|
+
readonly other: "other";
|
|
1234
|
+
};
|
|
1235
|
+
type CampaignType = (typeof CampaignType)[keyof typeof CampaignType];
|
|
1236
|
+
declare const isCampaignType: (value: unknown) => value is CampaignType;
|
|
1237
|
+
declare const CAMPAIGN_TYPE_LABELS: readonly ["Doação", "Voluntariado", "Evento", "Conscientização", "Projeto", "Outro"];
|
|
1238
|
+
type CampaignTypeLabel = (typeof CAMPAIGN_TYPE_LABELS)[number];
|
|
1239
|
+
declare const isCampaignTypeLabel: (value: unknown) => value is CampaignTypeLabel;
|
|
1240
|
+
declare const CAMPAIGN_TYPE_TO_LABEL: {
|
|
1241
|
+
readonly donation: "Doação";
|
|
1242
|
+
readonly volunteering: "Voluntariado";
|
|
1243
|
+
readonly event: "Evento";
|
|
1244
|
+
readonly awareness: "Conscientização";
|
|
1245
|
+
readonly project: "Projeto";
|
|
1246
|
+
readonly other: "Outro";
|
|
1247
|
+
};
|
|
1248
|
+
declare const toCampaignType: (value: string) => CampaignType | undefined;
|
|
1249
|
+
declare const toCampaignTypeLabel: (value: CampaignType) => CampaignTypeLabel;
|
|
1250
|
+
|
|
1251
|
+
export { ACCESS_TOKEN_EXPIRES_MILLISECONDS, ACCESS_TOKEN_EXPIRES_MINUTES, ACCESS_TOKEN_EXPIRES_SECONDS, CAMPAIGN_GOAL_TYPE_LABELS, CAMPAIGN_GOAL_TYPE_TO_LABEL, CAMPAIGN_STATUS_LABELS, CAMPAIGN_STATUS_TO_LABEL, CAMPAIGN_TYPE_LABELS, CAMPAIGN_TYPE_TO_LABEL, CIDADES_BRASIL, CampaignGoalType, type CampaignGoalTypeLabel, CampaignStatus, type CampaignStatusLabel, CampaignType, type CampaignTypeLabel, DEFAULT_TEMPLATES_ORDER, DEFAULT_TEMPLATE_COLORS, DEFAULT_TEMPLATE_COLOR_PALLETES, HEADERS, HUBSPOT_ONG_VALUES, type HubspotOngValue, MAX_STREAM_DURATION, ONG_CATEGORY_TO_HUBSPOT, OngCategory, PAGE_TEMPLATES, PRIMARY_TEMPLATE_DEFAULT_COPIES, QUATERNARY_TEMPLATE_DEFAULT_COPIES, SECONDARY_TEMPLATE_DEFAULT_COPIES, TEMPLATE_TYPES, TERTIARY_TEMPLATE_DEFAULT_COPIES, type TemplateType, isCampaignGoalType, isCampaignGoalTypeLabel, isCampaignStatus, isCampaignStatusLabel, isCampaignType, isCampaignTypeLabel, isHubspotOngValue, isOngCategory, toCampaignGoalType, toCampaignGoalTypeLabel, toCampaignStatus, toCampaignStatusLabel, toCampaignType, toCampaignTypeLabel, toHubspotOngValue, toOngCategory };
|
package/dist/enums/index.d.ts
CHANGED
|
@@ -1178,4 +1178,74 @@ declare const PAGE_TEMPLATES: {
|
|
|
1178
1178
|
};
|
|
1179
1179
|
};
|
|
1180
1180
|
|
|
1181
|
-
|
|
1181
|
+
declare const CampaignGoalType: {
|
|
1182
|
+
readonly money: "money";
|
|
1183
|
+
readonly items: "items";
|
|
1184
|
+
readonly volunteers: "volunteers";
|
|
1185
|
+
readonly signatures: "signatures";
|
|
1186
|
+
readonly other: "other";
|
|
1187
|
+
};
|
|
1188
|
+
type CampaignGoalType = (typeof CampaignGoalType)[keyof typeof CampaignGoalType];
|
|
1189
|
+
declare const isCampaignGoalType: (value: unknown) => value is CampaignGoalType;
|
|
1190
|
+
declare const CAMPAIGN_GOAL_TYPE_LABELS: readonly ["Financeiro", "Itens", "Voluntários", "Abaixo-assinado", "Outro"];
|
|
1191
|
+
type CampaignGoalTypeLabel = (typeof CAMPAIGN_GOAL_TYPE_LABELS)[number];
|
|
1192
|
+
declare const isCampaignGoalTypeLabel: (value: unknown) => value is CampaignGoalTypeLabel;
|
|
1193
|
+
declare const CAMPAIGN_GOAL_TYPE_TO_LABEL: {
|
|
1194
|
+
readonly money: "Financeiro";
|
|
1195
|
+
readonly items: "Itens";
|
|
1196
|
+
readonly volunteers: "Voluntários";
|
|
1197
|
+
readonly signatures: "Abaixo-assinado";
|
|
1198
|
+
readonly other: "Outro";
|
|
1199
|
+
};
|
|
1200
|
+
declare const toCampaignGoalType: (value: string) => CampaignGoalType | undefined;
|
|
1201
|
+
declare const toCampaignGoalTypeLabel: (value: CampaignGoalType) => CampaignGoalTypeLabel;
|
|
1202
|
+
|
|
1203
|
+
declare const CampaignStatus: {
|
|
1204
|
+
readonly draft: "draft";
|
|
1205
|
+
readonly published: "published";
|
|
1206
|
+
readonly active: "active";
|
|
1207
|
+
readonly paused: "paused";
|
|
1208
|
+
readonly finished: "finished";
|
|
1209
|
+
readonly cancelled: "cancelled";
|
|
1210
|
+
};
|
|
1211
|
+
type CampaignStatus = (typeof CampaignStatus)[keyof typeof CampaignStatus];
|
|
1212
|
+
declare const isCampaignStatus: (value: unknown) => value is CampaignStatus;
|
|
1213
|
+
declare const CAMPAIGN_STATUS_LABELS: readonly ["Rascunho", "Publicado", "Ativa", "Pausada", "Finalizada", "Cancelado"];
|
|
1214
|
+
type CampaignStatusLabel = (typeof CAMPAIGN_STATUS_LABELS)[number];
|
|
1215
|
+
declare const isCampaignStatusLabel: (value: unknown) => value is CampaignStatusLabel;
|
|
1216
|
+
declare const CAMPAIGN_STATUS_TO_LABEL: {
|
|
1217
|
+
readonly draft: "Rascunho";
|
|
1218
|
+
readonly published: "Publicado";
|
|
1219
|
+
readonly active: "Ativa";
|
|
1220
|
+
readonly paused: "Pausada";
|
|
1221
|
+
readonly finished: "Finalizada";
|
|
1222
|
+
readonly cancelled: "Cancelado";
|
|
1223
|
+
};
|
|
1224
|
+
declare const toCampaignStatus: (value: string) => CampaignStatus | undefined;
|
|
1225
|
+
declare const toCampaignStatusLabel: (value: CampaignStatus) => CampaignStatusLabel;
|
|
1226
|
+
|
|
1227
|
+
declare const CampaignType: {
|
|
1228
|
+
readonly donation: "donation";
|
|
1229
|
+
readonly volunteering: "volunteering";
|
|
1230
|
+
readonly event: "event";
|
|
1231
|
+
readonly awareness: "awareness";
|
|
1232
|
+
readonly project: "project";
|
|
1233
|
+
readonly other: "other";
|
|
1234
|
+
};
|
|
1235
|
+
type CampaignType = (typeof CampaignType)[keyof typeof CampaignType];
|
|
1236
|
+
declare const isCampaignType: (value: unknown) => value is CampaignType;
|
|
1237
|
+
declare const CAMPAIGN_TYPE_LABELS: readonly ["Doação", "Voluntariado", "Evento", "Conscientização", "Projeto", "Outro"];
|
|
1238
|
+
type CampaignTypeLabel = (typeof CAMPAIGN_TYPE_LABELS)[number];
|
|
1239
|
+
declare const isCampaignTypeLabel: (value: unknown) => value is CampaignTypeLabel;
|
|
1240
|
+
declare const CAMPAIGN_TYPE_TO_LABEL: {
|
|
1241
|
+
readonly donation: "Doação";
|
|
1242
|
+
readonly volunteering: "Voluntariado";
|
|
1243
|
+
readonly event: "Evento";
|
|
1244
|
+
readonly awareness: "Conscientização";
|
|
1245
|
+
readonly project: "Projeto";
|
|
1246
|
+
readonly other: "Outro";
|
|
1247
|
+
};
|
|
1248
|
+
declare const toCampaignType: (value: string) => CampaignType | undefined;
|
|
1249
|
+
declare const toCampaignTypeLabel: (value: CampaignType) => CampaignTypeLabel;
|
|
1250
|
+
|
|
1251
|
+
export { ACCESS_TOKEN_EXPIRES_MILLISECONDS, ACCESS_TOKEN_EXPIRES_MINUTES, ACCESS_TOKEN_EXPIRES_SECONDS, CAMPAIGN_GOAL_TYPE_LABELS, CAMPAIGN_GOAL_TYPE_TO_LABEL, CAMPAIGN_STATUS_LABELS, CAMPAIGN_STATUS_TO_LABEL, CAMPAIGN_TYPE_LABELS, CAMPAIGN_TYPE_TO_LABEL, CIDADES_BRASIL, CampaignGoalType, type CampaignGoalTypeLabel, CampaignStatus, type CampaignStatusLabel, CampaignType, type CampaignTypeLabel, DEFAULT_TEMPLATES_ORDER, DEFAULT_TEMPLATE_COLORS, DEFAULT_TEMPLATE_COLOR_PALLETES, HEADERS, HUBSPOT_ONG_VALUES, type HubspotOngValue, MAX_STREAM_DURATION, ONG_CATEGORY_TO_HUBSPOT, OngCategory, PAGE_TEMPLATES, PRIMARY_TEMPLATE_DEFAULT_COPIES, QUATERNARY_TEMPLATE_DEFAULT_COPIES, SECONDARY_TEMPLATE_DEFAULT_COPIES, TEMPLATE_TYPES, TERTIARY_TEMPLATE_DEFAULT_COPIES, type TemplateType, isCampaignGoalType, isCampaignGoalTypeLabel, isCampaignStatus, isCampaignStatusLabel, isCampaignType, isCampaignTypeLabel, isHubspotOngValue, isOngCategory, toCampaignGoalType, toCampaignGoalTypeLabel, toCampaignStatus, toCampaignStatusLabel, toCampaignType, toCampaignTypeLabel, toHubspotOngValue, toOngCategory };
|
package/dist/enums/index.js
CHANGED
|
@@ -23,7 +23,16 @@ __export(enums_exports, {
|
|
|
23
23
|
ACCESS_TOKEN_EXPIRES_MILLISECONDS: () => ACCESS_TOKEN_EXPIRES_MILLISECONDS,
|
|
24
24
|
ACCESS_TOKEN_EXPIRES_MINUTES: () => ACCESS_TOKEN_EXPIRES_MINUTES,
|
|
25
25
|
ACCESS_TOKEN_EXPIRES_SECONDS: () => ACCESS_TOKEN_EXPIRES_SECONDS,
|
|
26
|
+
CAMPAIGN_GOAL_TYPE_LABELS: () => CAMPAIGN_GOAL_TYPE_LABELS,
|
|
27
|
+
CAMPAIGN_GOAL_TYPE_TO_LABEL: () => CAMPAIGN_GOAL_TYPE_TO_LABEL,
|
|
28
|
+
CAMPAIGN_STATUS_LABELS: () => CAMPAIGN_STATUS_LABELS,
|
|
29
|
+
CAMPAIGN_STATUS_TO_LABEL: () => CAMPAIGN_STATUS_TO_LABEL,
|
|
30
|
+
CAMPAIGN_TYPE_LABELS: () => CAMPAIGN_TYPE_LABELS,
|
|
31
|
+
CAMPAIGN_TYPE_TO_LABEL: () => CAMPAIGN_TYPE_TO_LABEL,
|
|
26
32
|
CIDADES_BRASIL: () => CIDADES_BRASIL,
|
|
33
|
+
CampaignGoalType: () => CampaignGoalType,
|
|
34
|
+
CampaignStatus: () => CampaignStatus,
|
|
35
|
+
CampaignType: () => CampaignType,
|
|
27
36
|
DEFAULT_TEMPLATES_ORDER: () => DEFAULT_TEMPLATES_ORDER,
|
|
28
37
|
DEFAULT_TEMPLATE_COLORS: () => DEFAULT_TEMPLATE_COLORS,
|
|
29
38
|
DEFAULT_TEMPLATE_COLOR_PALLETES: () => DEFAULT_TEMPLATE_COLOR_PALLETES,
|
|
@@ -38,8 +47,20 @@ __export(enums_exports, {
|
|
|
38
47
|
SECONDARY_TEMPLATE_DEFAULT_COPIES: () => SECONDARY_TEMPLATE_DEFAULT_COPIES,
|
|
39
48
|
TEMPLATE_TYPES: () => TEMPLATE_TYPES,
|
|
40
49
|
TERTIARY_TEMPLATE_DEFAULT_COPIES: () => TERTIARY_TEMPLATE_DEFAULT_COPIES,
|
|
50
|
+
isCampaignGoalType: () => isCampaignGoalType,
|
|
51
|
+
isCampaignGoalTypeLabel: () => isCampaignGoalTypeLabel,
|
|
52
|
+
isCampaignStatus: () => isCampaignStatus,
|
|
53
|
+
isCampaignStatusLabel: () => isCampaignStatusLabel,
|
|
54
|
+
isCampaignType: () => isCampaignType,
|
|
55
|
+
isCampaignTypeLabel: () => isCampaignTypeLabel,
|
|
41
56
|
isHubspotOngValue: () => isHubspotOngValue,
|
|
42
57
|
isOngCategory: () => isOngCategory,
|
|
58
|
+
toCampaignGoalType: () => toCampaignGoalType,
|
|
59
|
+
toCampaignGoalTypeLabel: () => toCampaignGoalTypeLabel,
|
|
60
|
+
toCampaignStatus: () => toCampaignStatus,
|
|
61
|
+
toCampaignStatusLabel: () => toCampaignStatusLabel,
|
|
62
|
+
toCampaignType: () => toCampaignType,
|
|
63
|
+
toCampaignTypeLabel: () => toCampaignTypeLabel,
|
|
43
64
|
toHubspotOngValue: () => toHubspotOngValue,
|
|
44
65
|
toOngCategory: () => toOngCategory
|
|
45
66
|
});
|
|
@@ -5988,7 +6009,12 @@ var DEFAULT_TEMPLATES_ORDER = {
|
|
|
5988
6009
|
};
|
|
5989
6010
|
|
|
5990
6011
|
// src/enums/templates/template-type/index.ts
|
|
5991
|
-
var TEMPLATE_TYPES = [
|
|
6012
|
+
var TEMPLATE_TYPES = [
|
|
6013
|
+
"primary",
|
|
6014
|
+
"secondary",
|
|
6015
|
+
"tertiary",
|
|
6016
|
+
"quarternary"
|
|
6017
|
+
];
|
|
5992
6018
|
|
|
5993
6019
|
// src/enums/templates/default-template-copies/index.ts
|
|
5994
6020
|
var PRIMARY_TEMPLATE_DEFAULT_COPIES = {
|
|
@@ -6575,12 +6601,129 @@ var PAGE_TEMPLATES = {
|
|
|
6575
6601
|
tertiary: TERTIARY_TEMPLATE_DEFAULT_COPIES,
|
|
6576
6602
|
quarternary: QUATERNARY_TEMPLATE_DEFAULT_COPIES
|
|
6577
6603
|
};
|
|
6604
|
+
|
|
6605
|
+
// src/enums/campaigns/campaign-goal-type/index.ts
|
|
6606
|
+
var CampaignGoalType = {
|
|
6607
|
+
money: "money",
|
|
6608
|
+
items: "items",
|
|
6609
|
+
volunteers: "volunteers",
|
|
6610
|
+
signatures: "signatures",
|
|
6611
|
+
other: "other"
|
|
6612
|
+
};
|
|
6613
|
+
var isCampaignGoalType = (value) => typeof value === "string" && Object.values(CampaignGoalType).includes(value);
|
|
6614
|
+
var CAMPAIGN_GOAL_TYPE_LABELS = [
|
|
6615
|
+
"Financeiro",
|
|
6616
|
+
"Itens",
|
|
6617
|
+
"Volunt\xE1rios",
|
|
6618
|
+
"Abaixo-assinado",
|
|
6619
|
+
"Outro"
|
|
6620
|
+
];
|
|
6621
|
+
var isCampaignGoalTypeLabel = (value) => typeof value === "string" && CAMPAIGN_GOAL_TYPE_LABELS.includes(value);
|
|
6622
|
+
var CAMPAIGN_GOAL_TYPE_TO_LABEL = {
|
|
6623
|
+
money: "Financeiro",
|
|
6624
|
+
items: "Itens",
|
|
6625
|
+
volunteers: "Volunt\xE1rios",
|
|
6626
|
+
signatures: "Abaixo-assinado",
|
|
6627
|
+
other: "Outro"
|
|
6628
|
+
};
|
|
6629
|
+
var LABEL_TO_CAMPAIGN_GOAL_TYPE = Object.fromEntries(
|
|
6630
|
+
Object.entries(CAMPAIGN_GOAL_TYPE_TO_LABEL).map(([k, v]) => [v, k])
|
|
6631
|
+
);
|
|
6632
|
+
var toCampaignGoalType = (value) => {
|
|
6633
|
+
if (isCampaignGoalType(value)) return value;
|
|
6634
|
+
if (isCampaignGoalTypeLabel(value)) return LABEL_TO_CAMPAIGN_GOAL_TYPE[value];
|
|
6635
|
+
return void 0;
|
|
6636
|
+
};
|
|
6637
|
+
var toCampaignGoalTypeLabel = (value) => CAMPAIGN_GOAL_TYPE_TO_LABEL[value];
|
|
6638
|
+
|
|
6639
|
+
// src/enums/campaigns/campaign-status/index.ts
|
|
6640
|
+
var CampaignStatus = {
|
|
6641
|
+
draft: "draft",
|
|
6642
|
+
published: "published",
|
|
6643
|
+
active: "active",
|
|
6644
|
+
paused: "paused",
|
|
6645
|
+
finished: "finished",
|
|
6646
|
+
cancelled: "cancelled"
|
|
6647
|
+
};
|
|
6648
|
+
var isCampaignStatus = (value) => typeof value === "string" && Object.values(CampaignStatus).includes(value);
|
|
6649
|
+
var CAMPAIGN_STATUS_LABELS = [
|
|
6650
|
+
"Rascunho",
|
|
6651
|
+
"Publicado",
|
|
6652
|
+
"Ativa",
|
|
6653
|
+
"Pausada",
|
|
6654
|
+
"Finalizada",
|
|
6655
|
+
"Cancelado"
|
|
6656
|
+
];
|
|
6657
|
+
var isCampaignStatusLabel = (value) => typeof value === "string" && CAMPAIGN_STATUS_LABELS.includes(value);
|
|
6658
|
+
var CAMPAIGN_STATUS_TO_LABEL = {
|
|
6659
|
+
draft: "Rascunho",
|
|
6660
|
+
published: "Publicado",
|
|
6661
|
+
active: "Ativa",
|
|
6662
|
+
paused: "Pausada",
|
|
6663
|
+
finished: "Finalizada",
|
|
6664
|
+
cancelled: "Cancelado"
|
|
6665
|
+
};
|
|
6666
|
+
var LABEL_TO_CAMPAIGN_STATUS = Object.fromEntries(
|
|
6667
|
+
Object.entries(CAMPAIGN_STATUS_TO_LABEL).map(([k, v]) => [v, k])
|
|
6668
|
+
);
|
|
6669
|
+
var toCampaignStatus = (value) => {
|
|
6670
|
+
if (isCampaignStatus(value)) return value;
|
|
6671
|
+
if (isCampaignStatusLabel(value)) return LABEL_TO_CAMPAIGN_STATUS[value];
|
|
6672
|
+
return void 0;
|
|
6673
|
+
};
|
|
6674
|
+
var toCampaignStatusLabel = (value) => CAMPAIGN_STATUS_TO_LABEL[value];
|
|
6675
|
+
|
|
6676
|
+
// src/enums/campaigns/campaign-type/index.ts
|
|
6677
|
+
var CampaignType = {
|
|
6678
|
+
donation: "donation",
|
|
6679
|
+
volunteering: "volunteering",
|
|
6680
|
+
event: "event",
|
|
6681
|
+
awareness: "awareness",
|
|
6682
|
+
project: "project",
|
|
6683
|
+
other: "other"
|
|
6684
|
+
};
|
|
6685
|
+
var isCampaignType = (value) => typeof value === "string" && Object.values(CampaignType).includes(value);
|
|
6686
|
+
var CAMPAIGN_TYPE_LABELS = [
|
|
6687
|
+
"Doa\xE7\xE3o",
|
|
6688
|
+
"Voluntariado",
|
|
6689
|
+
"Evento",
|
|
6690
|
+
"Conscientiza\xE7\xE3o",
|
|
6691
|
+
"Projeto",
|
|
6692
|
+
"Outro"
|
|
6693
|
+
];
|
|
6694
|
+
var isCampaignTypeLabel = (value) => typeof value === "string" && CAMPAIGN_TYPE_LABELS.includes(value);
|
|
6695
|
+
var CAMPAIGN_TYPE_TO_LABEL = {
|
|
6696
|
+
donation: "Doa\xE7\xE3o",
|
|
6697
|
+
volunteering: "Voluntariado",
|
|
6698
|
+
event: "Evento",
|
|
6699
|
+
awareness: "Conscientiza\xE7\xE3o",
|
|
6700
|
+
project: "Projeto",
|
|
6701
|
+
other: "Outro"
|
|
6702
|
+
};
|
|
6703
|
+
var LABEL_TO_CAMPAIGN_TYPE = Object.fromEntries(
|
|
6704
|
+
Object.entries(CAMPAIGN_TYPE_TO_LABEL).map(([k, v]) => [v, k])
|
|
6705
|
+
);
|
|
6706
|
+
var toCampaignType = (value) => {
|
|
6707
|
+
if (isCampaignType(value)) return value;
|
|
6708
|
+
if (isCampaignTypeLabel(value)) return LABEL_TO_CAMPAIGN_TYPE[value];
|
|
6709
|
+
return void 0;
|
|
6710
|
+
};
|
|
6711
|
+
var toCampaignTypeLabel = (value) => CAMPAIGN_TYPE_TO_LABEL[value];
|
|
6578
6712
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6579
6713
|
0 && (module.exports = {
|
|
6580
6714
|
ACCESS_TOKEN_EXPIRES_MILLISECONDS,
|
|
6581
6715
|
ACCESS_TOKEN_EXPIRES_MINUTES,
|
|
6582
6716
|
ACCESS_TOKEN_EXPIRES_SECONDS,
|
|
6717
|
+
CAMPAIGN_GOAL_TYPE_LABELS,
|
|
6718
|
+
CAMPAIGN_GOAL_TYPE_TO_LABEL,
|
|
6719
|
+
CAMPAIGN_STATUS_LABELS,
|
|
6720
|
+
CAMPAIGN_STATUS_TO_LABEL,
|
|
6721
|
+
CAMPAIGN_TYPE_LABELS,
|
|
6722
|
+
CAMPAIGN_TYPE_TO_LABEL,
|
|
6583
6723
|
CIDADES_BRASIL,
|
|
6724
|
+
CampaignGoalType,
|
|
6725
|
+
CampaignStatus,
|
|
6726
|
+
CampaignType,
|
|
6584
6727
|
DEFAULT_TEMPLATES_ORDER,
|
|
6585
6728
|
DEFAULT_TEMPLATE_COLORS,
|
|
6586
6729
|
DEFAULT_TEMPLATE_COLOR_PALLETES,
|
|
@@ -6595,8 +6738,20 @@ var PAGE_TEMPLATES = {
|
|
|
6595
6738
|
SECONDARY_TEMPLATE_DEFAULT_COPIES,
|
|
6596
6739
|
TEMPLATE_TYPES,
|
|
6597
6740
|
TERTIARY_TEMPLATE_DEFAULT_COPIES,
|
|
6741
|
+
isCampaignGoalType,
|
|
6742
|
+
isCampaignGoalTypeLabel,
|
|
6743
|
+
isCampaignStatus,
|
|
6744
|
+
isCampaignStatusLabel,
|
|
6745
|
+
isCampaignType,
|
|
6746
|
+
isCampaignTypeLabel,
|
|
6598
6747
|
isHubspotOngValue,
|
|
6599
6748
|
isOngCategory,
|
|
6749
|
+
toCampaignGoalType,
|
|
6750
|
+
toCampaignGoalTypeLabel,
|
|
6751
|
+
toCampaignStatus,
|
|
6752
|
+
toCampaignStatusLabel,
|
|
6753
|
+
toCampaignType,
|
|
6754
|
+
toCampaignTypeLabel,
|
|
6600
6755
|
toHubspotOngValue,
|
|
6601
6756
|
toOngCategory
|
|
6602
6757
|
});
|