@paakd/api 0.0.3 → 0.0.5

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.
Files changed (124) hide show
  1. package/dist/gen/src/proto/files/v1/entities/file_pb.d.ts +199 -0
  2. package/dist/gen/src/proto/files/v1/entities/file_pb.d.ts.map +1 -0
  3. package/dist/gen/src/proto/files/v1/entities/file_pb.js +77 -0
  4. package/dist/gen/src/proto/files/v1/service_pb.d.ts +44 -0
  5. package/dist/gen/src/proto/files/v1/service_pb.d.ts.map +1 -0
  6. package/dist/gen/src/proto/files/v1/service_pb.js +18 -0
  7. package/dist/gen/src/proto/promotions/v1/entities/campaign_pb.d.ts +391 -0
  8. package/dist/gen/src/proto/promotions/v1/entities/campaign_pb.d.ts.map +1 -0
  9. package/dist/gen/src/proto/promotions/v1/entities/campaign_pb.js +140 -0
  10. package/dist/gen/src/proto/promotions/v1/service_pb.d.ts +68 -0
  11. package/dist/gen/src/proto/promotions/v1/service_pb.d.ts.map +1 -0
  12. package/dist/gen/src/proto/promotions/v1/service_pb.js +18 -0
  13. package/dist/gen/src/proto/stocknodes/v1/entities/stocknode_pb.d.ts +508 -0
  14. package/dist/gen/src/proto/stocknodes/v1/entities/stocknode_pb.d.ts.map +1 -0
  15. package/dist/gen/src/proto/stocknodes/v1/entities/stocknode_pb.js +150 -0
  16. package/dist/gen/src/proto/stocknodes/v1/service_pb.d.ts +68 -0
  17. package/dist/gen/src/proto/stocknodes/v1/service_pb.d.ts.map +1 -0
  18. package/dist/gen/src/proto/stocknodes/v1/service_pb.js +18 -0
  19. package/dist/src/index.d.ts +828 -5
  20. package/dist/src/index.d.ts.map +1 -1
  21. package/dist/src/index.js +48 -5
  22. package/dist/src/interceptors.d.ts +1 -1
  23. package/dist/src/interceptors.d.ts.map +1 -1
  24. package/dist/src/interceptors.js +2 -2
  25. package/package.json +8 -10
  26. package/buf/validate/validate_pb.ts +0 -5001
  27. package/dist/src/address.d.ts +0 -53
  28. package/dist/src/address.d.ts.map +0 -1
  29. package/dist/src/address.js +0 -233
  30. package/dist/src/address.spec.d.ts +0 -2
  31. package/dist/src/address.spec.d.ts.map +0 -1
  32. package/dist/src/address.spec.js +0 -488
  33. package/dist/src/auth.d.ts +0 -27
  34. package/dist/src/auth.d.ts.map +0 -1
  35. package/dist/src/auth.js +0 -155
  36. package/dist/src/auth.spec.d.ts +0 -2
  37. package/dist/src/auth.spec.d.ts.map +0 -1
  38. package/dist/src/auth.spec.js +0 -582
  39. package/dist/src/compressor/brotli.d.ts +0 -3
  40. package/dist/src/compressor/brotli.d.ts.map +0 -1
  41. package/dist/src/compressor/brotli.js +0 -30
  42. package/dist/src/policies.d.ts +0 -217
  43. package/dist/src/policies.d.ts.map +0 -1
  44. package/dist/src/policies.js +0 -322
  45. package/dist/src/policies.spec.d.ts +0 -2
  46. package/dist/src/policies.spec.d.ts.map +0 -1
  47. package/dist/src/policies.spec.js +0 -463
  48. package/dist/src/products.d.ts +0 -39
  49. package/dist/src/products.d.ts.map +0 -1
  50. package/dist/src/products.js +0 -95
  51. package/dist/src/products.spec.d.ts +0 -2
  52. package/dist/src/products.spec.d.ts.map +0 -1
  53. package/dist/src/products.spec.js +0 -519
  54. package/dist/src/profile.d.ts +0 -62
  55. package/dist/src/profile.d.ts.map +0 -1
  56. package/dist/src/profile.js +0 -151
  57. package/dist/src/profile.spec.d.ts +0 -2
  58. package/dist/src/profile.spec.d.ts.map +0 -1
  59. package/dist/src/profile.spec.js +0 -475
  60. package/dist/src/registration.d.ts +0 -60
  61. package/dist/src/registration.d.ts.map +0 -1
  62. package/dist/src/registration.js +0 -147
  63. package/dist/src/test-utils.d.ts +0 -87
  64. package/dist/src/test-utils.d.ts.map +0 -1
  65. package/dist/src/test-utils.js +0 -132
  66. package/gen/buf/validate/validate_pb.ts +0 -4799
  67. package/gen/src/proto/auth/v1/authv1connect/service.connect.go +0 -454
  68. package/gen/src/proto/auth/v1/entities/auth.pb.go +0 -818
  69. package/gen/src/proto/auth/v1/entities/auth_pb.ts +0 -348
  70. package/gen/src/proto/auth/v1/entities/policy.pb.go +0 -727
  71. package/gen/src/proto/auth/v1/entities/policy_pb.ts +0 -306
  72. package/gen/src/proto/auth/v1/service-AuthService_connectquery.ts +0 -70
  73. package/gen/src/proto/auth/v1/service.pb.go +0 -119
  74. package/gen/src/proto/auth/v1/service_pb.ts +0 -152
  75. package/gen/src/proto/customers/v1/customersv1connect/service.connect.go +0 -358
  76. package/gen/src/proto/customers/v1/entities/address.pb.go +0 -1073
  77. package/gen/src/proto/customers/v1/entities/address_pb.ts +0 -478
  78. package/gen/src/proto/customers/v1/entities/profile.pb.go +0 -633
  79. package/gen/src/proto/customers/v1/entities/profile_pb.ts +0 -252
  80. package/gen/src/proto/customers/v1/service-CustomerService_connectquery.ts +0 -50
  81. package/gen/src/proto/customers/v1/service.pb.go +0 -110
  82. package/gen/src/proto/customers/v1/service_pb.ts +0 -121
  83. package/gen/src/proto/files/v1/entities/file.pb.go +0 -669
  84. package/gen/src/proto/files/v1/entities/file_pb.ts +0 -265
  85. package/gen/src/proto/files/v1/filesv1connect/service.connect.go +0 -200
  86. package/gen/src/proto/files/v1/service-FileService_connectquery.ts +0 -25
  87. package/gen/src/proto/files/v1/service.pb.go +0 -85
  88. package/gen/src/proto/files/v1/service_pb.ts +0 -65
  89. package/gen/src/proto/products/v1/entities/category.pb.go +0 -744
  90. package/gen/src/proto/products/v1/entities/category_pb.ts +0 -318
  91. package/gen/src/proto/products/v1/entities/collection.pb.go +0 -528
  92. package/gen/src/proto/products/v1/entities/collection_pb.ts +0 -214
  93. package/gen/src/proto/products/v1/entities/product/create.pb.go +0 -453
  94. package/gen/src/proto/products/v1/entities/product/create_pb.ts +0 -199
  95. package/gen/src/proto/products/v1/entities/product/option.pb.go +0 -206
  96. package/gen/src/proto/products/v1/entities/product/option_pb.ts +0 -74
  97. package/gen/src/proto/products/v1/entities/product/shared.pb.go +0 -2890
  98. package/gen/src/proto/products/v1/entities/product/shared_pb.ts +0 -1317
  99. package/gen/src/proto/products/v1/entities/product/update.pb.go +0 -794
  100. package/gen/src/proto/products/v1/entities/product/update_pb.ts +0 -325
  101. package/gen/src/proto/products/v1/entities/tag.pb.go +0 -610
  102. package/gen/src/proto/products/v1/entities/tag_pb.ts +0 -233
  103. package/gen/src/proto/products/v1/entities/taxonomy.pb.go +0 -1352
  104. package/gen/src/proto/products/v1/entities/taxonomy_pb.ts +0 -606
  105. package/gen/src/proto/products/v1/entities/type.pb.go +0 -553
  106. package/gen/src/proto/products/v1/entities/type_pb.ts +0 -215
  107. package/gen/src/proto/products/v1/entities/variant.pb.go +0 -1474
  108. package/gen/src/proto/products/v1/entities/variant_pb.ts +0 -629
  109. package/gen/src/proto/products/v1/productsv1connect/service.connect.go +0 -1195
  110. package/gen/src/proto/products/v1/service-ProductsService_connectquery.ts +0 -199
  111. package/gen/src/proto/products/v1/service.pb.go +0 -250
  112. package/gen/src/proto/products/v1/service_pb.ts +0 -429
  113. package/gen/src/proto/promotions/v1/entities/campaign.pb.go +0 -1229
  114. package/gen/src/proto/promotions/v1/entities/campaign_pb.ts +0 -511
  115. package/gen/src/proto/promotions/v1/promotionsv1connect/service.connect.go +0 -289
  116. package/gen/src/proto/promotions/v1/service-CampaignService_connectquery.ts +0 -42
  117. package/gen/src/proto/promotions/v1/service.pb.go +0 -98
  118. package/gen/src/proto/promotions/v1/service_pb.ts +0 -95
  119. package/gen/src/proto/stocknodes/v1/entities/stocknode.pb.go +0 -1499
  120. package/gen/src/proto/stocknodes/v1/entities/stocknode_pb.ts +0 -655
  121. package/gen/src/proto/stocknodes/v1/service-StockNodesService_connectquery.ts +0 -41
  122. package/gen/src/proto/stocknodes/v1/service.pb.go +0 -98
  123. package/gen/src/proto/stocknodes/v1/service_pb.ts +0 -95
  124. 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
- }