@shipeasy/openapi 1.6.0 → 2.2.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-643YSMLU.js +1616 -0
  3. package/dist/chunk-643YSMLU.js.map +1 -0
  4. package/dist/chunk-MRW3DJ57.js +3385 -0
  5. package/dist/chunk-MRW3DJ57.js.map +1 -0
  6. package/dist/client-K0ShmsC7.d.ts +11284 -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 +86 -0
  11. package/dist/custom.js +300 -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 +7973 -0
  20. package/dist/schemas.js +1099 -0
  21. package/dist/schemas.js.map +1 -0
  22. package/openapi.json +15922 -3232
  23. package/openapi.yaml +14277 -0
  24. package/package.json +33 -26
  25. package/spec/components/errors.yaml +53 -0
  26. package/spec/components/parameters.yaml +32 -0
  27. package/spec/components/responses.yaml +122 -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 +92 -0
  31. package/spec/components/schemas/configs.yaml +371 -0
  32. package/spec/components/schemas/connectors.yaml +587 -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 +237 -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 +1013 -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 +367 -0
  47. package/spec/paths/alert-rules.yaml +258 -0
  48. package/spec/paths/attributes.yaml +272 -0
  49. package/spec/paths/configs.yaml +758 -0
  50. package/spec/paths/connectors.yaml +782 -0
  51. package/spec/paths/errors.yaml +382 -0
  52. package/spec/paths/events.yaml +380 -0
  53. package/spec/paths/experiments.yaml +803 -0
  54. package/spec/paths/gate-templates.yaml +267 -0
  55. package/spec/paths/gates.yaml +465 -0
  56. package/spec/paths/i18n.yaml +557 -0
  57. package/spec/paths/keys.yaml +182 -0
  58. package/spec/paths/killswitches.yaml +574 -0
  59. package/spec/paths/metrics.yaml +313 -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 +255 -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,272 @@
