@rippling/rippling-sdk 0.2.0-alpha.107 → 0.2.0-alpha.109

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 (189) hide show
  1. package/client.d.mts +10 -1
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +10 -1
  4. package/client.d.ts.map +1 -1
  5. package/client.js +10 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs +10 -1
  8. package/client.mjs.map +1 -1
  9. package/lib/charts/builders.d.mts +18 -19
  10. package/lib/charts/builders.d.mts.map +1 -1
  11. package/lib/charts/builders.d.ts +18 -19
  12. package/lib/charts/builders.d.ts.map +1 -1
  13. package/lib/charts/builders.js +35 -28
  14. package/lib/charts/builders.js.map +1 -1
  15. package/lib/charts/builders.mjs +35 -28
  16. package/lib/charts/builders.mjs.map +1 -1
  17. package/lib/charts/describe.d.mts +6 -7
  18. package/lib/charts/describe.d.mts.map +1 -1
  19. package/lib/charts/describe.d.ts +6 -7
  20. package/lib/charts/describe.d.ts.map +1 -1
  21. package/lib/charts/describe.js +26 -27
  22. package/lib/charts/describe.js.map +1 -1
  23. package/lib/charts/describe.mjs +27 -28
  24. package/lib/charts/describe.mjs.map +1 -1
  25. package/lib/charts/errors.d.mts +2 -6
  26. package/lib/charts/errors.d.mts.map +1 -1
  27. package/lib/charts/errors.d.ts +2 -6
  28. package/lib/charts/errors.d.ts.map +1 -1
  29. package/lib/charts/errors.js +2 -6
  30. package/lib/charts/errors.js.map +1 -1
  31. package/lib/charts/errors.mjs +2 -6
  32. package/lib/charts/errors.mjs.map +1 -1
  33. package/lib/charts/evaluate.d.mts +5 -7
  34. package/lib/charts/evaluate.d.mts.map +1 -1
  35. package/lib/charts/evaluate.d.ts +5 -7
  36. package/lib/charts/evaluate.d.ts.map +1 -1
  37. package/lib/charts/evaluate.js +21 -35
  38. package/lib/charts/evaluate.js.map +1 -1
  39. package/lib/charts/evaluate.mjs +22 -36
  40. package/lib/charts/evaluate.mjs.map +1 -1
  41. package/lib/charts/schema.d.mts +8 -97
  42. package/lib/charts/schema.d.mts.map +1 -1
  43. package/lib/charts/schema.d.ts +8 -97
  44. package/lib/charts/schema.d.ts.map +1 -1
  45. package/lib/charts/schema.js +186 -65
  46. package/lib/charts/schema.js.map +1 -1
  47. package/lib/charts/schema.mjs +185 -65
  48. package/lib/charts/schema.mjs.map +1 -1
  49. package/lib/charts/types.d.mts +40 -25
  50. package/lib/charts/types.d.mts.map +1 -1
  51. package/lib/charts/types.d.ts +40 -25
  52. package/lib/charts/types.d.ts.map +1 -1
  53. package/lib/charts/types.js +8 -10
  54. package/lib/charts/types.js.map +1 -1
  55. package/lib/charts/types.mjs +8 -10
  56. package/lib/charts/types.mjs.map +1 -1
  57. package/lib/charts/visualization-grammar.d.mts +66 -0
  58. package/lib/charts/visualization-grammar.d.mts.map +1 -0
  59. package/lib/charts/visualization-grammar.d.ts +66 -0
  60. package/lib/charts/visualization-grammar.d.ts.map +1 -0
  61. package/lib/charts/visualization-grammar.js +70 -0
  62. package/lib/charts/visualization-grammar.js.map +1 -0
  63. package/lib/charts/visualization-grammar.mjs +67 -0
  64. package/lib/charts/visualization-grammar.mjs.map +1 -0
  65. package/lib/charts/vocabulary.d.mts +7 -0
  66. package/lib/charts/vocabulary.d.mts.map +1 -0
  67. package/lib/charts/vocabulary.d.ts +7 -0
  68. package/lib/charts/vocabulary.d.ts.map +1 -0
  69. package/lib/charts/vocabulary.js +10 -0
  70. package/lib/charts/vocabulary.js.map +1 -0
  71. package/lib/charts/vocabulary.mjs +7 -0
  72. package/lib/charts/vocabulary.mjs.map +1 -0
  73. package/lib/charts.d.mts +3 -3
  74. package/lib/charts.d.mts.map +1 -1
  75. package/lib/charts.d.ts +3 -3
  76. package/lib/charts.d.ts.map +1 -1
  77. package/lib/charts.js +2 -1
  78. package/lib/charts.js.map +1 -1
  79. package/lib/charts.mjs +1 -1
  80. package/lib/charts.mjs.map +1 -1
  81. package/package.json +4 -2
  82. package/resources/card-transactions.d.mts +579 -0
  83. package/resources/card-transactions.d.mts.map +1 -0
  84. package/resources/card-transactions.d.ts +579 -0
  85. package/resources/card-transactions.d.ts.map +1 -0
  86. package/resources/card-transactions.js +116 -0
  87. package/resources/card-transactions.js.map +1 -0
  88. package/resources/card-transactions.mjs +112 -0
  89. package/resources/card-transactions.mjs.map +1 -0
  90. package/resources/earning-types.d.mts +50 -10
  91. package/resources/earning-types.d.mts.map +1 -1
  92. package/resources/earning-types.d.ts +50 -10
  93. package/resources/earning-types.d.ts.map +1 -1
  94. package/resources/earning-types.js +21 -2
  95. package/resources/earning-types.js.map +1 -1
  96. package/resources/earning-types.mjs +21 -2
  97. package/resources/earning-types.mjs.map +1 -1
  98. package/resources/index.d.mts +4 -1
  99. package/resources/index.d.mts.map +1 -1
  100. package/resources/index.d.ts +4 -1
  101. package/resources/index.d.ts.map +1 -1
  102. package/resources/index.js +10 -4
  103. package/resources/index.js.map +1 -1
  104. package/resources/index.mjs +4 -1
  105. package/resources/index.mjs.map +1 -1
  106. package/resources/reimbursements.d.mts +954 -0
  107. package/resources/reimbursements.d.mts.map +1 -0
  108. package/resources/reimbursements.d.ts +954 -0
  109. package/resources/reimbursements.d.ts.map +1 -0
  110. package/resources/reimbursements.js +140 -0
  111. package/resources/reimbursements.js.map +1 -0
  112. package/resources/reimbursements.mjs +136 -0
  113. package/resources/reimbursements.mjs.map +1 -0
  114. package/resources/spend-categories.d.mts +140 -0
  115. package/resources/spend-categories.d.mts.map +1 -0
  116. package/resources/spend-categories.d.ts +140 -0
  117. package/resources/spend-categories.d.ts.map +1 -0
  118. package/resources/spend-categories.js +83 -0
  119. package/resources/spend-categories.js.map +1 -0
  120. package/resources/spend-categories.mjs +79 -0
  121. package/resources/spend-categories.mjs.map +1 -0
  122. package/resources/workflows/executions.d.mts +153 -0
  123. package/resources/workflows/executions.d.mts.map +1 -0
  124. package/resources/workflows/executions.d.ts +153 -0
  125. package/resources/workflows/executions.d.ts.map +1 -0
  126. package/resources/workflows/executions.js +74 -0
  127. package/resources/workflows/executions.js.map +1 -0
  128. package/resources/workflows/executions.mjs +70 -0
  129. package/resources/workflows/executions.mjs.map +1 -0
  130. package/resources/workflows/index.d.mts +3 -0
  131. package/resources/workflows/index.d.mts.map +1 -0
  132. package/resources/workflows/index.d.ts +3 -0
  133. package/resources/workflows/index.d.ts.map +1 -0
  134. package/resources/workflows/index.js +9 -0
  135. package/resources/workflows/index.js.map +1 -0
  136. package/resources/workflows/index.mjs +4 -0
  137. package/resources/workflows/index.mjs.map +1 -0
  138. package/resources/workflows/workflows.d.mts +977 -0
  139. package/resources/workflows/workflows.d.mts.map +1 -0
  140. package/resources/workflows/workflows.d.ts +977 -0
  141. package/resources/workflows/workflows.d.ts.map +1 -0
  142. package/resources/workflows/workflows.js +246 -0
  143. package/resources/workflows/workflows.js.map +1 -0
  144. package/resources/workflows/workflows.mjs +241 -0
  145. package/resources/workflows/workflows.mjs.map +1 -0
  146. package/resources/workflows.d.mts +1 -972
  147. package/resources/workflows.d.mts.map +1 -1
  148. package/resources/workflows.d.ts +1 -972
  149. package/resources/workflows.d.ts.map +1 -1
  150. package/resources/workflows.js +2 -234
  151. package/resources/workflows.js.map +1 -1
  152. package/resources/workflows.mjs +1 -232
  153. package/resources/workflows.mjs.map +1 -1
  154. package/src/client.ts +63 -12
  155. package/src/lib/charts/README.md +35 -28
  156. package/src/lib/charts/agent-reference.md +73 -0
  157. package/src/lib/charts/builders.ts +51 -35
  158. package/src/lib/charts/capabilities.json +96 -0
  159. package/src/lib/charts/describe.ts +31 -29
  160. package/src/lib/charts/errors.ts +2 -6
  161. package/src/lib/charts/evaluate.ts +25 -38
  162. package/src/lib/charts/schema.ts +232 -66
  163. package/src/lib/charts/types.ts +42 -31
  164. package/src/lib/charts/visualization-grammar.ts +67 -0
  165. package/src/lib/charts/vocabulary.ts +7 -0
  166. package/src/lib/charts.ts +8 -1
  167. package/src/resources/card-transactions.ts +718 -0
  168. package/src/resources/earning-types.ts +52 -10
  169. package/src/resources/index.ts +22 -1
  170. package/src/resources/reimbursements.ts +1157 -0
  171. package/src/resources/spend-categories.ts +175 -0
  172. package/src/resources/workflows/executions.ts +191 -0
  173. package/src/resources/workflows/index.ts +15 -0
  174. package/src/resources/workflows/workflows.ts +1661 -0
  175. package/src/resources/workflows.ts +1 -1647
  176. package/src/version.ts +1 -1
  177. package/version.d.mts +1 -1
  178. package/version.d.ts +1 -1
  179. package/version.js +1 -1
  180. package/version.mjs +1 -1
  181. package/lib/charts/guards.d.mts +0 -15
  182. package/lib/charts/guards.d.mts.map +0 -1
  183. package/lib/charts/guards.d.ts +0 -15
  184. package/lib/charts/guards.d.ts.map +0 -1
  185. package/lib/charts/guards.js +0 -38
  186. package/lib/charts/guards.js.map +0 -1
  187. package/lib/charts/guards.mjs +0 -34
  188. package/lib/charts/guards.mjs.map +0 -1
  189. package/src/lib/charts/guards.ts +0 -42
