anaplan-sdk 0.4.5__py3-none-any.whl → 0.5.0a1__py3-none-any.whl

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.
@@ -1,3 +1,5 @@
1
+ from typing import Literal, TypeAlias, Union
2
+
1
3
  from pydantic import Field
2
4
 
3
5
  from ._base import AnaplanModel
@@ -34,6 +36,120 @@ class Module(AnaplanModel):
34
36
  name: str = Field(description="The name of this module.")
35
37
 
36
38
 
39
+ class Dimension(AnaplanModel):
40
+ id: int = Field(description="The unique identifier of this dimension.")
41
+ name: str = Field(description="The name of this dimension.")
42
+
43
+
44
+ class DimensionWithCode(Dimension):
45
+ code: str = Field(description="The code of this dimension.")
46
+
47
+
48
+ class View(AnaplanModel):
49
+ code: str = Field(description="The code of this view.")
50
+ id: int = Field(description="The unique identifier of this view.")
51
+ name: str = Field(description="The name of this views.")
52
+ moduleId: int = Field(description="The unique identifier of the module this view belongs to.")
53
+
54
+
55
+ class ViewInfo(AnaplanModel):
56
+ view_id: int = Field(description="The unique identifier of this view.")
57
+ view_name: str = Field(description="The name of this view.")
58
+ rows: list[Dimension] = Field(
59
+ [], description="The list of dimensions in the rows of this view."
60
+ )
61
+ pages: list[Dimension] = Field(
62
+ [], description="The list of dimensions in the pages of this view."
63
+ )
64
+
65
+
66
+ class PeriodType(AnaplanModel):
67
+ entity_id: Literal["YEAR", "HALF_YEAR", "MONTH", "QUARTER", "WEEK", "DAY"] = Field(
68
+ description="The type of period entity."
69
+ )
70
+ entity_label: Literal["Year", "Half-Year", "Month", "Quarter", "Week", "Day"] = Field(
71
+ description="The type of period entity."
72
+ )
73
+ entity_index: int = Field(description="The index of the period entity")
74
+
75
+
76
+ class EntityFormatFilter(AnaplanModel):
77
+ source_line_item_or_property: str = Field(
78
+ description="The unique identifier of the source line item or property."
79
+ )
80
+ mapping_hierarchy: str = Field(description="The unique identifier of the mapping hierarchy.")
81
+ key_property: str = Field(description="The unique identifier of the key property.")
82
+ value_property: str = Field(description="The unique identifier of the value property.")
83
+
84
+
85
+ class TextMetadata(AnaplanModel):
86
+ data_type: Literal["TEXT"] = Field(
87
+ description="The data type. Literal for the tagged union discriminator."
88
+ )
89
+ text_type: Literal["DRILLTHRU_URI", "EMAIL_ADDRESS", "GENERAL"] = Field(
90
+ description="The text type."
91
+ )
92
+
93
+
94
+ class ListMetadata(AnaplanModel):
95
+ data_type: Literal["ENTITY"] = Field(
96
+ description="The data type. Literal for the tagged union discriminator."
97
+ )
98
+ hierarchy_entity_id: int = Field(
99
+ validation_alias="hierarchyEntityLongId",
100
+ description="The unique identifier of the hierarchy entity, like Lists or List Subsets.",
101
+ )
102
+ selective_access_applied: bool = Field(
103
+ description="Whether selective access is applied or not."
104
+ )
105
+ show_all: bool = Field(description="Whether to show all values or not.")
106
+ entity_format_filter: EntityFormatFilter | None = Field(
107
+ None, description="Entity format filter configuration."
108
+ )
109
+
110
+
111
+ class TimePeriodMetadata(AnaplanModel):
112
+ data_type: Literal["TIME_ENTITY"] = Field(
113
+ description="The data type. Literal for the tagged union discriminator."
114
+ )
115
+ period_type: PeriodType = Field(description="The period type.")
116
+
117
+
118
+ class NumberMetadata(AnaplanModel):
119
+ data_type: Literal["NUMBER"] = Field(
120
+ description="The data type. Literal for the tagged union discriminator."
121
+ )
122
+ comparison_increase: Literal["GOOD", "BAD", "NEUTRAL"] | None = Field(
123
+ description="The comparison increase setting."
124
+ )
125
+ custom_units: str | None = Field(None, description="Custom units for display.")
126
+ decimal_places: int = Field(description="Number of decimal places.")
127
+ decimal_separator: Literal["COMMA", "FULL_STOP"] = Field(description="The decimal separator.")
128
+ units_display_type: Literal[
129
+ "CUSTOM_SUFFIX",
130
+ "CUSTOM_PREFIX",
131
+ "CURRENCY_CODE",
132
+ "CURRENCY_SYMBOL",
133
+ "PERCENTAGE_SUFFIX",
134
+ "NONE",
135
+ ] = Field(description="Units display type.")
136
+ units_type: Literal["CUSTOM", "CURRENCY", "PERCENTAGE", "NONE"] = Field(
137
+ description="Units type."
138
+ )
139
+ zero_format: Literal["HYPHEN", "ZERO", "BLANK"] = Field(description="Zero format display.")
140
+ grouping_separator: Literal["COMMA", "FULL_STOP", "SPACE", "NONE"] = Field(
141
+ description="The grouping separator."
142
+ )
143
+ minimum_significant_digits: int = Field(description="Minimum significant digits.")
144
+ negative_number_notation: Literal["MINUS_SIGN", "PARENTHESES"] = Field(
145
+ description="Negative number notation."
146
+ )
147
+
148
+
149
+ class GenericTypeMetadata(AnaplanModel):
150
+ data_type: Literal["BOOLEAN", "NONE", "DATE"] = Field(description="The data type.")
151
+
152
+
37
153
  class LineItem(AnaplanModel):
