@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
@@ -0,0 +1,579 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import * as BusinessPartnersAPI from "./business-partners.mjs";
3
+ import { APIPromise } from "../core/api-promise.mjs";
4
+ import { PageCursorURL, PagePromise } from "../core/pagination.mjs";
5
+ import { RequestOptions } from "../internal/request-options.mjs";
6
+ export declare class CardTransactions extends APIResource {
7
+ /**
8
+ * A list of card transactions.
9
+ *
10
+ * - Requires: `Internal Testing`
11
+ * - Filterable fields: `worker_id`, `transaction_date`, `entity_id`, `vendor_id`,
12
+ * `category_id`, `transaction_type`, `card_id`
13
+ * - Sortable fields: `id`, `created_at`, `updated_at`, `transaction_date`
14
+ *
15
+ * @example HTTP
16
+ * Representative request and response shapes.
17
+ * ```
18
+ * GET /card-transactions/?filter=filter&order_by=order_by&limit=50&cursor=cursor HTTP/1.1
19
+ * Host: rest.ripplingapis.com
20
+ * Accept: application/json
21
+ * Rippling-Api-Version: 2024-08-01
22
+ *
23
+ * HTTP/1.1 200 OK
24
+ * Content-Type: application/json
25
+ *
26
+ * {
27
+ * "__meta": {
28
+ * "redacted_fields": [
29
+ * {
30
+ * "name": "date_of_birth",
31
+ * "reason": "Insufficient entitlements"
32
+ * }
33
+ * ]
34
+ * },
35
+ * "results": [
36
+ * {
37
+ * "id": "string",
38
+ * "created_at": "string",
39
+ * "updated_at": "string",
40
+ * "worker_id": "string",
41
+ * "company_amount": {
42
+ * "currency_type": "string",
43
+ * "value": "string"
44
+ * },
45
+ * "merchant_amount": {
46
+ * "currency_type": "string",
47
+ * "value": "string"
48
+ * },
49
+ * "transaction_date": "string",
50
+ * "accounting_date": "string",
51
+ * "gl_sync_state": "NOT_FINALIZED",
52
+ * "approval_status": "DRAFT",
53
+ * "entity_id": "string",
54
+ * "vendor": {
55
+ * "id": "string",
56
+ * "name": "string"
57
+ * },
58
+ * "gl_vendor": {
59
+ * "id": "string",
60
+ * "name": "string",
61
+ * "gl_vendor_id": "string"
62
+ * },
63
+ * "memo": "string",
64
+ * "receipt": "string",
65
+ * "attachments": [
66
+ * "string"
67
+ * ],
68
+ * "line_items": [
69
+ * {}
70
+ * ],
71
+ * "transaction_type": "CARD_TRANSACTION",
72
+ * "authorization_state": "PENDING",
73
+ * "card_id": "string"
74
+ * }
75
+ * ],
76
+ * "next_link": "string"
77
+ * }
78
+ * ```
79
+ */
80
+ list(query?: CardTransactionListParams | null | undefined, options?: RequestOptions): PagePromise<CardTransactionListResponsesPageCursorURL, CardTransactionListResponse>;
81
+ /**
82
+ * Retrieve a specific card transaction
83
+ *
84
+ * @example HTTP
85
+ * Representative request and response shapes.
86
+ * ```
87
+ * GET /card-transactions/{id}/ HTTP/1.1
88
+ * Host: rest.ripplingapis.com
89
+ * Accept: application/json
90
+ * Rippling-Api-Version: 2024-08-01
91
+ *
92
+ * HTTP/1.1 200 OK
93
+ * Content-Type: application/json
94
+ *
95
+ * {
96
+ * "__meta": {
97
+ * "redacted_fields": [
98
+ * {}
99
+ * ]
100
+ * }
101
+ * }
102
+ * ```
103
+ */
104
+ retrieve(id: string, options?: RequestOptions): APIPromise<CardTransactionRetrieveResponse>;
105
+ }
106
+ export type CardTransactionListResponsesPageCursorURL = PageCursorURL<CardTransactionListResponse>;
107
+ /**
108
+ * A Spend card transaction or authorization the caller can see.
109
+ *
110
+ * An authorization is a pending hold the card network places at the time of purchase. A card transaction
111
+ * is the posted charge. List returns both; retrieve returns one by ID. A transaction the
112
+ * caller cannot see returns 404, the same as one that does not exist.
113
+ */
114
+ export interface CardTransactionListResponse {
115
+ /**
116
+ * Identifier field
117
+ */
118
+ id: string;
119
+ /**
120
+ * Record creation date
121
+ */
122
+ created_at: string;
123
+ /**
124
+ * Record update date
125
+ */
126
+ updated_at: string;
127
+ /**
128
+ * Date the transaction is booked in the accounting system, as an ISO 8601 date
129
+ * (YYYY-MM-DD).
130
+ */
131
+ accounting_date?: string;
132
+ /**
133
+ * Approval status of the transaction. `DRAFT`: not submitted for approval.
134
+ * `PENDING`: awaiting required information or submission before approval.
135
+ * `REQUESTED`: submitted and awaiting approval. `APPROVED`: approved. `REJECTED`:
136
+ * rejected. `FINALIZED`: finalized for payment. `ACTIONED`: payment or
137
+ * reimbursement completed. `CANCELLED`: cancelled. `FAILED`: payment failed. Null
138
+ * for card authorizations.
139
+ */
140
+ approval_status?: 'DRAFT' | 'PENDING' | 'REQUESTED' | 'APPROVED' | 'REJECTED' | 'FINALIZED' | 'ACTIONED' | 'CANCELLED' | 'FAILED';
141
+ /**
142
+ * URLs of other attached files.
143
+ */
144
+ attachments?: Array<string>;
145
+ /**
146
+ * State of the card authorization. `PENDING`: an active hold awaiting completion.
147
+ * `CLOSED`: the authorization completed and the charge posted. `REVERSED`: the
148
+ * authorization was reversed and the hold released. `EXPIRED`: the hold expired
149
+ * without completion. Null for posted card transactions.
150
+ */
151
+ authorization_state?: 'PENDING' | 'CLOSED' | 'REVERSED' | 'EXPIRED';
152
+ /**
153
+ * ID of the Spend card used. No public API is currently available to retrieve this
154
+ * card.
155
+ */
156
+ card_id?: string;
157
+ /**
158
+ * Amount in the company's headquarters currency. The `value` is a decimal string.
159
+ */
160
+ company_amount?: CardTransactionListResponse.CompanyAmount;
161
+ /**
162
+ * ID of the legal entity the transaction belongs to. Use it with
163
+ * `/company-legal-entities/{id}/`.
164
+ */
165
+ entity_id?: string;
166
+ /**
167
+ * State of the sync to the accounting system. `NOT_FINALIZED`: not ready for
168
+ * accounting review. `FOR_REVIEW`: ready for accounting review. `PENDING_SYNC`:
169
+ * sync is in progress. `SYNCED`: synced to the accounting system. `ERROR`: sync
170
+ * failed. `DO_NOT_SYNC`: marked to be excluded from sync. `EXPORTED`: exported for
171
+ * accounting. `NOT_SYNCABLE`: this record cannot be synced. `AUTO_SYNC`: ready to
172
+ * be synced automatically. Null when no sync state is set.
173
+ */
174
+ gl_sync_state?: 'NOT_FINALIZED' | 'FOR_REVIEW' | 'PENDING_SYNC' | 'SYNCED' | 'ERROR' | 'DO_NOT_SYNC' | 'EXPORTED' | 'NOT_SYNCABLE' | 'AUTO_SYNC';
175
+ /**
176
+ * Vendor in the connected accounting system.
177
+ */
178
+ gl_vendor?: CardTransactionListResponse.GlVendor;
179
+ /**
180
+ * Category splits of the transaction amount.
181
+ */
182
+ line_items?: Array<CardTransactionListResponse.LineItem>;
183
+ /**
184
+ * Memo entered on the transaction.
185
+ */
186
+ memo?: string;
187
+ /**
188
+ * Amount charged by the merchant, in the merchant currency. The `value` is a
189
+ * decimal string.
190
+ */
191
+ merchant_amount?: CardTransactionListResponse.MerchantAmount;
192
+ /**
193
+ * URL of the receipt file.
194
+ */
195
+ receipt?: string;
196
+ /**
197
+ * When the purchase or authorization happened, as an ISO 8601 date-time in UTC.
198
+ */
199
+ transaction_date?: string;
200
+ /**
201
+ * `CARD_TRANSACTION`: a posted card charge. `CARD_AUTHORIZATION`: a hold placed by
202
+ * the card network before the charge posts.
203
+ */
204
+ transaction_type?: 'CARD_TRANSACTION' | 'CARD_AUTHORIZATION';
205
+ /**
206
+ * Vendor the purchase was made from.
207
+ */
208
+ vendor?: CardTransactionListResponse.Vendor;
209
+ /**
210
+ * ID of the worker who made the transaction. Use it with `/workers/{id}/`.
211
+ */
212
+ worker_id?: string;
213
+ }
214
+ export declare namespace CardTransactionListResponse {
215
+ /**
216
+ * Amount in the company's headquarters currency. The `value` is a decimal string.
217
+ */
218
+ interface CompanyAmount {
219
+ /**
220
+ * The currency type, ex: USD, EUR, etc.
221
+ */
222
+ currency_type?: string;
223
+ /**
224
+ * The decimal amount for the currency.
225
+ */
226
+ value?: number;
227
+ }
228
+ /**
229
+ * Vendor in the connected accounting system.
230
+ */
231
+ interface GlVendor {
232
+ /**
233
+ * ID of the accounting vendor in Rippling.
234
+ */
235
+ id?: string;
236
+ /**
237
+ * ID of the vendor in the accounting system.
238
+ */
239
+ gl_vendor_id?: string;
240
+ /**
241
+ * Name of the vendor in the accounting system.
242
+ */
243
+ name?: string;
244
+ }
245
+ interface LineItem {
246
+ /**
247
+ * Amount of this split, in the merchant currency. The `value` is a decimal string.
248
+ */
249
+ amount?: LineItem.Amount;
250
+ /**
251
+ * ID of the Spend category assigned to this split. No public API is currently
252
+ * available to retrieve this category; its name is in `category_name`.
253
+ */
254
+ category_id?: string;
255
+ /**
256
+ * Name of the spend category.
257
+ */
258
+ category_name?: string;
259
+ /**
260
+ * Selected dimension values, keyed by dimension ID. Includes department and work
261
+ * location.
262
+ */
263
+ dimension_choices?: {
264
+ [key: string]: LineItem.DimensionChoices;
265
+ };
266
+ /**
267
+ * Whether this split is billed to `gl_customer` in the accounting system.
268
+ * `BILLABLE` means it is billed, `NOT_BILLABLE` means it is not. Null when not
269
+ * set.
270
+ */
271
+ gl_billable?: 'BILLABLE' | 'NOT_BILLABLE';
272
+ /**
273
+ * ID of the customer record in the connected accounting integration. No public
274
+ * Rippling API is currently available to retrieve this accounting customer.
275
+ */
276
+ gl_customer?: string;
277
+ /**
278
+ * Memo entered on this split.
279
+ */
280
+ memo?: string;
281
+ }
282
+ namespace LineItem {
283
+ /**
284
+ * Amount of this split, in the merchant currency. The `value` is a decimal string.
285
+ */
286
+ interface Amount {
287
+ /**
288
+ * The currency type, ex: USD, EUR, etc.
289
+ */
290
+ currency_type?: string;
291
+ /**
292
+ * The decimal amount for the currency.
293
+ */
294
+ value?: number;
295
+ }
296
+ interface DimensionChoices {
297
+ /**
298
+ * Name of the dimension, such as Department.
299
+ */
300
+ dimension_name?: string;
301
+ /**
302
+ * Display name of the selected dimension value.
303
+ */
304
+ label?: string;
305
+ /**
306
+ * ID of the selected dimension value.
307
+ */
308
+ value?: string;
309
+ }
310
+ }
311
+ /**
312
+ * Amount charged by the merchant, in the merchant currency. The `value` is a
313
+ * decimal string.
314
+ */
315
+ interface MerchantAmount {
316
+ /**
317
+ * The currency type, ex: USD, EUR, etc.
318
+ */
319
+ currency_type?: string;
320
+ /**
321
+ * The decimal amount for the currency.
322
+ */
323
+ value?: number;
324
+ }
325
+ /**
326
+ * Vendor the purchase was made from.
327
+ */
328
+ interface Vendor {
329
+ /**
330
+ * ID of the vendor.
331
+ */
332
+ id?: string;
333
+ /**
334
+ * Name of the vendor.
335
+ */
336
+ name?: string;
337
+ }
338
+ }
339
+ /**
340
+ * Meta information for the response.
341
+ */
342
+ export interface CardTransactionRetrieveResponse extends BusinessPartnersAPI.Meta {
343
+ /**
344
+ * Identifier field
345
+ */
346
+ id: string;
347
+ /**
348
+ * Record creation date
349
+ */
350
+ created_at: string;
351
+ /**
352
+ * Record update date
353
+ */
354
+ updated_at: string;
355
+ /**
356
+ * Date the transaction is booked in the accounting system, as an ISO 8601 date
357
+ * (YYYY-MM-DD).
358
+ */
359
+ accounting_date?: string;
360
+ /**
361
+ * Approval status of the transaction. `DRAFT`: not submitted for approval.
362
+ * `PENDING`: awaiting required information or submission before approval.
363
+ * `REQUESTED`: submitted and awaiting approval. `APPROVED`: approved. `REJECTED`:
364
+ * rejected. `FINALIZED`: finalized for payment. `ACTIONED`: payment or
365
+ * reimbursement completed. `CANCELLED`: cancelled. `FAILED`: payment failed. Null
366
+ * for card authorizations.
367
+ */
368
+ approval_status?: 'DRAFT' | 'PENDING' | 'REQUESTED' | 'APPROVED' | 'REJECTED' | 'FINALIZED' | 'ACTIONED' | 'CANCELLED' | 'FAILED';
369
+ /**
370
+ * URLs of other attached files.
371
+ */
372
+ attachments?: Array<string>;
373
+ /**
374
+ * State of the card authorization. `PENDING`: an active hold awaiting completion.
375
+ * `CLOSED`: the authorization completed and the charge posted. `REVERSED`: the
376
+ * authorization was reversed and the hold released. `EXPIRED`: the hold expired
377
+ * without completion. Null for posted card transactions.
378
+ */
379
+ authorization_state?: 'PENDING' | 'CLOSED' | 'REVERSED' | 'EXPIRED';
380
+ /**
381
+ * ID of the Spend card used. No public API is currently available to retrieve this
382
+ * card.
383
+ */
384
+ card_id?: string;
385
+ /**
386
+ * Amount in the company's headquarters currency. The `value` is a decimal string.
387
+ */
388
+ company_amount?: CardTransactionRetrieveResponse.CompanyAmount;
389
+ /**
390
+ * ID of the legal entity the transaction belongs to. Use it with
391
+ * `/company-legal-entities/{id}/`.
392
+ */
393
+ entity_id?: string;
394
+ /**
395
+ * State of the sync to the accounting system. `NOT_FINALIZED`: not ready for
396
+ * accounting review. `FOR_REVIEW`: ready for accounting review. `PENDING_SYNC`:
397
+ * sync is in progress. `SYNCED`: synced to the accounting system. `ERROR`: sync
398
+ * failed. `DO_NOT_SYNC`: marked to be excluded from sync. `EXPORTED`: exported for
399
+ * accounting. `NOT_SYNCABLE`: this record cannot be synced. `AUTO_SYNC`: ready to
400
+ * be synced automatically. Null when no sync state is set.
401
+ */
402
+ gl_sync_state?: 'NOT_FINALIZED' | 'FOR_REVIEW' | 'PENDING_SYNC' | 'SYNCED' | 'ERROR' | 'DO_NOT_SYNC' | 'EXPORTED' | 'NOT_SYNCABLE' | 'AUTO_SYNC';
403
+ /**
404
+ * Vendor in the connected accounting system.
405
+ */
406
+ gl_vendor?: CardTransactionRetrieveResponse.GlVendor;
407
+ /**
408
+ * Category splits of the transaction amount.
409
+ */
410
+ line_items?: Array<CardTransactionRetrieveResponse.LineItem>;
411
+ /**
412
+ * Memo entered on the transaction.
413
+ */
414
+ memo?: string;
415
+ /**
416
+ * Amount charged by the merchant, in the merchant currency. The `value` is a
417
+ * decimal string.
418
+ */
419
+ merchant_amount?: CardTransactionRetrieveResponse.MerchantAmount;
420
+ /**
421
+ * URL of the receipt file.
422
+ */
423
+ receipt?: string;
424
+ /**
425
+ * When the purchase or authorization happened, as an ISO 8601 date-time in UTC.
426
+ */
427
+ transaction_date?: string;
428
+ /**
429
+ * `CARD_TRANSACTION`: a posted card charge. `CARD_AUTHORIZATION`: a hold placed by
430
+ * the card network before the charge posts.
431
+ */
432
+ transaction_type?: 'CARD_TRANSACTION' | 'CARD_AUTHORIZATION';
433
+ /**
434
+ * Vendor the purchase was made from.
435
+ */
436
+ vendor?: CardTransactionRetrieveResponse.Vendor;
437
+ /**
438
+ * ID of the worker who made the transaction. Use it with `/workers/{id}/`.
439
+ */
440
+ worker_id?: string;
441
+ }
442
+ export declare namespace CardTransactionRetrieveResponse {
443
+ /**
444
+ * Amount in the company's headquarters currency. The `value` is a decimal string.
445
+ */
446
+ interface CompanyAmount {
447
+ /**
448
+ * The currency type, ex: USD, EUR, etc.
449
+ */
450
+ currency_type?: string;
451
+ /**
452
+ * The decimal amount for the currency.
453
+ */
454
+ value?: number;
455
+ }
456
+ /**
457
+ * Vendor in the connected accounting system.
458
+ */
459
+ interface GlVendor {
460
+ /**
461
+ * ID of the accounting vendor in Rippling.
462
+ */
463
+ id?: string;
464
+ /**
465
+ * ID of the vendor in the accounting system.
466
+ */
467
+ gl_vendor_id?: string;
468
+ /**
469
+ * Name of the vendor in the accounting system.
470
+ */
471
+ name?: string;
472
+ }
473
+ interface LineItem {
474
+ /**
475
+ * Amount of this split, in the merchant currency. The `value` is a decimal string.
476
+ */
477
+ amount?: LineItem.Amount;
478
+ /**
479
+ * ID of the Spend category assigned to this split. No public API is currently
480
+ * available to retrieve this category; its name is in `category_name`.
481
+ */
482
+ category_id?: string;
483
+ /**
484
+ * Name of the spend category.
485
+ */
486
+ category_name?: string;
487
+ /**
488
+ * Selected dimension values, keyed by dimension ID. Includes department and work
489
+ * location.
490
+ */
491
+ dimension_choices?: {
492
+ [key: string]: LineItem.DimensionChoices;
493
+ };
494
+ /**
495
+ * Whether this split is billed to `gl_customer` in the accounting system.
496
+ * `BILLABLE` means it is billed, `NOT_BILLABLE` means it is not. Null when not
497
+ * set.
498
+ */
499
+ gl_billable?: 'BILLABLE' | 'NOT_BILLABLE';
500
+ /**
501
+ * ID of the customer record in the connected accounting integration. No public
502
+ * Rippling API is currently available to retrieve this accounting customer.
503
+ */
504
+ gl_customer?: string;
505
+ /**
506
+ * Memo entered on this split.
507
+ */
508
+ memo?: string;
509
+ }
510
+ namespace LineItem {
511
+ /**
512
+ * Amount of this split, in the merchant currency. The `value` is a decimal string.
513
+ */
514
+ interface Amount {
515
+ /**
516
+ * The currency type, ex: USD, EUR, etc.
517
+ */
518
+ currency_type?: string;
519
+ /**
520
+ * The decimal amount for the currency.
521
+ */
522
+ value?: number;
523
+ }
524
+ interface DimensionChoices {
525
+ /**
526
+ * Name of the dimension, such as Department.
527
+ */
528
+ dimension_name?: string;
529
+ /**
530
+ * Display name of the selected dimension value.
531
+ */
532
+ label?: string;
533
+ /**
534
+ * ID of the selected dimension value.
535
+ */
536
+ value?: string;
537
+ }
538
+ }
539
+ /**
540
+ * Amount charged by the merchant, in the merchant currency. The `value` is a
541
+ * decimal string.
542
+ */
543
+ interface MerchantAmount {
544
+ /**
545
+ * The currency type, ex: USD, EUR, etc.
546
+ */
547
+ currency_type?: string;
548
+ /**
549
+ * The decimal amount for the currency.
550
+ */
551
+ value?: number;
552
+ }
553
+ /**
554
+ * Vendor the purchase was made from.
555
+ */
556
+ interface Vendor {
557
+ /**
558
+ * ID of the vendor.
559
+ */
560
+ id?: string;
561
+ /**
562
+ * Name of the vendor.
563
+ */
564
+ name?: string;
565
+ }
566
+ }
567
+ export interface CardTransactionListParams {
568
+ cursor?: string;
569
+ filter?: string;
570
+ /**
571
+ * The maximum number of results to return. Defaults to 50. Maximum is 100.
572
+ */
573
+ limit?: number;
574
+ order_by?: string;
575
+ }
576
+ export declare namespace CardTransactions {
577
+ export { type CardTransactionListResponse as CardTransactionListResponse, type CardTransactionRetrieveResponse as CardTransactionRetrieveResponse, type CardTransactionListResponsesPageCursorURL as CardTransactionListResponsesPageCursorURL, type CardTransactionListParams as CardTransactionListParams, };
578
+ }
579
+ //# sourceMappingURL=card-transactions.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"card-transactions.d.mts","sourceRoot":"","sources":["../src/resources/card-transactions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,KAAK,mBAAmB,gCAA4B;AAC3D,OAAO,EAAE,UAAU,EAAE,gCAA4B;AACjD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,+BAA2B;AAChE,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAG7D,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwEG;IACH,IAAI,CACF,KAAK,GAAE,yBAAyB,GAAG,IAAI,GAAG,SAAc,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,yCAAyC,EAAE,2BAA2B,CAAC;IAOtF;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,+BAA+B,CAAC;CAG5F;AAED,MAAM,MAAM,yCAAyC,GAAG,aAAa,CAAC,2BAA2B,CAAC,CAAC;AAEnG;;;;;;GAMG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC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