casedev 0.41.0 → 0.43.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/CHANGELOG.md +16 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/usage/index.d.mts +3 -0
- package/resources/usage/index.d.mts.map +1 -0
- package/resources/usage/index.d.ts +3 -0
- package/resources/usage/index.d.ts.map +1 -0
- package/resources/usage/index.js +9 -0
- package/resources/usage/index.js.map +1 -0
- package/resources/usage/index.mjs +4 -0
- package/resources/usage/index.mjs.map +1 -0
- package/resources/usage/usage.d.mts +10 -0
- package/resources/usage/usage.d.mts.map +1 -0
- package/resources/usage/usage.d.ts +10 -0
- package/resources/usage/usage.d.ts.map +1 -0
- package/resources/usage/usage.js +17 -0
- package/resources/usage/usage.js.map +1 -0
- package/resources/usage/usage.mjs +12 -0
- package/resources/usage/usage.mjs.map +1 -0
- package/resources/usage/v1/index.d.mts +3 -0
- package/resources/usage/v1/index.d.mts.map +1 -0
- package/resources/usage/v1/index.d.ts +3 -0
- package/resources/usage/v1/index.d.ts.map +1 -0
- package/resources/usage/v1/index.js +9 -0
- package/resources/usage/v1/index.js.map +1 -0
- package/resources/usage/v1/index.mjs +4 -0
- package/resources/usage/v1/index.mjs.map +1 -0
- package/resources/usage/v1/subscriptions.d.mts +51 -0
- package/resources/usage/v1/subscriptions.d.mts.map +1 -0
- package/resources/usage/v1/subscriptions.d.ts +51 -0
- package/resources/usage/v1/subscriptions.d.ts.map +1 -0
- package/resources/usage/v1/subscriptions.js +63 -0
- package/resources/usage/v1/subscriptions.js.map +1 -0
- package/resources/usage/v1/subscriptions.mjs +59 -0
- package/resources/usage/v1/subscriptions.mjs.map +1 -0
- package/resources/usage/v1/v1.d.mts +37 -0
- package/resources/usage/v1/v1.d.mts.map +1 -0
- package/resources/usage/v1/v1.d.ts +37 -0
- package/resources/usage/v1/v1.d.ts.map +1 -0
- package/resources/usage/v1/v1.js +34 -0
- package/resources/usage/v1/v1.js.map +1 -0
- package/resources/usage/v1/v1.mjs +29 -0
- package/resources/usage/v1/v1.mjs.map +1 -0
- package/resources/usage/v1.d.mts +2 -0
- package/resources/usage/v1.d.mts.map +1 -0
- package/resources/usage/v1.d.ts +2 -0
- package/resources/usage/v1.d.ts.map +1 -0
- package/resources/usage/v1.js +6 -0
- package/resources/usage/v1.js.map +1 -0
- package/resources/usage/v1.mjs +3 -0
- package/resources/usage/v1.mjs.map +1 -0
- package/resources/usage.d.mts +2 -0
- package/resources/usage.d.mts.map +1 -0
- package/resources/usage.d.ts +2 -0
- package/resources/usage.d.ts.map +1 -0
- package/resources/usage.js +6 -0
- package/resources/usage.js.map +1 -0
- package/resources/usage.mjs +3 -0
- package/resources/usage.mjs.map +1 -0
- package/resources/vault/objects.d.mts +4 -0
- package/resources/vault/objects.d.mts.map +1 -1
- package/resources/vault/objects.d.ts +4 -0
- package/resources/vault/objects.d.ts.map +1 -1
- package/src/client.ts +5 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/usage/index.ts +4 -0
- package/src/resources/usage/usage.ts +15 -0
- package/src/resources/usage/v1/index.ts +9 -0
- package/src/resources/usage/v1/subscriptions.ts +108 -0
- package/src/resources/usage/v1/v1.ts +64 -0
- package/src/resources/usage/v1.ts +3 -0
- package/src/resources/usage.ts +3 -0
- package/src/resources/vault/objects.ts +5 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/client.ts
CHANGED
|
@@ -44,6 +44,7 @@ import {
|
|
|
44
44
|
} from './resources/skills/skills';
|
|
45
45
|
import { Superdoc } from './resources/superdoc/superdoc';
|
|
46
46
|
import { Translate } from './resources/translate/translate';
|
|
47
|
+
import { Usage } from './resources/usage/usage';
|
|
47
48
|
import {
|
|
48
49
|
Vault,
|
|
49
50
|
VaultConfirmUploadParams,
|
|
@@ -811,6 +812,7 @@ export class Casedev {
|
|
|
811
812
|
search: API.Search = new API.Search(this);
|
|
812
813
|
superdoc: API.Superdoc = new API.Superdoc(this);
|
|
813
814
|
translate: API.Translate = new API.Translate(this);
|
|
815
|
+
usage: API.Usage = new API.Usage(this);
|
|
814
816
|
/**
|
|
815
817
|
* Secure document storage with semantic search and GraphRAG
|
|
816
818
|
*/
|
|
@@ -835,6 +837,7 @@ Casedev.Skills = Skills;
|
|
|
835
837
|
Casedev.Search = Search;
|
|
836
838
|
Casedev.Superdoc = Superdoc;
|
|
837
839
|
Casedev.Translate = Translate;
|
|
840
|
+
Casedev.Usage = Usage;
|
|
838
841
|
Casedev.Vault = Vault;
|
|
839
842
|
Casedev.Voice = Voice;
|
|
840
843
|
|
|
@@ -885,6 +888,8 @@ export declare namespace Casedev {
|
|
|
885
888
|
|
|
886
889
|
export { Translate as Translate };
|
|
887
890
|
|
|
891
|
+
export { Usage as Usage };
|
|
892
|
+
|
|
888
893
|
export {
|
|
889
894
|
Vault as Vault,
|
|
890
895
|
type VaultCreateResponse as VaultCreateResponse,
|
package/src/resources/index.ts
CHANGED
|
@@ -27,6 +27,7 @@ export {
|
|
|
27
27
|
export { Superdoc } from './superdoc/superdoc';
|
|
28
28
|
export { System, type SystemListServicesResponse } from './system';
|
|
29
29
|
export { Translate } from './translate/translate';
|
|
30
|
+
export { Usage } from './usage/usage';
|
|
30
31
|
export {
|
|
31
32
|
Vault,
|
|
32
33
|
type VaultCreateResponse,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as V1API from './v1/v1';
|
|
5
|
+
import { V1, V1RetrieveParams } from './v1/v1';
|
|
6
|
+
|
|
7
|
+
export class Usage extends APIResource {
|
|
8
|
+
v1: V1API.V1 = new V1API.V1(this._client);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
Usage.V1 = V1;
|
|
12
|
+
|
|
13
|
+
export declare namespace Usage {
|
|
14
|
+
export { V1 as V1, type V1RetrieveParams as V1RetrieveParams };
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Subscriptions,
|
|
5
|
+
type SubscriptionCreateParams,
|
|
6
|
+
type SubscriptionUpdateParams,
|
|
7
|
+
type SubscriptionTestParams,
|
|
8
|
+
} from './subscriptions';
|
|
9
|
+
export { V1, type V1RetrieveParams } from './v1';
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
6
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
+
import { path } from '../../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Usage reporting and webhook subscriptions
|
|
11
|
+
*/
|
|
12
|
+
export class Subscriptions extends APIResource {
|
|
13
|
+
/**
|
|
14
|
+
* Creates a webhook subscription for usage, balance, and billing events.
|
|
15
|
+
*/
|
|
16
|
+
create(body: SubscriptionCreateParams, options?: RequestOptions): APIPromise<void> {
|
|
17
|
+
return this._client.post('/usage/v1/subscriptions', {
|
|
18
|
+
body,
|
|
19
|
+
...options,
|
|
20
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Updates callback URL, event filters, active state, or signing secret.
|
|
26
|
+
*/
|
|
27
|
+
update(
|
|
28
|
+
subscriptionID: string,
|
|
29
|
+
body: SubscriptionUpdateParams | null | undefined = {},
|
|
30
|
+
options?: RequestOptions,
|
|
31
|
+
): APIPromise<void> {
|
|
32
|
+
return this._client.patch(path`/usage/v1/subscriptions/${subscriptionID}`, {
|
|
33
|
+
body,
|
|
34
|
+
...options,
|
|
35
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Lists webhook subscriptions configured for usage and billing events.
|
|
41
|
+
*/
|
|
42
|
+
list(options?: RequestOptions): APIPromise<void> {
|
|
43
|
+
return this._client.get('/usage/v1/subscriptions', {
|
|
44
|
+
...options,
|
|
45
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Deactivates a usage webhook subscription.
|
|
51
|
+
*/
|
|
52
|
+
delete(subscriptionID: string, options?: RequestOptions): APIPromise<void> {
|
|
53
|
+
return this._client.delete(path`/usage/v1/subscriptions/${subscriptionID}`, {
|
|
54
|
+
...options,
|
|
55
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Delivers a test event to a single usage webhook subscription using the same
|
|
61
|
+
* payload shape and signing behavior as production delivery.
|
|
62
|
+
*/
|
|
63
|
+
test(
|
|
64
|
+
subscriptionID: string,
|
|
65
|
+
body: SubscriptionTestParams | null | undefined = {},
|
|
66
|
+
options?: RequestOptions,
|
|
67
|
+
): APIPromise<void> {
|
|
68
|
+
return this._client.post(path`/usage/v1/subscriptions/${subscriptionID}/test`, {
|
|
69
|
+
body,
|
|
70
|
+
...options,
|
|
71
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface SubscriptionCreateParams {
|
|
77
|
+
callbackUrl: string;
|
|
78
|
+
|
|
79
|
+
eventTypes?: Array<string>;
|
|
80
|
+
|
|
81
|
+
signingSecret?: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface SubscriptionUpdateParams {
|
|
85
|
+
callbackUrl?: string;
|
|
86
|
+
|
|
87
|
+
clearSigningSecret?: boolean;
|
|
88
|
+
|
|
89
|
+
eventTypes?: Array<string>;
|
|
90
|
+
|
|
91
|
+
isActive?: boolean;
|
|
92
|
+
|
|
93
|
+
signingSecret?: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface SubscriptionTestParams {
|
|
97
|
+
eventType?: string;
|
|
98
|
+
|
|
99
|
+
payload?: { [key: string]: unknown };
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export declare namespace Subscriptions {
|
|
103
|
+
export {
|
|
104
|
+
type SubscriptionCreateParams as SubscriptionCreateParams,
|
|
105
|
+
type SubscriptionUpdateParams as SubscriptionUpdateParams,
|
|
106
|
+
type SubscriptionTestParams as SubscriptionTestParams,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as SubscriptionsAPI from './subscriptions';
|
|
5
|
+
import {
|
|
6
|
+
SubscriptionCreateParams,
|
|
7
|
+
SubscriptionTestParams,
|
|
8
|
+
SubscriptionUpdateParams,
|
|
9
|
+
Subscriptions,
|
|
10
|
+
} from './subscriptions';
|
|
11
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
12
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
13
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Usage reporting and webhook subscriptions
|
|
17
|
+
*/
|
|
18
|
+
export class V1 extends APIResource {
|
|
19
|
+
subscriptions: SubscriptionsAPI.Subscriptions = new SubscriptionsAPI.Subscriptions(this._client);
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Returns customer-facing usage metrics and costs for the requested period.
|
|
23
|
+
* Supports summary totals and daily buckets for timestamped usage sources. Vault
|
|
24
|
+
* storage is intentionally omitted from totals because it is not yet periodized
|
|
25
|
+
* for arbitrary windows.
|
|
26
|
+
*/
|
|
27
|
+
retrieve(query: V1RetrieveParams | null | undefined = {}, options?: RequestOptions): APIPromise<void> {
|
|
28
|
+
return this._client.get('/usage/v1', {
|
|
29
|
+
query,
|
|
30
|
+
...options,
|
|
31
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface V1RetrieveParams {
|
|
37
|
+
/**
|
|
38
|
+
* Whether to return period totals only or include daily buckets.
|
|
39
|
+
*/
|
|
40
|
+
granularity?: 'summary' | 'daily';
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Period end date. Defaults to now.
|
|
44
|
+
*/
|
|
45
|
+
periodEnd?: string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Period start date. Defaults to the start of the current calendar month.
|
|
49
|
+
*/
|
|
50
|
+
periodStart?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
V1.Subscriptions = Subscriptions;
|
|
54
|
+
|
|
55
|
+
export declare namespace V1 {
|
|
56
|
+
export { type V1RetrieveParams as V1RetrieveParams };
|
|
57
|
+
|
|
58
|
+
export {
|
|
59
|
+
Subscriptions as Subscriptions,
|
|
60
|
+
type SubscriptionCreateParams as SubscriptionCreateParams,
|
|
61
|
+
type SubscriptionUpdateParams as SubscriptionUpdateParams,
|
|
62
|
+
type SubscriptionTestParams as SubscriptionTestParams,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -284,6 +284,11 @@ export interface ObjectRetrieveResponse {
|
|
|
284
284
|
*/
|
|
285
285
|
textLength?: number;
|
|
286
286
|
|
|
287
|
+
/**
|
|
288
|
+
* Object ID of the completed transcript (if available)
|
|
289
|
+
*/
|
|
290
|
+
transcript_object_id?: string | null;
|
|
291
|
+
|
|
287
292
|
/**
|
|
288
293
|
* Number of embedding vectors generated
|
|
289
294
|
*/
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.43.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.43.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.43.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.43.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|