@pushwoosh/rpc-v2-http-api-data 0.1.861 → 0.1.863

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/data.js CHANGED
@@ -23083,7 +23083,30 @@ export const data = {
23083
23083
  "FILTER_EXPRESSION_HIGH_SPEED_NO_DAYS_AGO",
23084
23084
  "FILTER_EXPRESSION_INVALID_COUNTRY_TAG_VALUE",
23085
23085
  "FILTER_EXPRESSION_INVALID_LANGUAGE_TAG_VALUE"
23086
- ]
23086
+ ],
23087
+ "valuesArgs": {
23088
+ "NAME_TOO_LONG": [
23089
+ "max_length"
23090
+ ],
23091
+ "NAME_ALREADY_EXISTS": [
23092
+ "name"
23093
+ ],
23094
+ "SEGLANG_PARSE_ERROR": [
23095
+ "parser_error"
23096
+ ],
23097
+ "FILTER_EXPRESSION_PARSE_ERROR": [
23098
+ "parser_error"
23099
+ ],
23100
+ "FILTER_EXPRESSION_TOO_DEEP": [
23101
+ "max_depth"
23102
+ ],
23103
+ "FILTER_EXPRESSION_INVALID_COUNTRY_TAG_VALUE": [
23104
+ "value"
23105
+ ],
23106
+ "FILTER_EXPRESSION_INVALID_LANGUAGE_TAG_VALUE": [
23107
+ "value"
23108
+ ]
23109
+ }
23087
23110
  },
