syllable-sdk 0.1.0-alpha.231 → 0.1.0-alpha.233

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 (34) hide show
  1. package/docs/sdks/batches/README.md +4 -4
  2. package/docs/sdks/prompts/README.md +1 -1
  3. package/docs/sdks/workflows/README.md +8 -8
  4. package/funcs/promptsPromptsHistory.d.ts +1 -1
  5. package/funcs/promptsPromptsHistory.js +1 -1
  6. package/jsr.json +1 -1
  7. package/lib/config.d.ts +2 -2
  8. package/lib/config.js +2 -2
  9. package/models/components/index.d.ts +1 -0
  10. package/models/components/index.d.ts.map +1 -1
  11. package/models/components/index.js +1 -0
  12. package/models/components/index.js.map +1 -1
  13. package/models/components/languagecode.d.ts +3 -3
  14. package/models/components/languagecode.js +1 -1
  15. package/models/components/languagecode.js.map +1 -1
  16. package/models/components/prompthistory.d.ts +24 -8
  17. package/models/components/prompthistory.d.ts.map +1 -1
  18. package/models/components/prompthistory.js +13 -0
  19. package/models/components/prompthistory.js.map +1 -1
  20. package/models/components/prompthistorylinkedtool.d.ts +50 -0
  21. package/models/components/prompthistorylinkedtool.d.ts.map +1 -0
  22. package/models/components/prompthistorylinkedtool.js +78 -0
  23. package/models/components/prompthistorylinkedtool.js.map +1 -0
  24. package/openapi.json +116 -44
  25. package/package.json +1 -1
  26. package/sdk/prompts.d.ts +1 -1
  27. package/sdk/prompts.js +1 -1
  28. package/src/funcs/promptsPromptsHistory.ts +1 -1
  29. package/src/lib/config.ts +2 -2
  30. package/src/models/components/index.ts +1 -0
  31. package/src/models/components/languagecode.ts +1 -1
  32. package/src/models/components/prompthistory.ts +41 -8
  33. package/src/models/components/prompthistorylinkedtool.ts +106 -0
  34. package/src/sdk/prompts.ts +1 -1
package/openapi.json CHANGED
@@ -5476,7 +5476,7 @@
5476
5476
  "prompts"
5477
5477
  ],
5478
5478
  "summary": "Get Prompt History",
5479
- "description": "Get a prompt by ID",
5479
+ "description": "Get a list of historical versions of a prompt by its ID",
5480
5480
  "operationId": "prompts_history",
