@shipeasy/openapi 1.6.0 → 2.1.0

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 (151) hide show
  1. package/README.md +37 -0
  2. package/dist/chunk-EPLLHLZN.js +1616 -0
  3. package/dist/chunk-EPLLHLZN.js.map +1 -0
  4. package/dist/chunk-SPH5HWCD.js +3326 -0
  5. package/dist/chunk-SPH5HWCD.js.map +1 -0
  6. package/dist/client-pVkoo3Bf.d.ts +11186 -0
  7. package/dist/client.d.ts +1 -0
  8. package/dist/client.js +215 -0
  9. package/dist/client.js.map +1 -0
  10. package/dist/custom.d.ts +64 -0
  11. package/dist/custom.js +292 -0
  12. package/dist/custom.js.map +1 -0
  13. package/dist/index.d.ts +29 -41
  14. package/dist/index.js +258 -4375
  15. package/dist/index.js.map +1 -0
  16. package/dist/node-context.d.ts +81 -33
  17. package/dist/node-context.js +98 -44
  18. package/dist/node-context.js.map +1 -0
  19. package/dist/schemas.d.ts +7920 -0
  20. package/dist/schemas.js +1083 -0
  21. package/dist/schemas.js.map +1 -0
  22. package/openapi.json +15297 -3044
  23. package/openapi.yaml +13979 -0
  24. package/package.json +33 -26
  25. package/spec/components/errors.yaml +53 -0
  26. package/spec/components/parameters.yaml +24 -0
  27. package/spec/components/responses.yaml +107 -0
  28. package/spec/components/schemas/alert-rules.yaml +175 -0
  29. package/spec/components/schemas/attributes.yaml +157 -0
  30. package/spec/components/schemas/common.yaml +87 -0
  31. package/spec/components/schemas/configs.yaml +371 -0
  32. package/spec/components/schemas/connectors.yaml +593 -0
  33. package/spec/components/schemas/errors-api.yaml +209 -0
  34. package/spec/components/schemas/events.yaml +321 -0
  35. package/spec/components/schemas/experiments.yaml +865 -0
  36. package/spec/components/schemas/gate-templates.yaml +198 -0
  37. package/spec/components/schemas/gates.yaml +890 -0
  38. package/spec/components/schemas/i18n.yaml +478 -0
  39. package/spec/components/schemas/keys.yaml +186 -0
  40. package/spec/components/schemas/killswitches.yaml +309 -0
  41. package/spec/components/schemas/metrics.yaml +547 -0
  42. package/spec/components/schemas/ops.yaml +1011 -0
  43. package/spec/components/schemas/projects.yaml +222 -0
  44. package/spec/components/schemas/search.yaml +46 -0
  45. package/spec/components/schemas/universes.yaml +127 -0
  46. package/spec/openapi.yaml +348 -0
  47. package/spec/paths/alert-rules.yaml +250 -0
  48. package/spec/paths/attributes.yaml +261 -0
  49. package/spec/paths/configs.yaml +744 -0
  50. package/spec/paths/connectors.yaml +748 -0
  51. package/spec/paths/errors.yaml +382 -0
  52. package/spec/paths/events.yaml +366 -0
  53. package/spec/paths/experiments.yaml +777 -0
  54. package/spec/paths/gate-templates.yaml +263 -0
  55. package/spec/paths/gates.yaml +451 -0
  56. package/spec/paths/i18n.yaml +544 -0
  57. package/spec/paths/keys.yaml +181 -0
  58. package/spec/paths/killswitches.yaml +557 -0
  59. package/spec/paths/metrics.yaml +302 -0
  60. package/spec/paths/ops.yaml +446 -0
  61. package/spec/paths/projects.yaml +210 -0
  62. package/spec/paths/search.yaml +62 -0
  63. package/spec/paths/universes.yaml +247 -0
  64. package/dist/operations/attributes.d.ts +0 -33
  65. package/dist/operations/attributes.js +0 -16
  66. package/dist/operations/cli-adapter.d.ts +0 -35
  67. package/dist/operations/cli-adapter.js +0 -91
  68. package/dist/operations/coerce.d.ts +0 -32
  69. package/dist/operations/coerce.js +0 -53
  70. package/dist/operations/configs.d.ts +0 -28
  71. package/dist/operations/configs.js +0 -119
  72. package/dist/operations/docs.d.ts +0 -37
  73. package/dist/operations/docs.js +0 -39
  74. package/dist/operations/events.d.ts +0 -28
  75. package/dist/operations/events.js +0 -121
  76. package/dist/operations/experiments.d.ts +0 -28
  77. package/dist/operations/experiments.js +0 -280
  78. package/dist/operations/gates.d.ts +0 -28
  79. package/dist/operations/gates.js +0 -132
  80. package/dist/operations/i18n.d.ts +0 -28
  81. package/dist/operations/i18n.js +0 -121
  82. package/dist/operations/index.d.ts +0 -63
  83. package/dist/operations/index.js +0 -1751
  84. package/dist/operations/killswitches.d.ts +0 -28
  85. package/dist/operations/killswitches.js +0 -126
  86. package/dist/operations/mcp-adapter.d.ts +0 -35
  87. package/dist/operations/mcp-adapter.js +0 -94
  88. package/dist/operations/metrics.d.ts +0 -30
  89. package/dist/operations/metrics.js +0 -114
  90. package/dist/operations/ops.d.ts +0 -28
  91. package/dist/operations/ops.js +0 -313
  92. package/dist/operations/projects.d.ts +0 -28
  93. package/dist/operations/projects.js +0 -36
  94. package/dist/operations/sdk-docs.d.ts +0 -28
  95. package/dist/operations/sdk-docs.js +0 -160
  96. package/dist/operations/types.d.ts +0 -138
  97. package/dist/operations/types.js +0 -9
  98. package/dist/operations/universes.d.ts +0 -28
  99. package/dist/operations/universes.js +0 -93
  100. package/dist/operations/util.d.ts +0 -33
  101. package/dist/operations/util.js +0 -9
  102. package/dist/resources/alert-rules.d.ts +0 -50
  103. package/dist/resources/alert-rules.js +0 -75
  104. package/dist/resources/attributes.d.ts +0 -19
  105. package/dist/resources/attributes.js +0 -10
  106. package/dist/resources/configs.d.ts +0 -681
  107. package/dist/resources/configs.js +0 -509
  108. package/dist/resources/events.d.ts +0 -61
  109. package/dist/resources/events.js +0 -42
  110. package/dist/resources/experiments.d.ts +0 -849
  111. package/dist/resources/experiments.js +0 -707
  112. package/dist/resources/gates.d.ts +0 -808
  113. package/dist/resources/gates.js +0 -522
  114. package/dist/resources/i18n.d.ts +0 -84
  115. package/dist/resources/i18n.js +0 -60
  116. package/dist/resources/index.d.ts +0 -2767
  117. package/dist/resources/index.js +0 -2563
  118. package/dist/resources/killswitches.d.ts +0 -436
  119. package/dist/resources/killswitches.js +0 -514
  120. package/dist/resources/metrics.d.ts +0 -54
  121. package/dist/resources/metrics.js +0 -40
  122. package/dist/resources/ops.d.ts +0 -88
  123. package/dist/resources/ops.js +0 -36
  124. package/dist/resources/projects.d.ts +0 -54
  125. package/dist/resources/projects.js +0 -14
  126. package/dist/resources/universes.d.ts +0 -185
  127. package/dist/resources/universes.js +0 -234
  128. package/dist/schemas/alert-rules.d.ts +0 -65
  129. package/dist/schemas/alert-rules.js +0 -37
  130. package/dist/schemas/configs.d.ts +0 -154
  131. package/dist/schemas/configs.js +0 -134
  132. package/dist/schemas/constants.d.ts +0 -6
  133. package/dist/schemas/constants.js +0 -7
  134. package/dist/schemas/experiments.d.ts +0 -229
  135. package/dist/schemas/experiments.js +0 -221
  136. package/dist/schemas/folder.d.ts +0 -10
  137. package/dist/schemas/folder.js +0 -8
  138. package/dist/schemas/gates.d.ts +0 -386
  139. package/dist/schemas/gates.js +0 -190
  140. package/dist/schemas/index.d.ts +0 -11
  141. package/dist/schemas/index.js +0 -762
  142. package/dist/schemas/killswitches.d.ts +0 -110
  143. package/dist/schemas/killswitches.js +0 -226
  144. package/dist/schemas/metric-name.d.ts +0 -5
  145. package/dist/schemas/metric-name.js +0 -6
  146. package/dist/schemas/pagination.d.ts +0 -37
  147. package/dist/schemas/pagination.js +0 -44
  148. package/dist/schemas/universes.d.ts +0 -35
  149. package/dist/schemas/universes.js +0 -55
  150. package/dist/transport.d.ts +0 -30
  151. package/dist/transport.js +0 -44