38
154
  id: int = Field(description="The unique identifier of this line item.")
39
155
  name: str = Field(description="The name of this line item.")
@@ -41,16 +157,33 @@ class LineItem(AnaplanModel):
41
157
  description="The unique identifier of the module this line item belongs to."
42
158
  )
43
159
  module_name: str = Field(description="The name of the module this line item belongs to.")
44
- format: str = Field(description="The format of this line item.")
45
- format_metadata: dict = Field(description="The format metadata of this line item.")
160
+ format: Literal["NUMBER", "BOOLEAN", "TEXT", "NONE", "DATE", "LIST", "TIME PERIOD"] = Field(
161
+ description="The format of this line item."
162
+ )
163
+ format_metadata: (
164
+ NumberMetadata | ListMetadata | TimePeriodMetadata | TextMetadata | GenericTypeMetadata
165
+ ) = Field(
166
+ description="The format metadata of this line item. Each Type provides different metadata.",
167
+ discriminator="data_type",
168
+ )
46
169
  summary: str = Field(description="The summary of this line item.")
47
- applies_to: list[dict] = Field([], description="The applies to value of this line item.")
170
+ applies_to: list[Dimension] = Field([], description="The applies to value of this line item.")
171
+ data_tags: list[Dimension] = Field([], description="The data tags of this line item.")
172
+ referenced_by: list[Dimension] = Field([], description="List of references to this line item.")
48
173
  time_scale: str = Field(description="The time scale of this line item.")
49
174
  time_range: str = Field(description="The time range of this line item.")
50
- version: dict = Field(description="The version of this line item.")
175
+ version: Dimension = Field(description="The version of this line item.")
176
+ parent: Dimension | None = Field(None, description="The Parent of this line item.")
177
+ read_access_driver: Dimension | None = Field(
178
+ None, description="The read access driver of this line item."
179
+ )
180
+ write_access_driver: Dimension | None = Field(
181
+ None, description="The write access driver of this line item."
182
+ )
51
183
  style: str = Field(description="The style of this line item.")
