@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,263 @@
1
+ /api/admin/gates/templates:
2
+ get:
3
+ operationId: listGateTemplates
4
+ summary: List gate templates
5
+ description: |-
6
+ Returns the merged targeting-rule template catalog — read-only **built-ins first** (the `@team`/`@owner` audience aliases, country, email-domain, region presets, …), then this project's **customer** templates. Each item carries a `rules: [{ attr, op, value }]` definition; the alias templates carry a symbol value (`email in ["@team"]`) that the SDK expands to the resolved email list at rebuild.
7
+
8
+ **Turn "launch X in country Y" into a gated flag:** list templates (optionally with `query`), take the matching template's `rules`, substitute the concrete value(s), and pass them as the `rules` arg of `release_flags_create`.
9
+
10
+ The catalog is small and bounded, so the full merged set is returned in one page — this endpoint is **not** paginated (`next_cursor` is always `null`; there are no `limit`/`cursor` params).
11
+ tags:
12
+ - Templates
13
+ parameters:
14
+ - $ref: ../components/parameters.yaml#/ProjectId
15
+ - name: query
16
+ in: query
17
+ required: false
18
+ description: Case-insensitive substring filter over each template's `name` + `description`. Omit to return the whole catalog.
19
+ schema:
20
+ type: string
21
+ responses:
22
+ "200":
23
+ description: List gate templates
24
+ content:
25
+ application/json:
26
+ schema:
27
+ $ref: ../components/schemas/gate-templates.yaml#/ListGateTemplatesResponse
28
+ example:
29
+ data:
30
+ - id: country
31
+ name: Country is
32
+ description: Target by ISO country code (resolve from GeoIP at the SDK edge before evaluating).
33
+ category: condition
34
+ auto: true
35
+ builtin: true
36
+ iconKey: globe
37
+ rules:
38
+ - attr: country
39
+ op: in
40
+ value:
41
+ - DE
42
+ - FR
43
+ - IT
44
+ createdAt: null
45
+ updatedAt: null
46
+ next_cursor: null
47
+ "400":
48
+ $ref: ../components/responses.yaml#/BadRequest
49
+ "401":
50
+ $ref: ../components/responses.yaml#/Unauthorized
51
+ "403":
52
+ $ref: ../components/responses.yaml#/Forbidden
53
+ "422":
54
+ $ref: ../components/responses.yaml#/UnprocessableEntity
55
+ x-error-codes:
56
+ - BAD_REQUEST
57
+ - UNAUTHORIZED
58
+ - FORBIDDEN
59
+ x-cli:
60
+ name: list
61
+ post:
62
+ operationId: createGateTemplate
63
+ summary: Create a gate template
64
+ description: |-
65
+ Creates a per-project (customer) targeting-rule template. Built-ins are read-only and cannot be created here. Returns `409` if a template with this `name` already exists in the project.
66
+ tags:
67
+ - Templates
68
+ parameters:
69
+ - $ref: ../components/parameters.yaml#/ProjectId
70
+ requestBody:
71
+ required: true
72
+ content:
73
+ application/json:
74
+ schema:
75
+ $ref: ../components/schemas/gate-templates.yaml#/CreateGateTemplateRequest
76
+ examples:
77
+ enterpriseBeta:
78
+ summary: Save an "enterprise plan" condition
79
+ value:
80
+ name: Enterprise beta
81
+ description: Our enterprise plan on the beta ring.
82
+ category: condition
83
+ rules:
84
+ - attr: plan
85
+ op: eq
86
+ value: enterprise
87
+ responses:
88
+ "201":
89
+ description: Create a gate template
90
+ content:
91
+ application/json:
92
+ schema:
93
+ $ref: ../components/schemas/gate-templates.yaml#/CreateGateTemplateResponse
94
+ example:
95
+ id: gtpl_01j7w8a1b2c3d4e5f6g7h8i9j0
96
+ name: Enterprise beta
97
+ "400":
98
+ $ref: ../components/responses.yaml#/BadRequest
99
+ "401":
100
+ $ref: ../components/responses.yaml#/Unauthorized
101
+ "403":
102
+ $ref: ../components/responses.yaml#/Forbidden
103
+ "409":
104
+ $ref: ../components/responses.yaml#/Conflict
105
+ "422":
106
+ $ref: ../components/responses.yaml#/UnprocessableEntity
107
+ x-error-codes:
108
+ - BAD_REQUEST
109
+ - UNAUTHORIZED
110
+ - FORBIDDEN
111
+ - ALREADY_EXISTS
112
+ - VALIDATION
113
+ x-cli:
114
+ name: create
115
+ positional:
116
+ - name
117
+ /api/admin/gates/templates/{id}:
118
+ get:
119
+ operationId: getGateTemplate
120
+ summary: Get one gate template
121
+ description: Returns a single template by its `id` — a built-in slug (`country`) or a customer `gtpl_…` id.
122
+ tags:
123
+ - Templates
124
+ parameters:
125
+ - $ref: ../components/parameters.yaml#/ProjectId
126
+ - name: id
127
+ in: path
128
+ required: true
129
+ description: Built-in slug (`country`) or customer template id (`gtpl_…`).
130
+ schema:
131
+ type: string
132
+ responses:
133
+ "200":
134
+ description: Get one gate template
135
+ content:
136
+ application/json:
137
+ schema:
138
+ $ref: ../components/schemas/gate-templates.yaml#/GateTemplate
139
+ "400":
140
+ $ref: ../components/responses.yaml#/BadRequest
141
+ "401":
142
+ $ref: ../components/responses.yaml#/Unauthorized
143
+ "403":
144
+ $ref: ../components/responses.yaml#/Forbidden
145
+ "404":
146
+ $ref: ../components/responses.yaml#/NotFound
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: updateGateTemplate
158
+ summary: Update a gate template
159
+ description: |-
160
+ Partial update of a **customer** template. `rules` replaces the list wholesale. Returns `409` if `id` names a read-only built-in template.
161
+ tags:
162
+ - Templates
163
+ parameters:
164
+ - $ref: ../components/parameters.yaml#/ProjectId
165
+ - name: id
166
+ in: path
167
+ required: true
168
+ description: Customer template id (`gtpl_…`) or its `name`.
169
+ schema:
170
+ type: string
171
+ requestBody:
172
+ required: true
173
+ content:
174
+ application/json:
175
+ schema:
176
+ $ref: ../components/schemas/gate-templates.yaml#/UpdateGateTemplateRequest
177
+ examples:
178
+ rename:
179
+ summary: Rename + retarget
180
+ value:
181
+ name: Enterprise GA
182
+ rules:
183
+ - attr: plan
184
+ op: in
185
+ value:
186
+ - enterprise
187
+ - enterprise_trial
188
+ responses:
189
+ "200":
190
+ description: Update a gate template
191
+ content:
192
+ application/json:
193
+ schema:
194
+ $ref: ../components/schemas/gate-templates.yaml#/UpdateGateTemplateResponse
195
+ example:
196
+ id: gtpl_01j7w8a1b2c3d4e5f6g7h8i9j0
197
+ "400":
198
+ $ref: ../components/responses.yaml#/BadRequest
199
+ "401":
200
+ $ref: ../components/responses.yaml#/Unauthorized
201
+ "403":
202
+ $ref: ../components/responses.yaml#/Forbidden
203
+ "404":
204
+ $ref: ../components/responses.yaml#/NotFound
205
+ "409":
206
+ $ref: ../components/responses.yaml#/Conflict
207
+ "422":
208
+ $ref: ../components/responses.yaml#/UnprocessableEntity
209
+ x-error-codes:
210
+ - BAD_REQUEST
211
+ - UNAUTHORIZED
212
+ - FORBIDDEN
213
+ - NOT_FOUND
214
+ - READ_ONLY
215
+ - VALIDATION
216
+ x-cli:
217
+ name: update
218
+ positional:
219
+ - id
220
+ delete:
221
+ operationId: deleteGateTemplate
222
+ summary: Delete a gate template
223
+ description: |-
224
+ Soft-deletes (archives) a **customer** template. Returns `409` if `id` names a read-only built-in template.
225
+ tags:
226
+ - Templates
227
+ parameters:
228
+ - $ref: ../components/parameters.yaml#/ProjectId
229
+ - name: id
230
+ in: path
231
+ required: true
232
+ description: Customer template id (`gtpl_…`) or its `name`.
233
+ schema:
234
+ type: string
235
+ responses:
236
+ "200":
237
+ description: Delete a gate template
238
+ content:
239
+ application/json:
240
+ schema:
241
+ $ref: ../components/schemas/gate-templates.yaml#/DeleteGateTemplateResponse
242
+ example:
243
+ ok: true
244
+ "400":
245
+ $ref: ../components/responses.yaml#/BadRequest
246
+ "401":
247
+ $ref: ../components/responses.yaml#/Unauthorized
248
+ "403":
249
+ $ref: ../components/responses.yaml#/Forbidden
250
+ "404":
251
+ $ref: ../components/responses.yaml#/NotFound
252
+ "409":
253
+ $ref: ../components/responses.yaml#/Conflict
254
+ x-error-codes:
255
+ - BAD_REQUEST
256
+ - UNAUTHORIZED
257
+ - FORBIDDEN
258
+ - NOT_FOUND
259
+ - READ_ONLY
260
+ x-cli:
261
+ name: archive
262
+ positional:
263
+ - id