@openfeature/flagd-provider 0.7.5 → 0.7.7

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.
@@ -1,46 +1,46 @@
1
- import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
2
- import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
3
- import type { FetchAllFlagsResponse } from "./sync_service";
4
- import type { FetchAllFlagsRequest } from "./sync_service";
5
- import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
6
- import type { SyncFlagsResponse } from "./sync_service";
7
- import type { SyncFlagsRequest } from "./sync_service";
8
- import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc";
9
- import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
10
- /**
11
- * FlagService implements a server streaming to provide realtime flag configurations
12
- *
13
- * @generated from protobuf service sync.v1.FlagSyncService
14
- */
15
- export interface IFlagSyncServiceClient {
16
- /**
17
- * @generated from protobuf rpc: SyncFlags(sync.v1.SyncFlagsRequest) returns (stream sync.v1.SyncFlagsResponse);
18
- */
19
- syncFlags(input: SyncFlagsRequest, options?: RpcOptions): ServerStreamingCall<SyncFlagsRequest, SyncFlagsResponse>;
20
- /**
21
- * @generated from protobuf rpc: FetchAllFlags(sync.v1.FetchAllFlagsRequest) returns (sync.v1.FetchAllFlagsResponse);
22
- */
23
- fetchAllFlags(input: FetchAllFlagsRequest, options?: RpcOptions): UnaryCall<FetchAllFlagsRequest, FetchAllFlagsResponse>;
24
- }
25
- /**
26
- * FlagService implements a server streaming to provide realtime flag configurations
27
- *
28
- * @generated from protobuf service sync.v1.FlagSyncService
29
- */
30
- export declare class FlagSyncServiceClient implements IFlagSyncServiceClient, ServiceInfo {
31
- private readonly _transport;
32
- typeName: string;
33
- methods: import("@protobuf-ts/runtime-rpc").MethodInfo<any, any>[];
34
- options: {
35
- [extensionName: string]: import("@protobuf-ts/runtime").JsonValue;
36
- };
37
- constructor(_transport: RpcTransport);
38
- /**
39
- * @generated from protobuf rpc: SyncFlags(sync.v1.SyncFlagsRequest) returns (stream sync.v1.SyncFlagsResponse);
40
- */
41
- syncFlags(input: SyncFlagsRequest, options?: RpcOptions): ServerStreamingCall<SyncFlagsRequest, SyncFlagsResponse>;
42
- /**
43
- * @generated from protobuf rpc: FetchAllFlags(sync.v1.FetchAllFlagsRequest) returns (sync.v1.FetchAllFlagsResponse);
44
- */
45
- fetchAllFlags(input: FetchAllFlagsRequest, options?: RpcOptions): UnaryCall<FetchAllFlagsRequest, FetchAllFlagsResponse>;
46
- }
1
+ import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
2
+ import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
3
+ import type { FetchAllFlagsResponse } from "./sync_service";
4
+ import type { FetchAllFlagsRequest } from "./sync_service";
5
+ import type { UnaryCall } from "@protobuf-ts/runtime-rpc";
6
+ import type { SyncFlagsResponse } from "./sync_service";
7
+ import type { SyncFlagsRequest } from "./sync_service";
8
+ import type { ServerStreamingCall } from "@protobuf-ts/runtime-rpc";
9
+ import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
10
+ /**
11
+ * FlagService implements a server streaming to provide realtime flag configurations
12
+ *
13
+ * @generated from protobuf service sync.v1.FlagSyncService
14
+ */
15
+ export interface IFlagSyncServiceClient {
16
+ /**
17
+ * @generated from protobuf rpc: SyncFlags(sync.v1.SyncFlagsRequest) returns (stream sync.v1.SyncFlagsResponse);
18
+ */
19
+ syncFlags(input: SyncFlagsRequest, options?: RpcOptions): ServerStreamingCall<SyncFlagsRequest, SyncFlagsResponse>;
20
+ /**
21
+ * @generated from protobuf rpc: FetchAllFlags(sync.v1.FetchAllFlagsRequest) returns (sync.v1.FetchAllFlagsResponse);
22
+ */
23
+ fetchAllFlags(input: FetchAllFlagsRequest, options?: RpcOptions): UnaryCall<FetchAllFlagsRequest, FetchAllFlagsResponse>;
24
+ }
25
+ /**
26
+ * FlagService implements a server streaming to provide realtime flag configurations
27
+ *
28
+ * @generated from protobuf service sync.v1.FlagSyncService
29
+ */
30
+ export declare class FlagSyncServiceClient implements IFlagSyncServiceClient, ServiceInfo {
31
+ private readonly _transport;
32
+ typeName: string;
33
+ methods: import("@protobuf-ts/runtime-rpc").MethodInfo<any, any>[];
34
+ options: {
35
+ [extensionName: string]: import("@protobuf-ts/runtime").JsonValue;
36
+ };
37
+ constructor(_transport: RpcTransport);
38
+ /**
39
+ * @generated from protobuf rpc: SyncFlags(sync.v1.SyncFlagsRequest) returns (stream sync.v1.SyncFlagsResponse);
40
+ */
41
+ syncFlags(input: SyncFlagsRequest, options?: RpcOptions): ServerStreamingCall<SyncFlagsRequest, SyncFlagsResponse>;
42
+ /**
43
+ * @generated from protobuf rpc: FetchAllFlags(sync.v1.FetchAllFlagsRequest) returns (sync.v1.FetchAllFlagsResponse);
44
+ */
45
+ fetchAllFlags(input: FetchAllFlagsRequest, options?: RpcOptions): UnaryCall<FetchAllFlagsRequest, FetchAllFlagsResponse>;
46
+ }
@@ -1,153 +1,183 @@
1
- import { ServiceType } from "@protobuf-ts/runtime-rpc";
2
- import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
3
- import type { IBinaryWriter } from "@protobuf-ts/runtime";
4
- import type { BinaryReadOptions } from "@protobuf-ts/runtime";
5
- import type { IBinaryReader } from "@protobuf-ts/runtime";
6
- import type { PartialMessage } from "@protobuf-ts/runtime";
7
- import { MessageType } from "@protobuf-ts/runtime";
8
- /**
9
- * SyncFlagsRequest is the request initiating the sever-streaming rpc. Flagd sends this request, acting as the client
10
- *
11
- * @generated from protobuf message sync.v1.SyncFlagsRequest
12
- */
13
- export interface SyncFlagsRequest {
14
- /**
15
- * Optional: A unique identifier for flagd provider (grpc client) initiating the request. The server implementations
16
- * can utilize this identifier to aggregate flag configurations and stream them to a specific client. This identifier
17
- * is intended to be optional. However server implementation may enforce it.
18
- *
19
- * @generated from protobuf field: string provider_id = 1;
20
- */
21
- providerId: string;
22
- }
23
- /**
24
- * SyncFlagsResponse is the server response containing feature flag configurations and the state
25
- *
26
- * @generated from protobuf message sync.v1.SyncFlagsResponse
27
- */
28
- export interface SyncFlagsResponse {
29
- /**
30
- * flagd feature flag configuration. Must be validated to schema - https://raw.githubusercontent.com/open-feature/schemas/main/json/flagd-definitions.json
31
- *
32
- * @generated from protobuf field: string flag_configuration = 1;
33
- */
34
- flagConfiguration: string;
35
- /**
36
- * State conveying the operation to be performed by flagd. See the descriptions of SyncState for an explanation of
37
- * supported values
38
- *
39
- * @generated from protobuf field: sync.v1.SyncState state = 2;
40
- */
41
- state: SyncState;
42
- }
43
- /**
44
- * FetchAllFlagsRequest is the request to fetch all flags. Flagd sends this request as the client in order to resync its internal state
45
- *
46
- * @generated from protobuf message sync.v1.FetchAllFlagsRequest
47
- */
48
- export interface FetchAllFlagsRequest {
49
- }
50
- /**
51
- * FetchAllFlagsResponse is the server response containing feature flag configurations
52
- *
53
- * @generated from protobuf message sync.v1.FetchAllFlagsResponse
54
- */
55
- export interface FetchAllFlagsResponse {
56
- /**
57
- * flagd feature flag configuration. Must be validated to schema - https://raw.githubusercontent.com/open-feature/schemas/main/json/flagd-definitions.json
58
- *
59
- * @generated from protobuf field: string flag_configuration = 1;
60
- */
61
- flagConfiguration: string;
62
- }
63
- /**
64
- * SyncState conveys the state of the payload. These states are related to flagd isync.go type definitions but
65
- * contains extras to optimize grpc use case. Refer - https://github.com/open-feature/flagd/blob/main/pkg/sync/isync.go
66
- *
67
- * @generated from protobuf enum sync.v1.SyncState
68
- */
69
- export declare enum SyncState {
70
- /**
71
- * Value is ignored by the listening flagd
72
- *
73
- * @generated from protobuf enum value: SYNC_STATE_UNSPECIFIED = 0;
74
- */
75
- UNSPECIFIED = 0,
76
- /**
77
- * All the flags matching the request. This is the default response and other states can be ignored
78
- * by the implementation. Flagd internally replaces all existing flags for this response state.
79
- *
80
- * @generated from protobuf enum value: SYNC_STATE_ALL = 1;
81
- */
82
- ALL = 1,
83
- /**
84
- * Convey an addition of a flag. Flagd internally handles this by combining new flags with existing ones
85
- *
86
- * @generated from protobuf enum value: SYNC_STATE_ADD = 2;
87
- */
88
- ADD = 2,
89
- /**
90
- * Convey an update of a flag. Flagd internally attempts to update if the updated flag already exist OR if it does not,
91
- * it will get added
92
- *
93
- * @generated from protobuf enum value: SYNC_STATE_UPDATE = 3;
94
- */
95
- UPDATE = 3,
96
- /**
97
- * Convey a deletion of a flag. Flagd internally removes the flag
98
- *
99
- * @generated from protobuf enum value: SYNC_STATE_DELETE = 4;
100
- */
101
- DELETE = 4,
102
- /**
103
- * Optional server ping to check client connectivity. Handling is ignored by flagd and is to merely support live check
104
- *
105
- * @generated from protobuf enum value: SYNC_STATE_PING = 5;
106
- */
107
- PING = 5
108
- }
109
- declare class SyncFlagsRequest$Type extends MessageType<SyncFlagsRequest> {
110
- constructor();
111
- create(value?: PartialMessage<SyncFlagsRequest>): SyncFlagsRequest;
112
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SyncFlagsRequest): SyncFlagsRequest;
113
- internalBinaryWrite(message: SyncFlagsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
114
- }
115
- /**
116
- * @generated MessageType for protobuf message sync.v1.SyncFlagsRequest
117
- */
118
- export declare const SyncFlagsRequest: SyncFlagsRequest$Type;
119
- declare class SyncFlagsResponse$Type extends MessageType<SyncFlagsResponse> {
120
- constructor();
121
- create(value?: PartialMessage<SyncFlagsResponse>): SyncFlagsResponse;
122
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SyncFlagsResponse): SyncFlagsResponse;
123
- internalBinaryWrite(message: SyncFlagsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
124
- }
125
- /**
126
- * @generated MessageType for protobuf message sync.v1.SyncFlagsResponse
127
- */
128
- export declare const SyncFlagsResponse: SyncFlagsResponse$Type;
129
- declare class FetchAllFlagsRequest$Type extends MessageType<FetchAllFlagsRequest> {
130
- constructor();
131
- create(value?: PartialMessage<FetchAllFlagsRequest>): FetchAllFlagsRequest;
132
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FetchAllFlagsRequest): FetchAllFlagsRequest;
133
- internalBinaryWrite(message: FetchAllFlagsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
134
- }
135
- /**
136
- * @generated MessageType for protobuf message sync.v1.FetchAllFlagsRequest
137
- */
138
- export declare const FetchAllFlagsRequest: FetchAllFlagsRequest$Type;
139
- declare class FetchAllFlagsResponse$Type extends MessageType<FetchAllFlagsResponse> {
140
- constructor();
141
- create(value?: PartialMessage<FetchAllFlagsResponse>): FetchAllFlagsResponse;
142
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FetchAllFlagsResponse): FetchAllFlagsResponse;
143
- internalBinaryWrite(message: FetchAllFlagsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
144
- }
145
- /**
146
- * @generated MessageType for protobuf message sync.v1.FetchAllFlagsResponse
147
- */
148
- export declare const FetchAllFlagsResponse: FetchAllFlagsResponse$Type;
149
- /**
150
- * @generated ServiceType for protobuf service sync.v1.FlagSyncService
151
- */
152
- export declare const FlagSyncService: ServiceType;
153
- export {};
1
+ import { ServiceType } from "@protobuf-ts/runtime-rpc";
2
+ import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
3
+ import type { IBinaryWriter } from "@protobuf-ts/runtime";
4
+ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
5
+ import type { IBinaryReader } from "@protobuf-ts/runtime";
6
+ import type { PartialMessage } from "@protobuf-ts/runtime";
7
+ import { MessageType } from "@protobuf-ts/runtime";
8
+ /**
9
+ * SyncFlagsRequest is the request initiating the sever-streaming rpc. Flagd sends this request, acting as the client
10
+ *
11
+ * @generated from protobuf message sync.v1.SyncFlagsRequest
12
+ */
13
+ export interface SyncFlagsRequest {
14
+ /**
15
+ * Optional: A unique identifier for flagd(grpc client) initiating the request. The server implementations may
16
+ * utilize this identifier to uniquely identify, validate(ex:- enforce authentication/authorization) and filter
17
+ * flag configurations that it can expose to this request. This field is intended to be optional. However server
18
+ * implementations may enforce it.
19
+ * ex:- provider_id: flagd-weatherapp-sidecar
20
+ *
21
+ * @generated from protobuf field: string provider_id = 1;
22
+ */
23
+ providerId: string;
24
+ /**
25
+ * Optional: A selector for the flag configuration request. The server implementation may utilize this to select
26
+ * flag configurations from a collection, select the source of the flag or combine this to any desired underlying
27
+ * filtering mechanism.
28
+ * ex:- selector: 'source=database,app=weatherapp'
29
+ *
30
+ * @generated from protobuf field: string selector = 2;
31
+ */
32
+ selector: string;
33
+ }
34
+ /**
35
+ * SyncFlagsResponse is the server response containing feature flag configurations and the state
36
+ *
37
+ * @generated from protobuf message sync.v1.SyncFlagsResponse
38
+ */
39
+ export interface SyncFlagsResponse {
40
+ /**
41
+ * flagd feature flag configuration. Must be validated to schema - https://raw.githubusercontent.com/open-feature/schemas/main/json/flagd-definitions.json
42
+ *
43
+ * @generated from protobuf field: string flag_configuration = 1;
44
+ */
45
+ flagConfiguration: string;
46
+ /**
47
+ * State conveying the operation to be performed by flagd. See the descriptions of SyncState for an explanation of
48
+ * supported values
49
+ *
50
+ * @generated from protobuf field: sync.v1.SyncState state = 2;
51
+ */
52
+ state: SyncState;
53
+ }
54
+ /**
55
+ * FetchAllFlagsRequest is the request to fetch all flags. Flagd sends this request as the client in order to resync its internal state
56
+ *
57
+ * @generated from protobuf message sync.v1.FetchAllFlagsRequest
58
+ */
59
+ export interface FetchAllFlagsRequest {
60
+ /**
61
+ * Optional: A unique identifier for flagd(grpc client) initiating the request. The server implementations may
62
+ * utilize this identifier to uniquely identify, validate(ex:- enforce authentication/authorization) and filter
63
+ * flag configurations that it can expose to this request. This field is intended to be optional. However server
64
+ * implementations may enforce it.
65
+ * ex:- provider_id: flagd-weatherapp-sidecar
66
+ *
67
+ * @generated from protobuf field: string provider_id = 1;
68
+ */
69
+ providerId: string;
70
+ /**
71
+ * Optional: A selector for the flag configuration request. The server implementation may utilize this to select
72
+ * flag configurations from a collection, select the source of the flag or combine this to any desired underlying
73
+ * filtering mechanism.
74
+ * ex:- selector: 'source=database,app=weatherapp'
75
+ *
76
+ * @generated from protobuf field: string selector = 2;
77
+ */
78
+ selector: string;
79
+ }
80
+ /**
81
+ * FetchAllFlagsResponse is the server response containing feature flag configurations
82
+ *
83
+ * @generated from protobuf message sync.v1.FetchAllFlagsResponse
84
+ */
85
+ export interface FetchAllFlagsResponse {
86
+ /**
87
+ * flagd feature flag configuration. Must be validated to schema - https://raw.githubusercontent.com/open-feature/schemas/main/json/flagd-definitions.json
88
+ *
89
+ * @generated from protobuf field: string flag_configuration = 1;
90
+ */
91
+ flagConfiguration: string;
92
+ }
93
+ /**
94
+ * SyncState conveys the state of the payload. These states are related to flagd isync.go type definitions but
95
+ * contains extras to optimize grpc use case. Refer - https://github.com/open-feature/flagd/blob/main/pkg/sync/isync.go
96
+ *
97
+ * @generated from protobuf enum sync.v1.SyncState
98
+ */
99
+ export declare enum SyncState {
100
+ /**
101
+ * Value is ignored by the listening flagd
102
+ *
103
+ * @generated from protobuf enum value: SYNC_STATE_UNSPECIFIED = 0;
104
+ */
105
+ UNSPECIFIED = 0,
106
+ /**
107
+ * All the flags matching the request. This is the default response and other states can be ignored
108
+ * by the implementation. Flagd internally replaces all existing flags for this response state.
109
+ *
110
+ * @generated from protobuf enum value: SYNC_STATE_ALL = 1;
111
+ */
112
+ ALL = 1,
113
+ /**
114
+ * Convey an addition of a flag. Flagd internally handles this by combining new flags with existing ones
115
+ *
116
+ * @generated from protobuf enum value: SYNC_STATE_ADD = 2;
117
+ */
118
+ ADD = 2,
119
+ /**
120
+ * Convey an update of a flag. Flagd internally attempts to update if the updated flag already exist OR if it does not,
121
+ * it will get added
122
+ *
123
+ * @generated from protobuf enum value: SYNC_STATE_UPDATE = 3;
124
+ */
125
+ UPDATE = 3,
126
+ /**
127
+ * Convey a deletion of a flag. Flagd internally removes the flag
128
+ *
129
+ * @generated from protobuf enum value: SYNC_STATE_DELETE = 4;
130
+ */
131
+ DELETE = 4,
132
+ /**
133
+ * Optional server ping to check client connectivity. Handling is ignored by flagd and is to merely support live check
134
+ *
135
+ * @generated from protobuf enum value: SYNC_STATE_PING = 5;
136
+ */
137
+ PING = 5
138
+ }
139
+ declare class SyncFlagsRequest$Type extends MessageType<SyncFlagsRequest> {
140
+ constructor();
141
+ create(value?: PartialMessage<SyncFlagsRequest>): SyncFlagsRequest;
142
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SyncFlagsRequest): SyncFlagsRequest;
143
+ internalBinaryWrite(message: SyncFlagsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
144
+ }
145
+ /**
146
+ * @generated MessageType for protobuf message sync.v1.SyncFlagsRequest
147
+ */
148
+ export declare const SyncFlagsRequest: SyncFlagsRequest$Type;
149
+ declare class SyncFlagsResponse$Type extends MessageType<SyncFlagsResponse> {
150
+ constructor();
151
+ create(value?: PartialMessage<SyncFlagsResponse>): SyncFlagsResponse;
152
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SyncFlagsResponse): SyncFlagsResponse;
153
+ internalBinaryWrite(message: SyncFlagsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
154
+ }
155
+ /**
156
+ * @generated MessageType for protobuf message sync.v1.SyncFlagsResponse
157
+ */
158
+ export declare const SyncFlagsResponse: SyncFlagsResponse$Type;
159
+ declare class FetchAllFlagsRequest$Type extends MessageType<FetchAllFlagsRequest> {
160
+ constructor();
161
+ create(value?: PartialMessage<FetchAllFlagsRequest>): FetchAllFlagsRequest;
162
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FetchAllFlagsRequest): FetchAllFlagsRequest;
163
+ internalBinaryWrite(message: FetchAllFlagsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
164
+ }
165
+ /**
166
+ * @generated MessageType for protobuf message sync.v1.FetchAllFlagsRequest
167
+ */
168
+ export declare const FetchAllFlagsRequest: FetchAllFlagsRequest$Type;
169
+ declare class FetchAllFlagsResponse$Type extends MessageType<FetchAllFlagsResponse> {
170
+ constructor();
171
+ create(value?: PartialMessage<FetchAllFlagsResponse>): FetchAllFlagsResponse;
172
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: FetchAllFlagsResponse): FetchAllFlagsResponse;
173
+ internalBinaryWrite(message: FetchAllFlagsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
174
+ }
175
+ /**
176
+ * @generated MessageType for protobuf message sync.v1.FetchAllFlagsResponse
177
+ */
178
+ export declare const FetchAllFlagsResponse: FetchAllFlagsResponse$Type;
179
+ /**
180
+ * @generated ServiceType for protobuf service sync.v1.FlagSyncService
181
+ */
182
+ export declare const FlagSyncService: ServiceType;
183
+ export {};