From 2abe063062882c0dfcd61b47bab3320bcdeb1672 Mon Sep 17 00:00:00 2001 From: Github Action Date: Tue, 19 Apr 2022 09:53:39 +0000 Subject: [PATCH 1/4] Generate typescript on Tue Apr 19 09:53:39 UTC 2022 --- src/index.ts | 122 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 74 insertions(+), 48 deletions(-) diff --git a/src/index.ts b/src/index.ts index a1353ed..c236d8c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -73,6 +73,14 @@ export type MeetingPresenceStatus = | 'MEETING_PRESENCE_STATUS_DOUBTS' | 'MEETING_PRESENCE_STATUS_WAITING' +export type MeetingRepeatabilityType = + | 'MEETING_PRESENCE_STATUS_UNSPECIFIED' + | 'MEETING_PRESENCE_STATUS_DAILY' + | 'MEETING_PRESENCE_STATUS_WEEKLY' + | 'MEETING_PRESENCE_STATUS_MONTHLY' + | 'MEETING_PRESENCE_STATUS_NDOW' + | 'MEETING_PRESENCE_STATUS_ANNUALLY' + export type PersonalAccountStatus = | 'PERSONAL_ACCOUNT_STATUS_ACTIVE' | 'PERSONAL_ACCOUNT_STATUS_SUSPENDED' @@ -7127,6 +7135,60 @@ export class FontColors implements TDProtoClass { } } +export interface FreqJSON { + /* eslint-disable camelcase */ + frequency: number; + repeatability_type: MeetingRepeatabilityType; + freq_days?: number[]; + /* eslint-enable camelcase */ +} + +export class Freq implements TDProtoClass { + /** + * MISSING CLASS DOCUMENTATION + * @param frequency DOCUMENTATION MISSING + * @param repeatabilityType DOCUMENTATION MISSING + * @param freqDays DOCUMENTATION MISSING + */ + constructor ( + public frequency: number, + public repeatabilityType: MeetingRepeatabilityType, + public freqDays?: number[], + ) {} + + public static fromJSON (raw: FreqJSON): Freq { + return new Freq( + raw.frequency, + raw.repeatability_type, + raw.freq_days, + ) + } + + public mappableFields = [ + 'frequency', + 'repeatabilityType', + 'freqDays', + ] as const + + readonly #mapper = { + /* eslint-disable camelcase */ + frequency: () => ({ frequency: this.frequency }), + repeatabilityType: () => ({ repeatability_type: this.repeatabilityType }), + freqDays: () => ({ freq_days: this.freqDays }), + /* eslint-enable camelcase */ + } + + public toJSON (): FreqJSON + public toJSON (fields: Array): Partial + public toJSON (fields?: Array) { + if (fields && fields.length > 0) { + return Object.assign({}, ...fields.map(f => this.#mapper[f]())) + } else { + return Object.assign({}, ...Object.values(this.#mapper).map(v => v())) + } + } +} + export interface GetActiveTariffsListResponseJSON { /* eslint-disable camelcase */ tariffs: TariffBillingJSON[]; @@ -8836,7 +8898,6 @@ export interface MeetingJSON { duration: number; group_uuid: string; id: string; - is_freq: boolean; owner_uuid: string; start_at: ISODateTimeString; team_uuid: string; @@ -8845,8 +8906,7 @@ export interface MeetingJSON { can_edit?: boolean; can_join?: boolean; description?: string; - freq?: number; - freq_days?: number[]; + freq?: FreqJSON; is_archive?: boolean; is_outside?: boolean; is_public?: boolean; @@ -8862,7 +8922,6 @@ export class Meeting implements TDProtoClass { * @param duration DOCUMENTATION MISSING * @param groupUuid DOCUMENTATION MISSING * @param id DOCUMENTATION MISSING - * @param isFreq DOCUMENTATION MISSING * @param ownerUuid DOCUMENTATION MISSING * @param startAt DOCUMENTATION MISSING * @param teamUuid DOCUMENTATION MISSING @@ -8872,7 +8931,6 @@ export class Meeting implements TDProtoClass { * @param canJoin DOCUMENTATION MISSING * @param description DOCUMENTATION MISSING * @param freq DOCUMENTATION MISSING - * @param freqDays DOCUMENTATION MISSING * @param isArchive DOCUMENTATION MISSING * @param isOutside DOCUMENTATION MISSING * @param isPublic DOCUMENTATION MISSING @@ -8884,7 +8942,6 @@ export class Meeting implements TDProtoClass { public duration: number, public groupUuid: string, public id: string, - public isFreq: boolean, public ownerUuid: string, public startAt: ISODateTimeString, public teamUuid: string, @@ -8893,8 +8950,7 @@ export class Meeting implements TDProtoClass { public canEdit?: boolean, public canJoin?: boolean, public description?: string, - public freq?: number, - public freqDays?: number[], + public freq?: Freq, public isArchive?: boolean, public isOutside?: boolean, public isPublic?: boolean, @@ -8908,7 +8964,6 @@ export class Meeting implements TDProtoClass { raw.duration, raw.group_uuid, raw.id, - raw.is_freq, raw.owner_uuid, raw.start_at, raw.team_uuid, @@ -8917,8 +8972,7 @@ export class Meeting implements TDProtoClass { raw.can_edit, raw.can_join, raw.description, - raw.freq, - raw.freq_days, + raw.freq && Freq.fromJSON(raw.freq), raw.is_archive, raw.is_outside, raw.is_public, @@ -8932,7 +8986,6 @@ export class Meeting implements TDProtoClass { 'duration', 'groupUuid', 'id', - 'isFreq', 'ownerUuid', 'startAt', 'teamUuid', @@ -8942,7 +8995,6 @@ export class Meeting implements TDProtoClass { 'canJoin', 'description', 'freq', - 'freqDays', 'isArchive', 'isOutside', 'isPublic', @@ -8956,7 +9008,6 @@ export class Meeting implements TDProtoClass { duration: () => ({ duration: this.duration }), groupUuid: () => ({ group_uuid: this.groupUuid }), id: () => ({ id: this.id }), - isFreq: () => ({ is_freq: this.isFreq }), ownerUuid: () => ({ owner_uuid: this.ownerUuid }), startAt: () => ({ start_at: this.startAt }), teamUuid: () => ({ team_uuid: this.teamUuid }), @@ -8965,8 +9016,7 @@ export class Meeting implements TDProtoClass { canEdit: () => ({ can_edit: this.canEdit }), canJoin: () => ({ can_join: this.canJoin }), description: () => ({ description: this.description }), - freq: () => ({ freq: this.freq }), - freqDays: () => ({ freq_days: this.freqDays }), + freq: () => ({ freq: this.freq?.toJSON() }), isArchive: () => ({ is_archive: this.isArchive }), isOutside: () => ({ is_outside: this.isOutside }), isPublic: () => ({ is_public: this.isPublic }), @@ -9080,14 +9130,12 @@ export class MeetingMember implements TDProtoClass { export interface MeetingsCreateRequestJSON { /* eslint-disable camelcase */ duration: number; - is_freq: boolean; members: MeetingsMembersCreateParamsJSON[]; owner_uuid: string; start_at: ISODateTimeString; team_uuid: string; description?: string; - freq?: number; - freq_days?: number[]; + freq?: FreqJSON; is_outside?: boolean; is_public?: boolean; title?: string; @@ -9098,28 +9146,24 @@ export class MeetingsCreateRequest implements TDProtoClass ({ duration: this.duration }), - isFreq: () => ({ is_freq: this.isFreq }), members: () => ({ members: this.members.map(u => u.toJSON()) }), ownerUuid: () => ({ owner_uuid: this.ownerUuid }), startAt: () => ({ start_at: this.startAt }), teamUuid: () => ({ team_uuid: this.teamUuid }), description: () => ({ description: this.description }), - freq: () => ({ freq: this.freq }), - freqDays: () => ({ freq_days: this.freqDays }), + freq: () => ({ freq: this.freq?.toJSON() }), isOutside: () => ({ is_outside: this.isOutside }), isPublic: () => ({ is_public: this.isPublic }), title: () => ({ title: this.title }), @@ -9781,12 +9819,10 @@ export class MeetingsResponse implements TDProtoClass { export interface MeetingsUpdateRequestJSON { /* eslint-disable camelcase */ - is_freq: boolean; meeting_id: string; active_from?: string; duration?: number; - freq?: number; - freq_days?: number[]; + freq?: FreqJSON; is_outside?: boolean; is_public?: boolean; start_at?: string; @@ -9797,24 +9833,20 @@ export interface MeetingsUpdateRequestJSON { export class MeetingsUpdateRequest implements TDProtoClass { /** * MISSING CLASS DOCUMENTATION - * @param isFreq DOCUMENTATION MISSING * @param meetingId DOCUMENTATION MISSING * @param activeFrom DOCUMENTATION MISSING * @param duration DOCUMENTATION MISSING * @param freq DOCUMENTATION MISSING - * @param freqDays DOCUMENTATION MISSING * @param isOutside DOCUMENTATION MISSING * @param isPublic DOCUMENTATION MISSING * @param startAt DOCUMENTATION MISSING * @param teamUuid DOCUMENTATION MISSING */ constructor ( - public isFreq: boolean, public meetingId: string, public activeFrom?: string, public duration?: number, - public freq?: number, - public freqDays?: number[], + public freq?: Freq, public isOutside?: boolean, public isPublic?: boolean, public startAt?: string, @@ -9823,12 +9855,10 @@ export class MeetingsUpdateRequest implements TDProtoClass ({ is_freq: this.isFreq }), meetingId: () => ({ meeting_id: this.meetingId }), activeFrom: () => ({ active_from: this.activeFrom }), duration: () => ({ duration: this.duration }), - freq: () => ({ freq: this.freq }), - freqDays: () => ({ freq_days: this.freqDays }), + freq: () => ({ freq: this.freq?.toJSON() }), isOutside: () => ({ is_outside: this.isOutside }), isPublic: () => ({ is_public: this.isPublic }), startAt: () => ({ start_at: this.startAt }), From ae6495ff959cc418aba48ddf2f329c9742f4615f Mon Sep 17 00:00:00 2001 From: Github Action Date: Tue, 19 Apr 2022 10:42:47 +0000 Subject: [PATCH 2/4] Generate typescript on Tue Apr 19 10:42:47 UTC 2022 From 877e66633efd21d5d2b954d017b8400c49a65720 Mon Sep 17 00:00:00 2001 From: Github Action Date: Tue, 19 Apr 2022 16:49:14 +0000 Subject: [PATCH 3/4] Generate typescript on Tue Apr 19 16:49:14 UTC 2022 --- src/index.ts | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/index.ts b/src/index.ts index c236d8c..d545194 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9047,7 +9047,6 @@ export interface MeetingMemberJSON { can_change_presence?: boolean; can_change_status?: boolean; can_remove?: boolean; - is_required?: boolean; /* eslint-enable camelcase */ } @@ -9062,7 +9061,6 @@ export class MeetingMember implements TDProtoClass { * @param canChangePresence DOCUMENTATION MISSING * @param canChangeStatus DOCUMENTATION MISSING * @param canRemove DOCUMENTATION MISSING - * @param isRequired DOCUMENTATION MISSING */ constructor ( public chatUuid: string, @@ -9073,7 +9071,6 @@ export class MeetingMember implements TDProtoClass { public canChangePresence?: boolean, public canChangeStatus?: boolean, public canRemove?: boolean, - public isRequired?: boolean, ) {} public static fromJSON (raw: MeetingMemberJSON): MeetingMember { @@ -9086,7 +9083,6 @@ export class MeetingMember implements TDProtoClass { raw.can_change_presence, raw.can_change_status, raw.can_remove, - raw.is_required, ) } @@ -9099,7 +9095,6 @@ export class MeetingMember implements TDProtoClass { 'canChangePresence', 'canChangeStatus', 'canRemove', - 'isRequired', ] as const readonly #mapper = { @@ -9112,7 +9107,6 @@ export class MeetingMember implements TDProtoClass { canChangePresence: () => ({ can_change_presence: this.canChangePresence }), canChangeStatus: () => ({ can_change_status: this.canChangeStatus }), canRemove: () => ({ can_remove: this.canRemove }), - isRequired: () => ({ is_required: this.isRequired }), /* eslint-enable camelcase */ } @@ -9274,7 +9268,6 @@ export class MeetingsDeleteRequestParams implements TDProtoClass ({ jid: this.jid }), - isRequired: () => ({ is_required: this.isRequired }), status: () => ({ status: this.status }), /* eslint-enable camelcase */ } @@ -9603,7 +9591,6 @@ export class MeetingsMembersResponse implements TDProtoClass { /** * MISSING CLASS DOCUMENTATION - * @param isRequired DOCUMENTATION MISSING * @param status DOCUMENTATION MISSING * @param teamUuid DOCUMENTATION MISSING */ constructor ( - public isRequired?: boolean, public status?: MeetingMemberStatus, public teamUuid?: string, ) {} public static fromJSON (raw: MeetingsMembersUpdateRequestJSON): MeetingsMembersUpdateRequest { return new MeetingsMembersUpdateRequest( - raw.is_required, raw.status, raw.team_uuid, ) } public mappableFields = [ - 'isRequired', 'status', 'teamUuid', ] as const readonly #mapper = { /* eslint-disable camelcase */ - isRequired: () => ({ is_required: this.isRequired }), status: () => ({ status: this.status }), teamUuid: () => ({ team_uuid: this.teamUuid }), /* eslint-enable camelcase */ From ef0bafa691ba5e050a986bc322eca26c512afc57 Mon Sep 17 00:00:00 2001 From: Github Action Date: Fri, 22 Apr 2022 10:56:03 +0000 Subject: [PATCH 4/4] Generate typescript on Fri Apr 22 10:56:03 UTC 2022 --- src/index.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/index.ts b/src/index.ts index d545194..1217daf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8910,6 +8910,7 @@ export interface MeetingJSON { is_archive?: boolean; is_outside?: boolean; is_public?: boolean; + is_required?: boolean; meeting_members?: MeetingMemberJSON[]; personal_account_id?: string; title?: string; @@ -8934,6 +8935,7 @@ export class Meeting implements TDProtoClass { * @param isArchive DOCUMENTATION MISSING * @param isOutside DOCUMENTATION MISSING * @param isPublic DOCUMENTATION MISSING + * @param isRequired DOCUMENTATION MISSING * @param meetingMembers DOCUMENTATION MISSING * @param personalAccountId DOCUMENTATION MISSING * @param title DOCUMENTATION MISSING @@ -8954,6 +8956,7 @@ export class Meeting implements TDProtoClass { public isArchive?: boolean, public isOutside?: boolean, public isPublic?: boolean, + public isRequired?: boolean, public meetingMembers?: MeetingMember[], public personalAccountId?: string, public title?: string, @@ -8976,6 +8979,7 @@ export class Meeting implements TDProtoClass { raw.is_archive, raw.is_outside, raw.is_public, + raw.is_required, raw.meeting_members && raw.meeting_members.map(MeetingMember.fromJSON), raw.personal_account_id, raw.title, @@ -8998,6 +9002,7 @@ export class Meeting implements TDProtoClass { 'isArchive', 'isOutside', 'isPublic', + 'isRequired', 'meetingMembers', 'personalAccountId', 'title', @@ -9020,6 +9025,7 @@ export class Meeting implements TDProtoClass { isArchive: () => ({ is_archive: this.isArchive }), isOutside: () => ({ is_outside: this.isOutside }), isPublic: () => ({ is_public: this.isPublic }), + isRequired: () => ({ is_required: this.isRequired }), meetingMembers: () => ({ meeting_members: this.meetingMembers?.map(u => u.toJSON()) }), personalAccountId: () => ({ personal_account_id: this.personalAccountId }), title: () => ({ title: this.title }), @@ -9647,6 +9653,7 @@ export interface MeetingsRequestParamsJSON { is_freq?: boolean; is_outside?: boolean; is_public?: boolean; + is_required?: boolean; limit?: number; members?: string[]; offset?: number; @@ -9664,6 +9671,7 @@ export class MeetingsRequestParams implements TDProtoClass ({ is_freq: this.isFreq }), isOutside: () => ({ is_outside: this.isOutside }), isPublic: () => ({ is_public: this.isPublic }), + isRequired: () => ({ is_required: this.isRequired }), limit: () => ({ limit: this.limit }), members: () => ({ members: this.members }), offset: () => ({ offset: this.offset }),