1
+ /api/admin/attributes:
2
+ get:
3
+ operationId: listAttributes
4
+ summary: List targeting attributes
5
+ description: |-
6
+ Returns every auto-inferred targeting attribute in the project — the `name` and (when known) the value `type` — for building gate/experiment targeting rules.
7
+
8
+ **Use case:** Discover which user-context keys are available before authoring a targeting rule, instead of guessing attribute names.
9
+ tags:
10
+ - Attributes
11
+ parameters:
12
+ - $ref: ../components/parameters.yaml#/ProjectId
13
+ - $ref: ../components/parameters.yaml#/Q
14
+ responses:
15
+ "200":
16
+ description: List targeting attributes
17
+ content:
18
+ application/json:
19
+ schema:
20
+ $ref: ../components/schemas/attributes.yaml#/ListAttributesResponse
21
+ example:
22
+ - name: plan
23
+ type: string
24
+ - name: country
25
+ type: string
26
+ - name: seats
27
+ type: number
28
+ "400":
29
+ $ref: ../components/responses.yaml#/BadRequest
30
+ "401":
31
+ $ref: ../components/responses.yaml#/Unauthorized
32
+ "403":
33
+ $ref: ../components/responses.yaml#/Forbidden
34
+ "404":
35
+ $ref: ../components/responses.yaml#/NotFound
36
+ "409":
37
+ $ref: ../components/responses.yaml#/Conflict
38
+ "422":
39
+ $ref: ../components/responses.yaml#/UnprocessableEntity
40
+ x-error-codes:
41
+ - BAD_REQUEST
42
+ - UNAUTHORIZED
43
+ - FORBIDDEN
44
+ x-cli:
45
+ name: list
46
+ post:
47
+ operationId: createAttribute
48
+ summary: Declare a targeting attribute
49
+ description: |-
50
+ Declare a targeting attribute the SDK reports and gates/experiments can target. `type: enum` requires `enum_values`.
51
+
52
+ **Use case:** Register a `plan` or `country` attribute so targeting rules can reference it.
53
+ tags:
54
+ - Attributes
55
+ parameters:
56
+ - $ref: ../components/parameters.yaml#/ProjectId
57
+ requestBody:
58
+ required: true
59
+ content:
60
+ application/json:
61
+ schema:
62
+ $ref: ../components/schemas/attributes.yaml#/CreateAttributeRequest
63
+ example:
64
+ name: plan
65
+ type: enum
66
+ enum_values:
67
+ - free
68
+ - paid
69
+ required: true
70
+ responses:
71
+ "201":
72
+ description: Declare a targeting attribute
73
+ content:
74
+ application/json:
75
+ schema:
76
+ $ref: ../components/schemas/attributes.yaml#/CreateAttributeResponse
77
+ example:
78
+ id: attr_01j7w8a1b2c3
79
+ name: plan
80
+ links:
81
+ GetAttribute:
82
+ operationId: getAttribute
83
+ parameters: { id: $response.body#/id }
84
+ UpdateAttribute:
85
+ operationId: updateAttribute
86
+ parameters: { id: $response.body#/id }
87
+ DeleteAttribute:
88
+ operationId: deleteAttribute
89
+ parameters: { id: $response.body#/id }
90
+ "400":
91
+ $ref: ../components/responses.yaml#/BadRequest
92
+ "401":
93
+ $ref: ../components/responses.yaml#/Unauthorized
94
+ "403":
95
+ $ref: ../components/responses.yaml#/Forbidden
96
+ "404":
97
+ $ref: ../components/responses.yaml#/NotFound
98
+ "409":
99
+ $ref: ../components/responses.yaml#/Conflict
100
+ "422":
101
+ $ref: ../components/responses.yaml#/UnprocessableEntity
102
+ x-error-codes:
103
+ - BAD_REQUEST
104
+ - UNAUTHORIZED
105
+ - FORBIDDEN
106
+ - ALREADY_EXISTS
107
+ - VALIDATION
108
+ x-cli:
109
+ name: create
110
+ positional:
111
+ - name
112
+ /api/admin/attributes/{id}:
113
+ get:
114
+ operationId: getAttribute
115
+ summary: Get a targeting attribute
116
+ description: |-
117
+ Fetch one targeting attribute by id.
118
+
119
+ **Use case:** Inspect an attribute's declared type + allowed values before editing it.
120
+ tags:
121
+ - Attributes
122
+ parameters:
123
+ - $ref: ../components/parameters.yaml#/ProjectId
124
+ - name: id
125
+ in: path
126
+ required: true
127
+ description: The attribute id.
128
+ schema:
129
+ $ref: ../components/schemas/common.yaml#/ResourceId
130
+ responses:
131
+ "200":
132
+ description: Get a targeting attribute
133
+ content:
134
+ application/json:
135
+ schema:
136
+ $ref: ../components/schemas/attributes.yaml#/GetAttributeResponse
137
+ example:
138
+ id: attr_01j7w8a1b2c3
139
+ name: plan
140
+ type: enum
141
+ enumValues:
142
+ - free
143
+ - paid
144
+ required: 1
145
+ createdAt: 2026-06-20T09:14:08.000Z
146
+ "400":
147
+ $ref: ../components/responses.yaml#/BadRequest
148
+ "401":
149
+ $ref: ../components/responses.yaml#/Unauthorized
150
+ "403":
151
+ $ref: ../components/responses.yaml#/Forbidden
152
+ "404":
153
+ $ref: ../components/responses.yaml#/NotFound
154
+ "409":
155
+ $ref: ../components/responses.yaml#/Conflict
156
+ "422":
157
+ $ref: ../components/responses.yaml#/UnprocessableEntity
158
+ x-error-codes:
159
+ - BAD_REQUEST
160
+ - UNAUTHORIZED
161
+ - FORBIDDEN
162
+ - NOT_FOUND
163
+ x-cli:
164
+ name: get
165
+ positional:
166
+ - id
167
+ patch:
168
+ operationId: updateAttribute
169
+ summary: Update a targeting attribute
170
+ description: |-
171
+ Update a targeting attribute's type, allowed values, required flag, description, or SDK path. `name` is immutable.
172
+
173
+ **Use case:** Add an allowed value to an `enum` attribute, or flip its required flag.
174
+ tags:
175
+ - Attributes
176
+ parameters:
177
+ - $ref: ../components/parameters.yaml#/ProjectId
178
+ - name: id
179
+ in: path
180
+ required: true
181
+ description: The attribute id.
182
+ schema:
183
+ $ref: ../components/schemas/common.yaml#/ResourceId
184
+ requestBody:
185
+ required: true
186
+ content:
187
+ application/json:
188
+ schema:
189
+ $ref: ../components/schemas/attributes.yaml#/UpdateAttributeRequest
190
+ example:
191
+ enum_values:
192
+ - free
193
+ - paid
194
+ - enterprise
195
+ responses:
196
+ "200":
197
+ description: Update a targeting attribute
198
+ content:
199
+ application/json:
200
+ schema:
201
+ $ref: ../components/schemas/attributes.yaml#/UpdateAttributeResponse
202
+ example:
203
+ id: attr_01j7w8a1b2c3
204
+ "400":
205
+ $ref: ../components/responses.yaml#/BadRequest
206
+ "401":
207
+ $ref: ../components/responses.yaml#/Unauthorized
208
+ "403":
209
+ $ref: ../components/responses.yaml#/Forbidden
210
+ "404":
211
+ $ref: ../components/responses.yaml#/NotFound
212
+ "409":
213
+ $ref: ../components/responses.yaml#/Conflict
214
+ "422":
215
+ $ref: ../components/responses.yaml#/UnprocessableEntity
216
+ x-error-codes:
217
+ - BAD_REQUEST
218
+ - UNAUTHORIZED
219
+ - FORBIDDEN
220
+ - NOT_FOUND
221
+ - VALIDATION
222
+ x-cli:
223
+ name: update
224
+ positional:
225
+ - id
226
+ delete:
227
+ operationId: deleteAttribute
228
+ summary: Archive a targeting attribute
229
+ description: |-
230
+ Soft-deletes (archives) a targeting attribute.
231
+
232
+ **Use case:** Retire an attribute no targeting rule references anymore (the user-facing verb is `archive`).
233
+ tags:
234
+ - Attributes
235
+ parameters:
236
+ - $ref: ../components/parameters.yaml#/ProjectId
237
+ - name: id
238
+ in: path
239
+ required: true
240
+ description: The attribute id.
241
+ schema:
242
+ $ref: ../components/schemas/common.yaml#/ResourceId
243
+ responses:
244
+ "200":
245
+ description: Archive a targeting attribute
246
+ content:
247
+ application/json:
248
+ schema:
249
+ $ref: ../components/schemas/attributes.yaml#/DeleteAttributeResponse
250
+ example:
251
+ ok: true
252
+ "400":
253
+ $ref: ../components/responses.yaml#/BadRequest
254
+ "401":
255
+ $ref: ../components/responses.yaml#/Unauthorized
256
+ "403":
257
+ $ref: ../components/responses.yaml#/Forbidden
258
+ "404":
259
+ $ref: ../components/responses.yaml#/NotFound
260
+ "409":
261
+ $ref: ../components/responses.yaml#/Conflict
262
+ "422":
263
+ $ref: ../components/responses.yaml#/UnprocessableEntity
264
+ x-error-codes:
265
+ - BAD_REQUEST
266
+ - UNAUTHORIZED
267
+ - FORBIDDEN
268
+ - NOT_FOUND
269
+ x-cli:
270
+ name: archive
271
+ positional:
272
+ - id