@talkplay/shared-types 1.0.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/dist/index.d.mts +710 -0
- package/dist/index.d.ts +710 -0
- package/dist/index.js +264 -0
- package/dist/index.mjs +216 -0
- package/package.json +30 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,710 @@
|
|
|
1
|
+
type Enum<T extends Record<PropertyKey, string | number>> = T[keyof T];
|
|
2
|
+
|
|
3
|
+
declare const BrStatesEnum: {
|
|
4
|
+
readonly AC: "AC";
|
|
5
|
+
readonly AL: "AL";
|
|
6
|
+
readonly AP: "AP";
|
|
7
|
+
readonly AM: "AM";
|
|
8
|
+
readonly BA: "BA";
|
|
9
|
+
readonly CE: "CE";
|
|
10
|
+
readonly DF: "DF";
|
|
11
|
+
readonly ES: "ES";
|
|
12
|
+
readonly GO: "GO";
|
|
13
|
+
readonly MA: "MA";
|
|
14
|
+
readonly MT: "MT";
|
|
15
|
+
readonly MS: "MS";
|
|
16
|
+
readonly MG: "MG";
|
|
17
|
+
readonly PA: "PA";
|
|
18
|
+
readonly PB: "PB";
|
|
19
|
+
readonly PR: "PR";
|
|
20
|
+
readonly PE: "PE";
|
|
21
|
+
readonly PI: "PI";
|
|
22
|
+
readonly RJ: "RJ";
|
|
23
|
+
readonly RN: "RN";
|
|
24
|
+
readonly RS: "RS";
|
|
25
|
+
readonly RO: "RO";
|
|
26
|
+
readonly RR: "RR";
|
|
27
|
+
readonly SC: "SC";
|
|
28
|
+
readonly SP: "SP";
|
|
29
|
+
readonly SE: "SE";
|
|
30
|
+
readonly TO: "TO";
|
|
31
|
+
};
|
|
32
|
+
type BrStatesEnum = Enum<typeof BrStatesEnum>;
|
|
33
|
+
|
|
34
|
+
declare const JobsEnum: {
|
|
35
|
+
readonly GENERATE_EP_BLOCK: "generate-episode-block";
|
|
36
|
+
};
|
|
37
|
+
type JobsEnum = Enum<typeof JobsEnum>;
|
|
38
|
+
|
|
39
|
+
declare const SessionTypesEnum: {
|
|
40
|
+
readonly RADIO_USER: "RADIO_USER";
|
|
41
|
+
readonly SYSTEM_USER: "SYSTEM_USER";
|
|
42
|
+
};
|
|
43
|
+
type SessionTypesEnum = Enum<typeof SessionTypesEnum>;
|
|
44
|
+
|
|
45
|
+
declare const S3DirectoriesEnum: {
|
|
46
|
+
readonly MUSICS: "musics";
|
|
47
|
+
readonly VIGNETTES: "vignettes";
|
|
48
|
+
readonly SOUNDTRACKS: "soundtracks";
|
|
49
|
+
readonly OFFS: "offs";
|
|
50
|
+
readonly NEWS: "news";
|
|
51
|
+
};
|
|
52
|
+
type S3DirectoriesEnum = Enum<typeof S3DirectoriesEnum>;
|
|
53
|
+
|
|
54
|
+
declare const ChargeItemTypesEnum: {
|
|
55
|
+
readonly MODULE: "MODULE";
|
|
56
|
+
readonly PROGRAM: "PROGRAM";
|
|
57
|
+
readonly OTHER: "OTHER";
|
|
58
|
+
};
|
|
59
|
+
type ChargeItemTypesEnum = Enum<typeof ChargeItemTypesEnum>;
|
|
60
|
+
|
|
61
|
+
declare const ChargeStatusEnum: {
|
|
62
|
+
readonly PAID: "PAID";
|
|
63
|
+
readonly DELINQUENT: "DELINQUENT";
|
|
64
|
+
};
|
|
65
|
+
type ChargeStatusEnum = Enum<typeof ChargeStatusEnum>;
|
|
66
|
+
|
|
67
|
+
declare const CouponTypesEnum: {
|
|
68
|
+
readonly VALUE_DISCOUNT: "VALUE_DISCOUNT";
|
|
69
|
+
readonly PERCENTAGE_DISCOUNT: "PERCENTAGE_DISCOUNT";
|
|
70
|
+
readonly TRIAL: "TRIAL";
|
|
71
|
+
};
|
|
72
|
+
type CouponTypesEnum = Enum<typeof CouponTypesEnum>;
|
|
73
|
+
declare const CouponTypesTranslationsEnum: {
|
|
74
|
+
readonly VALUE_DISCOUNT: "Valor fixo";
|
|
75
|
+
readonly PERCENTAGE_DISCOUNT: "Percentual";
|
|
76
|
+
readonly TRIAL: "Período de teste";
|
|
77
|
+
};
|
|
78
|
+
type CouponTypesTranslationsEnum = Enum<typeof CouponTypesTranslationsEnum>;
|
|
79
|
+
|
|
80
|
+
declare const RadioSubscriptionStatusEnum: {
|
|
81
|
+
readonly TRIAL: "TRIAL";
|
|
82
|
+
readonly ACTIVE: "ACTIVE";
|
|
83
|
+
readonly OVERDUE: "OVERDUE";
|
|
84
|
+
readonly DELINQUENT: "DELINQUENT";
|
|
85
|
+
readonly INACTIVE: "INACTIVE";
|
|
86
|
+
};
|
|
87
|
+
type RadioSubscriptionStatusEnum = Enum<typeof RadioSubscriptionStatusEnum>;
|
|
88
|
+
|
|
89
|
+
declare const EpGenerationQualityEnum: {
|
|
90
|
+
readonly DEFAULT: "DEFAULT";
|
|
91
|
+
readonly MASTERIZED: "MASTERIZED";
|
|
92
|
+
};
|
|
93
|
+
type EpGenerationQualityEnum = Enum<typeof EpGenerationQualityEnum>;
|
|
94
|
+
|
|
95
|
+
declare const EpGenerationTypesEnum: {
|
|
96
|
+
readonly MANUAL: "MANUAL";
|
|
97
|
+
readonly AUTOMATIC: "AUTOMATIC";
|
|
98
|
+
};
|
|
99
|
+
type EpGenerationTypesEnum = Enum<typeof EpGenerationTypesEnum>;
|
|
100
|
+
|
|
101
|
+
declare const NewsCategoriesEnum: {
|
|
102
|
+
readonly SPORTS: "SPORTS";
|
|
103
|
+
readonly GOSSIP: "GOSSIP";
|
|
104
|
+
readonly POLICY: "POLICY";
|
|
105
|
+
};
|
|
106
|
+
type NewsCategoriesEnum = Enum<typeof NewsCategoriesEnum>;
|
|
107
|
+
|
|
108
|
+
declare const ProgramScriptElementTypesEnum: {
|
|
109
|
+
readonly OFF: "OFF";
|
|
110
|
+
readonly NEWS: "NEWS";
|
|
111
|
+
readonly MUSIC: "MUSIC";
|
|
112
|
+
readonly VIGNETTE_BLOCK_IN: "VIGNETTE_BLOCK_IN";
|
|
113
|
+
readonly VIGNETTE_BLOCK_OUT: "VIGNETTE_BLOCK_OUT";
|
|
114
|
+
readonly VIGNETTE_PROGRAM_IN: "VIGNETTE_PROGRAM_IN";
|
|
115
|
+
readonly VIGNETTE_PROGRAM_OUT: "VIGNETTE_PROGRAM_OUT";
|
|
116
|
+
};
|
|
117
|
+
type ProgramScriptElementTypesEnum = Enum<typeof ProgramScriptElementTypesEnum>;
|
|
118
|
+
|
|
119
|
+
declare const LegalTermTypesEnum: {
|
|
120
|
+
readonly PLATFORM_USE: "PLATFORM_USE";
|
|
121
|
+
readonly COOKIES_POLICY: "COOKIES_POLICY";
|
|
122
|
+
readonly PRIVACY_POLICY: "PRIVACY_POLICY";
|
|
123
|
+
};
|
|
124
|
+
type LegalTermTypesEnum = Enum<typeof LegalTermTypesEnum>;
|
|
125
|
+
declare const LegalTermTypesTranslationsEnum: {
|
|
126
|
+
readonly PLATFORM_USE: "Termos de Uso";
|
|
127
|
+
readonly COOKIES_POLICY: "Política de Cookies";
|
|
128
|
+
readonly PRIVACY_POLICY: "Política de Privacidade";
|
|
129
|
+
};
|
|
130
|
+
type LegalTermTypesTranslationsEnum = Enum<typeof LegalTermTypesTranslationsEnum>;
|
|
131
|
+
|
|
132
|
+
declare const AudioBitratesEnum: {
|
|
133
|
+
readonly "32k": "32k";
|
|
134
|
+
readonly "48k": "48k";
|
|
135
|
+
readonly "64k": "64k";
|
|
136
|
+
readonly "96k": "96k";
|
|
137
|
+
readonly "128k": "128k";
|
|
138
|
+
readonly "160k": "160k";
|
|
139
|
+
readonly "192k": "192k";
|
|
140
|
+
readonly "256k": "256k";
|
|
141
|
+
readonly "320k": "320k";
|
|
142
|
+
};
|
|
143
|
+
type AudioBitratesEnum = Enum<typeof AudioBitratesEnum>;
|
|
144
|
+
|
|
145
|
+
declare const AudioFormatsEnum: {
|
|
146
|
+
readonly WAV: "wav";
|
|
147
|
+
readonly MP3: "mp3";
|
|
148
|
+
readonly FLAC: "flac";
|
|
149
|
+
};
|
|
150
|
+
type AudioFormatsEnum = Enum<typeof AudioFormatsEnum>;
|
|
151
|
+
|
|
152
|
+
declare const AudioFrequenciesEnum: {
|
|
153
|
+
readonly F_44100: "44100";
|
|
154
|
+
readonly F_48000: "48000";
|
|
155
|
+
};
|
|
156
|
+
type AudioFrequenciesEnum = Enum<typeof AudioFrequenciesEnum>;
|
|
157
|
+
|
|
158
|
+
declare const FFmpegAudioCurveEnum: {
|
|
159
|
+
readonly NOFADE: "nofade";
|
|
160
|
+
readonly TRI: "tri";
|
|
161
|
+
readonly QSIN: "qsin";
|
|
162
|
+
readonly HSIN: "hsin";
|
|
163
|
+
readonly ESIN: "esin";
|
|
164
|
+
readonly LOG: "log";
|
|
165
|
+
readonly IPAR: "ipar";
|
|
166
|
+
readonly QUA: "qua";
|
|
167
|
+
readonly CUB: "cub";
|
|
168
|
+
readonly SQU: "squ";
|
|
169
|
+
readonly CBR: "cbr";
|
|
170
|
+
readonly PAR: "par";
|
|
171
|
+
readonly EXP: "exp";
|
|
172
|
+
readonly IQSIN: "iqsin";
|
|
173
|
+
readonly IHSIN: "ihsin";
|
|
174
|
+
readonly DESE: "dese";
|
|
175
|
+
readonly DESI: "desi";
|
|
176
|
+
readonly LOSI: "losi";
|
|
177
|
+
readonly SINC: "sinc";
|
|
178
|
+
readonly ISINC: "isinc";
|
|
179
|
+
};
|
|
180
|
+
type FFmpegAudioCurveEnum = Enum<typeof FFmpegAudioCurveEnum>;
|
|
181
|
+
|
|
182
|
+
declare const RadioBandsEnum: {
|
|
183
|
+
readonly AM: "AM";
|
|
184
|
+
readonly FM: "FM";
|
|
185
|
+
};
|
|
186
|
+
type RadioBandsEnum = Enum<typeof RadioBandsEnum>;
|
|
187
|
+
|
|
188
|
+
declare const UserRolesEnum: {
|
|
189
|
+
readonly ADMIN: "ADMIN";
|
|
190
|
+
readonly STAFF: "STAFF";
|
|
191
|
+
};
|
|
192
|
+
type UserRolesEnum = Enum<typeof UserRolesEnum>;
|
|
193
|
+
declare const UserRolesTranslationsEnum: {
|
|
194
|
+
readonly ADMIN: "Administrador";
|
|
195
|
+
readonly STAFF: "Colaborador";
|
|
196
|
+
};
|
|
197
|
+
type UserRolesTranslationsEnum = Enum<typeof UserRolesTranslationsEnum>;
|
|
198
|
+
|
|
199
|
+
type DateString = string | Date;
|
|
200
|
+
|
|
201
|
+
type SessionUser = {
|
|
202
|
+
id: string;
|
|
203
|
+
name: string;
|
|
204
|
+
email: string;
|
|
205
|
+
role: UserRolesEnum;
|
|
206
|
+
avatarImg: string | null;
|
|
207
|
+
};
|
|
208
|
+
type SessionEntity = {
|
|
209
|
+
key: string;
|
|
210
|
+
ip: string;
|
|
211
|
+
type: SessionTypesEnum;
|
|
212
|
+
loginAt: Date;
|
|
213
|
+
expireAt: DateString;
|
|
214
|
+
socketId: string;
|
|
215
|
+
radioId: string | null;
|
|
216
|
+
user: SessionUser;
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
type BaseEntity = {
|
|
220
|
+
id: string;
|
|
221
|
+
createdAt: DateString;
|
|
222
|
+
updatedAt: DateString | null;
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
type CouponEntity = BaseEntity & {
|
|
226
|
+
code: string;
|
|
227
|
+
type: CouponTypesEnum;
|
|
228
|
+
discountValue: number;
|
|
229
|
+
benefitDurationDays: number;
|
|
230
|
+
validUntil: DateString | null;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
type CouponActivationEntity = BaseEntity & {
|
|
234
|
+
validUntil: DateString;
|
|
235
|
+
chargeId?: string;
|
|
236
|
+
charge?: ChargeEntity;
|
|
237
|
+
couponId: string;
|
|
238
|
+
coupon?: CouponEntity;
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
type AddressEntity = {
|
|
242
|
+
id: string;
|
|
243
|
+
country: string;
|
|
244
|
+
city: string;
|
|
245
|
+
state: BrStatesEnum;
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
type TkplayErrorEntity = {
|
|
249
|
+
httpCode: 400 | 401 | 402 | 404 | 500;
|
|
250
|
+
message: string;
|
|
251
|
+
name: "BadRequestError" | "NotFoundError" | "UnauthorizedError" | "ForbiddenError";
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
type RadioContractEntity = BaseEntity & {
|
|
255
|
+
validUntil: DateString;
|
|
256
|
+
isActive: boolean;
|
|
257
|
+
radioId: string;
|
|
258
|
+
radio?: RadioEntity;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
type ProgramEpisodeBlockEntity = BaseEntity & {
|
|
262
|
+
index: number;
|
|
263
|
+
episode?: ProgramEpisodeEntity;
|
|
264
|
+
episodeId: string;
|
|
265
|
+
file?: S3FileEntity;
|
|
266
|
+
fileId: string;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
type ProgramEpisodeEntity = BaseEntity & {
|
|
270
|
+
date: string;
|
|
271
|
+
program?: ProgramEntity;
|
|
272
|
+
programId: string;
|
|
273
|
+
generationType: EpGenerationTypesEnum;
|
|
274
|
+
quality: EpGenerationQualityEnum;
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
type PopulatedProgramScriptElement = {
|
|
278
|
+
type: ProgramScriptElementTypesEnum;
|
|
279
|
+
key: string;
|
|
280
|
+
options: ProgramScriptElementOptionsAll | null;
|
|
281
|
+
};
|
|
282
|
+
type PopulatedProgramScriptBlock = PopulatedProgramScriptElement[];
|
|
283
|
+
type PopulatedProgramScriptEntity = PopulatedProgramScriptBlock[];
|
|
284
|
+
|
|
285
|
+
type SoundtrackProgramScriptElementOptions = {
|
|
286
|
+
useSoundtrack: boolean;
|
|
287
|
+
soundtrackId?: string | null;
|
|
288
|
+
};
|
|
289
|
+
type NewsProgramScriptElementOptions = SoundtrackProgramScriptElementOptions & {
|
|
290
|
+
category: NewsCategoriesEnum;
|
|
291
|
+
};
|
|
292
|
+
type ProgramScriptElementOptionsAll = Partial<SoundtrackProgramScriptElementOptions & NewsProgramScriptElementOptions>;
|
|
293
|
+
interface BaseElement {
|
|
294
|
+
type: ProgramScriptElementTypesEnum;
|
|
295
|
+
options: ProgramScriptElementOptionsAll;
|
|
296
|
+
}
|
|
297
|
+
interface OffProgramScriptElement extends BaseElement {
|
|
298
|
+
type: "OFF";
|
|
299
|
+
options: ProgramScriptElementOptionsAll;
|
|
300
|
+
}
|
|
301
|
+
interface NewsProgramScriptElement {
|
|
302
|
+
type: "NEWS";
|
|
303
|
+
options: NewsProgramScriptElementOptions;
|
|
304
|
+
}
|
|
305
|
+
interface MusicProgramScriptElement {
|
|
306
|
+
type: "MUSIC";
|
|
307
|
+
options: null;
|
|
308
|
+
}
|
|
309
|
+
interface VignetteProgramScriptElement {
|
|
310
|
+
type: "VIGNETTE_BLOCK_IN" | "VIGNETTE_BLOCK_OUT" | "VIGNETTE_PROGRAM_IN" | "VIGNETTE_PROGRAM_OUT";
|
|
311
|
+
options: null;
|
|
312
|
+
}
|
|
313
|
+
type ProgramScriptElement = OffProgramScriptElement | NewsProgramScriptElement | VignetteProgramScriptElement | MusicProgramScriptElement;
|
|
314
|
+
type ScriptBlock = ProgramScriptElement[];
|
|
315
|
+
type ProgramScriptEntity = BaseEntity & {
|
|
316
|
+
name: string;
|
|
317
|
+
body: ScriptBlock[];
|
|
318
|
+
weekDay: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
319
|
+
programId: string;
|
|
320
|
+
program?: ProgramEntity;
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
type ProgramEntity = BaseEntity & {
|
|
324
|
+
name: string;
|
|
325
|
+
description: string;
|
|
326
|
+
radio?: RadioEntity;
|
|
327
|
+
radioId: string;
|
|
328
|
+
blockNamePrefix: string;
|
|
329
|
+
duration: number;
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
type CasterEntity = BaseEntity & {
|
|
333
|
+
name: string;
|
|
334
|
+
email: string;
|
|
335
|
+
password: string;
|
|
336
|
+
avatarImgId: string | null;
|
|
337
|
+
avatarImg?: S3FileEntity | null;
|
|
338
|
+
addressId: string;
|
|
339
|
+
address?: AddressEntity;
|
|
340
|
+
radios?: RadioEntity[];
|
|
341
|
+
programs?: ProgramEntity[];
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
type RadioUserEntity = BaseEntity & {
|
|
345
|
+
name: string;
|
|
346
|
+
email: string;
|
|
347
|
+
password: string;
|
|
348
|
+
birthDate: string;
|
|
349
|
+
role: UserRolesEnum;
|
|
350
|
+
avatarImgId: string | null;
|
|
351
|
+
avatarImg?: RadioUserAvatarEntity | null;
|
|
352
|
+
radioId: string;
|
|
353
|
+
radio?: RadioEntity;
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
type SystemUserEntity = BaseEntity & {
|
|
357
|
+
name: string;
|
|
358
|
+
email: string;
|
|
359
|
+
password: string;
|
|
360
|
+
role: UserRolesEnum;
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
type S3FileEntity = BaseEntity & {
|
|
364
|
+
key: string;
|
|
365
|
+
mimeType: string;
|
|
366
|
+
extension: string;
|
|
367
|
+
size: bigint;
|
|
368
|
+
radioId: string | null;
|
|
369
|
+
radio?: RadioEntity;
|
|
370
|
+
radioUserId: string | null;
|
|
371
|
+
radioUser: RadioUserEntity;
|
|
372
|
+
casterId: string | null;
|
|
373
|
+
caster?: CasterEntity;
|
|
374
|
+
};
|
|
375
|
+
type RadioUserAvatarEntity = Omit<S3FileEntity, "radioId" | "casterId"> & {
|
|
376
|
+
kind: "radioUser";
|
|
377
|
+
radioUserId: string;
|
|
378
|
+
radioId: null;
|
|
379
|
+
casterId: null;
|
|
380
|
+
radio: never;
|
|
381
|
+
caster: never;
|
|
382
|
+
};
|
|
383
|
+
type CasterAvatarEntity = Omit<S3FileEntity, "radioId" | "radioUserId"> & {
|
|
384
|
+
kind: "caster";
|
|
385
|
+
casterId: string;
|
|
386
|
+
radioId: null;
|
|
387
|
+
radioUserId: null;
|
|
388
|
+
user: never;
|
|
389
|
+
radio: never;
|
|
390
|
+
};
|
|
391
|
+
type RadioLogoEntity = Omit<S3FileEntity, "casterId" | "radioUserId"> & {
|
|
392
|
+
kind: "radioLogo";
|
|
393
|
+
radioId: string;
|
|
394
|
+
radioUserId: null;
|
|
395
|
+
casterId: null;
|
|
396
|
+
radioUser: never;
|
|
397
|
+
caster: never;
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
type RadioEntity = BaseEntity & {
|
|
401
|
+
name: string;
|
|
402
|
+
fantasyName: string;
|
|
403
|
+
slug: string;
|
|
404
|
+
cnpj: string;
|
|
405
|
+
slogan: string;
|
|
406
|
+
prefix: string;
|
|
407
|
+
frequency: string;
|
|
408
|
+
band: RadioBandsEnum;
|
|
409
|
+
comercialEmail: string;
|
|
410
|
+
financialEmail: string;
|
|
411
|
+
wppNumber: string;
|
|
412
|
+
isActive: boolean;
|
|
413
|
+
logoImgId: string | null;
|
|
414
|
+
logoImg?: S3FileEntity | null;
|
|
415
|
+
addressId: string;
|
|
416
|
+
address?: AddressEntity;
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
type RadioSubscriptionEntity = BaseEntity & {
|
|
420
|
+
accessUntil: DateString;
|
|
421
|
+
trialUntil?: DateString | null;
|
|
422
|
+
overdueAt?: DateString;
|
|
423
|
+
status: RadioSubscriptionStatusEnum;
|
|
424
|
+
creditCardToken: string;
|
|
425
|
+
creditCardMask: string;
|
|
426
|
+
radioId: string;
|
|
427
|
+
radio?: RadioEntity;
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
type ChargeEntity = BaseEntity & {
|
|
431
|
+
status: ChargeStatusEnum;
|
|
432
|
+
description: string;
|
|
433
|
+
value: number;
|
|
434
|
+
subscriptionId: string;
|
|
435
|
+
subscription?: RadioSubscriptionEntity;
|
|
436
|
+
couponActivationId?: string;
|
|
437
|
+
couponActivation?: CouponActivationEntity;
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
type LegalTermEntity = Pick<BaseEntity, "id" | "createdAt"> & {
|
|
441
|
+
title: string;
|
|
442
|
+
version: string;
|
|
443
|
+
content: string;
|
|
444
|
+
hash: string;
|
|
445
|
+
isActive: Boolean;
|
|
446
|
+
type: LegalTermTypesEnum;
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
type RadioLegalAgreementEntity = Pick<BaseEntity, "id"> & {
|
|
450
|
+
ipAddress: string;
|
|
451
|
+
userAgent: string;
|
|
452
|
+
acceptedAt: DateString;
|
|
453
|
+
termId: string;
|
|
454
|
+
term?: LegalTermEntity;
|
|
455
|
+
radioId: string;
|
|
456
|
+
radio?: RadioEntity;
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
type UserLegalAgreementEntity = Pick<BaseEntity, "id"> & {
|
|
460
|
+
ipAddress: string;
|
|
461
|
+
userAgent: string;
|
|
462
|
+
acceptedAt: DateString;
|
|
463
|
+
termId: string;
|
|
464
|
+
term?: LegalTermEntity;
|
|
465
|
+
userId: string;
|
|
466
|
+
user?: RadioUserEntity;
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
type SystemModuleEntity = BaseEntity & {
|
|
470
|
+
name: string;
|
|
471
|
+
description: string;
|
|
472
|
+
shortDescription: string;
|
|
473
|
+
monthlyPrice: number;
|
|
474
|
+
color: string;
|
|
475
|
+
icon: string;
|
|
476
|
+
};
|
|
477
|
+
|
|
478
|
+
type PlanEntity = BaseEntity & {
|
|
479
|
+
name: string;
|
|
480
|
+
description: string;
|
|
481
|
+
modules: SystemModuleEntity[];
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
type LoginPayload = {
|
|
485
|
+
email: string;
|
|
486
|
+
password: string;
|
|
487
|
+
ip: string;
|
|
488
|
+
keepLoggedIn?: boolean;
|
|
489
|
+
};
|
|
490
|
+
type LoginResponse = {
|
|
491
|
+
accessToken: string;
|
|
492
|
+
session: SessionEntity;
|
|
493
|
+
};
|
|
494
|
+
|
|
495
|
+
type CreateCouponPayload = Omit<CouponEntity, keyof BaseEntity>;
|
|
496
|
+
type CreateCouponResponse = CouponEntity;
|
|
497
|
+
|
|
498
|
+
type Activation = {
|
|
499
|
+
id: string;
|
|
500
|
+
validUntil: DateString;
|
|
501
|
+
createdAt: DateString;
|
|
502
|
+
radio: RadioEntity | null;
|
|
503
|
+
};
|
|
504
|
+
type GetCouponByIdResponse = CouponEntity & {
|
|
505
|
+
activations: Activation[];
|
|
506
|
+
};
|
|
507
|
+
type GetCouponValidationResponse = {
|
|
508
|
+
isValid: boolean;
|
|
509
|
+
validUntil: DateString | null;
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
type GetPenaltyValueResponse = {
|
|
513
|
+
value: number;
|
|
514
|
+
remainingMonths: number;
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
type Pagination = {
|
|
518
|
+
totalItems: number;
|
|
519
|
+
totalPages: number;
|
|
520
|
+
pageNumber: number;
|
|
521
|
+
pageSize: number;
|
|
522
|
+
hasNextPage: boolean;
|
|
523
|
+
hasPrevPage: boolean;
|
|
524
|
+
};
|
|
525
|
+
type PaginatedResponseDTO<T> = {
|
|
526
|
+
items: T[];
|
|
527
|
+
pagination: Pagination;
|
|
528
|
+
};
|
|
529
|
+
type PaginationParams = {
|
|
530
|
+
pageSize: number;
|
|
531
|
+
pageNumber: number;
|
|
532
|
+
};
|
|
533
|
+
|
|
534
|
+
type ListChargesParams = PaginationParams & {
|
|
535
|
+
radioId?: string;
|
|
536
|
+
status?: ChargeStatusEnum;
|
|
537
|
+
fromAt?: DateString;
|
|
538
|
+
toAt?: DateString;
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
type ListCouponsParams = PaginationParams & {
|
|
542
|
+
code?: string;
|
|
543
|
+
isValid?: boolean;
|
|
544
|
+
};
|
|
545
|
+
type ListCouponsResponse = PaginatedResponseDTO<CouponEntity>;
|
|
546
|
+
|
|
547
|
+
type UpdateCouponPayload = Pick<CreateCouponPayload, "discountValue" | "validUntil" | "benefitDurationDays">;
|
|
548
|
+
type UpdateCouponResponse = CouponEntity;
|
|
549
|
+
|
|
550
|
+
type GenerateEpJobPayload = {
|
|
551
|
+
blockData: PopulatedProgramScriptBlock;
|
|
552
|
+
mixageConfig: {};
|
|
553
|
+
outputFormat: AudioFormatsEnum;
|
|
554
|
+
};
|
|
555
|
+
|
|
556
|
+
type GenerateEpisodePayload = {
|
|
557
|
+
programId: string;
|
|
558
|
+
programScriptId: string;
|
|
559
|
+
date: string;
|
|
560
|
+
outputFormat: AudioFormatsEnum;
|
|
561
|
+
};
|
|
562
|
+
type GenerateEpisodeResponse = {};
|
|
563
|
+
|
|
564
|
+
type CreateLegalTermPayload = {
|
|
565
|
+
title: string;
|
|
566
|
+
content: string;
|
|
567
|
+
type: LegalTermTypesEnum;
|
|
568
|
+
};
|
|
569
|
+
type CreateLegalTermAgreementPayload = {
|
|
570
|
+
ipAddress: string;
|
|
571
|
+
userAgent: string;
|
|
572
|
+
termId: string;
|
|
573
|
+
};
|
|
574
|
+
type CreateLegalTermResponse = LegalTermEntity;
|
|
575
|
+
|
|
576
|
+
type ListLegalTermsParams = {
|
|
577
|
+
type?: LegalTermTypesEnum;
|
|
578
|
+
isActive?: boolean;
|
|
579
|
+
};
|
|
580
|
+
type ListLegalTermsResponse = PaginatedResponseDTO<LegalTermEntity>;
|
|
581
|
+
|
|
582
|
+
type PaymentProgram = {
|
|
583
|
+
name: string;
|
|
584
|
+
duration: number;
|
|
585
|
+
blocksAmount: number;
|
|
586
|
+
};
|
|
587
|
+
type PaymentPayload = {
|
|
588
|
+
creditCardToken: string;
|
|
589
|
+
creditCardMask: string;
|
|
590
|
+
couponCode: string | null;
|
|
591
|
+
modulesIds: string[];
|
|
592
|
+
programs: PaymentProgram[];
|
|
593
|
+
};
|
|
594
|
+
type CreateRadioPayload = {
|
|
595
|
+
name: string;
|
|
596
|
+
fantasyName: string;
|
|
597
|
+
cnpj: string;
|
|
598
|
+
slogan: string;
|
|
599
|
+
prefix: string;
|
|
600
|
+
frequency: string;
|
|
601
|
+
band: RadioBandsEnum;
|
|
602
|
+
comercialEmail: string;
|
|
603
|
+
financialEmail: string;
|
|
604
|
+
wppNumber: string;
|
|
605
|
+
address: Omit<AddressEntity, "id">;
|
|
606
|
+
payment: PaymentPayload;
|
|
607
|
+
director: Pick<RadioUserEntity, "name" | "email" | "birthDate" | "password"> & {
|
|
608
|
+
passwordConfirmation: string;
|
|
609
|
+
};
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
type GetRadioDetailsResponse = RadioEntity & {
|
|
613
|
+
address: AddressEntity;
|
|
614
|
+
logoImgId: string | null;
|
|
615
|
+
logoImg: RadioLogoEntity | null;
|
|
616
|
+
contracts: RadioContractEntity[];
|
|
617
|
+
legalAgreements: RadioLegalAgreementEntity[];
|
|
618
|
+
modules: SystemModuleEntity[];
|
|
619
|
+
subscription: RadioSubscriptionEntity;
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
type ListRadiosParams = PaginationParams & {
|
|
623
|
+
cnpj?: string;
|
|
624
|
+
name?: string;
|
|
625
|
+
fantasyName?: string;
|
|
626
|
+
subscriptionStatus?: RadioSubscriptionStatusEnum;
|
|
627
|
+
comercialEmail?: string;
|
|
628
|
+
financialEmail?: string;
|
|
629
|
+
frequency?: string;
|
|
630
|
+
city?: string;
|
|
631
|
+
state?: BrStatesEnum;
|
|
632
|
+
country?: string;
|
|
633
|
+
};
|
|
634
|
+
type ListRadiosResponse = PaginatedResponseDTO<RadioEntity>;
|
|
635
|
+
|
|
636
|
+
type UpsertPlanPayload = {
|
|
637
|
+
name: string;
|
|
638
|
+
description: string;
|
|
639
|
+
modulesIds: string[];
|
|
640
|
+
};
|
|
641
|
+
type UpsertPlanResponse = PlanEntity;
|
|
642
|
+
|
|
643
|
+
type ListSystemModulesResponse = SystemModuleEntity[];
|
|
644
|
+
|
|
645
|
+
type UpsertSystemModulePayload = {
|
|
646
|
+
name: string;
|
|
647
|
+
icon: string;
|
|
648
|
+
color: string;
|
|
649
|
+
description: string;
|
|
650
|
+
shortDescription: string;
|
|
651
|
+
monthlyPrice: number;
|
|
652
|
+
};
|
|
653
|
+
type UpsertSystemModuleResponse = SystemModuleEntity;
|
|
654
|
+
|
|
655
|
+
type PassConfirmation$1 = {
|
|
656
|
+
passwordConfirmation: string;
|
|
657
|
+
};
|
|
658
|
+
type CreateRadioUserPayload = Pick<RadioUserEntity, "name" | "email" | "password" | "radioId" | "role" | "birthDate"> & PassConfirmation$1;
|
|
659
|
+
type CreateRadioUserResponse = RadioUserEntity;
|
|
660
|
+
|
|
661
|
+
type PassConfirmation = {
|
|
662
|
+
passwordConfirmation: string;
|
|
663
|
+
};
|
|
664
|
+
type CreateSystemUserPayload = PassConfirmation & Omit<SystemUserEntity, keyof BaseEntity>;
|
|
665
|
+
type UpsertSystemUserResponse = SystemUserEntity;
|
|
666
|
+
|
|
667
|
+
type ListRadioUsersParams = PaginationParams & {
|
|
668
|
+
name?: string;
|
|
669
|
+
radioId?: string;
|
|
670
|
+
email?: string;
|
|
671
|
+
role?: UserRolesEnum;
|
|
672
|
+
};
|
|
673
|
+
type ListRadioUsersResponse = PaginatedResponseDTO<RadioUserEntity>;
|
|
674
|
+
|
|
675
|
+
type ListSystemUsersParams = PaginationParams & {
|
|
676
|
+
id?: string;
|
|
677
|
+
name?: string;
|
|
678
|
+
email?: string;
|
|
679
|
+
role?: UserRolesEnum[];
|
|
680
|
+
};
|
|
681
|
+
type ListSystemUsersResponse = PaginatedResponseDTO<SystemUserEntity>;
|
|
682
|
+
|
|
683
|
+
type UpdateRadioUserProfilePayload = Pick<RadioUserEntity, "name" | "email" | "birthDate">;
|
|
684
|
+
type UpdateRadioUserResponse = RadioUserEntity;
|
|
685
|
+
type UpdateRadioUserPasswordPayload = {
|
|
686
|
+
password: string;
|
|
687
|
+
passwordConfirmation: string;
|
|
688
|
+
};
|
|
689
|
+
type UpdateRadioUserRolePayload = {
|
|
690
|
+
role: UserRolesEnum;
|
|
691
|
+
};
|
|
692
|
+
|
|
693
|
+
type UpdateSystemUserPayload = {
|
|
694
|
+
name: string;
|
|
695
|
+
email: string;
|
|
696
|
+
role: UserRolesEnum;
|
|
697
|
+
};
|
|
698
|
+
type UpdateSystemUserResponse = SystemUserEntity;
|
|
699
|
+
type UpdateSystemUserPaswordPayload = {
|
|
700
|
+
password: string;
|
|
701
|
+
passwordConfirmation: string;
|
|
702
|
+
};
|
|
703
|
+
|
|
704
|
+
type EpisodeCreatedEvt = {};
|
|
705
|
+
|
|
706
|
+
type EpisodeErrorEvt = {};
|
|
707
|
+
|
|
708
|
+
type EpisodeProgressEvt = {};
|
|
709
|
+
|
|
710
|
+
export { type AddressEntity, AudioBitratesEnum, AudioFormatsEnum, AudioFrequenciesEnum, type BaseEntity, BrStatesEnum, type CasterAvatarEntity, type CasterEntity, type ChargeEntity, ChargeItemTypesEnum, ChargeStatusEnum, type CouponActivationEntity, type CouponEntity, CouponTypesEnum, CouponTypesTranslationsEnum, type CreateCouponPayload, type CreateCouponResponse, type CreateLegalTermAgreementPayload, type CreateLegalTermPayload, type CreateLegalTermResponse, type CreateRadioPayload, type CreateRadioUserPayload, type CreateRadioUserResponse, type CreateSystemUserPayload, type Enum, EpGenerationQualityEnum, EpGenerationTypesEnum, type EpisodeCreatedEvt, type EpisodeErrorEvt, type EpisodeProgressEvt, FFmpegAudioCurveEnum, type GenerateEpJobPayload, type GenerateEpisodePayload, type GenerateEpisodeResponse, type GetCouponByIdResponse, type GetCouponValidationResponse, type GetPenaltyValueResponse, type GetRadioDetailsResponse, JobsEnum, type LegalTermEntity, LegalTermTypesEnum, LegalTermTypesTranslationsEnum, type ListChargesParams, type ListCouponsParams, type ListCouponsResponse, type ListLegalTermsParams, type ListLegalTermsResponse, type ListRadioUsersParams, type ListRadioUsersResponse, type ListRadiosParams, type ListRadiosResponse, type ListSystemModulesResponse, type ListSystemUsersParams, type ListSystemUsersResponse, type LoginPayload, type LoginResponse, type MusicProgramScriptElement, NewsCategoriesEnum, type NewsProgramScriptElement, type NewsProgramScriptElementOptions, type OffProgramScriptElement, type PaginatedResponseDTO, type Pagination, type PaginationParams, type PlanEntity, type PopulatedProgramScriptBlock, type PopulatedProgramScriptElement, type PopulatedProgramScriptEntity, type ProgramEntity, type ProgramEpisodeBlockEntity, type ProgramEpisodeEntity, type ProgramScriptElement, type ProgramScriptElementOptionsAll, ProgramScriptElementTypesEnum, type ProgramScriptEntity, RadioBandsEnum, type RadioContractEntity, type RadioEntity, type RadioLegalAgreementEntity, type RadioLogoEntity, type RadioSubscriptionEntity, RadioSubscriptionStatusEnum, type RadioUserAvatarEntity, type RadioUserEntity, S3DirectoriesEnum, type S3FileEntity, type ScriptBlock, type SessionEntity, SessionTypesEnum, type SessionUser, type SoundtrackProgramScriptElementOptions, type SystemModuleEntity, type SystemUserEntity, type TkplayErrorEntity, type UpdateCouponPayload, type UpdateCouponResponse, type UpdateRadioUserPasswordPayload, type UpdateRadioUserProfilePayload, type UpdateRadioUserResponse, type UpdateRadioUserRolePayload, type UpdateSystemUserPaswordPayload, type UpdateSystemUserPayload, type UpdateSystemUserResponse, type UpsertPlanPayload, type UpsertPlanResponse, type UpsertSystemModulePayload, type UpsertSystemModuleResponse, type UpsertSystemUserResponse, type UserLegalAgreementEntity, UserRolesEnum, UserRolesTranslationsEnum, type VignetteProgramScriptElement };
|