@shipeasy/openapi 1.5.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 (101) 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 -17
  14. package/dist/index.js +253 -2458
  15. package/dist/index.js.map +1 -0
  16. package/dist/node-context.d.ts +85 -0
  17. package/dist/node-context.js +110 -0
  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 +37 -21
  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/resources/alert-rules.d.ts +0 -50
  65. package/dist/resources/alert-rules.js +0 -75
  66. package/dist/resources/configs.d.ts +0 -681
  67. package/dist/resources/configs.js +0 -509
  68. package/dist/resources/experiments.d.ts +0 -849
  69. package/dist/resources/experiments.js +0 -707
  70. package/dist/resources/gates.d.ts +0 -808
  71. package/dist/resources/gates.js +0 -522
  72. package/dist/resources/index.d.ts +0 -2749
  73. package/dist/resources/index.js +0 -2391
  74. package/dist/resources/killswitches.d.ts +0 -436
  75. package/dist/resources/killswitches.js +0 -514
  76. package/dist/resources/universes.d.ts +0 -185
  77. package/dist/resources/universes.js +0 -234
  78. package/dist/schemas/alert-rules.d.ts +0 -65
  79. package/dist/schemas/alert-rules.js +0 -37
  80. package/dist/schemas/configs.d.ts +0 -154
  81. package/dist/schemas/configs.js +0 -134
  82. package/dist/schemas/constants.d.ts +0 -6
  83. package/dist/schemas/constants.js +0 -7
  84. package/dist/schemas/experiments.d.ts +0 -229
  85. package/dist/schemas/experiments.js +0 -221
  86. package/dist/schemas/folder.d.ts +0 -10
  87. package/dist/schemas/folder.js +0 -8
  88. package/dist/schemas/gates.d.ts +0 -386
  89. package/dist/schemas/gates.js +0 -190
  90. package/dist/schemas/index.d.ts +0 -11
  91. package/dist/schemas/index.js +0 -762
  92. package/dist/schemas/killswitches.d.ts +0 -110
  93. package/dist/schemas/killswitches.js +0 -226
  94. package/dist/schemas/metric-name.d.ts +0 -5
  95. package/dist/schemas/metric-name.js +0 -6
  96. package/dist/schemas/pagination.d.ts +0 -37
  97. package/dist/schemas/pagination.js +0 -44
  98. package/dist/schemas/universes.d.ts +0 -35
  99. package/dist/schemas/universes.js +0 -55
  100. package/dist/transport.d.ts +0 -30
  101. package/dist/transport.js +0 -44