52
184
  cell_count: int | None = Field(None, description="The cell count of this line item.")
53
185
  notes: str = Field(description="The notes of this line item.")
186
+ code: str | None = Field(None, description="The code of this line item.")
54
187
  is_summary: bool = Field(description="Whether this line item is a summary or not.")
55
188
  formula: str | None = Field(None, description="The formula of this line item.")
56
189
  formula_scope: str = Field(description="The formula scope of this line item.")
@@ -92,3 +225,87 @@ class InsertionResult(AnaplanModel):
92
225
  ignored: int = Field(description="The number of items ignored, or items that failed.")
93
226
  total: int = Field(description="The total number of items.")
94
227
  failures: list[Failure] = Field([], description="The list of failures.")
228
+
229
+
230
+ class ListDeletionResult(AnaplanModel):
231
+ deleted: int = Field(description="The number of items successfully deleted.")
232
+ failures: list[Failure] = Field([], description="The list of failures.")
233
+
234
+
235
+ class PartialCurrentPeriod(AnaplanModel):
236
+ period_text: str = Field(description="The text representation of the current period.")
237
+ last_day: str = Field(description="The last day of the current period in YYYY-MM-DD format.")
238
+
239
+
240
+ class CurrentPeriod(PartialCurrentPeriod):
241
+ calendar_type: str = Field(description="The type of calendar used for the current period.")
242
+
243
+
244
+ class FiscalYear(AnaplanModel):
245
+ year: str = Field(description="The fiscal year in the format set in the model, e.g. FY24.")
246
+ start_date: str = Field(description="The start date of the fiscal year in YYYY-MM-DD format.")
247
+ end_date: str = Field(description="The end date of the fiscal year in YYYY-MM-DD format.")
248
+
249
+
250
+ class TotalsSelection(AnaplanModel):
251
+ quarter_totals: bool = Field(description="Whether quarter totals are enabled.")
252
+ half_year_totals: bool = Field(description="Whether half year totals are enabled.")
253
+ year_to_date_summary: bool = Field(description="Whether year to date summary is enabled.")
254
+ year_to_go_summary: bool = Field(description="Whether year to go summary is enabled.")
255
+ total_of_all_periods: bool = Field(description="Whether total of all periods is enabled.")
256
+
257
+
258
+ class TotalsSelectionWithQuarter(TotalsSelection):
259
+ extra_month_quarter: Literal[1, 2, 3, 4] = Field(
260
+ description="The quarter in which the extra month is included."
261
+ )
262
+
263
+
264
+ class BaseCalendar(AnaplanModel):
265
+ calendar_type: Literal[
266
+ "Calendar Months/Quarters/Years",
267
+ "Weeks: 4-4-5, 4-5-4 or 5-4-4",
268
+ "Weeks: General",
269
+ "Weeks: 13 4-week Periods",
270
+ ] = Field(description="The type of calendar used.")
271
+ current_period: PartialCurrentPeriod = Field(description="The current period configuration.")
272
+
273
+
274
+ class MonthsQuartersYearsCalendar(BaseCalendar):
275
+ past_years_count: int = Field(description="The number of past years included.")
276
+ fiscal_year: FiscalYear = Field(description="The fiscal year configuration.")
277
+ totals_selection: TotalsSelection = Field(
278
+ description="The totals selection configuration for the calendar."
279
+ )
280
+
281
+
282
+ class WeeksGeneralCalendar(BaseCalendar):
283
+ start_date: str = Field(description="The start date of the calendar in YYYY-MM-DD format.")
284
+ weeks_count: int = Field(description="The number of weeks in the calendar.")
285
+
286
+
287
+ class WeeksPeriodsCalendar(BaseCalendar):
288
+ fiscal_year: FiscalYear = Field(description="The fiscal year configuration.")
289
+ past_years_count: int = Field(description="The number of past years included.")
290
+ future_years_count: int = Field(description="The number of future years included.")
291
+ extra_week_month: int = Field(description="The month in which the extra week is included.")
292
+ week_format: Literal["Numbered", "Week Commencing", "Week Ending"] = Field(
293
+ description="The format of the week."
294
+ )
295
+ totals_selection: TotalsSelectionWithQuarter = Field(
296
+ description="The totals selection configuration for the calendar."
297
+ )
298
+
299
+
300
+ class WeeksGroupingCalendar(WeeksPeriodsCalendar):
301
+ week_grouping: str = Field(
302
+ description="The week grouping configuration, e.g. '4-4-5', '4-5-4', or '5-4-4'."
303
+ )
304
+ totals_selection: TotalsSelection = Field(
305
+ description="The totals selection configuration for the calendar."
306
+ )
307
+
308
+
309
+ ModelCalendar: TypeAlias = Union[
310
+ MonthsQuartersYearsCalendar, WeeksGeneralCalendar, WeeksGroupingCalendar, WeeksPeriodsCalendar
311
+ ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: anaplan-sdk
3
- Version: 0.4.5
3
+ Version: 0.5.0a1
4
4
  Summary: Streamlined Python Interface for Anaplan
5
5
  Project-URL: Homepage, https://vinzenzklass.github.io/anaplan-sdk/
6
6
  Project-URL: Repository, https://github.com/VinzenzKlass/anaplan-sdk
@@ -0,0 +1,30 @@
1
+ anaplan_sdk/__init__.py,sha256=WScEKtXlnRLjCb-j3qW9W4kEACTyPsTLFs-L54et2TQ,351
2
+ anaplan_sdk/_auth.py,sha256=l5z2WCcfQ05OkuQ1dcmikp6dB87Rw1qy2zu8bbaAQTs,16620
3
+ anaplan_sdk/_base.py,sha256=i7NznGMnI9tVQB5mXo5DakSRmvWoDOgfkOMWQGNiXOI,16616
4
+ anaplan_sdk/_oauth.py,sha256=AynlJDrGIinQT0jwxI2RSvtU4D7Wasyw3H1uicdlLVI,12672
5
+ anaplan_sdk/exceptions.py,sha256=ALkA9fBF0NQ7dufFxV6AivjmHyuJk9DOQ9jtJV2n7f0,1809
6
+ anaplan_sdk/_async_clients/__init__.py,sha256=pZXgMMg4S9Aj_pxQCaSiPuNG-sePVGBtNJ0133VjqW4,364
7
+ anaplan_sdk/_async_clients/_alm.py,sha256=pL-l9EBkbR_M7FbIpKo-YPi265busEhqJn2fB0syVsA,13063
8
+ anaplan_sdk/_async_clients/_audit.py,sha256=tsMydMxepKW9NVAVpqoC48sfmKKC7bJoljUycWfxipA,2396
9
+ anaplan_sdk/_async_clients/_bulk.py,sha256=OcCzvMhbQjJBbeyVw6J5o3Kipa7Tfv0fJcS5MAcIZn4,26708
10
+ anaplan_sdk/_async_clients/_cloud_works.py,sha256=miTgllBKcd5-kKjy5XIdMzndQnyR2DngEN8ldS7t_Rg,17529
11
+ anaplan_sdk/_async_clients/_cw_flow.py,sha256=gb7UhKuYI0Z1ftEeLKtx-oWmaqDJN_RTRdiOm2ZkjFM,3991
12
+ anaplan_sdk/_async_clients/_transactional.py,sha256=9TbFaOYG3cPUPwgQosTtFWXQ6G2PiU3P8r5Mw1p4-dk,17063
13
+ anaplan_sdk/_clients/__init__.py,sha256=FsbwvZC1FHrxuRXwbPxUzbhz_lO1DpXIxEOjx6-3QuA,219
14
+ anaplan_sdk/_clients/_alm.py,sha256=IS9G7B8MI9ACucxBKdA60p8Bz3-FsywleNK6g3_cK50,12788
15
+ anaplan_sdk/_clients/_audit.py,sha256=zjzuU0YS1XViBKZfIVJXAivIsskuJQRyU22DRnpSHZo,2265
16
+ anaplan_sdk/_clients/_bulk.py,sha256=bIzu6wd0JbwwQdK4-tp25gVrx3Q7V2NNrV7fFe6TkPg,26760
17
+ anaplan_sdk/_clients/_cloud_works.py,sha256=bFtIgexOS6oXftrTL-o2E1v5H8CzNxDy-vHAlUxdKJg,17334
18
+ anaplan_sdk/_clients/_cw_flow.py,sha256=F7zoZ4CEpXe7FcGTJO9y2vJC5cd7Jz-ipTnlsk4Q-dA,3867
19
+ anaplan_sdk/_clients/_transactional.py,sha256=rEa9VdgTFYQkzij9nBGdur7KbWDq_RrkiuwE25FZ0ic,16767
20
+ anaplan_sdk/models/__init__.py,sha256=8qS16lOb2cKxbHzqMkTK0bYvzolucppqD1I7Xx1I5rc,1731
21
+ anaplan_sdk/models/_alm.py,sha256=oeENd0YM7-LoIRBq2uATIQTxVgIP9rXx3UZE2UnQAp0,4670
22
+ anaplan_sdk/models/_base.py,sha256=6AZc9CfireUKgpZfMxYKu4MbwiyHQOsGLjKrxGXBLic,508
23
+ anaplan_sdk/models/_bulk.py,sha256=WL0OPNbsYo7lpx-vrk_GLvQXZijxfpE0kleqfQifRyg,8868
24
+ anaplan_sdk/models/_transactional.py,sha256=2bH10zvtMb5Lfh6DC7iQk72aEwq6tyLQ-XnH_0wYSqI,14172
25
+ anaplan_sdk/models/cloud_works.py,sha256=nfn_LHPR-KmW7Tpvz-5qNCzmR8SYgvsVV-lx5iDlyqI,19425
26
+ anaplan_sdk/models/flows.py,sha256=SuLgNj5-2SeE3U1i8iY8cq2IkjuUgd_3M1n2ENructk,3625
27
+ anaplan_sdk-0.5.0a1.dist-info/METADATA,sha256=e9ldeBTGI3rqZ9o8VsK_rCl4e2BOqCRIW_Zl5B4UH4U,3669
28
+ anaplan_sdk-0.5.0a1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
29
+ anaplan_sdk-0.5.0a1.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
30
+ anaplan_sdk-0.5.0a1.dist-info/RECORD,,
@@ -1,30 +0,0 @@
1
- anaplan_sdk/__init__.py,sha256=WScEKtXlnRLjCb-j3qW9W4kEACTyPsTLFs-L54et2TQ,351
2
- anaplan_sdk/_auth.py,sha256=l5z2WCcfQ05OkuQ1dcmikp6dB87Rw1qy2zu8bbaAQTs,16620
3
- anaplan_sdk/_base.py,sha256=9CdLshORWsLixOyoFa3A0Bka5lhLwlZrQI5sEdBcGFI,12298
4
- anaplan_sdk/_oauth.py,sha256=AynlJDrGIinQT0jwxI2RSvtU4D7Wasyw3H1uicdlLVI,12672
5
- anaplan_sdk/exceptions.py,sha256=ALkA9fBF0NQ7dufFxV6AivjmHyuJk9DOQ9jtJV2n7f0,1809
6
- anaplan_sdk/_async_clients/__init__.py,sha256=pZXgMMg4S9Aj_pxQCaSiPuNG-sePVGBtNJ0133VjqW4,364
7
- anaplan_sdk/_async_clients/_alm.py,sha256=O1_r-O1tNDq7vXRwE2UEFE5S2bPmPh4IAQPQ8bmZfQE,3297
8
- anaplan_sdk/_async_clients/_audit.py,sha256=a92RY0B3bWxp2CCAWjzqKfvBjG1LJGlai0Hn5qmwgF8,2312
9
- anaplan_sdk/_async_clients/_bulk.py,sha256=Bpq5HT8tT48YznN7gfycGb4LNR5WW5QBVXgo_kZsEj0,24295
10
- anaplan_sdk/_async_clients/_cloud_works.py,sha256=KPX9W55SF6h8fJd4Rx-HLq6eaRA-Vo3rFu343UiiaGQ,16642
11
- anaplan_sdk/_async_clients/_cw_flow.py,sha256=ZTNAbKDwb59Wg3u68hbtt1kpd-LNz9K0sftT-gvYzJQ,3651
12
- anaplan_sdk/_async_clients/_transactional.py,sha256=Mvr7OyBPjQRpBtzkJNfRzV4aNCzUiaYmm0zQubo62Wo,8035
13
- anaplan_sdk/_clients/__init__.py,sha256=FsbwvZC1FHrxuRXwbPxUzbhz_lO1DpXIxEOjx6-3QuA,219
14
- anaplan_sdk/_clients/_alm.py,sha256=UAdQxgHfax-VquC0YtbqrRBku2Rn35tVgwJdxYFScps,3202
15
- anaplan_sdk/_clients/_audit.py,sha256=xQQiwWIb4QQefolPvxNwBFE-pkRzzi8fYPyewjF63lc,2181
16
- anaplan_sdk/_clients/_bulk.py,sha256=_-kb50yL-I-AjLtvhdvLpNyMVb4luRlfBEtxT_q3jO0,23900
17
- anaplan_sdk/_clients/_cloud_works.py,sha256=KAMnLoeMJ2iwMXlDSbKynCE57BtkCfOgM5O8wT1kkSs,16291
18
- anaplan_sdk/_clients/_cw_flow.py,sha256=5IFWFT-qbyGvaSOOtaFOjHnOlyYbj4Rj3xiavfTlm8c,3527
19
- anaplan_sdk/_clients/_transactional.py,sha256=YUVbA54uhMloQcahwMtmZO3YooO6qQzwZN3ZRSu_z_c,7976
20
- anaplan_sdk/models/__init__.py,sha256=nSplwPG_74CG9CKbv1PzP9bsA9v5-daS4azpTCvCQTI,925
21
- anaplan_sdk/models/_alm.py,sha256=IqsTPvkx_ujLpaqZgIrTcr44KHJyKc4dyeRs9rkDjms,2307
22
- anaplan_sdk/models/_base.py,sha256=6AZc9CfireUKgpZfMxYKu4MbwiyHQOsGLjKrxGXBLic,508
23
- anaplan_sdk/models/_bulk.py,sha256=_lHARGGjJgi-AmA7u5ZfCmGpLecPnr73LSAsZSX-a_A,8276
24
- anaplan_sdk/models/_transactional.py,sha256=_0UbVR9D5QABI29yloYrJTSgL-K0EU7PzPeJu5LdhnY,4854
25
- anaplan_sdk/models/cloud_works.py,sha256=nfn_LHPR-KmW7Tpvz-5qNCzmR8SYgvsVV-lx5iDlyqI,19425
26
- anaplan_sdk/models/flows.py,sha256=SuLgNj5-2SeE3U1i8iY8cq2IkjuUgd_3M1n2ENructk,3625
27
- anaplan_sdk-0.4.5.dist-info/METADATA,sha256=drUkXHMRjawxKTPMzL2bPTxCWx2XCwQCD9hrm1LNriw,3667
28
- anaplan_sdk-0.4.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
29
- anaplan_sdk-0.4.5.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
30
- anaplan_sdk-0.4.5.dist-info/RECORD,,