5481
5481
  "security": [
5482
5482
  {
@@ -13032,7 +13032,7 @@
13032
13032
  "title": "Batch Id",
13033
13033
  "description": "Unique ID for conversation batch",
13034
13034
  "examples": [
13035
- "20250805.9"
13035
+ "20250806.9"
13036
13036
  ]
13037
13037
  },
13038
13038
  "campaign_id": {
@@ -13056,7 +13056,7 @@
13056
13056
  "title": "Expires On",
13057
13057
  "description": "Timestamp of batch expiration",
13058
13058
  "examples": [
13059
- "2025-08-06T00:00:00Z"
13059
+ "2025-08-07T00:00:00Z"
13060
13060
  ]
13061
13061
  },
13062
13062
  "paused": {
@@ -13109,7 +13109,7 @@
13109
13109
  "title": "Created At",
13110
13110
  "description": "Timestamp of batch creation",
13111
13111
  "examples": [
13112
- "2025-08-05T00:00:00Z"
13112
+ "2025-08-06T00:00:00Z"
13113
13113
  ]
13114
13114
  },
13115
13115
  "deleted_at": {
@@ -13125,7 +13125,7 @@
13125
13125
  "title": "Deleted At",
13126
13126
  "description": "Timestamp of batch deletion",
13127
13127
  "examples": [
13128
- "2025-08-05T00:00:00Z"
13128
+ "2025-08-06T00:00:00Z"
13129
13129
  ]
13130
13130
  },
13131
13131
  "deleted_reason": {
@@ -13156,7 +13156,7 @@
13156
13156
  "title": "Last Updated At",
13157
13157
  "description": "Timestamp of last change to batch",
13158
13158
  "examples": [
13159
- "2025-08-05T00:00:00Z"
13159
+ "2025-08-06T00:00:00Z"
13160
13160
  ]
13161
13161
  },
13162
13162
  "last_updated_by": {
@@ -13858,7 +13858,7 @@
13858
13858
  "title": "Batch Id",
13859
13859
  "description": "Unique ID for conversation batch",
13860
13860
  "examples": [
13861
- "20250805.9"
13861
+ "20250806.9"
13862
13862
  ]
13863
13863
  },
13864
13864
  "campaign_id": {
@@ -13882,7 +13882,7 @@
13882
13882
  "title": "Expires On",
13883
13883
  "description": "Timestamp of batch expiration",
13884
13884
  "examples": [
13885
- "2025-08-06T00:00:00Z"
13885
+ "2025-08-07T00:00:00Z"
13886
13886
  ]
13887
13887
  },
13888
13888
  "paused": {
@@ -13935,7 +13935,7 @@
13935
13935
  "title": "Created At",
13936
13936
  "description": "Timestamp of batch creation",
13937
13937
  "examples": [
13938
- "2025-08-05T00:00:00Z"
13938
+ "2025-08-06T00:00:00Z"
13939
13939
  ]
13940
13940
  },
13941
13941
  "deleted_at": {
@@ -13951,7 +13951,7 @@
13951
13951
  "title": "Deleted At",
13952
13952
  "description": "Timestamp of batch deletion",
13953
13953
  "examples": [
13954
- "2025-08-05T00:00:00Z"
13954
+ "2025-08-06T00:00:00Z"
13955
13955
  ]
13956
13956
  },
13957
13957
  "deleted_reason": {
@@ -13982,7 +13982,7 @@
13982
13982
  "title": "Last Updated At",
13983
13983
  "description": "Timestamp of last change to batch",
13984
13984
  "examples": [
13985
- "2025-08-05T00:00:00Z"
13985
+ "2025-08-06T00:00:00Z"
13986
13986
  ]
13987
13987
  },
13988
13988
  "last_updated_by": {
@@ -14025,7 +14025,7 @@
14025
14025
  "title": "Batch Id",
14026
14026
  "description": "Unique ID for conversation batch",
14027
14027
  "examples": [
14028
- "20250805.9"
14028
+ "20250806.9"
14029
14029
  ]
14030
14030
  },
14031
14031
  "campaign_id": {
@@ -14049,7 +14049,7 @@
14049
14049
  "title": "Expires On",
14050
14050
  "description": "Timestamp of batch expiration",
14051
14051
  "examples": [
14052
- "2025-08-06T00:00:00Z"
14052
+ "2025-08-07T00:00:00Z"
14053
14053
  ]
14054
14054
  },
14055
14055
  "paused": {
@@ -14198,7 +14198,7 @@
14198
14198
  "title": "Created At",
14199
14199
  "description": "Timestamp of request creation",
14200
14200
  "examples": [
14201
- "2025-08-04T00:00:00Z"
14201
+ "2025-08-05T00:00:00Z"
14202
14202
  ]
14203
14203
  },
14204
14204
  "sent_at": {
@@ -14214,7 +14214,7 @@
14214
14214
  "title": "Sent At",
14215
14215
  "description": "Timestamp at which request was sent",
14216
14216
  "examples": [
14217
- "2025-08-05T00:00:00Z"
14217
+ "2025-08-06T00:00:00Z"
14218
14218
  ]
14219
14219
  },
14220
14220
  "attempt_count": {
@@ -16130,7 +16130,7 @@
16130
16130
  "title": "Created At",
16131
16131
  "description": "Timestamp at which insight upload folder was created",
16132
16132
  "examples": [
16133
- "2025-08-04T00:00:00Z"
16133
+ "2025-08-05T00:00:00Z"
16134
16134
  ]
16135
16135
  },
16136
16136
  "updated_at": {
@@ -16139,7 +16139,7 @@
16139
16139
  "title": "Updated At",
16140
16140
  "description": "Timestamp at which insight upload folder was last updated",
16141
16141
  "examples": [
16142
- "2025-08-05T00:00:00Z"
16142
+ "2025-08-06T00:00:00Z"
16143
16143
  ]
16144
16144
  },
16145
16145
  "last_updated_by": {
@@ -16854,7 +16854,7 @@
16854
16854
  "title": "Created At",
16855
16855
  "description": "Timestamp of at which insight tool configuration was created",
16856
16856
  "examples": [
16857
- "2025-08-04T00:00:00Z"
16857
+ "2025-08-05T00:00:00Z"
16858
16858
  ]
16859
16859
  },
16860
16860
  "updated_at": {
@@ -16863,7 +16863,7 @@
16863
16863
  "title": "Updated At",
16864
16864
  "description": "Timestamp at which insight tool configuration was last updated",
16865
16865
  "examples": [
16866
- "2025-08-05T00:00:00Z"
16866
+ "2025-08-06T00:00:00Z"
16867
16867
  ]
16868
16868
  },
16869
16869
  "last_updated_by": {
@@ -17244,7 +17244,7 @@
17244
17244
  "title": "Start Datetime",
17245
17245
  "description": "Target session timestamp the workflow (backfill) should start. An empty value indicates start on activation - live sessions only",
17246
17246
  "examples": [
17247
- "2025-08-04T00:00:00Z"
17247
+ "2025-08-05T00:00:00Z"
17248
17248
  ]
17249
17249
  },
17250
17250
  "end_datetime": {
@@ -17260,7 +17260,7 @@
17260
17260
  "title": "End Datetime",
17261
17261
  "description": "Target session timestamp the workflow (backfill) should end. An empty value indicates no end, i.e., include live sessions until deactivation",
17262
17262
  "examples": [
17263
- "2025-08-05T00:00:00Z"
17263
+ "2025-08-06T00:00:00Z"
17264
17264
  ]
17265
17265
  }
17266
17266
  },
