zyphr 0.1.39 → 0.1.40

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 (90) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -14
  3. data/docs/AddWorkflowStep201Response.md +20 -0
  4. data/docs/AddWorkflowStepRequest.md +30 -0
  5. data/docs/AuthRegistrationApi.md +1 -1
  6. data/docs/CreateWorkflow201Response.md +20 -0
  7. data/docs/CreateWorkflowRequest.md +26 -0
  8. data/docs/DeleteWorkflow200Response.md +20 -0
  9. data/docs/{TopicDeleteResponseData.md → DeleteWorkflow200ResponseData.md} +2 -2
  10. data/docs/DeleteWorkflowStep200Response.md +20 -0
  11. data/docs/DeleteWorkflowStep200ResponseData.md +22 -0
  12. data/docs/ListWorkflowExecutions200Response.md +20 -0
  13. data/docs/{SmsListResponseMeta.md → ListWorkflowExecutions200ResponseMeta.md} +2 -2
  14. data/docs/ListWorkflows200Response.md +20 -0
  15. data/docs/ListWorkflows200ResponseMeta.md +32 -0
  16. data/docs/ReorderWorkflowStepsRequest.md +18 -0
  17. data/docs/SignInWithGameCenterRequest.md +1 -1
  18. data/docs/SmsListResponse.md +1 -1
  19. data/docs/TopicDeleteResponse.md +1 -1
  20. data/docs/TriggerWorkflow202Response.md +20 -0
  21. data/docs/TriggerWorkflow202ResponseData.md +22 -0
  22. data/docs/TriggerWorkflowRequest.md +24 -0
  23. data/docs/UpdateWorkflowRequest.md +24 -0
  24. data/docs/UpdateWorkflowStatusRequest.md +18 -0
  25. data/docs/UpdateWorkflowStepRequest.md +20 -0
  26. data/docs/Workflow.md +42 -0
  27. data/docs/WorkflowStatus.md +15 -0
  28. data/docs/WorkflowStep.md +38 -0
  29. data/docs/WorkflowStepType.md +15 -0
  30. data/docs/WorkflowsApi.md +901 -0
  31. data/lib/zyphr/api/auth_registration_api.rb +2 -2
  32. data/lib/zyphr/api/workflows_api.rb +897 -0
  33. data/lib/zyphr/models/add_workflow_step201_response.rb +229 -0
  34. data/lib/zyphr/models/add_workflow_step_request.rb +384 -0
  35. data/lib/zyphr/models/create_workflow201_response.rb +229 -0
  36. data/lib/zyphr/models/create_workflow_request.rb +292 -0
  37. data/lib/zyphr/models/delete_workflow200_response.rb +229 -0
  38. data/lib/zyphr/models/{topic_delete_response_data.rb → delete_workflow200_response_data.rb} +3 -3
  39. data/lib/zyphr/models/delete_workflow_step200_response.rb +229 -0
  40. data/lib/zyphr/models/delete_workflow_step200_response_data.rb +238 -0
  41. data/lib/zyphr/models/list_workflow_executions200_response.rb +231 -0
  42. data/lib/zyphr/models/{sms_list_response_meta.rb → list_workflow_executions200_response_meta.rb} +3 -3
  43. data/lib/zyphr/models/list_workflows200_response.rb +231 -0
  44. data/lib/zyphr/models/list_workflows200_response_meta.rb +284 -0
  45. data/lib/zyphr/models/reorder_workflow_steps_request.rb +249 -0
  46. data/lib/zyphr/models/sign_in_with_game_center_request.rb +1 -1
  47. data/lib/zyphr/models/sms_list_response.rb +1 -1
  48. data/lib/zyphr/models/topic_delete_response.rb +1 -1
  49. data/lib/zyphr/models/trigger_workflow202_response.rb +229 -0
  50. data/lib/zyphr/models/trigger_workflow202_response_data.rb +240 -0
  51. data/lib/zyphr/models/trigger_workflow_request.rb +272 -0
  52. data/lib/zyphr/models/update_workflow_request.rb +269 -0
  53. data/lib/zyphr/models/{v1_muse_subjects_suggest_post_request.rb → update_workflow_status_request.rb} +19 -86
  54. data/lib/zyphr/models/update_workflow_step_request.rb +232 -0
  55. data/lib/zyphr/models/workflow.rb +514 -0
  56. data/lib/zyphr/models/workflow_status.rb +42 -0
  57. data/lib/zyphr/models/workflow_step.rb +505 -0
  58. data/lib/zyphr/models/workflow_step_type.rb +47 -0
  59. data/lib/zyphr.rb +24 -4
  60. data/spec/api/auth_registration_api_spec.rb +1 -1
  61. data/spec/api/workflows_api_spec.rb +192 -0
  62. data/spec/models/add_workflow_step201_response_spec.rb +42 -0
  63. data/spec/models/add_workflow_step_request_spec.rb +76 -0
  64. data/spec/models/create_workflow201_response_spec.rb +42 -0
  65. data/spec/models/{v1_muse_subjects_suggest_post_request_spec.rb → create_workflow_request_spec.rb} +16 -14
  66. data/spec/models/{topic_delete_response_data_spec.rb → delete_workflow200_response_data_spec.rb} +6 -6
  67. data/spec/models/delete_workflow200_response_spec.rb +42 -0
  68. data/spec/models/delete_workflow_step200_response_data_spec.rb +48 -0
  69. data/spec/models/delete_workflow_step200_response_spec.rb +42 -0
  70. data/spec/models/{sms_list_response_meta_spec.rb → list_workflow_executions200_response_meta_spec.rb} +6 -6
  71. data/spec/models/list_workflow_executions200_response_spec.rb +42 -0
  72. data/spec/models/list_workflows200_response_meta_spec.rb +78 -0
  73. data/spec/models/list_workflows200_response_spec.rb +42 -0
  74. data/spec/models/reorder_workflow_steps_request_spec.rb +36 -0
  75. data/spec/models/trigger_workflow202_response_data_spec.rb +48 -0
  76. data/spec/models/trigger_workflow202_response_spec.rb +42 -0
  77. data/spec/models/trigger_workflow_request_spec.rb +54 -0
  78. data/spec/models/update_workflow_request_spec.rb +54 -0
  79. data/spec/models/update_workflow_status_request_spec.rb +36 -0
  80. data/spec/models/update_workflow_step_request_spec.rb +42 -0
  81. data/spec/models/workflow_spec.rb +108 -0
  82. data/spec/models/workflow_status_spec.rb +30 -0
  83. data/spec/models/workflow_step_spec.rb +100 -0
  84. data/spec/models/workflow_step_type_spec.rb +30 -0
  85. data/zyphr.gemspec +1 -1
  86. metadata +97 -17
  87. data/docs/MuseApi.md +0 -681
  88. data/docs/V1MuseSubjectsSuggestPostRequest.md +0 -24
  89. data/lib/zyphr/api/muse_api.rb +0 -644
  90. data/spec/api/muse_api_spec.rb +0 -156
