@rippling/rippling-sdk 0.2.0-alpha.115 → 0.2.0-alpha.116

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 (113) hide show
  1. package/client.d.mts +4 -4
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +4 -4
  4. package/client.d.ts.map +1 -1
  5. package/client.js.map +1 -1
  6. package/client.mjs.map +1 -1
  7. package/lib/manifest/acp-agent-source-files.d.mts +2 -1
  8. package/lib/manifest/acp-agent-source-files.d.mts.map +1 -1
  9. package/lib/manifest/acp-agent-source-files.d.ts +2 -1
  10. package/lib/manifest/acp-agent-source-files.d.ts.map +1 -1
  11. package/lib/manifest/acp-agent-source-files.js +21 -2
  12. package/lib/manifest/acp-agent-source-files.js.map +1 -1
  13. package/lib/manifest/acp-agent-source-files.mjs +21 -2
  14. package/lib/manifest/acp-agent-source-files.mjs.map +1 -1
  15. package/package.json +1 -1
  16. package/resources/agents/agents.d.mts +32 -6
  17. package/resources/agents/agents.d.mts.map +1 -1
  18. package/resources/agents/agents.d.ts +32 -6
  19. package/resources/agents/agents.d.ts.map +1 -1
  20. package/resources/agents/agents.js +12 -6
  21. package/resources/agents/agents.js.map +1 -1
  22. package/resources/agents/agents.mjs +12 -6
  23. package/resources/agents/agents.mjs.map +1 -1
  24. package/resources/agents/sessions/messages.d.mts +16 -1
  25. package/resources/agents/sessions/messages.d.mts.map +1 -1
  26. package/resources/agents/sessions/messages.d.ts +16 -1
  27. package/resources/agents/sessions/messages.d.ts.map +1 -1
  28. package/resources/agents/sessions/messages.js +4 -1
  29. package/resources/agents/sessions/messages.js.map +1 -1
  30. package/resources/agents/sessions/messages.mjs +4 -1
  31. package/resources/agents/sessions/messages.mjs.map +1 -1
  32. package/resources/card-transactions.d.mts +759 -54
  33. package/resources/card-transactions.d.mts.map +1 -1
  34. package/resources/card-transactions.d.ts +759 -54
  35. package/resources/card-transactions.d.ts.map +1 -1
  36. package/resources/card-transactions.js +204 -0
  37. package/resources/card-transactions.js.map +1 -1
  38. package/resources/card-transactions.mjs +204 -0
  39. package/resources/card-transactions.mjs.map +1 -1
  40. package/resources/custom-apps.d.mts +6 -6
  41. package/resources/custom-apps.d.ts +6 -6
  42. package/resources/index.d.mts +2 -2
  43. package/resources/index.d.mts.map +1 -1
  44. package/resources/index.d.ts +2 -2
  45. package/resources/index.d.ts.map +1 -1
  46. package/resources/index.js.map +1 -1
  47. package/resources/index.mjs.map +1 -1
  48. package/resources/package-manifests/packages/versions.d.mts +10 -0
  49. package/resources/package-manifests/packages/versions.d.mts.map +1 -1
  50. package/resources/package-manifests/packages/versions.d.ts +10 -0
  51. package/resources/package-manifests/packages/versions.d.ts.map +1 -1
  52. package/resources/package-manifests/packages/versions.js +1 -0
  53. package/resources/package-manifests/packages/versions.js.map +1 -1
  54. package/resources/package-manifests/packages/versions.mjs +1 -0
  55. package/resources/package-manifests/packages/versions.mjs.map +1 -1
  56. package/resources/package-versions/package-versions.d.mts +35 -5
  57. package/resources/package-versions/package-versions.d.mts.map +1 -1
  58. package/resources/package-versions/package-versions.d.ts +35 -5
  59. package/resources/package-versions/package-versions.d.ts.map +1 -1
  60. package/resources/package-versions/package-versions.js +8 -5
  61. package/resources/package-versions/package-versions.js.map +1 -1
  62. package/resources/package-versions/package-versions.mjs +8 -5
  63. package/resources/package-versions/package-versions.mjs.map +1 -1
  64. package/resources/package-versions/publish.d.mts +10 -0
  65. package/resources/package-versions/publish.d.mts.map +1 -1
  66. package/resources/package-versions/publish.d.ts +10 -0
  67. package/resources/package-versions/publish.d.ts.map +1 -1
  68. package/resources/package-versions/publish.js +1 -0
  69. package/resources/package-versions/publish.js.map +1 -1
  70. package/resources/package-versions/publish.mjs +1 -0
  71. package/resources/package-versions/publish.mjs.map +1 -1
  72. package/resources/packages/next-versions.d.mts +10 -0
  73. package/resources/packages/next-versions.d.mts.map +1 -1
  74. package/resources/packages/next-versions.d.ts +10 -0
  75. package/resources/packages/next-versions.d.ts.map +1 -1
  76. package/resources/packages/next-versions.js +1 -0
  77. package/resources/packages/next-versions.js.map +1 -1
  78. package/resources/packages/next-versions.mjs +1 -0
  79. package/resources/packages/next-versions.mjs.map +1 -1
  80. package/resources/packages/versions.d.mts +20 -0
  81. package/resources/packages/versions.d.mts.map +1 -1
  82. package/resources/packages/versions.d.ts +20 -0
  83. package/resources/packages/versions.d.ts.map +1 -1
  84. package/resources/packages/versions.js +2 -0
  85. package/resources/packages/versions.js.map +1 -1
  86. package/resources/packages/versions.mjs +2 -0
  87. package/resources/packages/versions.mjs.map +1 -1
  88. package/resources/reimbursements.d.mts +1086 -44
  89. package/resources/reimbursements.d.mts.map +1 -1
  90. package/resources/reimbursements.d.ts +1086 -44
  91. package/resources/reimbursements.d.ts.map +1 -1
  92. package/resources/reimbursements.js +212 -0
  93. package/resources/reimbursements.js.map +1 -1
  94. package/resources/reimbursements.mjs +212 -0
  95. package/resources/reimbursements.mjs.map +1 -1
  96. package/src/client.ts +8 -0
  97. package/src/lib/manifest/acp-agent-source-files.ts +17 -2
  98. package/src/resources/agents/agents.ts +36 -6
  99. package/src/resources/agents/sessions/messages.ts +17 -1
  100. package/src/resources/card-transactions.ts +881 -40
  101. package/src/resources/custom-apps.ts +6 -6
  102. package/src/resources/index.ts +4 -0
  103. package/src/resources/package-manifests/packages/versions.ts +11 -0
  104. package/src/resources/package-versions/package-versions.ts +38 -5
  105. package/src/resources/package-versions/publish.ts +11 -0
  106. package/src/resources/packages/next-versions.ts +11 -0
  107. package/src/resources/packages/versions.ts +22 -0
  108. package/src/resources/reimbursements.ts +1266 -31
  109. package/src/version.ts +1 -1
  110. package/version.d.mts +1 -1
  111. package/version.d.ts +1 -1
  112. package/version.js +1 -1
  113. package/version.mjs +1 -1