@@ -17335,7 +17335,7 @@
17335
17335
  "title": "Start Datetime",
17336
17336
  "description": "Target session timestamp the workflow (backfill) should start. An empty value indicates start on activation - live sessions only",
17337
17337
  "examples": [
17338
- "2025-08-04T00:00:00Z"
17338
+ "2025-08-05T00:00:00Z"
17339
17339
  ]
17340
17340
  },
17341
17341
  "end_datetime": {
@@ -17351,7 +17351,7 @@
17351
17351
  "title": "End Datetime",
17352
17352
  "description": "Target session timestamp the workflow (backfill) should end. An empty value indicates no end, i.e., include live sessions until deactivation",
17353
17353
  "examples": [
17354
- "2025-08-05T00:00:00Z"
17354
+ "2025-08-06T00:00:00Z"
17355
17355
  ]
17356
17356
  },
17357
17357
  "id": {
@@ -17404,7 +17404,7 @@
17404
17404
  "title": "Created At",
17405
17405
  "description": "Timestamp at which the insight workflow was created",
17406
17406
  "examples": [
17407
- "2025-08-04T00:00:00Z"
17407
+ "2025-08-05T00:00:00Z"
17408
17408
  ]
17409
17409
  },
17410
17410
  "updated_at": {
@@ -17413,7 +17413,7 @@
17413
17413
  "title": "Updated At",
17414
17414
  "description": "Timestamp of most recent update to the insight workflow",
17415
17415
  "examples": [
17416
- "2025-08-05T00:00:00Z"
17416
+ "2025-08-06T00:00:00Z"
17417
17417
  ]
17418
17418
  },
17419
17419
  "last_updated_by": {
@@ -17509,7 +17509,7 @@
17509
17509
  "title": "Created At",
17510
17510
  "description": "Timestamp at which insight upload folder was created",
17511
17511
  "examples": [
17512
- "2025-08-04T00:00:00Z"
17512
+ "2025-08-05T00:00:00Z"
17513
17513
  ]
17514
17514
  },
17515
17515
  "updated_at": {
@@ -17518,7 +17518,7 @@
17518
17518
  "title": "Updated At",
17519
17519
  "description": "Timestamp at which insight upload folder was last updated",
17520
17520
  "examples": [
17521
- "2025-08-05T00:00:00Z"
17521
+ "2025-08-06T00:00:00Z"
17522
17522
  ]
17523
17523
  },
17524
17524
  "last_updated_by": {
@@ -17753,7 +17753,7 @@
17753
17753
  "title": "Created At",
17754
17754
  "description": "Timestamp at which insight tool result was created",
17755
17755
  "examples": [
17756
- "2025-08-04T00:00:00Z"
17756
+ "2025-08-05T00:00:00Z"
17757
17757
  ]
17758
17758
  },
