Skip to content

Commit b8e4924

Browse files
authored
🤖 Merge PR DefinitelyTyped#72616 chore: upgrade facebook nodejs business sdk to version 22.0.1 by @rodinhatokay
1 parent d633bb1 commit b8e4924

File tree

229 files changed

+2542
-1129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

229 files changed

+2542
-1129
lines changed

‎types/facebook-nodejs-business-sdk/facebook-nodejs-business-sdk-tests.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import {
1919
} from 'facebook-nodejs-business-sdk';
2020
import { FacebookRequestError } from 'facebook-nodejs-business-sdk/src/exceptions';
2121
import TEventRequest from "facebook-nodejs-business-sdk/src/objects/serverside/event-request";
22+
import BusinessDataApiUserData from "facebook-nodejs-business-sdk/src/objects/serverside/user-data";
23+
import AttributionData from "facebook-nodejs-business-sdk/src/objects/serverside/attribution-data";
2224

2325
async function testGetAdsFetchFirstPageFalse(): Promise<Array<Record<string, string>>> {
2426
const ads = [];
@@ -152,3 +154,11 @@ export function testDeleteFunctionInAbstractCrudObjects(){
152154
const deleteAdCreativeFunction = new AdCreative().delete;
153155
const deleteAdFunction = new Ad().delete;
154156
}
157+
158+
export function testBusinessDataApiUserDataConstructor() {
159+
const businessDataApiUserData = new BusinessDataApiUserData();
160+
}
161+
162+
export function testAttributionDataConstructor() {
163+
const attributionData = new AttributionData();
164+
}

‎types/facebook-nodejs-business-sdk/index.d.ts‎

Lines changed: 42 additions & 37 deletions
Large diffs are not rendered by default.

‎types/facebook-nodejs-business-sdk/package.json‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "@types/facebook-nodejs-business-sdk",
4-
"version": "20.0.9999",
4+
"version": "22.0.9999",
55
"projects": [
66
"https://github.com/facebook/facebook-nodejs-business-sdk"
77
],
@@ -12,6 +12,9 @@
1212
{
1313
"name": "Aisel Sherfedinova",
1414
"githubUsername": "aisel01"
15+
}, {
16+
"name": "Rodin Hatokay",
17+
"githubUsername": "rodinhatokay"
1518
}
1619
],
1720
"minimumTypeScriptVersion": "5.1"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"env": {
3+
"es6": true
4+
}
5+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# README for TypeScript Type Generation
2+
3+
This folder contains scripts for generating TypeScript types for the `facebook-nodejs-business-sdk` package. The process automates most of the work but requires some manual fixes to ensure the types meet the required standards.
4+
5+
## How to Generate the Types
6+
7+
**Run the Generation Script**
8+
Use the following command to generate the types:
9+
```bash
10+
pnpm run gen-types
11+
```
12+
This command should be run from the root of the repository.
13+
14+
This will execute the script that:
15+
- Cleans up old generated files
16+
- Copies the SDK source files
17+
- Converts `.es6` files to `.js`
18+
- Transforms Flow types to TypeScript
19+
- Fixes common syntax issues
20+
- Generates `.d.ts` files
21+
- Extracts `bundle.d.ts` to `index.d.ts`
22+
- Copies the `src` folder to the root directory
23+
24+
## Notes
25+
26+
- The generation process is designed to handle most of the work, but manual intervention is necessary for edge cases.
27+
- Keep track of the manual fixes you make, as they may need to be reapplied if the types are regenerated.

0 commit comments

Comments
 (0)