@pushwoosh/rpc-v2-http-api-data 0.2.513 → 0.2.515

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 (3) hide show
  1. package/data.js +72 -1
  2. package/package.json +1 -1
  3. package/tags.d.ts +35 -2
package/data.js CHANGED
@@ -39542,6 +39542,18 @@ export const data = {
39542
39542
  "response": "pushwoosh.rpc_v2.tags.GetTagUsageResponse",
39543
39543
  "method": "get",
39544
39544
  "path": "/api/tags/{name}:get-tag-usage"
39545
+ },
39546
+ "AddTagField": {
39547
+ "request": "pushwoosh.rpc_v2.tags.AddTagFieldRequest",
39548
+ "response": "pushwoosh.rpc_v2.tags.AddTagFieldResponse",
39549
+ "method": "post",
39550
+ "path": "/api/tags/{name}/fields"
39551
+ },
39552
+ "DeleteTagField": {
39553
+ "request": "pushwoosh.rpc_v2.tags.DeleteTagFieldRequest",
39554
+ "response": "pushwoosh.rpc_v2.tags.DeleteTagFieldResponse",
39555
+ "method": "delete",
39556
+ "path": "/api/tags/{name}/fields/{field}"
39545
39557
  }
39546
39558
  }
39547
39559
  },
@@ -39564,7 +39576,9 @@ export const data = {
39564
39576
  "BOOLEAN",
39565
39577
  "PRICE",
39566
39578
  "VERSION",
39567
- "TIMEZONE"
39579
+ "TIMEZONE",
39580
+ "OBJECT",
39581
+ "OBJECT_LIST"
39568
39582
  ]
39569
39583
  },
39570
39584
  "pushwoosh.rpc_v2.tags.Tag": {
@@ -39584,6 +39598,21 @@ export const data = {
39584
39598
  },
39585
39599
  "hasRightAceModify": {
39586
39600
  "type": "boolean"
39601
+ },
39602
+ "fields": {
39603
+ "type": "pushwoosh.rpc_v2.tags.TagField",
39604
+ "array": true
39605
+ }
39606
+ }
39607
+ },
39608
+ "pushwoosh.rpc_v2.tags.TagField": {
39609
+ "type": "I",
39610
+ "fields": {
39611
+ "name": {
39612
+ "type": "string"
39613
+ },
39614
+ "type": {
39615
+ "type": "pushwoosh.rpc_v2.tags.Tag.Type"
39587
39616
  }
39588
39617
  }
39589
39618
  },
@@ -39598,6 +39627,10 @@ export const data = {
39598
39627
  },
39599
39628
  "userSpecific": {
39600
39629
  "type": "boolean"
39630
+ },
39631
+ "fields": {
39632
+ "type": "pushwoosh.rpc_v2.tags.TagField",
39633
+ "array": true
39601
39634
  }
39602
39635
  }
39603
39636
  },
@@ -39848,6 +39881,44 @@ export const data = {
39848
39881
  }
39849
39882
  }
39850
39883
  },