17759
17759
  "updated_at": {
@@ -17762,7 +17762,7 @@
17762
17762
  "title": "Updated At",
17763
17763
  "description": "Timestamp at which insight tool result was last updated",
17764
17764
  "examples": [
17765
- "2025-08-05T00:00:00Z"
17765
+ "2025-08-06T00:00:00Z"
17766
17766
  ]
17767
17767
  }
17768
17768
  },
@@ -17897,7 +17897,7 @@
17897
17897
  "title": "Start Time",
17898
17898
  "description": "Start time of the uploaded file",
17899
17899
  "examples": [
17900
- "2025-08-04T00:00:00Z"
17900
+ "2025-08-05T00:00:00Z"
17901
17901
  ]
17902
17902
  },
17903
17903
  "end_time": {
@@ -17913,7 +17913,7 @@
17913
17913
  "title": "End Time",
17914
17914
  "description": "End time of the uploaded file",
17915
17915
  "examples": [
17916
- "2025-08-05T00:00:00Z"
17916
+ "2025-08-06T00:00:00Z"
17917
17917
  ]
17918
17918
  },
17919
17919
  "error_message": {
@@ -17968,7 +17968,7 @@
17968
17968
  "title": "Created At",
17969
17969
  "description": "Timestamp at which insight upload file was created",
17970
17970
  "examples": [
17971
- "2025-08-04T00:00:00Z"
17971
+ "2025-08-05T00:00:00Z"
17972
17972
  ]
17973
17973
  }
17974
17974
  },
@@ -18117,7 +18117,7 @@
18117
18117
  "th-TH",
18118
18118
  "vi-VN",
18119
18119
  "bs-BA",
18120
- "sw"
18120
+ "sw-KE"
18121
18121
  ],
18122
18122
  "title": "LanguageCode",
18123
18123
  "description": "BCP 47 codes of languages that Syllable supports."
@@ -20861,7 +20861,7 @@
20861
20861
  "title": "Created At",
20862
20862
  "description": "Timestamp of campaign creation",
20863
20863
  "examples": [
20864
- "2025-08-05T00:00:00Z"
20864
+ "2025-08-06T00:00:00Z"
20865
20865
  ]
20866
20866
  },
20867
20867
  "updated_at": {
@@ -20870,7 +20870,7 @@
20870
20870
  "title": "Updated At",
20871
20871
  "description": "Timestamp of campaign update",
20872
20872
  "examples": [
20873
- "2025-08-05T00:00:00Z"
20873
+ "2025-08-06T00:00:00Z"
20874
20874
  ]
20875
20875
  },
20876
20876
  "last_updated_by": {
@@ -21261,7 +21261,7 @@
21261
21261
  "type": "string",
21262
21262
  "format": "date-time",
21263
21263
  "title": "Timestamp",
21264
- "description": "Timestamp of the change",
21264
+ "description": "Timestamp of the change resulting in this version",
21265
21265
  "examples": [
21266
21266
  "2024-01-01T12:00:00Z"
21267
21267
  ]
@@ -21274,10 +21274,18 @@
21274
21274
  "1"
21275
21275
  ]
21276
21276
  },
21277
+ "version_number": {
21278
+ "type": "integer",
21279
+ "title": "Version Number",
21280
+ "description": "Version number of this version. Starts at 1 when prompt is created, and incremented on each change.",
21281
+ "examples": [
21282
+ 1
21283
+ ]
21284
+ },
21277
21285
  "prompt_text": {
21278
21286
  "type": "string",
21279
21287
  "title": "Prompt Text",
21280
- "description": "Text of the prompt",
21288
+ "description": "Text of the prompt at this version",
21281
21289
  "examples": [
21282
21290
  "You are a weather agent. Answer the user's questions about weather and nothing else."
21283
21291
  ]
@@ -21292,7 +21300,7 @@
21292
21300
  }
21293
21301
  ],
21294
21302
  "title": "Prompt Description",
21295
- "description": "Description of the prompt",
21303
+ "description": "Description of the prompt at this version",
21296
21304
  "examples": [
21297
21305
  "Prompt for a weather agent."
21298
21306
  ]
