@rippling/rippling-sdk 0.2.0-alpha.106 → 0.2.0-alpha.108

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/client.d.mts +7 -1
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +7 -1
  4. package/client.d.ts.map +1 -1
  5. package/client.js +7 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs +7 -1
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/card-transactions.d.mts +579 -0
  11. package/resources/card-transactions.d.mts.map +1 -0
  12. package/resources/card-transactions.d.ts +579 -0
  13. package/resources/card-transactions.d.ts.map +1 -0
  14. package/resources/card-transactions.js +116 -0
  15. package/resources/card-transactions.js.map +1 -0
  16. package/resources/card-transactions.mjs +112 -0
  17. package/resources/card-transactions.mjs.map +1 -0
  18. package/resources/custom-settings.d.mts +1 -1
  19. package/resources/custom-settings.d.ts +1 -1
  20. package/resources/custom-settings.js +1 -1
  21. package/resources/custom-settings.mjs +1 -1
  22. package/resources/earning-types.d.mts +50 -10
  23. package/resources/earning-types.d.mts.map +1 -1
  24. package/resources/earning-types.d.ts +50 -10
  25. package/resources/earning-types.d.ts.map +1 -1
  26. package/resources/earning-types.js +21 -2
  27. package/resources/earning-types.js.map +1 -1
  28. package/resources/earning-types.mjs +21 -2
  29. package/resources/earning-types.mjs.map +1 -1
  30. package/resources/hires.d.mts +0 -5
  31. package/resources/hires.d.mts.map +1 -1
  32. package/resources/hires.d.ts +0 -5
  33. package/resources/hires.d.ts.map +1 -1
  34. package/resources/hires.js +0 -1
  35. package/resources/hires.js.map +1 -1
  36. package/resources/hires.mjs +0 -1
  37. package/resources/hires.mjs.map +1 -1
  38. package/resources/index.d.mts +3 -1
  39. package/resources/index.d.mts.map +1 -1
  40. package/resources/index.d.ts +3 -1
  41. package/resources/index.d.ts.map +1 -1
  42. package/resources/index.js +8 -4
  43. package/resources/index.js.map +1 -1
  44. package/resources/index.mjs +3 -1
  45. package/resources/index.mjs.map +1 -1
  46. package/resources/payroll-payment-mode-changes.d.mts +66 -18
  47. package/resources/payroll-payment-mode-changes.d.mts.map +1 -1
  48. package/resources/payroll-payment-mode-changes.d.ts +66 -18
  49. package/resources/payroll-payment-mode-changes.d.ts.map +1 -1
  50. package/resources/payroll-payment-mode-changes.js +16 -4
  51. package/resources/payroll-payment-mode-changes.js.map +1 -1
  52. package/resources/payroll-payment-mode-changes.mjs +16 -4
  53. package/resources/payroll-payment-mode-changes.mjs.map +1 -1
  54. package/resources/reimbursements.d.mts +954 -0
  55. package/resources/reimbursements.d.mts.map +1 -0
  56. package/resources/reimbursements.d.ts +954 -0
  57. package/resources/reimbursements.d.ts.map +1 -0
  58. package/resources/reimbursements.js +140 -0
  59. package/resources/reimbursements.js.map +1 -0
  60. package/resources/reimbursements.mjs +136 -0
  61. package/resources/reimbursements.mjs.map +1 -0
  62. package/resources/workflows/executions.d.mts +153 -0
  63. package/resources/workflows/executions.d.mts.map +1 -0
  64. package/resources/workflows/executions.d.ts +153 -0
  65. package/resources/workflows/executions.d.ts.map +1 -0
  66. package/resources/workflows/executions.js +74 -0
  67. package/resources/workflows/executions.js.map +1 -0
  68. package/resources/workflows/executions.mjs +70 -0
  69. package/resources/workflows/executions.mjs.map +1 -0
  70. package/resources/workflows/index.d.mts +3 -0
  71. package/resources/workflows/index.d.mts.map +1 -0
  72. package/resources/workflows/index.d.ts +3 -0
  73. package/resources/workflows/index.d.ts.map +1 -0
  74. package/resources/workflows/index.js +9 -0
  75. package/resources/workflows/index.js.map +1 -0
  76. package/resources/workflows/index.mjs +4 -0
  77. package/resources/workflows/index.mjs.map +1 -0
  78. package/resources/workflows/workflows.d.mts +977 -0
  79. package/resources/workflows/workflows.d.mts.map +1 -0
  80. package/resources/workflows/workflows.d.ts +977 -0
  81. package/resources/workflows/workflows.d.ts.map +1 -0
  82. package/resources/workflows/workflows.js +246 -0
  83. package/resources/workflows/workflows.js.map +1 -0
  84. package/resources/workflows/workflows.mjs +241 -0
  85. package/resources/workflows/workflows.mjs.map +1 -0
  86. package/resources/workflows.d.mts +1 -957
  87. package/resources/workflows.d.mts.map +1 -1
  88. package/resources/workflows.d.ts +1 -957
  89. package/resources/workflows.d.ts.map +1 -1
  90. package/resources/workflows.js +2 -234
  91. package/resources/workflows.js.map +1 -1
  92. package/resources/workflows.mjs +1 -232
  93. package/resources/workflows.mjs.map +1 -1
  94. package/src/client.ts +46 -12
  95. package/src/resources/card-transactions.ts +718 -0
  96. package/src/resources/custom-settings.ts +1 -1
  97. package/src/resources/earning-types.ts +52 -10
  98. package/src/resources/hires.ts +0 -6
  99. package/src/resources/index.ts +15 -1
  100. package/src/resources/payroll-payment-mode-changes.ts +79 -18
  101. package/src/resources/reimbursements.ts +1157 -0
  102. package/src/resources/workflows/executions.ts +191 -0
  103. package/src/resources/workflows/index.ts +15 -0
  104. package/src/resources/workflows/workflows.ts +1661 -0
  105. package/src/resources/workflows.ts +1 -1622
  106. package/src/version.ts +1 -1
  107. package/version.d.mts +1 -1
  108. package/version.d.ts +1 -1
  109. package/version.js +1 -1
  110. package/version.mjs +1 -1
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.CardTransactions = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ const pagination_1 = require("../core/pagination.js");
7
+ const path_1 = require("../internal/utils/path.js");
8
+ class CardTransactions extends resource_1.APIResource {
9
+ /**
10
+ * A list of card transactions.
11
+ *
12
+ * - Requires: `Internal Testing`
13
+ * - Filterable fields: `worker_id`, `transaction_date`, `entity_id`, `vendor_id`,
14
+ * `category_id`, `transaction_type`, `card_id`
15
+ * - Sortable fields: `id`, `created_at`, `updated_at`, `transaction_date`
16
+ *
17
+ * @example HTTP
18
+ * Representative request and response shapes.
19
+ * ```
20
+ * GET /card-transactions/?filter=filter&order_by=order_by&limit=50&cursor=cursor HTTP/1.1
21
+ * Host: rest.ripplingapis.com
22
+ * Accept: application/json
23
+ * Rippling-Api-Version: 2024-08-01
24
+ *
25
+ * HTTP/1.1 200 OK
26
+ * Content-Type: application/json
27
+ *
28
+ * {
29
+ * "__meta": {
30
+ * "redacted_fields": [
31
+ * {
32
+ * "name": "date_of_birth",
33
+ * "reason": "Insufficient entitlements"
34
+ * }
35
+ * ]
36
+ * },
37
+ * "results": [
38
+ * {
39
+ * "id": "string",
40
+ * "created_at": "string",
41
+ * "updated_at": "string",
42
+ * "worker_id": "string",
43
+ * "company_amount": {
44
+ * "currency_type": "string",
45
+ * "value": "string"
46
+ * },
47
+ * "merchant_amount": {
48
+ * "currency_type": "string",
49
+ * "value": "string"
50
+ * },
51
+ * "transaction_date": "string",
52
+ * "accounting_date": "string",
53
+ * "gl_sync_state": "NOT_FINALIZED",
54
+ * "approval_status": "DRAFT",
55
+ * "entity_id": "string",
56
+ * "vendor": {
57
+ * "id": "string",
58
+ * "name": "string"
59
+ * },
60
+ * "gl_vendor": {
61
+ * "id": "string",
62
+ * "name": "string",
63
+ * "gl_vendor_id": "string"
64
+ * },
65
+ * "memo": "string",
66
+ * "receipt": "string",
67
+ * "attachments": [
68
+ * "string"
69
+ * ],
70
+ * "line_items": [
71
+ * {}
72
+ * ],
73
+ * "transaction_type": "CARD_TRANSACTION",
74
+ * "authorization_state": "PENDING",
75
+ * "card_id": "string"
76
+ * }
77
+ * ],
78
+ * "next_link": "string"
79
+ * }
80
+ * ```
81
+ */
82
+ list(query = {}, options) {
83
+ return this._client.getAPIList('/card-transactions/', (pagination_1.PageCursorURL), {
84
+ query,
85
+ ...options,
86
+ });
87
+ }
88
+ /**
89
+ * Retrieve a specific card transaction
90
+ *
91
+ * @example HTTP
92
+ * Representative request and response shapes.
93
+ * ```
94
+ * GET /card-transactions/{id}/ HTTP/1.1
95
+ * Host: rest.ripplingapis.com
96
+ * Accept: application/json
97
+ * Rippling-Api-Version: 2024-08-01
98
+ *
99
+ * HTTP/1.1 200 OK
100
+ * Content-Type: application/json
101
+ *
102
+ * {
103
+ * "__meta": {
104
+ * "redacted_fields": [
105
+ * {}
106
+ * ]
107
+ * }
108
+ * }
109
+ * ```
110
+ */
111
+ retrieve(id, options) {
112
+ return this._client.get((0, path_1.path) `/card-transactions/${id}/`, options);
113
+ }
114
+ }
115
+ exports.CardTransactions = CardTransactions;
116
+ //# sourceMappingURL=card-transactions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card-transactions.js","sourceRoot":"","sources":["../src/resources/card-transactions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAgE;AAEhE,oDAA8C;AAE9C,MAAa,gBAAiB,SAAQ,sBAAW;IAC/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwEG;IACH,IAAI,CACF,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAA,0BAA0C,CAAA,EAAE;YAChG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,sBAAsB,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF;AA9GD,4CA8GC"}
@@ -0,0 +1,112 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { PageCursorURL } from "../core/pagination.mjs";
4
+ import { path } from "../internal/utils/path.mjs";
5
+ export class CardTransactions extends APIResource {
6
+ /**
7
+ * A list of card transactions.
8
+ *
9
+ * - Requires: `Internal Testing`
10
+ * - Filterable fields: `worker_id`, `transaction_date`, `entity_id`, `vendor_id`,
11
+ * `category_id`, `transaction_type`, `card_id`
12
+ * - Sortable fields: `id`, `created_at`, `updated_at`, `transaction_date`
13
+ *
14
+ * @example HTTP
15
+ * Representative request and response shapes.
16
+ * ```
17
+ * GET /card-transactions/?filter=filter&order_by=order_by&limit=50&cursor=cursor HTTP/1.1
18
+ * Host: rest.ripplingapis.com
19
+ * Accept: application/json
20
+ * Rippling-Api-Version: 2024-08-01
21
+ *
22
+ * HTTP/1.1 200 OK
23
+ * Content-Type: application/json
24
+ *
25
+ * {
26
+ * "__meta": {
27
+ * "redacted_fields": [
28
+ * {
29
+ * "name": "date_of_birth",
30
+ * "reason": "Insufficient entitlements"
31
+ * }
32
+ * ]
33
+ * },
34
+ * "results": [
35
+ * {
36
+ * "id": "string",
37
+ * "created_at": "string",
38
+ * "updated_at": "string",
39
+ * "worker_id": "string",
40
+ * "company_amount": {
41
+ * "currency_type": "string",
42
+ * "value": "string"
43
+ * },
44
+ * "merchant_amount": {
45
+ * "currency_type": "string",
46
+ * "value": "string"
47
+ * },
48
+ * "transaction_date": "string",
49
+ * "accounting_date": "string",
50
+ * "gl_sync_state": "NOT_FINALIZED",
51
+ * "approval_status": "DRAFT",
52
+ * "entity_id": "string",
53
+ * "vendor": {
54
+ * "id": "string",
55
+ * "name": "string"
56
+ * },
57
+ * "gl_vendor": {
58
+ * "id": "string",
59
+ * "name": "string",
60
+ * "gl_vendor_id": "string"
61
+ * },
62
+ * "memo": "string",
63
+ * "receipt": "string",
64
+ * "attachments": [
65
+ * "string"
66
+ * ],
67
+ * "line_items": [
68
+ * {}
69
+ * ],
70
+ * "transaction_type": "CARD_TRANSACTION",
71
+ * "authorization_state": "PENDING",
72
+ * "card_id": "string"
73
+ * }
74
+ * ],
75
+ * "next_link": "string"
76
+ * }
77
+ * ```
78
+ */
79
+ list(query = {}, options) {
80
+ return this._client.getAPIList('/card-transactions/', (PageCursorURL), {
81
+ query,
82
+ ...options,
83
+ });
84
+ }
85
+ /**
86
+ * Retrieve a specific card transaction
87
+ *
88
+ * @example HTTP
89
+ * Representative request and response shapes.
90
+ * ```
91
+ * GET /card-transactions/{id}/ HTTP/1.1
92
+ * Host: rest.ripplingapis.com
93
+ * Accept: application/json
94
+ * Rippling-Api-Version: 2024-08-01
95
+ *
96
+ * HTTP/1.1 200 OK
97
+ * Content-Type: application/json
98
+ *
99
+ * {
100
+ * "__meta": {
101
+ * "redacted_fields": [
102
+ * {}
103
+ * ]
104
+ * }
105
+ * }
106
+ * ```
107
+ */
108
+ retrieve(id, options) {
109
+ return this._client.get(path `/card-transactions/${id}/`, options);
110
+ }
111
+ }
112
+ //# sourceMappingURL=card-transactions.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card-transactions.mjs","sourceRoot":"","sources":["../src/resources/card-transactions.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAG/C,OAAO,EAAE,aAAa,EAAe,+BAA2B;AAEhE,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwEG;IACH,IAAI,CACF,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAA,aAA0C,CAAA,EAAE;YAChG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,sBAAsB,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF"}
@@ -7,7 +7,7 @@ export declare class CustomSettings extends APIResource {
7
7
  /**
8
8
  * A list of Setting.
9
9
  *
10
- * - Requires: `Functions API`
10
+ * - Requires: `API Tier 1`
11
11
  * - Sortable fields: `id`, `created_at`, `updated_at`
12
12
  *
13
13
  * @example HTTP
@@ -7,7 +7,7 @@ export declare class CustomSettings extends APIResource {
7
7
  /**
8
8
  * A list of Setting.
9
9
  *
10
- * - Requires: `Functions API`
10
+ * - Requires: `API Tier 1`
11
11
  * - Sortable fields: `id`, `created_at`, `updated_at`
12
12
  *
13
13
  * @example HTTP
@@ -10,7 +10,7 @@ class CustomSettings extends resource_1.APIResource {
10
10
  /**
11
11
  * A list of Setting.
12
12
  *
13
- * - Requires: `Functions API`
13
+ * - Requires: `API Tier 1`
14
14
  * - Sortable fields: `id`, `created_at`, `updated_at`
15
15
  *
16
16
  * @example HTTP
@@ -7,7 +7,7 @@ export class CustomSettings extends APIResource {
7
7
  /**
8
8
  * A list of Setting.
9
9
  *
10
- * - Requires: `Functions API`
10
+ * - Requires: `API Tier 1`
11
11
  * - Sortable fields: `id`, `created_at`, `updated_at`
12
12
  *
13
13
  * @example HTTP
@@ -6,14 +6,33 @@ import { RequestOptions } from "../internal/request-options.mjs";
6
6
  */
7
7
  export declare class EarningTypes extends APIResource {
8
8
  /**
9
- * A list of earning-types.
9
+ * Lists Global Payroll earning types for selecting payroll earnings inputs. Use
10
+ * the returned `earning_code` in `POST /earnings-inputs/`; the worker's payroll
11
+ * catalog determines whether that code is available. `company_entity_id` and
12
+ * `country_code` restrict results together. Conflicting filters return HTTP 200
13
+ * with empty `results`. Without either filter, returns the company's combined
14
+ * earning catalog.
15
+ *
16
+ * A legal entity can have multiple payroll entities, including sub entities. With
17
+ * `company_entity_id`, their catalogs are combined and equivalent entries with the
18
+ * same country, code, display name, configuration, and behavior are merged.
19
+ * Calculation and tax settings, effective dates, and employment restrictions
20
+ * participate in comparison. Different configurations remain separate, even when
21
+ * returned codes and names match. Each merged entry uses the lexicographically
22
+ * smallest existing earning type ID; it can change when its source entry is
23
+ * removed. Catalog membership does not guarantee availability to every worker.
24
+ * Without `company_entity_id`, entries are deduplicated by earning type ID.
25
+ *
26
+ * Entity-filtered results are ordered by display name, country, code, and ID.
27
+ * Pagination does not provide a snapshot during catalog changes. To continue, pass
28
+ * the returned `next_link` token as `cursor` with the same filters.
10
29
  *
11
30
  * - Requires: `Global Payroll`
12
31
  *
13
32
  * @example HTTP
14
33
  * Representative request and response shapes.
15
34
  * ```
16
- * GET /earning-types/?limit=50&cursor=cursor HTTP/1.1
35
+ * GET /earning-types/?company_entity_id=company_entity_id&country_code=country_code&limit=50&cursor=cursor HTTP/1.1
17
36
  * Host: rest.ripplingapis.com
18
37
  * Accept: application/json
19
38
  * Rippling-Api-Version: 2024-08-01
@@ -46,30 +65,51 @@ export declare class EarningTypes extends APIResource {
46
65
  }
47
66
  export type EarningTypeListResponsesPageCursorURL = PageCursorURL<EarningTypeListResponse>;
48
67
  /**
49
- * V2 DTO representing a company earning type.
50
- *
51
- * Used by:
52
- * - GET /earning-types/ (list)
68
+ * An earning category available in Global Payroll, such as salary, commission, or
69
+ * bonus.
53
70
  */
54
71
  export interface EarningTypeListResponse {
55
72
  /**
56
- * Unique identifier for the earning type.
73
+ * Identifier of a source earning type. With `company_entity_id`, equivalent
74
+ * entries use one existing ID, which can change when its source entry is removed.
75
+ * Use `earning_code` when submitting payroll earnings inputs.
57
76
  */
58
77
  id?: string;
59
78
  /**
60
- * ISO country code where the earning type applies.
79
+ * Uppercase ISO 3166-1 alpha-2 country code of the payroll catalog, such as `CA`
80
+ * or `US`.
61
81
  */
62
82
  country_code?: string;
63
83
  /**
64
- * Human-readable name of the earning type.
84
+ * Configured display name of the earning type. Entries with different
85
+ * configurations can have the same name and `earning_code`.
65
86
  */
66
87
  display_name?: string;
67
88
  /**
68
- * Code identifying the earning type (e.g. regular_salary, commission).
89
+ * Code used to select this earning type in `POST /earnings-inputs/`, such as
90
+ * `regular_salary` or `commission`. Availability is validated against the worker's
91
+ * payroll catalog.
69
92
  */
70
93
  earning_code?: string;
71
94
  }
72
95
  export interface EarningTypeListParams {
96
+ /**
97
+ * Filters earnings to a company legal entity. Use the `id` returned by
98
+ * `GET /company-legal-entities/`, not a payroll entity ID. Includes the combined
99
+ * catalogs of linked, non-archived payroll entities, excluding internal shadow
100
+ * entities. Omit this parameter to use the company-wide catalog. An unknown ID or
101
+ * an ID outside the authenticated company returns HTTP 200 with empty `results`.
102
+ * An empty value or a value that is not a 24-character hexadecimal ID returns HTTP
103
+ * 400 (`VALIDATION_ERROR`).
104
+ */
105
+ company_entity_id?: string;
106
+ /**
107
+ * Filters earnings by the payroll entity's country. Use an uppercase ISO 3166-1
108
+ * alpha-2 country code, such as `CA` or `US`; matching is case-sensitive. If
109
+ * omitted or empty, country does not restrict results. When supplied with
110
+ * `company_entity_id`, only earnings matching both filters are returned.
111
+ */
112
+ country_code?: string;
73
113
  cursor?: string;
74
114
  /**
75
115
  * The maximum number of results to return. Defaults to 50. Maximum is 100.
@@ -1 +1 @@
1
- {"version":3,"file":"earning-types.d.mts","sourceRoot":"","sources":["../src/resources/earning-types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,+BAA2B;AAChE,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAE7D;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCG;IACH,IAAI,CACF,KAAK,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,qCAAqC,EAAE,uBAAuB,CAAC;CAM/E;AAED,MAAM,MAAM,qCAAqC,GAAG,aAAa,CAAC,uBAAuB,CAAC,CAAC;AAE3F;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAE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AED,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
@@ -6,14 +6,33 @@ import { RequestOptions } from "../internal/request-options.js";
6
6
  */
7
7
  export declare class EarningTypes extends APIResource {
8
8
  /**
9
- * A list of earning-types.
9
+ * Lists Global Payroll earning types for selecting payroll earnings inputs. Use
10
+ * the returned `earning_code` in `POST /earnings-inputs/`; the worker's payroll
11
+ * catalog determines whether that code is available. `company_entity_id` and
12
+ * `country_code` restrict results together. Conflicting filters return HTTP 200
13
+ * with empty `results`. Without either filter, returns the company's combined
14
+ * earning catalog.
15
+ *
16
+ * A legal entity can have multiple payroll entities, including sub entities. With
17
+ * `company_entity_id`, their catalogs are combined and equivalent entries with the
18
+ * same country, code, display name, configuration, and behavior are merged.
19
+ * Calculation and tax settings, effective dates, and employment restrictions
20
+ * participate in comparison. Different configurations remain separate, even when
21
+ * returned codes and names match. Each merged entry uses the lexicographically
22
+ * smallest existing earning type ID; it can change when its source entry is
23
+ * removed. Catalog membership does not guarantee availability to every worker.
24
+ * Without `company_entity_id`, entries are deduplicated by earning type ID.
25
+ *
26
+ * Entity-filtered results are ordered by display name, country, code, and ID.
27
+ * Pagination does not provide a snapshot during catalog changes. To continue, pass
28
+ * the returned `next_link` token as `cursor` with the same filters.
10
29
  *
11
30
  * - Requires: `Global Payroll`
12
31
  *
13
32
  * @example HTTP
14
33
  * Representative request and response shapes.
15
34
  * ```
16
- * GET /earning-types/?limit=50&cursor=cursor HTTP/1.1
35
+ * GET /earning-types/?company_entity_id=company_entity_id&country_code=country_code&limit=50&cursor=cursor HTTP/1.1
17
36
  * Host: rest.ripplingapis.com
18
37
  * Accept: application/json
19
38
  * Rippling-Api-Version: 2024-08-01
@@ -46,30 +65,51 @@ export declare class EarningTypes extends APIResource {
46
65
  }
47
66
  export type EarningTypeListResponsesPageCursorURL = PageCursorURL<EarningTypeListResponse>;
48
67
  /**
49
- * V2 DTO representing a company earning type.
50
- *
51
- * Used by:
52
- * - GET /earning-types/ (list)
68
+ * An earning category available in Global Payroll, such as salary, commission, or
69
+ * bonus.
53
70
  */
54
71
  export interface EarningTypeListResponse {
55
72
  /**
56
- * Unique identifier for the earning type.
73
+ * Identifier of a source earning type. With `company_entity_id`, equivalent
74
+ * entries use one existing ID, which can change when its source entry is removed.
75
+ * Use `earning_code` when submitting payroll earnings inputs.
57
76
  */
58
77
  id?: string;
59
78
  /**
60
- * ISO country code where the earning type applies.
79
+ * Uppercase ISO 3166-1 alpha-2 country code of the payroll catalog, such as `CA`
80
+ * or `US`.
61
81
  */
62
82
  country_code?: string;
63
83
  /**
64
- * Human-readable name of the earning type.
84
+ * Configured display name of the earning type. Entries with different
85
+ * configurations can have the same name and `earning_code`.
65
86
  */
66
87
  display_name?: string;
67
88
  /**
68
- * Code identifying the earning type (e.g. regular_salary, commission).
89
+ * Code used to select this earning type in `POST /earnings-inputs/`, such as
90
+ * `regular_salary` or `commission`. Availability is validated against the worker's
91
+ * payroll catalog.
69
92
  */
70
93
  earning_code?: string;
71
94
  }
72
95
  export interface EarningTypeListParams {
96
+ /**
97
+ * Filters earnings to a company legal entity. Use the `id` returned by
98
+ * `GET /company-legal-entities/`, not a payroll entity ID. Includes the combined
99
+ * catalogs of linked, non-archived payroll entities, excluding internal shadow
100
+ * entities. Omit this parameter to use the company-wide catalog. An unknown ID or
101
+ * an ID outside the authenticated company returns HTTP 200 with empty `results`.
102
+ * An empty value or a value that is not a 24-character hexadecimal ID returns HTTP
103
+ * 400 (`VALIDATION_ERROR`).
104
+ */
105
+ company_entity_id?: string;
106
+ /**
107
+ * Filters earnings by the payroll entity's country. Use an uppercase ISO 3166-1
108
+ * alpha-2 country code, such as `CA` or `US`; matching is case-sensitive. If
109
+ * omitted or empty, country does not restrict results. When supplied with
110
+ * `company_entity_id`, only earnings matching both filters are returned.
111
+ */
112
+ country_code?: string;
73
113
  cursor?: string;
74
114
  /**
75
115
  * The maximum number of results to return. Defaults to 50. Maximum is 100.
@@ -1 +1 @@
1
- {"version":3,"file":"earning-types.d.ts","sourceRoot":"","sources":["../src/resources/earning-types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,8BAA2B;AAChE,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCG;IACH,IAAI,CACF,KAAK,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,qCAAqC,EAAE,uBAAuB,CAAC;CAM/E;AAED,MAAM,MAAM,qCAAqC,GAAG,aAAa,CAAC,uBAAuB,CAAC,CAAC;AAE3F;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OA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AAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qCAAqC,IAAI,qCAAqC,EACnF,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
@@ -9,14 +9,33 @@ const pagination_1 = require("../core/pagination.js");
9
9
  */
10
10
  class EarningTypes extends resource_1.APIResource {
11
11
  /**
12
- * A list of earning-types.
12
+ * Lists Global Payroll earning types for selecting payroll earnings inputs. Use
13
+ * the returned `earning_code` in `POST /earnings-inputs/`; the worker's payroll
14
+ * catalog determines whether that code is available. `company_entity_id` and
15
+ * `country_code` restrict results together. Conflicting filters return HTTP 200
16
+ * with empty `results`. Without either filter, returns the company's combined
17
+ * earning catalog.
18
+ *
19
+ * A legal entity can have multiple payroll entities, including sub entities. With
20
+ * `company_entity_id`, their catalogs are combined and equivalent entries with the
21
+ * same country, code, display name, configuration, and behavior are merged.
22
+ * Calculation and tax settings, effective dates, and employment restrictions
23
+ * participate in comparison. Different configurations remain separate, even when
24
+ * returned codes and names match. Each merged entry uses the lexicographically
25
+ * smallest existing earning type ID; it can change when its source entry is
26
+ * removed. Catalog membership does not guarantee availability to every worker.
27
+ * Without `company_entity_id`, entries are deduplicated by earning type ID.
28
+ *
29
+ * Entity-filtered results are ordered by display name, country, code, and ID.
30
+ * Pagination does not provide a snapshot during catalog changes. To continue, pass
31
+ * the returned `next_link` token as `cursor` with the same filters.
13
32
  *
14
33
  * - Requires: `Global Payroll`
15
34
  *
16
35
  * @example HTTP
17
36
  * Representative request and response shapes.
18
37
  * ```
19
- * GET /earning-types/?limit=50&cursor=cursor HTTP/1.1
38
+ * GET /earning-types/?company_entity_id=company_entity_id&country_code=country_code&limit=50&cursor=cursor HTTP/1.1
20
39
  * Host: rest.ripplingapis.com
21
40
  * Accept: application/json
22
41
  * Rippling-Api-Version: 2024-08-01
@@ -1 +1 @@
1
- {"version":3,"file":"earning-types.js","sourceRoot":"","sources":["../src/resources/earning-types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAC/C,sDAAgE;AAGhE;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCG;IACH,IAAI,CACF,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,0BAAsC,CAAA,EAAE;YACxF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AA/CD,oCA+CC"}
1
+ {"version":3,"file":"earning-types.js","sourceRoot":"","sources":["../src/resources/earning-types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAC/C,sDAAgE;AAGhE;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuDG;IACH,IAAI,CACF,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,0BAAsC,CAAA,EAAE;YACxF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAlED,oCAkEC"}
@@ -6,14 +6,33 @@ import { PageCursorURL } from "../core/pagination.mjs";
6
6
  */
7
7
  export class EarningTypes extends APIResource {
8
8
  /**
9
- * A list of earning-types.
9
+ * Lists Global Payroll earning types for selecting payroll earnings inputs. Use
10
+ * the returned `earning_code` in `POST /earnings-inputs/`; the worker's payroll
11
+ * catalog determines whether that code is available. `company_entity_id` and
12
+ * `country_code` restrict results together. Conflicting filters return HTTP 200
13
+ * with empty `results`. Without either filter, returns the company's combined
14
+ * earning catalog.
15
+ *
16
+ * A legal entity can have multiple payroll entities, including sub entities. With
17
+ * `company_entity_id`, their catalogs are combined and equivalent entries with the
18
+ * same country, code, display name, configuration, and behavior are merged.
19
+ * Calculation and tax settings, effective dates, and employment restrictions
20
+ * participate in comparison. Different configurations remain separate, even when
21
+ * returned codes and names match. Each merged entry uses the lexicographically
22
+ * smallest existing earning type ID; it can change when its source entry is
23
+ * removed. Catalog membership does not guarantee availability to every worker.
24
+ * Without `company_entity_id`, entries are deduplicated by earning type ID.
25
+ *
26
+ * Entity-filtered results are ordered by display name, country, code, and ID.
27
+ * Pagination does not provide a snapshot during catalog changes. To continue, pass
28
+ * the returned `next_link` token as `cursor` with the same filters.
10
29
  *
11
30
  * - Requires: `Global Payroll`
12
31
  *
13
32
  * @example HTTP
14
33
  * Representative request and response shapes.
15
34
  * ```
16
- * GET /earning-types/?limit=50&cursor=cursor HTTP/1.1
35
+ * GET /earning-types/?company_entity_id=company_entity_id&country_code=country_code&limit=50&cursor=cursor HTTP/1.1
17
36
  * Host: rest.ripplingapis.com
18
37
  * Accept: application/json
19
38
  * Rippling-Api-Version: 2024-08-01
@@ -1 +1 @@
1
- {"version":3,"file":"earning-types.mjs","sourceRoot":"","sources":["../src/resources/earning-types.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,aAAa,EAAe,+BAA2B;AAGhE;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCG;IACH,IAAI,CACF,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,aAAsC,CAAA,EAAE;YACxF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
1
+ {"version":3,"file":"earning-types.mjs","sourceRoot":"","sources":["../src/resources/earning-types.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,aAAa,EAAe,+BAA2B;AAGhE;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuDG;IACH,IAAI,CACF,QAAkD,EAAE,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAA,aAAsC,CAAA,EAAE;YACxF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -47,7 +47,6 @@ export declare class Hires extends APIResource {
47
47
  * Content-Type: application/json
48
48
  *
49
49
  * {
50
- * "ack": false,
51
50
  * "results": [
52
51
  * {
53
52
  * "client_request_id": "string",
@@ -74,10 +73,6 @@ export declare class Hires extends APIResource {
74
73
  create(params: HireCreateParams, options?: RequestOptions): APIPromise<HireCreateResponse>;
75
74
  }
76
75
  export interface HireCreateResponse {
77
- /**
78
- * True when the envelope was accepted for processing.
79
- */
80
- ack: boolean;
81
76
  /**
82
77
  * One result per request hire, in request order. HTTP 200 means the envelope was
83
78
  * accepted; each item's status is the outcome.