23088
23111
  "pushwoosh.rpc.segments.v3.SegmentsService_Delete_FailedPreconditions": {
23089
23112
  "type": "E",
@@ -23120,7 +23143,11 @@ export const data = {
23120
23143
  "request": "pushwoosh.rpc.segments.v3.CreateRequest",
23121
23144
  "response": "pushwoosh.rpc.segments.v3.CreateResponse",
23122
23145
  "method": "post",
23123
- "path": "/api/v3/segments"
23146
+ "path": "/api/v3/segments",
23147
+ "errors": {
23148
+ "fieldViolations": "pushwoosh.rpc.segments.v3.SegmentsService_Create_FieldViolations",
23149
+ "failedPreconditions": "pushwoosh.rpc.segments.v3.SegmentsService_Create_FailedPreconditions"
23150
+ }
23124
23151
  },
23125
23152
  "Update": {
23126
23153
  "request": "pushwoosh.rpc.segments.v3.UpdateRequest",
@@ -23132,7 +23159,10 @@ export const data = {
23132
23159
  "request": "pushwoosh.rpc.segments.v3.DeleteRequest",
23133
23160
  "response": "pushwoosh.rpc.segments.v3.DeleteResponse",
23134
23161
  "method": "delete",
23135
- "path": "/api/v3/segments/{segment}"
23162
+ "path": "/api/v3/segments/{segment}",
23163
+ "errors": {
23164
+ "failedPreconditions": "pushwoosh.rpc.segments.v3.SegmentsService_Delete_FailedPreconditions"
23165
+ }
23136
23166
  }
23137
23167
  }
23138
23168
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.1.861",
3
+ "version": "0.1.863",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -14,4 +14,13 @@ export type FailedPrecondition = {
14
14
  Type: string;
15
15
  Description: string;
16
16
  };
17
- export type Common_FailedPreconditions = 'FP_UNSPECIFIED' | 'APPLICATION_IS_MANDATORY' | 'APPLICATION_NOT_FOUND';
17
+ export type Common_FailedPreconditions = {
18
+ type: 'FP_UNSPECIFIED';
19
+ description: string;
20
+ } | {
21
+ type: 'APPLICATION_IS_MANDATORY';
22
+ description: string;
23
+ } | {
24
+ type: 'APPLICATION_NOT_FOUND';
25
+ description: string;
26
+ };
@@ -1,14 +1,135 @@
1
1
  import { FilterExpression as pushwoosh_objects_filters_v1_FilterExpression } from './pushwoosh_objects_filters_v1';
2
- export type SegmentsService_Create_FieldViolations = 'FV_UNSPECIFIED' | 'NAME_EMPTY' | 'NAME_TOO_LONG' | 'NAME_ALREADY_EXISTS' | 'EXPIRE_AT_IN_PAST' | 'CONDITIONS_REQUIRED' | 'SEGLANG_PARSE_ERROR' | 'FILTER_EXPRESSION_PARSE_ERROR' | 'FILTER_EXPRESSION_ONE_APP' | 'FILTER_EXPRESSION_TOO_DEEP' | 'FILTER_EXPRESSION_HIGH_SPEED_TAGS_ONLY' | 'FILTER_EXPRESSION_HIGH_SPEED_NO_DAYS_AGO' | 'FILTER_EXPRESSION_INVALID_COUNTRY_TAG_VALUE' | 'FILTER_EXPRESSION_INVALID_LANGUAGE_TAG_VALUE';
3
- export type SegmentsService_Delete_FailedPreconditions = 'FP_DELETE_UNSPECIFIED' | 'SEGMENT_NOT_FOUND';
4
- export type SegmentsService_Create_FailedPreconditions = 'FP_UNSPECIFIED' | 'HIGH_SPEED_SEGMENTS_NOT_ALLOWED' | 'HIGH_SPEED_SEGMENTS_LIMIT_REACHED';
2
+ export type SegmentsService_Create_FieldViolations = {
3
+ reason: 'FV_UNSPECIFIED';
4
+ field: string;
5
+ description: string;
6
+ } | {
7
+ reason: 'NAME_EMPTY';
8
+ field: string;
9
+ description: string;
10
+ } | {
11
+ reason: 'NAME_TOO_LONG';
12
+ field: string;
13
+ description: string;
14
+ args: {
15
+ max_length: string;
16
+ };
17
+ } | {
18
+ reason: 'NAME_ALREADY_EXISTS';
19
+ field: string;
20
+ description: string;
21
+ args: {
22
+ name: string;
23
+ };
24
+ } | {
25
+ reason: 'EXPIRE_AT_IN_PAST';
26
+ field: string;
27
+ description: string;
28
+ } | {
29
+ reason: 'CONDITIONS_REQUIRED';
30
+ field: string;
31
+ description: string;
32
+ } | {
33
+ reason: 'SEGLANG_PARSE_ERROR';
34
+ field: string;
35
+ description: string;
36
+ args: {
37
+ parser_error: string;
38
+ };
39
+ } | {
40
+ reason: 'FILTER_EXPRESSION_PARSE_ERROR';
41
+ field: string;
42
+ description: string;
43
+ args: {
44
+ parser_error: string;
45
+ };
46
+ } | {
47
+ reason: 'FILTER_EXPRESSION_ONE_APP';
48
+ field: string;
49
+ description: string;
50
+ } | {
51
+ reason: 'FILTER_EXPRESSION_TOO_DEEP';
52
+ field: string;
53
+ description: string;
54
+ args: {
55
+ max_depth: string;
56
+ };
57
+ } | {
58
+ reason: 'FILTER_EXPRESSION_HIGH_SPEED_TAGS_ONLY';
59
+ field: string;
60
+ description: string;
61
+ } | {
62
+ reason: 'FILTER_EXPRESSION_HIGH_SPEED_NO_DAYS_AGO';
63
+ field: string;
64
+ description: string;
65
+ } | {
66
+ reason: 'FILTER_EXPRESSION_INVALID_COUNTRY_TAG_VALUE';
67
+ field: string;
68
+ description: string;
69
+ args: {
70
+ value: string;
71
+ };
72
+ } | {
73
+ reason: 'FILTER_EXPRESSION_INVALID_LANGUAGE_TAG_VALUE';
74
+ field: string;
75
+ description: string;
76
+ args: {
77
+ value: string;
78
+ };
79
+ };
80
+ export type SegmentsService_Delete_FailedPreconditions = {
81
+ type: 'FP_DELETE_UNSPECIFIED';
82
+ description: string;
83
+ } | {
84
+ type: 'SEGMENT_NOT_FOUND';
85
+ description: string;
86
+ };
87
+ export type SegmentsService_Create_FailedPreconditions = {
88
+ type: 'FP_UNSPECIFIED';
89
+ description: string;
90
+ } | {
91
+ type: 'HIGH_SPEED_SEGMENTS_NOT_ALLOWED';
92
+ description: string;
93
+ } | {
94
+ type: 'HIGH_SPEED_SEGMENTS_LIMIT_REACHED';
95
+ description: string;
96
+ };
97
+ export type SegmentsService_Create = ((request: CreateRequest) => Promise<CreateResponse>) & {
98
+ Error(e: unknown): {
99
+ error: unknown;
100
+ fieldViolations?: undefined;
101
+ failedPreconditions?: undefined;
102
+ } | {
103
+ error?: undefined;
104
+ fieldViolations?: SegmentsService_Create_FieldViolations[];
105
+ failedPreconditions?: SegmentsService_Create_FailedPreconditions;
106
+ };
107
+ };
108
+ export type SegmentsService_Delete = ((request: DeleteRequest) => Promise<DeleteResponse>) & {
109
+ Error(e: unknown): {
110
+ error: unknown;
111
+ failedPreconditions?: undefined;
112
+ } | {
113
+ error?: undefined;
114
+ failedPreconditions?: SegmentsService_Delete_FailedPreconditions;
115
+ };
116
+ };
5
117
  export interface SegmentsService {
6
118
  List(request: ListRequest): Promise<ListResponse>;
7
119
  Get(request: GetRequest): Promise<GetResponse>;
8
- Create(request: CreateRequest): Promise<CreateResponse>;
120
+ Create: SegmentsService_Create;
9
121
  Update(request: UpdateRequest): Promise<UpdateResponse>;
10
- Delete(request: DeleteRequest): Promise<DeleteResponse>;
122
+ Delete: SegmentsService_Delete;
11
123
  }
124
+ export type SegmentsService_Errors = {
125
+ Create: {
126
+ fieldViolations: SegmentsService_Create_FieldViolations[];
127
+ failedPreconditions: SegmentsService_Create_FailedPreconditions;
128
+ };
129
+ Delete: {
130
+ failedPreconditions: SegmentsService_Delete_FailedPreconditions;
131
+ };
132
+ };
12
133
  export type DeviceLoadPolicy = 'FILTER' | 'ALL';
13
134
  export type ListRequest = {
14
135
  application?: string;
package/types.d.ts CHANGED
@@ -20,6 +20,7 @@ export type OneofGroup = {
20
20
  export type EnumDefinition = {
21
21
  type: 'E';
22
22
  values: string[];
23
+ valuesArgs?: Record<string, string[]>;
23
24
  };
24
25
  export type ServiceDefinition = {
25
26
  type: 'S';
@@ -34,6 +35,10 @@ export type ServiceMethod = {
34
35
  method: string;
35
36
  path: string;
36
37
  serverStreaming?: boolean;
38
+ errors?: {
39
+ fieldViolations?: string;
40
+ failedPreconditions?: string;
41
+ };
37
42
  };
38
43
  export type InterfaceDefinitionRaw = InterfaceDefinition & {
39
44
  package: string;