@@ -21300,7 +21308,7 @@
21300
21308
  "prompt_name": {
21301
21309
  "type": "string",
21302
21310
  "title": "Prompt Name",
21303
- "description": "Name of the prompt",
21311
+ "description": "Name of the prompt at this version",
21304
21312
  "examples": [
21305
21313
  "Weather Agent Prompt"
21306
21314
  ]
@@ -21315,7 +21323,7 @@
21315
21323
  }
21316
21324
  ],
21317
21325
  "title": "Llm Config",
21318
- "description": "String representation of LLM config for the prompt"
21326
+ "description": "String representation of LLM config for the prompt at this version"
21319
21327
  },
21320
21328
  "comments": {
21321
21329
  "anyOf": [
@@ -21327,7 +21335,7 @@
21327
21335
  }
21328
21336
  ],
21329
21337
  "title": "Comments",
21330
- "description": "Comments describing the change",
21338
+ "description": "Comments describing the change that resulted in this version",
21331
21339
  "examples": [
21332
21340
  "Updated prompt text to include requirement to not answer questions that aren't about weather."
21333
21341
  ]
@@ -21335,22 +21343,86 @@
21335
21343
  "user_email": {
21336
21344
  "type": "string",
21337
21345
  "title": "User Email",
21338
- "description": "Email address of the user who made the change",
21346
+ "description": "Email address of the user who made the change that resulted in this version",
21339
21347
  "examples": [
21340
21348
  "user@email.com"
21341
21349
  ]
21350
+ },
21351
+ "linked_tools": {
21352
+ "items": {
21353
+ "$ref": "#/components/schemas/PromptHistoryLinkedTool"
21354
+ },
21355
+ "type": "array",
21356
+ "title": "Linked Tools",
21357
+ "description": "Tools that were linked to this version of the prompt",
21358
+ "default": []
21359
+ },
21360
+ "is_pre_enhancements": {
21361
+ "type": "boolean",
21362
+ "title": "Is Pre Enhancements",
21363
+ "description": "Whether this version of the prompt was created before history of tool-prompt linking was tracked",
21364
+ "examples": [
21365
+ true
21366
+ ]
21342
21367
  }
21343
21368
  },
21344
21369
  "type": "object",
21345
21370
  "required": [
21346
21371
  "timestamp",
21347
21372
  "prompt_id",
21373
+ "version_number",
21348
21374
  "prompt_text",
21349
21375
  "prompt_name",
21350
- "user_email"
21376
+ "user_email",
21377
+ "is_pre_enhancements"
21351
21378
  ],
21352
21379
  "title": "PromptHistory",
21353
- "description": "Record of a change to a prompt. Values reflect post-change state."
21380
+ "description": "Record of a specific version of a prompt."
21381
+ },
21382
+ "PromptHistoryLinkedTool": {
21383
+ "properties": {
21384
+ "tool_id": {
21385
+ "type": "integer",
21386
+ "title": "Tool Id",
21387
+ "description": "ID of the tool",
21388
+ "examples": [
21389
+ 1
21390
+ ]
21391
+ },
21392
+ "current_tool_name": {
21393
+ "type": "string",
21394
+ "title": "Current Tool Name",
21395
+ "description": "Current name of the tool (may have been different at the time the given version of the prompt was created)",
21396
+ "examples": [
21397
+ "hangup"
21398
+ ]
21399
+ },
21400
+ "out_of_date": {
21401
+ "type": "boolean",
21402
+ "title": "Out Of Date",
21403
+ "description": "Whether the tool has changed (not including being deleted) since the given version of the prompt was created",
21404
+ "examples": [
21405
+ false
21406
+ ]
21407
+ },
21408
+ "deleted": {
21409
+ "type": "boolean",
21410
+ "title": "Deleted",
21411
+ "description": "Whether the tool has been deleted since the given version of the prompt was created",
21412
+ "examples": [
21413
+ false
21414
+ ]
21415
+ }
21416
+ },
21417
+ "type": "object",
21418
+ "required": [
21419
+ "tool_id",
21420
+ "current_tool_name",
21421
+ "out_of_date",
21422
+ "deleted"
21423
+ ],
21424
+ "title": "PromptHistoryLinkedTool",
21425
+ "description": "Record of a tool linked to a previous prompt version in the prompt history."
21354
21426
  },
