-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmetadata.go
186 lines (162 loc) Β· 4.11 KB
/
metadata.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
/*
* Copyright (c) Cherri
*/
package main
var definitions map[string]any
var workflowName string
/* Colors */
var colors map[string]int
var iconColor = -1263359489
func makeColors() {
if len(colors) != 0 {
return
}
colors = map[string]int{
"red": 4282601983,
"darkorange": 4251333119,
"orange": 4271458815,
"yellow": 4274264319,
"green": 4292093695,
"teal": 431817727,
"lightblue": 1440408063,
"blue": 463140863,
"darkblue": 946986751,
"violet": 2071128575,
"purple": 3679049983,
"pink": 3980825855,
"darkgray": 255,
"gray": 3031607807,
"taupe": 2846468607,
}
}
/* Inputs */
var contentItems map[string]string
var inputs []string
var outputs []string
func makeContentItems() {
if len(contentItems) != 0 {
return
}
contentItems = map[string]string{
"app": "WFAppStoreAppContentItem",
"article": "WFArticleContentItem",
"contact": "WFContactContentItem",
"date": "WFDateContentItem",
"email": "WFEmailAddressContentItem",
"folder": "WFFolderContentItem",
"file": "WFGenericFileContentItem",
"image": "WFImageContentItem",
"itunes": "WFiTunesProductContentItem",
"location": "WFLocationContentItem",
"maplink": "WFDCMapsLinkContentItem",
"media": "WFAVAssetContentItem",
"pdf": "WFPDFContentItem",
"phonenumber": "WFPhoneNumberContentItem",
"richtext": "WFRichTextContentItem",
"webpage": "WFSafariWebPageContentItem",
"text": "WFStringContentItem",
"number": "WFNumberContentItem",
"url": "WFURLContentItem",
}
}
/* Workflow Types */
var workflowTypes map[string]string
var types []string
func makeWorkflowTypes() {
if len(workflowTypes) != 0 {
return
}
workflowTypes = map[string]string{
"menubar": "MenuBar",
"quickactions": "QuickActions",
"sharesheet": "ActionExtension",
"notifications": "NCWidget",
"sleepmode": "Sleep",
"watch": "Watch",
"onscreen": "ReceivesOnScreenContent",
}
}
/* Versions */
var versions map[string]string
var clientVersion = "3036.0.4.2"
var iosVersion = 18.0
func makeVersions() {
if len(versions) != 0 {
return
}
versions = map[string]string{
"18": "3036.0.4.2",
"17": "2106.0.3",
"16.5": "900",
"16.4": "900",
"16.3": "900",
"16.2": "900",
"16": "900",
"15.7.2": "800",
"15": "800",
"14": "700",
"13": "600",
"12": "500",
}
}
/* Languages */
var languages map[string]string
func makeLanguages() {
if len(languages) != 0 {
return
}
languages = map[string]string{
"Arabic": "ar_AE",
"Mandarin Chinese (Mainland)": "zh_CN",
"Mandarin Chinese (Taiwan)": "zh_TW",
"Dutch": "nl_NL",
"English (UK)": "en_GB",
"English (US)": "en_US",
"French": "fr_FR",
"German": "de_DE",
"Indonesian": "id_ID",
"Italian": "it_IT",
"Japanese": "jp_JP",
"Korean": "ko_KR",
"Polish": "pl_PL",
"Portuguese (Brazil)": "pt_BR",
"Russian": "ru_RU",
"Spanish (Spain)": "es_ES",
"Thai": "th_TH",
"Turkish": "tr_TR",
"Vietnamese": "vn_VN",
}
}
/* Conditionals */
type condition struct {
variableOneType tokenType
variableOneValue any
condition string
variableTwoType tokenType
variableTwoValue any
variableThreeType tokenType
variableThreeValue any
}
var conditions map[tokenType]string
func makeConditions() {
if len(conditions) != 0 {
return
}
conditions = map[tokenType]string{
Is: "4",
Not: "5",
Any: "100",
Empty: "101",
Contains: "99",
DoesNotContain: "999",
BeginsWith: "8",
EndsWith: "9",
GreaterThan: "2",
GreaterOrEqual: "3",
LessThan: "0",
LessOrEqual: "1",
Between: "1003",
}
}
/* Menus */
var menus map[string][]variableValue