@@ -0,0 +1,181 @@
1
+ /api/admin/keys:
2
+ get:
3
+ operationId: listKeys
4
+ summary: List API keys
5
+ description: |-
6
+ Returns a single page of the project's API keys ordered by `created_at desc, id desc`, in the standard `{ data, next_cursor }` envelope. Use the `cursor` query parameter to paginate.
7
+
8
+ Response fields are **snake_case** (`created_at`, `revoked_at`, `created_by_email`, `last4`). The raw token is never returned — only its `last4` tail, so a held key can be matched against the masked row. Revoked keys are included (with a non-null `revoked_at`).
9
+
10
+ **Use case:** Audit which keys exist for a project — surface stale or never-expiring keys, or drive a CI check that asserts no `client` key is still active in `prod` after a rotation.
11
+ tags:
12
+ - API Keys
13
+ parameters:
14
+ - $ref: ../components/parameters.yaml#/ProjectId
15
+ - $ref: ../components/parameters.yaml#/PaginationLimit
16
+ - $ref: ../components/parameters.yaml#/PaginationCursor
17
+ responses:
18
+ "200":
19
+ description: List API keys
20
+ content:
21
+ application/json:
22
+ schema:
23
+ $ref: ../components/schemas/keys.yaml#/ListKeysResponse
24
+ example:
25
+ data:
26
+ - id: 3f2a9b1c-7d4e-4a8f-9c2b-1e5d6f7a8b90
27
+ type: server
28
+ env: prod
29
+ created_at: 2026-05-09T16:01:22.000Z
30
+ revoked_at: null
31
+ expires_at: null
32
+ created_by_email: ana@example.com
33
+ name: production back-end
34
+ scopes:
35
+ - gates:evaluate
36
+ - events:write
37
+ last4: a1b2
38
+ next_cursor: null
39
+ "400":
40
+ $ref: ../components/responses.yaml#/BadRequest
41
+ "401":
42
+ $ref: ../components/responses.yaml#/Unauthorized
43
+ "403":
44
+ $ref: ../components/responses.yaml#/Forbidden
45
+ "404":
46
+ $ref: ../components/responses.yaml#/NotFound
47
+ "409":
48
+ $ref: ../components/responses.yaml#/Conflict
49
+ "422":
50
+ $ref: ../components/responses.yaml#/UnprocessableEntity
51
+ x-error-codes:
52
+ - UNAUTHORIZED
53
+ - FORBIDDEN
54
+ x-cli:
55
+ name: list
56
+ post:
57
+ operationId: createKey
58
+ summary: Create an API key
59
+ description: |-
60
+ Mints a new API key and returns the plaintext token **once** — it is stored hashed and can never be retrieved again, so capture it on creation.
61
+
62
+ Only `type` is required. `env` is **required** for `server` and `client` keys (the key is bound to one environment, which is the read-env isolation boundary); for `admin` and `ops` keys `env` is ignored and the key is pinned to `prod`. Expiry is fixed for some types: `admin` keys always get a 90-day expiry and `ops` keys a short sliding window, regardless of `expiresInDays`. Only `server`/`client` keys count toward the plan key limit.
63
+
64
+ **Use cases**
65
+
66
+ - **Back-end key** — `{ "type": "server", "env": "prod" }` for the production server SDK.
67
+ - **Public browser key** — `{ "type": "client", "env": "prod", "name": "marketing site" }` to embed in the browser SDK.
68
+ - **Scoped, expiring key** — `{ "type": "server", "env": "staging", "scopes": ["gates:evaluate"], "expiresInDays": 30 }` for a time-boxed integration.
69
+ tags:
70
+ - API Keys
71
+ parameters:
72
+ - $ref: ../components/parameters.yaml#/ProjectId
73
+ requestBody:
74
+ required: true
75
+ content:
76
+ application/json:
77
+ schema:
78
+ $ref: ../components/schemas/keys.yaml#/CreateKeyRequest
79
+ examples:
80
+ serverKey:
81
+ summary: Server key — bound to an environment
82
+ description: "A back-end SDK key. `env` is required for `server`/`client` keys."
83
+ value:
84
+ type: server
85
+ env: prod
86
+ name: production back-end
87
+ scopedExpiring:
88
+ summary: Scoped, expiring server key
89
+ description: A time-boxed key limited to gate evaluation, expiring in 30 days.
90
+ value:
91
+ type: server
92
+ env: staging
93
+ scopes:
94
+ - gates:evaluate
95
+ expiresInDays: 30
96
+ opsKey:
97
+ summary: Ops key — restricted, env-agnostic
98
+ description: "The unattended-trigger credential. `env` is ignored (pinned to `prod`); expiry is a short sliding window."
99
+ value:
100
+ type: ops
101
+ responses:
102
+ "201":
103
+ description: Create an API key
104
+ content:
105
+ application/json:
106
+ schema:
107
+ $ref: ../components/schemas/keys.yaml#/CreateKeyResponse
108
+ example:
109
+ id: 3f2a9b1c-7d4e-4a8f-9c2b-1e5d6f7a8b90
110
+ type: server
111
+ env: prod
112
+ key: sdk_server_9c1f4f1f2c0c4a5fa1c2b6d3e7c8e3a1
113
+ expires_at: null
114
+ "400":
115
+ $ref: ../components/responses.yaml#/BadRequest
116
+ "401":
117
+ $ref: ../components/responses.yaml#/Unauthorized
118
+ "403":
119
+ $ref: ../components/responses.yaml#/Forbidden
120
+ "404":
121
+ $ref: ../components/responses.yaml#/NotFound
122
+ "409":
123
+ $ref: ../components/responses.yaml#/Conflict
124
+ "422":
125
+ $ref: ../components/responses.yaml#/UnprocessableEntity
126
+ x-error-codes:
127
+ - UNAUTHORIZED
128
+ - FORBIDDEN
129
+ - VALIDATION
130
+ x-cli:
131
+ name: create
132
+ /api/admin/keys/{id}/revoke:
133
+ post:
134
+ operationId: revokeKey
135
+ summary: Revoke an API key
136
+ description: |-
137
+ Revokes a key by id — stamps its `revoked_at` and deletes the hot-path KV entry so the token stops authenticating immediately. Takes no body.
138
+
139
+ Idempotent: revoking an already-revoked key is a no-op and returns the same `{ id, revoked: true }`. Returns `404` if no such key exists in the project.
140
+
141
+ **Use case:** Rotate a leaked or stale credential — mint the replacement, then revoke the old key.
142
+ tags:
143
+ - API Keys
144
+ parameters:
145
+ - $ref: ../components/parameters.yaml#/ProjectId
146
+ - name: id
147
+ in: path
148
+ required: true
149
+ description: Stable opaque key id (UUID) returned by `create` / `list`.
150
+ schema:
151
+ type: string
152
+ responses:
153
+ "200":
154
+ description: Revoke an API key
155
+ content:
156
+ application/json:
157
+ schema:
158
+ $ref: ../components/schemas/keys.yaml#/RevokeKeyResponse
159
+ example:
160
+ id: 3f2a9b1c-7d4e-4a8f-9c2b-1e5d6f7a8b90
161
+ revoked: true
162
+ "400":
163
+ $ref: ../components/responses.yaml#/BadRequest
164
+ "401":
165
+ $ref: ../components/responses.yaml#/Unauthorized
166
+ "403":
167
+ $ref: ../components/responses.yaml#/Forbidden
168
+ "404":
169
+ $ref: ../components/responses.yaml#/NotFound
170
+ "409":
171
+ $ref: ../components/responses.yaml#/Conflict
172
+ "422":
173
+ $ref: ../components/responses.yaml#/UnprocessableEntity
174
+ x-error-codes:
175
+ - UNAUTHORIZED
176
+ - FORBIDDEN
177
+ - NOT_FOUND
178
+ x-cli:
179
+ name: revoke
180
+ positional:
181
+ - id