@@ -1,156 +0,0 @@
1
- =begin
2
- #Zyphr API
3
-
4
- #Zyphr is a multi-channel notification platform that enables developers to send emails, push notifications, SMS, and in-app messages through a unified API. ## Authentication All API requests require authentication using an API key. Include your API key in the `X-API-Key` header: ``` X-API-Key: zy_live_xxxxxxxxxxxx ``` API keys can be created in the Zyphr Dashboard. Use `zy_test_*` keys for testing and `zy_live_*` keys for production. ## Rate Limiting The API implements rate limiting to ensure fair usage. Rate limit information is included in response headers: - `X-RateLimit-Limit`: Maximum requests per window - `X-RateLimit-Remaining`: Remaining requests in current window - `X-RateLimit-Reset`: Unix timestamp when the window resets ## Account Sending Status Every authenticated response carries the account's current sending state so you can surface it in your own tooling without a separate call: - `X-Account-Sending-Status`: `active`, `throttled`, or `frozen` - `X-Account-Sending-Status-Reason`: human-readable reason (present only when the status is `throttled` or `frozen`) This header is informational and non-blocking on non-send endpoints (reads, billing, and deliverability stay available). Send-capable endpoints additionally enforce the state: a frozen account receives `403 account_frozen` and a throttled account receives `429 account_throttled`, both with the reason in the error message. ## Errors All errors follow a consistent format: ```json { \"error\": { \"code\": \"error_code\", \"message\": \"Human readable message\", \"details\": {} }, \"meta\": { \"request_id\": \"req_xxxx\" } } ```
5
-
6
- The version of the OpenAPI document: 1.0.0
7
- Contact: support@zyphr.dev
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.12.0
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for Zyphr::MuseApi
17
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
- # Please update as you see appropriate
19
- describe 'MuseApi' do
20
- before do
21
- # run before each test
22
- @api_instance = Zyphr::MuseApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of MuseApi' do
30
- it 'should create an instance of MuseApi' do
31
- expect(@api_instance).to be_instance_of(Zyphr::MuseApi)
32
- end
33
- end
34
-
35
- # unit tests for v1_muse_audit_log_get
36
- # Paginated per-call audit log for Muse
37
- # Returns Muse invocations for the caller's account, ordered by most recent first. The request_payload is the PII-scrubbed payload we record at call time; the response payload is NOT returned by this endpoint for size reasons (use the per-row detail endpoint when built).
38
- # @param [Hash] opts the optional parameters
39
- # @return [nil]
40
- describe 'v1_muse_audit_log_get test' do
41
- it 'should work' do
42
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
- end
44
- end
45
-
46
- # unit tests for v1_muse_broadcasts_analyze_post
47
- # Stream a pre-send advisory for a draft broadcast
48
- # Streams Opus tokens then emits a structured advisory covering deliverability risks, frequency conflicts, audience warnings, send-time suggestions, and content notes — plus a single recommended_action so the dashboard can render a CTA without interpreting prose. Advisory is purely advisory — the platform does not block sends on AI output.
49
- # @param [Hash] opts the optional parameters
50
- # @return [nil]
51
- describe 'v1_muse_broadcasts_analyze_post test' do
52
- it 'should work' do
53
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
54
- end
55
- end
56
-
57
- # unit tests for v1_muse_entitlement_get
58
- # Return the current account's Zyphr Muse entitlement
59
- # Returns whether the caller's account plan unlocks Zyphr Muse, the cheapest plan that would unlock it, and the monthly Bedrock spend cap for the current plan. Available to every authenticated caller (including free accounts).
60
- # @param [Hash] opts the optional parameters
61
- # @return [nil]
62
- describe 'v1_muse_entitlement_get test' do
63
- it 'should work' do
64
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
65
- end
66
- end
67
-
68
- # unit tests for v1_muse_eval_baselines_get
69
- # Per-prompt eval baseline snapshots
70
- # Reads the committed baseline JSON files from src/services/muse/evals/baselines/ and returns them keyed by prompt name. Customers don't see this — it's for the internal Muse settings page / admin portal.
71
- # @param [Hash] opts the optional parameters
72
- # @return [nil]
73
- describe 'v1_muse_eval_baselines_get test' do
74
- it 'should work' do
75
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
76
- end
77
- end
78
-
79
- # unit tests for v1_muse_settings_project_id_get
80
- # Read Muse settings for a project
81
- # Returns the project's Muse settings (cap override, allowed roles, blocked tiers). If no row exists yet, returns synthesized defaults so the caller never sees a 404.
82
- # @param project_id
83
- # @param [Hash] opts the optional parameters
84
- # @return [nil]
85
- describe 'v1_muse_settings_project_id_get test' do
86
- it 'should work' do
87
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
88
- end
89
- end
90
-
91
- # unit tests for v1_muse_settings_project_id_patch
92
- # Update Muse settings for a project (admin or developer only)
93
- # Partial update — any omitted field keeps its existing value. Pass `monthly_cap_usd_override: null` to clear an override. Requires project-level role admin or developer. Account owner/admin cascades.
94
- # @param project_id
95
- # @param [Hash] opts the optional parameters
96
- # @return [nil]
97
- describe 'v1_muse_settings_project_id_patch test' do
98
- it 'should work' do
99
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
100
- end
101
- end
102
-
103
- # unit tests for v1_muse_subjects_suggest_post
104
- # Suggest 5 ranked subject-line candidates for a template
105
- # @param v1_muse_subjects_suggest_post_request
106
- # @param [Hash] opts the optional parameters
107
- # @return [nil]
108
- describe 'v1_muse_subjects_suggest_post test' do
109
- it 'should work' do
110
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
111
- end
112
- end
113
-
114
- # unit tests for v1_muse_templates_draft_post
115
- # Stream a draft template from a natural-language brief
116
- # @param [Hash] opts the optional parameters
117
- # @return [nil]
118
- describe 'v1_muse_templates_draft_post test' do
119
- it 'should work' do
120
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
121
- end
122
- end
123
-
124
- # unit tests for v1_muse_templates_rewrite_post
125
- # Stream a rewritten block per the user's instruction
126
- # @param [Hash] opts the optional parameters
127
- # @return [nil]
128
- describe 'v1_muse_templates_rewrite_post test' do
129
- it 'should work' do
130
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
131
- end
132
- end
133
-
134
- # unit tests for v1_muse_usage_get
135
- # Per-account Zyphr Muse usage + budget tier
136
- # Current calendar-month spend, plan cap, soft warning tier, and breakdowns by action and model tier. Dashboard polls this for the budget meter; 60s edge-cached via Redis is reasonable but not enforced server-side (lightweight aggregate).
137
- # @param [Hash] opts the optional parameters
138
- # @return [nil]
139
- describe 'v1_muse_usage_get test' do
140
- it 'should work' do
141
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
142
- end
143
- end
144
-
145
- # unit tests for v1_muse_workflows_generate_post
146
- # Stream a generated workflow from a natural-language description
147
- # Streams Opus tokens then emits a fully-validated workflow JSON object (single root, no cycles, branch_path coherent, all step types valid). Channels referenced by the workflow must appear in the project's available_channels grounding; unsupported channels fall back to email via the prompt's hard rules.
148
- # @param [Hash] opts the optional parameters
149
- # @return [nil]
150
- describe 'v1_muse_workflows_generate_post test' do
151
- it 'should work' do
152
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
153
- end
154
- end
155
-
156
- end