39884
+ "pushwoosh.rpc_v2.tags.AddTagFieldRequest": {
39885
+ "type": "I",
39886
+ "fields": {
39887
+ "name": {
39888
+ "type": "string"
39889
+ },
39890
+ "field": {
39891
+ "type": "pushwoosh.rpc_v2.tags.TagField"
39892
+ }
39893
+ }
39894
+ },
39895
+ "pushwoosh.rpc_v2.tags.AddTagFieldResponse": {
39896
+ "type": "I",
39897
+ "fields": {
39898
+ "tag": {
39899
+ "type": "pushwoosh.rpc_v2.tags.Tag"
39900
+ }
39901
+ }
39902
+ },
39903
+ "pushwoosh.rpc_v2.tags.DeleteTagFieldRequest": {
39904
+ "type": "I",
39905
+ "fields": {
39906
+ "name": {
39907
+ "type": "string"
39908
+ },
39909
+ "field": {
39910
+ "type": "string"
39911
+ }
39912
+ }
39913
+ },
39914
+ "pushwoosh.rpc_v2.tags.DeleteTagFieldResponse": {
39915
+ "type": "I",
39916
+ "fields": {
39917
+ "tag": {
39918
+ "type": "pushwoosh.rpc_v2.tags.Tag"
39919
+ }
39920
+ }
39921
+ },
39851
39922
  "pushwoosh.rpc_v2.tags.GetTagUsageRequest": {
39852
39923
  "type": "I",
39853
39924
  "fields": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.513",
3
+ "version": "0.2.515",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
package/tags.d.ts CHANGED
@@ -7,6 +7,8 @@ export type TagsService_GetTagsUsage = RpcMethod<GetTagsUsageRequest, GetTagsUsa
7
7
  export type TagsService_List = RpcMethod<ListTagsRequest, ListTagsResponse>;
8
8
  export type TagsService_GetTagValues = RpcMethod<GetTagValuesRequest, GetTagValuesResponse>;
9
9
  export type TagsService_GetTagUsage = RpcMethod<GetTagUsageRequest, GetTagUsageResponse>;
10
+ export type TagsService_AddTagField = RpcMethod<AddTagFieldRequest, AddTagFieldResponse>;
11
+ export type TagsService_DeleteTagField = RpcMethod<DeleteTagFieldRequest, DeleteTagFieldResponse>;
10
12
  export interface TagsService {
11
13
  /** Returns a single account tag (user/device attribute) by name, including its value type and whether it is system-defined or user-specific. Use after list_tags to inspect one tag before editing segments or profiles. */
12
14
  Get: TagsService_Get;
@@ -24,26 +26,40 @@ export interface TagsService {
24
26
  GetTagValues: TagsService_GetTagValues;
25
27
  /** Returns only the segments, in-apps and running or paused journeys that use a tag. For every user of a tag (messages, webhooks, control groups, content) use get_tags_usage. */
26
28
  GetTagUsage: TagsService_GetTagUsage;
29
+ /** Adds a field to an OBJECT or OBJECT_LIST tag; needs object tags enabled for the account. A field is a plain tag named "<object>.<field>"; at most 20 per object. */
30
+ AddTagField: TagsService_AddTagField;
31
+ /** Deletes a field of an OBJECT or OBJECT_LIST tag with its stored values; refuses a field still used (see get_tags_usage) and the last field of an object. */
32
+ DeleteTagField: TagsService_DeleteTagField;
27
33
  }
28
34
  export type GetTagRequest = {
29
35
  /** Tag name to fetch. */
30
36
  name?: string;
31
37
  };
32
- export type Tag_Type = 'UNKNOWN' | 'INTEGER' | 'STRING' | 'LIST' | 'DATE' | 'BOOLEAN' | 'PRICE' | 'VERSION' | 'TIMEZONE';
38
+ export type Tag_Type = 'UNKNOWN' | 'INTEGER' | 'STRING' | 'LIST' | 'DATE' | 'BOOLEAN' | 'PRICE' | 'VERSION' | 'TIMEZONE' | 'OBJECT' | 'OBJECT_LIST';
33
39
  export type Tag = {
34
40
  name: string;
35
41
  type: Tag_Type;
36
42
  system: boolean;
37
43
  userSpecific: boolean;
38
44
  hasRightAceModify: boolean;
45
+ /** Fields of an OBJECT or OBJECT_LIST tag, ordered by name. */
46
+ fields: TagField[];
47
+ };
48
+ export type TagField = {
49
+ /** Field name relative to its object: "amount" for the tag "order.amount". */
50
+ name: string;
51
+ /** INTEGER, STRING, LIST, DATE, BOOLEAN, PRICE or VERSION. */
52
+ type: Tag_Type;
39
53
  };
40
54
  export type CreateTagRequest = {
41
55
  /** Tag name to create (letters, digits, spaces and dashes; max 64 chars). */
42
56
  name?: string;
43
57
  /** Value type of the tag; TIMEZONE is not allowed here. */
44
58
  type?: Tag_Type;
45
- /** If true the tag is stored per user id rather than per device. */
59
+ /** If true the tag is stored per user id rather than per device. OBJECT and OBJECT_LIST tags are always user-specific. */
46
60
  userSpecific?: boolean;
61
+ /** Fields of an OBJECT or OBJECT_LIST tag, 1 to 20; ignored for other types. */
62
+ fields?: TagField[];
47
63
  };
48
64
  export type CreateTagResponse = {
49
65
  tag: Tag;
@@ -133,6 +149,23 @@ export type GetTagValuesResponse = {
133
149
  page: number;
134
150
  perPage: number;
135
151
  };
152
+ export type AddTagFieldRequest = {
153
+ /** Name of the OBJECT or OBJECT_LIST tag. */
154
+ name?: string;
155
+ field?: TagField;
156
+ };
157
+ export type AddTagFieldResponse = {
158
+ tag: Tag;
159
+ };
160
+ export type DeleteTagFieldRequest = {
161
+ /** Name of the OBJECT or OBJECT_LIST tag. */
162
+ name?: string;
163
+ /** Field name relative to the object. */
164
+ field?: string;
165
+ };
166
+ export type DeleteTagFieldResponse = {
167
+ tag: Tag;
168
+ };
136
169
  export type GetTagUsageRequest = {
137
170
  /** Tag name whose references (segments, in-apps, journeys) to return. */
138
171
  name?: string;