Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
94e7704
feat(package): Refactor package for TypeScript ESM module support
MaximumFX Dec 23, 2025
e128e5f
feat(client): Refactor ShotgunApiClient to TypeScript with ESM suppor…
MaximumFX Dec 23, 2025
6d19cb2
feat(client): Add grant type handling for credentials in ShotgunApiCl…
MaximumFX Dec 23, 2025
d447ced
feat(client): Add grant type handling for credentials in ShotgunApiCl…
MaximumFX Dec 23, 2025
3633c6a
refactor(core): Migrate index.js to TypeScript with ESM support
MaximumFX Dec 23, 2025
4b84d03
refactor(client): Migrate client index.js to TypeScript with ESM support
MaximumFX Dec 23, 2025
ec482f9
refactor(core): Migrate schema-field-definition.js to TypeScript with…
MaximumFX Dec 23, 2025
d616416
refactor(core): Migrate paginated-record-response.js to TypeScript wi…
MaximumFX Dec 23, 2025
2d89f72
refactor(core): Migrate error.js to TypeScript with ESM support
MaximumFX Dec 23, 2025
37afbc3
refactor(client): Migrate client mixins to TypeScript with ESM support
MaximumFX Dec 23, 2025
e61dcee
chore(package): Bump version to 5.0.0 for major release
MaximumFX Dec 23, 2025
8ecd16e
docs(readme): Remove explicit grant type examples and update descript…
MaximumFX Dec 23, 2025
482279a
refactor(client): Simplify response handling in async methods
MaximumFX Dec 23, 2025
a47dfa7
refactor(client): Remove unused `node-fetch` import in entity-item-up…
MaximumFX Dec 23, 2025
4b02b31
chore(eslint): Configure TypeScript support in ESLint
MaximumFX Dec 23, 2025
083d512
chore(package): Update dependencies and regenerate `package-lock.json…
MaximumFX Dec 23, 2025
47b3c7b
refactor: Replace `let` with `const` across the codebase
MaximumFX Dec 23, 2025
b132f98
docs(readme): Update import syntax in library usage example
MaximumFX Dec 23, 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
11 changes: 9 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018
"ecmaVersion": 2018,
"sourceType": "module",
"project": ["./tsconfig.json"]
},
"rules": {
"indent": [
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ A companion CLI can be found at https://github.com/shotgunsoftware/shotgrid-node

### Using as a library
```javascript
const { ShotgunApiClient } = require('shotgun-nodejs');
import ShotgunApiClient from 'shotgun-nodejs';

(async function() {
let shotgun = new ShotgunApiClient({
siteUrl: 'https://mysite.shotgunstudio.com',
credentials: {
grant_type: 'password',
username: 'username',
password: 'password',
}
Expand All @@ -41,7 +40,6 @@ a different type of credentials object to the constructor object as follows:
```javascript
// Password-based
{
grant_type: 'password',
username: 'username',
password: 'password',
scope: 'sudo_as_login:username', // optional
Expand All @@ -50,7 +48,6 @@ a different type of credentials object to the constructor object as follows:

// Client-based
{
grant_type: 'client_credentials',
client_id: 'id',
client_secret: 'secret',
scope: 'sudo_as_login:username', // optional
Expand All @@ -59,17 +56,17 @@ a different type of credentials object to the constructor object as follows:

// Session token-based
{
grant_type: 'session_token',
session_token: 'token',
}

// Refresh token-based
{
grant_type: 'refresh_token',
refresh_token: 'token',
}
```

_Grant type will be automatically inferred based on the credentials object._

## Missing Support

Currently not able to perform the following:
Expand All @@ -89,7 +86,7 @@ Important files at a glance.
```
shotgun-nodejs
└── src
└── client.js Main module
└── client.ts Main module
```

## Contributing
Expand Down
Loading