package/src/client.ts CHANGED
@@ -193,6 +193,8 @@ import {
193
193
  CardTransactionRetrieveResponse,
194
194
  CardTransactionUpdateParams,
195
195
  CardTransactionUpdateResponse,
196
+ CardTransactionUploadAttachmentParams,
197
+ CardTransactionUploadAttachmentResponse,
196
198
  CardTransactionUploadReceiptParams,
197
199
  CardTransactionUploadReceiptResponse,
198
200
  CardTransactions,
@@ -647,6 +649,8 @@ import {
647
649
  ReimbursementRetrieveResponse,
648
650
  ReimbursementUpdateParams,
649
651
  ReimbursementUpdateResponse,
652
+ ReimbursementUploadAttachmentParams,
653
+ ReimbursementUploadAttachmentResponse,
650
654
  ReimbursementUploadReceiptParams,
651
655
  ReimbursementUploadReceiptResponse,
652
656
  Reimbursements,
@@ -2890,11 +2894,13 @@ export declare namespace RipplingSDK {
2890
2894
  type CardTransactionListResponse as CardTransactionListResponse,
2891
2895
  type CardTransactionRetrieveResponse as CardTransactionRetrieveResponse,
2892
2896
  type CardTransactionUpdateResponse as CardTransactionUpdateResponse,
2897
+ type CardTransactionUploadAttachmentResponse as CardTransactionUploadAttachmentResponse,
2893
2898
  type CardTransactionUploadReceiptResponse as CardTransactionUploadReceiptResponse,
2894
2899
  type CardTransactionListResponsesPageCursorURL as CardTransactionListResponsesPageCursorURL,
2895
2900
  type CardTransactionListParams as CardTransactionListParams,
2896
2901
  type CardTransactionRetrieveParams as CardTransactionRetrieveParams,
2897
2902
  type CardTransactionUpdateParams as CardTransactionUpdateParams,
2903
+ type CardTransactionUploadAttachmentParams as CardTransactionUploadAttachmentParams,
2898
2904
  type CardTransactionUploadReceiptParams as CardTransactionUploadReceiptParams,
2899
2905
  };
2900
2906
 
@@ -3294,11 +3300,13 @@ export declare namespace RipplingSDK {
3294
3300
  type ReimbursementListResponse as ReimbursementListResponse,
3295
3301
  type ReimbursementRetrieveResponse as ReimbursementRetrieveResponse,
3296
3302
  type ReimbursementUpdateResponse as ReimbursementUpdateResponse,
3303
+ type ReimbursementUploadAttachmentResponse as ReimbursementUploadAttachmentResponse,
3297
3304
  type ReimbursementUploadReceiptResponse as ReimbursementUploadReceiptResponse,
3298
3305
  type ReimbursementListResponsesPageCursorURL as ReimbursementListResponsesPageCursorURL,
3299
3306
  type ReimbursementListParams as ReimbursementListParams,
3300
3307
  type ReimbursementRetrieveParams as ReimbursementRetrieveParams,
3301
3308
  type ReimbursementUpdateParams as ReimbursementUpdateParams,
3309
+ type ReimbursementUploadAttachmentParams as ReimbursementUploadAttachmentParams,
3302
3310
  type ReimbursementUploadReceiptParams as ReimbursementUploadReceiptParams,
3303
3311
  };
3304
3312
 
@@ -8,12 +8,14 @@ import type { ACPAgentSourceFile } from './acp-agent';
8
8
  *
9
9
  * Paths in the returned source revision are relative to the current working
10
10
  * directory. Run the manifest from its package root and pass the directory
11
- * containing agent source, such as `src`.
11
+ * containing agent source, such as `src`. Root dependency files are included
12
+ * unchanged. Optional lockfiles and pnpm workspace settings may be absent.
12
13
  */
13
14
  export async function discoverACPAgentSourceFiles(sourceDirectory: string): Promise<ACPAgentSourceFile[]> {
14
15
  const root = process.cwd();
15
16
  const sourceRoot = path.resolve(root, sourceDirectory);
16
17
  const files: ACPAgentSourceFile[] = [];
18
+ const metadata = ['package.json', 'package-lock.json', 'pnpm-lock.yaml', 'pnpm-workspace.yaml'];
17
19
 
18
20
  async function visit(directory: string): Promise<void> {
19
21
  for (const entry of await readdir(directory, { withFileTypes: true })) {
@@ -24,7 +26,8 @@ export async function discoverACPAgentSourceFiles(sourceDirectory: string): Prom
24
26
  }
25
27
  continue;
26
28
  }
27
- if (!entry.isFile()) continue;
29
+ if (!entry.isFile() || entry.name === '.npmrc') continue;
30
+ if (metadata.includes(path.relative(root, fullPath))) continue;
28
31
 
29
32
  files.push({
30
33
  path: path.relative(root, fullPath).split(path.sep).join('/'),
@@ -38,5 +41,17 @@ export async function discoverACPAgentSourceFiles(sourceDirectory: string): Prom
38
41
  if (files.length === 0) {
39
42
  throw new Error(`No source files found under ${sourceDirectory}.`);
40
43
  }
44
+ for (const filename of metadata) {
45
+ if (files.some((file) => file.path === filename)) continue;
46
+ try {
47
+ files.push({
48
+ path: filename,
49
+ content: await readFile(path.join(root, filename), 'utf8'),
50
+ kind: 'typescript',
51
+ });
52
+ } catch (error) {
53
+ if (filename === 'package.json' || (error as NodeJS.ErrnoException).code !== 'ENOENT') throw error;
54
+ }
55
+ }
41
56
  return files.sort((left, right) => left.path.localeCompare(right.path));
42
57
  }
@@ -46,7 +46,8 @@ export class Agents extends APIResource {
46
46
  sessions: SessionsAPI.Sessions = new SessionsAPI.Sessions(this._client);
47
47
 
48
48
  /**
49
- * A list of agents.
49
+ * List locally created agents and company-installed global agents. Use the
50
+ * read-only is_global field to distinguish them.
50
51
  *
51
52
  * @example HTTP
52
53
  * Representative request and response shapes.
@@ -68,7 +69,8 @@ export class Agents extends APIResource {
68
69
  * "name": "string",
69
70
  * "api_name": "string",
70
71
  * "description": "string",
71
- * "is_for_evals": false
72
+ * "is_for_evals": false,
73
+ * "is_global": false
72
74
  * }
73
75
  * ],
74
76
  * "next_link": "string"
@@ -109,7 +111,8 @@ export class Agents extends APIResource {
109
111
  * "name": "string",
110
112
  * "api_name": "string",
111
113
  * "description": "string",
112
- * "is_for_evals": false
114
+ * "is_for_evals": false,
115
+ * "is_global": false
113
116
  * }
114
117
  * ```
115
118
  */
@@ -118,7 +121,8 @@ export class Agents extends APIResource {
118
121
  }
119
122
 
120
123
  /**
121
- * Retrieve an agent.
124
+ * Retrieve a locally created agent or a company-installed global agent. Use the
125
+ * read-only is_global field to distinguish them.
122
126
  *
123
127
  * @example HTTP
124
128
  * Representative request and response shapes.
@@ -138,7 +142,8 @@ export class Agents extends APIResource {
138
142
  * "name": "string",
139
143
  * "api_name": "string",
140
144
  * "description": "string",
141
- * "is_for_evals": false
145
+ * "is_for_evals": false,
146
+ * "is_global": false
142
147
  * }
143
148
  * ```
144
149
  */
@@ -170,7 +175,8 @@ export class Agents extends APIResource {
170
175
  * "name": "string",
171
176
  * "api_name": "string",
172
177
  * "description": "string",
173
- * "is_for_evals": false
178
+ * "is_for_evals": false,
179
+ * "is_global": false
174
180
  * }
175
181
  * ```
176
182
  */
@@ -240,6 +246,12 @@ export interface AgentListResponse {
240
246
  * Whether the agent is used for evaluations
241
247
  */
242
248
  is_for_evals?: boolean;
249
+
250
+ /**
251
+ * Whether the agent is a global agent installed in the company. Read-only; cannot
252
+ * be set on create or update.
253
+ */
254
+ is_global?: boolean;
243
255
  }
244
256
 
245
257
  export interface AgentCreateResponse {
@@ -277,6 +289,12 @@ export interface AgentCreateResponse {
277
289
  * Whether the agent is used for evaluations
278
290
  */
279
291
  is_for_evals?: boolean;
292
+
293
+ /**
294
+ * Whether the agent is a global agent installed in the company. Read-only; cannot
295
+ * be set on create or update.
296
+ */
297
+ is_global?: boolean;
280
298
  }
281
299
 
282
300
  export interface AgentRetrieveResponse {
@@ -314,6 +332,12 @@ export interface AgentRetrieveResponse {
314
332
  * Whether the agent is used for evaluations
315
333
  */
316
334
  is_for_evals?: boolean;
335
+
336
+ /**
337
+ * Whether the agent is a global agent installed in the company. Read-only; cannot
338
+ * be set on create or update.
339
+ */
340
+ is_global?: boolean;
317
341
  }
318
342
 
319
343
  export interface AgentUpdateResponse {
@@ -351,6 +375,12 @@ export interface AgentUpdateResponse {
351
375
  * Whether the agent is used for evaluations
352
376
  */
353
377
  is_for_evals?: boolean;
378
+
379
+ /**
380
+ * Whether the agent is a global agent installed in the company. Read-only; cannot
381
+ * be set on create or update.
382
+ */
383
+ is_global?: boolean;
354
384
  }
355
385
 
356
386
  export interface AgentListParams {
@@ -10,7 +10,10 @@ import { path } from '../../../internal/utils/path';
10
10
  */
11
11
  export class Messages extends APIResource {
12
12
  /**
13
- * Append a user prompt to an existing agent session.
13
+ * Append a user prompt to an existing agent session. To retry without creating a
14
+ * new submission, provide the same idempotency_key and identical prompt. Omitting
15
+ * the key or sending null creates a distinct submission for each request. See the
16
+ * field description for replay limitations.
14
17
  *
15
18
  * @example HTTP
16
19
  * Representative request and response shapes.
@@ -144,6 +147,19 @@ export interface MessageCreateParams {
144
147
  * The next user prompt.
145
148
  */
146
149
  prompt: string;
150
+
151
+ /**
152
+ * Optional append-message retry key. Reuse a supplied key only for the same
153
+ * session and an identical prompt, including retries while an earlier call is in
154
+ * flight. If the prompt differs, behavior is not guaranteed: the request may be
155
+ * rejected or the original submission may be returned without applying the changed
156
+ * prompt. Do not rely on changed-prompt retries to submit new instructions; use a
157
+ * new key. Omission or null generates a new key per HTTP request, so keyless
158
+ * retries are distinct submissions. The receipt confirms admission, not
159
+ * completion. Replay requires retained submission records and a valid session
160
+ * lifecycle; no fixed retention window is guaranteed.
161
+ */
162
+ idempotency_key?: string | null;
147
163
  }
148
164
 
149
165
  export declare namespace Messages {