@paakd/api 0.0.3 → 0.0.4
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/package.json +7 -9
- package/buf/validate/validate_pb.ts +0 -5001
- package/gen/buf/validate/validate_pb.ts +0 -4799
- package/gen/src/proto/auth/v1/authv1connect/service.connect.go +0 -454
- package/gen/src/proto/auth/v1/entities/auth.pb.go +0 -818
- package/gen/src/proto/auth/v1/entities/auth_pb.ts +0 -348
- package/gen/src/proto/auth/v1/entities/policy.pb.go +0 -727
- package/gen/src/proto/auth/v1/entities/policy_pb.ts +0 -306
- package/gen/src/proto/auth/v1/service-AuthService_connectquery.ts +0 -70
- package/gen/src/proto/auth/v1/service.pb.go +0 -119
- package/gen/src/proto/auth/v1/service_pb.ts +0 -152
- package/gen/src/proto/customers/v1/customersv1connect/service.connect.go +0 -358
- package/gen/src/proto/customers/v1/entities/address.pb.go +0 -1073
- package/gen/src/proto/customers/v1/entities/address_pb.ts +0 -478
- package/gen/src/proto/customers/v1/entities/profile.pb.go +0 -633
- package/gen/src/proto/customers/v1/entities/profile_pb.ts +0 -252
- package/gen/src/proto/customers/v1/service-CustomerService_connectquery.ts +0 -50
- package/gen/src/proto/customers/v1/service.pb.go +0 -110
- package/gen/src/proto/customers/v1/service_pb.ts +0 -121
- package/gen/src/proto/files/v1/entities/file.pb.go +0 -669
- package/gen/src/proto/files/v1/entities/file_pb.ts +0 -265
- package/gen/src/proto/files/v1/filesv1connect/service.connect.go +0 -200
- package/gen/src/proto/files/v1/service-FileService_connectquery.ts +0 -25
- package/gen/src/proto/files/v1/service.pb.go +0 -85
- package/gen/src/proto/files/v1/service_pb.ts +0 -65
- package/gen/src/proto/products/v1/entities/category.pb.go +0 -744
- package/gen/src/proto/products/v1/entities/category_pb.ts +0 -318
- package/gen/src/proto/products/v1/entities/collection.pb.go +0 -528
- package/gen/src/proto/products/v1/entities/collection_pb.ts +0 -214
- package/gen/src/proto/products/v1/entities/product/create.pb.go +0 -453
- package/gen/src/proto/products/v1/entities/product/create_pb.ts +0 -199
- package/gen/src/proto/products/v1/entities/product/option.pb.go +0 -206
- package/gen/src/proto/products/v1/entities/product/option_pb.ts +0 -74
- package/gen/src/proto/products/v1/entities/product/shared.pb.go +0 -2890
- package/gen/src/proto/products/v1/entities/product/shared_pb.ts +0 -1317
- package/gen/src/proto/products/v1/entities/product/update.pb.go +0 -794
- package/gen/src/proto/products/v1/entities/product/update_pb.ts +0 -325
- package/gen/src/proto/products/v1/entities/tag.pb.go +0 -610
- package/gen/src/proto/products/v1/entities/tag_pb.ts +0 -233
- package/gen/src/proto/products/v1/entities/taxonomy.pb.go +0 -1352
- package/gen/src/proto/products/v1/entities/taxonomy_pb.ts +0 -606
- package/gen/src/proto/products/v1/entities/type.pb.go +0 -553
- package/gen/src/proto/products/v1/entities/type_pb.ts +0 -215
- package/gen/src/proto/products/v1/entities/variant.pb.go +0 -1474
- package/gen/src/proto/products/v1/entities/variant_pb.ts +0 -629
- package/gen/src/proto/products/v1/productsv1connect/service.connect.go +0 -1195
- package/gen/src/proto/products/v1/service-ProductsService_connectquery.ts +0 -199
- package/gen/src/proto/products/v1/service.pb.go +0 -250
- package/gen/src/proto/products/v1/service_pb.ts +0 -429
- package/gen/src/proto/promotions/v1/entities/campaign.pb.go +0 -1229
- package/gen/src/proto/promotions/v1/entities/campaign_pb.ts +0 -511
- package/gen/src/proto/promotions/v1/promotionsv1connect/service.connect.go +0 -289
- package/gen/src/proto/promotions/v1/service-CampaignService_connectquery.ts +0 -42
- package/gen/src/proto/promotions/v1/service.pb.go +0 -98
- package/gen/src/proto/promotions/v1/service_pb.ts +0 -95
- package/gen/src/proto/stocknodes/v1/entities/stocknode.pb.go +0 -1499
- package/gen/src/proto/stocknodes/v1/entities/stocknode_pb.ts +0 -655
- package/gen/src/proto/stocknodes/v1/service-StockNodesService_connectquery.ts +0 -41
- package/gen/src/proto/stocknodes/v1/service.pb.go +0 -98
- package/gen/src/proto/stocknodes/v1/service_pb.ts +0 -95
- package/gen/src/proto/stocknodes/v1/stocknodesv1connect/service.connect.go +0 -297
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
|
2
|
-
//
|
|
3
|
-
// Source: src/proto/customers/v1/service.proto
|
|
4
|
-
|
|
5
|
-
package customersv1connect
|
|
6
|
-
|
|
7
|
-
import (
|
|
8
|
-
connect "connectrpc.com/connect"
|
|
9
|
-
context "context"
|
|
10
|
-
errors "errors"
|
|
11
|
-
http "net/http"
|
|
12
|
-
v1 "paakd.com/packages/api/gen/src/proto/customers/v1"
|
|
13
|
-
entities "paakd.com/packages/api/gen/src/proto/customers/v1/entities"
|
|
14
|
-
strings "strings"
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
|
18
|
-
// compatible. If you get a compiler error that this constant is not defined, this code was
|
|
19
|
-
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
|
20
|
-
// problem by either regenerating this code with an older version of connect or updating the connect
|
|
21
|
-
// version compiled into your binary.
|
|
22
|
-
const _ = connect.IsAtLeastVersion1_13_0
|
|
23
|
-
|
|
24
|
-
const (
|
|
25
|
-
// CustomerServiceName is the fully-qualified name of the CustomerService service.
|
|
26
|
-
CustomerServiceName = "apps.enterprise.interfaces.rpc.customers.v1.CustomerService"
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
|
30
|
-
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
|
31
|
-
//
|
|
32
|
-
// Note that these are different from the fully-qualified method names used by
|
|
33
|
-
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
|
34
|
-
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
|
35
|
-
// period.
|
|
36
|
-
const (
|
|
37
|
-
// CustomerServiceBasicProfileProcedure is the fully-qualified name of the CustomerService's
|
|
38
|
-
// BasicProfile RPC.
|
|
39
|
-
CustomerServiceBasicProfileProcedure = "/apps.enterprise.interfaces.rpc.customers.v1.CustomerService/BasicProfile"
|
|
40
|
-
// CustomerServiceProfileProcedure is the fully-qualified name of the CustomerService's Profile RPC.
|
|
41
|
-
CustomerServiceProfileProcedure = "/apps.enterprise.interfaces.rpc.customers.v1.CustomerService/Profile"
|
|
42
|
-
// CustomerServiceChangePasswordProcedure is the fully-qualified name of the CustomerService's
|
|
43
|
-
// ChangePassword RPC.
|
|
44
|
-
CustomerServiceChangePasswordProcedure = "/apps.enterprise.interfaces.rpc.customers.v1.CustomerService/ChangePassword"
|
|
45
|
-
// CustomerServiceUpdateProfileProcedure is the fully-qualified name of the CustomerService's
|
|
46
|
-
// UpdateProfile RPC.
|
|
47
|
-
CustomerServiceUpdateProfileProcedure = "/apps.enterprise.interfaces.rpc.customers.v1.CustomerService/UpdateProfile"
|
|
48
|
-
// CustomerServiceGetAddressProcedure is the fully-qualified name of the CustomerService's
|
|
49
|
-
// GetAddress RPC.
|
|
50
|
-
CustomerServiceGetAddressProcedure = "/apps.enterprise.interfaces.rpc.customers.v1.CustomerService/GetAddress"
|
|
51
|
-
// CustomerServiceGetAddressesProcedure is the fully-qualified name of the CustomerService's
|
|
52
|
-
// GetAddresses RPC.
|
|
53
|
-
CustomerServiceGetAddressesProcedure = "/apps.enterprise.interfaces.rpc.customers.v1.CustomerService/GetAddresses"
|
|
54
|
-
// CustomerServiceAddAddressProcedure is the fully-qualified name of the CustomerService's
|
|
55
|
-
// AddAddress RPC.
|
|
56
|
-
CustomerServiceAddAddressProcedure = "/apps.enterprise.interfaces.rpc.customers.v1.CustomerService/AddAddress"
|
|
57
|
-
// CustomerServiceUpdateAddressProcedure is the fully-qualified name of the CustomerService's
|
|
58
|
-
// UpdateAddress RPC.
|
|
59
|
-
CustomerServiceUpdateAddressProcedure = "/apps.enterprise.interfaces.rpc.customers.v1.CustomerService/UpdateAddress"
|
|
60
|
-
// CustomerServiceDeleteAddressProcedure is the fully-qualified name of the CustomerService's
|
|
61
|
-
// DeleteAddress RPC.
|
|
62
|
-
CustomerServiceDeleteAddressProcedure = "/apps.enterprise.interfaces.rpc.customers.v1.CustomerService/DeleteAddress"
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
// CustomerServiceClient is a client for the
|
|
66
|
-
// apps.enterprise.interfaces.rpc.customers.v1.CustomerService service.
|
|
67
|
-
type CustomerServiceClient interface {
|
|
68
|
-
BasicProfile(context.Context, *connect.Request[entities.BasicProfileRequest]) (*connect.Response[entities.BasicProfileResponse], error)
|
|
69
|
-
Profile(context.Context, *connect.Request[entities.ProfileRequest]) (*connect.Response[entities.ProfileResponse], error)
|
|
70
|
-
ChangePassword(context.Context, *connect.Request[entities.ChangePasswordRequest]) (*connect.Response[entities.ChangePasswordResponse], error)
|
|
71
|
-
UpdateProfile(context.Context, *connect.Request[entities.UpdateProfileRequest]) (*connect.Response[entities.UpdateProfileResponse], error)
|
|
72
|
-
GetAddress(context.Context, *connect.Request[entities.GetAddressRequest]) (*connect.Response[entities.GetAddressResponse], error)
|
|
73
|
-
GetAddresses(context.Context, *connect.Request[entities.GetAddressesRequest]) (*connect.Response[entities.GetAddressesResponse], error)
|
|
74
|
-
AddAddress(context.Context, *connect.Request[entities.AddAddressRequest]) (*connect.Response[entities.AddAddressResponse], error)
|
|
75
|
-
UpdateAddress(context.Context, *connect.Request[entities.UpdateAddressRequest]) (*connect.Response[entities.UpdateAddressResponse], error)
|
|
76
|
-
DeleteAddress(context.Context, *connect.Request[entities.DeleteAddressRequest]) (*connect.Response[entities.DeleteAddressResponse], error)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// NewCustomerServiceClient constructs a client for the
|
|
80
|
-
// apps.enterprise.interfaces.rpc.customers.v1.CustomerService service. By default, it uses the
|
|
81
|
-
// Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends
|
|
82
|
-
// uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
|
|
83
|
-
// connect.WithGRPCWeb() options.
|
|
84
|
-
//
|
|
85
|
-
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
|
86
|
-
// http://api.acme.com or https://acme.com/grpc).
|
|
87
|
-
func NewCustomerServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) CustomerServiceClient {
|
|
88
|
-
baseURL = strings.TrimRight(baseURL, "/")
|
|
89
|
-
customerServiceMethods := v1.File_src_proto_customers_v1_service_proto.Services().ByName("CustomerService").Methods()
|
|
90
|
-
return &customerServiceClient{
|
|
91
|
-
basicProfile: connect.NewClient[entities.BasicProfileRequest, entities.BasicProfileResponse](
|
|
92
|
-
httpClient,
|
|
93
|
-
baseURL+CustomerServiceBasicProfileProcedure,
|
|
94
|
-
connect.WithSchema(customerServiceMethods.ByName("BasicProfile")),
|
|
95
|
-
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
|
96
|
-
connect.WithClientOptions(opts...),
|
|
97
|
-
),
|
|
98
|
-
profile: connect.NewClient[entities.ProfileRequest, entities.ProfileResponse](
|
|
99
|
-
httpClient,
|
|
100
|
-
baseURL+CustomerServiceProfileProcedure,
|
|
101
|
-
connect.WithSchema(customerServiceMethods.ByName("Profile")),
|
|
102
|
-
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
|
103
|
-
connect.WithClientOptions(opts...),
|
|
104
|
-
),
|
|
105
|
-
changePassword: connect.NewClient[entities.ChangePasswordRequest, entities.ChangePasswordResponse](
|
|
106
|
-
httpClient,
|
|
107
|
-
baseURL+CustomerServiceChangePasswordProcedure,
|
|
108
|
-
connect.WithSchema(customerServiceMethods.ByName("ChangePassword")),
|
|
109
|
-
connect.WithClientOptions(opts...),
|
|
110
|
-
),
|
|
111
|
-
updateProfile: connect.NewClient[entities.UpdateProfileRequest, entities.UpdateProfileResponse](
|
|
112
|
-
httpClient,
|
|
113
|
-
baseURL+CustomerServiceUpdateProfileProcedure,
|
|
114
|
-
connect.WithSchema(customerServiceMethods.ByName("UpdateProfile")),
|
|
115
|
-
connect.WithClientOptions(opts...),
|
|
116
|
-
),
|
|
117
|
-
getAddress: connect.NewClient[entities.GetAddressRequest, entities.GetAddressResponse](
|
|
118
|
-
httpClient,
|
|
119
|
-
baseURL+CustomerServiceGetAddressProcedure,
|
|
120
|
-
connect.WithSchema(customerServiceMethods.ByName("GetAddress")),
|
|
121
|
-
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
|
122
|
-
connect.WithClientOptions(opts...),
|
|
123
|
-
),
|
|
124
|
-
getAddresses: connect.NewClient[entities.GetAddressesRequest, entities.GetAddressesResponse](
|
|
125
|
-
httpClient,
|
|
126
|
-
baseURL+CustomerServiceGetAddressesProcedure,
|
|
127
|
-
connect.WithSchema(customerServiceMethods.ByName("GetAddresses")),
|
|
128
|
-
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
|
129
|
-
connect.WithClientOptions(opts...),
|
|
130
|
-
),
|
|
131
|
-
addAddress: connect.NewClient[entities.AddAddressRequest, entities.AddAddressResponse](
|
|
132
|
-
httpClient,
|
|
133
|
-
baseURL+CustomerServiceAddAddressProcedure,
|
|
134
|
-
connect.WithSchema(customerServiceMethods.ByName("AddAddress")),
|
|
135
|
-
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
|
136
|
-
connect.WithClientOptions(opts...),
|
|
137
|
-
),
|
|
138
|
-
updateAddress: connect.NewClient[entities.UpdateAddressRequest, entities.UpdateAddressResponse](
|
|
139
|
-
httpClient,
|
|
140
|
-
baseURL+CustomerServiceUpdateAddressProcedure,
|
|
141
|
-
connect.WithSchema(customerServiceMethods.ByName("UpdateAddress")),
|
|
142
|
-
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
|
143
|
-
connect.WithClientOptions(opts...),
|
|
144
|
-
),
|
|
145
|
-
deleteAddress: connect.NewClient[entities.DeleteAddressRequest, entities.DeleteAddressResponse](
|
|
146
|
-
httpClient,
|
|
147
|
-
baseURL+CustomerServiceDeleteAddressProcedure,
|
|
148
|
-
connect.WithSchema(customerServiceMethods.ByName("DeleteAddress")),
|
|
149
|
-
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
|
150
|
-
connect.WithClientOptions(opts...),
|
|
151
|
-
),
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// customerServiceClient implements CustomerServiceClient.
|
|
156
|
-
type customerServiceClient struct {
|
|
157
|
-
basicProfile *connect.Client[entities.BasicProfileRequest, entities.BasicProfileResponse]
|
|
158
|
-
profile *connect.Client[entities.ProfileRequest, entities.ProfileResponse]
|
|
159
|
-
changePassword *connect.Client[entities.ChangePasswordRequest, entities.ChangePasswordResponse]
|
|
160
|
-
updateProfile *connect.Client[entities.UpdateProfileRequest, entities.UpdateProfileResponse]
|
|
161
|
-
getAddress *connect.Client[entities.GetAddressRequest, entities.GetAddressResponse]
|
|
162
|
-
getAddresses *connect.Client[entities.GetAddressesRequest, entities.GetAddressesResponse]
|
|
163
|
-
addAddress *connect.Client[entities.AddAddressRequest, entities.AddAddressResponse]
|
|
164
|
-
updateAddress *connect.Client[entities.UpdateAddressRequest, entities.UpdateAddressResponse]
|
|
165
|
-
deleteAddress *connect.Client[entities.DeleteAddressRequest, entities.DeleteAddressResponse]
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// BasicProfile calls apps.enterprise.interfaces.rpc.customers.v1.CustomerService.BasicProfile.
|
|
169
|
-
func (c *customerServiceClient) BasicProfile(ctx context.Context, req *connect.Request[entities.BasicProfileRequest]) (*connect.Response[entities.BasicProfileResponse], error) {
|
|
170
|
-
return c.basicProfile.CallUnary(ctx, req)
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
// Profile calls apps.enterprise.interfaces.rpc.customers.v1.CustomerService.Profile.
|
|
174
|
-
func (c *customerServiceClient) Profile(ctx context.Context, req *connect.Request[entities.ProfileRequest]) (*connect.Response[entities.ProfileResponse], error) {
|
|
175
|
-
return c.profile.CallUnary(ctx, req)
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// ChangePassword calls apps.enterprise.interfaces.rpc.customers.v1.CustomerService.ChangePassword.
|
|
179
|
-
func (c *customerServiceClient) ChangePassword(ctx context.Context, req *connect.Request[entities.ChangePasswordRequest]) (*connect.Response[entities.ChangePasswordResponse], error) {
|
|
180
|
-
return c.changePassword.CallUnary(ctx, req)
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// UpdateProfile calls apps.enterprise.interfaces.rpc.customers.v1.CustomerService.UpdateProfile.
|
|
184
|
-
func (c *customerServiceClient) UpdateProfile(ctx context.Context, req *connect.Request[entities.UpdateProfileRequest]) (*connect.Response[entities.UpdateProfileResponse], error) {
|
|
185
|
-
return c.updateProfile.CallUnary(ctx, req)
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
// GetAddress calls apps.enterprise.interfaces.rpc.customers.v1.CustomerService.GetAddress.
|
|
189
|
-
func (c *customerServiceClient) GetAddress(ctx context.Context, req *connect.Request[entities.GetAddressRequest]) (*connect.Response[entities.GetAddressResponse], error) {
|
|
190
|
-
return c.getAddress.CallUnary(ctx, req)
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
// GetAddresses calls apps.enterprise.interfaces.rpc.customers.v1.CustomerService.GetAddresses.
|
|
194
|
-
func (c *customerServiceClient) GetAddresses(ctx context.Context, req *connect.Request[entities.GetAddressesRequest]) (*connect.Response[entities.GetAddressesResponse], error) {
|
|
195
|
-
return c.getAddresses.CallUnary(ctx, req)
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
// AddAddress calls apps.enterprise.interfaces.rpc.customers.v1.CustomerService.AddAddress.
|
|
199
|
-
func (c *customerServiceClient) AddAddress(ctx context.Context, req *connect.Request[entities.AddAddressRequest]) (*connect.Response[entities.AddAddressResponse], error) {
|
|
200
|
-
return c.addAddress.CallUnary(ctx, req)
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// UpdateAddress calls apps.enterprise.interfaces.rpc.customers.v1.CustomerService.UpdateAddress.
|
|
204
|
-
func (c *customerServiceClient) UpdateAddress(ctx context.Context, req *connect.Request[entities.UpdateAddressRequest]) (*connect.Response[entities.UpdateAddressResponse], error) {
|
|
205
|
-
return c.updateAddress.CallUnary(ctx, req)
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// DeleteAddress calls apps.enterprise.interfaces.rpc.customers.v1.CustomerService.DeleteAddress.
|
|
209
|
-
func (c *customerServiceClient) DeleteAddress(ctx context.Context, req *connect.Request[entities.DeleteAddressRequest]) (*connect.Response[entities.DeleteAddressResponse], error) {
|
|
210
|
-
return c.deleteAddress.CallUnary(ctx, req)
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
// CustomerServiceHandler is an implementation of the
|
|
214
|
-
// apps.enterprise.interfaces.rpc.customers.v1.CustomerService service.
|
|
215
|
-
type CustomerServiceHandler interface {
|
|
216
|
-
BasicProfile(context.Context, *connect.Request[entities.BasicProfileRequest]) (*connect.Response[entities.BasicProfileResponse], error)
|
|
217
|
-
Profile(context.Context, *connect.Request[entities.ProfileRequest]) (*connect.Response[entities.ProfileResponse], error)
|
|
218
|
-
ChangePassword(context.Context, *connect.Request[entities.ChangePasswordRequest]) (*connect.Response[entities.ChangePasswordResponse], error)
|
|
219
|
-
UpdateProfile(context.Context, *connect.Request[entities.UpdateProfileRequest]) (*connect.Response[entities.UpdateProfileResponse], error)
|
|
220
|
-
GetAddress(context.Context, *connect.Request[entities.GetAddressRequest]) (*connect.Response[entities.GetAddressResponse], error)
|
|
221
|
-
GetAddresses(context.Context, *connect.Request[entities.GetAddressesRequest]) (*connect.Response[entities.GetAddressesResponse], error)
|
|
222
|
-
AddAddress(context.Context, *connect.Request[entities.AddAddressRequest]) (*connect.Response[entities.AddAddressResponse], error)
|
|
223
|
-
UpdateAddress(context.Context, *connect.Request[entities.UpdateAddressRequest]) (*connect.Response[entities.UpdateAddressResponse], error)
|
|
224
|
-
DeleteAddress(context.Context, *connect.Request[entities.DeleteAddressRequest]) (*connect.Response[entities.DeleteAddressResponse], error)
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
// NewCustomerServiceHandler builds an HTTP handler from the service implementation. It returns the
|
|
228
|
-
// path on which to mount the handler and the handler itself.
|
|
229
|
-
//
|
|
230
|
-
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
|
231
|
-
// and JSON codecs. They also support gzip compression.
|
|
232
|
-
func NewCustomerServiceHandler(svc CustomerServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
|
233
|
-
customerServiceMethods := v1.File_src_proto_customers_v1_service_proto.Services().ByName("CustomerService").Methods()
|
|
234
|
-
customerServiceBasicProfileHandler := connect.NewUnaryHandler(
|
|
235
|
-
CustomerServiceBasicProfileProcedure,
|
|
236
|
-
svc.BasicProfile,
|
|
237
|
-
connect.WithSchema(customerServiceMethods.ByName("BasicProfile")),
|
|
238
|
-
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
|
239
|
-
connect.WithHandlerOptions(opts...),
|
|
240
|
-
)
|
|
241
|
-
customerServiceProfileHandler := connect.NewUnaryHandler(
|
|
242
|
-
CustomerServiceProfileProcedure,
|
|
243
|
-
svc.Profile,
|
|
244
|
-
connect.WithSchema(customerServiceMethods.ByName("Profile")),
|
|
245
|
-
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
|
246
|
-
connect.WithHandlerOptions(opts...),
|
|
247
|
-
)
|
|
248
|
-
customerServiceChangePasswordHandler := connect.NewUnaryHandler(
|
|
249
|
-
CustomerServiceChangePasswordProcedure,
|
|
250
|
-
svc.ChangePassword,
|
|
251
|
-
connect.WithSchema(customerServiceMethods.ByName("ChangePassword")),
|
|
252
|
-
connect.WithHandlerOptions(opts...),
|
|
253
|
-
)
|
|
254
|
-
customerServiceUpdateProfileHandler := connect.NewUnaryHandler(
|
|
255
|
-
CustomerServiceUpdateProfileProcedure,
|
|
256
|
-
svc.UpdateProfile,
|
|
257
|
-
connect.WithSchema(customerServiceMethods.ByName("UpdateProfile")),
|
|
258
|
-
connect.WithHandlerOptions(opts...),
|
|
259
|
-
)
|
|
260
|
-
customerServiceGetAddressHandler := connect.NewUnaryHandler(
|
|
261
|
-
CustomerServiceGetAddressProcedure,
|
|
262
|
-
svc.GetAddress,
|
|
263
|
-
connect.WithSchema(customerServiceMethods.ByName("GetAddress")),
|
|
264
|
-
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
|
265
|
-
connect.WithHandlerOptions(opts...),
|
|
266
|
-
)
|
|
267
|
-
customerServiceGetAddressesHandler := connect.NewUnaryHandler(
|
|
268
|
-
CustomerServiceGetAddressesProcedure,
|
|
269
|
-
svc.GetAddresses,
|
|
270
|
-
connect.WithSchema(customerServiceMethods.ByName("GetAddresses")),
|
|
271
|
-
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
|
272
|
-
connect.WithHandlerOptions(opts...),
|
|
273
|
-
)
|
|
274
|
-
customerServiceAddAddressHandler := connect.NewUnaryHandler(
|
|
275
|
-
CustomerServiceAddAddressProcedure,
|
|
276
|
-
svc.AddAddress,
|
|
277
|
-
connect.WithSchema(customerServiceMethods.ByName("AddAddress")),
|
|
278
|
-
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
|
279
|
-
connect.WithHandlerOptions(opts...),
|
|
280
|
-
)
|
|
281
|
-
customerServiceUpdateAddressHandler := connect.NewUnaryHandler(
|
|
282
|
-
CustomerServiceUpdateAddressProcedure,
|
|
283
|
-
svc.UpdateAddress,
|
|
284
|
-
connect.WithSchema(customerServiceMethods.ByName("UpdateAddress")),
|
|
285
|
-
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
|
286
|
-
connect.WithHandlerOptions(opts...),
|
|
287
|
-
)
|
|
288
|
-
customerServiceDeleteAddressHandler := connect.NewUnaryHandler(
|
|
289
|
-
CustomerServiceDeleteAddressProcedure,
|
|
290
|
-
svc.DeleteAddress,
|
|
291
|
-
connect.WithSchema(customerServiceMethods.ByName("DeleteAddress")),
|
|
292
|
-
connect.WithIdempotency(connect.IdempotencyNoSideEffects),
|
|
293
|
-
connect.WithHandlerOptions(opts...),
|
|
294
|
-
)
|
|
295
|
-
return "/apps.enterprise.interfaces.rpc.customers.v1.CustomerService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
296
|
-
switch r.URL.Path {
|
|
297
|
-
case CustomerServiceBasicProfileProcedure:
|
|
298
|
-
customerServiceBasicProfileHandler.ServeHTTP(w, r)
|
|
299
|
-
case CustomerServiceProfileProcedure:
|
|
300
|
-
customerServiceProfileHandler.ServeHTTP(w, r)
|
|
301
|
-
case CustomerServiceChangePasswordProcedure:
|
|
302
|
-
customerServiceChangePasswordHandler.ServeHTTP(w, r)
|
|
303
|
-
case CustomerServiceUpdateProfileProcedure:
|
|
304
|
-
customerServiceUpdateProfileHandler.ServeHTTP(w, r)
|
|
305
|
-
case CustomerServiceGetAddressProcedure:
|
|
306
|
-
customerServiceGetAddressHandler.ServeHTTP(w, r)
|
|
307
|
-
case CustomerServiceGetAddressesProcedure:
|
|
308
|
-
customerServiceGetAddressesHandler.ServeHTTP(w, r)
|
|
309
|
-
case CustomerServiceAddAddressProcedure:
|
|
310
|
-
customerServiceAddAddressHandler.ServeHTTP(w, r)
|
|
311
|
-
case CustomerServiceUpdateAddressProcedure:
|
|
312
|
-
customerServiceUpdateAddressHandler.ServeHTTP(w, r)
|
|
313
|
-
case CustomerServiceDeleteAddressProcedure:
|
|
314
|
-
customerServiceDeleteAddressHandler.ServeHTTP(w, r)
|
|
315
|
-
default:
|
|
316
|
-
http.NotFound(w, r)
|
|
317
|
-
}
|
|
318
|
-
})
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
// UnimplementedCustomerServiceHandler returns CodeUnimplemented from all methods.
|
|
322
|
-
type UnimplementedCustomerServiceHandler struct{}
|
|
323
|
-
|
|
324
|
-
func (UnimplementedCustomerServiceHandler) BasicProfile(context.Context, *connect.Request[entities.BasicProfileRequest]) (*connect.Response[entities.BasicProfileResponse], error) {
|
|
325
|
-
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("apps.enterprise.interfaces.rpc.customers.v1.CustomerService.BasicProfile is not implemented"))
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
func (UnimplementedCustomerServiceHandler) Profile(context.Context, *connect.Request[entities.ProfileRequest]) (*connect.Response[entities.ProfileResponse], error) {
|
|
329
|
-
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("apps.enterprise.interfaces.rpc.customers.v1.CustomerService.Profile is not implemented"))
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
func (UnimplementedCustomerServiceHandler) ChangePassword(context.Context, *connect.Request[entities.ChangePasswordRequest]) (*connect.Response[entities.ChangePasswordResponse], error) {
|
|
333
|
-
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("apps.enterprise.interfaces.rpc.customers.v1.CustomerService.ChangePassword is not implemented"))
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
func (UnimplementedCustomerServiceHandler) UpdateProfile(context.Context, *connect.Request[entities.UpdateProfileRequest]) (*connect.Response[entities.UpdateProfileResponse], error) {
|
|
337
|
-
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("apps.enterprise.interfaces.rpc.customers.v1.CustomerService.UpdateProfile is not implemented"))
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
func (UnimplementedCustomerServiceHandler) GetAddress(context.Context, *connect.Request[entities.GetAddressRequest]) (*connect.Response[entities.GetAddressResponse], error) {
|
|
341
|
-
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("apps.enterprise.interfaces.rpc.customers.v1.CustomerService.GetAddress is not implemented"))
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
func (UnimplementedCustomerServiceHandler) GetAddresses(context.Context, *connect.Request[entities.GetAddressesRequest]) (*connect.Response[entities.GetAddressesResponse], error) {
|
|
345
|
-
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("apps.enterprise.interfaces.rpc.customers.v1.CustomerService.GetAddresses is not implemented"))
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
func (UnimplementedCustomerServiceHandler) AddAddress(context.Context, *connect.Request[entities.AddAddressRequest]) (*connect.Response[entities.AddAddressResponse], error) {
|
|
349
|
-
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("apps.enterprise.interfaces.rpc.customers.v1.CustomerService.AddAddress is not implemented"))
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
func (UnimplementedCustomerServiceHandler) UpdateAddress(context.Context, *connect.Request[entities.UpdateAddressRequest]) (*connect.Response[entities.UpdateAddressResponse], error) {
|
|
353
|
-
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("apps.enterprise.interfaces.rpc.customers.v1.CustomerService.UpdateAddress is not implemented"))
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
func (UnimplementedCustomerServiceHandler) DeleteAddress(context.Context, *connect.Request[entities.DeleteAddressRequest]) (*connect.Response[entities.DeleteAddressResponse], error) {
|
|
357
|
-
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("apps.enterprise.interfaces.rpc.customers.v1.CustomerService.DeleteAddress is not implemented"))
|
|
358
|
-
}
|