21355
21427
  "PromptLlmConfig": {
21356
21428
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "syllable-sdk",
3
- "version": "0.1.0-alpha.231",
3
+ "version": "0.1.0-alpha.233",
4
4
  "author": "Syllable",
5
5
  "main": "./index.js",
6
6
  "sideEffects": false,
package/sdk/prompts.d.ts CHANGED
@@ -41,7 +41,7 @@ export declare class Prompts extends ClientSDK {
41
41
  * Get Prompt History
42
42
  *
43
43
  * @remarks
44
- * Get a prompt by ID
44
+ * Get a list of historical versions of a prompt by its ID
45
45
  */
46
46
  promptsHistory(request: operations.PromptsHistoryRequest, options?: RequestOptions): Promise<Array<components.PromptHistory>>;
47
47
  /**
package/sdk/prompts.js CHANGED
@@ -63,7 +63,7 @@ class Prompts extends sdks_js_1.ClientSDK {
63
63
  * Get Prompt History
64
64
  *
65
65
  * @remarks
66
- * Get a prompt by ID
66
+ * Get a list of historical versions of a prompt by its ID
67
67
  */
68
68
  async promptsHistory(request, options) {
69
69
  return (0, fp_js_1.unwrapAsync)((0, promptsPromptsHistory_js_1.promptsPromptsHistory)(this, request, options));
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
29
29
  * Get Prompt History
30
30
  *
31
31
  * @remarks
32
- * Get a prompt by ID
32
+ * Get a list of historical versions of a prompt by its ID
33
33
  */
34
34
  export async function promptsPromptsHistory(
35
35
  client: SyllableSDKCore,
package/src/lib/config.ts CHANGED
@@ -57,8 +57,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
57
57
  export const SDK_METADATA = {
58
58
  language: "typescript",
59
59
  openapiDocVersion: "0.0.2",
60
- sdkVersion: "0.1.0-alpha.231",
60
+ sdkVersion: "0.1.0-alpha.233",
61
61
  genVersion: "2.512.4",
62
62
  userAgent:
63
- "speakeasy-sdk/typescript 0.1.0-alpha.231 2.512.4 0.0.2 syllable-sdk",
63
+ "speakeasy-sdk/typescript 0.1.0-alpha.233 2.512.4 0.0.2 syllable-sdk",
64
64
  } as const;
@@ -140,6 +140,7 @@ export * from "./permissiongroupresponse.js";
140
140
  export * from "./permissionresponse.js";
141
141
  export * from "./promptcreaterequest.js";
142
142
  export * from "./prompthistory.js";
143
+ export * from "./prompthistorylinkedtool.js";
143
144
  export * from "./promptllmconfig.js";
144
145
  export * from "./promptllmprovider.js";
145
146
  export * from "./promptproperties.js";
@@ -18,7 +18,7 @@ export const LanguageCode = {
18
18
  THTH: "th-TH",
19
19
  ViVN: "vi-VN",
20
20
  BsBA: "bs-BA",
21
- Sw: "sw",
21
+ SwKE: "sw-KE",
22
22
  } as const;
23
23
  /**
24
24
  * BCP 47 codes of languages that Syllable supports.
@@ -7,13 +7,19 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ PromptHistoryLinkedTool,
12
+ PromptHistoryLinkedTool$inboundSchema,
13
+ PromptHistoryLinkedTool$Outbound,
14
+ PromptHistoryLinkedTool$outboundSchema,
15
+ } from "./prompthistorylinkedtool.js";
10
16
 
11
17
  /**
12
- * Record of a change to a prompt. Values reflect post-change state.
18
+ * Record of a specific version of a prompt.
13
19
  */
14
20
  export type PromptHistory = {
15
21
  /**
16
- * Timestamp of the change
22
+ * Timestamp of the change resulting in this version
17
23
  */
18
24
  timestamp: Date;
19
25
  /**
@@ -21,29 +27,41 @@ export type PromptHistory = {
21
27
  */
22
28
  promptId: string;
23
29
  /**
24
- * Text of the prompt
30
+ * Version number of this version. Starts at 1 when prompt is created, and incremented on each change.
31
+ */
32
+ versionNumber: number;
33
+ /**
34
+ * Text of the prompt at this version
25
35
  */
26
36
  promptText: string;
27
37
  /**
28
- * Description of the prompt
38
+ * Description of the prompt at this version
29
39
  */
30
40
  promptDescription?: string | null | undefined;
31
41
  /**
32
- * Name of the prompt
42
+ * Name of the prompt at this version
33
43
  */
34
44
  promptName: string;
35
45
  /**
36
- * String representation of LLM config for the prompt
46
+ * String representation of LLM config for the prompt at this version
37
47
  */
38
48
  llmConfig?: string | null | undefined;
39
49
  /**
40
- * Comments describing the change
50
+ * Comments describing the change that resulted in this version
41
51
  */
42
52
  comments?: string | null | undefined;
43
53
  /**
44
- * Email address of the user who made the change
54
+ * Email address of the user who made the change that resulted in this version
45
55
  */
46
56
  userEmail: string;
57
+ /**
58
+ * Tools that were linked to this version of the prompt
59
+ */
60
+ linkedTools?: Array<PromptHistoryLinkedTool> | undefined;
61
+ /**
62
+ * Whether this version of the prompt was created before history of tool-prompt linking was tracked
63
+ */
64
+ isPreEnhancements: boolean;
47
65
  };
48
66
 
49
67
  /** @internal */
@@ -54,20 +72,26 @@ export const PromptHistory$inboundSchema: z.ZodType<
54
72
  > = z.object({
55
73
  timestamp: z.string().datetime({ offset: true }).transform(v => new Date(v)),
56
74
  prompt_id: z.string(),
75
+ version_number: z.number().int(),
57
76
  prompt_text: z.string(),
58
77
  prompt_description: z.nullable(z.string()).optional(),
59
78
  prompt_name: z.string(),
60
79
  llm_config: z.nullable(z.string()).optional(),
61
80
  comments: z.nullable(z.string()).optional(),
62
81
  user_email: z.string(),
82
+ linked_tools: z.array(PromptHistoryLinkedTool$inboundSchema).optional(),
83
+ is_pre_enhancements: z.boolean(),
63
84
  }).transform((v) => {
64
85
  return remap$(v, {
65
86
  "prompt_id": "promptId",
87
+ "version_number": "versionNumber",
66
88
  "prompt_text": "promptText",
67
89
  "prompt_description": "promptDescription",
68
90
  "prompt_name": "promptName",
69
91
  "llm_config": "llmConfig",
70
92
  "user_email": "userEmail",
93
+ "linked_tools": "linkedTools",
94
+ "is_pre_enhancements": "isPreEnhancements",
71
95
  });
72
96
  });
73
97
 
@@ -75,12 +99,15 @@ export const PromptHistory$inboundSchema: z.ZodType<
75
99
  export type PromptHistory$Outbound = {
76
100
  timestamp: string;
77
101
  prompt_id: string;
102
+ version_number: number;
78
103
  prompt_text: string;
79
104
  prompt_description?: string | null | undefined;
80
105
  prompt_name: string;
81
106
  llm_config?: string | null | undefined;
82
107
  comments?: string | null | undefined;
83
108
  user_email: string;
109
+ linked_tools?: Array<PromptHistoryLinkedTool$Outbound> | undefined;
110
+ is_pre_enhancements: boolean;
84
111
  };
85
112
 
86
113
  /** @internal */
@@ -91,20 +118,26 @@ export const PromptHistory$outboundSchema: z.ZodType<
91
118
  > = z.object({
92
119
  timestamp: z.date().transform(v => v.toISOString()),
93
120
  promptId: z.string(),
121
+ versionNumber: z.number().int(),
94
122
  promptText: z.string(),
95
123
  promptDescription: z.nullable(z.string()).optional(),
96
124
  promptName: z.string(),
97
125
  llmConfig: z.nullable(z.string()).optional(),
98
126
  comments: z.nullable(z.string()).optional(),
99
127
  userEmail: z.string(),
128
+ linkedTools: z.array(PromptHistoryLinkedTool$outboundSchema).optional(),
129
+ isPreEnhancements: z.boolean(),
100
130
  }).transform((v) => {
101
131
  return remap$(v, {
102
132
  promptId: "prompt_id",
133
+ versionNumber: "version_number",
103
134
  promptText: "prompt_text",
104
135
  promptDescription: "prompt_description",
105
136
  promptName: "prompt_name",
106
137
  llmConfig: "llm_config",
107
138
  userEmail: "user_email",
139
+ linkedTools: "linked_tools",
140
+ isPreEnhancements: "is_pre_enhancements",
108
141
  });
109
142
  });
110
143