Skip to content

Commit

Permalink
feat: Exported MsgInfoParticipantCollection and MsgInfoParticipantModel
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Nov 6, 2022
1 parent 95787bc commit 35011b4
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 10 deletions.
7 changes: 4 additions & 3 deletions src/whatsapp/collections/MsgInfoCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@

import { exportModule } from '../exportModule';
import { MsgInfoModel } from '../models';
import { Collection } from './Collection';
import { BaseCollection } from './BaseCollection';

/** @whatsapp 17972
/**
* @whatsapp 617972 >= 2.2222.8
* @whatsapp 739245 >= 2.2242.6
*/
export declare class MsgInfoCollection extends Collection<MsgInfoModel> {
export declare class MsgInfoCollection extends BaseCollection<MsgInfoModel> {
static model: MsgInfoModel;
static staleCollection?: any;
updateInfo(e?: any, t?: any, r?: any, a?: any, i?: any, n?: any): any;
Expand Down
35 changes: 35 additions & 0 deletions src/whatsapp/collections/MsgInfoParticipantCollection.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*!
* Copyright 2021 WPPConnect Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { exportModule } from '../exportModule';
import { MsgInfoParticipantModel } from '../models';
import { Collection } from './Collection';

/**
* @whatsapp 738482 >= 2.2242.6
*/
export declare class MsgInfoParticipantCollection extends Collection<MsgInfoParticipantModel> {
static model: MsgInfoParticipantModel;
static comparator(): any;
}

exportModule(
exports,
{
ParticipantCollection: ['ParticipantCollection'],
},
(m) => m.ParticipantCollection
);
1 change: 1 addition & 0 deletions src/whatsapp/collections/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export * from './LabelItemCollection';
export * from './LiveLocationCollection';
export * from './MsgCollection';
export * from './MsgInfoCollection';
export * from './MsgInfoParticipantCollection';
export * from './MuteCollection';
export * from './OrderCollection';
export * from './OrderItemCollection';
Expand Down
23 changes: 16 additions & 7 deletions src/whatsapp/models/MsgInfoModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
* limitations under the License.
*/

import { MsgInfoCollection } from '../collections';
import {
MsgInfoCollection,
MsgInfoParticipantCollection,
} from '../collections';
import { exportProxyModel } from '../exportModule';
import { MsgKey } from '../misc';
import {
Expand All @@ -27,9 +30,9 @@ import {
interface Props {
id: MsgKey;
usePlayReceipt?: any;
playedRemaining?: any;
readRemaining?: any;
deliveryRemaining?: any;
playedRemaining: number;
readRemaining: number;
deliveryRemaining: number;
deliveryPrivacyMode?: any;
}

Expand All @@ -41,17 +44,23 @@ interface Derived {
settled?: any;
}

/** @whatsapp 54311
/**
* @whatsapp 54311
* @whatsapp 754311 >= 2.2222.8
* @whatsapp 738482 >= 2.2242.6
*/
export declare interface MsgInfoModel
extends ModelProxy<Props, Session, Derived> {}

/** @whatsapp 54311
* @whatsapp 754311 >= 2.2222.8
/**
* @whatsapp 54311
* @whatsapp 738482 >= 2.2222.8
*/
export declare class MsgInfoModel extends Model<MsgInfoCollection> {
idClass: typeof MsgKey;
played: MsgInfoParticipantCollection;
read: MsgInfoParticipantCollection;
delivery: MsgInfoParticipantCollection;
constructor(
proterties?: ModelPropertiesContructor<MsgInfoModel>,
options?: ModelOptions
Expand Down
56 changes: 56 additions & 0 deletions src/whatsapp/models/MsgInfoParticipantModel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*!
* Copyright 2021 WPPConnect Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { MsgInfoCollection } from '../collections';
import { exportProxyModel } from '../exportModule';
import { Wid } from '../misc';
import { ContactModel } from './ContactModel';
import {
Model,
ModelOptions,
ModelPropertiesContructor,
ModelProxy,
} from './Model';

interface Props {
id: Wid;
t: number;
}

interface Session {
contact: ContactModel;
}

interface Derived {}

/**
* @whatsapp 738482 >= 2.2242.6
*/
export declare interface MsgInfoParticipantModel
extends ModelProxy<Props, Session, Derived> {}

/**
* @whatsapp 738482 >= 2.2242.6
*/
export declare class MsgInfoParticipantModel extends Model<MsgInfoCollection> {
constructor(
proterties?: ModelPropertiesContructor<MsgInfoParticipantModel>,
options?: ModelOptions
);
getCollection(): MsgInfoCollection;
}

exportProxyModel(exports, 'MsgInfoParticipantModel');
1 change: 1 addition & 0 deletions src/whatsapp/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export * from './Model';
export * from './ModelChatBase';
export * from './MsgButtonReplyMsgModel';
export * from './MsgInfoModel';
export * from './MsgInfoParticipantModel';
export * from './MsgModel';
export * from './MuteModel';
export * from './OrderItemModel';
Expand Down

0 comments on commit 35011b4

Please sign in to comment.