@smartcrab/contracts-management 0.5.0 → 0.6.0-next-20261124093243
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/dist/api-keys.d.ts +55 -0
- package/dist/api-keys.js +4 -0
- package/dist/connections.d.ts +28 -0
- package/dist/connections.js +4 -0
- package/dist/webhooks.d.ts +28 -0
- package/dist/webhooks.js +4 -0
- package/package.json +2 -2
- package/src/api-keys.ts +7 -0
- package/src/connections.ts +7 -0
- package/src/webhooks.ts +7 -0
package/dist/api-keys.d.ts
CHANGED
|
@@ -146,6 +146,61 @@ export declare const managementApiKeyListResponseSchema: z.ZodObject<{
|
|
|
146
146
|
next_cursor: z.ZodNullable<z.ZodString>;
|
|
147
147
|
}, z.core.$strict>;
|
|
148
148
|
export type ManagementApiKeyListResponse = z.infer<typeof managementApiKeyListResponseSchema>;
|
|
149
|
+
export declare const managementApiKeyGetResponseSchema: z.ZodObject<{
|
|
150
|
+
id: z.ZodString;
|
|
151
|
+
workspace_id: z.ZodString;
|
|
152
|
+
environment_id: z.ZodNullable<z.ZodString>;
|
|
153
|
+
name: z.ZodString;
|
|
154
|
+
prefix: z.ZodString;
|
|
155
|
+
scopes: z.ZodArray<z.ZodEnum<{
|
|
156
|
+
"workspaces:read": "workspaces:read";
|
|
157
|
+
"workspaces:write": "workspaces:write";
|
|
158
|
+
"workspace_members:read": "workspace_members:read";
|
|
159
|
+
"projects:read": "projects:read";
|
|
160
|
+
"projects:write": "projects:write";
|
|
161
|
+
"environments:read": "environments:read";
|
|
162
|
+
"environments:write": "environments:write";
|
|
163
|
+
"clients:read": "clients:read";
|
|
164
|
+
"clients:write": "clients:write";
|
|
165
|
+
"clients:rotate_secret": "clients:rotate_secret";
|
|
166
|
+
"connections:read": "connections:read";
|
|
167
|
+
"connections:write": "connections:write";
|
|
168
|
+
"domains:read": "domains:read";
|
|
169
|
+
"domains:write": "domains:write";
|
|
170
|
+
"users:read": "users:read";
|
|
171
|
+
"users:write": "users:write";
|
|
172
|
+
"users:block": "users:block";
|
|
173
|
+
"users:delete": "users:delete";
|
|
174
|
+
"user_identities:read": "user_identities:read";
|
|
175
|
+
"user_identities:write": "user_identities:write";
|
|
176
|
+
"user_passkeys:read": "user_passkeys:read";
|
|
177
|
+
"user_passkeys:write": "user_passkeys:write";
|
|
178
|
+
"user_sessions:read": "user_sessions:read";
|
|
179
|
+
"user_sessions:write": "user_sessions:write";
|
|
180
|
+
"user_data_jobs:read": "user_data_jobs:read";
|
|
181
|
+
"user_data_jobs:write": "user_data_jobs:write";
|
|
182
|
+
"webhooks:read": "webhooks:read";
|
|
183
|
+
"webhooks:write": "webhooks:write";
|
|
184
|
+
"webhooks:rotate_secret": "webhooks:rotate_secret";
|
|
185
|
+
"webhooks:test": "webhooks:test";
|
|
186
|
+
"dlq:read": "dlq:read";
|
|
187
|
+
"dlq:write": "dlq:write";
|
|
188
|
+
"audit_events:read": "audit_events:read";
|
|
189
|
+
"usage:read": "usage:read";
|
|
190
|
+
introspect: "introspect";
|
|
191
|
+
"billing:read": "billing:read";
|
|
192
|
+
"billing:write": "billing:write";
|
|
193
|
+
"api_keys:read": "api_keys:read";
|
|
194
|
+
"api_keys:write": "api_keys:write";
|
|
195
|
+
"impersonation:create": "impersonation:create";
|
|
196
|
+
}>>;
|
|
197
|
+
last_used_at: z.ZodNullable<z.ZodISODateTime>;
|
|
198
|
+
expires_at: z.ZodNullable<z.ZodISODateTime>;
|
|
199
|
+
revoked_at: z.ZodNullable<z.ZodISODateTime>;
|
|
200
|
+
created_by: z.ZodString;
|
|
201
|
+
created_at: z.ZodISODateTime;
|
|
202
|
+
}, z.core.$strict>;
|
|
203
|
+
export type ManagementApiKeyGetResponse = z.infer<typeof managementApiKeyGetResponseSchema>;
|
|
149
204
|
export declare const managementApiKeyCreateRequestSchema: z.ZodObject<{
|
|
150
205
|
workspace_id: z.ZodString;
|
|
151
206
|
name: z.ZodString;
|
package/dist/api-keys.js
CHANGED
|
@@ -55,6 +55,10 @@ export const managementApiKeyListQuerySchema = paginationQuerySchema.extend({
|
|
|
55
55
|
});
|
|
56
56
|
export const managementApiKeyListResponseSchema = cursorPageSchema(managementApiKeySchema);
|
|
57
57
|
// ---------------------------------------------------------------------------
|
|
58
|
+
// GET /api-keys/:apiKeyId
|
|
59
|
+
// ---------------------------------------------------------------------------
|
|
60
|
+
export const managementApiKeyGetResponseSchema = managementApiKeySchema;
|
|
61
|
+
// ---------------------------------------------------------------------------
|
|
58
62
|
// POST /api-keys
|
|
59
63
|
// ---------------------------------------------------------------------------
|
|
60
64
|
export const managementApiKeyCreateRequestSchema = z.strictObject({
|
package/dist/connections.d.ts
CHANGED
|
@@ -153,6 +153,34 @@ export declare const connectionCreateResponseSchema: z.ZodObject<{
|
|
|
153
153
|
updated_at: z.ZodISODateTime;
|
|
154
154
|
}, z.core.$strict>;
|
|
155
155
|
export type ConnectionCreateResponse = z.infer<typeof connectionCreateResponseSchema>;
|
|
156
|
+
export declare const connectionGetResponseSchema: z.ZodObject<{
|
|
157
|
+
id: z.ZodString;
|
|
158
|
+
environment_id: z.ZodString;
|
|
159
|
+
provider: z.ZodEnum<{
|
|
160
|
+
google: "google";
|
|
161
|
+
apple: "apple";
|
|
162
|
+
github: "github";
|
|
163
|
+
microsoft: "microsoft";
|
|
164
|
+
generic_oidc: "generic_oidc";
|
|
165
|
+
}>;
|
|
166
|
+
mode: z.ZodEnum<{
|
|
167
|
+
managed: "managed";
|
|
168
|
+
byo: "byo";
|
|
169
|
+
}>;
|
|
170
|
+
provider_key: z.ZodString;
|
|
171
|
+
issuer: z.ZodNullable<z.ZodURL>;
|
|
172
|
+
provider_client_id: z.ZodString;
|
|
173
|
+
scopes: z.ZodArray<z.ZodString>;
|
|
174
|
+
profile_mapping: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
175
|
+
status: z.ZodEnum<{
|
|
176
|
+
active: "active";
|
|
177
|
+
disabled: "disabled";
|
|
178
|
+
}>;
|
|
179
|
+
owner_confirmed: z.ZodBoolean;
|
|
180
|
+
created_at: z.ZodISODateTime;
|
|
181
|
+
updated_at: z.ZodISODateTime;
|
|
182
|
+
}, z.core.$strict>;
|
|
183
|
+
export type ConnectionGetResponse = z.infer<typeof connectionGetResponseSchema>;
|
|
156
184
|
export declare const connectionUpdateRequestSchema: z.ZodObject<{
|
|
157
185
|
issuer: z.ZodOptional<z.ZodURL>;
|
|
158
186
|
provider_client_id: z.ZodOptional<z.ZodString>;
|
package/dist/connections.js
CHANGED
|
@@ -84,6 +84,10 @@ export const connectionCreateRequestSchema = z.strictObject({
|
|
|
84
84
|
});
|
|
85
85
|
export const connectionCreateResponseSchema = connectionSchema;
|
|
86
86
|
// ---------------------------------------------------------------------------
|
|
87
|
+
// GET /connections/:connectionId
|
|
88
|
+
// ---------------------------------------------------------------------------
|
|
89
|
+
export const connectionGetResponseSchema = connectionSchema;
|
|
90
|
+
// ---------------------------------------------------------------------------
|
|
87
91
|
// PATCH /connections/:connectionId
|
|
88
92
|
// ---------------------------------------------------------------------------
|
|
89
93
|
export const connectionUpdateRequestSchema = z.strictObject({
|
package/dist/webhooks.d.ts
CHANGED
|
@@ -96,6 +96,34 @@ export declare const webhookListResponseSchema: z.ZodObject<{
|
|
|
96
96
|
next_cursor: z.ZodNullable<z.ZodString>;
|
|
97
97
|
}, z.core.$strict>;
|
|
98
98
|
export type WebhookListResponse = z.infer<typeof webhookListResponseSchema>;
|
|
99
|
+
export declare const webhookGetResponseSchema: z.ZodObject<{
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
environment_id: z.ZodString;
|
|
102
|
+
url: z.ZodURL;
|
|
103
|
+
event_types: z.ZodArray<z.ZodEnum<{
|
|
104
|
+
"user.created": "user.created";
|
|
105
|
+
"user.updated": "user.updated";
|
|
106
|
+
"user.deleted": "user.deleted";
|
|
107
|
+
"user.blocked": "user.blocked";
|
|
108
|
+
"identity.linked": "identity.linked";
|
|
109
|
+
"identity.unlinked": "identity.unlinked";
|
|
110
|
+
"passkey.created": "passkey.created";
|
|
111
|
+
"passkey.deleted": "passkey.deleted";
|
|
112
|
+
"session.created": "session.created";
|
|
113
|
+
"session.revoked": "session.revoked";
|
|
114
|
+
"login.succeeded": "login.succeeded";
|
|
115
|
+
"login.failed": "login.failed";
|
|
116
|
+
"email.delivery.bounced": "email.delivery.bounced";
|
|
117
|
+
"mau.threshold_reached": "mau.threshold_reached";
|
|
118
|
+
}>>;
|
|
119
|
+
status: z.ZodEnum<{
|
|
120
|
+
active: "active";
|
|
121
|
+
disabled: "disabled";
|
|
122
|
+
}>;
|
|
123
|
+
created_at: z.ZodISODateTime;
|
|
124
|
+
updated_at: z.ZodISODateTime;
|
|
125
|
+
}, z.core.$strict>;
|
|
126
|
+
export type WebhookGetResponse = z.infer<typeof webhookGetResponseSchema>;
|
|
99
127
|
export declare const webhookCreateRequestSchema: z.ZodObject<{
|
|
100
128
|
environment_id: z.ZodString;
|
|
101
129
|
url: z.ZodURL;
|
package/dist/webhooks.js
CHANGED
|
@@ -46,6 +46,10 @@ export const webhookListQuerySchema = paginationQuerySchema.extend({
|
|
|
46
46
|
});
|
|
47
47
|
export const webhookListResponseSchema = cursorPageSchema(webhookSchema);
|
|
48
48
|
// ---------------------------------------------------------------------------
|
|
49
|
+
// GET /webhooks/:webhookId
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
export const webhookGetResponseSchema = webhookSchema;
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
49
53
|
// POST /webhooks
|
|
50
54
|
// ---------------------------------------------------------------------------
|
|
51
55
|
export const webhookCreateRequestSchema = z.strictObject({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartcrab/contracts-management",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0-next-20261124093243",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"zod": "4.6.7",
|
|
31
|
-
"@smartcrab/contracts-public": "0.
|
|
31
|
+
"@smartcrab/contracts-public": "0.6.0-next-20261124093243"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"typescript": "5.9.3",
|
package/src/api-keys.ts
CHANGED
|
@@ -66,6 +66,13 @@ export type ManagementApiKeyListQuery = z.infer<typeof managementApiKeyListQuery
|
|
|
66
66
|
export const managementApiKeyListResponseSchema = cursorPageSchema(managementApiKeySchema);
|
|
67
67
|
export type ManagementApiKeyListResponse = z.infer<typeof managementApiKeyListResponseSchema>;
|
|
68
68
|
|
|
69
|
+
// ---------------------------------------------------------------------------
|
|
70
|
+
// GET /api-keys/:apiKeyId
|
|
71
|
+
// ---------------------------------------------------------------------------
|
|
72
|
+
|
|
73
|
+
export const managementApiKeyGetResponseSchema = managementApiKeySchema;
|
|
74
|
+
export type ManagementApiKeyGetResponse = z.infer<typeof managementApiKeyGetResponseSchema>;
|
|
75
|
+
|
|
69
76
|
// ---------------------------------------------------------------------------
|
|
70
77
|
// POST /api-keys
|
|
71
78
|
// ---------------------------------------------------------------------------
|
package/src/connections.ts
CHANGED
|
@@ -103,6 +103,13 @@ export type ConnectionCreateRequest = z.infer<typeof connectionCreateRequestSche
|
|
|
103
103
|
export const connectionCreateResponseSchema = connectionSchema;
|
|
104
104
|
export type ConnectionCreateResponse = z.infer<typeof connectionCreateResponseSchema>;
|
|
105
105
|
|
|
106
|
+
// ---------------------------------------------------------------------------
|
|
107
|
+
// GET /connections/:connectionId
|
|
108
|
+
// ---------------------------------------------------------------------------
|
|
109
|
+
|
|
110
|
+
export const connectionGetResponseSchema = connectionSchema;
|
|
111
|
+
export type ConnectionGetResponse = z.infer<typeof connectionGetResponseSchema>;
|
|
112
|
+
|
|
106
113
|
// ---------------------------------------------------------------------------
|
|
107
114
|
// PATCH /connections/:connectionId
|
|
108
115
|
// ---------------------------------------------------------------------------
|
package/src/webhooks.ts
CHANGED
|
@@ -62,6 +62,13 @@ export type WebhookListQuery = z.infer<typeof webhookListQuerySchema>;
|
|
|
62
62
|
export const webhookListResponseSchema = cursorPageSchema(webhookSchema);
|
|
63
63
|
export type WebhookListResponse = z.infer<typeof webhookListResponseSchema>;
|
|
64
64
|
|
|
65
|
+
// ---------------------------------------------------------------------------
|
|
66
|
+
// GET /webhooks/:webhookId
|
|
67
|
+
// ---------------------------------------------------------------------------
|
|
68
|
+
|
|
69
|
+
export const webhookGetResponseSchema = webhookSchema;
|
|
70
|
+
export type WebhookGetResponse = z.infer<typeof webhookGetResponseSchema>;
|
|
71
|
+
|
|
65
72
|
// ---------------------------------------------------------------------------
|
|
66
73
|
// POST /webhooks
|
|
67
74
|
// ---------------------------------------------------------------------------
|