Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Bump version #340

Merged
merged 52 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
50241a0
feat(client): type safety for useStreaming (#298)
xxshady Jan 18, 2024
90c3a25
fix(client): typos (#297)
xxshady Jan 18, 2024
213cf5b
feat(webview): Add getPermissionState typing
xLuxy Jan 28, 2024
600bb1d
chore(webview, client): Bump version
xLuxy Jan 28, 2024
268e9d9
fix(webview): Formatting
xLuxy Jan 28, 2024
524625d
chore(webview, client): Bump version
xLuxy Jan 28, 2024
30ca4ac
fix(shared): Added required first argument to alt.log methods (#299)
WelaurS Feb 28, 2024
f3e4ae0
ci(shared): Bump version
xLuxy Feb 28, 2024
8599d0b
fix(server): virtual entity description (#306)
xxshady Mar 14, 2024
5860297
chore: update imports in examples (#303)
xxshady Mar 14, 2024
994a80c
chore: remove outdated event beforePlayerConnect (#304)
xxshady Mar 14, 2024
1a3baf2
chore: add package.json to first resource article (#302)
xxshady Mar 14, 2024
bf4425c
feat: add server debugging article (#309)
xxshady Mar 14, 2024
c860406
chore: add more descriptions for virtual entity API (#307)
xxshady Mar 14, 2024
3675e2e
chore: edit text labels to avoid confusion with 15.0 text labels (#305)
xxshady Mar 14, 2024
e75c9ed
feat(client): add alt.Object.streamedIn (#312)
xxshady Mar 23, 2024
94fc6e6
chore(client): Bump version
xLuxy Apr 3, 2024
c0d0aef
chore: improve getClosestEntities description (#310)
xxshady Apr 3, 2024
885493e
chore(server): Bump version
xLuxy Apr 3, 2024
beba645
fix(client): add missing Ped.getByRemoteID (#314)
xxshady May 8, 2024
d4ff659
fix(client, server): fix and improve RPC docs (#315)
xxshady May 19, 2024
0c56bda
Update requirements list (#317)
devpanda0 May 28, 2024
7d08b18
Fixed wrong name in event docs (#316)
Dav-Renz May 28, 2024
68b0446
chore: Bump version
xLuxy May 28, 2024
4812ebb
feat(client): Add reloadVehiclePhysics
xLuxy May 29, 2024
9808a79
chore(client)!: Deprecate setWatermarkPosition and it's enum
xLuxy Jun 13, 2024
66c6243
chore: Bump version
xLuxy Jun 13, 2024
13cccc7
chore(server): add some descriptions of voice channel properties (#318)
xxshady Jul 1, 2024
ac156d8
chore: Bump version
xLuxy Jul 1, 2024
aa4cbfd
fix(natives): Fix nullable string parameters
xLuxy Aug 19, 2024
60b3648
fix(natives): Fix nullable string return type
xLuxy Aug 19, 2024
572c87d
chore: Bump version
xLuxy Aug 19, 2024
676ddfb
feat(client, server, shared): switch to normal enums (#319)
xxshady Aug 19, 2024
d641283
chore: Bump version
xLuxy Aug 19, 2024
143fd8f
feat(client): Add new methods
xLuxy Aug 20, 2024
fed355e
chore: Bump version
xLuxy Aug 20, 2024
458d48d
chore: update math snippet (#320)
xxshady Aug 20, 2024
709cce3
chore: remove outdated workers article (#323)
xxshady Sep 16, 2024
ffe50da
feat: add multiple metadata setters (#322)
xxshady Sep 16, 2024
3f22777
chore(shared): fix angleTo return type of vector2 (#324)
S0P4 Sep 16, 2024
10111ce
chore: Bump version
xLuxy Sep 16, 2024
09e1e25
feat(client): Interior API (#325)
xxshady Nov 21, 2024
3fbffa8
fix(client): InteriorRoom and InteriorPortal don't have public constr…
xxshady Nov 29, 2024
a416cb3
feat(client): add config flag SWAP_ALLOW_HEAD_PROP_IN_VEHICLE_FLAG (#…
xxshady Jan 14, 2025
5936e69
chore: Bump version (#327)
xxshady Jan 14, 2025
76e2457
feat(server): Vehicle wheel API (#336)
xxshady Jan 29, 2025
06d1e65
feat(client): new WebView API (#335)
xxshady Jan 29, 2025
522249c
feat(client|server): various new APIs (#337)
xxshady Jan 29, 2025
5dce1d1
Merge branch 'dev' into rc-publish
xxshady Jan 29, 2025
2d8a321
chore: Bump version
xxshady Jan 29, 2025
89fde30
feat(server): add sourceEntity to weaponDamage event (#334)
xxshady Jan 29, 2025
2ef47bb
Merge branch 'dev' into rc-publish
xxshady Jan 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 58 additions & 3 deletions client/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,18 @@ declare module "alt-client" {
Justify,
}

export enum CookieSameSite {
NoRestriction = "NO_RESTRICTION",
LaxMode = "LAX_MODE",
StrictMode = "STRICT_MODE",
}

export enum CookiePriority {
Low = "LOW",
Medium = "MEDIUM",
High = "HIGH",
}

export interface IClientEvent {
anyResourceError: (resourceName: string) => void;
anyResourceStart: (resourceName: string) => void;
Expand Down Expand Up @@ -207,6 +219,15 @@ declare module "alt-client" {

playerStartTalking: (target: Player) => void;
playerStopTalking: (target: Player) => void;

/**
* @remarks This event is only triggered for local player.
*/
playerDimensionChange: (player: Player, oldDimension: number, newDimension: number) => void;
/**
* @remarks This event is only triggered for local player.
*/
playerInteriorChange: (player: Player, oldInterior: number, newInterior: number) => void;
}

export interface IDiscordUser {
Expand Down Expand Up @@ -574,6 +595,33 @@ declare module "alt-client" {
max: number;
}

export interface IWebViewParams {
url: string;
pos?: shared.IVector2;
size?: shared.IVector2;
isOverlay?: boolean;
drawableHash?: number;
targetTexture?: string;
headers?: Record<string, string>;
cookies?: ICookie[];
}

export interface ICookie {
/**
* Cookie name must always start with "__altv_"
*/
name: `__altv_${string}`;
url: string;
value: unknown;
httpOnly?: boolean;
secure?: boolean;
domain?: string;
path?: string;
sameSite?: CookieSameSite;
priority: CookiePriority;
expires: number;
}

export class BaseObject extends shared.BaseObject {
/**
* Whether this entity was created clientside or serverside. (Clientside = false, Serverside = true).
Expand Down Expand Up @@ -1918,10 +1966,16 @@ declare module "alt-client" {
* Creates a WebView rendered on game object.
*
* @param url URL of the html file.
* @param propHash Hash of object to render on.
* @param targetTexture Name of object's texture to replace.
* @param drawableHash Hash of drawable to render on.
* @param targetTexture Name of texture to replace.
*/
constructor(url: string, drawableHash: number, targetTexture: string);

/**
* Creates a WebView depending on params.
*
*/
constructor(url: string, propHash: number, targetTexture: string);
constructor(params: IWebViewParams);

/**
* Emits specified event across particular WebView.
Expand Down Expand Up @@ -2002,6 +2056,7 @@ declare module "alt-client" {
public removeOutput(output: AudioOutput): void;
public getOutputs(): readonly (AudioOutput | number)[];
public reload(ignoreCache?: boolean): void;
public setCookie(cookie: ICookie): void;

public deleteMeta(key: string): void;
public deleteMeta<K extends shared.ExtractStringKeys<ICustomWebViewMeta>>(key: K): void;
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@altv/types-client",
"version": "16.1.14",
"version": "16.1.15",
"description": "This package contains types definitions for alt:V client-side module.",
"types": "index.d.ts",
"files": [
Expand Down
109 changes: 108 additions & 1 deletion server/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,18 @@ declare module "alt-server" {
readonly cloudAuthResult: CloudAuthResult;
readonly id: number;
readonly isAccepted: boolean;
readonly hwid3: string;

/**
* Set text for (potential) player in queue.
*
* @example
* ```js
* alt.on("connectionQueueAdd", (connection) => {
* connection.text = "Your position in queue: 3";
* })
* ```
*/
text: string;

/**
Expand Down Expand Up @@ -327,7 +338,7 @@ declare module "alt-server" {
vehicleAttach: (vehicle: Vehicle, attachedVehicle: Vehicle) => void;
vehicleDestroy: (vehicle: Vehicle) => void;
vehicleDetach: (vehicle: Vehicle, detachedVehicle: Vehicle) => void;
weaponDamage: (source: Player, target: Entity, weaponHash: number, damage: number, offset: shared.Vector3, bodyPart: shared.BodyPart) => number | boolean | void;
weaponDamage: (source: Player, target: Entity, weaponHash: number, damage: number, offset: shared.Vector3, bodyPart: shared.BodyPart, sourceEntity: Entity) => number | boolean | void;
startFire: (player: Player, fires: IFireInfo[]) => boolean | void;
startProjectile: (player: Player, pos: shared.Vector3, dir: shared.Vector3, ammoHash: number, weaponHash: number) => boolean | void;
playerWeaponChange: (player: Player, oldWeapon: number, weapon: number) => void;
Expand Down Expand Up @@ -491,6 +502,7 @@ declare module "alt-server" {
readonly skillAbove50MaxAmmoMp: number;
readonly maxSkillMaxAmmoMp: number;
readonly bonusMaxAmmoMp: number;
readonly damageType: string;
}

export interface IAmmoFlags {
Expand Down Expand Up @@ -1060,6 +1072,8 @@ declare module "alt-server" {
public readonly isInMelee: boolean;
public readonly isInCover: boolean;
public readonly isParachuting: boolean;
public readonly isOnVehicle: boolean;
public readonly isInWater: boolean;

/**
* Position the player is currently aiming at.
Expand Down Expand Up @@ -1091,6 +1105,7 @@ declare module "alt-server" {
public readonly isSpawned: boolean;
public readonly socialID: string;
public readonly socialClubName: string;
public readonly hwid3: string;
public readonly hwidHash: string;
public readonly hwidExHash: string;
public readonly authToken: string;
Expand Down Expand Up @@ -2319,6 +2334,98 @@ declare module "alt-server" {
* @param wheelId The variation id of the wheel.
*/
public setWheels(wheelType: number, wheelId: number): void;

/**
* Gets the camber angle of the specified wheel.
*
* @param wheelIndex The index of the wheel.
*/
public getWheelCamber(wheelIndex: number): number;

/**
* Sets the camber angle of the specified wheel.
*
* @remarks A positive camber angle means that the top of the wheel is farther out than the bottom. A negative camber angle means that the bottom of the wheel is farther out than the top.
*
* @param wheelIndex The index of the wheel.
* @param camber The value the of camber angle.
*/
public setWheelCamber(wheelIndex: number, camber: number): void;

/**
* Gets the track width of the specified wheel.
*
* @param wheelIndex The index of the wheel.
*/
public getWheelTrackWidth(wheelIndex: number): number;

/**
* Sets the track width of the specified wheel.
*
* @param wheelIndex The index of the wheel.
* @param width The value of the track width.
*/
public setWheelTrackWidth(wheelIndex: number, width: number): void;

/**
* Gets the height of the specified wheel.
*
* @param wheelIndex The index of the wheel.
*/
public getWheelHeight(wheelIndex: number): number;

/**
* Sets the height of the specified wheel.
*
* @param wheelIndex The index of the wheel.
* @param height The value of the wheel height.
*/
public setWheelHeight(wheelIndex: number, height: number): void;

/**
* Gets the tyre radius of the specified wheel.
*
* @param wheelIndex The index of the wheel.
*/
public getWheelTyreRadius(wheelIndex: number): number;

/**
* @remarks Applies only physical effects to the wheel.
*
* @param wheelIndex The index of the wheel.
* @param radius The value of the tyre radius.
*/
public setWheelTyreRadius(wheelIndex: number, radius: number): void;

/**
* Gets the rim radius of the specified wheel.
*
* @param wheelIndex The index of the wheel.
*/
public getWheelRimRadius(wheelIndex: number): number;

/**
* @remarks Does not show any visible effect.
*
* @param wheelIndex The index of the wheel.
* @param radius The index of the rim radius.
*/
public setWheelRimRadius(wheelIndex: number, radius: number): void;

/**
* Gets the tyre width the specified wheel.
*
* @param wheelIndex The index of the wheel.
*/
public getWheelTyreWidth(wheelIndex: number): number;

/**
* @remarks Does not show any visible effect.
*
* @param wheelIndex The index of the wheel.
* @param width The value of the tyre width.
*/
public setWheelTyreWidth(wheelIndex: number, width: number): void;
/**
* Sets if a specific window is damaged.
*
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@altv/types-server",
"version": "16.1.8",
"version": "16.1.9",
"description": "This package contains types definitions for alt:V server-side module.",
"types": "index.d.ts",
"files": [
Expand Down