@@ -9,14 +9,33 @@ import { RequestOptions } from '../internal/request-options';
9
9
  */
10
10
  export class EarningTypes extends 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
@@ -59,34 +78,57 @@ export class EarningTypes extends APIResource {
59
78
  export type EarningTypeListResponsesPageCursorURL = PageCursorURL<EarningTypeListResponse>;
60
79
 
61
80
  /**
62
- * V2 DTO representing a company earning type.
63
- *
64
- * Used by:
65
- * - GET /earning-types/ (list)
81
+ * An earning category available in Global Payroll, such as salary, commission, or
82
+ * bonus.
66
83
  */
67
84
  export interface EarningTypeListResponse {
68
85
  /**
69
- * Unique identifier for the earning type.
86
+ * Identifier of a source earning type. With `company_entity_id`, equivalent
87
+ * entries use one existing ID, which can change when its source entry is removed.
88
+ * Use `earning_code` when submitting payroll earnings inputs.
70
89
  */
71
90
  id?: string;
72
91
 
73
92
  /**
74
- * ISO country code where the earning type applies.
93
+ * Uppercase ISO 3166-1 alpha-2 country code of the payroll catalog, such as `CA`
94
+ * or `US`.
75
95
  */
76
96
  country_code?: string;
77
97
 
78
98
  /**
79
- * Human-readable name of the earning type.
99
+ * Configured display name of the earning type. Entries with different
100
+ * configurations can have the same name and `earning_code`.
80
101
  */
81
102
  display_name?: string;
82
103
 
83
104
  /**
84
- * Code identifying the earning type (e.g. regular_salary, commission).
105
+ * Code used to select this earning type in `POST /earnings-inputs/`, such as
106
+ * `regular_salary` or `commission`. Availability is validated against the worker's
107
+ * payroll catalog.
85
108
  */
86
109
  earning_code?: string;
87
110
  }
88
111
 
89
112
  export interface EarningTypeListParams {
113
+ /**
114
+ * Filters earnings to a company legal entity. Use the `id` returned by
115
+ * `GET /company-legal-entities/`, not a payroll entity ID. Includes the combined
116
+ * catalogs of linked, non-archived payroll entities, excluding internal shadow
117
+ * entities. Omit this parameter to use the company-wide catalog. An unknown ID or
118
+ * an ID outside the authenticated company returns HTTP 200 with empty `results`.
119
+ * An empty value or a value that is not a 24-character hexadecimal ID returns HTTP
120
+ * 400 (`VALIDATION_ERROR`).
121
+ */
122
+ company_entity_id?: string;
123
+
124
+ /**
125
+ * Filters earnings by the payroll entity's country. Use an uppercase ISO 3166-1
126
+ * alpha-2 country code, such as `CA` or `US`; matching is case-sensitive. If
127
+ * omitted or empty, country does not restrict results. When supplied with
128
+ * `company_entity_id`, only earnings matching both filters are returned.
129
+ */
130
+ country_code?: string;
131
+
90
132
  cursor?: string;
91
133
 
92
134
  /**
@@ -95,6 +95,13 @@ export {
95
95
  type CandidateListParams,
96
96
  type CandidateListResponsesPageCursorURL,
97
97
  } from './candidates';
98
+ export {
99
+ CardTransactions,
100
+ type CardTransactionListResponse,
101
+ type CardTransactionRetrieveResponse,
102
+ type CardTransactionListParams,
103
+ type CardTransactionListResponsesPageCursorURL,
104
+ } from './card-transactions';
98
105
  export { Companies, type Company, type CompanyListParams, type CompaniesPageCursorURL } from './companies';
99
106
  export {
100
107
  CompanyLegalEntities,
@@ -543,6 +550,13 @@ export {
543
550
  type PlatformCapabilityListResponse,
544
551
  type PlatformCapabilityListResponsesPageCursorURL,
545
552
  } from './platform-capabilities';
553
+ export {
554
+ Reimbursements,
555
+ type ReimbursementListResponse,
556
+ type ReimbursementRetrieveResponse,
557
+ type ReimbursementListParams,
558
+ type ReimbursementListResponsesPageCursorURL,
559
+ } from './reimbursements';
546
560
  export {
547
561
  ReportRuns,
548
562
  type ReportRunCreateResponse,
@@ -639,6 +653,13 @@ export {
639
653
  type SoftwareDeploymentUpdateParams,
640
654
  type SoftwareDeploymentListResponsesPageCursorURL,
641
655
  } from './software-deployments';
656
+ export {
657
+ SpendCategories,
658
+ type SpendCategoryListResponse,
659
+ type SpendCategoryRetrieveResponse,
660
+ type SpendCategoryListParams,
661
+ type SpendCategoryListResponsesPageCursorURL,
662
+ } from './spend-categories';
642
663
  export {
643
664
  Supergroups,
644
665
  type Supergroup,
@@ -817,4 +838,4 @@ export {
817
838
  type WorkflowRetrieveParams,
818
839
  type WorkflowUpdateParams,
819
840
  type WorkflowListResponsesPageCursorURL,
820
- } from './workflows';
841
+ } from './workflows/workflows';