@@ -0,0 +1,261 @@
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
+ responses:
14
+ "200":
15
+ description: List targeting attributes
16
+ content:
17
+ application/json:
18
+ schema:
19
+ $ref: ../components/schemas/attributes.yaml#/ListAttributesResponse
20
+ example:
21
+ - name: plan
22
+ type: string
23
+ - name: country
24
+ type: string
25
+ - name: seats
26
+ type: number
27
+ "400":
28
+ $ref: ../components/responses.yaml#/BadRequest
29
+ "401":
30
+ $ref: ../components/responses.yaml#/Unauthorized
31
+ "403":
32
+ $ref: ../components/responses.yaml#/Forbidden
33
+ "404":
34
+ $ref: ../components/responses.yaml#/NotFound
35
+ "409":
36
+ $ref: ../components/responses.yaml#/Conflict
37
+ "422":
38
+ $ref: ../components/responses.yaml#/UnprocessableEntity
39
+ x-error-codes:
40
+ - BAD_REQUEST
41
+ - UNAUTHORIZED
42
+ - FORBIDDEN
43
+ x-cli:
44
+ name: list
45
+ post:
46
+ operationId: createAttribute
47
+ summary: Declare a targeting attribute
48
+ description: |-
49
+ Declare a targeting attribute the SDK reports and gates/experiments can target. `type: enum` requires `enum_values`.
50
+
51
+ **Use case:** Register a `plan` or `country` attribute so targeting rules can reference it.
52
+ tags:
53
+ - Attributes
54
+ parameters:
55
+ - $ref: ../components/parameters.yaml#/ProjectId
56
+ requestBody:
57
+ required: true
58
+ content:
59
+ application/json:
60
+ schema:
61
+ $ref: ../components/schemas/attributes.yaml#/CreateAttributeRequest
62
+ example:
63
+ name: plan
64
+ type: enum
65
+ enum_values:
66
+ - free
67
+ - paid
68
+ required: true
69
+ responses:
70
+ "201":
71
+ description: Declare a targeting attribute
72
+ content:
73
+ application/json:
74
+ schema:
75
+ $ref: ../components/schemas/attributes.yaml#/CreateAttributeResponse
76
+ example:
77
+ id: attr_01j7w8a1b2c3
78
+ name: plan
79
+ "400":
80
+ $ref: ../components/responses.yaml#/BadRequest
81
+ "401":
82
+ $ref: ../components/responses.yaml#/Unauthorized
83
+ "403":
84
+ $ref: ../components/responses.yaml#/Forbidden
85
+ "404":
86
+ $ref: ../components/responses.yaml#/NotFound
87
+ "409":
88
+ $ref: ../components/responses.yaml#/Conflict
89
+ "422":
90
+ $ref: ../components/responses.yaml#/UnprocessableEntity
91
+ x-error-codes:
92
+ - BAD_REQUEST
93
+ - UNAUTHORIZED
94
+ - FORBIDDEN
95
+ - ALREADY_EXISTS
96
+ - VALIDATION
97
+ x-cli:
98
+ name: create
99
+ positional:
100
+ - name
101
+ /api/admin/attributes/{id}:
102
+ get:
103
+ operationId: getAttribute
104
+ summary: Get a targeting attribute
105
+ description: |-
106
+ Fetch one targeting attribute by id.
107
+
108
+ **Use case:** Inspect an attribute's declared type + allowed values before editing it.
109
+ tags:
110
+ - Attributes
111
+ parameters:
112
+ - $ref: ../components/parameters.yaml#/ProjectId
113
+ - name: id
114
+ in: path
115
+ required: true
116
+ description: The attribute id.
117
+ schema:
118
+ type: string
119
+ responses:
120
+ "200":
121
+ description: Get a targeting attribute
122
+ content:
123
+ application/json:
124
+ schema:
125
+ $ref: ../components/schemas/attributes.yaml#/GetAttributeResponse
126
+ example:
127
+ id: attr_01j7w8a1b2c3
128
+ name: plan
129
+ type: enum
130
+ enumValues:
131
+ - free
132
+ - paid
133
+ required: 1
134
+ createdAt: 2026-06-20T09:14:08.000Z
135
+ "400":
136
+ $ref: ../components/responses.yaml#/BadRequest
137
+ "401":
138
+ $ref: ../components/responses.yaml#/Unauthorized
139
+ "403":
140
+ $ref: ../components/responses.yaml#/Forbidden
141
+ "404":
142
+ $ref: ../components/responses.yaml#/NotFound
143
+ "409":
144
+ $ref: ../components/responses.yaml#/Conflict
145
+ "422":
146
+ $ref: ../components/responses.yaml#/UnprocessableEntity
147
+ x-error-codes:
148
+ - BAD_REQUEST
149
+ - UNAUTHORIZED
150
+ - FORBIDDEN
151
+ - NOT_FOUND
152
+ x-cli:
153
+ name: get
154
+ positional:
155
+ - id
156
+ patch:
157
+ operationId: updateAttribute
158
+ summary: Update a targeting attribute
159
+ description: |-
160
+ Update a targeting attribute's type, allowed values, required flag, description, or SDK path. `name` is immutable.
161
+
162
+ **Use case:** Add an allowed value to an `enum` attribute, or flip its required flag.
163
+ tags:
164
+ - Attributes
165
+ parameters:
166
+ - $ref: ../components/parameters.yaml#/ProjectId
167
+ - name: id
168
+ in: path
169
+ required: true
170
+ description: The attribute id.
171
+ schema:
172
+ type: string
173
+ requestBody:
174
+ required: true
175
+ content:
176
+ application/json:
177
+ schema:
178
+ $ref: ../components/schemas/attributes.yaml#/UpdateAttributeRequest
179
+ example:
180
+ enum_values:
181
+ - free
182
+ - paid
183
+ - enterprise
184
+ responses:
185
+ "200":
186
+ description: Update a targeting attribute
187
+ content:
188
+ application/json:
189
+ schema:
190
+ $ref: ../components/schemas/attributes.yaml#/UpdateAttributeResponse
191
+ example:
192
+ id: attr_01j7w8a1b2c3
193
+ "400":
194
+ $ref: ../components/responses.yaml#/BadRequest
195
+ "401":
196
+ $ref: ../components/responses.yaml#/Unauthorized
197
+ "403":
198
+ $ref: ../components/responses.yaml#/Forbidden
199
+ "404":
200
+ $ref: ../components/responses.yaml#/NotFound
201
+ "409":
202
+ $ref: ../components/responses.yaml#/Conflict
203
+ "422":
204
+ $ref: ../components/responses.yaml#/UnprocessableEntity
205
+ x-error-codes:
206
+ - BAD_REQUEST
207
+ - UNAUTHORIZED
208
+ - FORBIDDEN
209
+ - NOT_FOUND
210
+ - VALIDATION
211
+ x-cli:
212
+ name: update
213
+ positional:
214
+ - id
215
+ delete:
216
+ operationId: deleteAttribute
217
+ summary: Archive a targeting attribute
218
+ description: |-
219
+ Soft-deletes (archives) a targeting attribute.
220
+
221
+ **Use case:** Retire an attribute no targeting rule references anymore (the user-facing verb is `archive`).
222
+ tags:
223
+ - Attributes
224
+ parameters:
225
+ - $ref: ../components/parameters.yaml#/ProjectId
226
+ - name: id
227
+ in: path
228
+ required: true
229
+ description: The attribute id.
230
+ schema:
231
+ type: string
232
+ responses:
233
+ "200":
234
+ description: Archive a targeting attribute
235
+ content:
236
+ application/json:
237
+ schema:
238
+ $ref: ../components/schemas/attributes.yaml#/DeleteAttributeResponse
239
+ example:
240
+ ok: true
241
+ "400":
242
+ $ref: ../components/responses.yaml#/BadRequest
243
+ "401":
244
+ $ref: ../components/responses.yaml#/Unauthorized
245
+ "403":
246
+ $ref: ../components/responses.yaml#/Forbidden
247
+ "404":
248
+ $ref: ../components/responses.yaml#/NotFound
249
+ "409":
250
+ $ref: ../components/responses.yaml#/Conflict
251
+ "422":
252
+ $ref: ../components/responses.yaml#/UnprocessableEntity
253
+ x-error-codes:
254
+ - BAD_REQUEST
255
+ - UNAUTHORIZED
256
+ - FORBIDDEN
257
+ - NOT_FOUND
258
+ x-cli:
259
+ name: archive
260
+ positional:
261
+ - id