diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 78c623516..839088241 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "9.13.0" + ".": "10.0.0" } diff --git a/.stats.yml b/.stats.yml index b7a7420d1..431aa1d46 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 48 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-7e39b6a20bf3e1f23ad832300b73ae92b6f6ce7c9d86eaa8fcc0710b51455f17.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-ecd3f6c28edae07dbe9f54d8040a6d7f2af5ac032b20f8df06065542478e4e73.yml openapi_spec_hash: 5e0e04e7274494062ff46ac85d358f5b -config_hash: 8b3c2a32014346513c18d98cbb752d2c +config_hash: 9ae56f40cec7304896138bfad5caf748 diff --git a/CHANGELOG.md b/CHANGELOG.md index 325e8296b..9e9feabc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 10.0.0 (2026-06-22) + +Full Changelog: [v9.13.0...v10.0.0](https://github.com/Finch-API/finch-api-node/compare/v9.13.0...v10.0.0) + +### Bug Fixes + +* **payroll:** pay_statement_item is now a direct subresource of hris instead of company ([b188d31](https://github.com/Finch-API/finch-api-node/commit/b188d31dc90991b7d92b10c6587a726d2be0666c)) + ## 9.13.0 (2026-06-22) Full Changelog: [v9.12.1...v9.13.0](https://github.com/Finch-API/finch-api-node/compare/v9.12.1...v9.13.0) diff --git a/MIGRATION.md b/MIGRATION.md index 20b6d21fb..2a997b6b2 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -90,11 +90,11 @@ client.example.list(undefined, { headers: { ... } }); This affects the following methods - `client.hris.company.retrieve()` -- `client.hris.company.payStatementItem.list()` -- `client.hris.company.payStatementItem.rules.create()` -- `client.hris.company.payStatementItem.rules.update()` -- `client.hris.company.payStatementItem.rules.list()` -- `client.hris.company.payStatementItem.rules.delete()` +- `client.hris.payStatementItem.list()` +- `client.hris.payStatementItem.rules.create()` +- `client.hris.payStatementItem.rules.update()` +- `client.hris.payStatementItem.rules.list()` +- `client.hris.payStatementItem.rules.delete()` - `client.hris.directory.list()` - `client.hris.directory.listIndividuals()` - `client.hris.individuals.retrieveMany()` diff --git a/api.md b/api.md index 2c650ec6a..3e139959f 100644 --- a/api.md +++ b/api.md @@ -36,37 +36,37 @@ Types: Types: -- Company +- Company Methods: -- client.hris.company.retrieve({ ...params }) -> Company +- client.hris.company.retrieve({ ...params }) -> Company -### PayStatementItem +## PayStatementItem Types: -- PayStatementItemListResponse +- PayStatementItemListResponse Methods: -- client.hris.company.payStatementItem.list({ ...params }) -> PayStatementItemListResponsesPage +- client.hris.payStatementItem.list({ ...params }) -> PayStatementItemListResponsesPage -#### Rules +### Rules Types: -- RuleCreateResponse -- RuleUpdateResponse -- RuleListResponse -- RuleDeleteResponse +- RuleCreateResponse +- RuleUpdateResponse +- RuleListResponse +- RuleDeleteResponse Methods: -- client.hris.company.payStatementItem.rules.create({ ...params }) -> RuleCreateResponse -- client.hris.company.payStatementItem.rules.update(ruleID, { ...params }) -> RuleUpdateResponse -- client.hris.company.payStatementItem.rules.list({ ...params }) -> RuleListResponsesPage -- client.hris.company.payStatementItem.rules.delete(ruleID, { ...params }) -> RuleDeleteResponse +- client.hris.payStatementItem.rules.create({ ...params }) -> RuleCreateResponse +- client.hris.payStatementItem.rules.update(ruleID, { ...params }) -> RuleUpdateResponse +- client.hris.payStatementItem.rules.list({ ...params }) -> RuleListResponsesPage +- client.hris.payStatementItem.rules.delete(ruleID, { ...params }) -> RuleDeleteResponse ## Directory diff --git a/package.json b/package.json index e1da13d08..a10c70508 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tryfinch/finch-api", - "version": "9.13.0", + "version": "10.0.0", "description": "The official TypeScript library for the Finch API", "author": "Finch ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/manifest.json b/packages/mcp-server/manifest.json index 53ce9618b..9cf8dcb20 100644 --- a/packages/mcp-server/manifest.json +++ b/packages/mcp-server/manifest.json @@ -1,7 +1,7 @@ { "dxt_version": "0.2", "name": "@tryfinch/finch-api-mcp", - "version": "9.13.0", + "version": "10.0.0", "description": "The official MCP Server for the Finch API", "author": { "name": "Finch", diff --git a/packages/mcp-server/package.json b/packages/mcp-server/package.json index 039bebe74..6a210f1a3 100644 --- a/packages/mcp-server/package.json +++ b/packages/mcp-server/package.json @@ -1,6 +1,6 @@ { "name": "@tryfinch/finch-api-mcp", - "version": "9.13.0", + "version": "10.0.0", "description": "The official MCP Server for the Finch API", "author": "Finch ", "types": "dist/index.d.ts", diff --git a/packages/mcp-server/src/code-tool-worker.ts b/packages/mcp-server/src/code-tool-worker.ts index 397a4e007..950240eae 100644 --- a/packages/mcp-server/src/code-tool-worker.ts +++ b/packages/mcp-server/src/code-tool-worker.ts @@ -110,11 +110,11 @@ const fuse = new Fuse( [ 'client.accessTokens.create', 'client.hris.company.retrieve', - 'client.hris.company.payStatementItem.list', - 'client.hris.company.payStatementItem.rules.create', - 'client.hris.company.payStatementItem.rules.delete', - 'client.hris.company.payStatementItem.rules.list', - 'client.hris.company.payStatementItem.rules.update', + 'client.hris.payStatementItem.list', + 'client.hris.payStatementItem.rules.create', + 'client.hris.payStatementItem.rules.delete', + 'client.hris.payStatementItem.rules.list', + 'client.hris.payStatementItem.rules.update', 'client.hris.directory.list', 'client.hris.directory.listIndividuals', 'client.hris.individuals.retrieveMany', diff --git a/packages/mcp-server/src/local-docs-search.ts b/packages/mcp-server/src/local-docs-search.ts index 95fd1f38b..f878f5f20 100644 --- a/packages/mcp-server/src/local-docs-search.ts +++ b/packages/mcp-server/src/local-docs-search.ts @@ -157,8 +157,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [ summary: 'Pay Statement Item', description: "Retrieve a list of detailed pay statement items for the access token's connection account.\n", - stainlessPath: '(resource) hris.company.pay_statement_item > (method) list', - qualified: 'client.hris.company.payStatementItem.list', + stainlessPath: '(resource) hris.pay_statement_item > (method) list', + qualified: 'client.hris.payStatementItem.list', params: [ "categories?: 'earnings' | 'taxes' | 'employee_deductions' | 'employer_contributions'[];", 'end_date?: string;', @@ -170,37 +170,37 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: "{ attributes: { metadata: object; employer?: boolean; pre_tax?: boolean; type?: string; }; category: 'earnings' | 'taxes' | 'employee_deductions' | 'employer_contributions'; name: string; }", markdown: - "## list\n\n`client.hris.company.payStatementItem.list(categories?: 'earnings' | 'taxes' | 'employee_deductions' | 'employer_contributions'[], end_date?: string, entity_ids?: string[], name?: string, start_date?: string, type?: string): { attributes: object; category: 'earnings' | 'taxes' | 'employee_deductions' | 'employer_contributions'; name: string; }`\n\n**get** `/employer/pay-statement-item`\n\nRetrieve a list of detailed pay statement items for the access token's connection account.\n\n\n### Parameters\n\n- `categories?: 'earnings' | 'taxes' | 'employee_deductions' | 'employer_contributions'[]`\n Comma-delimited list of pay statement item categories to filter on. If empty, defaults to all categories.\n\n- `end_date?: string`\n The end date to retrieve pay statement items by via their last seen pay date in `YYYY-MM-DD` format.\n\n- `entity_ids?: string[]`\n The entity IDs to specify which entities' data to access.\n\n- `name?: string`\n Case-insensitive partial match search by pay statement item name.\n\n- `start_date?: string`\n The start date to retrieve pay statement items by via their last seen pay date (inclusive) in `YYYY-MM-DD` format.\n\n- `type?: string`\n String search by pay statement item type.\n\n### Returns\n\n- `{ attributes: { metadata: object; employer?: boolean; pre_tax?: boolean; type?: string; }; category: 'earnings' | 'taxes' | 'employee_deductions' | 'employer_contributions'; name: string; }`\n\n - `attributes: { metadata: object; employer?: boolean; pre_tax?: boolean; type?: string; }`\n - `category: 'earnings' | 'taxes' | 'employee_deductions' | 'employer_contributions'`\n - `name: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\n// Automatically fetches more pages as needed.\nfor await (const payStatementItemListResponse of client.hris.company.payStatementItem.list()) {\n console.log(payStatementItemListResponse);\n}\n```", + "## list\n\n`client.hris.payStatementItem.list(categories?: 'earnings' | 'taxes' | 'employee_deductions' | 'employer_contributions'[], end_date?: string, entity_ids?: string[], name?: string, start_date?: string, type?: string): { attributes: object; category: 'earnings' | 'taxes' | 'employee_deductions' | 'employer_contributions'; name: string; }`\n\n**get** `/employer/pay-statement-item`\n\nRetrieve a list of detailed pay statement items for the access token's connection account.\n\n\n### Parameters\n\n- `categories?: 'earnings' | 'taxes' | 'employee_deductions' | 'employer_contributions'[]`\n Comma-delimited list of pay statement item categories to filter on. If empty, defaults to all categories.\n\n- `end_date?: string`\n The end date to retrieve pay statement items by via their last seen pay date in `YYYY-MM-DD` format.\n\n- `entity_ids?: string[]`\n The entity IDs to specify which entities' data to access.\n\n- `name?: string`\n Case-insensitive partial match search by pay statement item name.\n\n- `start_date?: string`\n The start date to retrieve pay statement items by via their last seen pay date (inclusive) in `YYYY-MM-DD` format.\n\n- `type?: string`\n String search by pay statement item type.\n\n### Returns\n\n- `{ attributes: { metadata: object; employer?: boolean; pre_tax?: boolean; type?: string; }; category: 'earnings' | 'taxes' | 'employee_deductions' | 'employer_contributions'; name: string; }`\n\n - `attributes: { metadata: object; employer?: boolean; pre_tax?: boolean; type?: string; }`\n - `category: 'earnings' | 'taxes' | 'employee_deductions' | 'employer_contributions'`\n - `name: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\n// Automatically fetches more pages as needed.\nfor await (const payStatementItemListResponse of client.hris.payStatementItem.list()) {\n console.log(payStatementItemListResponse);\n}\n```", perLanguage: { typescript: { - method: 'client.hris.company.payStatementItem.list', + method: 'client.hris.payStatementItem.list', example: - "import Finch from '@tryfinch/finch-api';\n\nconst client = new Finch({\n accessToken: 'My Access Token',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const payStatementItemListResponse of client.hris.company.payStatementItem.list()) {\n console.log(payStatementItemListResponse.attributes);\n}", + "import Finch from '@tryfinch/finch-api';\n\nconst client = new Finch({\n accessToken: 'My Access Token',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const payStatementItemListResponse of client.hris.payStatementItem.list()) {\n console.log(payStatementItemListResponse.attributes);\n}", }, python: { - method: 'hris.company.pay_statement_item.list', + method: 'hris.pay_statement_item.list', example: - 'from finch import Finch\n\nclient = Finch(\n access_token="My Access Token",\n)\npage = client.hris.company.pay_statement_item.list()\npage = page.responses[0]\nprint(page.attributes)', + 'from finch import Finch\n\nclient = Finch(\n access_token="My Access Token",\n)\npage = client.hris.pay_statement_item.list()\npage = page.responses[0]\nprint(page.attributes)', }, java: { - method: 'hris().company().payStatementItem().list', + method: 'hris().payStatementItem().list', example: - 'package com.tryfinch.api.example;\n\nimport com.tryfinch.api.client.FinchClient;\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient;\nimport com.tryfinch.api.models.HrisCompanyPayStatementItemListPage;\nimport com.tryfinch.api.models.HrisCompanyPayStatementItemListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n FinchClient client = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build();\n\n HrisCompanyPayStatementItemListPage page = client.hris().company().payStatementItem().list();\n }\n}', + 'package com.tryfinch.api.example;\n\nimport com.tryfinch.api.client.FinchClient;\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient;\nimport com.tryfinch.api.models.HrisPayStatementItemListPage;\nimport com.tryfinch.api.models.HrisPayStatementItemListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n FinchClient client = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build();\n\n HrisPayStatementItemListPage page = client.hris().payStatementItem().list();\n }\n}', }, kotlin: { - method: 'hris().company().payStatementItem().list', + method: 'hris().payStatementItem().list', example: - 'package com.tryfinch.api.example\n\nimport com.tryfinch.api.client.FinchClient\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient\nimport com.tryfinch.api.models.HrisCompanyPayStatementItemListPage\nimport com.tryfinch.api.models.HrisCompanyPayStatementItemListParams\n\nfun main() {\n val client: FinchClient = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build()\n\n val page: HrisCompanyPayStatementItemListPage = client.hris().company().payStatementItem().list()\n}', + 'package com.tryfinch.api.example\n\nimport com.tryfinch.api.client.FinchClient\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient\nimport com.tryfinch.api.models.HrisPayStatementItemListPage\nimport com.tryfinch.api.models.HrisPayStatementItemListParams\n\nfun main() {\n val client: FinchClient = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build()\n\n val page: HrisPayStatementItemListPage = client.hris().payStatementItem().list()\n}', }, go: { - method: 'client.HRIS.Company.PayStatementItem.List', + method: 'client.HRIS.PayStatementItem.List', example: - 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/Finch-API/finch-api-go"\n\t"github.com/Finch-API/finch-api-go/option"\n)\n\nfunc main() {\n\tclient := finchgo.NewClient(\n\t\toption.WithAccessToken("My Access Token"),\n\t)\n\tpage, err := client.HRIS.Company.PayStatementItem.List(context.TODO(), finchgo.HRISCompanyPayStatementItemListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/Finch-API/finch-api-go"\n\t"github.com/Finch-API/finch-api-go/option"\n)\n\nfunc main() {\n\tclient := finchgo.NewClient(\n\t\toption.WithAccessToken("My Access Token"),\n\t)\n\tpage, err := client.HRIS.PayStatementItem.List(context.TODO(), finchgo.HRISPayStatementItemListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, ruby: { - method: 'hris.company.pay_statement_item.list', + method: 'hris.pay_statement_item.list', example: - 'require "finch_api"\n\nfinch = FinchAPI::Client.new(access_token: "My Access Token")\n\npage = finch.hris.company.pay_statement_item.list\n\nputs(page)', + 'require "finch_api"\n\nfinch = FinchAPI::Client.new(access_token: "My Access Token")\n\npage = finch.hris.pay_statement_item.list\n\nputs(page)', }, http: { example: @@ -215,8 +215,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [ summary: 'Create Rule', description: 'Custom rules can be created to associate specific attributes to pay statement items depending on the use case. For example, pay statement items that meet certain conditions can be labeled as a pre-tax 401k. This metadata can be retrieved where pay statement item information is available.\n', - stainlessPath: '(resource) hris.company.pay_statement_item.rules > (method) create', - qualified: 'client.hris.company.payStatementItem.rules.create', + stainlessPath: '(resource) hris.pay_statement_item.rules > (method) create', + qualified: 'client.hris.payStatementItem.rules.create', params: [ 'entity_ids?: string[];', 'attributes?: { metadata?: object; };', @@ -228,37 +228,37 @@ const EMBEDDED_METHODS: MethodEntry[] = [ response: "{ id?: string; attributes?: { metadata?: object; }; conditions?: { field?: string; operator?: 'equals'; value?: string; }[]; created_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }", markdown: - "## create\n\n`client.hris.company.payStatementItem.rules.create(entity_ids?: string[], attributes?: { metadata?: object; }, conditions?: { field?: string; operator?: 'equals'; value?: string; }[], effective_end_date?: string, effective_start_date?: string, entity_type?: 'pay_statement_item'): { id?: string; attributes?: object; conditions?: object[]; created_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }`\n\n**post** `/employer/pay-statement-item/rule`\n\nCustom rules can be created to associate specific attributes to pay statement items depending on the use case. For example, pay statement items that meet certain conditions can be labeled as a pre-tax 401k. This metadata can be retrieved where pay statement item information is available.\n\n\n### Parameters\n\n- `entity_ids?: string[]`\n The entity IDs to create the rule for.\n\n- `attributes?: { metadata?: object; }`\n Specifies the fields to be applied when the condition is met.\n - `metadata?: object`\n The metadata to be attached in the entity. It is a key-value pairs where the values can be of any type (string, number, boolean, object, array, etc.).\n\n- `conditions?: { field?: string; operator?: 'equals'; value?: string; }[]`\n\n- `effective_end_date?: string`\n Specifies when the rules should stop applying rules based on the date.\n\n- `effective_start_date?: string`\n Specifies when the rule should begin applying based on the date.\n\n- `entity_type?: 'pay_statement_item'`\n The entity type to which the rule is applied.\n\n### Returns\n\n- `{ id?: string; attributes?: { metadata?: object; }; conditions?: { field?: string; operator?: 'equals'; value?: string; }[]; created_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }`\n\n - `id?: string`\n - `attributes?: { metadata?: object; }`\n - `conditions?: { field?: string; operator?: 'equals'; value?: string; }[]`\n - `created_at?: string`\n - `effective_end_date?: string`\n - `effective_start_date?: string`\n - `entity_type?: 'pay_statement_item'`\n - `priority?: number`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\nconst rule = await client.hris.company.payStatementItem.rules.create();\n\nconsole.log(rule);\n```", + "## create\n\n`client.hris.payStatementItem.rules.create(entity_ids?: string[], attributes?: { metadata?: object; }, conditions?: { field?: string; operator?: 'equals'; value?: string; }[], effective_end_date?: string, effective_start_date?: string, entity_type?: 'pay_statement_item'): { id?: string; attributes?: object; conditions?: object[]; created_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }`\n\n**post** `/employer/pay-statement-item/rule`\n\nCustom rules can be created to associate specific attributes to pay statement items depending on the use case. For example, pay statement items that meet certain conditions can be labeled as a pre-tax 401k. This metadata can be retrieved where pay statement item information is available.\n\n\n### Parameters\n\n- `entity_ids?: string[]`\n The entity IDs to create the rule for.\n\n- `attributes?: { metadata?: object; }`\n Specifies the fields to be applied when the condition is met.\n - `metadata?: object`\n The metadata to be attached in the entity. It is a key-value pairs where the values can be of any type (string, number, boolean, object, array, etc.).\n\n- `conditions?: { field?: string; operator?: 'equals'; value?: string; }[]`\n\n- `effective_end_date?: string`\n Specifies when the rules should stop applying rules based on the date.\n\n- `effective_start_date?: string`\n Specifies when the rule should begin applying based on the date.\n\n- `entity_type?: 'pay_statement_item'`\n The entity type to which the rule is applied.\n\n### Returns\n\n- `{ id?: string; attributes?: { metadata?: object; }; conditions?: { field?: string; operator?: 'equals'; value?: string; }[]; created_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }`\n\n - `id?: string`\n - `attributes?: { metadata?: object; }`\n - `conditions?: { field?: string; operator?: 'equals'; value?: string; }[]`\n - `created_at?: string`\n - `effective_end_date?: string`\n - `effective_start_date?: string`\n - `entity_type?: 'pay_statement_item'`\n - `priority?: number`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\nconst rule = await client.hris.payStatementItem.rules.create();\n\nconsole.log(rule);\n```", perLanguage: { typescript: { - method: 'client.hris.company.payStatementItem.rules.create', + method: 'client.hris.payStatementItem.rules.create', example: - "import Finch from '@tryfinch/finch-api';\n\nconst client = new Finch({\n accessToken: 'My Access Token',\n});\n\nconst rule = await client.hris.company.payStatementItem.rules.create();\n\nconsole.log(rule.id);", + "import Finch from '@tryfinch/finch-api';\n\nconst client = new Finch({\n accessToken: 'My Access Token',\n});\n\nconst rule = await client.hris.payStatementItem.rules.create();\n\nconsole.log(rule.id);", }, python: { - method: 'hris.company.pay_statement_item.rules.create', + method: 'hris.pay_statement_item.rules.create', example: - 'from finch import Finch\n\nclient = Finch(\n access_token="My Access Token",\n)\nrule = client.hris.company.pay_statement_item.rules.create()\nprint(rule.id)', + 'from finch import Finch\n\nclient = Finch(\n access_token="My Access Token",\n)\nrule = client.hris.pay_statement_item.rules.create()\nprint(rule.id)', }, java: { - method: 'hris().company().payStatementItem().rules().create', + method: 'hris().payStatementItem().rules().create', example: - 'package com.tryfinch.api.example;\n\nimport com.tryfinch.api.client.FinchClient;\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient;\nimport com.tryfinch.api.models.HrisCompanyPayStatementItemRuleCreateParams;\nimport com.tryfinch.api.models.RuleCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n FinchClient client = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build();\n\n RuleCreateResponse rule = client.hris().company().payStatementItem().rules().create();\n }\n}', + 'package com.tryfinch.api.example;\n\nimport com.tryfinch.api.client.FinchClient;\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient;\nimport com.tryfinch.api.models.HrisPayStatementItemRuleCreateParams;\nimport com.tryfinch.api.models.RuleCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n FinchClient client = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build();\n\n RuleCreateResponse rule = client.hris().payStatementItem().rules().create();\n }\n}', }, kotlin: { - method: 'hris().company().payStatementItem().rules().create', + method: 'hris().payStatementItem().rules().create', example: - 'package com.tryfinch.api.example\n\nimport com.tryfinch.api.client.FinchClient\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient\nimport com.tryfinch.api.models.HrisCompanyPayStatementItemRuleCreateParams\nimport com.tryfinch.api.models.RuleCreateResponse\n\nfun main() {\n val client: FinchClient = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build()\n\n val rule: RuleCreateResponse = client.hris().company().payStatementItem().rules().create()\n}', + 'package com.tryfinch.api.example\n\nimport com.tryfinch.api.client.FinchClient\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient\nimport com.tryfinch.api.models.HrisPayStatementItemRuleCreateParams\nimport com.tryfinch.api.models.RuleCreateResponse\n\nfun main() {\n val client: FinchClient = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build()\n\n val rule: RuleCreateResponse = client.hris().payStatementItem().rules().create()\n}', }, go: { - method: 'client.HRIS.Company.PayStatementItem.Rules.New', + method: 'client.HRIS.PayStatementItem.Rules.New', example: - 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/Finch-API/finch-api-go"\n\t"github.com/Finch-API/finch-api-go/option"\n)\n\nfunc main() {\n\tclient := finchgo.NewClient(\n\t\toption.WithAccessToken("My Access Token"),\n\t)\n\trule, err := client.HRIS.Company.PayStatementItem.Rules.New(context.TODO(), finchgo.HRISCompanyPayStatementItemRuleNewParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", rule.ID)\n}\n', + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/Finch-API/finch-api-go"\n\t"github.com/Finch-API/finch-api-go/option"\n)\n\nfunc main() {\n\tclient := finchgo.NewClient(\n\t\toption.WithAccessToken("My Access Token"),\n\t)\n\trule, err := client.HRIS.PayStatementItem.Rules.New(context.TODO(), finchgo.HRISPayStatementItemRuleNewParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", rule.ID)\n}\n', }, ruby: { - method: 'hris.company.pay_statement_item.rules.create', + method: 'hris.pay_statement_item.rules.create', example: - 'require "finch_api"\n\nfinch = FinchAPI::Client.new(access_token: "My Access Token")\n\nrule = finch.hris.company.pay_statement_item.rules.create\n\nputs(rule)', + 'require "finch_api"\n\nfinch = FinchAPI::Client.new(access_token: "My Access Token")\n\nrule = finch.hris.pay_statement_item.rules.create\n\nputs(rule)', }, http: { example: @@ -272,43 +272,43 @@ const EMBEDDED_METHODS: MethodEntry[] = [ httpMethod: 'get', summary: 'Get Rules', description: 'List all rules of a connection account.', - stainlessPath: '(resource) hris.company.pay_statement_item.rules > (method) list', - qualified: 'client.hris.company.payStatementItem.rules.list', + stainlessPath: '(resource) hris.pay_statement_item.rules > (method) list', + qualified: 'client.hris.payStatementItem.rules.list', params: ['entity_ids?: string[];'], response: "{ id?: string; attributes?: { metadata?: object; }; conditions?: { field?: string; operator?: 'equals'; value?: string; }[]; created_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }", markdown: - "## list\n\n`client.hris.company.payStatementItem.rules.list(entity_ids?: string[]): { id?: string; attributes?: object; conditions?: object[]; created_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }`\n\n**get** `/employer/pay-statement-item/rule`\n\nList all rules of a connection account.\n\n### Parameters\n\n- `entity_ids?: string[]`\n The entity IDs to retrieve rules for.\n\n### Returns\n\n- `{ id?: string; attributes?: { metadata?: object; }; conditions?: { field?: string; operator?: 'equals'; value?: string; }[]; created_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }`\n\n - `id?: string`\n - `attributes?: { metadata?: object; }`\n - `conditions?: { field?: string; operator?: 'equals'; value?: string; }[]`\n - `created_at?: string`\n - `effective_end_date?: string`\n - `effective_start_date?: string`\n - `entity_type?: 'pay_statement_item'`\n - `priority?: number`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\n// Automatically fetches more pages as needed.\nfor await (const ruleListResponse of client.hris.company.payStatementItem.rules.list()) {\n console.log(ruleListResponse);\n}\n```", + "## list\n\n`client.hris.payStatementItem.rules.list(entity_ids?: string[]): { id?: string; attributes?: object; conditions?: object[]; created_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }`\n\n**get** `/employer/pay-statement-item/rule`\n\nList all rules of a connection account.\n\n### Parameters\n\n- `entity_ids?: string[]`\n The entity IDs to retrieve rules for.\n\n### Returns\n\n- `{ id?: string; attributes?: { metadata?: object; }; conditions?: { field?: string; operator?: 'equals'; value?: string; }[]; created_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }`\n\n - `id?: string`\n - `attributes?: { metadata?: object; }`\n - `conditions?: { field?: string; operator?: 'equals'; value?: string; }[]`\n - `created_at?: string`\n - `effective_end_date?: string`\n - `effective_start_date?: string`\n - `entity_type?: 'pay_statement_item'`\n - `priority?: number`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\n// Automatically fetches more pages as needed.\nfor await (const ruleListResponse of client.hris.payStatementItem.rules.list()) {\n console.log(ruleListResponse);\n}\n```", perLanguage: { typescript: { - method: 'client.hris.company.payStatementItem.rules.list', + method: 'client.hris.payStatementItem.rules.list', example: - "import Finch from '@tryfinch/finch-api';\n\nconst client = new Finch({\n accessToken: 'My Access Token',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const ruleListResponse of client.hris.company.payStatementItem.rules.list()) {\n console.log(ruleListResponse.id);\n}", + "import Finch from '@tryfinch/finch-api';\n\nconst client = new Finch({\n accessToken: 'My Access Token',\n});\n\n// Automatically fetches more pages as needed.\nfor await (const ruleListResponse of client.hris.payStatementItem.rules.list()) {\n console.log(ruleListResponse.id);\n}", }, python: { - method: 'hris.company.pay_statement_item.rules.list', + method: 'hris.pay_statement_item.rules.list', example: - 'from finch import Finch\n\nclient = Finch(\n access_token="My Access Token",\n)\npage = client.hris.company.pay_statement_item.rules.list()\npage = page.responses[0]\nprint(page.id)', + 'from finch import Finch\n\nclient = Finch(\n access_token="My Access Token",\n)\npage = client.hris.pay_statement_item.rules.list()\npage = page.responses[0]\nprint(page.id)', }, java: { - method: 'hris().company().payStatementItem().rules().list', + method: 'hris().payStatementItem().rules().list', example: - 'package com.tryfinch.api.example;\n\nimport com.tryfinch.api.client.FinchClient;\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient;\nimport com.tryfinch.api.models.HrisCompanyPayStatementItemRuleListPage;\nimport com.tryfinch.api.models.HrisCompanyPayStatementItemRuleListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n FinchClient client = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build();\n\n HrisCompanyPayStatementItemRuleListPage page = client.hris().company().payStatementItem().rules().list();\n }\n}', + 'package com.tryfinch.api.example;\n\nimport com.tryfinch.api.client.FinchClient;\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient;\nimport com.tryfinch.api.models.HrisPayStatementItemRuleListPage;\nimport com.tryfinch.api.models.HrisPayStatementItemRuleListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n FinchClient client = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build();\n\n HrisPayStatementItemRuleListPage page = client.hris().payStatementItem().rules().list();\n }\n}', }, kotlin: { - method: 'hris().company().payStatementItem().rules().list', + method: 'hris().payStatementItem().rules().list', example: - 'package com.tryfinch.api.example\n\nimport com.tryfinch.api.client.FinchClient\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient\nimport com.tryfinch.api.models.HrisCompanyPayStatementItemRuleListPage\nimport com.tryfinch.api.models.HrisCompanyPayStatementItemRuleListParams\n\nfun main() {\n val client: FinchClient = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build()\n\n val page: HrisCompanyPayStatementItemRuleListPage = client.hris().company().payStatementItem().rules().list()\n}', + 'package com.tryfinch.api.example\n\nimport com.tryfinch.api.client.FinchClient\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient\nimport com.tryfinch.api.models.HrisPayStatementItemRuleListPage\nimport com.tryfinch.api.models.HrisPayStatementItemRuleListParams\n\nfun main() {\n val client: FinchClient = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build()\n\n val page: HrisPayStatementItemRuleListPage = client.hris().payStatementItem().rules().list()\n}', }, go: { - method: 'client.HRIS.Company.PayStatementItem.Rules.List', + method: 'client.HRIS.PayStatementItem.Rules.List', example: - 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/Finch-API/finch-api-go"\n\t"github.com/Finch-API/finch-api-go/option"\n)\n\nfunc main() {\n\tclient := finchgo.NewClient(\n\t\toption.WithAccessToken("My Access Token"),\n\t)\n\tpage, err := client.HRIS.Company.PayStatementItem.Rules.List(context.TODO(), finchgo.HRISCompanyPayStatementItemRuleListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/Finch-API/finch-api-go"\n\t"github.com/Finch-API/finch-api-go/option"\n)\n\nfunc main() {\n\tclient := finchgo.NewClient(\n\t\toption.WithAccessToken("My Access Token"),\n\t)\n\tpage, err := client.HRIS.PayStatementItem.Rules.List(context.TODO(), finchgo.HRISPayStatementItemRuleListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, ruby: { - method: 'hris.company.pay_statement_item.rules.list', + method: 'hris.pay_statement_item.rules.list', example: - 'require "finch_api"\n\nfinch = FinchAPI::Client.new(access_token: "My Access Token")\n\npage = finch.hris.company.pay_statement_item.rules.list\n\nputs(page)', + 'require "finch_api"\n\nfinch = FinchAPI::Client.new(access_token: "My Access Token")\n\npage = finch.hris.pay_statement_item.rules.list\n\nputs(page)', }, http: { example: @@ -322,43 +322,43 @@ const EMBEDDED_METHODS: MethodEntry[] = [ httpMethod: 'put', summary: 'Update Rule', description: 'Update a rule for a pay statement item.', - stainlessPath: '(resource) hris.company.pay_statement_item.rules > (method) update', - qualified: 'client.hris.company.payStatementItem.rules.update', + stainlessPath: '(resource) hris.pay_statement_item.rules > (method) update', + qualified: 'client.hris.payStatementItem.rules.update', params: ['rule_id: string;', 'entity_ids?: string[];', 'optionalProperty?: object;'], response: "{ id?: string; attributes?: { metadata?: object; }; conditions?: { field?: string; operator?: 'equals'; value?: string; }[]; created_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }", markdown: - "## update\n\n`client.hris.company.payStatementItem.rules.update(rule_id: string, entity_ids?: string[], optionalProperty?: object): { id?: string; attributes?: object; conditions?: object[]; created_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }`\n\n**put** `/employer/pay-statement-item/rule/{rule_id}`\n\nUpdate a rule for a pay statement item.\n\n### Parameters\n\n- `rule_id: string`\n\n- `entity_ids?: string[]`\n The entity IDs to update the rule for.\n\n- `optionalProperty?: object`\n\n### Returns\n\n- `{ id?: string; attributes?: { metadata?: object; }; conditions?: { field?: string; operator?: 'equals'; value?: string; }[]; created_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }`\n\n - `id?: string`\n - `attributes?: { metadata?: object; }`\n - `conditions?: { field?: string; operator?: 'equals'; value?: string; }[]`\n - `created_at?: string`\n - `effective_end_date?: string`\n - `effective_start_date?: string`\n - `entity_type?: 'pay_statement_item'`\n - `priority?: number`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\nconst rule = await client.hris.company.payStatementItem.rules.update('rule_id');\n\nconsole.log(rule);\n```", + "## update\n\n`client.hris.payStatementItem.rules.update(rule_id: string, entity_ids?: string[], optionalProperty?: object): { id?: string; attributes?: object; conditions?: object[]; created_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }`\n\n**put** `/employer/pay-statement-item/rule/{rule_id}`\n\nUpdate a rule for a pay statement item.\n\n### Parameters\n\n- `rule_id: string`\n\n- `entity_ids?: string[]`\n The entity IDs to update the rule for.\n\n- `optionalProperty?: object`\n\n### Returns\n\n- `{ id?: string; attributes?: { metadata?: object; }; conditions?: { field?: string; operator?: 'equals'; value?: string; }[]; created_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }`\n\n - `id?: string`\n - `attributes?: { metadata?: object; }`\n - `conditions?: { field?: string; operator?: 'equals'; value?: string; }[]`\n - `created_at?: string`\n - `effective_end_date?: string`\n - `effective_start_date?: string`\n - `entity_type?: 'pay_statement_item'`\n - `priority?: number`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\nconst rule = await client.hris.payStatementItem.rules.update('rule_id');\n\nconsole.log(rule);\n```", perLanguage: { typescript: { - method: 'client.hris.company.payStatementItem.rules.update', + method: 'client.hris.payStatementItem.rules.update', example: - "import Finch from '@tryfinch/finch-api';\n\nconst client = new Finch({\n accessToken: 'My Access Token',\n});\n\nconst rule = await client.hris.company.payStatementItem.rules.update('rule_id');\n\nconsole.log(rule.id);", + "import Finch from '@tryfinch/finch-api';\n\nconst client = new Finch({\n accessToken: 'My Access Token',\n});\n\nconst rule = await client.hris.payStatementItem.rules.update('rule_id');\n\nconsole.log(rule.id);", }, python: { - method: 'hris.company.pay_statement_item.rules.update', + method: 'hris.pay_statement_item.rules.update', example: - 'from finch import Finch\n\nclient = Finch(\n access_token="My Access Token",\n)\nrule = client.hris.company.pay_statement_item.rules.update(\n rule_id="rule_id",\n)\nprint(rule.id)', + 'from finch import Finch\n\nclient = Finch(\n access_token="My Access Token",\n)\nrule = client.hris.pay_statement_item.rules.update(\n rule_id="rule_id",\n)\nprint(rule.id)', }, java: { - method: 'hris().company().payStatementItem().rules().update', + method: 'hris().payStatementItem().rules().update', example: - 'package com.tryfinch.api.example;\n\nimport com.tryfinch.api.client.FinchClient;\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient;\nimport com.tryfinch.api.models.HrisCompanyPayStatementItemRuleUpdateParams;\nimport com.tryfinch.api.models.RuleUpdateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n FinchClient client = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build();\n\n RuleUpdateResponse rule = client.hris().company().payStatementItem().rules().update("rule_id");\n }\n}', + 'package com.tryfinch.api.example;\n\nimport com.tryfinch.api.client.FinchClient;\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient;\nimport com.tryfinch.api.models.HrisPayStatementItemRuleUpdateParams;\nimport com.tryfinch.api.models.RuleUpdateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n FinchClient client = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build();\n\n RuleUpdateResponse rule = client.hris().payStatementItem().rules().update("rule_id");\n }\n}', }, kotlin: { - method: 'hris().company().payStatementItem().rules().update', + method: 'hris().payStatementItem().rules().update', example: - 'package com.tryfinch.api.example\n\nimport com.tryfinch.api.client.FinchClient\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient\nimport com.tryfinch.api.models.HrisCompanyPayStatementItemRuleUpdateParams\nimport com.tryfinch.api.models.RuleUpdateResponse\n\nfun main() {\n val client: FinchClient = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build()\n\n val rule: RuleUpdateResponse = client.hris().company().payStatementItem().rules().update("rule_id")\n}', + 'package com.tryfinch.api.example\n\nimport com.tryfinch.api.client.FinchClient\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient\nimport com.tryfinch.api.models.HrisPayStatementItemRuleUpdateParams\nimport com.tryfinch.api.models.RuleUpdateResponse\n\nfun main() {\n val client: FinchClient = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build()\n\n val rule: RuleUpdateResponse = client.hris().payStatementItem().rules().update("rule_id")\n}', }, go: { - method: 'client.HRIS.Company.PayStatementItem.Rules.Update', + method: 'client.HRIS.PayStatementItem.Rules.Update', example: - 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/Finch-API/finch-api-go"\n\t"github.com/Finch-API/finch-api-go/option"\n)\n\nfunc main() {\n\tclient := finchgo.NewClient(\n\t\toption.WithAccessToken("My Access Token"),\n\t)\n\trule, err := client.HRIS.Company.PayStatementItem.Rules.Update(\n\t\tcontext.TODO(),\n\t\t"rule_id",\n\t\tfinchgo.HRISCompanyPayStatementItemRuleUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", rule.ID)\n}\n', + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/Finch-API/finch-api-go"\n\t"github.com/Finch-API/finch-api-go/option"\n)\n\nfunc main() {\n\tclient := finchgo.NewClient(\n\t\toption.WithAccessToken("My Access Token"),\n\t)\n\trule, err := client.HRIS.PayStatementItem.Rules.Update(\n\t\tcontext.TODO(),\n\t\t"rule_id",\n\t\tfinchgo.HRISPayStatementItemRuleUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", rule.ID)\n}\n', }, ruby: { - method: 'hris.company.pay_statement_item.rules.update', + method: 'hris.pay_statement_item.rules.update', example: - 'require "finch_api"\n\nfinch = FinchAPI::Client.new(access_token: "My Access Token")\n\nrule = finch.hris.company.pay_statement_item.rules.update("rule_id")\n\nputs(rule)', + 'require "finch_api"\n\nfinch = FinchAPI::Client.new(access_token: "My Access Token")\n\nrule = finch.hris.pay_statement_item.rules.update("rule_id")\n\nputs(rule)', }, http: { example: @@ -372,43 +372,43 @@ const EMBEDDED_METHODS: MethodEntry[] = [ httpMethod: 'delete', summary: 'Delete Rule', description: 'Delete a rule for a pay statement item.', - stainlessPath: '(resource) hris.company.pay_statement_item.rules > (method) delete', - qualified: 'client.hris.company.payStatementItem.rules.delete', + stainlessPath: '(resource) hris.pay_statement_item.rules > (method) delete', + qualified: 'client.hris.payStatementItem.rules.delete', params: ['rule_id: string;', 'entity_ids?: string[];'], response: "{ id?: string; attributes?: { metadata?: object; }; conditions?: { field?: string; operator?: 'equals'; value?: string; }[]; created_at?: string; deleted_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }", markdown: - "## delete\n\n`client.hris.company.payStatementItem.rules.delete(rule_id: string, entity_ids?: string[]): { id?: string; attributes?: object; conditions?: object[]; created_at?: string; deleted_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }`\n\n**delete** `/employer/pay-statement-item/rule/{rule_id}`\n\nDelete a rule for a pay statement item.\n\n### Parameters\n\n- `rule_id: string`\n\n- `entity_ids?: string[]`\n The entity IDs to delete the rule for.\n\n### Returns\n\n- `{ id?: string; attributes?: { metadata?: object; }; conditions?: { field?: string; operator?: 'equals'; value?: string; }[]; created_at?: string; deleted_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }`\n\n - `id?: string`\n - `attributes?: { metadata?: object; }`\n - `conditions?: { field?: string; operator?: 'equals'; value?: string; }[]`\n - `created_at?: string`\n - `deleted_at?: string`\n - `effective_end_date?: string`\n - `effective_start_date?: string`\n - `entity_type?: 'pay_statement_item'`\n - `priority?: number`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\nconst rule = await client.hris.company.payStatementItem.rules.delete('rule_id');\n\nconsole.log(rule);\n```", + "## delete\n\n`client.hris.payStatementItem.rules.delete(rule_id: string, entity_ids?: string[]): { id?: string; attributes?: object; conditions?: object[]; created_at?: string; deleted_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }`\n\n**delete** `/employer/pay-statement-item/rule/{rule_id}`\n\nDelete a rule for a pay statement item.\n\n### Parameters\n\n- `rule_id: string`\n\n- `entity_ids?: string[]`\n The entity IDs to delete the rule for.\n\n### Returns\n\n- `{ id?: string; attributes?: { metadata?: object; }; conditions?: { field?: string; operator?: 'equals'; value?: string; }[]; created_at?: string; deleted_at?: string; effective_end_date?: string; effective_start_date?: string; entity_type?: 'pay_statement_item'; priority?: number; updated_at?: string; }`\n\n - `id?: string`\n - `attributes?: { metadata?: object; }`\n - `conditions?: { field?: string; operator?: 'equals'; value?: string; }[]`\n - `created_at?: string`\n - `deleted_at?: string`\n - `effective_end_date?: string`\n - `effective_start_date?: string`\n - `entity_type?: 'pay_statement_item'`\n - `priority?: number`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport Finch from '@tryfinch/finch-api';\n\nconst client = new Finch();\n\nconst rule = await client.hris.payStatementItem.rules.delete('rule_id');\n\nconsole.log(rule);\n```", perLanguage: { typescript: { - method: 'client.hris.company.payStatementItem.rules.delete', + method: 'client.hris.payStatementItem.rules.delete', example: - "import Finch from '@tryfinch/finch-api';\n\nconst client = new Finch({\n accessToken: 'My Access Token',\n});\n\nconst rule = await client.hris.company.payStatementItem.rules.delete('rule_id');\n\nconsole.log(rule.id);", + "import Finch from '@tryfinch/finch-api';\n\nconst client = new Finch({\n accessToken: 'My Access Token',\n});\n\nconst rule = await client.hris.payStatementItem.rules.delete('rule_id');\n\nconsole.log(rule.id);", }, python: { - method: 'hris.company.pay_statement_item.rules.delete', + method: 'hris.pay_statement_item.rules.delete', example: - 'from finch import Finch\n\nclient = Finch(\n access_token="My Access Token",\n)\nrule = client.hris.company.pay_statement_item.rules.delete(\n rule_id="rule_id",\n)\nprint(rule.id)', + 'from finch import Finch\n\nclient = Finch(\n access_token="My Access Token",\n)\nrule = client.hris.pay_statement_item.rules.delete(\n rule_id="rule_id",\n)\nprint(rule.id)', }, java: { - method: 'hris().company().payStatementItem().rules().delete', + method: 'hris().payStatementItem().rules().delete', example: - 'package com.tryfinch.api.example;\n\nimport com.tryfinch.api.client.FinchClient;\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient;\nimport com.tryfinch.api.models.HrisCompanyPayStatementItemRuleDeleteParams;\nimport com.tryfinch.api.models.RuleDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n FinchClient client = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build();\n\n RuleDeleteResponse rule = client.hris().company().payStatementItem().rules().delete("rule_id");\n }\n}', + 'package com.tryfinch.api.example;\n\nimport com.tryfinch.api.client.FinchClient;\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient;\nimport com.tryfinch.api.models.HrisPayStatementItemRuleDeleteParams;\nimport com.tryfinch.api.models.RuleDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n FinchClient client = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build();\n\n RuleDeleteResponse rule = client.hris().payStatementItem().rules().delete("rule_id");\n }\n}', }, kotlin: { - method: 'hris().company().payStatementItem().rules().delete', + method: 'hris().payStatementItem().rules().delete', example: - 'package com.tryfinch.api.example\n\nimport com.tryfinch.api.client.FinchClient\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient\nimport com.tryfinch.api.models.HrisCompanyPayStatementItemRuleDeleteParams\nimport com.tryfinch.api.models.RuleDeleteResponse\n\nfun main() {\n val client: FinchClient = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build()\n\n val rule: RuleDeleteResponse = client.hris().company().payStatementItem().rules().delete("rule_id")\n}', + 'package com.tryfinch.api.example\n\nimport com.tryfinch.api.client.FinchClient\nimport com.tryfinch.api.client.okhttp.FinchOkHttpClient\nimport com.tryfinch.api.models.HrisPayStatementItemRuleDeleteParams\nimport com.tryfinch.api.models.RuleDeleteResponse\n\nfun main() {\n val client: FinchClient = FinchOkHttpClient.builder()\n .fromEnv()\n .accessToken("My Access Token")\n .build()\n\n val rule: RuleDeleteResponse = client.hris().payStatementItem().rules().delete("rule_id")\n}', }, go: { - method: 'client.HRIS.Company.PayStatementItem.Rules.Delete', + method: 'client.HRIS.PayStatementItem.Rules.Delete', example: - 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/Finch-API/finch-api-go"\n\t"github.com/Finch-API/finch-api-go/option"\n)\n\nfunc main() {\n\tclient := finchgo.NewClient(\n\t\toption.WithAccessToken("My Access Token"),\n\t)\n\trule, err := client.HRIS.Company.PayStatementItem.Rules.Delete(\n\t\tcontext.TODO(),\n\t\t"rule_id",\n\t\tfinchgo.HRISCompanyPayStatementItemRuleDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", rule.ID)\n}\n', + 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/Finch-API/finch-api-go"\n\t"github.com/Finch-API/finch-api-go/option"\n)\n\nfunc main() {\n\tclient := finchgo.NewClient(\n\t\toption.WithAccessToken("My Access Token"),\n\t)\n\trule, err := client.HRIS.PayStatementItem.Rules.Delete(\n\t\tcontext.TODO(),\n\t\t"rule_id",\n\t\tfinchgo.HRISPayStatementItemRuleDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", rule.ID)\n}\n', }, ruby: { - method: 'hris.company.pay_statement_item.rules.delete', + method: 'hris.pay_statement_item.rules.delete', example: - 'require "finch_api"\n\nfinch = FinchAPI::Client.new(access_token: "My Access Token")\n\nrule = finch.hris.company.pay_statement_item.rules.delete("rule_id")\n\nputs(rule)', + 'require "finch_api"\n\nfinch = FinchAPI::Client.new(access_token: "My Access Token")\n\nrule = finch.hris.pay_statement_item.rules.delete("rule_id")\n\nputs(rule)', }, http: { example: diff --git a/packages/mcp-server/src/methods.ts b/packages/mcp-server/src/methods.ts index 8243dcf6a..546a5d16c 100644 --- a/packages/mcp-server/src/methods.ts +++ b/packages/mcp-server/src/methods.ts @@ -23,32 +23,32 @@ export const sdkMethods: SdkMethod[] = [ httpPath: '/employer/company', }, { - clientCallName: 'client.hris.company.payStatementItem.list', - fullyQualifiedName: 'hris.company.payStatementItem.list', + clientCallName: 'client.hris.payStatementItem.list', + fullyQualifiedName: 'hris.payStatementItem.list', httpMethod: 'get', httpPath: '/employer/pay-statement-item', }, { - clientCallName: 'client.hris.company.payStatementItem.rules.create', - fullyQualifiedName: 'hris.company.payStatementItem.rules.create', + clientCallName: 'client.hris.payStatementItem.rules.create', + fullyQualifiedName: 'hris.payStatementItem.rules.create', httpMethod: 'post', httpPath: '/employer/pay-statement-item/rule', }, { - clientCallName: 'client.hris.company.payStatementItem.rules.update', - fullyQualifiedName: 'hris.company.payStatementItem.rules.update', + clientCallName: 'client.hris.payStatementItem.rules.update', + fullyQualifiedName: 'hris.payStatementItem.rules.update', httpMethod: 'put', httpPath: '/employer/pay-statement-item/rule/{rule_id}', }, { - clientCallName: 'client.hris.company.payStatementItem.rules.list', - fullyQualifiedName: 'hris.company.payStatementItem.rules.list', + clientCallName: 'client.hris.payStatementItem.rules.list', + fullyQualifiedName: 'hris.payStatementItem.rules.list', httpMethod: 'get', httpPath: '/employer/pay-statement-item/rule', }, { - clientCallName: 'client.hris.company.payStatementItem.rules.delete', - fullyQualifiedName: 'hris.company.payStatementItem.rules.delete', + clientCallName: 'client.hris.payStatementItem.rules.delete', + fullyQualifiedName: 'hris.payStatementItem.rules.delete', httpMethod: 'delete', httpPath: '/employer/pay-statement-item/rule/{rule_id}', }, diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index 473f13fbf..e93339bf4 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -29,7 +29,7 @@ export const newMcpServer = async ({ new McpServer( { name: 'tryfinch_finch_api_api', - version: '9.13.0', + version: '10.0.0', }, { instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }), diff --git a/src/resources/hris/company.ts b/src/resources/hris/company.ts index ea307356d..078d07f88 100644 --- a/src/resources/hris/company.ts +++ b/src/resources/hris/company.ts @@ -1,3 +1,156 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export * from './company/index'; +import { APIResource } from '../../core/resource'; +import * as HRISAPI from './hris'; +import { APIPromise } from '../../core/api-promise'; +import { RequestOptions } from '../../internal/request-options'; + +export class CompanyResource extends APIResource { + /** + * Read basic company data + * + * @example + * ```ts + * const company = await client.hris.company.retrieve(); + * ``` + */ + retrieve( + query: CompanyRetrieveParams | null | undefined = {}, + options?: RequestOptions, + ): APIPromise { + return this._client.get('/employer/company', { query, ...options, __security: { bearerAuth: true } }); + } +} + +export interface Company { + /** + * A stable Finch `id` (UUID v4) for the company. + */ + id: string; + + /** + * An array of bank account objects associated with the payroll/HRIS system. + */ + accounts: Array | null; + + /** + * The array of company departments. + */ + departments: Array | null; + + /** + * The employer identification number. + */ + ein: string | null; + + /** + * The entity type object. + */ + entity: Company.Entity | null; + + /** + * The legal name of the company. + */ + legal_name: string | null; + + locations: Array | null; + + /** + * The email of the main administrator on the account. + */ + primary_email: string | null; + + /** + * The phone number of the main administrator on the account. Format: E.164, with + * extension where applicable, e.g. `+NNNNNNNNNNN xExtension` + */ + primary_phone_number: string | null; +} + +export namespace Company { + export interface Account { + /** + * The name of the bank associated in the payroll/HRIS system. + */ + account_name: string | null; + + /** + * 10-12 digit number to specify the bank account + */ + account_number: string | null; + + /** + * The type of bank account. + */ + account_type: 'checking' | 'savings' | null; + + /** + * Name of the banking institution. + */ + institution_name: string | null; + + /** + * A nine-digit code that's based on the U.S. Bank location where your account was + * opened. + */ + routing_number: string | null; + } + + export interface Department { + /** + * The department name. + */ + name: string | null; + + /** + * The parent department, if present. + */ + parent: Department.Parent | null; + } + + export namespace Department { + /** + * The parent department, if present. + */ + export interface Parent { + /** + * The parent department's name. + */ + name: string | null; + } + } + + /** + * The entity type object. + */ + export interface Entity { + /** + * The tax payer subtype of the company. + */ + subtype: 's_corporation' | 'c_corporation' | 'b_corporation' | null; + + /** + * The tax payer type of the company. + */ + type: + | 'llc' + | 'lp' + | 'corporation' + | 'sole_proprietor' + | 'non_profit' + | 'partnership' + | 'cooperative' + | null; + } +} + +export interface CompanyRetrieveParams { + /** + * The entity IDs to specify which entities' data to access. + */ + entity_ids?: Array; +} + +export declare namespace CompanyResource { + export { type Company as Company, type CompanyRetrieveParams as CompanyRetrieveParams }; +} diff --git a/src/resources/hris/company/company.ts b/src/resources/hris/company/company.ts deleted file mode 100644 index bec6a7020..000000000 --- a/src/resources/hris/company/company.ts +++ /dev/null @@ -1,176 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -import { APIResource } from '../../../core/resource'; -import * as HRISAPI from '../hris'; -import * as PayStatementItemAPI from './pay-statement-item/pay-statement-item'; -import { - PayStatementItem, - PayStatementItemListParams, - PayStatementItemListResponse, - PayStatementItemListResponsesPage, -} from './pay-statement-item/pay-statement-item'; -import { APIPromise } from '../../../core/api-promise'; -import { RequestOptions } from '../../../internal/request-options'; - -export class CompanyResource extends APIResource { - payStatementItem: PayStatementItemAPI.PayStatementItem = new PayStatementItemAPI.PayStatementItem( - this._client, - ); - - /** - * Read basic company data - * - * @example - * ```ts - * const company = await client.hris.company.retrieve(); - * ``` - */ - retrieve( - query: CompanyRetrieveParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { - return this._client.get('/employer/company', { query, ...options, __security: { bearerAuth: true } }); - } -} - -export interface Company { - /** - * A stable Finch `id` (UUID v4) for the company. - */ - id: string; - - /** - * An array of bank account objects associated with the payroll/HRIS system. - */ - accounts: Array | null; - - /** - * The array of company departments. - */ - departments: Array | null; - - /** - * The employer identification number. - */ - ein: string | null; - - /** - * The entity type object. - */ - entity: Company.Entity | null; - - /** - * The legal name of the company. - */ - legal_name: string | null; - - locations: Array | null; - - /** - * The email of the main administrator on the account. - */ - primary_email: string | null; - - /** - * The phone number of the main administrator on the account. Format: E.164, with - * extension where applicable, e.g. `+NNNNNNNNNNN xExtension` - */ - primary_phone_number: string | null; -} - -export namespace Company { - export interface Account { - /** - * The name of the bank associated in the payroll/HRIS system. - */ - account_name: string | null; - - /** - * 10-12 digit number to specify the bank account - */ - account_number: string | null; - - /** - * The type of bank account. - */ - account_type: 'checking' | 'savings' | null; - - /** - * Name of the banking institution. - */ - institution_name: string | null; - - /** - * A nine-digit code that's based on the U.S. Bank location where your account was - * opened. - */ - routing_number: string | null; - } - - export interface Department { - /** - * The department name. - */ - name: string | null; - - /** - * The parent department, if present. - */ - parent: Department.Parent | null; - } - - export namespace Department { - /** - * The parent department, if present. - */ - export interface Parent { - /** - * The parent department's name. - */ - name: string | null; - } - } - - /** - * The entity type object. - */ - export interface Entity { - /** - * The tax payer subtype of the company. - */ - subtype: 's_corporation' | 'c_corporation' | 'b_corporation' | null; - - /** - * The tax payer type of the company. - */ - type: - | 'llc' - | 'lp' - | 'corporation' - | 'sole_proprietor' - | 'non_profit' - | 'partnership' - | 'cooperative' - | null; - } -} - -export interface CompanyRetrieveParams { - /** - * The entity IDs to specify which entities' data to access. - */ - entity_ids?: Array; -} - -CompanyResource.PayStatementItem = PayStatementItem; - -export declare namespace CompanyResource { - export { type Company as Company, type CompanyRetrieveParams as CompanyRetrieveParams }; - - export { - PayStatementItem as PayStatementItem, - type PayStatementItemListResponse as PayStatementItemListResponse, - type PayStatementItemListResponsesPage as PayStatementItemListResponsesPage, - type PayStatementItemListParams as PayStatementItemListParams, - }; -} diff --git a/src/resources/hris/company/index.ts b/src/resources/hris/company/index.ts deleted file mode 100644 index 94a550df7..000000000 --- a/src/resources/hris/company/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -export { CompanyResource, type Company, type CompanyRetrieveParams } from './company'; -export { - PayStatementItem, - type PayStatementItemListResponse, - type PayStatementItemListParams, - type PayStatementItemListResponsesPage, -} from './pay-statement-item/index'; diff --git a/src/resources/hris/hris.ts b/src/resources/hris/hris.ts index 50de15d38..c86886e2e 100644 --- a/src/resources/hris/hris.ts +++ b/src/resources/hris/hris.ts @@ -1,6 +1,8 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../../core/resource'; +import * as CompanyAPI from './company'; +import { Company, CompanyResource, CompanyRetrieveParams } from './company'; import * as DirectoryAPI from './directory'; import { Directory, @@ -71,11 +73,19 @@ import { SupportedBenefitsSinglePage, UpdateCompanyBenefitResponse, } from './benefits/benefits'; -import * as CompanyAPI from './company/company'; -import { Company, CompanyResource, CompanyRetrieveParams } from './company/company'; +import * as PayStatementItemAPI from './pay-statement-item/pay-statement-item'; +import { + PayStatementItem, + PayStatementItemListParams, + PayStatementItemListResponse, + PayStatementItemListResponsesPage, +} from './pay-statement-item/pay-statement-item'; export class HRIS extends APIResource { company: CompanyAPI.CompanyResource = new CompanyAPI.CompanyResource(this._client); + payStatementItem: PayStatementItemAPI.PayStatementItem = new PayStatementItemAPI.PayStatementItem( + this._client, + ); directory: DirectoryAPI.Directory = new DirectoryAPI.Directory(this._client); individuals: IndividualsAPI.Individuals = new IndividualsAPI.Individuals(this._client); employments: EmploymentsAPI.Employments = new EmploymentsAPI.Employments(this._client); @@ -169,6 +179,7 @@ export interface Money { } HRIS.CompanyResource = CompanyResource; +HRIS.PayStatementItem = PayStatementItem; HRIS.Directory = Directory; HRIS.Individuals = Individuals; HRIS.Employments = Employments; @@ -186,6 +197,13 @@ export declare namespace HRIS { type CompanyRetrieveParams as CompanyRetrieveParams, }; + export { + PayStatementItem as PayStatementItem, + type PayStatementItemListResponse as PayStatementItemListResponse, + type PayStatementItemListResponsesPage as PayStatementItemListResponsesPage, + type PayStatementItemListParams as PayStatementItemListParams, + }; + export { Directory as Directory, type IndividualInDirectory as IndividualInDirectory, diff --git a/src/resources/hris/index.ts b/src/resources/hris/index.ts index ce6e985c8..a7a4ea9ba 100644 --- a/src/resources/hris/index.ts +++ b/src/resources/hris/index.ts @@ -23,7 +23,7 @@ export { type CompanyBenefitsSinglePage, type SupportedBenefitsSinglePage, } from './benefits/index'; -export { CompanyResource, type Company, type CompanyRetrieveParams } from './company/index'; +export { CompanyResource, type Company, type CompanyRetrieveParams } from './company'; export { Directory, type IndividualInDirectory, @@ -55,6 +55,12 @@ export { type IndividualRetrieveManyParams, type IndividualResponsesPage, } from './individuals'; +export { + PayStatementItem, + type PayStatementItemListResponse, + type PayStatementItemListParams, + type PayStatementItemListResponsesPage, +} from './pay-statement-item/index'; export { PayStatements, type PayStatement, diff --git a/src/resources/hris/company/pay-statement-item.ts b/src/resources/hris/pay-statement-item.ts similarity index 100% rename from src/resources/hris/company/pay-statement-item.ts rename to src/resources/hris/pay-statement-item.ts diff --git a/src/resources/hris/company/pay-statement-item/index.ts b/src/resources/hris/pay-statement-item/index.ts similarity index 100% rename from src/resources/hris/company/pay-statement-item/index.ts rename to src/resources/hris/pay-statement-item/index.ts diff --git a/src/resources/hris/company/pay-statement-item/pay-statement-item.ts b/src/resources/hris/pay-statement-item/pay-statement-item.ts similarity index 94% rename from src/resources/hris/company/pay-statement-item/pay-statement-item.ts rename to src/resources/hris/pay-statement-item/pay-statement-item.ts index 82c251bdd..dc2681d07 100644 --- a/src/resources/hris/company/pay-statement-item/pay-statement-item.ts +++ b/src/resources/hris/pay-statement-item/pay-statement-item.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from '../../../../core/resource'; +import { APIResource } from '../../../core/resource'; import * as RulesAPI from './rules'; import { RuleCreateParams, @@ -14,8 +14,8 @@ import { RuleUpdateResponse, Rules, } from './rules'; -import { PagePromise, ResponsesPage } from '../../../../core/pagination'; -import { RequestOptions } from '../../../../internal/request-options'; +import { PagePromise, ResponsesPage } from '../../../core/pagination'; +import { RequestOptions } from '../../../internal/request-options'; export class PayStatementItem extends APIResource { rules: RulesAPI.Rules = new RulesAPI.Rules(this._client); @@ -27,7 +27,7 @@ export class PayStatementItem extends APIResource { * @example * ```ts * // Automatically fetches more pages as needed. - * for await (const payStatementItemListResponse of client.hris.company.payStatementItem.list()) { + * for await (const payStatementItemListResponse of client.hris.payStatementItem.list()) { * // ... * } * ``` diff --git a/src/resources/hris/company/pay-statement-item/rules.ts b/src/resources/hris/pay-statement-item/rules.ts similarity index 94% rename from src/resources/hris/company/pay-statement-item/rules.ts rename to src/resources/hris/pay-statement-item/rules.ts index ed9f96168..77431b4dd 100644 --- a/src/resources/hris/company/pay-statement-item/rules.ts +++ b/src/resources/hris/pay-statement-item/rules.ts @@ -1,10 +1,10 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { APIResource } from '../../../../core/resource'; -import { APIPromise } from '../../../../core/api-promise'; -import { PagePromise, ResponsesPage } from '../../../../core/pagination'; -import { RequestOptions } from '../../../../internal/request-options'; -import { path } from '../../../../internal/utils/path'; +import { APIResource } from '../../../core/resource'; +import { APIPromise } from '../../../core/api-promise'; +import { PagePromise, ResponsesPage } from '../../../core/pagination'; +import { RequestOptions } from '../../../internal/request-options'; +import { path } from '../../../internal/utils/path'; export class Rules extends APIResource { /** @@ -16,7 +16,7 @@ export class Rules extends APIResource { * @example * ```ts * const rule = - * await client.hris.company.payStatementItem.rules.create(); + * await client.hris.payStatementItem.rules.create(); * ``` */ create( @@ -38,7 +38,7 @@ export class Rules extends APIResource { * @example * ```ts * const rule = - * await client.hris.company.payStatementItem.rules.update( + * await client.hris.payStatementItem.rules.update( * 'rule_id', * ); * ``` @@ -63,7 +63,7 @@ export class Rules extends APIResource { * @example * ```ts * // Automatically fetches more pages as needed. - * for await (const ruleListResponse of client.hris.company.payStatementItem.rules.list()) { + * for await (const ruleListResponse of client.hris.payStatementItem.rules.list()) { * // ... * } * ``` @@ -85,7 +85,7 @@ export class Rules extends APIResource { * @example * ```ts * const rule = - * await client.hris.company.payStatementItem.rules.delete( + * await client.hris.payStatementItem.rules.delete( * 'rule_id', * ); * ``` diff --git a/src/version.ts b/src/version.ts index c25319ff4..0edc28fb0 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '9.13.0'; // x-release-please-version +export const VERSION = '10.0.0'; // x-release-please-version diff --git a/tests/api-resources/hris/company/company.test.ts b/tests/api-resources/hris/company.test.ts similarity index 100% rename from tests/api-resources/hris/company/company.test.ts rename to tests/api-resources/hris/company.test.ts diff --git a/tests/api-resources/hris/company/pay-statement-item/pay-statement-item.test.ts b/tests/api-resources/hris/pay-statement-item/pay-statement-item.test.ts similarity index 91% rename from tests/api-resources/hris/company/pay-statement-item/pay-statement-item.test.ts rename to tests/api-resources/hris/pay-statement-item/pay-statement-item.test.ts index 04f11a4c8..36094b0f9 100644 --- a/tests/api-resources/hris/company/pay-statement-item/pay-statement-item.test.ts +++ b/tests/api-resources/hris/pay-statement-item/pay-statement-item.test.ts @@ -11,7 +11,7 @@ const client = new Finch({ describe('resource payStatementItem', () => { test('list', async () => { - const responsePromise = client.hris.company.payStatementItem.list(); + const responsePromise = client.hris.payStatementItem.list(); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -24,7 +24,7 @@ describe('resource payStatementItem', () => { test('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( - client.hris.company.payStatementItem.list( + client.hris.payStatementItem.list( { categories: ['earnings'], end_date: '2024-07-01', diff --git a/tests/api-resources/hris/company/pay-statement-item/rules.test.ts b/tests/api-resources/hris/pay-statement-item/rules.test.ts similarity index 87% rename from tests/api-resources/hris/company/pay-statement-item/rules.test.ts rename to tests/api-resources/hris/pay-statement-item/rules.test.ts index 3c13638f8..8b2d63853 100644 --- a/tests/api-resources/hris/company/pay-statement-item/rules.test.ts +++ b/tests/api-resources/hris/pay-statement-item/rules.test.ts @@ -11,7 +11,7 @@ const client = new Finch({ describe('resource rules', () => { test('create', async () => { - const responsePromise = client.hris.company.payStatementItem.rules.create(); + const responsePromise = client.hris.payStatementItem.rules.create(); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -24,7 +24,7 @@ describe('resource rules', () => { test('create: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( - client.hris.company.payStatementItem.rules.create( + client.hris.payStatementItem.rules.create( { entity_ids: ['550e8400-e29b-41d4-a716-446655440000'], attributes: { metadata: { foo: 'bar' } }, @@ -45,7 +45,7 @@ describe('resource rules', () => { }); test('update', async () => { - const responsePromise = client.hris.company.payStatementItem.rules.update('rule_id'); + const responsePromise = client.hris.payStatementItem.rules.update('rule_id'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -58,7 +58,7 @@ describe('resource rules', () => { test('update: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( - client.hris.company.payStatementItem.rules.update( + client.hris.payStatementItem.rules.update( 'rule_id', { entity_ids: ['550e8400-e29b-41d4-a716-446655440000'], @@ -70,7 +70,7 @@ describe('resource rules', () => { }); test('list', async () => { - const responsePromise = client.hris.company.payStatementItem.rules.list(); + const responsePromise = client.hris.payStatementItem.rules.list(); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -83,7 +83,7 @@ describe('resource rules', () => { test('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( - client.hris.company.payStatementItem.rules.list( + client.hris.payStatementItem.rules.list( { entity_ids: ['550e8400-e29b-41d4-a716-446655440000'] }, { path: '/_stainless_unknown_path' }, ), @@ -91,7 +91,7 @@ describe('resource rules', () => { }); test('delete', async () => { - const responsePromise = client.hris.company.payStatementItem.rules.delete('rule_id'); + const responsePromise = client.hris.payStatementItem.rules.delete('rule_id'); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -104,7 +104,7 @@ describe('resource rules', () => { test('delete: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error await expect( - client.hris.company.payStatementItem.rules.delete( + client.hris.payStatementItem.rules.delete( 'rule_id', { entity_ids: ['550e8400-e29b-41d4-a716-446655440000'] }, { path: '/_stainless_unknown_path' },