weave-typescript 0.4.5 → 0.5.1
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/google/protobuf/timestamp.pb.d.ts +128 -0
- package/dist/google/protobuf/timestamp.pb.js +93 -0
- package/dist/weaveapi/auth/v1/service.pb.d.ts +705 -0
- package/dist/weaveapi/auth/v1/service.pb.js +3910 -0
- package/dist/weaveapi/auth/v1/session.pb.d.ts +43 -0
- package/dist/weaveapi/auth/v1/session.pb.js +268 -0
- package/dist/weaveapi/auth/v1/usage.pb.d.ts +76 -0
- package/dist/weaveapi/auth/v1/usage.pb.js +761 -0
- package/dist/weaveapi/auth/v1/user.pb.d.ts +141 -0
- package/dist/weaveapi/auth/v1/user.pb.js +1439 -0
- package/dist/weaveapi/modex/v1/model.pb.d.ts +147 -0
- package/dist/weaveapi/modex/v1/model.pb.js +1655 -0
- package/dist/weaveapi/modex/v1/provider.pb.d.ts +35 -0
- package/dist/weaveapi/modex/v1/provider.pb.js +252 -0
- package/dist/weaveapi/modex/v1/service.pb.d.ts +517 -0
- package/dist/weaveapi/modex/v1/service.pb.js +4431 -0
- package/dist/weaveapi/payment/v1/invoice.pb.d.ts +92 -0
- package/dist/weaveapi/payment/v1/invoice.pb.js +899 -0
- package/dist/weaveapi/payment/v1/service.pb.d.ts +657 -0
- package/dist/weaveapi/payment/v1/service.pb.js +4153 -0
- package/dist/weaveapi/payment/v1/subscription.pb.d.ts +167 -0
- package/dist/weaveapi/payment/v1/subscription.pb.js +1747 -0
- package/package.json +10 -5
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "weaveapi.auth.v1";
|
|
3
|
+
/** User model */
|
|
4
|
+
export interface User {
|
|
5
|
+
id: string;
|
|
6
|
+
email: string;
|
|
7
|
+
/** Primary username (from primary provider) */
|
|
8
|
+
username: string;
|
|
9
|
+
fullName: string;
|
|
10
|
+
avatarUrl: string;
|
|
11
|
+
/** OAuth provider accounts */
|
|
12
|
+
oauthAccounts: OAuthAccount[];
|
|
13
|
+
/** github, google, microsoft, etc. */
|
|
14
|
+
primaryProvider: string;
|
|
15
|
+
/** Subscription info */
|
|
16
|
+
subscription: SubscriptionInfo | undefined;
|
|
17
|
+
/** Account status */
|
|
18
|
+
accountStatus: string;
|
|
19
|
+
emailVerified: boolean;
|
|
20
|
+
/** Metadata */
|
|
21
|
+
lastLoginAt: Date | undefined;
|
|
22
|
+
createdAt: Date | undefined;
|
|
23
|
+
updatedAt: Date | undefined;
|
|
24
|
+
/** Preferences */
|
|
25
|
+
preferences: UserPreferences | undefined;
|
|
26
|
+
}
|
|
27
|
+
export interface OAuthAccount {
|
|
28
|
+
/** github, google, microsoft, gitlab */
|
|
29
|
+
provider: string;
|
|
30
|
+
/** ID from the OAuth provider */
|
|
31
|
+
providerUserId: string;
|
|
32
|
+
/** Username from the OAuth provider */
|
|
33
|
+
providerUsername: string;
|
|
34
|
+
/** Email from the OAuth provider */
|
|
35
|
+
providerEmail: string;
|
|
36
|
+
/** Encrypted OAuth access token */
|
|
37
|
+
accessToken: string;
|
|
38
|
+
/** Encrypted OAuth refresh token */
|
|
39
|
+
refreshToken: string;
|
|
40
|
+
tokenExpiresAt: Date | undefined;
|
|
41
|
+
linkedAt: Date | undefined;
|
|
42
|
+
lastUsedAt: Date | undefined;
|
|
43
|
+
/** Provider-specific data */
|
|
44
|
+
metadata: {
|
|
45
|
+
[key: string]: string;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export interface OAuthAccount_MetadataEntry {
|
|
49
|
+
key: string;
|
|
50
|
+
value: string;
|
|
51
|
+
}
|
|
52
|
+
export interface OAuthProvider {
|
|
53
|
+
/** github, google, microsoft, gitlab */
|
|
54
|
+
name: string;
|
|
55
|
+
/** GitHub, Google, Microsoft, GitLab */
|
|
56
|
+
displayName: string;
|
|
57
|
+
iconUrl: string;
|
|
58
|
+
enabled: boolean;
|
|
59
|
+
supportedScopes: string[];
|
|
60
|
+
defaultScope: string;
|
|
61
|
+
supportsRefresh: boolean;
|
|
62
|
+
/** Proof Key for Code Exchange */
|
|
63
|
+
supportsPkce: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface SubscriptionInfo {
|
|
66
|
+
/** free, active, cancelled, past_due */
|
|
67
|
+
status: string;
|
|
68
|
+
/** free, pro */
|
|
69
|
+
tier: string;
|
|
70
|
+
stripeCustomerId: string;
|
|
71
|
+
stripeSubscriptionId: string;
|
|
72
|
+
startedAt: Date | undefined;
|
|
73
|
+
endsAt: Date | undefined;
|
|
74
|
+
cancelledAt: Date | undefined;
|
|
75
|
+
autoRenew: boolean;
|
|
76
|
+
paymentMethodLast4: string;
|
|
77
|
+
paymentMethodBrand: string;
|
|
78
|
+
}
|
|
79
|
+
export interface UserPreferences {
|
|
80
|
+
emailNotifications: boolean;
|
|
81
|
+
webhookNotifications: boolean;
|
|
82
|
+
webhookUrl: string;
|
|
83
|
+
webhookSecret: string;
|
|
84
|
+
/** Model slugs to watch for updates */
|
|
85
|
+
watchedModels: string[];
|
|
86
|
+
/** Provider slugs to watch */
|
|
87
|
+
watchedProviders: string[];
|
|
88
|
+
timezone: string;
|
|
89
|
+
dateFormat: string;
|
|
90
|
+
}
|
|
91
|
+
/** API Key model */
|
|
92
|
+
export interface APIKey {
|
|
93
|
+
id: string;
|
|
94
|
+
userId: string;
|
|
95
|
+
/** First 10 chars for identification */
|
|
96
|
+
keyPrefix: string;
|
|
97
|
+
name: string;
|
|
98
|
+
description: string;
|
|
99
|
+
/** Permissions */
|
|
100
|
+
scopes: string[];
|
|
101
|
+
/** Specific endpoints if restricted */
|
|
102
|
+
allowedEndpoints: string[];
|
|
103
|
+
/** IP whitelist */
|
|
104
|
+
allowedIps: string[];
|
|
105
|
+
/** Usage */
|
|
106
|
+
lastUsedAt: Date | undefined;
|
|
107
|
+
requestCount: number;
|
|
108
|
+
totalTokens: number;
|
|
109
|
+
/** Status */
|
|
110
|
+
isActive: boolean;
|
|
111
|
+
expiresAt: Date | undefined;
|
|
112
|
+
/** Metadata */
|
|
113
|
+
createdAt: Date | undefined;
|
|
114
|
+
updatedAt: Date | undefined;
|
|
115
|
+
}
|
|
116
|
+
export declare const User: MessageFns<User>;
|
|
117
|
+
export declare const OAuthAccount: MessageFns<OAuthAccount>;
|
|
118
|
+
export declare const OAuthAccount_MetadataEntry: MessageFns<OAuthAccount_MetadataEntry>;
|
|
119
|
+
export declare const OAuthProvider: MessageFns<OAuthProvider>;
|
|
120
|
+
export declare const SubscriptionInfo: MessageFns<SubscriptionInfo>;
|
|
121
|
+
export declare const UserPreferences: MessageFns<UserPreferences>;
|
|
122
|
+
export declare const APIKey: MessageFns<APIKey>;
|
|
123
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
124
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
125
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
126
|
+
} : Partial<T>;
|
|
127
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
128
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
129
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
130
|
+
} & {
|
|
131
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
132
|
+
};
|
|
133
|
+
export interface MessageFns<T> {
|
|
134
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
135
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
136
|
+
fromJSON(object: any): T;
|
|
137
|
+
toJSON(message: T): unknown;
|
|
138
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
139
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
140
|
+
}
|
|
141
|
+
export {};
|