@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.
- package/README.md +37 -0
- package/dist/chunk-643YSMLU.js +1616 -0
- package/dist/chunk-643YSMLU.js.map +1 -0
- package/dist/chunk-MRW3DJ57.js +3385 -0
- package/dist/chunk-MRW3DJ57.js.map +1 -0
- package/dist/client-K0ShmsC7.d.ts +11284 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.js +215 -0
- package/dist/client.js.map +1 -0
- package/dist/custom.d.ts +86 -0
- package/dist/custom.js +300 -0
- package/dist/custom.js.map +1 -0
- package/dist/index.d.ts +29 -41
- package/dist/index.js +258 -4375
- package/dist/index.js.map +1 -0
- package/dist/node-context.d.ts +81 -33
- package/dist/node-context.js +98 -44
- package/dist/node-context.js.map +1 -0
- package/dist/schemas.d.ts +7973 -0
- package/dist/schemas.js +1099 -0
- package/dist/schemas.js.map +1 -0
- package/openapi.json +15922 -3232
- package/openapi.yaml +14277 -0
- package/package.json +33 -26
- package/spec/components/errors.yaml +53 -0
- package/spec/components/parameters.yaml +32 -0
- package/spec/components/responses.yaml +122 -0
- package/spec/components/schemas/alert-rules.yaml +175 -0
- package/spec/components/schemas/attributes.yaml +157 -0
- package/spec/components/schemas/common.yaml +92 -0
- package/spec/components/schemas/configs.yaml +371 -0
- package/spec/components/schemas/connectors.yaml +587 -0
- package/spec/components/schemas/errors-api.yaml +209 -0
- package/spec/components/schemas/events.yaml +321 -0
- package/spec/components/schemas/experiments.yaml +865 -0
- package/spec/components/schemas/gate-templates.yaml +237 -0
- package/spec/components/schemas/gates.yaml +890 -0
- package/spec/components/schemas/i18n.yaml +478 -0
- package/spec/components/schemas/keys.yaml +186 -0
- package/spec/components/schemas/killswitches.yaml +309 -0
- package/spec/components/schemas/metrics.yaml +547 -0
- package/spec/components/schemas/ops.yaml +1013 -0
- package/spec/components/schemas/projects.yaml +222 -0
- package/spec/components/schemas/search.yaml +46 -0
- package/spec/components/schemas/universes.yaml +127 -0
- package/spec/openapi.yaml +367 -0
- package/spec/paths/alert-rules.yaml +258 -0
- package/spec/paths/attributes.yaml +272 -0
- package/spec/paths/configs.yaml +758 -0
- package/spec/paths/connectors.yaml +782 -0
- package/spec/paths/errors.yaml +382 -0
- package/spec/paths/events.yaml +380 -0
- package/spec/paths/experiments.yaml +803 -0
- package/spec/paths/gate-templates.yaml +267 -0
- package/spec/paths/gates.yaml +465 -0
- package/spec/paths/i18n.yaml +557 -0
- package/spec/paths/keys.yaml +182 -0
- package/spec/paths/killswitches.yaml +574 -0
- package/spec/paths/metrics.yaml +313 -0
- package/spec/paths/ops.yaml +446 -0
- package/spec/paths/projects.yaml +210 -0
- package/spec/paths/search.yaml +62 -0
- package/spec/paths/universes.yaml +255 -0
- package/dist/operations/attributes.d.ts +0 -33
- package/dist/operations/attributes.js +0 -16
- package/dist/operations/cli-adapter.d.ts +0 -35
- package/dist/operations/cli-adapter.js +0 -91
- package/dist/operations/coerce.d.ts +0 -32
- package/dist/operations/coerce.js +0 -53
- package/dist/operations/configs.d.ts +0 -28
- package/dist/operations/configs.js +0 -119
- package/dist/operations/docs.d.ts +0 -37
- package/dist/operations/docs.js +0 -39
- package/dist/operations/events.d.ts +0 -28
- package/dist/operations/events.js +0 -121
- package/dist/operations/experiments.d.ts +0 -28
- package/dist/operations/experiments.js +0 -280
- package/dist/operations/gates.d.ts +0 -28
- package/dist/operations/gates.js +0 -132
- package/dist/operations/i18n.d.ts +0 -28
- package/dist/operations/i18n.js +0 -121
- package/dist/operations/index.d.ts +0 -63
- package/dist/operations/index.js +0 -1751
- package/dist/operations/killswitches.d.ts +0 -28
- package/dist/operations/killswitches.js +0 -126
- package/dist/operations/mcp-adapter.d.ts +0 -35
- package/dist/operations/mcp-adapter.js +0 -94
- package/dist/operations/metrics.d.ts +0 -30
- package/dist/operations/metrics.js +0 -114
- package/dist/operations/ops.d.ts +0 -28
- package/dist/operations/ops.js +0 -313
- package/dist/operations/projects.d.ts +0 -28
- package/dist/operations/projects.js +0 -36
- package/dist/operations/sdk-docs.d.ts +0 -28
- package/dist/operations/sdk-docs.js +0 -160
- package/dist/operations/types.d.ts +0 -138
- package/dist/operations/types.js +0 -9
- package/dist/operations/universes.d.ts +0 -28
- package/dist/operations/universes.js +0 -93
- package/dist/operations/util.d.ts +0 -33
- package/dist/operations/util.js +0 -9
- package/dist/resources/alert-rules.d.ts +0 -50
- package/dist/resources/alert-rules.js +0 -75
- package/dist/resources/attributes.d.ts +0 -19
- package/dist/resources/attributes.js +0 -10
- package/dist/resources/configs.d.ts +0 -681
- package/dist/resources/configs.js +0 -509
- package/dist/resources/events.d.ts +0 -61
- package/dist/resources/events.js +0 -42
- package/dist/resources/experiments.d.ts +0 -849
- package/dist/resources/experiments.js +0 -707
- package/dist/resources/gates.d.ts +0 -808
- package/dist/resources/gates.js +0 -522
- package/dist/resources/i18n.d.ts +0 -84
- package/dist/resources/i18n.js +0 -60
- package/dist/resources/index.d.ts +0 -2767
- package/dist/resources/index.js +0 -2563
- package/dist/resources/killswitches.d.ts +0 -436
- package/dist/resources/killswitches.js +0 -514
- package/dist/resources/metrics.d.ts +0 -54
- package/dist/resources/metrics.js +0 -40
- package/dist/resources/ops.d.ts +0 -88
- package/dist/resources/ops.js +0 -36
- package/dist/resources/projects.d.ts +0 -54
- package/dist/resources/projects.js +0 -14
- package/dist/resources/universes.d.ts +0 -185
- package/dist/resources/universes.js +0 -234
- package/dist/schemas/alert-rules.d.ts +0 -65
- package/dist/schemas/alert-rules.js +0 -37
- package/dist/schemas/configs.d.ts +0 -154
- package/dist/schemas/configs.js +0 -134
- package/dist/schemas/constants.d.ts +0 -6
- package/dist/schemas/constants.js +0 -7
- package/dist/schemas/experiments.d.ts +0 -229
- package/dist/schemas/experiments.js +0 -221
- package/dist/schemas/folder.d.ts +0 -10
- package/dist/schemas/folder.js +0 -8
- package/dist/schemas/gates.d.ts +0 -386
- package/dist/schemas/gates.js +0 -190
- package/dist/schemas/index.d.ts +0 -11
- package/dist/schemas/index.js +0 -762
- package/dist/schemas/killswitches.d.ts +0 -110
- package/dist/schemas/killswitches.js +0 -226
- package/dist/schemas/metric-name.d.ts +0 -5
- package/dist/schemas/metric-name.js +0 -6
- package/dist/schemas/pagination.d.ts +0 -37
- package/dist/schemas/pagination.js +0 -44
- package/dist/schemas/universes.d.ts +0 -35
- package/dist/schemas/universes.js +0 -55
- package/dist/transport.d.ts +0 -30
- package/dist/transport.js +0 -44
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
GateTemplateRule:
|
|
2
|
+
type: object
|
|
3
|
+
properties:
|
|
4
|
+
attr:
|
|
5
|
+
type: string
|
|
6
|
+
description: Attribute key on the evaluation context (e.g. `country`, `plan`, `email`). Matched case-sensitively against `Shipeasy.checkGate(user, name)` input. May be empty on a built-in template whose attribute is supplied at substitution time (e.g. the `exp_in` "in any experiment" preset — you fill in the experiment name).
|
|
7
|
+
op:
|
|
8
|
+
type: string
|
|
9
|
+
enum:
|
|
10
|
+
- eq
|
|
11
|
+
- neq
|
|
12
|
+
- in
|
|
13
|
+
- not_in
|
|
14
|
+
- gt
|
|
15
|
+
- gte
|
|
16
|
+
- lt
|
|
17
|
+
- lte
|
|
18
|
+
- contains
|
|
19
|
+
- regex
|
|
20
|
+
- semver_gt
|
|
21
|
+
- semver_gte
|
|
22
|
+
- semver_lt
|
|
23
|
+
- semver_lte
|
|
24
|
+
- gate_pass
|
|
25
|
+
- exp_in
|
|
26
|
+
description: "Comparison operator. Equality: `eq`/`neq`. Set membership: `in`/`not_in` (value is an array). Numeric order: `gt`/`gte`/`lt`/`lte`. Semver order: `semver_gt`/`semver_gte`/`semver_lt`/`semver_lte`. String: `contains` (substring), `regex` (JS-flavour pattern). Cross-resource: `gate_pass` (value is another gate's name), `exp_in` (attr is an experiment name, value is a variant / `\"$holdout\"` / `\"$any\"`)."
|
|
27
|
+
value:
|
|
28
|
+
description: 'Operand. Shape depends on `op`: scalar for `eq/neq/gt/gte/lt/lte/contains/semver_*`; array of scalars for `in/not_in`; string pattern for `regex`; referenced gate name for `gate_pass`; variant selector for `exp_in`. Required on every request rule (value-ops need it; the valueless built-in presets are read-only and never created via the API).'
|
|
29
|
+
anyOf:
|
|
30
|
+
- type: string
|
|
31
|
+
- type: number
|
|
32
|
+
- type: boolean
|
|
33
|
+
- type: array
|
|
34
|
+
items: {}
|
|
35
|
+
required:
|
|
36
|
+
- attr
|
|
37
|
+
- op
|
|
38
|
+
- value
|
|
39
|
+
additionalProperties: false
|
|
40
|
+
description: Single targeting predicate. Copy a template's rules, substitute the concrete `value`(s), and pass them as the `rules` arg of `release_flags_create`.
|
|
41
|
+
GateTemplateRuleResponse:
|
|
42
|
+
type: object
|
|
43
|
+
properties:
|
|
44
|
+
attr:
|
|
45
|
+
type: string
|
|
46
|
+
description: Attribute key on the evaluation context (e.g. `country`, `plan`, `email`). Matched case-sensitively against `Shipeasy.checkGate(user, name)` input. May be empty on a built-in template whose attribute is supplied at substitution time (e.g. the `exp_in` "in any experiment" preset — you fill in the experiment name).
|
|
47
|
+
op:
|
|
48
|
+
type: string
|
|
49
|
+
enum:
|
|
50
|
+
- eq
|
|
51
|
+
- neq
|
|
52
|
+
- in
|
|
53
|
+
- not_in
|
|
54
|
+
- gt
|
|
55
|
+
- gte
|
|
56
|
+
- lt
|
|
57
|
+
- lte
|
|
58
|
+
- contains
|
|
59
|
+
- regex
|
|
60
|
+
- semver_gt
|
|
61
|
+
- semver_gte
|
|
62
|
+
- semver_lt
|
|
63
|
+
- semver_lte
|
|
64
|
+
- gate_pass
|
|
65
|
+
- exp_in
|
|
66
|
+
description: "Comparison operator. Equality: `eq`/`neq`. Set membership: `in`/`not_in` (value is an array). Numeric order: `gt`/`gte`/`lt`/`lte`. Semver order: `semver_gt`/`semver_gte`/`semver_lt`/`semver_lte`. String: `contains` (substring), `regex` (JS-flavour pattern). Cross-resource: `gate_pass` (value is another gate's name), `exp_in` (attr is an experiment name, value is a variant / `\"$holdout\"` / `\"$any\"`)."
|
|
67
|
+
value:
|
|
68
|
+
description: 'Operand. Shape depends on `op`: scalar for `eq/neq/gt/gte/lt/lte/contains/semver_*`; array of scalars for `in/not_in`; string pattern for `regex`; referenced gate name for `gate_pass`; variant selector for `exp_in`.'
|
|
69
|
+
required:
|
|
70
|
+
- attr
|
|
71
|
+
- op
|
|
72
|
+
additionalProperties: false
|
|
73
|
+
description: Single targeting predicate as returned by the API. `value` is optional here — read-only built-in templates (e.g. `@owner`, or presets whose operand is supplied at substitution time) legitimately omit it. Request bodies still require `value`.
|
|
74
|
+
GateTemplate:
|
|
75
|
+
type: object
|
|
76
|
+
description: "A reusable targeting-rule template. Built-ins are read-only (`builtin: true`, stable slug `id`); per-project customer templates are `builtin: false` with a `gtpl_…` id."
|
|
77
|
+
properties:
|
|
78
|
+
id:
|
|
79
|
+
type: string
|
|
80
|
+
description: Stable slug for built-ins (`country`), `gtpl_…` for customer templates.
|
|
81
|
+
name:
|
|
82
|
+
type: string
|
|
83
|
+
description: Human label shown in pickers (`Country is`).
|
|
84
|
+
description:
|
|
85
|
+
type: string
|
|
86
|
+
description: One-liner — feeds the list `query` filter.
|
|
87
|
+
category:
|
|
88
|
+
type: string
|
|
89
|
+
enum:
|
|
90
|
+
- condition
|
|
91
|
+
- rollout
|
|
92
|
+
description: "`condition` = rule-based predicate, `rollout` = percentage bucket."
|
|
93
|
+
auto:
|
|
94
|
+
type: boolean
|
|
95
|
+
description: True when the attribute is request-derived (country/browser/…) and resolved at the SDK edge, so the caller need not pass it.
|
|
96
|
+
builtin:
|
|
97
|
+
type: boolean
|
|
98
|
+
description: Read-only built-in (`true`) vs editable customer template (`false`).
|
|
99
|
+
iconKey:
|
|
100
|
+
anyOf:
|
|
101
|
+
- type: string
|
|
102
|
+
- type: "null"
|
|
103
|
+
description: Display-only icon hint.
|
|
104
|
+
rules:
|
|
105
|
+
type: array
|
|
106
|
+
items:
|
|
107
|
+
$ref: "#/GateTemplateRuleResponse"
|
|
108
|
+
description: The rule definition — copy, substitute the value(s), pass as `rules`.
|
|
109
|
+
createdAt:
|
|
110
|
+
anyOf:
|
|
111
|
+
- type: string
|
|
112
|
+
- type: "null"
|
|
113
|
+
description: ISO-8601 creation timestamp; `null` for built-ins.
|
|
114
|
+
updatedAt:
|
|
115
|
+
anyOf:
|
|
116
|
+
- type: string
|
|
117
|
+
- type: "null"
|
|
118
|
+
description: ISO-8601 last-mutation timestamp; `null` for built-ins.
|
|
119
|
+
required:
|
|
120
|
+
- id
|
|
121
|
+
- name
|
|
122
|
+
- description
|
|
123
|
+
- category
|
|
124
|
+
- auto
|
|
125
|
+
- builtin
|
|
126
|
+
- rules
|
|
127
|
+
additionalProperties: false
|
|
128
|
+
ListGateTemplatesResponse:
|
|
129
|
+
type: object
|
|
130
|
+
properties:
|
|
131
|
+
data:
|
|
132
|
+
type: array
|
|
133
|
+
items:
|
|
134
|
+
$ref: "#/GateTemplate"
|
|
135
|
+
next_cursor:
|
|
136
|
+
anyOf:
|
|
137
|
+
- type: string
|
|
138
|
+
- type: "null"
|
|
139
|
+
required:
|
|
140
|
+
- data
|
|
141
|
+
- next_cursor
|
|
142
|
+
additionalProperties: false
|
|
143
|
+
CreateGateTemplateRequest:
|
|
144
|
+
type: object
|
|
145
|
+
description: Body for `POST /api/admin/gate-templates`. Creates a per-project (customer) template. At minimum supply `name` + `rules`.
|
|
146
|
+
properties:
|
|
147
|
+
name:
|
|
148
|
+
type: string
|
|
149
|
+
minLength: 1
|
|
150
|
+
maxLength: 140
|
|
151
|
+
description: Human label. Unique per project.
|
|
152
|
+
description:
|
|
153
|
+
type: string
|
|
154
|
+
maxLength: 2000
|
|
155
|
+
default: ""
|
|
156
|
+
description: One-liner shown in pickers and matched by the list `query` filter.
|
|
157
|
+
category:
|
|
158
|
+
type: string
|
|
159
|
+
enum:
|
|
160
|
+
- condition
|
|
161
|
+
- rollout
|
|
162
|
+
default: condition
|
|
163
|
+
icon_key:
|
|
164
|
+
type: string
|
|
165
|
+
maxLength: 64
|
|
166
|
+
description: Display-only icon hint.
|
|
167
|
+
auto:
|
|
168
|
+
type: boolean
|
|
169
|
+
default: false
|
|
170
|
+
description: Mark the attribute as request-derived (resolved at the SDK edge).
|
|
171
|
+
rules:
|
|
172
|
+
type: array
|
|
173
|
+
minItems: 1
|
|
174
|
+
items:
|
|
175
|
+
$ref: "#/GateTemplateRule"
|
|
176
|
+
description: The rule definition captured by the template.
|
|
177
|
+
required:
|
|
178
|
+
- name
|
|
179
|
+
- rules
|
|
180
|
+
additionalProperties: false
|
|
181
|
+
CreateGateTemplateResponse:
|
|
182
|
+
type: object
|
|
183
|
+
properties:
|
|
184
|
+
id:
|
|
185
|
+
type: string
|
|
186
|
+
description: Newly assigned template id (`gtpl_…`).
|
|
187
|
+
name:
|
|
188
|
+
type: string
|
|
189
|
+
required:
|
|
190
|
+
- id
|
|
191
|
+
- name
|
|
192
|
+
additionalProperties: false
|
|
193
|
+
UpdateGateTemplateRequest:
|
|
194
|
+
type: object
|
|
195
|
+
description: Body for `PATCH /api/admin/gate-templates/{id}`. Partial — only supplied fields change. `rules` replaces wholesale. Built-in templates are read-only (409).
|
|
196
|
+
properties:
|
|
197
|
+
name:
|
|
198
|
+
type: string
|
|
199
|
+
minLength: 1
|
|
200
|
+
maxLength: 140
|
|
201
|
+
description:
|
|
202
|
+
type: string
|
|
203
|
+
maxLength: 2000
|
|
204
|
+
category:
|
|
205
|
+
type: string
|
|
206
|
+
enum:
|
|
207
|
+
- condition
|
|
208
|
+
- rollout
|
|
209
|
+
icon_key:
|
|
210
|
+
anyOf:
|
|
211
|
+
- type: string
|
|
212
|
+
- type: "null"
|
|
213
|
+
auto:
|
|
214
|
+
type: boolean
|
|
215
|
+
rules:
|
|
216
|
+
type: array
|
|
217
|
+
minItems: 1
|
|
218
|
+
items:
|
|
219
|
+
$ref: "#/GateTemplateRule"
|
|
220
|
+
additionalProperties: false
|
|
221
|
+
UpdateGateTemplateResponse:
|
|
222
|
+
type: object
|
|
223
|
+
properties:
|
|
224
|
+
id:
|
|
225
|
+
type: string
|
|
226
|
+
required:
|
|
227
|
+
- id
|
|
228
|
+
additionalProperties: false
|
|
229
|
+
DeleteGateTemplateResponse:
|
|
230
|
+
type: object
|
|
231
|
+
properties:
|
|
232
|
+
ok:
|
|
233
|
+
type: boolean
|
|
234
|
+
const: true
|
|
235
|
+
required:
|
|
236
|
+
- ok
|
|
237
|
+
additionalProperties: false
|